diff --git a/AdsAdManager/metadata/V1/BrandLiftPartnerEnum.php b/AdsAdManager/metadata/V1/BrandLiftPartnerEnum.php new file mode 100644 index 000000000000..68316cde7f52 --- /dev/null +++ b/AdsAdManager/metadata/V1/BrandLiftPartnerEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xC6\x03\x0A5google/ads/admanager/v1/brand_lift_partner_enum.proto\x12\x17google.ads.admanager.v1\"\x9B\x01\x0A\x14BrandLiftPartnerEnum\"\x82\x01\x0A\x10BrandLiftPartner\x12\"\x0A\x1EBRAND_LIFT_PARTNER_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06DYNATA\x10\x01\x12\x0A\x0A\x06INTAGE\x10\x03\x12\x19\x0A\x15KANTAR_MILLWARD_BROWN\x10\x04\x12\x0D\x0A\x09MACROMILL\x10\x05\x12\x08\x0A\x04NONE\x10\x07B\xCD\x01\x0A\x1Bcom.google.ads.admanager.v1B\x19BrandLiftPartnerEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ChildContentEligibilityEnum.php b/AdsAdManager/metadata/V1/ChildContentEligibilityEnum.php new file mode 100644 index 000000000000..ad85eb1c685a --- /dev/null +++ b/AdsAdManager/metadata/V1/ChildContentEligibilityEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xB9\x03\x0AinternalAddGeneratedFile( - "\x0A\xBC\x0A\x0A4google/ads/admanager/v1/content_bundle_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\"W\x0A\x17GetContentBundleRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&admanager.googleapis.com/ContentBundle\"\xC5\x01\x0A\x19ListContentBundlesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04skip\x18\x06 \x01(\x05B\x03\xE0A\x01\"\x8A\x01\x0A\x1AListContentBundlesResponse\x12?\x0A\x0Fcontent_bundles\x18\x01 \x03(\x0B2&.google.ads.admanager.v1.ContentBundle\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x052\xF1\x03\x0A\x14ContentBundleService\x12\xA3\x01\x0A\x10GetContentBundle\x120.google.ads.admanager.v1.GetContentBundleRequest\x1A&.google.ads.admanager.v1.ContentBundle\"5\xDAA\x04name\x82\xD3\xE4\x93\x02(\x12&/v1/{name=networks/*/contentBundles/*}\x12\xB6\x01\x0A\x12ListContentBundles\x122.google.ads.admanager.v1.ListContentBundlesRequest\x1A3.google.ads.admanager.v1.ListContentBundlesResponse\"7\xDAA\x06parent\x82\xD3\xE4\x93\x02(\x12&/v1/{parent=networks/*}/contentBundles\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xCD\x01\x0A\x1Bcom.google.ads.admanager.v1B\x19ContentBundleServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\xAC\x11\x0A4google/ads/admanager/v1/content_bundle_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\"W\x0A\x17GetContentBundleRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&admanager.googleapis.com/ContentBundle\"\xC5\x01\x0A\x19ListContentBundlesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04skip\x18\x06 \x01(\x05B\x03\xE0A\x01\"\x8A\x01\x0A\x1AListContentBundlesResponse\x12?\x0A\x0Fcontent_bundles\x18\x01 \x03(\x0B2&.google.ads.admanager.v1.ContentBundle\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x05\"\x9D\x01\x0A\"BatchActivateContentBundlesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12=\x0A\x05names\x18\x02 \x03(\x09B.\xE0A\x02\xFAA(\x0A&admanager.googleapis.com/ContentBundle\"%\x0A#BatchActivateContentBundlesResponse\"\x9F\x01\x0A\$BatchDeactivateContentBundlesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12=\x0A\x05names\x18\x02 \x03(\x09B.\xE0A\x02\xFAA(\x0A&admanager.googleapis.com/ContentBundle\"'\x0A%BatchDeactivateContentBundlesResponse2\xCF\x07\x0A\x14ContentBundleService\x12\xA3\x01\x0A\x10GetContentBundle\x120.google.ads.admanager.v1.GetContentBundleRequest\x1A&.google.ads.admanager.v1.ContentBundle\"5\xDAA\x04name\x82\xD3\xE4\x93\x02(\x12&/v1/{name=networks/*/contentBundles/*}\x12\xB6\x01\x0A\x12ListContentBundles\x122.google.ads.admanager.v1.ListContentBundlesRequest\x1A3.google.ads.admanager.v1.ListContentBundlesResponse\"7\xDAA\x06parent\x82\xD3\xE4\x93\x02(\x12&/v1/{parent=networks/*}/contentBundles\x12\xE8\x01\x0A\x1BBatchActivateContentBundles\x12;.google.ads.admanager.v1.BatchActivateContentBundlesRequest\x1A<.google.ads.admanager.v1.BatchActivateContentBundlesResponse\"N\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x029\"4/v1/{parent=networks/*}/contentBundles:batchActivate:\x01*\x12\xF0\x01\x0A\x1DBatchDeactivateContentBundles\x12=.google.ads.admanager.v1.BatchDeactivateContentBundlesRequest\x1A>.google.ads.admanager.v1.BatchDeactivateContentBundlesResponse\"P\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02;\"6/v1/{parent=networks/*}/contentBundles:batchDeactivate:\x01*\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xCD\x01\x0A\x1Bcom.google.ads.admanager.v1B\x19ContentBundleServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/CreativeMessages.php b/AdsAdManager/metadata/V1/CreativeMessages.php new file mode 100644 index 000000000000..941eb084564b --- /dev/null +++ b/AdsAdManager/metadata/V1/CreativeMessages.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xF5\x03\x0A/google/ads/admanager/v1/creative_messages.proto\x12\x17google.ads.admanager.v1\x1A\x19google/api/resource.proto\"\xB9\x01\x0A\x08Creative\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1E\x0A\x0Cdisplay_name\x18\x08 \x01(\x09B\x03\xE0A\x02H\x00\x88\x01\x01:i\xEAAf\x0A!admanager.googleapis.com/Creative\x12,networks/{network_code}/creatives/{creative}*\x09creatives2\x08creativeB\x0F\x0A\x0D_display_nameB\xC9\x01\x0A\x1Bcom.google.ads.admanager.v1B\x15CreativeMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CreativePlaceholder.php b/AdsAdManager/metadata/V1/CreativePlaceholder.php new file mode 100644 index 000000000000..2f1174b5b2f5 --- /dev/null +++ b/AdsAdManager/metadata/V1/CreativePlaceholder.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x8F\x07\x0A2google/ads/admanager/v1/creative_placeholder.proto\x12\x17google.ads.admanager.v1\x1A\"google/ads/admanager/v1/size.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\"\xA8\x03\x0A\x13CreativePlaceholder\x120\x0A\x04size\x18\x01 \x01(\x0B2\x1D.google.ads.admanager.v1.SizeB\x03\xE0A\x02\x12N\x0A\x0Acompanions\x18\x0A \x03(\x0B25.google.ads.admanager.v1.CreativePlaceholderCompanionB\x03\xE0A\x01\x12,\x0A\x17expected_creative_count\x18\x03 \x01(\x05B\x06\xE0A\x01\xE0A\x07H\x00\x88\x01\x01\x12B\x0A\x0Eapplied_labels\x18\x04 \x03(\x0B2%.google.ads.admanager.v1.AppliedLabelB\x03\xE0A\x01\x12\x1D\x0A\x08amp_only\x18\x05 \x01(\x08B\x06\xE0A\x01\xE0A\x07H\x01\x88\x01\x01\x121\x0A\x1Fcreative_targeting_display_name\x18\x06 \x01(\x09B\x03\xE0A\x01H\x02\x88\x01\x01B\x1A\x0A\x18_expected_creative_countB\x0B\x0A\x09_amp_onlyB\"\x0A _creative_targeting_display_name\"^\x0A\x1CCreativePlaceholderCompanion\x125\x0A\x04size\x18\x01 \x01(\x0B2\x1D.google.ads.admanager.v1.SizeB\x03\xE0A\x02H\x00\x88\x01\x01B\x07\x0A\x05_sizeB\xCC\x01\x0A\x1Bcom.google.ads.admanager.v1B\x18CreativePlaceholderProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CreativeSetMessages.php b/AdsAdManager/metadata/V1/CreativeSetMessages.php new file mode 100644 index 000000000000..b52b624e4dfe --- /dev/null +++ b/AdsAdManager/metadata/V1/CreativeSetMessages.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA3\x06\x0A3google/ads/admanager/v1/creative_set_messages.proto\x12\x17google.ads.admanager.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBF\x03\x0A\x0BCreativeSet\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1E\x0A\x0Cdisplay_name\x18\x03 \x01(\x09B\x03\xE0A\x02H\x00\x88\x01\x01\x12J\x0A\x0Fmaster_creative\x18\x05 \x01(\x09B,\xE0A\x02\xE0A\x05\xFAA#\x0A!admanager.googleapis.com/CreativeH\x01\x88\x01\x01\x12F\x0A\x13companion_creatives\x18\x07 \x03(\x09B)\xE0A\x02\xFAA#\x0A!admanager.googleapis.com/Creative\x129\x0A\x0Bupdate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x02\x88\x01\x01:y\xEAAv\x0A\$admanager.googleapis.com/CreativeSet\x123networks/{network_code}/creativeSets/{creative_set}*\x0CcreativeSets2\x0BcreativeSetB\x0F\x0A\x0D_display_nameB\x12\x0A\x10_master_creativeB\x0E\x0A\x0C_update_timeB\xCC\x01\x0A\x1Bcom.google.ads.admanager.v1B\x18CreativeSetMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CreativeSetService.php b/AdsAdManager/metadata/V1/CreativeSetService.php new file mode 100644 index 000000000000..5c259e14db4a --- /dev/null +++ b/AdsAdManager/metadata/V1/CreativeSetService.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xFC\x0F\x0A2google/ads/admanager/v1/creative_set_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\"S\x0A\x15GetCreativeSetRequest\x12:\x0A\x04name\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$admanager.googleapis.com/CreativeSet\"\xC3\x01\x0A\x17ListCreativeSetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04skip\x18\x06 \x01(\x05B\x03\xE0A\x01\"\x84\x01\x0A\x18ListCreativeSetsResponse\x12;\x0A\x0Dcreative_sets\x18\x01 \x03(\x0B2\$.google.ads.admanager.v1.CreativeSet\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x05\"\x95\x01\x0A\x18CreateCreativeSetRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12?\x0A\x0Ccreative_set\x18\x02 \x01(\x0B2\$.google.ads.admanager.v1.CreativeSetB\x03\xE0A\x02\"\x91\x01\x0A\x18UpdateCreativeSetRequest\x12?\x0A\x0Ccreative_set\x18\x01 \x01(\x0B2\$.google.ads.admanager.v1.CreativeSetB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x012\xF3\x06\x0A\x12CreativeSetService\x12\x9B\x01\x0A\x0EGetCreativeSet\x12..google.ads.admanager.v1.GetCreativeSetRequest\x1A\$.google.ads.admanager.v1.CreativeSet\"3\xDAA\x04name\x82\xD3\xE4\x93\x02&\x12\$/v1/{name=networks/*/creativeSets/*}\x12\xAE\x01\x0A\x10ListCreativeSets\x120.google.ads.admanager.v1.ListCreativeSetsRequest\x1A1.google.ads.admanager.v1.ListCreativeSetsResponse\"5\xDAA\x06parent\x82\xD3\xE4\x93\x02&\x12\$/v1/{parent=networks/*}/creativeSets\x12\xBE\x01\x0A\x11CreateCreativeSet\x121.google.ads.admanager.v1.CreateCreativeSetRequest\x1A\$.google.ads.admanager.v1.CreativeSet\"P\xDAA\x13parent,creative_set\x82\xD3\xE4\x93\x024\"\$/v1/{parent=networks/*}/creativeSets:\x0Ccreative_set\x12\xD0\x01\x0A\x11UpdateCreativeSet\x121.google.ads.admanager.v1.UpdateCreativeSetRequest\x1A\$.google.ads.admanager.v1.CreativeSet\"b\xDAA\x18creative_set,update_mask\x82\xD3\xE4\x93\x02A21/v1/{creative_set.name=networks/*/creativeSets/*}:\x0Ccreative_set\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xCB\x01\x0A\x1Bcom.google.ads.admanager.v1B\x17CreativeSetServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CreativeTargeting.php b/AdsAdManager/metadata/V1/CreativeTargeting.php new file mode 100644 index 000000000000..a897e5e721fb --- /dev/null +++ b/AdsAdManager/metadata/V1/CreativeTargeting.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xFD\x03\x0A0google/ads/admanager/v1/creative_targeting.proto\x12\x17google.ads.admanager.v1\x1A\x1Fgoogle/api/field_behavior.proto\"\xB9\x01\x0A\x11CreativeTargeting\x121\x0A\x1Fcreative_targeting_display_name\x18\x01 \x01(\x09B\x03\xE0A\x02H\x00\x88\x01\x01\x12?\x0A\x09targeting\x18\x02 \x01(\x0B2\".google.ads.admanager.v1.TargetingB\x03\xE0A\x02H\x01\x88\x01\x01B\"\x0A _creative_targeting_display_nameB\x0C\x0A\x0A_targetingB\xCA\x01\x0A\x1Bcom.google.ads.admanager.v1B\x16CreativeTargetingProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomPacingCurve.php b/AdsAdManager/metadata/V1/CustomPacingCurve.php new file mode 100644 index 000000000000..8aea04bfb426 --- /dev/null +++ b/AdsAdManager/metadata/V1/CustomPacingCurve.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA4\x06\x0A1google/ads/admanager/v1/custom_pacing_curve.proto\x12\x17google.ads.admanager.v1\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xEF\x01\x0A\x11CustomPacingCurve\x12q\x0A\x17custom_pacing_goal_unit\x18\x01 \x01(\x0E2F.google.ads.admanager.v1.CustomPacingGoalUnitEnum.CustomPacingGoalUnitB\x03\xE0A\x02H\x00\x88\x01\x01\x12K\x0A\x13custom_pacing_goals\x18\x02 \x03(\x0B2).google.ads.admanager.v1.CustomPacingGoalB\x03\xE0A\x02B\x1A\x0A\x18_custom_pacing_goal_unit\"\xCC\x01\x0A\x10CustomPacingGoal\x128\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01H\x00\x88\x01\x01\x12-\x0A\x18use_line_item_start_time\x18\x02 \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x01\x88\x01\x01\x12\x18\x0A\x06amount\x18\x03 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01B\x0D\x0A\x0B_start_timeB\x1B\x0A\x19_use_line_item_start_timeB\x09\x0A\x07_amountB\xCA\x01\x0A\x1Bcom.google.ads.admanager.v1B\x16CustomPacingCurveProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/CustomPacingGoalUnitEnum.php b/AdsAdManager/metadata/V1/CustomPacingGoalUnitEnum.php new file mode 100644 index 000000000000..7fa7c67ca2e2 --- /dev/null +++ b/AdsAdManager/metadata/V1/CustomPacingGoalUnitEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xAF\x03\x0A:google/ads/admanager/v1/custom_pacing_goal_unit_enum.proto\x12\x17google.ads.admanager.v1\"|\x0A\x18CustomPacingGoalUnitEnum\"`\x0A\x14CustomPacingGoalUnit\x12'\x0A#CUSTOM_PACING_GOAL_UNIT_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08ABSOLUTE\x10\x01\x12\x11\x0A\x0DMILLI_PERCENT\x10\x02B\xD1\x01\x0A\x1Bcom.google.ads.admanager.v1B\x1DCustomPacingGoalUnitEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/DeliveryEnums.php b/AdsAdManager/metadata/V1/DeliveryEnums.php new file mode 100644 index 000000000000..77575a30fb70 --- /dev/null +++ b/AdsAdManager/metadata/V1/DeliveryEnums.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x8C\x07\x0A,google/ads/admanager/v1/delivery_enums.proto\x12\x17google.ads.admanager.v1\"\x9E\x01\x0A\x1CLineItemDeliveryRateTypeEnum\"~\x0A\x18LineItemDeliveryRateType\x12,\x0A(LINE_ITEM_DELIVERY_RATE_TYPE_UNSPECIFIED\x10\x00\x12\x17\x0A\x13AS_FAST_AS_POSSIBLE\x10\x03\x12\x0A\x0A\x06EVENLY\x10\x01\x12\x0F\x0A\x0BFRONTLOADED\x10\x02\"\xAB\x01\x0A\x14RoadblockingTypeEnum\"\x92\x01\x0A\x10RoadblockingType\x12!\x0A\x1DROADBLOCKING_TYPE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DALL_ROADBLOCK\x10\x01\x12\x17\x0A\x13AS_MANY_AS_POSSIBLE\x10\x02\x12\x10\x0A\x0CCREATIVE_SET\x10\x03\x12\x0F\x0A\x0BONE_OR_MORE\x10\x04\x12\x0C\x0A\x08ONLY_ONE\x10\x05\"\x8C\x01\x0A\x1BCompanionDeliveryOptionEnum\"m\x0A\x17CompanionDeliveryOption\x12)\x0A%COMPANION_DELIVERY_OPTION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08OPTIONAL\x10\x01\x12\x10\x0A\x0CAT_LEAST_ONE\x10\x02\x12\x07\x0A\x03ALL\x10\x03\"\x93\x01\x0A\x18CreativeRotationTypeEnum\"w\x0A\x14CreativeRotationType\x12&\x0A\"CREATIVE_ROTATION_TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06EVENLY\x10\x01\x12\x0D\x0A\x09OPTIMIZED\x10\x02\x12\x0E\x0A\x0ASEQUENTIAL\x10\x04\x12\x0C\x0A\x08WEIGHTED\x10\x03B\xC6\x01\x0A\x1Bcom.google.ads.admanager.v1B\x12DeliveryEnumsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/DeliveryIndicator.php b/AdsAdManager/metadata/V1/DeliveryIndicator.php new file mode 100644 index 000000000000..237e76a171e9 --- /dev/null +++ b/AdsAdManager/metadata/V1/DeliveryIndicator.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xD4\x03\x0A0google/ads/admanager/v1/delivery_indicator.proto\x12\x17google.ads.admanager.v1\"\xB1\x01\x0A\x11DeliveryIndicator\x12.\x0A\x1Cexpected_delivery_percentage\x18\x01 \x01(\x01B\x03\xE0A\x03H\x00\x88\x01\x01\x12,\x0A\x1Aactual_delivery_percentage\x18\x02 \x01(\x01B\x03\xE0A\x03H\x01\x88\x01\x01B\x1F\x0A\x1D_expected_delivery_percentageB\x1D\x0A\x1B_actual_delivery_percentageB\xCA\x01\x0A\x1Bcom.google.ads.admanager.v1B\x16DeliveryIndicatorProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/DiscountTypeEnum.php b/AdsAdManager/metadata/V1/DiscountTypeEnum.php new file mode 100644 index 000000000000..b666eb55c6c1 --- /dev/null +++ b/AdsAdManager/metadata/V1/DiscountTypeEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x86\x03\x0A0google/ads/admanager/v1/discount_type_enum.proto\x12\x17google.ads.admanager.v1\"e\x0A\x10DiscountTypeEnum\"Q\x0A\x0CDiscountType\x12\x1D\x0A\x19DISCOUNT_TYPE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EABSOLUTE_VALUE\x10\x01\x12\x0E\x0A\x0APERCENTAGE\x10\x02B\xC9\x01\x0A\x1Bcom.google.ads.admanager.v1B\x15DiscountTypeEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ExclusionScopeEnum.php b/AdsAdManager/metadata/V1/ExclusionScopeEnum.php new file mode 100644 index 000000000000..57b00f689426 --- /dev/null +++ b/AdsAdManager/metadata/V1/ExclusionScopeEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x8B\x03\x0A2google/ads/admanager/v1/exclusion_scope_enum.proto\x12\x17google.ads.admanager.v1\"f\x0A\x12ExclusionScopeEnum\"P\x0A\x0EExclusionScope\x12\x1F\x0A\x1BEXCLUSION_SCOPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04PAGE\x10\x01\x12\x0A\x0A\x06STREAM\x10\x02\x12\x07\x0A\x03POD\x10\x03B\xCB\x01\x0A\x1Bcom.google.ads.admanager.v1B\x17ExclusionScopeEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/GrpProviderEnum.php b/AdsAdManager/metadata/V1/GrpProviderEnum.php new file mode 100644 index 000000000000..bc4cd5857271 --- /dev/null +++ b/AdsAdManager/metadata/V1/GrpProviderEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xF6\x02\x0A/google/ads/admanager/v1/grp_provider_enum.proto\x12\x17google.ads.admanager.v1\"W\x0A\x0FGrpProviderEnum\"D\x0A\x0BGrpProvider\x12\x1C\x0A\x18GRP_PROVIDER_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06GOOGLE\x10\x01\x12\x0B\x0A\x07NIELSEN\x10\x02B\xC8\x01\x0A\x1Bcom.google.ads.admanager.v1B\x14GrpProviderEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/GrpSettings.php b/AdsAdManager/metadata/V1/GrpSettings.php new file mode 100644 index 000000000000..c87b03d8a154 --- /dev/null +++ b/AdsAdManager/metadata/V1/GrpSettings.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\x84\x0A\x0A*google/ads/admanager/v1/grp_settings.proto\x12\x17google.ads.admanager.v1\x1A4google/ads/admanager/v1/grp_target_gender_enum.proto\x1A5google/ads/admanager/v1/nielsen_ctv_pacing_enum.proto\x1A?google/ads/admanager/v1/pacing_device_categorization_enum.proto\x1A\x1Fgoogle/api/field_behavior.proto\"\x9E\x06\x0A\x0BGrpSettings\x12 \x0A\x0Emin_target_age\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12 \x0A\x0Emax_target_age\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01\x12]\x0A\x0Dtarget_gender\x18\x03 \x01(\x0E2<.google.ads.admanager.v1.GrpTargetGenderEnum.GrpTargetGenderB\x03\xE0A\x01H\x02\x88\x01\x01\x12P\x0A\x08provider\x18\x04 \x01(\x0E24.google.ads.admanager.v1.GrpProviderEnum.GrpProviderB\x03\xE0A\x01H\x03\x88\x01\x01\x128\x0A&in_target_ratio_estimate_milli_percent\x18\x06 \x01(\x03B\x03\xE0A\x01H\x04\x88\x01\x01\x12i\x0A\x17nielsen_ctv_pacing_type\x18\x08 \x01(\x0E2>.google.ads.admanager.v1.NielsenCtvPacingEnum.NielsenCtvPacingB\x03\xE0A\x01H\x05\x88\x01\x01\x12\x87\x01\x0A!pacing_device_categorization_type\x18\x09 \x01(\x0E2R.google.ads.admanager.v1.PacingDeviceCategorizationEnum.PacingDeviceCategorizationB\x03\xE0A\x01H\x06\x88\x01\x01\x12#\x0A\x11apply_true_coview\x18\x0A \x01(\x08B\x03\xE0A\x01H\x07\x88\x01\x01B\x11\x0A\x0F_min_target_ageB\x11\x0A\x0F_max_target_ageB\x10\x0A\x0E_target_genderB\x0B\x0A\x09_providerB)\x0A'_in_target_ratio_estimate_milli_percentB\x1A\x0A\x18_nielsen_ctv_pacing_typeB\$\x0A\"_pacing_device_categorization_typeB\x14\x0A\x12_apply_true_coviewB\xC4\x01\x0A\x1Bcom.google.ads.admanager.v1B\x10GrpSettingsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/GrpTargetGenderEnum.php b/AdsAdManager/metadata/V1/GrpTargetGenderEnum.php new file mode 100644 index 000000000000..eb039e237b2e --- /dev/null +++ b/AdsAdManager/metadata/V1/GrpTargetGenderEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x93\x03\x0A4google/ads/admanager/v1/grp_target_gender_enum.proto\x12\x17google.ads.admanager.v1\"k\x0A\x13GrpTargetGenderEnum\"T\x0A\x0FGrpTargetGender\x12!\x0A\x1DGRP_TARGET_GENDER_UNSPECIFIED\x10\x00\x12\x08\x0A\x04BOTH\x10\x01\x12\x0A\x0A\x06FEMALE\x10\x02\x12\x08\x0A\x04MALE\x10\x03B\xCC\x01\x0A\x1Bcom.google.ads.admanager.v1B\x18GrpTargetGenderEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/LineItemAllowedFormatEnum.php b/AdsAdManager/metadata/V1/LineItemAllowedFormatEnum.php new file mode 100644 index 000000000000..8586406c43ce --- /dev/null +++ b/AdsAdManager/metadata/V1/LineItemAllowedFormatEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xB7\x03\x0A;google/ads/admanager/v1/line_item_allowed_format_enum.proto\x12\x17google.ads.admanager.v1\"\x81\x01\x0A\x19LineItemAllowedFormatEnum\"d\x0A\x15LineItemAllowedFormat\x12(\x0A\$LINE_ITEM_ALLOWED_FORMAT_UNSPECIFIED\x10\x00\x12\x09\x0A\x05AUDIO\x10\x01\x12\x09\x0A\x05VIDEO\x10\x02\x12\x0B\x0A\x07DISPLAY\x10\x03B\xD2\x01\x0A\x1Bcom.google.ads.admanager.v1B\x1ELineItemAllowedFormatEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/LineItemDealInfo.php b/AdsAdManager/metadata/V1/LineItemDealInfo.php new file mode 100644 index 000000000000..0954abe6ddf1 --- /dev/null +++ b/AdsAdManager/metadata/V1/LineItemDealInfo.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xED\x02\x0A1google/ads/admanager/v1/line_item_deal_info.proto\x12\x17google.ads.admanager.v1\"K\x0A\x10LineItemDealInfo\x12\"\x0A\x10external_deal_id\x18\x02 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01B\x13\x0A\x11_external_deal_idB\xC9\x01\x0A\x1Bcom.google.ads.admanager.v1B\x15LineItemDealInfoProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/LineItemDeliveryForecastSourceEnum.php b/AdsAdManager/metadata/V1/LineItemDeliveryForecastSourceEnum.php new file mode 100644 index 000000000000..924a1292fb7f --- /dev/null +++ b/AdsAdManager/metadata/V1/LineItemDeliveryForecastSourceEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xFE\x03\x0AEgoogle/ads/admanager/v1/line_item_delivery_forecast_source_enum.proto\x12\x17google.ads.admanager.v1\"\xB5\x01\x0A\"LineItemDeliveryForecastSourceEnum\"\x8E\x01\x0A\x1ELineItemDeliveryForecastSource\x122\x0A.LINE_ITEM_DELIVERY_FORECAST_SOURCE_UNSPECIFIED\x10\x00\x12\x17\x0A\x13CUSTOM_PACING_CURVE\x10\x01\x12\x0F\x0A\x0BFORECASTING\x10\x02\x12\x0E\x0A\x0AHISTORICAL\x10\x03B\xDB\x01\x0A\x1Bcom.google.ads.admanager.v1B'LineItemDeliveryForecastSourceEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/LineItemDiscount.php b/AdsAdManager/metadata/V1/LineItemDiscount.php new file mode 100644 index 000000000000..3e752d9556e0 --- /dev/null +++ b/AdsAdManager/metadata/V1/LineItemDiscount.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xE9\x03\x0A0google/ads/admanager/v1/line_item_discount.proto\x12\x17google.ads.admanager.v1\x1A\x1Fgoogle/api/field_behavior.proto\"\xA6\x01\x0A\x10LineItemDiscount\x12W\x0A\x0Ddiscount_type\x18\x01 \x01(\x0E26.google.ads.admanager.v1.DiscountTypeEnum.DiscountTypeB\x03\xE0A\x01H\x00\x88\x01\x01\x12\x1A\x0A\x08discount\x18\x02 \x01(\x01B\x03\xE0A\x01H\x01\x88\x01\x01B\x10\x0A\x0E_discount_typeB\x0B\x0A\x09_discountB\xC9\x01\x0A\x1Bcom.google.ads.admanager.v1B\x15LineItemDiscountProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/LineItemEnums.php b/AdsAdManager/metadata/V1/LineItemEnums.php index 3a48af5f15a9..cee92b73f8c1 100644 --- a/AdsAdManager/metadata/V1/LineItemEnums.php +++ b/AdsAdManager/metadata/V1/LineItemEnums.php @@ -15,7 +15,7 @@ public static function initOnce() { return; } $pool->internalAddGeneratedFile( - "\x0A\x9E\x04\x0A-google/ads/admanager/v1/line_item_enums.proto\x12\x17google.ads.admanager.v1\"\x82\x02\x0A\x10LineItemTypeEnum\"\xED\x01\x0A\x0CLineItemType\x12\x1E\x0A\x1ALINE_ITEM_TYPE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BSPONSORSHIP\x10\x0C\x12\x0C\x0A\x08STANDARD\x10\x0D\x12\x0B\x0A\x07NETWORK\x10\x09\x12\x08\x0A\x04BULK\x10\x04\x12\x12\x0A\x0EPRICE_PRIORITY\x10\x0B\x12\x09\x0A\x05HOUSE\x10\x07\x12\x12\x0A\x0ECLICK_TRACKING\x10\x06\x12\x0B\x0A\x07ADSENSE\x10\x02\x12\x0F\x0A\x0BAD_EXCHANGE\x10\x03\x12\x0A\x0A\x06BUMPER\x10\x05\x12\x12\x0A\x0EPREFERRED_DEAL\x10\x0A\x12\x16\x0A\x12AUDIENCE_EXTENSION\x10\x0EB\xC6\x01\x0A\x1Bcom.google.ads.admanager.v1B\x12LineItemEnumsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\xF3\x08\x0A-google/ads/admanager/v1/line_item_enums.proto\x12\x17google.ads.admanager.v1\"\xA8\x01\x0A\x14LineItemCostTypeEnum\"\x8F\x01\x0A\x10LineItemCostType\x12#\x0A\x1FLINE_ITEM_COST_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x03CPA\x10\x01\x1A\x02\x08\x01\x12\x07\x0A\x03CPC\x10\x02\x12\x07\x0A\x03CPD\x10\x03\x12\x07\x0A\x03CPM\x10\x04\x12\x08\x0A\x04VCPM\x10\x05\x12\x11\x0A\x0DCPM_IN_TARGET\x10\x06\x12\x07\x0A\x03CPF\x10\x07\x12\x08\x0A\x04CPCV\x10\x08\"\x82\x02\x0A\x10LineItemTypeEnum\"\xED\x01\x0A\x0CLineItemType\x12\x1E\x0A\x1ALINE_ITEM_TYPE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BSPONSORSHIP\x10\x0C\x12\x0C\x0A\x08STANDARD\x10\x0D\x12\x0B\x0A\x07NETWORK\x10\x09\x12\x08\x0A\x04BULK\x10\x04\x12\x12\x0A\x0EPRICE_PRIORITY\x10\x0B\x12\x09\x0A\x05HOUSE\x10\x07\x12\x12\x0A\x0ECLICK_TRACKING\x10\x06\x12\x0B\x0A\x07ADSENSE\x10\x02\x12\x0F\x0A\x0BAD_EXCHANGE\x10\x03\x12\x0A\x0A\x06BUMPER\x10\x05\x12\x12\x0A\x0EPREFERRED_DEAL\x10\x0A\x12\x16\x0A\x12AUDIENCE_EXTENSION\x10\x0E\"\x88\x01\x0A\x1DLineItemReservationStatusEnum\"g\x0A\x19LineItemReservationStatus\x12,\x0A(LINE_ITEM_RESERVATION_STATUS_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08RESERVED\x10\x01\x12\x0E\x0A\x0AUNRESERVED\x10\x02\"\x9C\x02\x0A\x1ALineItemComputedStatusEnum\"\xFD\x01\x0A\x16LineItemComputedStatus\x12)\x0A%LINE_ITEM_COMPUTED_STATUS_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CANCELED\x10\x01\x12\x0D\x0A\x09COMPLETED\x10\x02\x12\x0E\x0A\x0ADELIVERING\x10\x03\x12\x15\x0A\x11DELIVERY_EXTENDED\x10\x04\x12\x0F\x0A\x0BDISAPPROVED\x10\x05\x12\x09\x0A\x05DRAFT\x10\x06\x12\x0C\x0A\x08INACTIVE\x10\x07\x12\x0A\x0A\x06PAUSED\x10\x08\x12\x1D\x0A\x19PAUSED_INVENTORY_RELEASED\x10\x09\x12\x14\x0A\x10PENDING_APPROVAL\x10\x0A\x12\x09\x0A\x05READY\x10\x0BB\xC6\x01\x0A\x1Bcom.google.ads.admanager.v1B\x12LineItemEnumsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/LineItemMessages.php b/AdsAdManager/metadata/V1/LineItemMessages.php index 3b17eb574c1a..6afad2e139cb 100644 --- a/AdsAdManager/metadata/V1/LineItemMessages.php +++ b/AdsAdManager/metadata/V1/LineItemMessages.php @@ -14,15 +14,35 @@ public static function initOnce() { if (static::$is_initialized == true) { return; } + \GPBMetadata\Google\Ads\Admanager\V1\AppliedLabel::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\ChildContentEligibilityEnum::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\CreativePlaceholder::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTargeting::initOnce(); \GPBMetadata\Google\Ads\Admanager\V1\CustomFieldValue::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\CustomPacingCurve::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\DeliveryEnums::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\DeliveryIndicator::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\EnvironmentTypeEnum::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\ExclusionScopeEnum::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\FrequencyCap::initOnce(); \GPBMetadata\Google\Ads\Admanager\V1\Goal::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\GrpSettings::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\LineItemAllowedFormatEnum::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\LineItemDealInfo::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\LineItemDeliveryForecastSourceEnum::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\LineItemDiscount::initOnce(); \GPBMetadata\Google\Ads\Admanager\V1\LineItemEnums::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\LineItemStats::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\SkippableAdTypeEnum::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\Targeting::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\ThirdPartyMeasurementSettings::initOnce(); \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); + \GPBMetadata\Google\Protobuf\Duration::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); \GPBMetadata\Google\Type\Money::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xE4\x09\x0A0google/ads/admanager/v1/line_item_messages.proto\x12\x17google.ads.admanager.v1\x1A\"google/ads/admanager/v1/goal.proto\x1A-google/ads/admanager/v1/line_item_enums.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/type/money.proto\"\xF9\x05\x0A\x08LineItem\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12=\x0A\x05order\x18\x02 \x01(\x09B)\xE0A\x02\xE0A\x05\xFAA \x0A\x1Eadmanager.googleapis.com/OrderH\x00\x88\x01\x01\x12\x1E\x0A\x0Cdisplay_name\x18\x03 \x01(\x09B\x03\xE0A\x02H\x01\x88\x01\x01\x128\x0A\x0Astart_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02H\x02\x88\x01\x01\x126\x0A\x08end_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x03\x88\x01\x01\x12X\x0A\x0Eline_item_type\x18\x11 \x01(\x0E26.google.ads.admanager.v1.LineItemTypeEnum.LineItemTypeB\x03\xE0A\x02H\x04\x88\x01\x01\x12*\x0A\x04rate\x18\x14 \x01(\x0B2\x12.google.type.MoneyB\x03\xE0A\x02H\x05\x88\x01\x01\x12,\x0A\x06budget\x18# \x01(\x0B2\x12.google.type.MoneyB\x03\xE0A\x03H\x06\x88\x01\x01\x12K\x0A\x13custom_field_values\x18; \x03(\x0B2).google.ads.admanager.v1.CustomFieldValueB\x03\xE0A\x01\x125\x0A\x04goal\x18L \x01(\x0B2\x1D.google.ads.admanager.v1.GoalB\x03\xE0A\x01H\x07\x88\x01\x01:j\xEAAg\x0A!admanager.googleapis.com/LineItem\x12-networks/{network_code}/lineItems/{line_item}*\x09lineItems2\x08lineItemB\x08\x0A\x06_orderB\x0F\x0A\x0D_display_nameB\x0D\x0A\x0B_start_timeB\x0B\x0A\x09_end_timeB\x11\x0A\x0F_line_item_typeB\x07\x0A\x05_rateB\x09\x0A\x07_budgetB\x07\x0A\x05_goalB\xC9\x01\x0A\x1Bcom.google.ads.admanager.v1B\x15LineItemMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\xEA6\x0A0google/ads/admanager/v1/line_item_messages.proto\x12\x17google.ads.admanager.v1\x1Agoogle/ads/admanager/v1/third_party_measurement_settings.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/type/money.proto\"\xFD*\x0A\x08LineItem\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12=\x0A\x05order\x18\x02 \x01(\x09B)\xE0A\x02\xE0A\x05\xFAA \x0A\x1Eadmanager.googleapis.com/OrderH\x00\x88\x01\x01\x12\x1E\x0A\x0Cdisplay_name\x18\x03 \x01(\x09B\x03\xE0A\x02H\x01\x88\x01\x01\x12'\x0A\x15external_line_item_id\x18\x04 \x01(\x09B\x03\xE0A\x01H\x02\x88\x01\x01\x12\$\x0A\x12order_display_name\x18\x05 \x01(\x09B\x03\xE0A\x03H\x03\x88\x01\x01\x128\x0A\x0Astart_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02H\x04\x88\x01\x01\x12=\x0A\x0Ftarget_end_time\x18_ \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01H\x05\x88\x01\x01\x126\x0A\x08end_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x06\x88\x01\x01\x12%\x0A\x13auto_extension_days\x18\x08 \x01(\x05B\x03\xE0A\x01H\x07\x88\x01\x01\x12'\x0A\x12end_time_unlimited\x18\x09 \x01(\x08B\x06\xE0A\x01\xE0A\x07H\x08\x88\x01\x01\x12p\x0A\x16creative_rotation_type\x18\x0A \x01(\x0E2F.google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationTypeB\x03\xE0A\x02H\x09\x88\x01\x01\x12w\x0A\x12delivery_rate_type\x18\x0B \x01(\x0E2N.google.ads.admanager.v1.LineItemDeliveryRateTypeEnum.LineItemDeliveryRateTypeB\x06\xE0A\x01\xE0A\x07H\x0A\x88\x01\x01\x12\x89\x01\x0A\x18delivery_forecast_source\x18\x0C \x01(\x0E2Z.google.ads.admanager.v1.LineItemDeliveryForecastSourceEnum.LineItemDeliveryForecastSourceB\x06\xE0A\x01\xE0A\x07H\x0B\x88\x01\x01\x12Q\x0A\x13custom_pacing_curve\x18\x0D \x01(\x0B2*.google.ads.admanager.v1.CustomPacingCurveB\x03\xE0A\x01H\x0C\x88\x01\x01\x12f\x0A\x11roadblocking_type\x18\x0E \x01(\x0E2>.google.ads.admanager.v1.RoadblockingTypeEnum.RoadblockingTypeB\x06\xE0A\x01\xE0A\x07H\x0D\x88\x01\x01\x12d\x0A\x11skippable_ad_type\x18\x0F \x01(\x0E2<.google.ads.admanager.v1.SkippableAdTypeEnum.SkippableAdTypeB\x06\xE0A\x01\xE0A\x07H\x0E\x88\x01\x01\x12B\x0A\x0Efrequency_caps\x18\x10 \x03(\x0B2%.google.ads.admanager.v1.FrequencyCapB\x03\xE0A\x01\x12X\x0A\x0Eline_item_type\x18\x11 \x01(\x0E26.google.ads.admanager.v1.LineItemTypeEnum.LineItemTypeB\x03\xE0A\x02H\x0F\x88\x01\x01\x12\x1D\x0A\x08priority\x18\x13 \x01(\x05B\x06\xE0A\x01\xE0A\x07H\x10\x88\x01\x01\x12*\x0A\x04rate\x18\x14 \x01(\x0B2\x12.google.type.MoneyB\x03\xE0A\x02H\x11\x88\x01\x01\x122\x0A\x09value_cpm\x18\x15 \x01(\x0B2\x12.google.type.MoneyB\x06\xE0A\x01\xE0A\x07H\x12\x88\x01\x01\x12[\x0A\x09cost_type\x18\x16 \x01(\x0E2>.google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostTypeB\x03\xE0A\x02H\x13\x88\x01\x01\x12E\x0A\x08discount\x18\x17 \x01(\x0B2).google.ads.admanager.v1.LineItemDiscountB\x03\xE0A\x01H\x14\x88\x01\x01\x12)\x0A\x17contracted_units_bought\x18\x18 \x01(\x03B\x03\xE0A\x01H\x15\x88\x01\x01\x12P\x0A\x15creative_placeholders\x18\x19 \x03(\x0B2,.google.ads.admanager.v1.CreativePlaceholderB\x03\xE0A\x02\x12c\x0A\x10environment_type\x18\x1A \x01(\x0E2<.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentTypeB\x06\xE0A\x01\xE0A\x07H\x16\x88\x01\x01\x12y\x0A\x19companion_delivery_option\x18\x1B \x01(\x0E2L.google.ads.admanager.v1.CompanionDeliveryOptionEnum.CompanionDeliveryOptionB\x03\xE0A\x01H\x17\x88\x01\x01\x12 \x0A\x0Eallow_overbook\x18\x1C \x01(\x08B\x03\xE0A\x04H\x18\x88\x01\x01\x12&\x0A\x14skip_inventory_check\x18\x1D \x01(\x08B\x03\xE0A\x04H\x19\x88\x01\x01\x128\x0A&skip_cross_selling_rule_warning_checks\x18\x1E \x01(\x08B\x03\xE0A\x04H\x1A\x88\x01\x01\x12%\x0A\x13reserve_on_creation\x18\x1F \x01(\x08B\x03\xE0A\x04H\x1B\x88\x01\x01\x12?\x0A\x05stats\x18 \x01(\x0B2&.google.ads.admanager.v1.LineItemStatsB\x03\xE0A\x03H\x1C\x88\x01\x01\x12P\x0A\x12delivery_indicator\x18! \x01(\x0B2*.google.ads.admanager.v1.DeliveryIndicatorB\x03\xE0A\x03H\x1D\x88\x01\x01\x12,\x0A\x06budget\x18# \x01(\x0B2\x12.google.type.MoneyB\x03\xE0A\x03H\x1E\x88\x01\x01\x12d\x0A\x06status\x18\$ \x01(\x0E2J.google.ads.admanager.v1.LineItemComputedStatusEnum.LineItemComputedStatusB\x03\xE0A\x03H\x1F\x88\x01\x01\x12v\x0A\x12reservation_status\x18& \x01(\x0E2P.google.ads.admanager.v1.LineItemReservationStatusEnum.LineItemReservationStatusB\x03\xE0A\x03H \x88\x01\x01\x12\x1A\x0A\x08archived\x18' \x01(\x08B\x03\xE0A\x03H!\x88\x01\x01\x12#\x0A\x11web_property_code\x181 \x01(\x09B\x03\xE0A\x01H\"\x88\x01\x01\x12B\x0A\x0Eapplied_labels\x182 \x03(\x0B2%.google.ads.admanager.v1.AppliedLabelB\x03\xE0A\x01\x12L\x0A\x18effective_applied_labels\x183 \x03(\x0B2%.google.ads.admanager.v1.AppliedLabelB\x03\xE0A\x03\x123\x0A!same_advertiser_exception_enabled\x184 \x01(\x08B\x03\xE0A\x01H#\x88\x01\x01\x12\x1F\x0A\x0Dupdate_source\x185 \x01(\x09B\x03\xE0A\x03H\$\x88\x01\x01\x12\x17\x0A\x05notes\x186 \x01(\x09B\x03\xE0A\x01H%\x88\x01\x01\x12m\x0A\x1Ccompetitive_constraint_scope\x188 \x01(\x0E2:.google.ads.admanager.v1.ExclusionScopeEnum.ExclusionScopeB\x06\xE0A\x01\xE0A\x07H&\x88\x01\x01\x129\x0A\x0Bupdate_time\x189 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H'\x88\x01\x01\x129\x0A\x0Bcreate_time\x18: \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H(\x88\x01\x01\x12K\x0A\x13custom_field_values\x18; \x03(\x0B2).google.ads.admanager.v1.CustomFieldValueB\x03\xE0A\x01\x12#\x0A\x11missing_creatives\x18= \x01(\x08B\x03\xE0A\x03H)\x88\x01\x01\x12j\x0A third_party_measurement_settings\x18C \x01(\x0B26.google.ads.admanager.v1.ThirdPartyMeasurementSettingsB\x03\xE0A\x01H*\x88\x01\x01\x12)\x0A\x17youtube_kids_restricted\x18J \x01(\x08B\x03\xE0A\x01H+\x88\x01\x01\x12H\x0A\x1Bmax_video_creative_duration\x18K \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01H,\x88\x01\x01\x125\x0A\x04goal\x18L \x01(\x0B2\x1D.google.ads.admanager.v1.GoalB\x03\xE0A\x01H-\x88\x01\x01\x12;\x0A\x0Fsecondary_goals\x18d \x03(\x0B2\x1D.google.ads.admanager.v1.GoalB\x03\xE0A\x01\x12D\x0A\x0Cgrp_settings\x18N \x01(\x0B2\$.google.ads.admanager.v1.GrpSettingsB\x03\xE0A\x01H.\x88\x01\x01\x12F\x0A\x09deal_info\x18O \x01(\x0B2).google.ads.admanager.v1.LineItemDealInfoB\x03\xE0A\x01H/\x88\x01\x01\x12P\x0A\x1Eviewability_provider_companies\x18U \x03(\x09B(\xE0A\x01\xFAA\"\x0A admanager.googleapis.com/Company\x12|\x0A\x19child_content_eligibility\x18V \x01(\x0E2L.google.ads.admanager.v1.ChildContentEligibilityEnum.ChildContentEligibilityB\x06\xE0A\x01\xE0A\x07H0\x88\x01\x01\x12'\x0A\x15custom_vast_extension\x18X \x01(\x09B\x03\xE0A\x01H1\x88\x01\x01\x121\x0A\x1Fsponsorship_exclusivity_enabled\x18Y \x01(\x08B\x03\xE0A\x01H2\x88\x01\x01\x123\x0A!repeated_creative_serving_enabled\x18Z \x01(\x08B\x03\xE0A\x01H3\x88\x01\x01\x12?\x0A\x09targeting\x18] \x01(\x0B2\".google.ads.admanager.v1.TargetingB\x03\xE0A\x02H4\x88\x01\x01\x12L\x0A\x13creative_targetings\x18^ \x03(\x0B2*.google.ads.admanager.v1.CreativeTargetingB\x03\xE0A\x01\x12f\x0A\x0Fallowed_formats\x18p \x03(\x0E2H.google.ads.admanager.v1.LineItemAllowedFormatEnum.LineItemAllowedFormatB\x03\xE0A\x01:j\xEAAg\x0A!admanager.googleapis.com/LineItem\x12-networks/{network_code}/lineItems/{line_item}*\x09lineItems2\x08lineItemB\x08\x0A\x06_orderB\x0F\x0A\x0D_display_nameB\x18\x0A\x16_external_line_item_idB\x15\x0A\x13_order_display_nameB\x0D\x0A\x0B_start_timeB\x12\x0A\x10_target_end_timeB\x0B\x0A\x09_end_timeB\x16\x0A\x14_auto_extension_daysB\x15\x0A\x13_end_time_unlimitedB\x19\x0A\x17_creative_rotation_typeB\x15\x0A\x13_delivery_rate_typeB\x1B\x0A\x19_delivery_forecast_sourceB\x16\x0A\x14_custom_pacing_curveB\x14\x0A\x12_roadblocking_typeB\x14\x0A\x12_skippable_ad_typeB\x11\x0A\x0F_line_item_typeB\x0B\x0A\x09_priorityB\x07\x0A\x05_rateB\x0C\x0A\x0A_value_cpmB\x0C\x0A\x0A_cost_typeB\x0B\x0A\x09_discountB\x1A\x0A\x18_contracted_units_boughtB\x13\x0A\x11_environment_typeB\x1C\x0A\x1A_companion_delivery_optionB\x11\x0A\x0F_allow_overbookB\x17\x0A\x15_skip_inventory_checkB)\x0A'_skip_cross_selling_rule_warning_checksB\x16\x0A\x14_reserve_on_creationB\x08\x0A\x06_statsB\x15\x0A\x13_delivery_indicatorB\x09\x0A\x07_budgetB\x09\x0A\x07_statusB\x15\x0A\x13_reservation_statusB\x0B\x0A\x09_archivedB\x14\x0A\x12_web_property_codeB\$\x0A\"_same_advertiser_exception_enabledB\x10\x0A\x0E_update_sourceB\x08\x0A\x06_notesB\x1F\x0A\x1D_competitive_constraint_scopeB\x0E\x0A\x0C_update_timeB\x0E\x0A\x0C_create_timeB\x14\x0A\x12_missing_creativesB#\x0A!_third_party_measurement_settingsB\x1A\x0A\x18_youtube_kids_restrictedB\x1E\x0A\x1C_max_video_creative_durationB\x07\x0A\x05_goalB\x0F\x0A\x0D_grp_settingsB\x0C\x0A\x0A_deal_infoB\x1C\x0A\x1A_child_content_eligibilityB\x18\x0A\x16_custom_vast_extensionB\"\x0A _sponsorship_exclusivity_enabledB\$\x0A\"_repeated_creative_serving_enabledB\x0C\x0A\x0A_targetingB\xC9\x01\x0A\x1Bcom.google.ads.admanager.v1B\x15LineItemMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/LineItemStats.php b/AdsAdManager/metadata/V1/LineItemStats.php new file mode 100644 index 000000000000..8f5c33de2763 --- /dev/null +++ b/AdsAdManager/metadata/V1/LineItemStats.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xAC\x05\x0A-google/ads/admanager/v1/line_item_stats.proto\x12\x17google.ads.admanager.v1\"\x90\x03\x0A\x0DLineItemStats\x12'\x0A\x15impressions_delivered\x18\x01 \x01(\x03B\x03\xE0A\x03H\x00\x88\x01\x01\x12\"\x0A\x10clicks_delivered\x18\x02 \x01(\x03B\x03\xE0A\x03H\x01\x88\x01\x01\x12-\x0A\x1Bvideo_completions_delivered\x18\x03 \x01(\x03B\x03\xE0A\x03H\x02\x88\x01\x01\x12(\x0A\x16video_starts_delivered\x18\x04 \x01(\x03B\x03\xE0A\x03H\x03\x88\x01\x01\x120\x0A\x1Eviewable_impressions_delivered\x18\x05 \x01(\x03B\x03\xE0A\x03H\x04\x88\x01\x01\x12\x1A\x0A\x0Ddelivery_data\x18\x08 \x03(\x03B\x03\xE0A\x03B\x18\x0A\x16_impressions_deliveredB\x13\x0A\x11_clicks_deliveredB\x1E\x0A\x1C_video_completions_deliveredB\x19\x0A\x17_video_starts_deliveredB!\x0A\x1F_viewable_impressions_deliveredB\xC6\x01\x0A\x1Bcom.google.ads.admanager.v1B\x12LineItemStatsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/LiveStreamEventEnums.php b/AdsAdManager/metadata/V1/LiveStreamEventEnums.php index 575ea201912f..7c261d0f5d64 100644 --- a/AdsAdManager/metadata/V1/LiveStreamEventEnums.php +++ b/AdsAdManager/metadata/V1/LiveStreamEventEnums.php @@ -15,7 +15,7 @@ public static function initOnce() { return; } $pool->internalAddGeneratedFile( - "\x0A\xE0\x0B\x0A5google/ads/admanager/v1/live_stream_event_enums.proto\x12\x17google.ads.admanager.v1\"\x94\x01\x0A\x19LiveStreamEventStatusEnum\"w\x0A\x15LiveStreamEventStatus\x12(\x0A\$LIVE_STREAM_EVENT_STATUS_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0E\x0A\x0AADS_PAUSED\x10\x02\x12\x0C\x0A\x08ARCHIVED\x10\x03\x12\x0A\x0A\x06PAUSED\x10\x04\"\xD6\x02\x0A\x15AdBreakMarkupTypeEnum\"\xBC\x02\x0A\x11AdBreakMarkupType\x12\$\x0A AD_BREAK_MARKUP_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14HLS_DATERANGE_SPLICE\x10\x01\x12\x0F\x0A\x0BHLS_EXT_CUE\x10\x02\x12\x18\x0A\x14HLS_PRIMETIME_SPLICE\x10\x03\x12!\x0A\x1DSCTE35_BINARY_BREAK_START_END\x10\x04\x12'\x0A#SCTE35_BINARY_PROVIDER_AD_START_END\x10\x05\x121\x0A-SCTE35_BINARY_PROVIDER_PLACEMENT_OP_START_END\x10\x06\x12\x1F\x0A\x1BSCTE35_BINARY_SPLICE_INSERT\x10\x07\x12\x1C\x0A\x18SCTE35_XML_SPLICE_INSERT\x10\x0B\"\x8D\x01\x0A\"LiveStreamEventStreamingFormatEnum\"g\x0A\x1ELiveStreamEventStreamingFormat\x122\x0A.LIVE_STREAM_EVENT_STREAMING_FORMAT_UNSPECIFIED\x10\x00\x12\x08\x0A\x04DASH\x10\x01\x12\x07\x0A\x03HLS\x10\x02\"\xA2\x01\x0A\x1ADynamicAdInsertionTypeEnum\"\x83\x01\x0A\x16DynamicAdInsertionType\x12)\x0A%DYNAMIC_AD_INSERTION_TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06LINEAR\x10\x01\x12\x18\x0A\x14POD_SERVING_MANIFEST\x10\x02\x12\x18\x0A\x14POD_SERVING_REDIRECT\x10\x03\"y\x0A\x1BHlsSettingsPlaylistTypeEnum\"Z\x0A\x17HlsSettingsPlaylistType\x12*\x0A&HLS_SETTINGS_PLAYLIST_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05EVENT\x10\x01\x12\x08\x0A\x04LIVE\x10\x02\"\x8F\x01\x0A HlsMasterPlaylistRefreshTypeEnum\"k\x0A\x1CHlsMasterPlaylistRefreshType\x120\x0A,HLS_MASTER_PLAYLIST_REFRESH_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09AUTOMATIC\x10\x01\x12\x0A\x0A\x06MANUAL\x10\x02\"\x83\x01\x0A\x13AdBreakFillTypeEnum\"l\x0A\x0FAdBreakFillType\x12\"\x0A\x1EAD_BREAK_FILL_TYPE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EMINIMIZE_SLATE\x10\x01\x12\x09\x0A\x05SLATE\x10\x02\x12\x16\x0A\x12UNDERLYING_CONTENT\x10\x03B\xCD\x01\x0A\x1Bcom.google.ads.admanager.v1B\x19LiveStreamEventEnumsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\xBA\x0C\x0A5google/ads/admanager/v1/live_stream_event_enums.proto\x12\x17google.ads.admanager.v1\"X\x0A\x0FSlateStatusEnum\"E\x0A\x0BSlateStatus\x12\x1C\x0A\x18SLATE_STATUS_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0C\x0A\x08ARCHIVED\x10\x02\"\x94\x01\x0A\x19LiveStreamEventStatusEnum\"w\x0A\x15LiveStreamEventStatus\x12(\x0A\$LIVE_STREAM_EVENT_STATUS_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0E\x0A\x0AADS_PAUSED\x10\x02\x12\x0C\x0A\x08ARCHIVED\x10\x03\x12\x0A\x0A\x06PAUSED\x10\x04\"\xD6\x02\x0A\x15AdBreakMarkupTypeEnum\"\xBC\x02\x0A\x11AdBreakMarkupType\x12\$\x0A AD_BREAK_MARKUP_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14HLS_DATERANGE_SPLICE\x10\x01\x12\x0F\x0A\x0BHLS_EXT_CUE\x10\x02\x12\x18\x0A\x14HLS_PRIMETIME_SPLICE\x10\x03\x12!\x0A\x1DSCTE35_BINARY_BREAK_START_END\x10\x04\x12'\x0A#SCTE35_BINARY_PROVIDER_AD_START_END\x10\x05\x121\x0A-SCTE35_BINARY_PROVIDER_PLACEMENT_OP_START_END\x10\x06\x12\x1F\x0A\x1BSCTE35_BINARY_SPLICE_INSERT\x10\x07\x12\x1C\x0A\x18SCTE35_XML_SPLICE_INSERT\x10\x0B\"\x8D\x01\x0A\"LiveStreamEventStreamingFormatEnum\"g\x0A\x1ELiveStreamEventStreamingFormat\x122\x0A.LIVE_STREAM_EVENT_STREAMING_FORMAT_UNSPECIFIED\x10\x00\x12\x08\x0A\x04DASH\x10\x01\x12\x07\x0A\x03HLS\x10\x02\"\xA2\x01\x0A\x1ADynamicAdInsertionTypeEnum\"\x83\x01\x0A\x16DynamicAdInsertionType\x12)\x0A%DYNAMIC_AD_INSERTION_TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06LINEAR\x10\x01\x12\x18\x0A\x14POD_SERVING_MANIFEST\x10\x02\x12\x18\x0A\x14POD_SERVING_REDIRECT\x10\x03\"y\x0A\x1BHlsSettingsPlaylistTypeEnum\"Z\x0A\x17HlsSettingsPlaylistType\x12*\x0A&HLS_SETTINGS_PLAYLIST_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05EVENT\x10\x01\x12\x08\x0A\x04LIVE\x10\x02\"\x8F\x01\x0A HlsMasterPlaylistRefreshTypeEnum\"k\x0A\x1CHlsMasterPlaylistRefreshType\x120\x0A,HLS_MASTER_PLAYLIST_REFRESH_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09AUTOMATIC\x10\x01\x12\x0A\x0A\x06MANUAL\x10\x02\"\x83\x01\x0A\x13AdBreakFillTypeEnum\"l\x0A\x0FAdBreakFillType\x12\"\x0A\x1EAD_BREAK_FILL_TYPE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0EMINIMIZE_SLATE\x10\x01\x12\x09\x0A\x05SLATE\x10\x02\x12\x16\x0A\x12UNDERLYING_CONTENT\x10\x03B\xCD\x01\x0A\x1Bcom.google.ads.admanager.v1B\x19LiveStreamEventEnumsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/NielsenCtvPacingEnum.php b/AdsAdManager/metadata/V1/NielsenCtvPacingEnum.php new file mode 100644 index 000000000000..ebad56433c29 --- /dev/null +++ b/AdsAdManager/metadata/V1/NielsenCtvPacingEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xA1\x03\x0A5google/ads/admanager/v1/nielsen_ctv_pacing_enum.proto\x12\x17google.ads.admanager.v1\"w\x0A\x14NielsenCtvPacingEnum\"_\x0A\x10NielsenCtvPacing\x12\"\x0A\x1ENIELSEN_CTV_PACING_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06COVIEW\x10\x01\x12\x08\x0A\x04NONE\x10\x02\x12\x11\x0A\x0DSTRICT_COVIEW\x10\x03B\xCD\x01\x0A\x1Bcom.google.ads.admanager.v1B\x19NielsenCtvPacingEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/OrderMessages.php b/AdsAdManager/metadata/V1/OrderMessages.php index 8bbd83e1c120..a2a8b1fe65e5 100644 --- a/AdsAdManager/metadata/V1/OrderMessages.php +++ b/AdsAdManager/metadata/V1/OrderMessages.php @@ -21,7 +21,7 @@ public static function initOnce() { \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xF0\x12\x0A,google/ads/admanager/v1/order_messages.proto\x12\x17google.ads.admanager.v1\x1A0google/ads/admanager/v1/custom_field_value.proto\x1A)google/ads/admanager/v1/order_enums.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x9B\x0F\x0A\x05Order\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1C\x0A\x08order_id\x18\x04 \x01(\x03B\x05\x18\x01\xE0A\x03H\x00\x88\x01\x01\x12\x1E\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02H\x01\x88\x01\x01\x12\x1E\x0A\x0Cprogrammatic\x18\x03 \x01(\x08B\x03\xE0A\x01H\x02\x88\x01\x01\x12>\x0A\x0Atrafficker\x18\x17 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/UserH\x03\x88\x01\x01\x12H\x0A\x13advertiser_contacts\x18\x05 \x03(\x09B+\xE0A\x01\xE0A\x06\xFAA\"\x0A admanager.googleapis.com/Contact\x12A\x0A\x0Aadvertiser\x18\x06 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/CompanyH\x04\x88\x01\x01\x12A\x0A\x0Fagency_contacts\x18\x07 \x03(\x09B(\xE0A\x01\xFAA\"\x0A admanager.googleapis.com/Contact\x12=\x0A\x06agency\x18\x08 \x01(\x09B(\xE0A\x01\xFAA\"\x0A admanager.googleapis.com/CompanyH\x05\x88\x01\x01\x12<\x0A\x0Dapplied_teams\x18\x09 \x03(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/Team\x12>\x0A\x0Feffective_teams\x18\x1C \x03(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/Team\x12;\x0A\x07creator\x18\x0A \x01(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/UserH\x06\x88\x01\x01\x12\x1F\x0A\x0Dcurrency_code\x18\x0B \x01(\x09B\x03\xE0A\x03H\x07\x88\x01\x01\x128\x0A\x0Astart_time\x18\x13 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x08\x88\x01\x01\x126\x0A\x08end_time\x18\x0C \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x09\x88\x01\x01\x12\$\x0A\x12unlimited_end_time\x18- \x01(\x08B\x03\xE0A\x03H\x0A\x88\x01\x01\x12#\x0A\x11external_order_id\x18\x0D \x01(\x05B\x03\xE0A\x01H\x0B\x88\x01\x01\x12\x1A\x0A\x08archived\x18\x0E \x01(\x08B\x03\xE0A\x03H\x0C\x88\x01\x01\x12&\x0A\x14last_modified_by_app\x18\x0F \x01(\x09B\x03\xE0A\x03H\x0D\x88\x01\x01\x129\x0A\x0Bupdate_time\x18\x10 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x0E\x88\x01\x01\x12\x17\x0A\x05notes\x18\x11 \x01(\x09B\x03\xE0A\x01H\x0F\x88\x01\x01\x12\x1B\x0A\x09po_number\x18\x12 \x01(\x09B\x03\xE0A\x01H\x10\x88\x01\x01\x12N\x0A\x06status\x18\x14 \x01(\x0E24.google.ads.admanager.v1.OrderStatusEnum.OrderStatusB\x03\xE0A\x03H\x11\x88\x01\x01\x12?\x0A\x0Bsalesperson\x18\x15 \x01(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/UserH\x12\x88\x01\x01\x12G\x0A\x15secondary_salespeople\x18\x16 \x03(\x09B(\xE0A\x01\xE0A\x06\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/User\x12G\x0A\x15secondary_traffickers\x18\x18 \x03(\x09B(\xE0A\x01\xE0A\x06\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/User\x12B\x0A\x0Eapplied_labels\x18\x19 \x03(\x0B2%.google.ads.admanager.v1.AppliedLabelB\x03\xE0A\x01\x12L\x0A\x18effective_applied_labels\x18\x1A \x03(\x0B2%.google.ads.admanager.v1.AppliedLabelB\x03\xE0A\x03\x12K\x0A\x13custom_field_values\x18& \x03(\x0B2).google.ads.admanager.v1.CustomFieldValueB\x03\xE0A\x01:Z\xEAAW\x0A\x1Eadmanager.googleapis.com/Order\x12&networks/{network_code}/orders/{order}*\x06orders2\x05orderB\x0B\x0A\x09_order_idB\x0F\x0A\x0D_display_nameB\x0F\x0A\x0D_programmaticB\x0D\x0A\x0B_traffickerB\x0D\x0A\x0B_advertiserB\x09\x0A\x07_agencyB\x0A\x0A\x08_creatorB\x10\x0A\x0E_currency_codeB\x0D\x0A\x0B_start_timeB\x0B\x0A\x09_end_timeB\x15\x0A\x13_unlimited_end_timeB\x14\x0A\x12_external_order_idB\x0B\x0A\x09_archivedB\x17\x0A\x15_last_modified_by_appB\x0E\x0A\x0C_update_timeB\x08\x0A\x06_notesB\x0C\x0A\x0A_po_numberB\x09\x0A\x07_statusB\x0E\x0A\x0C_salespersonB\xC6\x01\x0A\x1Bcom.google.ads.admanager.v1B\x12OrderMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\xD9\x14\x0A,google/ads/admanager/v1/order_messages.proto\x12\x17google.ads.admanager.v1\x1A0google/ads/admanager/v1/custom_field_value.proto\x1A)google/ads/admanager/v1/order_enums.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x84\x11\x0A\x05Order\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1C\x0A\x08order_id\x18\x04 \x01(\x03B\x05\x18\x01\xE0A\x03H\x00\x88\x01\x01\x12\x1E\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02H\x01\x88\x01\x01\x12\x1E\x0A\x0Cprogrammatic\x18\x03 \x01(\x08B\x03\xE0A\x01H\x02\x88\x01\x01\x12>\x0A\x0Atrafficker\x18\x17 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/UserH\x03\x88\x01\x01\x12H\x0A\x13advertiser_contacts\x18\x05 \x03(\x09B+\xE0A\x01\xE0A\x06\xFAA\"\x0A admanager.googleapis.com/Contact\x12A\x0A\x0Aadvertiser\x18\x06 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/CompanyH\x04\x88\x01\x01\x12A\x0A\x0Fagency_contacts\x18\x07 \x03(\x09B(\xE0A\x01\xFAA\"\x0A admanager.googleapis.com/Contact\x12=\x0A\x06agency\x18\x08 \x01(\x09B(\xE0A\x01\xFAA\"\x0A admanager.googleapis.com/CompanyH\x05\x88\x01\x01\x12<\x0A\x0Dapplied_teams\x18\x09 \x03(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/Team\x12>\x0A\x0Feffective_teams\x18\x1C \x03(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/Team\x12;\x0A\x07creator\x18\x0A \x01(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/UserH\x06\x88\x01\x01\x12\x1F\x0A\x0Dcurrency_code\x18\x0B \x01(\x09B\x03\xE0A\x03H\x07\x88\x01\x01\x128\x0A\x0Astart_time\x18\x13 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x08\x88\x01\x01\x126\x0A\x08end_time\x18\x0C \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x09\x88\x01\x01\x12\$\x0A\x12unlimited_end_time\x18- \x01(\x08B\x03\xE0A\x03H\x0A\x88\x01\x01\x12#\x0A\x11external_order_id\x18\x0D \x01(\x05B\x03\xE0A\x01H\x0B\x88\x01\x01\x12\x1A\x0A\x08archived\x18\x0E \x01(\x08B\x03\xE0A\x03H\x0C\x88\x01\x01\x12&\x0A\x14last_modified_by_app\x18\x0F \x01(\x09B\x03\xE0A\x03H\x0D\x88\x01\x01\x129\x0A\x0Bupdate_time\x18\x10 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03H\x0E\x88\x01\x01\x12\x17\x0A\x05notes\x18\x11 \x01(\x09B\x03\xE0A\x01H\x0F\x88\x01\x01\x12\x1B\x0A\x09po_number\x18\x12 \x01(\x09B\x03\xE0A\x01H\x10\x88\x01\x01\x12N\x0A\x06status\x18\x14 \x01(\x0E24.google.ads.admanager.v1.OrderStatusEnum.OrderStatusB\x03\xE0A\x03H\x11\x88\x01\x01\x12?\x0A\x0Bsalesperson\x18\x15 \x01(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/UserH\x12\x88\x01\x01\x12G\x0A\x15secondary_salespeople\x18\x16 \x03(\x09B(\xE0A\x01\xE0A\x06\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/User\x12G\x0A\x15secondary_traffickers\x18\x18 \x03(\x09B(\xE0A\x01\xE0A\x06\xFAA\x1F\x0A\x1Dadmanager.googleapis.com/User\x12B\x0A\x0Eapplied_labels\x18\x19 \x03(\x0B2%.google.ads.admanager.v1.AppliedLabelB\x03\xE0A\x01\x12L\x0A\x18effective_applied_labels\x18\x1A \x03(\x0B2%.google.ads.admanager.v1.AppliedLabelB\x03\xE0A\x03\x12K\x0A\x13custom_field_values\x18& \x03(\x0B2).google.ads.admanager.v1.CustomFieldValueB\x03\xE0A\x01\x12'\x0A\x15impressions_delivered\x18) \x01(\x03B\x03\xE0A\x03H\x13\x88\x01\x01\x12(\x0A\x16total_clicks_delivered\x185 \x01(\x03B\x03\xE0A\x03H\x14\x88\x01\x01\x126\x0A\$total_viewable_impressions_delivered\x186 \x01(\x03B\x03\xE0A\x03H\x15\x88\x01\x01:Z\xEAAW\x0A\x1Eadmanager.googleapis.com/Order\x12&networks/{network_code}/orders/{order}*\x06orders2\x05orderB\x0B\x0A\x09_order_idB\x0F\x0A\x0D_display_nameB\x0F\x0A\x0D_programmaticB\x0D\x0A\x0B_traffickerB\x0D\x0A\x0B_advertiserB\x09\x0A\x07_agencyB\x0A\x0A\x08_creatorB\x10\x0A\x0E_currency_codeB\x0D\x0A\x0B_start_timeB\x0B\x0A\x09_end_timeB\x15\x0A\x13_unlimited_end_timeB\x14\x0A\x12_external_order_idB\x0B\x0A\x09_archivedB\x17\x0A\x15_last_modified_by_appB\x0E\x0A\x0C_update_timeB\x08\x0A\x06_notesB\x0C\x0A\x0A_po_numberB\x09\x0A\x07_statusB\x0E\x0A\x0C_salespersonB\x18\x0A\x16_impressions_deliveredB\x19\x0A\x17_total_clicks_deliveredB'\x0A%_total_viewable_impressions_deliveredB\xC6\x01\x0A\x1Bcom.google.ads.admanager.v1B\x12OrderMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/OrderService.php b/AdsAdManager/metadata/V1/OrderService.php index 528bebe73d32..88bf27d44539 100644 --- a/AdsAdManager/metadata/V1/OrderService.php +++ b/AdsAdManager/metadata/V1/OrderService.php @@ -19,8 +19,9 @@ 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( - "\x0A\xB1\x09\x0A+google/ads/admanager/v1/order_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\"G\x0A\x0FGetOrderRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"\xBD\x01\x0A\x11ListOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04skip\x18\x06 \x01(\x05B\x03\xE0A\x01\"q\x0A\x12ListOrdersResponse\x12.\x0A\x06orders\x18\x01 \x03(\x0B2\x1E.google.ads.admanager.v1.Order\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x052\xA9\x03\x0A\x0COrderService\x12\x83\x01\x0A\x08GetOrder\x12(.google.ads.admanager.v1.GetOrderRequest\x1A\x1E.google.ads.admanager.v1.Order\"-\xDAA\x04name\x82\xD3\xE4\x93\x02 \x12\x1E/v1/{name=networks/*/orders/*}\x12\x96\x01\x0A\x0AListOrders\x12*.google.ads.admanager.v1.ListOrdersRequest\x1A+.google.ads.admanager.v1.ListOrdersResponse\"/\xDAA\x06parent\x82\xD3\xE4\x93\x02 \x12\x1E/v1/{parent=networks/*}/orders\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xC5\x01\x0A\x1Bcom.google.ads.admanager.v1B\x11OrderServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\xBAI\x0A+google/ads/admanager/v1/order_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\"\xBA\x01\x0A\$BatchApproveAndOverbookOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\x12!\x0A\x14skip_inventory_check\x18\x03 \x01(\x08B\x03\xE0A\x01\"'\x0A%BatchApproveAndOverbookOrdersResponse\"\xAF\x01\x0A\x19BatchApproveOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\x12!\x0A\x14skip_inventory_check\x18\x03 \x01(\x08B\x03\xE0A\x01\"\x1C\x0A\x1ABatchApproveOrdersResponse\"\xB9\x01\x0A#BatchSubmitOrdersForApprovalRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\x12!\x0A\x14skip_inventory_check\x18\x03 \x01(\x08B\x03\xE0A\x01\"&\x0A\$BatchSubmitOrdersForApprovalResponse\"\xA1\x01\x0A.BatchSubmitOrdersForApprovalAndOverbookRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"1\x0A/BatchSubmitOrdersForApprovalAndOverbookResponse\"\x8A\x01\x0A\x17BatchPauseOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"\x1A\x0A\x18BatchPauseOrdersResponse\"\xAE\x01\x0A\x18BatchResumeOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\x12!\x0A\x14skip_inventory_check\x18\x03 \x01(\x08B\x03\xE0A\x01\"\x1B\x0A\x19BatchResumeOrdersResponse\"\x96\x01\x0A#BatchResumeAndOverbookOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"&\x0A\$BatchResumeAndOverbookOrdersResponse\"\x9E\x01\x0A+BatchApproveOrdersWithoutReservationRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\".\x0A,BatchApproveOrdersWithoutReservationResponse\"\x8C\x01\x0A\x19BatchArchiveOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"\x1C\x0A\x1ABatchArchiveOrdersResponse\"\x8E\x01\x0A\x1BBatchUnarchiveOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"\x1E\x0A\x1CBatchUnarchiveOrdersResponse\"\x8B\x01\x0A\x18BatchDeleteOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"\x1B\x0A\x19BatchDeleteOrdersResponse\"\x8F\x01\x0A\x1CBatchDisapproveOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"\x1F\x0A\x1DBatchDisapproveOrdersResponse\"\xA8\x01\x0A5BatchDisapproveOrdersWithoutReservationChangesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"8\x0A6BatchDisapproveOrdersWithoutReservationChangesResponse\"\x8C\x01\x0A\x19BatchRetractOrdersRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"\x1C\x0A\x1ABatchRetractOrdersResponse\"\xA5\x01\x0A2BatchRetractOrdersWithoutReservationChangesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Order\"5\x0A3BatchRetractOrdersWithoutReservationChangesResponse\"\xAF\x01\x0A.google.ads.admanager.v1.BatchApproveAndOverbookOrdersResponse\"P\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02;\"6/v1/{parent=networks/*}/orders:batchApproveAndOverbook:\x01*\x12\xEC\x01\x0A\x1CBatchSubmitOrdersForApproval\x12<.google.ads.admanager.v1.BatchSubmitOrdersForApprovalRequest\x1A=.google.ads.admanager.v1.BatchSubmitOrdersForApprovalResponse\"O\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02:\"5/v1/{parent=networks/*}/orders:batchSubmitForApproval:\x01*\x12\x98\x02\x0A'BatchSubmitOrdersForApprovalAndOverbook\x12G.google.ads.admanager.v1.BatchSubmitOrdersForApprovalAndOverbookRequest\x1AH.google.ads.admanager.v1.BatchSubmitOrdersForApprovalAndOverbookResponse\"Z\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02E\"@/v1/{parent=networks/*}/orders:batchSubmitForApprovalAndOverbook:\x01*\x12\xD0\x02\x0A5BatchSubmitOrdersForApprovalWithoutReservationChanges\x12U.google.ads.admanager.v1.BatchSubmitOrdersForApprovalWithoutReservationChangesRequest\x1AV.google.ads.admanager.v1.BatchSubmitOrdersForApprovalWithoutReservationChangesResponse\"h\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02S\"N/v1/{parent=networks/*}/orders:batchSubmitForApprovalWithoutReservationChanges:\x01*\x12\xBC\x01\x0A\x10BatchPauseOrders\x120.google.ads.admanager.v1.BatchPauseOrdersRequest\x1A1.google.ads.admanager.v1.BatchPauseOrdersResponse\"C\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02.\")/v1/{parent=networks/*}/orders:batchPause:\x01*\x12\xC0\x01\x0A\x11BatchResumeOrders\x121.google.ads.admanager.v1.BatchResumeOrdersRequest\x1A2.google.ads.admanager.v1.BatchResumeOrdersResponse\"D\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02/\"*/v1/{parent=networks/*}/orders:batchResume:\x01*\x12\xEC\x01\x0A\x1CBatchResumeAndOverbookOrders\x12<.google.ads.admanager.v1.BatchResumeAndOverbookOrdersRequest\x1A=.google.ads.admanager.v1.BatchResumeAndOverbookOrdersResponse\"O\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02:\"5/v1/{parent=networks/*}/orders:batchResumeAndOverbook:\x01*\x12\x8C\x02\x0A\$BatchApproveOrdersWithoutReservation\x12D.google.ads.admanager.v1.BatchApproveOrdersWithoutReservationRequest\x1AE.google.ads.admanager.v1.BatchApproveOrdersWithoutReservationResponse\"W\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02B\"=/v1/{parent=networks/*}/orders:batchApproveWithoutReservation:\x01*\x12\xC4\x01\x0A\x12BatchArchiveOrders\x122.google.ads.admanager.v1.BatchArchiveOrdersRequest\x1A3.google.ads.admanager.v1.BatchArchiveOrdersResponse\"E\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x020\"+/v1/{parent=networks/*}/orders:batchArchive:\x01*\x12\xCC\x01\x0A\x14BatchUnarchiveOrders\x124.google.ads.admanager.v1.BatchUnarchiveOrdersRequest\x1A5.google.ads.admanager.v1.BatchUnarchiveOrdersResponse\"G\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x022\"-/v1/{parent=networks/*}/orders:batchUnarchive:\x01*\x12\xC0\x01\x0A\x11BatchDeleteOrders\x121.google.ads.admanager.v1.BatchDeleteOrdersRequest\x1A2.google.ads.admanager.v1.BatchDeleteOrdersResponse\"D\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02/\"*/v1/{parent=networks/*}/orders:batchDelete:\x01*\x12\xD0\x01\x0A\x15BatchDisapproveOrders\x125.google.ads.admanager.v1.BatchDisapproveOrdersRequest\x1A6.google.ads.admanager.v1.BatchDisapproveOrdersResponse\"H\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x023\"./v1/{parent=networks/*}/orders:batchDisapprove:\x01*\x12\xB4\x02\x0A.BatchDisapproveOrdersWithoutReservationChanges\x12N.google.ads.admanager.v1.BatchDisapproveOrdersWithoutReservationChangesRequest\x1AO.google.ads.admanager.v1.BatchDisapproveOrdersWithoutReservationChangesResponse\"a\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02L\"G/v1/{parent=networks/*}/orders:batchDisapproveWithoutReservationChanges:\x01*\x12\xC4\x01\x0A\x12BatchRetractOrders\x122.google.ads.admanager.v1.BatchRetractOrdersRequest\x1A3.google.ads.admanager.v1.BatchRetractOrdersResponse\"E\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x020\"+/v1/{parent=networks/*}/orders:batchRetract:\x01*\x12\xA8\x02\x0A+BatchRetractOrdersWithoutReservationChanges\x12K.google.ads.admanager.v1.BatchRetractOrdersWithoutReservationChangesRequest\x1AL.google.ads.admanager.v1.BatchRetractOrdersWithoutReservationChangesResponse\"^\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x02I\"D/v1/{parent=networks/*}/orders:batchRetractWithoutReservationChanges:\x01*\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xC5\x01\x0A\x1Bcom.google.ads.admanager.v1B\x11OrderServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/PacingDeviceCategorizationEnum.php b/AdsAdManager/metadata/V1/PacingDeviceCategorizationEnum.php new file mode 100644 index 000000000000..df9ad394babc --- /dev/null +++ b/AdsAdManager/metadata/V1/PacingDeviceCategorizationEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xC4\x03\x0A?google/ads/admanager/v1/pacing_device_categorization_enum.proto\x12\x17google.ads.admanager.v1\"\x85\x01\x0A\x1EPacingDeviceCategorizationEnum\"c\x0A\x1APacingDeviceCategorization\x12,\x0A(PACING_DEVICE_CATEGORIZATION_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06GOOGLE\x10\x01\x12\x0B\x0A\x07NIELSEN\x10\x02B\xD7\x01\x0A\x1Bcom.google.ads.admanager.v1B#PacingDeviceCategorizationEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ReachPartnerEnum.php b/AdsAdManager/metadata/V1/ReachPartnerEnum.php new file mode 100644 index 000000000000..bac20247ce4c --- /dev/null +++ b/AdsAdManager/metadata/V1/ReachPartnerEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xF7\x03\x0A0google/ads/admanager/v1/reach_partner_enum.proto\x12\x17google.ads.admanager.v1\"\xD5\x01\x0A\x10ReachPartnerEnum\"\xC0\x01\x0A\x0CReachPartner\x12\x1D\x0A\x19REACH_PARTNER_UNSPECIFIED\x10\x00\x12\x14\x0A\x10AUDIENCE_PROJECT\x10\x01\x12\x0C\x0A\x08COMSCORE\x10\x02\x12\x0A\x0A\x06GEMIUS\x10\x03\x12\x0C\x0A\x08ISPOT_TV\x10\x05\x12\x19\x0A\x15KANTAR_MILLWARD_BROWN\x10\x06\x12\x0B\x0A\x07NIELSEN\x10\x07\x12\x08\x0A\x04NONE\x10\x08\x12\x0D\x0A\x09VIDEO_AMP\x10\x09\x12\x12\x0A\x0EVIDEO_RESEARCH\x10\x0AB\xC9\x01\x0A\x1Bcom.google.ads.admanager.v1B\x15ReachPartnerEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ReportDelivery.php b/AdsAdManager/metadata/V1/ReportDelivery.php new file mode 100644 index 000000000000..fe02e5c1ee7f --- /dev/null +++ b/AdsAdManager/metadata/V1/ReportDelivery.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xA5\x0B\x0A-google/ads/admanager/v1/report_delivery.proto\x12\x17google.ads.admanager.v1\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x16google/type/date.proto\x1A\x1Bgoogle/type/dayofweek.proto\x1A\x1Bgoogle/type/timeofday.proto\"\xFA\x07\x0A\x0FScheduleOptions\x12C\x0A\x08schedule\x18\x01 \x01(\x0B21.google.ads.admanager.v1.ScheduleOptions.Schedule\x12V\x0A\x12delivery_condition\x18\x02 \x01(\x0E2:.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition\x12B\x0A\x05flags\x18\x03 \x03(\x0B2..google.ads.admanager.v1.ReportDefinition.FlagB\x03\xE0A\x01\x1A\xBB\x05\x0A\x08Schedule\x12[\x0A\x0Fweekly_schedule\x18\x06 \x01(\x0B2@.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklyScheduleH\x00\x12]\x0A\x10monthly_schedule\x18\x07 \x01(\x0B2A.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlyScheduleH\x00\x12%\x0A\x0Astart_date\x18\x01 \x01(\x0B2\x11.google.type.Date\x12#\x0A\x08end_date\x18\x02 \x01(\x0B2\x11.google.type.Date\x12N\x0A\x09frequency\x18\x03 \x01(\x0E2;.google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency\x12*\x0A\x0Astart_time\x18\x04 \x01(\x0B2\x16.google.type.TimeOfDay\x1AG\x0A\x0EWeeklySchedule\x125\x0A\x15weekly_scheduled_days\x18\x01 \x03(\x0E2\x16.google.type.DayOfWeek\x1A1\x0A\x0FMonthlySchedule\x12\x1E\x0A\x16monthly_scheduled_days\x18\x01 \x03(\x05\"\x98\x01\x0A\x09Frequency\x12\x19\x0A\x15FREQUENCY_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06HOURLY\x10\x01\x12\x13\x0A\x0FTWO_TIMES_DAILY\x10\x02\x12\x15\x0A\x11THREE_TIMES_DAILY\x10\x03\x12\x14\x0A\x10FOUR_TIMES_DAILY\x10\x04\x12\x09\x0A\x05DAILY\x10\x05\x12\x0A\x0A\x06WEEKLY\x10\x06\x12\x0B\x0A\x07MONTHLY\x10\x07B\x14\x0A\x12frequency_schedule\"H\x0A\x11DeliveryCondition\x12\x09\x0A\x05NEVER\x10\x00\x12\x0A\x0A\x06ALWAYS\x10\x01\x12\x1C\x0A\x18WHEN_FLAG_CONDITIONS_MET\x10\x02B\xC7\x01\x0A\x1Bcom.google.ads.admanager.v1B\x13ReportDeliveryProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ReportMessages.php b/AdsAdManager/metadata/V1/ReportMessages.php index 45dbc166c1a4..8b339645893c 100644 --- a/AdsAdManager/metadata/V1/ReportMessages.php +++ b/AdsAdManager/metadata/V1/ReportMessages.php @@ -15,15 +15,13 @@ public static function initOnce() { return; } \GPBMetadata\Google\Ads\Admanager\V1\ReportDefinition::initOnce(); + \GPBMetadata\Google\Ads\Admanager\V1\ReportDelivery::initOnce(); \GPBMetadata\Google\Ads\Admanager\V1\ReportValue::initOnce(); \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); - \GPBMetadata\Google\Type\Date::initOnce(); - \GPBMetadata\Google\Type\Dayofweek::initOnce(); - \GPBMetadata\Google\Type\Timeofday::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xCD\x15\x0A-google/ads/admanager/v1/report_messages.proto\x12\x17google.ads.admanager.v1\x1A*google/ads/admanager/v1/report_value.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x16google/type/date.proto\x1A\x1Bgoogle/type/dayofweek.proto\x1A\x1Bgoogle/type/timeofday.proto\"\xCE\x04\x0A\x06Report\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x16\x0A\x09report_id\x18\x03 \x01(\x03B\x03\xE0A\x03\x12C\x0A\x0Avisibility\x18\x02 \x01(\x0E2*.google.ads.admanager.v1.Report.VisibilityB\x03\xE0A\x01\x12I\x0A\x11report_definition\x18\x04 \x01(\x0B2).google.ads.admanager.v1.ReportDefinitionB\x03\xE0A\x02\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06locale\x18\x08 \x01(\x09B\x03\xE0A\x03\x12G\x0A\x10schedule_options\x18\x09 \x01(\x0B2(.google.ads.admanager.v1.ScheduleOptionsB\x03\xE0A\x01\"C\x0A\x0AVisibility\x12\x0A\x0A\x06HIDDEN\x10\x00\x12\x09\x0A\x05DRAFT\x10\x01\x12\x0B\x0A\x07VISIBLE\x10\x02\x12\x0D\x0A\x05SAVED\x10\x02\x1A\x02\x08\x01\x1A\x02\x10\x01:_\xEAA\\\x0A\x1Fadmanager.googleapis.com/Report\x12(networks/{network_code}/reports/{report}*\x07reports2\x06report\"\x87\x05\x0A\x0FReportDataTable\x1A\x9D\x01\x0A\x03Row\x12>\x0A\x10dimension_values\x18\x01 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12V\x0A\x13metric_value_groups\x18\x02 \x03(\x0B29.google.ads.admanager.v1.ReportDataTable.MetricValueGroup\x1A\xD3\x03\x0A\x10MetricValueGroup\x12<\x0A\x0Eprimary_values\x18\x01 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12M\x0A\x1Fprimary_percent_of_total_values\x18\x02 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12?\x0A\x11comparison_values\x18\x03 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12P\x0A\"comparison_percent_of_total_values\x18\x04 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12D\x0A\x16absolute_change_values\x18\x05 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12D\x0A\x16relative_change_values\x18\x06 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12\x13\x0A\x0Bflag_values\x18\x07 \x03(\x08\"\xFA\x07\x0A\x0FScheduleOptions\x12C\x0A\x08schedule\x18\x01 \x01(\x0B21.google.ads.admanager.v1.ScheduleOptions.Schedule\x12V\x0A\x12delivery_condition\x18\x02 \x01(\x0E2:.google.ads.admanager.v1.ScheduleOptions.DeliveryCondition\x12B\x0A\x05flags\x18\x03 \x03(\x0B2..google.ads.admanager.v1.ReportDefinition.FlagB\x03\xE0A\x01\x1A\xBB\x05\x0A\x08Schedule\x12[\x0A\x0Fweekly_schedule\x18\x06 \x01(\x0B2@.google.ads.admanager.v1.ScheduleOptions.Schedule.WeeklyScheduleH\x00\x12]\x0A\x10monthly_schedule\x18\x07 \x01(\x0B2A.google.ads.admanager.v1.ScheduleOptions.Schedule.MonthlyScheduleH\x00\x12%\x0A\x0Astart_date\x18\x01 \x01(\x0B2\x11.google.type.Date\x12#\x0A\x08end_date\x18\x02 \x01(\x0B2\x11.google.type.Date\x12N\x0A\x09frequency\x18\x03 \x01(\x0E2;.google.ads.admanager.v1.ScheduleOptions.Schedule.Frequency\x12*\x0A\x0Astart_time\x18\x04 \x01(\x0B2\x16.google.type.TimeOfDay\x1AG\x0A\x0EWeeklySchedule\x125\x0A\x15weekly_scheduled_days\x18\x01 \x03(\x0E2\x16.google.type.DayOfWeek\x1A1\x0A\x0FMonthlySchedule\x12\x1E\x0A\x16monthly_scheduled_days\x18\x01 \x03(\x05\"\x98\x01\x0A\x09Frequency\x12\x19\x0A\x15FREQUENCY_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06HOURLY\x10\x01\x12\x13\x0A\x0FTWO_TIMES_DAILY\x10\x02\x12\x15\x0A\x11THREE_TIMES_DAILY\x10\x03\x12\x14\x0A\x10FOUR_TIMES_DAILY\x10\x04\x12\x09\x0A\x05DAILY\x10\x05\x12\x0A\x0A\x06WEEKLY\x10\x06\x12\x0B\x0A\x07MONTHLY\x10\x07B\x14\x0A\x12frequency_schedule\"H\x0A\x11DeliveryCondition\x12\x09\x0A\x05NEVER\x10\x00\x12\x0A\x0A\x06ALWAYS\x10\x01\x12\x1C\x0A\x18WHEN_FLAG_CONDITIONS_MET\x10\x02B\xC7\x01\x0A\x1Bcom.google.ads.admanager.v1B\x13ReportMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\xAD\x0D\x0A-google/ads/admanager/v1/report_messages.proto\x12\x17google.ads.admanager.v1\x1A-google/ads/admanager/v1/report_delivery.proto\x1A*google/ads/admanager/v1/report_value.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xCE\x04\x0A\x06Report\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x16\x0A\x09report_id\x18\x03 \x01(\x03B\x03\xE0A\x03\x12C\x0A\x0Avisibility\x18\x02 \x01(\x0E2*.google.ads.admanager.v1.Report.VisibilityB\x03\xE0A\x01\x12I\x0A\x11report_definition\x18\x04 \x01(\x0B2).google.ads.admanager.v1.ReportDefinitionB\x03\xE0A\x02\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x01\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06locale\x18\x08 \x01(\x09B\x03\xE0A\x03\x12G\x0A\x10schedule_options\x18\x09 \x01(\x0B2(.google.ads.admanager.v1.ScheduleOptionsB\x03\xE0A\x01\"C\x0A\x0AVisibility\x12\x0A\x0A\x06HIDDEN\x10\x00\x12\x09\x0A\x05DRAFT\x10\x01\x12\x0B\x0A\x07VISIBLE\x10\x02\x12\x0D\x0A\x05SAVED\x10\x02\x1A\x02\x08\x01\x1A\x02\x10\x01:_\xEAA\\\x0A\x1Fadmanager.googleapis.com/Report\x12(networks/{network_code}/reports/{report}*\x07reports2\x06report\"\x87\x05\x0A\x0FReportDataTable\x1A\x9D\x01\x0A\x03Row\x12>\x0A\x10dimension_values\x18\x01 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12V\x0A\x13metric_value_groups\x18\x02 \x03(\x0B29.google.ads.admanager.v1.ReportDataTable.MetricValueGroup\x1A\xD3\x03\x0A\x10MetricValueGroup\x12<\x0A\x0Eprimary_values\x18\x01 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12M\x0A\x1Fprimary_percent_of_total_values\x18\x02 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12?\x0A\x11comparison_values\x18\x03 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12P\x0A\"comparison_percent_of_total_values\x18\x04 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12D\x0A\x16absolute_change_values\x18\x05 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12D\x0A\x16relative_change_values\x18\x06 \x03(\x0B2\$.google.ads.admanager.v1.ReportValue\x12\x13\x0A\x0Bflag_values\x18\x07 \x03(\x08B\xC7\x01\x0A\x1Bcom.google.ads.admanager.v1B\x13ReportMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/SkippableAdTypeEnum.php b/AdsAdManager/metadata/V1/SkippableAdTypeEnum.php new file mode 100644 index 000000000000..0db8cf5c06b7 --- /dev/null +++ b/AdsAdManager/metadata/V1/SkippableAdTypeEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xAD\x03\x0A4google/ads/admanager/v1/skippable_ad_type_enum.proto\x12\x17google.ads.admanager.v1\"\x84\x01\x0A\x13SkippableAdTypeEnum\"m\x0A\x0FSkippableAdType\x12!\x0A\x1DSKIPPABLE_AD_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ANY\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02\x12\x0B\x0A\x07ENABLED\x10\x03\x12\x13\x0A\x0FINSTREAM_SELECT\x10\x04B\xCC\x01\x0A\x1Bcom.google.ads.admanager.v1B\x18SkippableAdTypeEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/SlateMessages.php b/AdsAdManager/metadata/V1/SlateMessages.php new file mode 100644 index 000000000000..0d1a5ec93972 --- /dev/null +++ b/AdsAdManager/metadata/V1/SlateMessages.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xA5\x07\x0A,google/ads/admanager/v1/slate_messages.proto\x12\x17google.ads.admanager.v1\x1A9google/ads/admanager/v1/video_transcode_status_enum.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF2\x03\x0A\x05Slate\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1E\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02H\x00\x88\x01\x01\x12N\x0A\x06status\x18\x03 \x01(\x0E24.google.ads.admanager.v1.SlateStatusEnum.SlateStatusB\x03\xE0A\x03H\x01\x88\x01\x01\x12j\x0A\x10transcode_status\x18\x04 \x01(\x0E2F.google.ads.admanager.v1.VideoTranscodeStatusEnum.VideoTranscodeStatusB\x03\xE0A\x03H\x02\x88\x01\x01\x12\"\x0A\x10video_source_url\x18\x05 \x01(\x09B\x03\xE0A\x01H\x03\x88\x01\x01\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03:Z\xEAAW\x0A\x1Eadmanager.googleapis.com/Slate\x12&networks/{network_code}/slates/{slate}*\x06slates2\x05slateB\x0F\x0A\x0D_display_nameB\x09\x0A\x07_statusB\x13\x0A\x11_transcode_statusB\x13\x0A\x11_video_source_urlB\xC6\x01\x0A\x1Bcom.google.ads.admanager.v1B\x12SlateMessagesProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/SlateService.php b/AdsAdManager/metadata/V1/SlateService.php new file mode 100644 index 000000000000..dc753ca57b73 --- /dev/null +++ b/AdsAdManager/metadata/V1/SlateService.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xE9\x1A\x0A+google/ads/admanager/v1/slate_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\"G\x0A\x0FGetSlateRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Slate\"\xBD\x01\x0A\x11ListSlatesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04skip\x18\x06 \x01(\x05B\x03\xE0A\x01\"q\x0A\x12ListSlatesResponse\x12.\x0A\x06slates\x18\x01 \x03(\x0B2\x1E.google.ads.admanager.v1.Slate\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x05\"\x82\x01\x0A\x12CreateSlateRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x122\x0A\x05slate\x18\x02 \x01(\x0B2\x1E.google.ads.admanager.v1.SlateB\x03\xE0A\x02\"\x98\x01\x0A\x18BatchCreateSlatesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12B\x0A\x08requests\x18\x02 \x03(\x0B2+.google.ads.admanager.v1.CreateSlateRequestB\x03\xE0A\x02\"K\x0A\x19BatchCreateSlatesResponse\x12.\x0A\x06slates\x18\x01 \x03(\x0B2\x1E.google.ads.admanager.v1.Slate\"~\x0A\x12UpdateSlateRequest\x122\x0A\x05slate\x18\x01 \x01(\x0B2\x1E.google.ads.admanager.v1.SlateB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\x98\x01\x0A\x18BatchUpdateSlatesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12B\x0A\x08requests\x18\x02 \x03(\x0B2+.google.ads.admanager.v1.UpdateSlateRequestB\x03\xE0A\x02\"K\x0A\x19BatchUpdateSlatesResponse\x12.\x0A\x06slates\x18\x01 \x03(\x0B2\x1E.google.ads.admanager.v1.Slate\"\x8C\x01\x0A\x19BatchArchiveSlatesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Slate\"\x1C\x0A\x1ABatchArchiveSlatesResponse\"\x8E\x01\x0A\x1BBatchUnarchiveSlatesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x125\x0A\x05names\x18\x02 \x03(\x09B&\xE0A\x02\xFAA \x0A\x1Eadmanager.googleapis.com/Slate\"\x1E\x0A\x1CBatchUnarchiveSlatesResponse2\x8C\x0C\x0A\x0CSlateService\x12\x83\x01\x0A\x08GetSlate\x12(.google.ads.admanager.v1.GetSlateRequest\x1A\x1E.google.ads.admanager.v1.Slate\"-\xDAA\x04name\x82\xD3\xE4\x93\x02 \x12\x1E/v1/{name=networks/*/slates/*}\x12\x96\x01\x0A\x0AListSlates\x12*.google.ads.admanager.v1.ListSlatesRequest\x1A+.google.ads.admanager.v1.ListSlatesResponse\"/\xDAA\x06parent\x82\xD3\xE4\x93\x02 \x12\x1E/v1/{parent=networks/*}/slates\x12\x98\x01\x0A\x0BCreateSlate\x12+.google.ads.admanager.v1.CreateSlateRequest\x1A\x1E.google.ads.admanager.v1.Slate\"<\xDAA\x0Cparent,slate\x82\xD3\xE4\x93\x02'\"\x1E/v1/{parent=networks/*}/slates:\x05slate\x12\xC3\x01\x0A\x11BatchCreateSlates\x121.google.ads.admanager.v1.BatchCreateSlatesRequest\x1A2.google.ads.admanager.v1.BatchCreateSlatesResponse\"G\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02/\"*/v1/{parent=networks/*}/slates:batchCreate:\x01*\x12\xA3\x01\x0A\x0BUpdateSlate\x12+.google.ads.admanager.v1.UpdateSlateRequest\x1A\x1E.google.ads.admanager.v1.Slate\"G\xDAA\x11slate,update_mask\x82\xD3\xE4\x93\x02-2\$/v1/{slate.name=networks/*/slates/*}:\x05slate\x12\xC3\x01\x0A\x11BatchUpdateSlates\x121.google.ads.admanager.v1.BatchUpdateSlatesRequest\x1A2.google.ads.admanager.v1.BatchUpdateSlatesResponse\"G\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02/\"*/v1/{parent=networks/*}/slates:batchUpdate:\x01*\x12\xC4\x01\x0A\x12BatchArchiveSlates\x122.google.ads.admanager.v1.BatchArchiveSlatesRequest\x1A3.google.ads.admanager.v1.BatchArchiveSlatesResponse\"E\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x020\"+/v1/{parent=networks/*}/slates:batchArchive:\x01*\x12\xCC\x01\x0A\x14BatchUnarchiveSlates\x124.google.ads.admanager.v1.BatchUnarchiveSlatesRequest\x1A5.google.ads.admanager.v1.BatchUnarchiveSlatesResponse\"G\xDAA\x0Cparent,names\x82\xD3\xE4\x93\x022\"-/v1/{parent=networks/*}/slates:batchUnarchive:\x01*\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xC5\x01\x0A\x1Bcom.google.ads.admanager.v1B\x11SlateServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/TargetingPresetService.php b/AdsAdManager/metadata/V1/TargetingPresetService.php index 3136b78c93dd..cfd5e8ca0944 100644 --- a/AdsAdManager/metadata/V1/TargetingPresetService.php +++ b/AdsAdManager/metadata/V1/TargetingPresetService.php @@ -19,8 +19,9 @@ 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( - "\x0A\xE0\x16\x0A6google/ads/admanager/v1/targeting_preset_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\"[\x0A\x19GetTargetingPresetRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(admanager.googleapis.com/TargetingPreset\"\xC7\x01\x0A\x1BListTargetingPresetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04skip\x18\x06 \x01(\x05B\x03\xE0A\x01\"\x90\x01\x0A\x1CListTargetingPresetsResponse\x12C\x0A\x11targeting_presets\x18\x01 \x03(\x0B2(.google.ads.admanager.v1.TargetingPreset\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x05\"\xA1\x01\x0A\x1CCreateTargetingPresetRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12G\x0A\x10targeting_preset\x18\x02 \x01(\x0B2(.google.ads.admanager.v1.TargetingPresetB\x03\xE0A\x02\"\xAC\x01\x0A\"BatchCreateTargetingPresetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12L\x0A\x08requests\x18\x02 \x03(\x0B25.google.ads.admanager.v1.CreateTargetingPresetRequestB\x03\xE0A\x02\"j\x0A#BatchCreateTargetingPresetsResponse\x12C\x0A\x11targeting_presets\x18\x01 \x03(\x0B2(.google.ads.admanager.v1.TargetingPreset\"\x84\x01\x0A DeactivateTargetingPresetRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(admanager.googleapis.com/TargetingPreset\x12 \x0A\x13targeting_preset_id\x18\x02 \x01(\x03B\x03\xE0A\x02\"\xB4\x01\x0A&BatchDeactivateTargetingPresetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12P\x0A\x08requests\x18\x02 \x03(\x0B29.google.ads.admanager.v1.DeactivateTargetingPresetRequestB\x03\xE0A\x02\"?\x0A'BatchDeactivateTargetingPresetsResponse\x12\x14\x0A\x0Cchange_count\x18\x01 \x01(\x032\xC7\x09\x0A\x16TargetingPresetService\x12\xAB\x01\x0A\x12GetTargetingPreset\x122.google.ads.admanager.v1.GetTargetingPresetRequest\x1A(.google.ads.admanager.v1.TargetingPreset\"7\xDAA\x04name\x82\xD3\xE4\x93\x02*\x12(/v1/{name=networks/*/targetingPresets/*}\x12\xBE\x01\x0A\x14ListTargetingPresets\x124.google.ads.admanager.v1.ListTargetingPresetsRequest\x1A5.google.ads.admanager.v1.ListTargetingPresetsResponse\"9\xDAA\x06parent\x82\xD3\xE4\x93\x02*\x12(/v1/{parent=networks/*}/targetingPresets\x12\xD6\x01\x0A\x15CreateTargetingPreset\x125.google.ads.admanager.v1.CreateTargetingPresetRequest\x1A(.google.ads.admanager.v1.TargetingPreset\"\\\xDAA\x17parent,targeting_preset\x82\xD3\xE4\x93\x02<\"(/v1/{parent=networks/*}/targetingPresets:\x10targeting_preset\x12\xEB\x01\x0A\x1BBatchCreateTargetingPresets\x12;.google.ads.admanager.v1.BatchCreateTargetingPresetsRequest\x1A<.google.ads.admanager.v1.BatchCreateTargetingPresetsResponse\"Q\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x029\"4/v1/{parent=networks/*}/targetingPresets:batchCreate:\x01*\x12\xFA\x01\x0A\x1FBatchDeactivateTargetingPresets\x12?.google.ads.admanager.v1.BatchDeactivateTargetingPresetsRequest\x1A@.google.ads.admanager.v1.BatchDeactivateTargetingPresetsResponse\"T\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02<\"7/v1/{parent=networks/*}/targetingPreset:batchDeactivate:\x01*\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xCF\x01\x0A\x1Bcom.google.ads.admanager.v1B\x1BTargetingPresetServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + "\x0A\x9A\x1E\x0A6google/ads/admanager/v1/targeting_preset_service.proto\x12\x17google.ads.admanager.v1\x1A\x1Cgoogle/api/annotations.proto\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A google/protobuf/field_mask.proto\"[\x0A\x19GetTargetingPresetRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(admanager.googleapis.com/TargetingPreset\"\xC7\x01\x0A\x1BListTargetingPresetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04skip\x18\x06 \x01(\x05B\x03\xE0A\x01\"\x90\x01\x0A\x1CListTargetingPresetsResponse\x12C\x0A\x11targeting_presets\x18\x01 \x03(\x0B2(.google.ads.admanager.v1.TargetingPreset\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x05\"\xA1\x01\x0A\x1CCreateTargetingPresetRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12G\x0A\x10targeting_preset\x18\x02 \x01(\x0B2(.google.ads.admanager.v1.TargetingPresetB\x03\xE0A\x02\"\xAC\x01\x0A\"BatchCreateTargetingPresetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12L\x0A\x08requests\x18\x02 \x03(\x0B25.google.ads.admanager.v1.CreateTargetingPresetRequestB\x03\xE0A\x02\"j\x0A#BatchCreateTargetingPresetsResponse\x12C\x0A\x11targeting_presets\x18\x01 \x03(\x0B2(.google.ads.admanager.v1.TargetingPreset\"\x9D\x01\x0A\x1CUpdateTargetingPresetRequest\x12G\x0A\x10targeting_preset\x18\x01 \x01(\x0B2(.google.ads.admanager.v1.TargetingPresetB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xAC\x01\x0A\"BatchUpdateTargetingPresetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12L\x0A\x08requests\x18\x02 \x03(\x0B25.google.ads.admanager.v1.UpdateTargetingPresetRequestB\x03\xE0A\x02\"j\x0A#BatchUpdateTargetingPresetsResponse\x12C\x0A\x11targeting_presets\x18\x01 \x03(\x0B2(.google.ads.admanager.v1.TargetingPreset\"\x84\x01\x0A DeactivateTargetingPresetRequest\x12>\x0A\x04name\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(admanager.googleapis.com/TargetingPreset\x12 \x0A\x13targeting_preset_id\x18\x02 \x01(\x03B\x03\xE0A\x02\"\xB4\x01\x0A&BatchDeactivateTargetingPresetsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A admanager.googleapis.com/Network\x12P\x0A\x08requests\x18\x02 \x03(\x0B29.google.ads.admanager.v1.DeactivateTargetingPresetRequestB\x03\xE0A\x02\"?\x0A'BatchDeactivateTargetingPresetsResponse\x12\x14\x0A\x0Cchange_count\x18\x01 \x01(\x032\xA4\x0D\x0A\x16TargetingPresetService\x12\xAB\x01\x0A\x12GetTargetingPreset\x122.google.ads.admanager.v1.GetTargetingPresetRequest\x1A(.google.ads.admanager.v1.TargetingPreset\"7\xDAA\x04name\x82\xD3\xE4\x93\x02*\x12(/v1/{name=networks/*/targetingPresets/*}\x12\xBE\x01\x0A\x14ListTargetingPresets\x124.google.ads.admanager.v1.ListTargetingPresetsRequest\x1A5.google.ads.admanager.v1.ListTargetingPresetsResponse\"9\xDAA\x06parent\x82\xD3\xE4\x93\x02*\x12(/v1/{parent=networks/*}/targetingPresets\x12\xD6\x01\x0A\x15CreateTargetingPreset\x125.google.ads.admanager.v1.CreateTargetingPresetRequest\x1A(.google.ads.admanager.v1.TargetingPreset\"\\\xDAA\x17parent,targeting_preset\x82\xD3\xE4\x93\x02<\"(/v1/{parent=networks/*}/targetingPresets:\x10targeting_preset\x12\xEB\x01\x0A\x1BBatchCreateTargetingPresets\x12;.google.ads.admanager.v1.BatchCreateTargetingPresetsRequest\x1A<.google.ads.admanager.v1.BatchCreateTargetingPresetsResponse\"Q\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x029\"4/v1/{parent=networks/*}/targetingPresets:batchCreate:\x01*\x12\xEC\x01\x0A\x15UpdateTargetingPreset\x125.google.ads.admanager.v1.UpdateTargetingPresetRequest\x1A(.google.ads.admanager.v1.TargetingPreset\"r\xDAA\x1Ctargeting_preset,update_mask\x82\xD3\xE4\x93\x02M29/v1/{targeting_preset.name=networks/*/targetingPresets/*}:\x10targeting_preset\x12\xEB\x01\x0A\x1BBatchUpdateTargetingPresets\x12;.google.ads.admanager.v1.BatchUpdateTargetingPresetsRequest\x1A<.google.ads.admanager.v1.BatchUpdateTargetingPresetsResponse\"Q\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x029\"4/v1/{parent=networks/*}/targetingPresets:batchUpdate:\x01*\x12\xFA\x01\x0A\x1FBatchDeactivateTargetingPresets\x12?.google.ads.admanager.v1.BatchDeactivateTargetingPresetsRequest\x1A@.google.ads.admanager.v1.BatchDeactivateTargetingPresetsResponse\"T\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02<\"7/v1/{parent=networks/*}/targetingPreset:batchDeactivate:\x01*\x1Az\xCAA\x18admanager.googleapis.com\xD2A\\https://www.googleapis.com/auth/admanager,https://www.googleapis.com/auth/admanager.readonlyB\xCF\x01\x0A\x1Bcom.google.ads.admanager.v1B\x1BTargetingPresetServiceProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AdsAdManager/metadata/V1/ThirdPartyMeasurementSettings.php b/AdsAdManager/metadata/V1/ThirdPartyMeasurementSettings.php new file mode 100644 index 000000000000..0e8332a80c4b --- /dev/null +++ b/AdsAdManager/metadata/V1/ThirdPartyMeasurementSettings.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xC0\x0E\x0A>google/ads/admanager/v1/third_party_measurement_settings.proto\x12\x17google.ads.admanager.v1\x1A0google/ads/admanager/v1/reach_partner_enum.proto\x1A6google/ads/admanager/v1/viewability_partner_enum.proto\x1A\x1Fgoogle/api/field_behavior.proto\"\xF8\x0A\x0A\x1DThirdPartyMeasurementSettings\x12i\x0A\x13viewability_partner\x18\x01 \x01(\x0E2B.google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartnerB\x03\xE0A\x01H\x00\x88\x01\x01\x12'\x0A\x15viewability_client_id\x18\x02 \x01(\x09B\x03\xE0A\x01H\x01\x88\x01\x01\x12*\x0A\x18viewability_reporting_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x02\x88\x01\x01\x12s\x0A\x1Dpublisher_viewability_partner\x18\x04 \x01(\x0E2B.google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartnerB\x03\xE0A\x01H\x03\x88\x01\x01\x121\x0A\x1Fpublisher_viewability_client_id\x18\x05 \x01(\x09B\x03\xE0A\x01H\x04\x88\x01\x01\x124\x0A\"publisher_viewability_reporting_id\x18\x06 \x01(\x09B\x03\xE0A\x01H\x05\x88\x01\x01\x12d\x0A\x12brand_lift_partner\x18\x0A \x01(\x0E2>.google.ads.admanager.v1.BrandLiftPartnerEnum.BrandLiftPartnerB\x03\xE0A\x01H\x06\x88\x01\x01\x12&\x0A\x14brand_lift_client_id\x18\x0B \x01(\x09B\x03\xE0A\x01H\x07\x88\x01\x01\x12)\x0A\x17brand_lift_reporting_id\x18\x0C \x01(\x09B\x03\xE0A\x01H\x08\x88\x01\x01\x12W\x0A\x0Dreach_partner\x18\x0D \x01(\x0E26.google.ads.admanager.v1.ReachPartnerEnum.ReachPartnerB\x03\xE0A\x01H\x09\x88\x01\x01\x12!\x0A\x0Freach_client_id\x18\x0E \x01(\x09B\x03\xE0A\x01H\x0A\x88\x01\x01\x12\$\x0A\x12reach_reporting_id\x18\x0F \x01(\x09B\x03\xE0A\x01H\x0B\x88\x01\x01\x12a\x0A\x17publisher_reach_partner\x18\x10 \x01(\x0E26.google.ads.admanager.v1.ReachPartnerEnum.ReachPartnerB\x03\xE0A\x01H\x0C\x88\x01\x01\x12+\x0A\x19publisher_reach_client_id\x18\x11 \x01(\x09B\x03\xE0A\x01H\x0D\x88\x01\x01\x12.\x0A\x1Cpublisher_reach_reporting_id\x18\x12 \x01(\x09B\x03\xE0A\x01H\x0E\x88\x01\x01B\x16\x0A\x14_viewability_partnerB\x18\x0A\x16_viewability_client_idB\x1B\x0A\x19_viewability_reporting_idB \x0A\x1E_publisher_viewability_partnerB\"\x0A _publisher_viewability_client_idB%\x0A#_publisher_viewability_reporting_idB\x15\x0A\x13_brand_lift_partnerB\x17\x0A\x15_brand_lift_client_idB\x1A\x0A\x18_brand_lift_reporting_idB\x10\x0A\x0E_reach_partnerB\x12\x0A\x10_reach_client_idB\x15\x0A\x13_reach_reporting_idB\x1A\x0A\x18_publisher_reach_partnerB\x1C\x0A\x1A_publisher_reach_client_idB\x1F\x0A\x1D_publisher_reach_reporting_idB\xD6\x01\x0A\x1Bcom.google.ads.admanager.v1B\"ThirdPartyMeasurementSettingsProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/VideoTranscodeStatusEnum.php b/AdsAdManager/metadata/V1/VideoTranscodeStatusEnum.php new file mode 100644 index 000000000000..bdf08df51c98 --- /dev/null +++ b/AdsAdManager/metadata/V1/VideoTranscodeStatusEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xDE\x03\x0A9google/ads/admanager/v1/video_transcode_status_enum.proto\x12\x17google.ads.admanager.v1\"\xAB\x01\x0A\x18VideoTranscodeStatusEnum\"\x8E\x01\x0A\x14VideoTranscodeStatus\x12&\x0A\"VIDEO_TRANSCODE_STATUS_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMPLETED\x10\x01\x12\x0A\x0A\x06FAILED\x10\x02\x12\x0F\x0A\x0BIN_PROGRESS\x10\x03\x12\x13\x0A\x0FNEEDS_TRANSCODE\x10\x04\x12\x0D\x0A\x09NOT_READY\x10\x05B\xD1\x01\x0A\x1Bcom.google.ads.admanager.v1B\x1DVideoTranscodeStatusEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/metadata/V1/ViewabilityPartnerEnum.php b/AdsAdManager/metadata/V1/ViewabilityPartnerEnum.php new file mode 100644 index 000000000000..2d92d4367dba --- /dev/null +++ b/AdsAdManager/metadata/V1/ViewabilityPartnerEnum.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xDF\x03\x0A6google/ads/admanager/v1/viewability_partner_enum.proto\x12\x17google.ads.admanager.v1\"\xB1\x01\x0A\x16ViewabilityPartnerEnum\"\x96\x01\x0A\x12ViewabilityPartner\x12#\x0A\x1FVIEWABILITY_PARTNER_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08COMSCORE\x10\x01\x12\x11\x0A\x0DDOUBLE_VERIFY\x10\x02\x12\x17\x0A\x13INTEGRAL_AD_SCIENCE\x10\x04\x12\x08\x0A\x04MOAT\x10\x05\x12\x08\x0A\x04NONE\x10\x06\x12\x0D\x0A\x09TELEMETRY\x10\x07B\xCF\x01\x0A\x1Bcom.google.ads.admanager.v1B\x1BViewabilityPartnerEnumProtoP\x01Z@google.golang.org/genproto/googleapis/ads/admanager/v1;admanager\xAA\x02\x17Google.Ads.AdManager.V1\xCA\x02\x17Google\\Ads\\AdManager\\V1\xEA\x02\x1AGoogle::Ads::AdManager::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/AdsAdManager/samples/V1/CompanyServiceClient/get_company.php b/AdsAdManager/samples/V1/CompanyServiceClient/get_company.php index 0c1e0dc60633..4c3060d9ccad 100644 --- a/AdsAdManager/samples/V1/CompanyServiceClient/get_company.php +++ b/AdsAdManager/samples/V1/CompanyServiceClient/get_company.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a `Company` object. + * Retrieves a `Company` object. * * @param string $formattedName The resource name of the Company. * Format: `networks/{network_code}/companies/{company_id}` diff --git a/AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php b/AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php index ce3426dcd278..bbbde9ba86b7 100644 --- a/AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php +++ b/AdsAdManager/samples/V1/CompanyServiceClient/list_companies.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve a list of `Company` objects. + * Lists `Company` objects. * * @param string $formattedParent The parent, which owns this collection of Companies. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/ContactServiceClient/batch_create_contacts.php b/AdsAdManager/samples/V1/ContactServiceClient/batch_create_contacts.php index 9512a96dc9fd..2f72b3bb98e5 100644 --- a/AdsAdManager/samples/V1/ContactServiceClient/batch_create_contacts.php +++ b/AdsAdManager/samples/V1/ContactServiceClient/batch_create_contacts.php @@ -31,7 +31,7 @@ use Google\ApiCore\ApiException; /** - * API to batch create `Contact` objects. + * Creates `Contact` objects. * * @param string $formattedParent The parent resource where `Contacts` will be created. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/ContactServiceClient/batch_update_contacts.php b/AdsAdManager/samples/V1/ContactServiceClient/batch_update_contacts.php index 1bcaad89bdce..a5941d368924 100644 --- a/AdsAdManager/samples/V1/ContactServiceClient/batch_update_contacts.php +++ b/AdsAdManager/samples/V1/ContactServiceClient/batch_update_contacts.php @@ -31,7 +31,7 @@ use Google\ApiCore\ApiException; /** - * API to batch update `Contact` objects. + * Batch updates `Contact` objects. * * @param string $formattedParent The parent resource where `Contacts` will be updated. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/ContactServiceClient/create_contact.php b/AdsAdManager/samples/V1/ContactServiceClient/create_contact.php index 89fbb277a04e..978523b7dd63 100644 --- a/AdsAdManager/samples/V1/ContactServiceClient/create_contact.php +++ b/AdsAdManager/samples/V1/ContactServiceClient/create_contact.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to create a `Contact` object. + * Creates a `Contact` object. * * @param string $formattedParent The parent resource where this `Contact` will be created. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/ContactServiceClient/get_contact.php b/AdsAdManager/samples/V1/ContactServiceClient/get_contact.php index d0f26c11593e..fe772efd6fde 100644 --- a/AdsAdManager/samples/V1/ContactServiceClient/get_contact.php +++ b/AdsAdManager/samples/V1/ContactServiceClient/get_contact.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a `Contact` object. + * Retrieves a `Contact` object. * * @param string $formattedName The resource name of the Contact. * Format: `networks/{network_code}/contacts/{contact_id}` diff --git a/AdsAdManager/samples/V1/ContactServiceClient/list_contacts.php b/AdsAdManager/samples/V1/ContactServiceClient/list_contacts.php index 221cf59ccfb5..35d3a1da5b6e 100644 --- a/AdsAdManager/samples/V1/ContactServiceClient/list_contacts.php +++ b/AdsAdManager/samples/V1/ContactServiceClient/list_contacts.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve a list of `Contact` objects. + * Lists `Contact` objects. * * @param string $formattedParent The parent, which owns this collection of Contacts. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/ContactServiceClient/update_contact.php b/AdsAdManager/samples/V1/ContactServiceClient/update_contact.php index 00c870e90e78..4643f62b0b94 100644 --- a/AdsAdManager/samples/V1/ContactServiceClient/update_contact.php +++ b/AdsAdManager/samples/V1/ContactServiceClient/update_contact.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to update a `Contact` object. + * Updates a `Contact` object. * * @param string $contactDisplayName The name of the contact. This attribute has a maximum length of * 127 characters. diff --git a/AdsAdManager/samples/V1/ContentBundleServiceClient/batch_activate_content_bundles.php b/AdsAdManager/samples/V1/ContentBundleServiceClient/batch_activate_content_bundles.php new file mode 100644 index 000000000000..13469ce5343f --- /dev/null +++ b/AdsAdManager/samples/V1/ContentBundleServiceClient/batch_activate_content_bundles.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchActivateContentBundlesResponse $response */ + $response = $contentBundleServiceClient->batchActivateContentBundles($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 = ContentBundleServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = ContentBundleServiceClient::contentBundleName( + '[NETWORK_CODE]', + '[CONTENT_BUNDLE]' + ); + + batch_activate_content_bundles_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_ContentBundleService_BatchActivateContentBundles_sync] diff --git a/AdsAdManager/samples/V1/ContentBundleServiceClient/batch_deactivate_content_bundles.php b/AdsAdManager/samples/V1/ContentBundleServiceClient/batch_deactivate_content_bundles.php new file mode 100644 index 000000000000..257da1d88002 --- /dev/null +++ b/AdsAdManager/samples/V1/ContentBundleServiceClient/batch_deactivate_content_bundles.php @@ -0,0 +1,84 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchDeactivateContentBundlesResponse $response */ + $response = $contentBundleServiceClient->batchDeactivateContentBundles($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 = ContentBundleServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = ContentBundleServiceClient::contentBundleName( + '[NETWORK_CODE]', + '[CONTENT_BUNDLE]' + ); + + batch_deactivate_content_bundles_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_ContentBundleService_BatchDeactivateContentBundles_sync] diff --git a/AdsAdManager/samples/V1/CreativeSetServiceClient/create_creative_set.php b/AdsAdManager/samples/V1/CreativeSetServiceClient/create_creative_set.php new file mode 100644 index 000000000000..4ea0579f7210 --- /dev/null +++ b/AdsAdManager/samples/V1/CreativeSetServiceClient/create_creative_set.php @@ -0,0 +1,105 @@ +setDisplayName($creativeSetDisplayName) + ->setMasterCreative($formattedCreativeSetMasterCreative) + ->setCompanionCreatives($formattedCreativeSetCompanionCreatives); + $request = (new CreateCreativeSetRequest()) + ->setParent($formattedParent) + ->setCreativeSet($creativeSet); + + // Call the API and handle any network failures. + try { + /** @var CreativeSet $response */ + $response = $creativeSetServiceClient->createCreativeSet($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 = CreativeSetServiceClient::networkName('[NETWORK_CODE]'); + $creativeSetDisplayName = '[DISPLAY_NAME]'; + $formattedCreativeSetMasterCreative = CreativeSetServiceClient::creativeName( + '[NETWORK_CODE]', + '[CREATIVE]' + ); + $formattedCreativeSetCompanionCreativesElement = CreativeSetServiceClient::creativeName( + '[NETWORK_CODE]', + '[CREATIVE]' + ); + + create_creative_set_sample( + $formattedParent, + $creativeSetDisplayName, + $formattedCreativeSetMasterCreative, + $formattedCreativeSetCompanionCreativesElement + ); +} +// [END admanager_v1_generated_CreativeSetService_CreateCreativeSet_sync] diff --git a/AdsAdManager/samples/V1/CreativeSetServiceClient/get_creative_set.php b/AdsAdManager/samples/V1/CreativeSetServiceClient/get_creative_set.php new file mode 100644 index 000000000000..dded07209536 --- /dev/null +++ b/AdsAdManager/samples/V1/CreativeSetServiceClient/get_creative_set.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CreativeSet $response */ + $response = $creativeSetServiceClient->getCreativeSet($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 = CreativeSetServiceClient::creativeSetName('[NETWORK_CODE]', '[CREATIVE_SET]'); + + get_creative_set_sample($formattedName); +} +// [END admanager_v1_generated_CreativeSetService_GetCreativeSet_sync] diff --git a/AdsAdManager/samples/V1/CreativeSetServiceClient/list_creative_sets.php b/AdsAdManager/samples/V1/CreativeSetServiceClient/list_creative_sets.php new file mode 100644 index 000000000000..52a9f333ccf4 --- /dev/null +++ b/AdsAdManager/samples/V1/CreativeSetServiceClient/list_creative_sets.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $creativeSetServiceClient->listCreativeSets($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 = CreativeSetServiceClient::networkName('[NETWORK_CODE]'); + + list_creative_sets_sample($formattedParent); +} +// [END admanager_v1_generated_CreativeSetService_ListCreativeSets_sync] diff --git a/AdsAdManager/samples/V1/CreativeSetServiceClient/update_creative_set.php b/AdsAdManager/samples/V1/CreativeSetServiceClient/update_creative_set.php new file mode 100644 index 000000000000..2b7575232c77 --- /dev/null +++ b/AdsAdManager/samples/V1/CreativeSetServiceClient/update_creative_set.php @@ -0,0 +1,98 @@ +setDisplayName($creativeSetDisplayName) + ->setMasterCreative($formattedCreativeSetMasterCreative) + ->setCompanionCreatives($formattedCreativeSetCompanionCreatives); + $request = (new UpdateCreativeSetRequest()) + ->setCreativeSet($creativeSet); + + // Call the API and handle any network failures. + try { + /** @var CreativeSet $response */ + $response = $creativeSetServiceClient->updateCreativeSet($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 +{ + $creativeSetDisplayName = '[DISPLAY_NAME]'; + $formattedCreativeSetMasterCreative = CreativeSetServiceClient::creativeName( + '[NETWORK_CODE]', + '[CREATIVE]' + ); + $formattedCreativeSetCompanionCreativesElement = CreativeSetServiceClient::creativeName( + '[NETWORK_CODE]', + '[CREATIVE]' + ); + + update_creative_set_sample( + $creativeSetDisplayName, + $formattedCreativeSetMasterCreative, + $formattedCreativeSetCompanionCreativesElement + ); +} +// [END admanager_v1_generated_CreativeSetService_UpdateCreativeSet_sync] diff --git a/AdsAdManager/samples/V1/McmEarningsServiceClient/fetch_mcm_earnings.php b/AdsAdManager/samples/V1/McmEarningsServiceClient/fetch_mcm_earnings.php index e5bcd6da6d19..609a98635087 100644 --- a/AdsAdManager/samples/V1/McmEarningsServiceClient/fetch_mcm_earnings.php +++ b/AdsAdManager/samples/V1/McmEarningsServiceClient/fetch_mcm_earnings.php @@ -30,7 +30,7 @@ use Google\Type\Date; /** - * API to retrieve a list of `McmEarnings` objects. + * Lists `McmEarnings` objects. * * @param string $formattedParent The parent, which owns this collection of McmEarnings. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/NetworkServiceClient/get_network.php b/AdsAdManager/samples/V1/NetworkServiceClient/get_network.php index 9818680de8f5..2adcbc9af117 100644 --- a/AdsAdManager/samples/V1/NetworkServiceClient/get_network.php +++ b/AdsAdManager/samples/V1/NetworkServiceClient/get_network.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a Network object. + * Retrieves a `Network` object. * * @param string $formattedName Resource name of Network. * Format: networks/{network_code} diff --git a/AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php b/AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php index f2baafd68443..f832f86bb314 100644 --- a/AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php +++ b/AdsAdManager/samples/V1/NetworkServiceClient/list_networks.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve all the networks the current user has access to. + * Retrieves all the networks the current user has access to. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_and_overbook_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_and_overbook_orders.php new file mode 100644 index 000000000000..73f3cd0f8cff --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_and_overbook_orders.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchApproveAndOverbookOrdersResponse $response */ + $response = $orderServiceClient->batchApproveAndOverbookOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_approve_and_overbook_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchApproveAndOverbookOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_orders.php new file mode 100644 index 000000000000..d5b2997d79b7 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_orders.php @@ -0,0 +1,78 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchApproveOrdersResponse $response */ + $response = $orderServiceClient->batchApproveOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_approve_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchApproveOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_orders_without_reservation.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_orders_without_reservation.php new file mode 100644 index 000000000000..cfc6162e0a6a --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_approve_orders_without_reservation.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchApproveOrdersWithoutReservationResponse $response */ + $response = $orderServiceClient->batchApproveOrdersWithoutReservation($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_approve_orders_without_reservation_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchApproveOrdersWithoutReservation_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_archive_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_archive_orders.php new file mode 100644 index 000000000000..6f5b8bb76d7f --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_archive_orders.php @@ -0,0 +1,78 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchArchiveOrdersResponse $response */ + $response = $orderServiceClient->batchArchiveOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_archive_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchArchiveOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_create_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_create_orders.php new file mode 100644 index 000000000000..9f63adfa88a9 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_create_orders.php @@ -0,0 +1,112 @@ +setDisplayName($requestsOrderDisplayName) + ->setTrafficker($formattedRequestsOrderTrafficker) + ->setAdvertiser($formattedRequestsOrderAdvertiser); + $createOrderRequest = (new CreateOrderRequest()) + ->setParent($formattedRequestsParent) + ->setOrder($requestsOrder); + $requests = [$createOrderRequest,]; + $request = (new BatchCreateOrdersRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateOrdersResponse $response */ + $response = $orderServiceClient->batchCreateOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = OrderServiceClient::networkName('[NETWORK_CODE]'); + $requestsOrderDisplayName = '[DISPLAY_NAME]'; + $formattedRequestsOrderTrafficker = OrderServiceClient::userName('[NETWORK_CODE]', '[USER]'); + $formattedRequestsOrderAdvertiser = OrderServiceClient::companyName('[NETWORK_CODE]', '[COMPANY]'); + + batch_create_orders_sample( + $formattedParent, + $formattedRequestsParent, + $requestsOrderDisplayName, + $formattedRequestsOrderTrafficker, + $formattedRequestsOrderAdvertiser + ); +} +// [END admanager_v1_generated_OrderService_BatchCreateOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_delete_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_delete_orders.php new file mode 100644 index 000000000000..3254547e85bd --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_delete_orders.php @@ -0,0 +1,78 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchDeleteOrdersResponse $response */ + $response = $orderServiceClient->batchDeleteOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_delete_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchDeleteOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_disapprove_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_disapprove_orders.php new file mode 100644 index 000000000000..61da02a4d114 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_disapprove_orders.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchDisapproveOrdersResponse $response */ + $response = $orderServiceClient->batchDisapproveOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_disapprove_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchDisapproveOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_disapprove_orders_without_reservation_changes.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_disapprove_orders_without_reservation_changes.php new file mode 100644 index 000000000000..f042ea1f1ee1 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_disapprove_orders_without_reservation_changes.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchDisapproveOrdersWithoutReservationChangesResponse $response */ + $response = $orderServiceClient->batchDisapproveOrdersWithoutReservationChanges($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_disapprove_orders_without_reservation_changes_sample( + $formattedParent, + $formattedNamesElement + ); +} +// [END admanager_v1_generated_OrderService_BatchDisapproveOrdersWithoutReservationChanges_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_pause_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_pause_orders.php new file mode 100644 index 000000000000..0b3ca9ae7255 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_pause_orders.php @@ -0,0 +1,78 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchPauseOrdersResponse $response */ + $response = $orderServiceClient->batchPauseOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_pause_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchPauseOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_resume_and_overbook_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_resume_and_overbook_orders.php new file mode 100644 index 000000000000..06fb33679f8e --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_resume_and_overbook_orders.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchResumeAndOverbookOrdersResponse $response */ + $response = $orderServiceClient->batchResumeAndOverbookOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_resume_and_overbook_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchResumeAndOverbookOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_resume_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_resume_orders.php new file mode 100644 index 000000000000..9738fa842a7d --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_resume_orders.php @@ -0,0 +1,78 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchResumeOrdersResponse $response */ + $response = $orderServiceClient->batchResumeOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_resume_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchResumeOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_retract_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_retract_orders.php new file mode 100644 index 000000000000..97605f7a6c20 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_retract_orders.php @@ -0,0 +1,78 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchRetractOrdersResponse $response */ + $response = $orderServiceClient->batchRetractOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_retract_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchRetractOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_retract_orders_without_reservation_changes.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_retract_orders_without_reservation_changes.php new file mode 100644 index 000000000000..5d54b626f64d --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_retract_orders_without_reservation_changes.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchRetractOrdersWithoutReservationChangesResponse $response */ + $response = $orderServiceClient->batchRetractOrdersWithoutReservationChanges($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_retract_orders_without_reservation_changes_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchRetractOrdersWithoutReservationChanges_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval.php new file mode 100644 index 000000000000..5abb09e5d80d --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchSubmitOrdersForApprovalResponse $response */ + $response = $orderServiceClient->batchSubmitOrdersForApproval($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_submit_orders_for_approval_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchSubmitOrdersForApproval_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval_and_overbook.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval_and_overbook.php new file mode 100644 index 000000000000..24e9ec876bec --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval_and_overbook.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchSubmitOrdersForApprovalAndOverbookResponse $response */ + $response = $orderServiceClient->batchSubmitOrdersForApprovalAndOverbook($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_submit_orders_for_approval_and_overbook_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchSubmitOrdersForApprovalAndOverbook_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval_without_reservation_changes.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval_without_reservation_changes.php new file mode 100644 index 000000000000..b8d39c6ad0a5 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_submit_orders_for_approval_without_reservation_changes.php @@ -0,0 +1,84 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchSubmitOrdersForApprovalWithoutReservationChangesResponse $response */ + $response = $orderServiceClient->batchSubmitOrdersForApprovalWithoutReservationChanges($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_submit_orders_for_approval_without_reservation_changes_sample( + $formattedParent, + $formattedNamesElement + ); +} +// [END admanager_v1_generated_OrderService_BatchSubmitOrdersForApprovalWithoutReservationChanges_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_unarchive_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_unarchive_orders.php new file mode 100644 index 000000000000..28f63e91c415 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_unarchive_orders.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchUnarchiveOrdersResponse $response */ + $response = $orderServiceClient->batchUnarchiveOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = OrderServiceClient::orderName('[NETWORK_CODE]', '[ORDER]'); + + batch_unarchive_orders_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_OrderService_BatchUnarchiveOrders_sync] diff --git a/AdsAdManager/samples/V1/OrderServiceClient/batch_update_orders.php b/AdsAdManager/samples/V1/OrderServiceClient/batch_update_orders.php new file mode 100644 index 000000000000..71d96a2d0055 --- /dev/null +++ b/AdsAdManager/samples/V1/OrderServiceClient/batch_update_orders.php @@ -0,0 +1,105 @@ +setDisplayName($requestsOrderDisplayName) + ->setTrafficker($formattedRequestsOrderTrafficker) + ->setAdvertiser($formattedRequestsOrderAdvertiser); + $updateOrderRequest = (new UpdateOrderRequest()) + ->setOrder($requestsOrder); + $requests = [$updateOrderRequest,]; + $request = (new BatchUpdateOrdersRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateOrdersResponse $response */ + $response = $orderServiceClient->batchUpdateOrders($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 = OrderServiceClient::networkName('[NETWORK_CODE]'); + $requestsOrderDisplayName = '[DISPLAY_NAME]'; + $formattedRequestsOrderTrafficker = OrderServiceClient::userName('[NETWORK_CODE]', '[USER]'); + $formattedRequestsOrderAdvertiser = OrderServiceClient::companyName('[NETWORK_CODE]', '[COMPANY]'); + + batch_update_orders_sample( + $formattedParent, + $requestsOrderDisplayName, + $formattedRequestsOrderTrafficker, + $formattedRequestsOrderAdvertiser + ); +} +// [END admanager_v1_generated_OrderService_BatchUpdateOrders_sync] diff --git a/AdsAdManager/samples/V1/ReportServiceClient/create_report.php b/AdsAdManager/samples/V1/ReportServiceClient/create_report.php index b6b6558621db..a837dc94db3a 100644 --- a/AdsAdManager/samples/V1/ReportServiceClient/create_report.php +++ b/AdsAdManager/samples/V1/ReportServiceClient/create_report.php @@ -34,7 +34,7 @@ use Google\ApiCore\ApiException; /** - * API to create a `Report` object. + * Creates a `Report` object. * * @param string $formattedParent The parent resource where this `Report` will be created. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/ReportServiceClient/get_report.php b/AdsAdManager/samples/V1/ReportServiceClient/get_report.php index 0b5d5b11d47e..a693d68f6376 100644 --- a/AdsAdManager/samples/V1/ReportServiceClient/get_report.php +++ b/AdsAdManager/samples/V1/ReportServiceClient/get_report.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a `Report` object. + * Retrieves a `Report` object. * * @param string $formattedName The resource name of the report. * Format: `networks/{network_code}/reports/{report_id}` diff --git a/AdsAdManager/samples/V1/ReportServiceClient/list_reports.php b/AdsAdManager/samples/V1/ReportServiceClient/list_reports.php index aa12df99e9cb..3db2bd6512de 100644 --- a/AdsAdManager/samples/V1/ReportServiceClient/list_reports.php +++ b/AdsAdManager/samples/V1/ReportServiceClient/list_reports.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve a list of `Report` objects. + * Lists `Report` objects. * * @param string $formattedParent The parent, which owns this collection of reports. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/ReportServiceClient/update_report.php b/AdsAdManager/samples/V1/ReportServiceClient/update_report.php index 6b466d1cfeb1..e341c685c776 100644 --- a/AdsAdManager/samples/V1/ReportServiceClient/update_report.php +++ b/AdsAdManager/samples/V1/ReportServiceClient/update_report.php @@ -34,7 +34,7 @@ use Google\ApiCore\ApiException; /** - * API to update a `Report` object. + * Updates a `Report` object. * * @param int $reportReportDefinitionDimensionsElement The list of dimensions to report on. If empty, the report will * have no dimensions, and any metrics will be totals. diff --git a/AdsAdManager/samples/V1/RoleServiceClient/get_role.php b/AdsAdManager/samples/V1/RoleServiceClient/get_role.php index 3204222ed446..ae21f945543a 100644 --- a/AdsAdManager/samples/V1/RoleServiceClient/get_role.php +++ b/AdsAdManager/samples/V1/RoleServiceClient/get_role.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a `Role` object. + * Retrieves a `Role` object. * * @param string $formattedName The resource name of the Role. * Format: `networks/{network_code}/roles/{role_id}` diff --git a/AdsAdManager/samples/V1/RoleServiceClient/list_roles.php b/AdsAdManager/samples/V1/RoleServiceClient/list_roles.php index d9adaa30e69c..dd33390019a7 100644 --- a/AdsAdManager/samples/V1/RoleServiceClient/list_roles.php +++ b/AdsAdManager/samples/V1/RoleServiceClient/list_roles.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve a list of `Role` objects. + * Lists `Role` objects. * * @param string $formattedParent The parent, which owns this collection of Roles. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/SiteServiceClient/batch_create_sites.php b/AdsAdManager/samples/V1/SiteServiceClient/batch_create_sites.php index 3c902352aa9c..27d9cf40c2d6 100644 --- a/AdsAdManager/samples/V1/SiteServiceClient/batch_create_sites.php +++ b/AdsAdManager/samples/V1/SiteServiceClient/batch_create_sites.php @@ -31,7 +31,7 @@ use Google\ApiCore\ApiException; /** - * API to batch create `Site` objects. + * Creates `Site` objects. * * @param string $formattedParent The parent resource where `Sites` will be created. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/SiteServiceClient/batch_update_sites.php b/AdsAdManager/samples/V1/SiteServiceClient/batch_update_sites.php index c127d8dd0bae..d28404c76b3d 100644 --- a/AdsAdManager/samples/V1/SiteServiceClient/batch_update_sites.php +++ b/AdsAdManager/samples/V1/SiteServiceClient/batch_update_sites.php @@ -31,7 +31,7 @@ use Google\ApiCore\ApiException; /** - * API to batch update `Site` objects. + * Batch updates `Site` objects. * * @param string $formattedParent The parent resource where `Sites` will be updated. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/SiteServiceClient/create_site.php b/AdsAdManager/samples/V1/SiteServiceClient/create_site.php index c458d2409708..3d6f9367cfb8 100644 --- a/AdsAdManager/samples/V1/SiteServiceClient/create_site.php +++ b/AdsAdManager/samples/V1/SiteServiceClient/create_site.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to create a `Site` object. + * Creates a `Site` object. * * @param string $formattedParent The parent resource where this `Site` will be created. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/SiteServiceClient/get_site.php b/AdsAdManager/samples/V1/SiteServiceClient/get_site.php index 45771c513acc..43bf4e02400f 100644 --- a/AdsAdManager/samples/V1/SiteServiceClient/get_site.php +++ b/AdsAdManager/samples/V1/SiteServiceClient/get_site.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a `Site` object. + * Retrieves a `Site` object. * * @param string $formattedName The resource name of the Site. * Format: `networks/{network_code}/sites/{site_id}` diff --git a/AdsAdManager/samples/V1/SiteServiceClient/list_sites.php b/AdsAdManager/samples/V1/SiteServiceClient/list_sites.php index 70c2daaa91a4..eba756b50ec8 100644 --- a/AdsAdManager/samples/V1/SiteServiceClient/list_sites.php +++ b/AdsAdManager/samples/V1/SiteServiceClient/list_sites.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve a list of `Site` objects. + * Lists `Site` objects. * * @param string $formattedParent The parent, which owns this collection of Sites. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/SiteServiceClient/update_site.php b/AdsAdManager/samples/V1/SiteServiceClient/update_site.php index ca1eb5e102cc..9cdd0aa01343 100644 --- a/AdsAdManager/samples/V1/SiteServiceClient/update_site.php +++ b/AdsAdManager/samples/V1/SiteServiceClient/update_site.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to update a `Site` object. + * Updates a `Site` object. * * @param string $siteUrl The URL of the Site. */ diff --git a/AdsAdManager/samples/V1/SlateServiceClient/batch_archive_slates.php b/AdsAdManager/samples/V1/SlateServiceClient/batch_archive_slates.php new file mode 100644 index 000000000000..746bf89d1f45 --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/batch_archive_slates.php @@ -0,0 +1,78 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchArchiveSlatesResponse $response */ + $response = $slateServiceClient->batchArchiveSlates($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 = SlateServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = SlateServiceClient::slateName('[NETWORK_CODE]', '[SLATE]'); + + batch_archive_slates_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_SlateService_BatchArchiveSlates_sync] diff --git a/AdsAdManager/samples/V1/SlateServiceClient/batch_create_slates.php b/AdsAdManager/samples/V1/SlateServiceClient/batch_create_slates.php new file mode 100644 index 000000000000..001297cc8971 --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/batch_create_slates.php @@ -0,0 +1,93 @@ +setDisplayName($requestsSlateDisplayName); + $createSlateRequest = (new CreateSlateRequest()) + ->setParent($formattedRequestsParent) + ->setSlate($requestsSlate); + $requests = [$createSlateRequest,]; + $request = (new BatchCreateSlatesRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchCreateSlatesResponse $response */ + $response = $slateServiceClient->batchCreateSlates($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 = SlateServiceClient::networkName('[NETWORK_CODE]'); + $formattedRequestsParent = SlateServiceClient::networkName('[NETWORK_CODE]'); + $requestsSlateDisplayName = '[DISPLAY_NAME]'; + + batch_create_slates_sample($formattedParent, $formattedRequestsParent, $requestsSlateDisplayName); +} +// [END admanager_v1_generated_SlateService_BatchCreateSlates_sync] diff --git a/AdsAdManager/samples/V1/SlateServiceClient/batch_unarchive_slates.php b/AdsAdManager/samples/V1/SlateServiceClient/batch_unarchive_slates.php new file mode 100644 index 000000000000..a98cbfcc72f7 --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/batch_unarchive_slates.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setNames($formattedNames); + + // Call the API and handle any network failures. + try { + /** @var BatchUnarchiveSlatesResponse $response */ + $response = $slateServiceClient->batchUnarchiveSlates($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 = SlateServiceClient::networkName('[NETWORK_CODE]'); + $formattedNamesElement = SlateServiceClient::slateName('[NETWORK_CODE]', '[SLATE]'); + + batch_unarchive_slates_sample($formattedParent, $formattedNamesElement); +} +// [END admanager_v1_generated_SlateService_BatchUnarchiveSlates_sync] diff --git a/AdsAdManager/samples/V1/SlateServiceClient/batch_update_slates.php b/AdsAdManager/samples/V1/SlateServiceClient/batch_update_slates.php new file mode 100644 index 000000000000..20387c470e94 --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/batch_update_slates.php @@ -0,0 +1,87 @@ +setDisplayName($requestsSlateDisplayName); + $updateSlateRequest = (new UpdateSlateRequest()) + ->setSlate($requestsSlate); + $requests = [$updateSlateRequest,]; + $request = (new BatchUpdateSlatesRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateSlatesResponse $response */ + $response = $slateServiceClient->batchUpdateSlates($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 = SlateServiceClient::networkName('[NETWORK_CODE]'); + $requestsSlateDisplayName = '[DISPLAY_NAME]'; + + batch_update_slates_sample($formattedParent, $requestsSlateDisplayName); +} +// [END admanager_v1_generated_SlateService_BatchUpdateSlates_sync] diff --git a/AdsAdManager/samples/V1/SlateServiceClient/create_slate.php b/AdsAdManager/samples/V1/SlateServiceClient/create_slate.php new file mode 100644 index 000000000000..c96c471721be --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/create_slate.php @@ -0,0 +1,78 @@ +setDisplayName($slateDisplayName); + $request = (new CreateSlateRequest()) + ->setParent($formattedParent) + ->setSlate($slate); + + // Call the API and handle any network failures. + try { + /** @var Slate $response */ + $response = $slateServiceClient->createSlate($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 = SlateServiceClient::networkName('[NETWORK_CODE]'); + $slateDisplayName = '[DISPLAY_NAME]'; + + create_slate_sample($formattedParent, $slateDisplayName); +} +// [END admanager_v1_generated_SlateService_CreateSlate_sync] diff --git a/AdsAdManager/samples/V1/SlateServiceClient/get_slate.php b/AdsAdManager/samples/V1/SlateServiceClient/get_slate.php new file mode 100644 index 000000000000..56110b055143 --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/get_slate.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Slate $response */ + $response = $slateServiceClient->getSlate($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 = SlateServiceClient::slateName('[NETWORK_CODE]', '[SLATE]'); + + get_slate_sample($formattedName); +} +// [END admanager_v1_generated_SlateService_GetSlate_sync] diff --git a/AdsAdManager/samples/V1/SlateServiceClient/list_slates.php b/AdsAdManager/samples/V1/SlateServiceClient/list_slates.php new file mode 100644 index 000000000000..3298af4a8cbd --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/list_slates.php @@ -0,0 +1,75 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $slateServiceClient->listSlates($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 = SlateServiceClient::networkName('[NETWORK_CODE]'); + + list_slates_sample($formattedParent); +} +// [END admanager_v1_generated_SlateService_ListSlates_sync] diff --git a/AdsAdManager/samples/V1/SlateServiceClient/update_slate.php b/AdsAdManager/samples/V1/SlateServiceClient/update_slate.php new file mode 100644 index 000000000000..1be02746e7a0 --- /dev/null +++ b/AdsAdManager/samples/V1/SlateServiceClient/update_slate.php @@ -0,0 +1,73 @@ +setDisplayName($slateDisplayName); + $request = (new UpdateSlateRequest()) + ->setSlate($slate); + + // Call the API and handle any network failures. + try { + /** @var Slate $response */ + $response = $slateServiceClient->updateSlate($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 +{ + $slateDisplayName = '[DISPLAY_NAME]'; + + update_slate_sample($slateDisplayName); +} +// [END admanager_v1_generated_SlateService_UpdateSlate_sync] diff --git a/AdsAdManager/samples/V1/TargetingPresetServiceClient/batch_update_targeting_presets.php b/AdsAdManager/samples/V1/TargetingPresetServiceClient/batch_update_targeting_presets.php new file mode 100644 index 000000000000..ade91a614327 --- /dev/null +++ b/AdsAdManager/samples/V1/TargetingPresetServiceClient/batch_update_targeting_presets.php @@ -0,0 +1,90 @@ +setDisplayName($requestsTargetingPresetDisplayName) + ->setTargeting($requestsTargetingPresetTargeting); + $updateTargetingPresetRequest = (new UpdateTargetingPresetRequest()) + ->setTargetingPreset($requestsTargetingPreset); + $requests = [$updateTargetingPresetRequest,]; + $request = (new BatchUpdateTargetingPresetsRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var BatchUpdateTargetingPresetsResponse $response */ + $response = $targetingPresetServiceClient->batchUpdateTargetingPresets($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 = TargetingPresetServiceClient::networkName('[NETWORK_CODE]'); + $requestsTargetingPresetDisplayName = '[DISPLAY_NAME]'; + + batch_update_targeting_presets_sample($formattedParent, $requestsTargetingPresetDisplayName); +} +// [END admanager_v1_generated_TargetingPresetService_BatchUpdateTargetingPresets_sync] diff --git a/AdsAdManager/samples/V1/TargetingPresetServiceClient/update_targeting_preset.php b/AdsAdManager/samples/V1/TargetingPresetServiceClient/update_targeting_preset.php new file mode 100644 index 000000000000..00996b5fda8c --- /dev/null +++ b/AdsAdManager/samples/V1/TargetingPresetServiceClient/update_targeting_preset.php @@ -0,0 +1,76 @@ +setDisplayName($targetingPresetDisplayName) + ->setTargeting($targetingPresetTargeting); + $request = (new UpdateTargetingPresetRequest()) + ->setTargetingPreset($targetingPreset); + + // Call the API and handle any network failures. + try { + /** @var TargetingPreset $response */ + $response = $targetingPresetServiceClient->updateTargetingPreset($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 +{ + $targetingPresetDisplayName = '[DISPLAY_NAME]'; + + update_targeting_preset_sample($targetingPresetDisplayName); +} +// [END admanager_v1_generated_TargetingPresetService_UpdateTargetingPreset_sync] diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_activate_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_activate_teams.php index 45f5f635fbdf..90d52e356b35 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/batch_activate_teams.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_activate_teams.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to batch activate `Team` objects. + * Batch activates `Team` objects. * * @param string $formattedParent Format: `networks/{network_code}` * Please see {@see TeamServiceClient::networkName()} for help formatting this field. diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_create_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_create_teams.php index 10e8b18f74ad..92c1ad03a19d 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/batch_create_teams.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_create_teams.php @@ -31,7 +31,7 @@ use Google\ApiCore\ApiException; /** - * API to batch create `Team` objects. + * Creates `Team` objects. * * @param string $formattedParent The parent resource where `Teams` will be created. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_deactivate_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_deactivate_teams.php index b401d6c64267..a5da8222f8e4 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/batch_deactivate_teams.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_deactivate_teams.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to batch deactivate `Team` objects. + * Batch deactivates `Team` objects. * * @param string $formattedParent Format: `networks/{network_code}` * Please see {@see TeamServiceClient::networkName()} for help formatting this field. diff --git a/AdsAdManager/samples/V1/TeamServiceClient/batch_update_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/batch_update_teams.php index 677ee0acbf38..8cb7e210b0ce 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/batch_update_teams.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/batch_update_teams.php @@ -31,7 +31,7 @@ use Google\ApiCore\ApiException; /** - * API to batch update `Team` objects. + * Batch updates `Team` objects. * * @param string $formattedParent The parent resource where `Teams` will be updated. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/TeamServiceClient/create_team.php b/AdsAdManager/samples/V1/TeamServiceClient/create_team.php index fa220eb9d4f2..42989ac21ea8 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/create_team.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/create_team.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to create a `Team` object. + * Creates a `Team` object. * * @param string $formattedParent The parent resource where this `Team` will be created. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/TeamServiceClient/get_team.php b/AdsAdManager/samples/V1/TeamServiceClient/get_team.php index a735ed2fb7e4..3aebc47c4ffd 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/get_team.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/get_team.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a `Team` object. + * Retrieves a `Team` object. * * @param string $formattedName The resource name of the Team. * Format: `networks/{network_code}/teams/{team_id}` diff --git a/AdsAdManager/samples/V1/TeamServiceClient/list_teams.php b/AdsAdManager/samples/V1/TeamServiceClient/list_teams.php index a36097046e4a..2d5dc4b3b2be 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/list_teams.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/list_teams.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve a list of `Team` objects. + * Lists `Team` objects. * * @param string $formattedParent The parent, which owns this collection of Teams. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/TeamServiceClient/update_team.php b/AdsAdManager/samples/V1/TeamServiceClient/update_team.php index 78e20fe1fb33..0210c54a15c3 100644 --- a/AdsAdManager/samples/V1/TeamServiceClient/update_team.php +++ b/AdsAdManager/samples/V1/TeamServiceClient/update_team.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to update a `Team` object. + * Updates a `Team` object. * * @param string $teamDisplayName The name of the Team. This value has a maximum length of 127 * characters. diff --git a/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/get_third_party_company.php b/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/get_third_party_company.php index b4ea7d23cf15..d7fd962f9fce 100644 --- a/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/get_third_party_company.php +++ b/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/get_third_party_company.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a `ThirdPartyCompany` object. + * Retrieves a `ThirdPartyCompany` object. * * @param string $formattedName The resource name of the ThirdPartyCompany. * Format: diff --git a/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/list_third_party_companies.php b/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/list_third_party_companies.php index 4c2c93eae71e..d1758d8a9f6f 100644 --- a/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/list_third_party_companies.php +++ b/AdsAdManager/samples/V1/ThirdPartyCompanyServiceClient/list_third_party_companies.php @@ -29,7 +29,7 @@ use Google\ApiCore\PagedListResponse; /** - * API to retrieve a list of `ThirdPartyCompany` objects. + * Lists `ThirdPartyCompany` objects. * * @param string $formattedParent The parent, which owns this collection of ThirdPartyCompanies. * Format: `networks/{network_code}` diff --git a/AdsAdManager/samples/V1/UserServiceClient/get_user.php b/AdsAdManager/samples/V1/UserServiceClient/get_user.php index fdccc337f748..d43eac14f605 100644 --- a/AdsAdManager/samples/V1/UserServiceClient/get_user.php +++ b/AdsAdManager/samples/V1/UserServiceClient/get_user.php @@ -29,7 +29,7 @@ use Google\ApiCore\ApiException; /** - * API to retrieve a User object. + * Retrieves a `User` object. * * To get the current user, the resource name * `networks/{networkCode}/users/me` can be used. diff --git a/AdsAdManager/src/V1/BatchActivateContentBundlesRequest.php b/AdsAdManager/src/V1/BatchActivateContentBundlesRequest.php new file mode 100644 index 000000000000..47cc09fda590 --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivateContentBundlesRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchActivateContentBundlesRequest + */ +class BatchActivateContentBundlesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `ContentBundles` will be activated. + * 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 `ContentBundle`s to activate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_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 resource where `ContentBundles` will be activated. + * Format: `networks/{network_code}` + * Please see {@see ContentBundleServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `ContentBundle`s to activate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * Please see {@see ContentBundleServiceClient::contentBundleName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchActivateContentBundlesRequest + * + * @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. The parent resource where `ContentBundles` will be activated. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the `ContentBundle`s to activate. + * 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 parent resource where `ContentBundles` will be activated. + * 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 `ContentBundles` will be activated. + * 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 `ContentBundle`s to activate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `ContentBundle`s to activate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchActivateContentBundlesResponse.php b/AdsAdManager/src/V1/BatchActivateContentBundlesResponse.php new file mode 100644 index 000000000000..3b12d06fa433 --- /dev/null +++ b/AdsAdManager/src/V1/BatchActivateContentBundlesResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchActivateContentBundlesResponse + */ +class BatchActivateContentBundlesResponse 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\ContentBundleService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchApproveAndOverbookOrdersRequest.php b/AdsAdManager/src/V1/BatchApproveAndOverbookOrdersRequest.php new file mode 100644 index 000000000000..5e323169f894 --- /dev/null +++ b/AdsAdManager/src/V1/BatchApproveAndOverbookOrdersRequest.php @@ -0,0 +1,166 @@ +google.ads.admanager.v1.BatchApproveAndOverbookOrdersRequest + */ +class BatchApproveAndOverbookOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to approve and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_inventory_check = false; + + /** + * @param string $parent Required. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to approve and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchApproveAndOverbookOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to approve and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * @type bool $skip_inventory_check + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to approve and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to approve and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSkipInventoryCheck() + { + return $this->skip_inventory_check; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSkipInventoryCheck($var) + { + GPBUtil::checkBool($var); + $this->skip_inventory_check = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchApproveAndOverbookOrdersResponse.php b/AdsAdManager/src/V1/BatchApproveAndOverbookOrdersResponse.php new file mode 100644 index 000000000000..0c16ea416903 --- /dev/null +++ b/AdsAdManager/src/V1/BatchApproveAndOverbookOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchApproveAndOverbookOrdersResponse + */ +class BatchApproveAndOverbookOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchApproveOrdersRequest.php b/AdsAdManager/src/V1/BatchApproveOrdersRequest.php new file mode 100644 index 000000000000..f1217ab22662 --- /dev/null +++ b/AdsAdManager/src/V1/BatchApproveOrdersRequest.php @@ -0,0 +1,166 @@ +google.ads.admanager.v1.BatchApproveOrdersRequest + */ +class BatchApproveOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_inventory_check = false; + + /** + * @param string $parent Required. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchApproveOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * @type bool $skip_inventory_check + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSkipInventoryCheck() + { + return $this->skip_inventory_check; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSkipInventoryCheck($var) + { + GPBUtil::checkBool($var); + $this->skip_inventory_check = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchApproveOrdersResponse.php b/AdsAdManager/src/V1/BatchApproveOrdersResponse.php new file mode 100644 index 000000000000..92a2fb6dbd6b --- /dev/null +++ b/AdsAdManager/src/V1/BatchApproveOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchApproveOrdersResponse + */ +class BatchApproveOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchApproveOrdersWithoutReservationRequest.php b/AdsAdManager/src/V1/BatchApproveOrdersWithoutReservationRequest.php new file mode 100644 index 000000000000..aab7c7619ff5 --- /dev/null +++ b/AdsAdManager/src/V1/BatchApproveOrdersWithoutReservationRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchApproveOrdersWithoutReservationRequest + */ +class BatchApproveOrdersWithoutReservationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to approve. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchApproveOrdersWithoutReservationRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to approve. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchApproveOrdersWithoutReservationResponse.php b/AdsAdManager/src/V1/BatchApproveOrdersWithoutReservationResponse.php new file mode 100644 index 000000000000..0a16d569d758 --- /dev/null +++ b/AdsAdManager/src/V1/BatchApproveOrdersWithoutReservationResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchApproveOrdersWithoutReservationResponse + */ +class BatchApproveOrdersWithoutReservationResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchArchiveOrdersRequest.php b/AdsAdManager/src/V1/BatchArchiveOrdersRequest.php new file mode 100644 index 000000000000..b0fc5399126d --- /dev/null +++ b/AdsAdManager/src/V1/BatchArchiveOrdersRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchArchiveOrdersRequest + */ +class BatchArchiveOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to archive. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to archive. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchArchiveOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to archive. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to archive. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to archive. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchArchiveOrdersResponse.php b/AdsAdManager/src/V1/BatchArchiveOrdersResponse.php new file mode 100644 index 000000000000..787af9242600 --- /dev/null +++ b/AdsAdManager/src/V1/BatchArchiveOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchArchiveOrdersResponse + */ +class BatchArchiveOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchArchiveSlatesRequest.php b/AdsAdManager/src/V1/BatchArchiveSlatesRequest.php new file mode 100644 index 000000000000..d6c6a8cfe59f --- /dev/null +++ b/AdsAdManager/src/V1/BatchArchiveSlatesRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchArchiveSlatesRequest + */ +class BatchArchiveSlatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource containing the slates. + * 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 slates to archive. + * Format: "networks/{network_code}/slates/{slate_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 resource containing the slates. + * Format: "networks/{network_code}" + * Please see {@see SlateServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the slates to archive. + * Format: "networks/{network_code}/slates/{slate_id}" + * Please see {@see SlateServiceClient::slateName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchArchiveSlatesRequest + * + * @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. The parent resource containing the slates. + * Format: "networks/{network_code}" + * @type string[] $names + * Required. The resource names of the slates to archive. + * Format: "networks/{network_code}/slates/{slate_id}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource containing the slates. + * 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 containing the slates. + * 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 slates to archive. + * Format: "networks/{network_code}/slates/{slate_id}" + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the slates to archive. + * Format: "networks/{network_code}/slates/{slate_id}" + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchArchiveSlatesResponse.php b/AdsAdManager/src/V1/BatchArchiveSlatesResponse.php new file mode 100644 index 000000000000..b2d6840f21f9 --- /dev/null +++ b/AdsAdManager/src/V1/BatchArchiveSlatesResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchArchiveSlatesResponse + */ +class BatchArchiveSlatesResponse 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\SlateService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateOrdersRequest.php b/AdsAdManager/src/V1/BatchCreateOrdersRequest.php new file mode 100644 index 000000000000..b7b24beaf8e3 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateOrdersRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchCreateOrdersRequest + */ +class BatchCreateOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Orders` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateOrderRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Order` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateOrderRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Orders` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateOrderRequest must match this + * field. Please see + * {@see OrderServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreateOrderRequest[] $requests Required. The `Order` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreateOrdersRequest + * + * @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 `Orders` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateOrderRequest must match this + * field. + * @type \Google\Ads\AdManager\V1\CreateOrderRequest[] $requests + * Required. The `Order` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Orders` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateOrderRequest 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 `Orders` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateOrderRequest 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 `Order` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateOrderRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Ads\AdManager\V1\CreateOrderRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Order` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateOrderRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CreateOrderRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreateOrderRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateOrdersResponse.php b/AdsAdManager/src/V1/BatchCreateOrdersResponse.php new file mode 100644 index 000000000000..420dc198f2b8 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateOrdersResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreateOrdersResponse + */ +class BatchCreateOrdersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Order` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + */ + private $orders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Order[] $orders + * The `Order` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * The `Order` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + * @return RepeatedField<\Google\Ads\AdManager\V1\Order> + */ + public function getOrders() + { + return $this->orders; + } + + /** + * The `Order` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + * @param \Google\Ads\AdManager\V1\Order[] $var + * @return $this + */ + public function setOrders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Order::class); + $this->orders = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateSlatesRequest.php b/AdsAdManager/src/V1/BatchCreateSlatesRequest.php new file mode 100644 index 000000000000..b5535b4b45d3 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateSlatesRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchCreateSlatesRequest + */ +class BatchCreateSlatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Slates` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSlateRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Slate` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateSlateRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Slates` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSlateRequest must match this + * field. Please see + * {@see SlateServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreateSlateRequest[] $requests Required. The `Slate` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchCreateSlatesRequest + * + * @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 `Slates` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSlateRequest must match this + * field. + * @type \Google\Ads\AdManager\V1\CreateSlateRequest[] $requests + * Required. The `Slate` objects to create. + * A maximum of 100 objects can be created in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Slates` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSlateRequest 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 `Slates` will be created. + * Format: `networks/{network_code}` + * The parent field in the CreateSlateRequest 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 `Slate` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateSlateRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Ads\AdManager\V1\CreateSlateRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Slate` objects to create. + * A maximum of 100 objects can be created in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreateSlateRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CreateSlateRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreateSlateRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchCreateSlatesResponse.php b/AdsAdManager/src/V1/BatchCreateSlatesResponse.php new file mode 100644 index 000000000000..7597566b4474 --- /dev/null +++ b/AdsAdManager/src/V1/BatchCreateSlatesResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchCreateSlatesResponse + */ +class BatchCreateSlatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Slate` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + */ + private $slates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Slate[] $slates + * The `Slate` objects created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * The `Slate` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + * @return RepeatedField<\Google\Ads\AdManager\V1\Slate> + */ + public function getSlates() + { + return $this->slates; + } + + /** + * The `Slate` objects created. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + * @param \Google\Ads\AdManager\V1\Slate[] $var + * @return $this + */ + public function setSlates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Slate::class); + $this->slates = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeactivateContentBundlesRequest.php b/AdsAdManager/src/V1/BatchDeactivateContentBundlesRequest.php new file mode 100644 index 000000000000..d8cdcababd15 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateContentBundlesRequest.php @@ -0,0 +1,133 @@ +google.ads.admanager.v1.BatchDeactivateContentBundlesRequest + */ +class BatchDeactivateContentBundlesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `ContentBundles` will be + * deactivated. + * 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 `ContentBundle`s to deactivate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_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 resource where `ContentBundles` will be + * deactivated. + * Format: `networks/{network_code}` + * Please see {@see ContentBundleServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the `ContentBundle`s to deactivate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * Please see {@see ContentBundleServiceClient::contentBundleName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchDeactivateContentBundlesRequest + * + * @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. The parent resource where `ContentBundles` will be + * deactivated. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the `ContentBundle`s to deactivate. + * 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 parent resource where `ContentBundles` will be + * deactivated. + * 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 `ContentBundles` will be + * deactivated. + * 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 `ContentBundle`s to deactivate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the `ContentBundle`s to deactivate. + * Format: `networks/{network_code}/contentBundles/{content_bundle_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchDeactivateContentBundlesResponse.php b/AdsAdManager/src/V1/BatchDeactivateContentBundlesResponse.php new file mode 100644 index 000000000000..084341bea438 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeactivateContentBundlesResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDeactivateContentBundlesResponse + */ +class BatchDeactivateContentBundlesResponse 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\ContentBundleService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchDeleteOrdersRequest.php b/AdsAdManager/src/V1/BatchDeleteOrdersRequest.php new file mode 100644 index 000000000000..1b218b4367ff --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeleteOrdersRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchDeleteOrdersRequest + */ +class BatchDeleteOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to delete. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to delete. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchDeleteOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to delete. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to delete. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to delete. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchDeleteOrdersResponse.php b/AdsAdManager/src/V1/BatchDeleteOrdersResponse.php new file mode 100644 index 000000000000..dcaa30150bbb --- /dev/null +++ b/AdsAdManager/src/V1/BatchDeleteOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDeleteOrdersResponse + */ +class BatchDeleteOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchDisapproveOrdersRequest.php b/AdsAdManager/src/V1/BatchDisapproveOrdersRequest.php new file mode 100644 index 000000000000..3c4bb45489c3 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDisapproveOrdersRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchDisapproveOrdersRequest + */ +class BatchDisapproveOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to disapprove. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to disapprove. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchDisapproveOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to disapprove. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to disapprove. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to disapprove. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchDisapproveOrdersResponse.php b/AdsAdManager/src/V1/BatchDisapproveOrdersResponse.php new file mode 100644 index 000000000000..19b2df415e37 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDisapproveOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDisapproveOrdersResponse + */ +class BatchDisapproveOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchDisapproveOrdersWithoutReservationChangesRequest.php b/AdsAdManager/src/V1/BatchDisapproveOrdersWithoutReservationChangesRequest.php new file mode 100644 index 000000000000..8ca72aade1e4 --- /dev/null +++ b/AdsAdManager/src/V1/BatchDisapproveOrdersWithoutReservationChangesRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchDisapproveOrdersWithoutReservationChangesRequest + */ +class BatchDisapproveOrdersWithoutReservationChangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to disapprove without + * reservation changes. Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to disapprove without + * reservation changes. Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchDisapproveOrdersWithoutReservationChangesRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to disapprove without + * reservation changes. Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to disapprove without + * reservation changes. Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to disapprove without + * reservation changes. Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchDisapproveOrdersWithoutReservationChangesResponse.php b/AdsAdManager/src/V1/BatchDisapproveOrdersWithoutReservationChangesResponse.php new file mode 100644 index 000000000000..1dd20240488e --- /dev/null +++ b/AdsAdManager/src/V1/BatchDisapproveOrdersWithoutReservationChangesResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchDisapproveOrdersWithoutReservationChangesResponse + */ +class BatchDisapproveOrdersWithoutReservationChangesResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchPauseOrdersRequest.php b/AdsAdManager/src/V1/BatchPauseOrdersRequest.php new file mode 100644 index 000000000000..26fbaae3b889 --- /dev/null +++ b/AdsAdManager/src/V1/BatchPauseOrdersRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchPauseOrdersRequest + */ +class BatchPauseOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to pause. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to pause. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchPauseOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to pause. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to pause. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to pause. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchPauseOrdersResponse.php b/AdsAdManager/src/V1/BatchPauseOrdersResponse.php new file mode 100644 index 000000000000..a220fb2e1f99 --- /dev/null +++ b/AdsAdManager/src/V1/BatchPauseOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchPauseOrdersResponse + */ +class BatchPauseOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchResumeAndOverbookOrdersRequest.php b/AdsAdManager/src/V1/BatchResumeAndOverbookOrdersRequest.php new file mode 100644 index 000000000000..94d1702aba2c --- /dev/null +++ b/AdsAdManager/src/V1/BatchResumeAndOverbookOrdersRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchResumeAndOverbookOrdersRequest + */ +class BatchResumeAndOverbookOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to resume and overbook. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to resume and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchResumeAndOverbookOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to resume and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to resume and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to resume and overbook. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchResumeAndOverbookOrdersResponse.php b/AdsAdManager/src/V1/BatchResumeAndOverbookOrdersResponse.php new file mode 100644 index 000000000000..def43c19866a --- /dev/null +++ b/AdsAdManager/src/V1/BatchResumeAndOverbookOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchResumeAndOverbookOrdersResponse + */ +class BatchResumeAndOverbookOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchResumeOrdersRequest.php b/AdsAdManager/src/V1/BatchResumeOrdersRequest.php new file mode 100644 index 000000000000..6514c2b9dffa --- /dev/null +++ b/AdsAdManager/src/V1/BatchResumeOrdersRequest.php @@ -0,0 +1,166 @@ +google.ads.admanager.v1.BatchResumeOrdersRequest + */ +class BatchResumeOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to resume. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_inventory_check = false; + + /** + * @param string $parent Required. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to resume. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchResumeOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to resume. + * Format: `networks/{network_code}/orders/{order_id}` + * @type bool $skip_inventory_check + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to resume. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to resume. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSkipInventoryCheck() + { + return $this->skip_inventory_check; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSkipInventoryCheck($var) + { + GPBUtil::checkBool($var); + $this->skip_inventory_check = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchResumeOrdersResponse.php b/AdsAdManager/src/V1/BatchResumeOrdersResponse.php new file mode 100644 index 000000000000..466004c1f71c --- /dev/null +++ b/AdsAdManager/src/V1/BatchResumeOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchResumeOrdersResponse + */ +class BatchResumeOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchRetractOrdersRequest.php b/AdsAdManager/src/V1/BatchRetractOrdersRequest.php new file mode 100644 index 000000000000..525339552896 --- /dev/null +++ b/AdsAdManager/src/V1/BatchRetractOrdersRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchRetractOrdersRequest + */ +class BatchRetractOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to retract. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchRetractOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchRetractOrdersResponse.php b/AdsAdManager/src/V1/BatchRetractOrdersResponse.php new file mode 100644 index 000000000000..0216d30a3764 --- /dev/null +++ b/AdsAdManager/src/V1/BatchRetractOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchRetractOrdersResponse + */ +class BatchRetractOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchRetractOrdersWithoutReservationChangesRequest.php b/AdsAdManager/src/V1/BatchRetractOrdersWithoutReservationChangesRequest.php new file mode 100644 index 000000000000..315eb4466cfc --- /dev/null +++ b/AdsAdManager/src/V1/BatchRetractOrdersWithoutReservationChangesRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchRetractOrdersWithoutReservationChangesRequest + */ +class BatchRetractOrdersWithoutReservationChangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to retract. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchRetractOrdersWithoutReservationChangesRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to retract. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchRetractOrdersWithoutReservationChangesResponse.php b/AdsAdManager/src/V1/BatchRetractOrdersWithoutReservationChangesResponse.php new file mode 100644 index 000000000000..865b19cd71c4 --- /dev/null +++ b/AdsAdManager/src/V1/BatchRetractOrdersWithoutReservationChangesResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchRetractOrdersWithoutReservationChangesResponse + */ +class BatchRetractOrdersWithoutReservationChangesResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalAndOverbookRequest.php b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalAndOverbookRequest.php new file mode 100644 index 000000000000..6979ad79a5fc --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalAndOverbookRequest.php @@ -0,0 +1,123 @@ +google.ads.admanager.v1.BatchSubmitOrdersForApprovalAndOverbookRequest + */ +class BatchSubmitOrdersForApprovalAndOverbookRequest 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 orders to submit for approval and + * overbook. Format: `networks/{network_code}/orders/{order_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 OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to submit for approval and + * overbook. Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalAndOverbookRequest + * + * @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 string[] $names + * Required. The resource names of the orders to submit for approval and + * overbook. Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::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 orders to submit for approval and + * overbook. Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to submit for approval and + * overbook. Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchSubmitOrdersForApprovalAndOverbookResponse.php b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalAndOverbookResponse.php new file mode 100644 index 000000000000..8b499a9f6097 --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalAndOverbookResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchSubmitOrdersForApprovalAndOverbookResponse + */ +class BatchSubmitOrdersForApprovalAndOverbookResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalRequest.php b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalRequest.php new file mode 100644 index 000000000000..49b458eef853 --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalRequest.php @@ -0,0 +1,166 @@ +google.ads.admanager.v1.BatchSubmitOrdersForApprovalRequest + */ +class BatchSubmitOrdersForApprovalRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $names; + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $skip_inventory_check = false; + + /** + * @param string $parent Required. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * @type bool $skip_inventory_check + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->names = $arr; + + return $this; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSkipInventoryCheck() + { + return $this->skip_inventory_check; + } + + /** + * Optional. Indicates whether the inventory check should be skipped when + * performing this action. + * + * Generated from protobuf field bool skip_inventory_check = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSkipInventoryCheck($var) + { + GPBUtil::checkBool($var); + $this->skip_inventory_check = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalResponse.php b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalResponse.php new file mode 100644 index 000000000000..6e3457f6d014 --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchSubmitOrdersForApprovalResponse + */ +class BatchSubmitOrdersForApprovalResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalWithoutReservationChangesRequest.php b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalWithoutReservationChangesRequest.php new file mode 100644 index 000000000000..d21488c52557 --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalWithoutReservationChangesRequest.php @@ -0,0 +1,129 @@ +google.ads.admanager.v1.BatchSubmitOrdersForApprovalWithoutReservationChangesRequest + */ +class BatchSubmitOrdersForApprovalWithoutReservationChangesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalWithoutReservationChangesRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to submit for approval. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchSubmitOrdersForApprovalWithoutReservationChangesResponse.php b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalWithoutReservationChangesResponse.php new file mode 100644 index 000000000000..87f12ca91150 --- /dev/null +++ b/AdsAdManager/src/V1/BatchSubmitOrdersForApprovalWithoutReservationChangesResponse.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.BatchSubmitOrdersForApprovalWithoutReservationChangesResponse + */ +class BatchSubmitOrdersForApprovalWithoutReservationChangesResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchUnarchiveOrdersRequest.php b/AdsAdManager/src/V1/BatchUnarchiveOrdersRequest.php new file mode 100644 index 000000000000..a76914512709 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUnarchiveOrdersRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchUnarchiveOrdersRequest + */ +class BatchUnarchiveOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of Orders. + * 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 orders to extract. + * Format: `networks/{network_code}/orders/{order_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 Orders. + * Format: `networks/{network_code}` + * Please see {@see OrderServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the orders to extract. + * Format: `networks/{network_code}/orders/{order_id}` + * Please see {@see OrderServiceClient::orderName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchUnarchiveOrdersRequest + * + * @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. The parent, which owns this collection of Orders. + * Format: `networks/{network_code}` + * @type string[] $names + * Required. The resource names of the orders to extract. + * Format: `networks/{network_code}/orders/{order_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of Orders. + * 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 Orders. + * 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 orders to extract. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the orders to extract. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchUnarchiveOrdersResponse.php b/AdsAdManager/src/V1/BatchUnarchiveOrdersResponse.php new file mode 100644 index 000000000000..b6f93be51a8d --- /dev/null +++ b/AdsAdManager/src/V1/BatchUnarchiveOrdersResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchUnarchiveOrdersResponse + */ +class BatchUnarchiveOrdersResponse 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\OrderService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchUnarchiveSlatesRequest.php b/AdsAdManager/src/V1/BatchUnarchiveSlatesRequest.php new file mode 100644 index 000000000000..7dcbb19d0d0a --- /dev/null +++ b/AdsAdManager/src/V1/BatchUnarchiveSlatesRequest.php @@ -0,0 +1,128 @@ +google.ads.admanager.v1.BatchUnarchiveSlatesRequest + */ +class BatchUnarchiveSlatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource containing the slates. + * 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 slates to unarchive. + * Format: "networks/{network_code}/slates/{slate_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 resource containing the slates. + * Format: "networks/{network_code}" + * Please see {@see SlateServiceClient::networkName()} for help formatting this field. + * @param string[] $names Required. The resource names of the slates to unarchive. + * Format: "networks/{network_code}/slates/{slate_id}" + * Please see {@see SlateServiceClient::slateName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\BatchUnarchiveSlatesRequest + * + * @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. The parent resource containing the slates. + * Format: "networks/{network_code}" + * @type string[] $names + * Required. The resource names of the slates to unarchive. + * Format: "networks/{network_code}/slates/{slate_id}" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource containing the slates. + * 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 containing the slates. + * 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 slates to unarchive. + * Format: "networks/{network_code}/slates/{slate_id}" + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getNames() + { + return $this->names; + } + + /** + * Required. The resource names of the slates to unarchive. + * Format: "networks/{network_code}/slates/{slate_id}" + * + * Generated from protobuf field repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $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/BatchUnarchiveSlatesResponse.php b/AdsAdManager/src/V1/BatchUnarchiveSlatesResponse.php new file mode 100644 index 000000000000..743022aad083 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUnarchiveSlatesResponse.php @@ -0,0 +1,33 @@ +google.ads.admanager.v1.BatchUnarchiveSlatesResponse + */ +class BatchUnarchiveSlatesResponse 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\SlateService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateOrdersRequest.php b/AdsAdManager/src/V1/BatchUpdateOrdersRequest.php new file mode 100644 index 000000000000..6644333bb049 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateOrdersRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdateOrdersRequest + */ +class BatchUpdateOrdersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Orders` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateOrderRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Order` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateOrderRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Orders` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateOrderRequest must match this + * field. Please see + * {@see OrderServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateOrderRequest[] $requests Required. The `Order` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateOrdersRequest + * + * @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 `Orders` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateOrderRequest must match this + * field. + * @type \Google\Ads\AdManager\V1\UpdateOrderRequest[] $requests + * Required. The `Order` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Orders` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateOrderRequest 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 `Orders` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateOrderRequest 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 `Order` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateOrderRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Ads\AdManager\V1\UpdateOrderRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Order` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateOrderRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\UpdateOrderRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateOrderRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateOrdersResponse.php b/AdsAdManager/src/V1/BatchUpdateOrdersResponse.php new file mode 100644 index 000000000000..6b3200febe53 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateOrdersResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateOrdersResponse + */ +class BatchUpdateOrdersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Order` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + */ + private $orders; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Order[] $orders + * The `Order` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * The `Order` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + * @return RepeatedField<\Google\Ads\AdManager\V1\Order> + */ + public function getOrders() + { + return $this->orders; + } + + /** + * The `Order` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Order orders = 1; + * @param \Google\Ads\AdManager\V1\Order[] $var + * @return $this + */ + public function setOrders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Order::class); + $this->orders = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateSlatesRequest.php b/AdsAdManager/src/V1/BatchUpdateSlatesRequest.php new file mode 100644 index 000000000000..99a267d23ea4 --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateSlatesRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdateSlatesRequest + */ +class BatchUpdateSlatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `Slates` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSlateRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `Slate` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateSlateRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `Slates` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSlateRequest must match this + * field. Please see + * {@see SlateServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateSlateRequest[] $requests Required. The `Slate` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateSlatesRequest + * + * @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 `Slates` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSlateRequest must match this + * field. + * @type \Google\Ads\AdManager\V1\UpdateSlateRequest[] $requests + * Required. The `Slate` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `Slates` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSlateRequest 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 `Slates` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateSlateRequest 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 `Slate` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateSlateRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Ads\AdManager\V1\UpdateSlateRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `Slate` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateSlateRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\UpdateSlateRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateSlateRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateSlatesResponse.php b/AdsAdManager/src/V1/BatchUpdateSlatesResponse.php new file mode 100644 index 000000000000..8fb06b8586bf --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateSlatesResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateSlatesResponse + */ +class BatchUpdateSlatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Slate` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + */ + private $slates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Slate[] $slates + * The `Slate` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * The `Slate` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + * @return RepeatedField<\Google\Ads\AdManager\V1\Slate> + */ + public function getSlates() + { + return $this->slates; + } + + /** + * The `Slate` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + * @param \Google\Ads\AdManager\V1\Slate[] $var + * @return $this + */ + public function setSlates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Slate::class); + $this->slates = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateTargetingPresetsRequest.php b/AdsAdManager/src/V1/BatchUpdateTargetingPresetsRequest.php new file mode 100644 index 000000000000..953b18047c2c --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateTargetingPresetsRequest.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.BatchUpdateTargetingPresetsRequest + */ +class BatchUpdateTargetingPresetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where `TargetingPresets` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTargetingPresetRequest must match this + * field. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The `TargetingPreset` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateTargetingPresetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + + /** + * @param string $parent Required. The parent resource where `TargetingPresets` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTargetingPresetRequest must match this + * field. Please see + * {@see TargetingPresetServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\UpdateTargetingPresetRequest[] $requests Required. The `TargetingPreset` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * @return \Google\Ads\AdManager\V1\BatchUpdateTargetingPresetsRequest + * + * @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 `TargetingPresets` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTargetingPresetRequest must match this + * field. + * @type \Google\Ads\AdManager\V1\UpdateTargetingPresetRequest[] $requests + * Required. The `TargetingPreset` objects to update. + * A maximum of 100 objects can be updated in a batch. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TargetingPresetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where `TargetingPresets` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTargetingPresetRequest 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 `TargetingPresets` will be updated. + * Format: `networks/{network_code}` + * The parent field in the UpdateTargetingPresetRequest 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 `TargetingPreset` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateTargetingPresetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Ads\AdManager\V1\UpdateTargetingPresetRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The `TargetingPreset` objects to update. + * A maximum of 100 objects can be updated in a batch. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.UpdateTargetingPresetRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\UpdateTargetingPresetRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\UpdateTargetingPresetRequest::class); + $this->requests = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BatchUpdateTargetingPresetsResponse.php b/AdsAdManager/src/V1/BatchUpdateTargetingPresetsResponse.php new file mode 100644 index 000000000000..4eb35320a48f --- /dev/null +++ b/AdsAdManager/src/V1/BatchUpdateTargetingPresetsResponse.php @@ -0,0 +1,67 @@ +google.ads.admanager.v1.BatchUpdateTargetingPresetsResponse + */ +class BatchUpdateTargetingPresetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `TargetingPreset` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.TargetingPreset targeting_presets = 1; + */ + private $targeting_presets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\TargetingPreset[] $targeting_presets + * The `TargetingPreset` objects updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TargetingPresetService::initOnce(); + parent::__construct($data); + } + + /** + * The `TargetingPreset` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.TargetingPreset targeting_presets = 1; + * @return RepeatedField<\Google\Ads\AdManager\V1\TargetingPreset> + */ + public function getTargetingPresets() + { + return $this->targeting_presets; + } + + /** + * The `TargetingPreset` objects updated. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.TargetingPreset targeting_presets = 1; + * @param \Google\Ads\AdManager\V1\TargetingPreset[] $var + * @return $this + */ + public function setTargetingPresets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\TargetingPreset::class); + $this->targeting_presets = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/BrandLiftPartnerEnum.php b/AdsAdManager/src/V1/BrandLiftPartnerEnum.php new file mode 100644 index 000000000000..a931d53f7ba9 --- /dev/null +++ b/AdsAdManager/src/V1/BrandLiftPartnerEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.BrandLiftPartnerEnum + */ +class BrandLiftPartnerEnum 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\BrandLiftPartnerEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/BrandLiftPartnerEnum/BrandLiftPartner.php b/AdsAdManager/src/V1/BrandLiftPartnerEnum/BrandLiftPartner.php new file mode 100644 index 000000000000..8659c0dca2a4 --- /dev/null +++ b/AdsAdManager/src/V1/BrandLiftPartnerEnum/BrandLiftPartner.php @@ -0,0 +1,82 @@ +google.ads.admanager.v1.BrandLiftPartnerEnum.BrandLiftPartner + */ +class BrandLiftPartner +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum BRAND_LIFT_PARTNER_UNSPECIFIED = 0; + */ + const BRAND_LIFT_PARTNER_UNSPECIFIED = 0; + /** + * Indicates brand lift partner Dynata. + * + * Generated from protobuf enum DYNATA = 1; + */ + const DYNATA = 1; + /** + * Indicates brand lift partner Intage. + * + * Generated from protobuf enum INTAGE = 3; + */ + const INTAGE = 3; + /** + * Indicates brand lift partner Kantar. + * + * Generated from protobuf enum KANTAR_MILLWARD_BROWN = 4; + */ + const KANTAR_MILLWARD_BROWN = 4; + /** + * Indicates brand lift partner Macromill. + * + * Generated from protobuf enum MACROMILL = 5; + */ + const MACROMILL = 5; + /** + * Indicates there's no brand lift partner. + * + * Generated from protobuf enum NONE = 7; + */ + const NONE = 7; + + private static $valueToName = [ + self::BRAND_LIFT_PARTNER_UNSPECIFIED => 'BRAND_LIFT_PARTNER_UNSPECIFIED', + self::DYNATA => 'DYNATA', + self::INTAGE => 'INTAGE', + self::KANTAR_MILLWARD_BROWN => 'KANTAR_MILLWARD_BROWN', + self::MACROMILL => 'MACROMILL', + self::NONE => 'NONE', + ]; + + 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/ChildContentEligibilityEnum.php b/AdsAdManager/src/V1/ChildContentEligibilityEnum.php new file mode 100644 index 000000000000..57aa8cd8556b --- /dev/null +++ b/AdsAdManager/src/V1/ChildContentEligibilityEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.ChildContentEligibilityEnum + */ +class ChildContentEligibilityEnum 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\ChildContentEligibilityEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ChildContentEligibilityEnum/ChildContentEligibility.php b/AdsAdManager/src/V1/ChildContentEligibilityEnum/ChildContentEligibility.php new file mode 100644 index 000000000000..7c6f49a5117c --- /dev/null +++ b/AdsAdManager/src/V1/ChildContentEligibilityEnum/ChildContentEligibility.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.ChildContentEligibilityEnum.ChildContentEligibility + */ +class ChildContentEligibility +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CHILD_CONTENT_ELIGIBILITY_UNSPECIFIED = 0; + */ + const CHILD_CONTENT_ELIGIBILITY_UNSPECIFIED = 0; + /** + * This line item is eligible to serve on requests that are child-directed. + * + * Generated from protobuf enum ALLOWED = 1; + */ + const ALLOWED = 1; + /** + * This line item is not eligible to serve on any requests that are + * child-directed. + * + * Generated from protobuf enum DISALLOWED = 2; + */ + const DISALLOWED = 2; + + private static $valueToName = [ + self::CHILD_CONTENT_ELIGIBILITY_UNSPECIFIED => 'CHILD_CONTENT_ELIGIBILITY_UNSPECIFIED', + self::ALLOWED => 'ALLOWED', + self::DISALLOWED => 'DISALLOWED', + ]; + + 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/Client/CompanyServiceClient.php b/AdsAdManager/src/V1/Client/CompanyServiceClient.php index 4b7ea23525a7..965e319336ab 100644 --- a/AdsAdManager/src/V1/Client/CompanyServiceClient.php +++ b/AdsAdManager/src/V1/Client/CompanyServiceClient.php @@ -255,7 +255,7 @@ public function __call($method, $args) } /** - * API to retrieve a `Company` object. + * Retrieves a `Company` object. * * The async variant is {@see CompanyServiceClient::getCompanyAsync()} . * @@ -281,7 +281,7 @@ public function getCompany(GetCompanyRequest $request, array $callOptions = []): } /** - * API to retrieve a list of `Company` objects. + * Lists `Company` objects. * * The async variant is {@see CompanyServiceClient::listCompaniesAsync()} . * diff --git a/AdsAdManager/src/V1/Client/ContactServiceClient.php b/AdsAdManager/src/V1/Client/ContactServiceClient.php index ebeb8a569cf6..525476d46970 100644 --- a/AdsAdManager/src/V1/Client/ContactServiceClient.php +++ b/AdsAdManager/src/V1/Client/ContactServiceClient.php @@ -283,7 +283,7 @@ public function __call($method, $args) } /** - * API to batch create `Contact` objects. + * Creates `Contact` objects. * * The async variant is {@see ContactServiceClient::batchCreateContactsAsync()} . * @@ -311,7 +311,7 @@ public function batchCreateContacts( } /** - * API to batch update `Contact` objects. + * Batch updates `Contact` objects. * * The async variant is {@see ContactServiceClient::batchUpdateContactsAsync()} . * @@ -339,7 +339,7 @@ public function batchUpdateContacts( } /** - * API to create a `Contact` object. + * Creates a `Contact` object. * * The async variant is {@see ContactServiceClient::createContactAsync()} . * @@ -365,7 +365,7 @@ public function createContact(CreateContactRequest $request, array $callOptions } /** - * API to retrieve a `Contact` object. + * Retrieves a `Contact` object. * * The async variant is {@see ContactServiceClient::getContactAsync()} . * @@ -391,7 +391,7 @@ public function getContact(GetContactRequest $request, array $callOptions = []): } /** - * API to retrieve a list of `Contact` objects. + * Lists `Contact` objects. * * The async variant is {@see ContactServiceClient::listContactsAsync()} . * @@ -417,7 +417,7 @@ public function listContacts(ListContactsRequest $request, array $callOptions = } /** - * API to update a `Contact` object. + * Updates a `Contact` object. * * The async variant is {@see ContactServiceClient::updateContactAsync()} . * diff --git a/AdsAdManager/src/V1/Client/ContentBundleServiceClient.php b/AdsAdManager/src/V1/Client/ContentBundleServiceClient.php index 5429b02da78c..1e7aaebf0ee7 100644 --- a/AdsAdManager/src/V1/Client/ContentBundleServiceClient.php +++ b/AdsAdManager/src/V1/Client/ContentBundleServiceClient.php @@ -24,6 +24,10 @@ namespace Google\Ads\AdManager\V1\Client; +use Google\Ads\AdManager\V1\BatchActivateContentBundlesRequest; +use Google\Ads\AdManager\V1\BatchActivateContentBundlesResponse; +use Google\Ads\AdManager\V1\BatchDeactivateContentBundlesRequest; +use Google\Ads\AdManager\V1\BatchDeactivateContentBundlesResponse; use Google\Ads\AdManager\V1\ContentBundle; use Google\Ads\AdManager\V1\GetContentBundleRequest; use Google\Ads\AdManager\V1\ListContentBundlesRequest; @@ -51,6 +55,8 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * + * @method PromiseInterface batchActivateContentBundlesAsync(BatchActivateContentBundlesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeactivateContentBundlesAsync(BatchDeactivateContentBundlesRequest $request, array $optionalArgs = []) * @method PromiseInterface getContentBundleAsync(GetContentBundleRequest $request, array $optionalArgs = []) * @method PromiseInterface listContentBundlesAsync(ListContentBundlesRequest $request, array $optionalArgs = []) */ @@ -254,6 +260,64 @@ public function __call($method, $args) return call_user_func_array([$this, 'startAsyncCall'], $args); } + /** + * Activate a list of `ContentBundle` objects. + * + * The async variant is + * {@see ContentBundleServiceClient::batchActivateContentBundlesAsync()} . + * + * @example samples/V1/ContentBundleServiceClient/batch_activate_content_bundles.php + * + * @param BatchActivateContentBundlesRequest $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 BatchActivateContentBundlesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchActivateContentBundles( + BatchActivateContentBundlesRequest $request, + array $callOptions = [] + ): BatchActivateContentBundlesResponse { + return $this->startApiCall('BatchActivateContentBundles', $request, $callOptions)->wait(); + } + + /** + * Deactivates a list of `ContentBundle` objects. + * + * The async variant is + * {@see ContentBundleServiceClient::batchDeactivateContentBundlesAsync()} . + * + * @example samples/V1/ContentBundleServiceClient/batch_deactivate_content_bundles.php + * + * @param BatchDeactivateContentBundlesRequest $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 BatchDeactivateContentBundlesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeactivateContentBundles( + BatchDeactivateContentBundlesRequest $request, + array $callOptions = [] + ): BatchDeactivateContentBundlesResponse { + return $this->startApiCall('BatchDeactivateContentBundles', $request, $callOptions)->wait(); + } + /** * Retrieves a `ContentBundle` object. * diff --git a/AdsAdManager/src/V1/Client/CreativeSetServiceClient.php b/AdsAdManager/src/V1/Client/CreativeSetServiceClient.php new file mode 100644 index 000000000000..61e279d44fff --- /dev/null +++ b/AdsAdManager/src/V1/Client/CreativeSetServiceClient.php @@ -0,0 +1,382 @@ + createCreativeSetAsync(CreateCreativeSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCreativeSetAsync(GetCreativeSetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCreativeSetsAsync(ListCreativeSetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCreativeSetAsync(UpdateCreativeSetRequest $request, array $optionalArgs = []) + */ +final class CreativeSetServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.CreativeSetService'; + + /** + * 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', + 'https://www.googleapis.com/auth/admanager.readonly', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/creative_set_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/creative_set_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/creative_set_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 + * resource. + * + * @param string $networkCode + * @param string $creative + * + * @return string The formatted creative resource. + */ + public static function creativeName(string $networkCode, string $creative): string + { + return self::getPathTemplate('creative')->render([ + 'network_code' => $networkCode, + 'creative' => $creative, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a creative_set + * resource. + * + * @param string $networkCode + * @param string $creativeSet + * + * @return string The formatted creative_set resource. + */ + public static function creativeSetName(string $networkCode, string $creativeSet): string + { + return self::getPathTemplate('creativeSet')->render([ + 'network_code' => $networkCode, + 'creative_set' => $creativeSet, + ]); + } + + /** + * 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 + * - creative: networks/{network_code}/creatives/{creative} + * - creativeSet: networks/{network_code}/creativeSets/{creative_set} + * - 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\CreativeSetServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CreativeSetServiceClient(['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); + } + + /** + * Creates a `CreativeSet` object. + * + * The async variant is {@see CreativeSetServiceClient::createCreativeSetAsync()} . + * + * @example samples/V1/CreativeSetServiceClient/create_creative_set.php + * + * @param CreateCreativeSetRequest $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 CreativeSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCreativeSet(CreateCreativeSetRequest $request, array $callOptions = []): CreativeSet + { + return $this->startApiCall('CreateCreativeSet', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `CreativeSet` object. + * + * The async variant is {@see CreativeSetServiceClient::getCreativeSetAsync()} . + * + * @example samples/V1/CreativeSetServiceClient/get_creative_set.php + * + * @param GetCreativeSetRequest $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 CreativeSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCreativeSet(GetCreativeSetRequest $request, array $callOptions = []): CreativeSet + { + return $this->startApiCall('GetCreativeSet', $request, $callOptions)->wait(); + } + + /** + * Lists `CreativeSet` objects. + * + * The async variant is {@see CreativeSetServiceClient::listCreativeSetsAsync()} . + * + * @example samples/V1/CreativeSetServiceClient/list_creative_sets.php + * + * @param ListCreativeSetsRequest $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 listCreativeSets(ListCreativeSetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCreativeSets', $request, $callOptions); + } + + /** + * Updates a `CreativeSet` object. + * + * The async variant is {@see CreativeSetServiceClient::updateCreativeSetAsync()} . + * + * @example samples/V1/CreativeSetServiceClient/update_creative_set.php + * + * @param UpdateCreativeSetRequest $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 CreativeSet + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCreativeSet(UpdateCreativeSetRequest $request, array $callOptions = []): CreativeSet + { + return $this->startApiCall('UpdateCreativeSet', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/McmEarningsServiceClient.php b/AdsAdManager/src/V1/Client/McmEarningsServiceClient.php index 67e3cc44b279..b2823585deb5 100644 --- a/AdsAdManager/src/V1/Client/McmEarningsServiceClient.php +++ b/AdsAdManager/src/V1/Client/McmEarningsServiceClient.php @@ -234,7 +234,7 @@ public function __call($method, $args) } /** - * API to retrieve a list of `McmEarnings` objects. + * Lists `McmEarnings` objects. * * The async variant is {@see McmEarningsServiceClient::fetchMcmEarningsAsync()} . * diff --git a/AdsAdManager/src/V1/Client/NetworkServiceClient.php b/AdsAdManager/src/V1/Client/NetworkServiceClient.php index 75f71862e237..be072aff1cde 100644 --- a/AdsAdManager/src/V1/Client/NetworkServiceClient.php +++ b/AdsAdManager/src/V1/Client/NetworkServiceClient.php @@ -237,7 +237,7 @@ public function __call($method, $args) } /** - * API to retrieve a Network object. + * Retrieves a `Network` object. * * The async variant is {@see NetworkServiceClient::getNetworkAsync()} . * @@ -263,7 +263,7 @@ public function getNetwork(GetNetworkRequest $request, array $callOptions = []): } /** - * API to retrieve all the networks the current user has access to. + * Retrieves all the networks the current user has access to. * * The async variant is {@see NetworkServiceClient::listNetworksAsync()} . * diff --git a/AdsAdManager/src/V1/Client/OrderServiceClient.php b/AdsAdManager/src/V1/Client/OrderServiceClient.php index 9fb6daac9582..91c82cd78fc7 100644 --- a/AdsAdManager/src/V1/Client/OrderServiceClient.php +++ b/AdsAdManager/src/V1/Client/OrderServiceClient.php @@ -24,6 +24,42 @@ namespace Google\Ads\AdManager\V1\Client; +use Google\Ads\AdManager\V1\BatchApproveAndOverbookOrdersRequest; +use Google\Ads\AdManager\V1\BatchApproveAndOverbookOrdersResponse; +use Google\Ads\AdManager\V1\BatchApproveOrdersRequest; +use Google\Ads\AdManager\V1\BatchApproveOrdersResponse; +use Google\Ads\AdManager\V1\BatchApproveOrdersWithoutReservationRequest; +use Google\Ads\AdManager\V1\BatchApproveOrdersWithoutReservationResponse; +use Google\Ads\AdManager\V1\BatchArchiveOrdersRequest; +use Google\Ads\AdManager\V1\BatchArchiveOrdersResponse; +use Google\Ads\AdManager\V1\BatchCreateOrdersRequest; +use Google\Ads\AdManager\V1\BatchCreateOrdersResponse; +use Google\Ads\AdManager\V1\BatchDeleteOrdersRequest; +use Google\Ads\AdManager\V1\BatchDeleteOrdersResponse; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersRequest; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersResponse; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersWithoutReservationChangesRequest; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersWithoutReservationChangesResponse; +use Google\Ads\AdManager\V1\BatchPauseOrdersRequest; +use Google\Ads\AdManager\V1\BatchPauseOrdersResponse; +use Google\Ads\AdManager\V1\BatchResumeAndOverbookOrdersRequest; +use Google\Ads\AdManager\V1\BatchResumeAndOverbookOrdersResponse; +use Google\Ads\AdManager\V1\BatchResumeOrdersRequest; +use Google\Ads\AdManager\V1\BatchResumeOrdersResponse; +use Google\Ads\AdManager\V1\BatchRetractOrdersRequest; +use Google\Ads\AdManager\V1\BatchRetractOrdersResponse; +use Google\Ads\AdManager\V1\BatchRetractOrdersWithoutReservationChangesRequest; +use Google\Ads\AdManager\V1\BatchRetractOrdersWithoutReservationChangesResponse; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalAndOverbookRequest; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalAndOverbookResponse; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalRequest; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalResponse; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalWithoutReservationChangesRequest; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalWithoutReservationChangesResponse; +use Google\Ads\AdManager\V1\BatchUnarchiveOrdersRequest; +use Google\Ads\AdManager\V1\BatchUnarchiveOrdersResponse; +use Google\Ads\AdManager\V1\BatchUpdateOrdersRequest; +use Google\Ads\AdManager\V1\BatchUpdateOrdersResponse; use Google\Ads\AdManager\V1\GetOrderRequest; use Google\Ads\AdManager\V1\ListOrdersRequest; use Google\Ads\AdManager\V1\Order; @@ -51,6 +87,24 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * + * @method PromiseInterface batchApproveAndOverbookOrdersAsync(BatchApproveAndOverbookOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchApproveOrdersAsync(BatchApproveOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchApproveOrdersWithoutReservationAsync(BatchApproveOrdersWithoutReservationRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchArchiveOrdersAsync(BatchArchiveOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchCreateOrdersAsync(BatchCreateOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDeleteOrdersAsync(BatchDeleteOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDisapproveOrdersAsync(BatchDisapproveOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchDisapproveOrdersWithoutReservationChangesAsync(BatchDisapproveOrdersWithoutReservationChangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchPauseOrdersAsync(BatchPauseOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchResumeAndOverbookOrdersAsync(BatchResumeAndOverbookOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchResumeOrdersAsync(BatchResumeOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchRetractOrdersAsync(BatchRetractOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchRetractOrdersWithoutReservationChangesAsync(BatchRetractOrdersWithoutReservationChangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchSubmitOrdersForApprovalAsync(BatchSubmitOrdersForApprovalRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchSubmitOrdersForApprovalAndOverbookAsync(BatchSubmitOrdersForApprovalAndOverbookRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchSubmitOrdersForApprovalWithoutReservationChangesAsync(BatchSubmitOrdersForApprovalWithoutReservationChangesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUnarchiveOrdersAsync(BatchUnarchiveOrdersRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateOrdersAsync(BatchUpdateOrdersRequest $request, array $optionalArgs = []) * @method PromiseInterface getOrderAsync(GetOrderRequest $request, array $optionalArgs = []) * @method PromiseInterface listOrdersAsync(ListOrdersRequest $request, array $optionalArgs = []) */ @@ -115,6 +169,74 @@ 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 custom_field + * resource. + * + * @param string $networkCode + * @param string $customField + * + * @return string The formatted custom_field resource. + */ + public static function customFieldName(string $networkCode, string $customField): string + { + return self::getPathTemplate('customField')->render([ + 'network_code' => $networkCode, + 'custom_field' => $customField, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a label + * resource. + * + * @param string $networkCode + * @param string $label + * + * @return string The formatted label resource. + */ + public static function labelName(string $networkCode, string $label): string + { + return self::getPathTemplate('label')->render([ + 'network_code' => $networkCode, + 'label' => $label, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a network * resource. @@ -147,12 +269,52 @@ public static function orderName(string $networkCode, string $order): string ]); } + /** + * 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, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a user + * resource. + * + * @param string $networkCode + * @param string $user + * + * @return string The formatted user resource. + */ + public static function userName(string $networkCode, string $user): string + { + return self::getPathTemplate('user')->render([ + 'network_code' => $networkCode, + 'user' => $user, + ]); + } + /** * 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} + * - customField: networks/{network_code}/customFields/{custom_field} + * - label: networks/{network_code}/labels/{label} * - network: networks/{network_code} * - order: networks/{network_code}/orders/{order} + * - team: networks/{network_code}/teams/{team} + * - user: networks/{network_code}/users/{user} * * 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 @@ -254,6 +416,525 @@ public function __call($method, $args) return call_user_func_array([$this, 'startAsyncCall'], $args); } + /** + * Approves and overbooks a list of `Order` objects. + * + * The async variant is + * {@see OrderServiceClient::batchApproveAndOverbookOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_approve_and_overbook_orders.php + * + * @param BatchApproveAndOverbookOrdersRequest $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 BatchApproveAndOverbookOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchApproveAndOverbookOrders( + BatchApproveAndOverbookOrdersRequest $request, + array $callOptions = [] + ): BatchApproveAndOverbookOrdersResponse { + return $this->startApiCall('BatchApproveAndOverbookOrders', $request, $callOptions)->wait(); + } + + /** + * Approves a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchApproveOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_approve_orders.php + * + * @param BatchApproveOrdersRequest $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 BatchApproveOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchApproveOrders( + BatchApproveOrdersRequest $request, + array $callOptions = [] + ): BatchApproveOrdersResponse { + return $this->startApiCall('BatchApproveOrders', $request, $callOptions)->wait(); + } + + /** + * Approves a list of `Order` objects without changing reservation status. + * + * The async variant is + * {@see OrderServiceClient::batchApproveOrdersWithoutReservationAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_approve_orders_without_reservation.php + * + * @param BatchApproveOrdersWithoutReservationRequest $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 BatchApproveOrdersWithoutReservationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchApproveOrdersWithoutReservation( + BatchApproveOrdersWithoutReservationRequest $request, + array $callOptions = [] + ): BatchApproveOrdersWithoutReservationResponse { + return $this->startApiCall('BatchApproveOrdersWithoutReservation', $request, $callOptions)->wait(); + } + + /** + * Archives a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchArchiveOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_archive_orders.php + * + * @param BatchArchiveOrdersRequest $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 BatchArchiveOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchArchiveOrders( + BatchArchiveOrdersRequest $request, + array $callOptions = [] + ): BatchArchiveOrdersResponse { + return $this->startApiCall('BatchArchiveOrders', $request, $callOptions)->wait(); + } + + /** + * Creates `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchCreateOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_create_orders.php + * + * @param BatchCreateOrdersRequest $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 BatchCreateOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateOrders( + BatchCreateOrdersRequest $request, + array $callOptions = [] + ): BatchCreateOrdersResponse { + return $this->startApiCall('BatchCreateOrders', $request, $callOptions)->wait(); + } + + /** + * Deletes a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchDeleteOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_delete_orders.php + * + * @param BatchDeleteOrdersRequest $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 BatchDeleteOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDeleteOrders( + BatchDeleteOrdersRequest $request, + array $callOptions = [] + ): BatchDeleteOrdersResponse { + return $this->startApiCall('BatchDeleteOrders', $request, $callOptions)->wait(); + } + + /** + * Disapproves a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchDisapproveOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_disapprove_orders.php + * + * @param BatchDisapproveOrdersRequest $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 BatchDisapproveOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDisapproveOrders( + BatchDisapproveOrdersRequest $request, + array $callOptions = [] + ): BatchDisapproveOrdersResponse { + return $this->startApiCall('BatchDisapproveOrders', $request, $callOptions)->wait(); + } + + /** + * Disapproves a list of `Order` objects without changing reservation status. + * + * The async variant is + * {@see OrderServiceClient::batchDisapproveOrdersWithoutReservationChangesAsync()} + * . + * + * @example samples/V1/OrderServiceClient/batch_disapprove_orders_without_reservation_changes.php + * + * @param BatchDisapproveOrdersWithoutReservationChangesRequest $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 BatchDisapproveOrdersWithoutReservationChangesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchDisapproveOrdersWithoutReservationChanges( + BatchDisapproveOrdersWithoutReservationChangesRequest $request, + array $callOptions = [] + ): BatchDisapproveOrdersWithoutReservationChangesResponse { + return $this->startApiCall('BatchDisapproveOrdersWithoutReservationChanges', $request, $callOptions)->wait(); + } + + /** + * Pauses a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchPauseOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_pause_orders.php + * + * @param BatchPauseOrdersRequest $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 BatchPauseOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchPauseOrders( + BatchPauseOrdersRequest $request, + array $callOptions = [] + ): BatchPauseOrdersResponse { + return $this->startApiCall('BatchPauseOrders', $request, $callOptions)->wait(); + } + + /** + * Resumes and overbooks a list of `Order` objects. + * + * The async variant is + * {@see OrderServiceClient::batchResumeAndOverbookOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_resume_and_overbook_orders.php + * + * @param BatchResumeAndOverbookOrdersRequest $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 BatchResumeAndOverbookOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchResumeAndOverbookOrders( + BatchResumeAndOverbookOrdersRequest $request, + array $callOptions = [] + ): BatchResumeAndOverbookOrdersResponse { + return $this->startApiCall('BatchResumeAndOverbookOrders', $request, $callOptions)->wait(); + } + + /** + * Resumes a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchResumeOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_resume_orders.php + * + * @param BatchResumeOrdersRequest $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 BatchResumeOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchResumeOrders( + BatchResumeOrdersRequest $request, + array $callOptions = [] + ): BatchResumeOrdersResponse { + return $this->startApiCall('BatchResumeOrders', $request, $callOptions)->wait(); + } + + /** + * Retracts a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchRetractOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_retract_orders.php + * + * @param BatchRetractOrdersRequest $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 BatchRetractOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchRetractOrders( + BatchRetractOrdersRequest $request, + array $callOptions = [] + ): BatchRetractOrdersResponse { + return $this->startApiCall('BatchRetractOrders', $request, $callOptions)->wait(); + } + + /** + * Retracts a list of `Order` objects without changing reservation status. + * + * The async variant is + * {@see OrderServiceClient::batchRetractOrdersWithoutReservationChangesAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_retract_orders_without_reservation_changes.php + * + * @param BatchRetractOrdersWithoutReservationChangesRequest $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 BatchRetractOrdersWithoutReservationChangesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchRetractOrdersWithoutReservationChanges( + BatchRetractOrdersWithoutReservationChangesRequest $request, + array $callOptions = [] + ): BatchRetractOrdersWithoutReservationChangesResponse { + return $this->startApiCall('BatchRetractOrdersWithoutReservationChanges', $request, $callOptions)->wait(); + } + + /** + * Submits a list of `Order` objects for approval. + * + * The async variant is + * {@see OrderServiceClient::batchSubmitOrdersForApprovalAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_submit_orders_for_approval.php + * + * @param BatchSubmitOrdersForApprovalRequest $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 BatchSubmitOrdersForApprovalResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchSubmitOrdersForApproval( + BatchSubmitOrdersForApprovalRequest $request, + array $callOptions = [] + ): BatchSubmitOrdersForApprovalResponse { + return $this->startApiCall('BatchSubmitOrdersForApproval', $request, $callOptions)->wait(); + } + + /** + * Submits and overbooks a list of `Order` objects for approval. + * + * The async variant is + * {@see OrderServiceClient::batchSubmitOrdersForApprovalAndOverbookAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_submit_orders_for_approval_and_overbook.php + * + * @param BatchSubmitOrdersForApprovalAndOverbookRequest $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 BatchSubmitOrdersForApprovalAndOverbookResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchSubmitOrdersForApprovalAndOverbook( + BatchSubmitOrdersForApprovalAndOverbookRequest $request, + array $callOptions = [] + ): BatchSubmitOrdersForApprovalAndOverbookResponse { + return $this->startApiCall('BatchSubmitOrdersForApprovalAndOverbook', $request, $callOptions)->wait(); + } + + /** + * Submits a list of `Order` objects for approval without changing reservation + * status. + * + * The async variant is + * {@see OrderServiceClient::batchSubmitOrdersForApprovalWithoutReservationChangesAsync()} + * . + * + * @example samples/V1/OrderServiceClient/batch_submit_orders_for_approval_without_reservation_changes.php + * + * @param BatchSubmitOrdersForApprovalWithoutReservationChangesRequest $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 BatchSubmitOrdersForApprovalWithoutReservationChangesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchSubmitOrdersForApprovalWithoutReservationChanges( + BatchSubmitOrdersForApprovalWithoutReservationChangesRequest $request, + array $callOptions = [] + ): BatchSubmitOrdersForApprovalWithoutReservationChangesResponse { + return $this->startApiCall( + 'BatchSubmitOrdersForApprovalWithoutReservationChanges', + $request, + $callOptions + )->wait(); + } + + /** + * Unarchives a list of `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchUnarchiveOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_unarchive_orders.php + * + * @param BatchUnarchiveOrdersRequest $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 BatchUnarchiveOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUnarchiveOrders( + BatchUnarchiveOrdersRequest $request, + array $callOptions = [] + ): BatchUnarchiveOrdersResponse { + return $this->startApiCall('BatchUnarchiveOrders', $request, $callOptions)->wait(); + } + + /** + * Batch updates `Order` objects. + * + * The async variant is {@see OrderServiceClient::batchUpdateOrdersAsync()} . + * + * @example samples/V1/OrderServiceClient/batch_update_orders.php + * + * @param BatchUpdateOrdersRequest $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 BatchUpdateOrdersResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateOrders( + BatchUpdateOrdersRequest $request, + array $callOptions = [] + ): BatchUpdateOrdersResponse { + return $this->startApiCall('BatchUpdateOrders', $request, $callOptions)->wait(); + } + /** * Retrieves an `Order` object. * diff --git a/AdsAdManager/src/V1/Client/ReportServiceClient.php b/AdsAdManager/src/V1/Client/ReportServiceClient.php index 83ee35d5475b..646db32d0523 100644 --- a/AdsAdManager/src/V1/Client/ReportServiceClient.php +++ b/AdsAdManager/src/V1/Client/ReportServiceClient.php @@ -319,7 +319,7 @@ public function __call($method, $args) } /** - * API to create a `Report` object. + * Creates a `Report` object. * * The async variant is {@see ReportServiceClient::createReportAsync()} . * @@ -376,7 +376,7 @@ public function fetchReportResultRows( } /** - * API to retrieve a `Report` object. + * Retrieves a `Report` object. * * The async variant is {@see ReportServiceClient::getReportAsync()} . * @@ -402,7 +402,7 @@ public function getReport(GetReportRequest $request, array $callOptions = []): R } /** - * API to retrieve a list of `Report` objects. + * Lists `Report` objects. * * The async variant is {@see ReportServiceClient::listReportsAsync()} . * @@ -461,7 +461,7 @@ public function runReport(RunReportRequest $request, array $callOptions = []): O } /** - * API to update a `Report` object. + * Updates a `Report` object. * * The async variant is {@see ReportServiceClient::updateReportAsync()} . * diff --git a/AdsAdManager/src/V1/Client/RoleServiceClient.php b/AdsAdManager/src/V1/Client/RoleServiceClient.php index d1e5043c4587..d48799bbc585 100644 --- a/AdsAdManager/src/V1/Client/RoleServiceClient.php +++ b/AdsAdManager/src/V1/Client/RoleServiceClient.php @@ -255,7 +255,7 @@ public function __call($method, $args) } /** - * API to retrieve a `Role` object. + * Retrieves a `Role` object. * * The async variant is {@see RoleServiceClient::getRoleAsync()} . * @@ -281,7 +281,7 @@ public function getRole(GetRoleRequest $request, array $callOptions = []): Role } /** - * API to retrieve a list of `Role` objects. + * Lists `Role` objects. * * The async variant is {@see RoleServiceClient::listRolesAsync()} . * diff --git a/AdsAdManager/src/V1/Client/SiteServiceClient.php b/AdsAdManager/src/V1/Client/SiteServiceClient.php index 939483cab94e..01010d70a7d4 100644 --- a/AdsAdManager/src/V1/Client/SiteServiceClient.php +++ b/AdsAdManager/src/V1/Client/SiteServiceClient.php @@ -271,7 +271,7 @@ public function __call($method, $args) } /** - * API to batch create `Site` objects. + * Creates `Site` objects. * * The async variant is {@see SiteServiceClient::batchCreateSitesAsync()} . * @@ -356,7 +356,7 @@ public function batchSubmitSitesForApproval( } /** - * API to batch update `Site` objects. + * Batch updates `Site` objects. * * The async variant is {@see SiteServiceClient::batchUpdateSitesAsync()} . * @@ -384,7 +384,7 @@ public function batchUpdateSites( } /** - * API to create a `Site` object. + * Creates a `Site` object. * * The async variant is {@see SiteServiceClient::createSiteAsync()} . * @@ -410,7 +410,7 @@ public function createSite(CreateSiteRequest $request, array $callOptions = []): } /** - * API to retrieve a `Site` object. + * Retrieves a `Site` object. * * The async variant is {@see SiteServiceClient::getSiteAsync()} . * @@ -436,7 +436,7 @@ public function getSite(GetSiteRequest $request, array $callOptions = []): Site } /** - * API to retrieve a list of `Site` objects. + * Lists `Site` objects. * * The async variant is {@see SiteServiceClient::listSitesAsync()} . * @@ -462,7 +462,7 @@ public function listSites(ListSitesRequest $request, array $callOptions = []): P } /** - * API to update a `Site` object. + * Updates a `Site` object. * * The async variant is {@see SiteServiceClient::updateSiteAsync()} . * diff --git a/AdsAdManager/src/V1/Client/SlateServiceClient.php b/AdsAdManager/src/V1/Client/SlateServiceClient.php new file mode 100644 index 000000000000..0cc700404897 --- /dev/null +++ b/AdsAdManager/src/V1/Client/SlateServiceClient.php @@ -0,0 +1,488 @@ + batchArchiveSlatesAsync(BatchArchiveSlatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchCreateSlatesAsync(BatchCreateSlatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUnarchiveSlatesAsync(BatchUnarchiveSlatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateSlatesAsync(BatchUpdateSlatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSlateAsync(CreateSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSlateAsync(GetSlateRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSlatesAsync(ListSlatesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSlateAsync(UpdateSlateRequest $request, array $optionalArgs = []) + */ +final class SlateServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.ads.admanager.v1.SlateService'; + + /** + * 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', + 'https://www.googleapis.com/auth/admanager.readonly', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/slate_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/slate_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/slate_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 slate + * resource. + * + * @param string $networkCode + * @param string $slate + * + * @return string The formatted slate resource. + */ + public static function slateName(string $networkCode, string $slate): string + { + return self::getPathTemplate('slate')->render([ + 'network_code' => $networkCode, + 'slate' => $slate, + ]); + } + + /** + * 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} + * - slate: networks/{network_code}/slates/{slate} + * + * 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\SlateServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SlateServiceClient(['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); + } + + /** + * Batch archives `Slate` objects. + * + * The async variant is {@see SlateServiceClient::batchArchiveSlatesAsync()} . + * + * @example samples/V1/SlateServiceClient/batch_archive_slates.php + * + * @param BatchArchiveSlatesRequest $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 BatchArchiveSlatesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchArchiveSlates( + BatchArchiveSlatesRequest $request, + array $callOptions = [] + ): BatchArchiveSlatesResponse { + return $this->startApiCall('BatchArchiveSlates', $request, $callOptions)->wait(); + } + + /** + * Batch creates `Slate` objects. + * + * The async variant is {@see SlateServiceClient::batchCreateSlatesAsync()} . + * + * @example samples/V1/SlateServiceClient/batch_create_slates.php + * + * @param BatchCreateSlatesRequest $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 BatchCreateSlatesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCreateSlates( + BatchCreateSlatesRequest $request, + array $callOptions = [] + ): BatchCreateSlatesResponse { + return $this->startApiCall('BatchCreateSlates', $request, $callOptions)->wait(); + } + + /** + * Batch unarchives `Slate` objects. + * + * The async variant is {@see SlateServiceClient::batchUnarchiveSlatesAsync()} . + * + * @example samples/V1/SlateServiceClient/batch_unarchive_slates.php + * + * @param BatchUnarchiveSlatesRequest $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 BatchUnarchiveSlatesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUnarchiveSlates( + BatchUnarchiveSlatesRequest $request, + array $callOptions = [] + ): BatchUnarchiveSlatesResponse { + return $this->startApiCall('BatchUnarchiveSlates', $request, $callOptions)->wait(); + } + + /** + * Batch updates `Slate` objects. + * + * The async variant is {@see SlateServiceClient::batchUpdateSlatesAsync()} . + * + * @example samples/V1/SlateServiceClient/batch_update_slates.php + * + * @param BatchUpdateSlatesRequest $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 BatchUpdateSlatesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateSlates( + BatchUpdateSlatesRequest $request, + array $callOptions = [] + ): BatchUpdateSlatesResponse { + return $this->startApiCall('BatchUpdateSlates', $request, $callOptions)->wait(); + } + + /** + * Creates a `Slate` object. + * + * The async variant is {@see SlateServiceClient::createSlateAsync()} . + * + * @example samples/V1/SlateServiceClient/create_slate.php + * + * @param CreateSlateRequest $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 Slate + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSlate(CreateSlateRequest $request, array $callOptions = []): Slate + { + return $this->startApiCall('CreateSlate', $request, $callOptions)->wait(); + } + + /** + * Retrieves a `Slate` object. + * + * The async variant is {@see SlateServiceClient::getSlateAsync()} . + * + * @example samples/V1/SlateServiceClient/get_slate.php + * + * @param GetSlateRequest $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 Slate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSlate(GetSlateRequest $request, array $callOptions = []): Slate + { + return $this->startApiCall('GetSlate', $request, $callOptions)->wait(); + } + + /** + * Lists `Slate` objects. + * + * The async variant is {@see SlateServiceClient::listSlatesAsync()} . + * + * @example samples/V1/SlateServiceClient/list_slates.php + * + * @param ListSlatesRequest $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 listSlates(ListSlatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSlates', $request, $callOptions); + } + + /** + * Updates a `Slate` object. + * + * The async variant is {@see SlateServiceClient::updateSlateAsync()} . + * + * @example samples/V1/SlateServiceClient/update_slate.php + * + * @param UpdateSlateRequest $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 Slate + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSlate(UpdateSlateRequest $request, array $callOptions = []): Slate + { + return $this->startApiCall('UpdateSlate', $request, $callOptions)->wait(); + } +} diff --git a/AdsAdManager/src/V1/Client/TargetingPresetServiceClient.php b/AdsAdManager/src/V1/Client/TargetingPresetServiceClient.php index bc3eca1cc6c2..895fd57916ff 100644 --- a/AdsAdManager/src/V1/Client/TargetingPresetServiceClient.php +++ b/AdsAdManager/src/V1/Client/TargetingPresetServiceClient.php @@ -28,10 +28,13 @@ use Google\Ads\AdManager\V1\BatchCreateTargetingPresetsResponse; use Google\Ads\AdManager\V1\BatchDeactivateTargetingPresetsRequest; use Google\Ads\AdManager\V1\BatchDeactivateTargetingPresetsResponse; +use Google\Ads\AdManager\V1\BatchUpdateTargetingPresetsRequest; +use Google\Ads\AdManager\V1\BatchUpdateTargetingPresetsResponse; use Google\Ads\AdManager\V1\CreateTargetingPresetRequest; use Google\Ads\AdManager\V1\GetTargetingPresetRequest; use Google\Ads\AdManager\V1\ListTargetingPresetsRequest; use Google\Ads\AdManager\V1\TargetingPreset; +use Google\Ads\AdManager\V1\UpdateTargetingPresetRequest; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\GapicClientTrait; @@ -58,9 +61,11 @@ * * @method PromiseInterface batchCreateTargetingPresetsAsync(BatchCreateTargetingPresetsRequest $request, array $optionalArgs = []) * @method PromiseInterface batchDeactivateTargetingPresetsAsync(BatchDeactivateTargetingPresetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchUpdateTargetingPresetsAsync(BatchUpdateTargetingPresetsRequest $request, array $optionalArgs = []) * @method PromiseInterface createTargetingPresetAsync(CreateTargetingPresetRequest $request, array $optionalArgs = []) * @method PromiseInterface getTargetingPresetAsync(GetTargetingPresetRequest $request, array $optionalArgs = []) * @method PromiseInterface listTargetingPresetsAsync(ListTargetingPresetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateTargetingPresetAsync(UpdateTargetingPresetRequest $request, array $optionalArgs = []) */ final class TargetingPresetServiceClient { @@ -698,6 +703,35 @@ public function batchDeactivateTargetingPresets( return $this->startApiCall('BatchDeactivateTargetingPresets', $request, $callOptions)->wait(); } + /** + * Batch updates `TargetingPreset` objects. + * + * The async variant is + * {@see TargetingPresetServiceClient::batchUpdateTargetingPresetsAsync()} . + * + * @example samples/V1/TargetingPresetServiceClient/batch_update_targeting_presets.php + * + * @param BatchUpdateTargetingPresetsRequest $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 BatchUpdateTargetingPresetsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchUpdateTargetingPresets( + BatchUpdateTargetingPresetsRequest $request, + array $callOptions = [] + ): BatchUpdateTargetingPresetsResponse { + return $this->startApiCall('BatchUpdateTargetingPresets', $request, $callOptions)->wait(); + } + /** * Creates a `TargetingPreset` object. * @@ -785,4 +819,33 @@ public function listTargetingPresets( ): PagedListResponse { return $this->startApiCall('ListTargetingPresets', $request, $callOptions); } + + /** + * Updates a `TargetingPreset` object. + * + * The async variant is + * {@see TargetingPresetServiceClient::updateTargetingPresetAsync()} . + * + * @example samples/V1/TargetingPresetServiceClient/update_targeting_preset.php + * + * @param UpdateTargetingPresetRequest $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 TargetingPreset + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateTargetingPreset( + UpdateTargetingPresetRequest $request, + array $callOptions = [] + ): TargetingPreset { + return $this->startApiCall('UpdateTargetingPreset', $request, $callOptions)->wait(); + } } diff --git a/AdsAdManager/src/V1/Client/TeamServiceClient.php b/AdsAdManager/src/V1/Client/TeamServiceClient.php index 4463365d45c2..6c5ed05588e3 100644 --- a/AdsAdManager/src/V1/Client/TeamServiceClient.php +++ b/AdsAdManager/src/V1/Client/TeamServiceClient.php @@ -271,7 +271,7 @@ public function __call($method, $args) } /** - * API to batch activate `Team` objects. + * Batch activates `Team` objects. * * The async variant is {@see TeamServiceClient::batchActivateTeamsAsync()} . * @@ -299,7 +299,7 @@ public function batchActivateTeams( } /** - * API to batch create `Team` objects. + * Creates `Team` objects. * * The async variant is {@see TeamServiceClient::batchCreateTeamsAsync()} . * @@ -327,7 +327,7 @@ public function batchCreateTeams( } /** - * API to batch deactivate `Team` objects. + * Batch deactivates `Team` objects. * * The async variant is {@see TeamServiceClient::batchDeactivateTeamsAsync()} . * @@ -355,7 +355,7 @@ public function batchDeactivateTeams( } /** - * API to batch update `Team` objects. + * Batch updates `Team` objects. * * The async variant is {@see TeamServiceClient::batchUpdateTeamsAsync()} . * @@ -383,7 +383,7 @@ public function batchUpdateTeams( } /** - * API to create a `Team` object. + * Creates a `Team` object. * * The async variant is {@see TeamServiceClient::createTeamAsync()} . * @@ -409,7 +409,7 @@ public function createTeam(CreateTeamRequest $request, array $callOptions = []): } /** - * API to retrieve a `Team` object. + * Retrieves a `Team` object. * * The async variant is {@see TeamServiceClient::getTeamAsync()} . * @@ -435,7 +435,7 @@ public function getTeam(GetTeamRequest $request, array $callOptions = []): Team } /** - * API to retrieve a list of `Team` objects. + * Lists `Team` objects. * * The async variant is {@see TeamServiceClient::listTeamsAsync()} . * @@ -461,7 +461,7 @@ public function listTeams(ListTeamsRequest $request, array $callOptions = []): P } /** - * API to update a `Team` object. + * Updates a `Team` object. * * The async variant is {@see TeamServiceClient::updateTeamAsync()} . * diff --git a/AdsAdManager/src/V1/Client/ThirdPartyCompanyServiceClient.php b/AdsAdManager/src/V1/Client/ThirdPartyCompanyServiceClient.php index 9866e82c29a9..fdc6b18cf257 100644 --- a/AdsAdManager/src/V1/Client/ThirdPartyCompanyServiceClient.php +++ b/AdsAdManager/src/V1/Client/ThirdPartyCompanyServiceClient.php @@ -257,7 +257,7 @@ public function __call($method, $args) } /** - * API to retrieve a `ThirdPartyCompany` object. + * Retrieves a `ThirdPartyCompany` object. * * The async variant is * {@see ThirdPartyCompanyServiceClient::getThirdPartyCompanyAsync()} . @@ -286,7 +286,7 @@ public function getThirdPartyCompany( } /** - * API to retrieve a list of `ThirdPartyCompany` objects. + * Lists `ThirdPartyCompany` objects. * * The async variant is * {@see ThirdPartyCompanyServiceClient::listThirdPartyCompaniesAsync()} . diff --git a/AdsAdManager/src/V1/Client/UserServiceClient.php b/AdsAdManager/src/V1/Client/UserServiceClient.php index e7cdcdaa19a8..157a414c0701 100644 --- a/AdsAdManager/src/V1/Client/UserServiceClient.php +++ b/AdsAdManager/src/V1/Client/UserServiceClient.php @@ -236,7 +236,7 @@ public function __call($method, $args) } /** - * API to retrieve a User object. + * Retrieves a `User` object. * * To get the current user, the resource name * `networks/{networkCode}/users/me` can be used. diff --git a/AdsAdManager/src/V1/CompanionDeliveryOptionEnum.php b/AdsAdManager/src/V1/CompanionDeliveryOptionEnum.php new file mode 100644 index 000000000000..4a60de268fe2 --- /dev/null +++ b/AdsAdManager/src/V1/CompanionDeliveryOptionEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CompanionDeliveryOptionEnum + */ +class CompanionDeliveryOptionEnum 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\DeliveryEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CompanionDeliveryOptionEnum/CompanionDeliveryOption.php b/AdsAdManager/src/V1/CompanionDeliveryOptionEnum/CompanionDeliveryOption.php new file mode 100644 index 000000000000..27be4862b462 --- /dev/null +++ b/AdsAdManager/src/V1/CompanionDeliveryOptionEnum/CompanionDeliveryOption.php @@ -0,0 +1,73 @@ +google.ads.admanager.v1.CompanionDeliveryOptionEnum.CompanionDeliveryOption + */ +class CompanionDeliveryOption +{ + /** + * No value specified. + * + * Generated from protobuf enum COMPANION_DELIVERY_OPTION_UNSPECIFIED = 0; + */ + const COMPANION_DELIVERY_OPTION_UNSPECIFIED = 0; + /** + * Companions are not required to serve a + * [CreativeSet][google.ads.admanager.v1.CreativeSet]. The creative set can + * serve to inventory that has zero or more matching companions. + * + * Generated from protobuf enum OPTIONAL = 1; + */ + const OPTIONAL = 1; + /** + * At least one companion must be served in order for the creative set to be + * used. + * + * Generated from protobuf enum AT_LEAST_ONE = 2; + */ + const AT_LEAST_ONE = 2; + /** + * All companions in the set must be served in order for the creative set to + * be used. This can still serve to inventory that has more companions than + * can be filled. + * + * Generated from protobuf enum ALL = 3; + */ + const ALL = 3; + + private static $valueToName = [ + self::COMPANION_DELIVERY_OPTION_UNSPECIFIED => 'COMPANION_DELIVERY_OPTION_UNSPECIFIED', + self::OPTIONAL => 'OPTIONAL', + self::AT_LEAST_ONE => 'AT_LEAST_ONE', + self::ALL => 'ALL', + ]; + + 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/CreateCreativeSetRequest.php b/AdsAdManager/src/V1/CreateCreativeSetRequest.php new file mode 100644 index 000000000000..3a488d518875 --- /dev/null +++ b/AdsAdManager/src/V1/CreateCreativeSetRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateCreativeSetRequest + */ +class CreateCreativeSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `CreativeSet` 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 `CreativeSet` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeSet creative_set = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $creative_set = null; + + /** + * @param string $parent Required. The parent resource where this `CreativeSet` will be created. + * Format: `networks/{network_code}` + * Please see {@see CreativeSetServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\CreativeSet $creativeSet Required. The `CreativeSet` to create. + * + * @return \Google\Ads\AdManager\V1\CreateCreativeSetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\CreativeSet $creativeSet): self + { + return (new self()) + ->setParent($parent) + ->setCreativeSet($creativeSet); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `CreativeSet` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\CreativeSet $creative_set + * Required. The `CreativeSet` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeSetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `CreativeSet` 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 `CreativeSet` 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 `CreativeSet` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeSet creative_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\CreativeSet|null + */ + public function getCreativeSet() + { + return $this->creative_set; + } + + public function hasCreativeSet() + { + return isset($this->creative_set); + } + + public function clearCreativeSet() + { + unset($this->creative_set); + } + + /** + * Required. The `CreativeSet` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeSet creative_set = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CreativeSet $var + * @return $this + */ + public function setCreativeSet($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CreativeSet::class); + $this->creative_set = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateOrderRequest.php b/AdsAdManager/src/V1/CreateOrderRequest.php new file mode 100644 index 000000000000..6b54be16dbe7 --- /dev/null +++ b/AdsAdManager/src/V1/CreateOrderRequest.php @@ -0,0 +1,115 @@ +google.ads.admanager.v1.CreateOrderRequest + */ +class CreateOrderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this Order 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 `Order` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $order = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this Order will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\Order $order + * Required. The `Order` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this Order 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 Order 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 `Order` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Order|null + */ + public function getOrder() + { + return $this->order; + } + + public function hasOrder() + { + return isset($this->order); + } + + public function clearOrder() + { + unset($this->order); + } + + /** + * Required. The `Order` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Order order = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Order $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Order::class); + $this->order = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreateSlateRequest.php b/AdsAdManager/src/V1/CreateSlateRequest.php new file mode 100644 index 000000000000..153ba7a34b9f --- /dev/null +++ b/AdsAdManager/src/V1/CreateSlateRequest.php @@ -0,0 +1,132 @@ +google.ads.admanager.v1.CreateSlateRequest + */ +class CreateSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this `Slate` 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 `Slate` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Slate slate = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate = null; + + /** + * @param string $parent Required. The parent resource where this `Slate` will be created. + * Format: `networks/{network_code}` + * Please see {@see SlateServiceClient::networkName()} for help formatting this field. + * @param \Google\Ads\AdManager\V1\Slate $slate Required. The `Slate` to create. + * + * @return \Google\Ads\AdManager\V1\CreateSlateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Ads\AdManager\V1\Slate $slate): self + { + return (new self()) + ->setParent($parent) + ->setSlate($slate); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this `Slate` will be created. + * Format: `networks/{network_code}` + * @type \Google\Ads\AdManager\V1\Slate $slate + * Required. The `Slate` to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this `Slate` 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 `Slate` 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 `Slate` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Slate slate = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Slate|null + */ + public function getSlate() + { + return $this->slate; + } + + public function hasSlate() + { + return isset($this->slate); + } + + public function clearSlate() + { + unset($this->slate); + } + + /** + * Required. The `Slate` to create. + * + * Generated from protobuf field .google.ads.admanager.v1.Slate slate = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Slate $var + * @return $this + */ + public function setSlate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Slate::class); + $this->slate = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/Creative.php b/AdsAdManager/src/V1/Creative.php new file mode 100644 index 000000000000..0beb3e44ebce --- /dev/null +++ b/AdsAdManager/src/V1/Creative.php @@ -0,0 +1,119 @@ +google.ads.admanager.v1.Creative + */ +class Creative extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the Creative. + * Format: `networks/{network_code}/creatives/{creative_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. Display name of the `Creative`. This attribute has a maximum + * length of 255 characters. + * + * Generated from protobuf field optional string display_name = 8 [(.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 Creative. + * Format: `networks/{network_code}/creatives/{creative_id}` + * @type string $display_name + * Required. Display name of the `Creative`. This attribute has a maximum + * length of 255 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the Creative. + * Format: `networks/{network_code}/creatives/{creative_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. + * Format: `networks/{network_code}/creatives/{creative_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. Display name of the `Creative`. This attribute has a maximum + * length of 255 characters. + * + * Generated from protobuf field optional string display_name = 8 [(.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 `Creative`. This attribute has a maximum + * length of 255 characters. + * + * Generated from protobuf field optional string display_name = 8 [(.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/CreativePlaceholder.php b/AdsAdManager/src/V1/CreativePlaceholder.php new file mode 100644 index 000000000000..e7eeb054a788 --- /dev/null +++ b/AdsAdManager/src/V1/CreativePlaceholder.php @@ -0,0 +1,331 @@ +google.ads.admanager.v1.CreativePlaceholder + */ +class CreativePlaceholder extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The size that the creative is expected to have. + * + * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $size = null; + /** + * Optional. The companions that the creative is expected to have. This + * attribute can only be set if the line item it belongs to has an + * [EnvironmentType][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType] + * of VIDEO_PLAYER or + * [roadblocking_type][google.ads.admanager.v1.LineItem.roadblocking_type] of + * CREATIVE_SET. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativePlaceholderCompanion companions = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $companions; + /** + * Optional. Non-empty default. Expected number of creatives that will be + * uploaded corresponding to this creative placeholder. This estimate is used + * to improve the accuracy of forecasting; for example, if label frequency + * capping limits the number of times a creative may be served. By default, + * the expected creative count is set to 1. + * + * Generated from protobuf field optional int32 expected_creative_count = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $expected_creative_count = null; + /** + * Optional. Set of labels applied directly to this CreativePlaceholder. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $applied_labels; + /** + * Optional. Non-empty default. Indicates if the expected creative of this + * placeholder has an AMP only variant. This is used to improve the accuracy + * of forecasting and has no effect on serving. By default, the value is + * false. + * + * Generated from protobuf field optional bool amp_only = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $amp_only = null; + /** + * Optional. The display name of the creative targeting that this + * CreativePlaceholder represents. + * + * Generated from protobuf field optional string creative_targeting_display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $creative_targeting_display_name = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Size $size + * Required. The size that the creative is expected to have. + * @type \Google\Ads\AdManager\V1\CreativePlaceholderCompanion[] $companions + * Optional. The companions that the creative is expected to have. This + * attribute can only be set if the line item it belongs to has an + * [EnvironmentType][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType] + * of VIDEO_PLAYER or + * [roadblocking_type][google.ads.admanager.v1.LineItem.roadblocking_type] of + * CREATIVE_SET. + * @type int $expected_creative_count + * Optional. Non-empty default. Expected number of creatives that will be + * uploaded corresponding to this creative placeholder. This estimate is used + * to improve the accuracy of forecasting; for example, if label frequency + * capping limits the number of times a creative may be served. By default, + * the expected creative count is set to 1. + * @type \Google\Ads\AdManager\V1\AppliedLabel[] $applied_labels + * Optional. Set of labels applied directly to this CreativePlaceholder. + * @type bool $amp_only + * Optional. Non-empty default. Indicates if the expected creative of this + * placeholder has an AMP only variant. This is used to improve the accuracy + * of forecasting and has no effect on serving. By default, the value is + * false. + * @type string $creative_targeting_display_name + * Optional. The display name of the creative targeting that this + * CreativePlaceholder represents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativePlaceholder::initOnce(); + parent::__construct($data); + } + + /** + * Required. The size that the creative is expected to have. + * + * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Size|null + */ + public function getSize() + { + return $this->size; + } + + public function hasSize() + { + return isset($this->size); + } + + public function clearSize() + { + unset($this->size); + } + + /** + * Required. The size that the creative is expected to have. + * + * Generated from protobuf field .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Size $var + * @return $this + */ + public function setSize($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Size::class); + $this->size = $var; + + return $this; + } + + /** + * Optional. The companions that the creative is expected to have. This + * attribute can only be set if the line item it belongs to has an + * [EnvironmentType][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType] + * of VIDEO_PLAYER or + * [roadblocking_type][google.ads.admanager.v1.LineItem.roadblocking_type] of + * CREATIVE_SET. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativePlaceholderCompanion companions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Ads\AdManager\V1\CreativePlaceholderCompanion> + */ + public function getCompanions() + { + return $this->companions; + } + + /** + * Optional. The companions that the creative is expected to have. This + * attribute can only be set if the line item it belongs to has an + * [EnvironmentType][google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType] + * of VIDEO_PLAYER or + * [roadblocking_type][google.ads.admanager.v1.LineItem.roadblocking_type] of + * CREATIVE_SET. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativePlaceholderCompanion companions = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CreativePlaceholderCompanion[] $var + * @return $this + */ + public function setCompanions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreativePlaceholderCompanion::class); + $this->companions = $arr; + + return $this; + } + + /** + * Optional. Non-empty default. Expected number of creatives that will be + * uploaded corresponding to this creative placeholder. This estimate is used + * to improve the accuracy of forecasting; for example, if label frequency + * capping limits the number of times a creative may be served. By default, + * the expected creative count is set to 1. + * + * Generated from protobuf field optional int32 expected_creative_count = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getExpectedCreativeCount() + { + return isset($this->expected_creative_count) ? $this->expected_creative_count : 0; + } + + public function hasExpectedCreativeCount() + { + return isset($this->expected_creative_count); + } + + public function clearExpectedCreativeCount() + { + unset($this->expected_creative_count); + } + + /** + * Optional. Non-empty default. Expected number of creatives that will be + * uploaded corresponding to this creative placeholder. This estimate is used + * to improve the accuracy of forecasting; for example, if label frequency + * capping limits the number of times a creative may be served. By default, + * the expected creative count is set to 1. + * + * Generated from protobuf field optional int32 expected_creative_count = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setExpectedCreativeCount($var) + { + GPBUtil::checkInt32($var); + $this->expected_creative_count = $var; + + return $this; + } + + /** + * Optional. Set of labels applied directly to this CreativePlaceholder. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Ads\AdManager\V1\AppliedLabel> + */ + public function getAppliedLabels() + { + return $this->applied_labels; + } + + /** + * Optional. Set of labels applied directly to this CreativePlaceholder. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\AppliedLabel[] $var + * @return $this + */ + public function setAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->applied_labels = $arr; + + return $this; + } + + /** + * Optional. Non-empty default. Indicates if the expected creative of this + * placeholder has an AMP only variant. This is used to improve the accuracy + * of forecasting and has no effect on serving. By default, the value is + * false. + * + * Generated from protobuf field optional bool amp_only = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return bool + */ + public function getAmpOnly() + { + return isset($this->amp_only) ? $this->amp_only : false; + } + + public function hasAmpOnly() + { + return isset($this->amp_only); + } + + public function clearAmpOnly() + { + unset($this->amp_only); + } + + /** + * Optional. Non-empty default. Indicates if the expected creative of this + * placeholder has an AMP only variant. This is used to improve the accuracy + * of forecasting and has no effect on serving. By default, the value is + * false. + * + * Generated from protobuf field optional bool amp_only = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param bool $var + * @return $this + */ + public function setAmpOnly($var) + { + GPBUtil::checkBool($var); + $this->amp_only = $var; + + return $this; + } + + /** + * Optional. The display name of the creative targeting that this + * CreativePlaceholder represents. + * + * Generated from protobuf field optional string creative_targeting_display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCreativeTargetingDisplayName() + { + return isset($this->creative_targeting_display_name) ? $this->creative_targeting_display_name : ''; + } + + public function hasCreativeTargetingDisplayName() + { + return isset($this->creative_targeting_display_name); + } + + public function clearCreativeTargetingDisplayName() + { + unset($this->creative_targeting_display_name); + } + + /** + * Optional. The display name of the creative targeting that this + * CreativePlaceholder represents. + * + * Generated from protobuf field optional string creative_targeting_display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCreativeTargetingDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->creative_targeting_display_name = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreativePlaceholderCompanion.php b/AdsAdManager/src/V1/CreativePlaceholderCompanion.php new file mode 100644 index 000000000000..b0a81b07d548 --- /dev/null +++ b/AdsAdManager/src/V1/CreativePlaceholderCompanion.php @@ -0,0 +1,82 @@ +google.ads.admanager.v1.CreativePlaceholderCompanion + */ +class CreativePlaceholderCompanion extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The size of the companion to a + * [CreativePlaceholder][google.ads.admanager.v1.CreativePlaceholder]. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $size = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Size $size + * Required. The size of the companion to a + * [CreativePlaceholder][google.ads.admanager.v1.CreativePlaceholder]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativePlaceholder::initOnce(); + parent::__construct($data); + } + + /** + * Required. The size of the companion to a + * [CreativePlaceholder][google.ads.admanager.v1.CreativePlaceholder]. + * + * 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() + { + return $this->size; + } + + public function hasSize() + { + return isset($this->size); + } + + public function clearSize() + { + unset($this->size); + } + + /** + * Required. The size of the companion to a + * [CreativePlaceholder][google.ads.admanager.v1.CreativePlaceholder]. + * + * 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 + */ + public function setSize($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Size::class); + $this->size = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreativeRotationTypeEnum.php b/AdsAdManager/src/V1/CreativeRotationTypeEnum.php new file mode 100644 index 000000000000..c38357e92b2c --- /dev/null +++ b/AdsAdManager/src/V1/CreativeRotationTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CreativeRotationTypeEnum + */ +class CreativeRotationTypeEnum 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\DeliveryEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CreativeRotationTypeEnum/CreativeRotationType.php b/AdsAdManager/src/V1/CreativeRotationTypeEnum/CreativeRotationType.php new file mode 100644 index 000000000000..57ba1cad0fbd --- /dev/null +++ b/AdsAdManager/src/V1/CreativeRotationTypeEnum/CreativeRotationType.php @@ -0,0 +1,79 @@ +google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType + */ +class CreativeRotationType +{ + /** + * No value specified. + * + * Generated from protobuf enum CREATIVE_ROTATION_TYPE_UNSPECIFIED = 0; + */ + const CREATIVE_ROTATION_TYPE_UNSPECIFIED = 0; + /** + * Creatives are displayed approximately the same number of times over the + * duration of the line item. + * + * Generated from protobuf enum EVENLY = 1; + */ + const EVENLY = 1; + /** + * Creatives are served approximately proportionally to their performance. + * + * Generated from protobuf enum OPTIMIZED = 2; + */ + const OPTIMIZED = 2; + /** + * Creatives are served exactly in sequential order, aka Storyboarding. Set + * on the LineItemCreativeAssociation. + * + * Generated from protobuf enum SEQUENTIAL = 4; + */ + const SEQUENTIAL = 4; + /** + * Creatives are served approximately proportionally to their weights, set + * on the LineItemCreativeAssociation. + * + * Generated from protobuf enum WEIGHTED = 3; + */ + const WEIGHTED = 3; + + private static $valueToName = [ + self::CREATIVE_ROTATION_TYPE_UNSPECIFIED => 'CREATIVE_ROTATION_TYPE_UNSPECIFIED', + self::EVENLY => 'EVENLY', + self::OPTIMIZED => 'OPTIMIZED', + self::SEQUENTIAL => 'SEQUENTIAL', + self::WEIGHTED => 'WEIGHTED', + ]; + + 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/CreativeSet.php b/AdsAdManager/src/V1/CreativeSet.php new file mode 100644 index 000000000000..74ba49041f26 --- /dev/null +++ b/AdsAdManager/src/V1/CreativeSet.php @@ -0,0 +1,254 @@ +google.ads.admanager.v1.CreativeSet + */ +class CreativeSet extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `CreativeSet`. + * Format: `networks/{network_code}/creativeSets/{creative_set_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the `CreativeSet`. This attribute has a maximum + * length of 255 characters. + * + * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = null; + /** + * Required. Immutable. The master + * [Creative](google.ads.admanager.v1.Creative) to which the `CreativeSet` is + * associated. + * + * Generated from protobuf field optional string master_creative = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $master_creative = null; + /** + * Required. The resource names of the companion `Creative`s associated with + * this `CreativeSet`. Format: `networks/{network_code}/creatives/{creative}` + * + * Generated from protobuf field repeated string companion_creatives = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $companion_creatives; + /** + * Output only. The time this `CreativeSet` was last modified. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `CreativeSet`. + * Format: `networks/{network_code}/creativeSets/{creative_set_id}` + * @type string $display_name + * Required. The name of the `CreativeSet`. This attribute has a maximum + * length of 255 characters. + * @type string $master_creative + * Required. Immutable. The master + * [Creative](google.ads.admanager.v1.Creative) to which the `CreativeSet` is + * associated. + * @type string[] $companion_creatives + * Required. The resource names of the companion `Creative`s associated with + * this `CreativeSet`. Format: `networks/{network_code}/creatives/{creative}` + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this `CreativeSet` was last modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeSetMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `CreativeSet`. + * Format: `networks/{network_code}/creativeSets/{creative_set_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 `CreativeSet`. + * Format: `networks/{network_code}/creativeSets/{creative_set_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 `CreativeSet`. This attribute has a maximum + * length of 255 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 `CreativeSet`. This attribute has a maximum + * length of 255 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 master + * [Creative](google.ads.admanager.v1.Creative) to which the `CreativeSet` is + * associated. + * + * Generated from protobuf field optional string master_creative = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getMasterCreative() + { + return isset($this->master_creative) ? $this->master_creative : ''; + } + + public function hasMasterCreative() + { + return isset($this->master_creative); + } + + public function clearMasterCreative() + { + unset($this->master_creative); + } + + /** + * Required. Immutable. The master + * [Creative](google.ads.admanager.v1.Creative) to which the `CreativeSet` is + * associated. + * + * Generated from protobuf field optional string master_creative = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMasterCreative($var) + { + GPBUtil::checkString($var, True); + $this->master_creative = $var; + + return $this; + } + + /** + * Required. The resource names of the companion `Creative`s associated with + * this `CreativeSet`. Format: `networks/{network_code}/creatives/{creative}` + * + * Generated from protobuf field repeated string companion_creatives = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getCompanionCreatives() + { + return $this->companion_creatives; + } + + /** + * Required. The resource names of the companion `Creative`s associated with + * this `CreativeSet`. Format: `networks/{network_code}/creatives/{creative}` + * + * Generated from protobuf field repeated string companion_creatives = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setCompanionCreatives($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->companion_creatives = $arr; + + return $this; + } + + /** + * Output only. The time this `CreativeSet` was last modified. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time this `CreativeSet` was last modified. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CreativeTargeting.php b/AdsAdManager/src/V1/CreativeTargeting.php new file mode 100644 index 000000000000..c1de88a05bbd --- /dev/null +++ b/AdsAdManager/src/V1/CreativeTargeting.php @@ -0,0 +1,125 @@ +google.ads.admanager.v1.CreativeTargeting + */ +class CreativeTargeting extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of this creative targeting. This attribute is required. + * + * Generated from protobuf field optional string creative_targeting_display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $creative_targeting_display_name = null; + /** + * Required. The Targeting criteria of this creative targeting. This attribute + * is required. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Targeting targeting = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $targeting = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $creative_targeting_display_name + * Required. The name of this creative targeting. This attribute is required. + * @type \Google\Ads\AdManager\V1\Targeting $targeting + * Required. The Targeting criteria of this creative targeting. This attribute + * is required. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeTargeting::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of this creative targeting. This attribute is required. + * + * Generated from protobuf field optional string creative_targeting_display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCreativeTargetingDisplayName() + { + return isset($this->creative_targeting_display_name) ? $this->creative_targeting_display_name : ''; + } + + public function hasCreativeTargetingDisplayName() + { + return isset($this->creative_targeting_display_name); + } + + public function clearCreativeTargetingDisplayName() + { + unset($this->creative_targeting_display_name); + } + + /** + * Required. The name of this creative targeting. This attribute is required. + * + * Generated from protobuf field optional string creative_targeting_display_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCreativeTargetingDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->creative_targeting_display_name = $var; + + return $this; + } + + /** + * Required. The Targeting criteria of this creative targeting. This attribute + * is required. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Targeting targeting = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Targeting|null + */ + public function getTargeting() + { + return $this->targeting; + } + + public function hasTargeting() + { + return isset($this->targeting); + } + + public function clearTargeting() + { + unset($this->targeting); + } + + /** + * Required. The Targeting criteria of this creative targeting. This attribute + * is required. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Targeting targeting = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Targeting $var + * @return $this + */ + public function setTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Targeting::class); + $this->targeting = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomPacingCurve.php b/AdsAdManager/src/V1/CustomPacingCurve.php new file mode 100644 index 000000000000..1f6d596411d9 --- /dev/null +++ b/AdsAdManager/src/V1/CustomPacingCurve.php @@ -0,0 +1,120 @@ +google.ads.admanager.v1.CustomPacingCurve + */ +class CustomPacingCurve extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unit of the + * [CustomPacingGoal.amount][google.ads.admanager.v1.CustomPacingGoal.amount] + * values. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomPacingGoalUnitEnum.CustomPacingGoalUnit custom_pacing_goal_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $custom_pacing_goal_unit = null; + /** + * Required. The list of goals that make up the custom pacing curve. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomPacingGoal custom_pacing_goals = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $custom_pacing_goals; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $custom_pacing_goal_unit + * Required. The unit of the + * [CustomPacingGoal.amount][google.ads.admanager.v1.CustomPacingGoal.amount] + * values. + * @type \Google\Ads\AdManager\V1\CustomPacingGoal[] $custom_pacing_goals + * Required. The list of goals that make up the custom pacing curve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomPacingCurve::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unit of the + * [CustomPacingGoal.amount][google.ads.admanager.v1.CustomPacingGoal.amount] + * values. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomPacingGoalUnitEnum.CustomPacingGoalUnit custom_pacing_goal_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCustomPacingGoalUnit() + { + return isset($this->custom_pacing_goal_unit) ? $this->custom_pacing_goal_unit : 0; + } + + public function hasCustomPacingGoalUnit() + { + return isset($this->custom_pacing_goal_unit); + } + + public function clearCustomPacingGoalUnit() + { + unset($this->custom_pacing_goal_unit); + } + + /** + * Required. The unit of the + * [CustomPacingGoal.amount][google.ads.admanager.v1.CustomPacingGoal.amount] + * values. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomPacingGoalUnitEnum.CustomPacingGoalUnit custom_pacing_goal_unit = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCustomPacingGoalUnit($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CustomPacingGoalUnitEnum\CustomPacingGoalUnit::class); + $this->custom_pacing_goal_unit = $var; + + return $this; + } + + /** + * Required. The list of goals that make up the custom pacing curve. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomPacingGoal custom_pacing_goals = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Ads\AdManager\V1\CustomPacingGoal> + */ + public function getCustomPacingGoals() + { + return $this->custom_pacing_goals; + } + + /** + * Required. The list of goals that make up the custom pacing curve. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomPacingGoal custom_pacing_goals = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CustomPacingGoal[] $var + * @return $this + */ + public function setCustomPacingGoals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomPacingGoal::class); + $this->custom_pacing_goals = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomPacingGoal.php b/AdsAdManager/src/V1/CustomPacingGoal.php new file mode 100644 index 000000000000..7da50f119a1a --- /dev/null +++ b/AdsAdManager/src/V1/CustomPacingGoal.php @@ -0,0 +1,191 @@ +google.ads.admanager.v1.CustomPacingGoal + */ +class CustomPacingGoal extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The start date and time of the goal. This field is required + * unless + * [use_line_item_start_time][google.ads.admanager.v1.CustomPacingGoal.use_line_item_start_time] + * is true. + * + * Generated from protobuf field optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $start_time = null; + /** + * Optional. Input only. Whether the [LineItem.start_time] should be used for + * the start date and time of this goal. This field is not persisted and if it + * is set to true, the [start_time] field will be populated by the line item's + * start time. + * + * Generated from protobuf field optional bool use_line_item_start_time = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $use_line_item_start_time = null; + /** + * Optional. The amount associated with the goal. This field is required. + * + * Generated from protobuf field optional int64 amount = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $amount = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Optional. The start date and time of the goal. This field is required + * unless + * [use_line_item_start_time][google.ads.admanager.v1.CustomPacingGoal.use_line_item_start_time] + * is true. + * @type bool $use_line_item_start_time + * Optional. Input only. Whether the [LineItem.start_time] should be used for + * the start date and time of this goal. This field is not persisted and if it + * is set to true, the [start_time] field will be populated by the line item's + * start time. + * @type int|string $amount + * Optional. The amount associated with the goal. This field is required. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CustomPacingCurve::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The start date and time of the goal. This field is required + * unless + * [use_line_item_start_time][google.ads.admanager.v1.CustomPacingGoal.use_line_item_start_time] + * is true. + * + * Generated from protobuf field optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Optional. The start date and time of the goal. This field is required + * unless + * [use_line_item_start_time][google.ads.admanager.v1.CustomPacingGoal.use_line_item_start_time] + * is true. + * + * Generated from protobuf field optional .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Optional. Input only. Whether the [LineItem.start_time] should be used for + * the start date and time of this goal. This field is not persisted and if it + * is set to true, the [start_time] field will be populated by the line item's + * start time. + * + * Generated from protobuf field optional bool use_line_item_start_time = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getUseLineItemStartTime() + { + return isset($this->use_line_item_start_time) ? $this->use_line_item_start_time : false; + } + + public function hasUseLineItemStartTime() + { + return isset($this->use_line_item_start_time); + } + + public function clearUseLineItemStartTime() + { + unset($this->use_line_item_start_time); + } + + /** + * Optional. Input only. Whether the [LineItem.start_time] should be used for + * the start date and time of this goal. This field is not persisted and if it + * is set to true, the [start_time] field will be populated by the line item's + * start time. + * + * Generated from protobuf field optional bool use_line_item_start_time = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setUseLineItemStartTime($var) + { + GPBUtil::checkBool($var); + $this->use_line_item_start_time = $var; + + return $this; + } + + /** + * Optional. The amount associated with the goal. This field is required. + * + * Generated from protobuf field optional int64 amount = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getAmount() + { + return isset($this->amount) ? $this->amount : 0; + } + + public function hasAmount() + { + return isset($this->amount); + } + + public function clearAmount() + { + unset($this->amount); + } + + /** + * Optional. The amount associated with the goal. This field is required. + * + * Generated from protobuf field optional int64 amount = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setAmount($var) + { + GPBUtil::checkInt64($var); + $this->amount = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/CustomPacingGoalUnitEnum.php b/AdsAdManager/src/V1/CustomPacingGoalUnitEnum.php new file mode 100644 index 000000000000..f9c6d2a7b7a5 --- /dev/null +++ b/AdsAdManager/src/V1/CustomPacingGoalUnitEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.CustomPacingGoalUnitEnum + */ +class CustomPacingGoalUnitEnum 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\CustomPacingGoalUnitEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/CustomPacingGoalUnitEnum/CustomPacingGoalUnit.php b/AdsAdManager/src/V1/CustomPacingGoalUnitEnum/CustomPacingGoalUnit.php new file mode 100644 index 000000000000..f48c73d88896 --- /dev/null +++ b/AdsAdManager/src/V1/CustomPacingGoalUnitEnum/CustomPacingGoalUnit.php @@ -0,0 +1,63 @@ +google.ads.admanager.v1.CustomPacingGoalUnitEnum.CustomPacingGoalUnit + */ +class CustomPacingGoalUnit +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CUSTOM_PACING_GOAL_UNIT_UNSPECIFIED = 0; + */ + const CUSTOM_PACING_GOAL_UNIT_UNSPECIFIED = 0; + /** + * The custom pacing goal amounts represent absolute numbers corresponding + * to the line item's [Goal.unitType][]. + * + * Generated from protobuf enum ABSOLUTE = 1; + */ + const ABSOLUTE = 1; + /** + * The custom pacing goal amounts represent a millipercent. For example, + * 15000 millipercent equals 15%. + * + * Generated from protobuf enum MILLI_PERCENT = 2; + */ + const MILLI_PERCENT = 2; + + private static $valueToName = [ + self::CUSTOM_PACING_GOAL_UNIT_UNSPECIFIED => 'CUSTOM_PACING_GOAL_UNIT_UNSPECIFIED', + self::ABSOLUTE => 'ABSOLUTE', + self::MILLI_PERCENT => 'MILLI_PERCENT', + ]; + + 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/DeliveryIndicator.php b/AdsAdManager/src/V1/DeliveryIndicator.php new file mode 100644 index 000000000000..d719c3d806da --- /dev/null +++ b/AdsAdManager/src/V1/DeliveryIndicator.php @@ -0,0 +1,121 @@ +google.ads.admanager.v1.DeliveryIndicator + */ +class DeliveryIndicator extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The expected delivery percentage of the LineItem. + * + * Generated from protobuf field optional double expected_delivery_percentage = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expected_delivery_percentage = null; + /** + * Output only. The actual delivery percentage of the LineItem. + * + * Generated from protobuf field optional double actual_delivery_percentage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $actual_delivery_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $expected_delivery_percentage + * Output only. The expected delivery percentage of the LineItem. + * @type float $actual_delivery_percentage + * Output only. The actual delivery percentage of the LineItem. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\DeliveryIndicator::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The expected delivery percentage of the LineItem. + * + * Generated from protobuf field optional double expected_delivery_percentage = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getExpectedDeliveryPercentage() + { + return isset($this->expected_delivery_percentage) ? $this->expected_delivery_percentage : 0.0; + } + + public function hasExpectedDeliveryPercentage() + { + return isset($this->expected_delivery_percentage); + } + + public function clearExpectedDeliveryPercentage() + { + unset($this->expected_delivery_percentage); + } + + /** + * Output only. The expected delivery percentage of the LineItem. + * + * Generated from protobuf field optional double expected_delivery_percentage = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setExpectedDeliveryPercentage($var) + { + GPBUtil::checkDouble($var); + $this->expected_delivery_percentage = $var; + + return $this; + } + + /** + * Output only. The actual delivery percentage of the LineItem. + * + * Generated from protobuf field optional double actual_delivery_percentage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getActualDeliveryPercentage() + { + return isset($this->actual_delivery_percentage) ? $this->actual_delivery_percentage : 0.0; + } + + public function hasActualDeliveryPercentage() + { + return isset($this->actual_delivery_percentage); + } + + public function clearActualDeliveryPercentage() + { + unset($this->actual_delivery_percentage); + } + + /** + * Output only. The actual delivery percentage of the LineItem. + * + * Generated from protobuf field optional double actual_delivery_percentage = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setActualDeliveryPercentage($var) + { + GPBUtil::checkDouble($var); + $this->actual_delivery_percentage = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/DiscountTypeEnum.php b/AdsAdManager/src/V1/DiscountTypeEnum.php new file mode 100644 index 000000000000..4ddd974b81a0 --- /dev/null +++ b/AdsAdManager/src/V1/DiscountTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.DiscountTypeEnum + */ +class DiscountTypeEnum 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\DiscountTypeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/DiscountTypeEnum/DiscountType.php b/AdsAdManager/src/V1/DiscountTypeEnum/DiscountType.php new file mode 100644 index 000000000000..37b6aa75c67f --- /dev/null +++ b/AdsAdManager/src/V1/DiscountTypeEnum/DiscountType.php @@ -0,0 +1,61 @@ +google.ads.admanager.v1.DiscountTypeEnum.DiscountType + */ +class DiscountType +{ + /** + * No value specified + * + * Generated from protobuf enum DISCOUNT_TYPE_UNSPECIFIED = 0; + */ + const DISCOUNT_TYPE_UNSPECIFIED = 0; + /** + * An absolute value will be discounted from the line item's cost. + * + * Generated from protobuf enum ABSOLUTE_VALUE = 1; + */ + const ABSOLUTE_VALUE = 1; + /** + * A percentage of the cost will be discounted for booking the line item. + * + * Generated from protobuf enum PERCENTAGE = 2; + */ + const PERCENTAGE = 2; + + private static $valueToName = [ + self::DISCOUNT_TYPE_UNSPECIFIED => 'DISCOUNT_TYPE_UNSPECIFIED', + self::ABSOLUTE_VALUE => 'ABSOLUTE_VALUE', + self::PERCENTAGE => 'PERCENTAGE', + ]; + + 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/ExclusionScopeEnum.php b/AdsAdManager/src/V1/ExclusionScopeEnum.php new file mode 100644 index 000000000000..e32057ec0bfa --- /dev/null +++ b/AdsAdManager/src/V1/ExclusionScopeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.ExclusionScopeEnum + */ +class ExclusionScopeEnum 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\ExclusionScopeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ExclusionScopeEnum/ExclusionScope.php b/AdsAdManager/src/V1/ExclusionScopeEnum/ExclusionScope.php new file mode 100644 index 000000000000..00fb4fad080c --- /dev/null +++ b/AdsAdManager/src/V1/ExclusionScopeEnum/ExclusionScope.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.ExclusionScopeEnum.ExclusionScope + */ +class ExclusionScope +{ + /** + * No value specified. + * + * Generated from protobuf enum EXCLUSION_SCOPE_UNSPECIFIED = 0; + */ + const EXCLUSION_SCOPE_UNSPECIFIED = 0; + /** + * The exclusion label applies to the entire page. + * + * Generated from protobuf enum PAGE = 1; + */ + const PAGE = 1; + /** + * The exclusion label applies to the entire stream of content. + * + * Generated from protobuf enum STREAM = 2; + */ + const STREAM = 2; + /** + * The exclusion label applies to the entire pod (or group). + * + * Generated from protobuf enum POD = 3; + */ + const POD = 3; + + private static $valueToName = [ + self::EXCLUSION_SCOPE_UNSPECIFIED => 'EXCLUSION_SCOPE_UNSPECIFIED', + self::PAGE => 'PAGE', + self::STREAM => 'STREAM', + self::POD => 'POD', + ]; + + 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/GetCreativeSetRequest.php b/AdsAdManager/src/V1/GetCreativeSetRequest.php new file mode 100644 index 000000000000..ba674c83f0f5 --- /dev/null +++ b/AdsAdManager/src/V1/GetCreativeSetRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetCreativeSetRequest + */ +class GetCreativeSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the CreativeSet. + * Format: `networks/{network_code}/creativeSets/{creative_set_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 CreativeSet. + * Format: `networks/{network_code}/creativeSets/{creative_set_id}` + * Please see {@see CreativeSetServiceClient::creativeSetName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetCreativeSetRequest + * + * @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 CreativeSet. + * Format: `networks/{network_code}/creativeSets/{creative_set_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeSetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the CreativeSet. + * Format: `networks/{network_code}/creativeSets/{creative_set_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 CreativeSet. + * Format: `networks/{network_code}/creativeSets/{creative_set_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/GetSlateRequest.php b/AdsAdManager/src/V1/GetSlateRequest.php new file mode 100644 index 000000000000..cb11461232aa --- /dev/null +++ b/AdsAdManager/src/V1/GetSlateRequest.php @@ -0,0 +1,86 @@ +google.ads.admanager.v1.GetSlateRequest + */ +class GetSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Slate to retrieve. + * Format: `networks/{network_code}/slates/{slate_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 Slate to retrieve. + * Format: `networks/{network_code}/slates/{slate_id}` + * Please see {@see SlateServiceClient::slateName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\GetSlateRequest + * + * @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 Slate to retrieve. + * Format: `networks/{network_code}/slates/{slate_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Slate to retrieve. + * Format: `networks/{network_code}/slates/{slate_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 Slate to retrieve. + * Format: `networks/{network_code}/slates/{slate_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/GrpProviderEnum.php b/AdsAdManager/src/V1/GrpProviderEnum.php new file mode 100644 index 000000000000..9ec930e6016a --- /dev/null +++ b/AdsAdManager/src/V1/GrpProviderEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.GrpProviderEnum + */ +class GrpProviderEnum 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\GrpProviderEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/GrpProviderEnum/GrpProvider.php b/AdsAdManager/src/V1/GrpProviderEnum/GrpProvider.php new file mode 100644 index 000000000000..bb2e17d58e9a --- /dev/null +++ b/AdsAdManager/src/V1/GrpProviderEnum/GrpProvider.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.GrpProviderEnum.GrpProvider + */ +class GrpProvider +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum GRP_PROVIDER_UNSPECIFIED = 0; + */ + const GRP_PROVIDER_UNSPECIFIED = 0; + /** + * Google's GRP provider. + * + * Generated from protobuf enum GOOGLE = 1; + */ + const GOOGLE = 1; + /** + * Nielsen's GRP provider. + * + * Generated from protobuf enum NIELSEN = 2; + */ + const NIELSEN = 2; + + private static $valueToName = [ + self::GRP_PROVIDER_UNSPECIFIED => 'GRP_PROVIDER_UNSPECIFIED', + self::GOOGLE => 'GOOGLE', + self::NIELSEN => 'NIELSEN', + ]; + + 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/GrpSettings.php b/AdsAdManager/src/V1/GrpSettings.php new file mode 100644 index 000000000000..0e821f27df24 --- /dev/null +++ b/AdsAdManager/src/V1/GrpSettings.php @@ -0,0 +1,455 @@ +google.ads.admanager.v1.GrpSettings + */ +class GrpSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies the minimum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * + * Generated from protobuf field optional int64 min_target_age = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $min_target_age = null; + /** + * Optional. Specifies the maximum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * + * Generated from protobuf field optional int64 max_target_age = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_target_age = null; + /** + * Optional. Specifies the target gender of the LineItem. This field is only + * applicable if [provider][google.ads.admanager.v1.GrpSettings.provider] is + * not null. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpTargetGenderEnum.GrpTargetGender target_gender = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $target_gender = null; + /** + * Optional. Specifies the GRP provider of the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpProviderEnum.GrpProvider provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $provider = null; + /** + * Optional. Estimate for the in-target ratio given the line item's audience + * targeting. This field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is Nielsen, + * [LineItem.primary_goal.unit_type][] is in-target impressions, and + * [LineItemCostType] is in-target CPM. This field determines the in-target + * ratio to use for pacing Nielsen line items before Nielsen reporting data is + * available. Represented as a milli percent, so 55.7% becomes 55700. + * + * Generated from protobuf field optional int64 in_target_ratio_estimate_milli_percent = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $in_target_ratio_estimate_milli_percent = null; + /** + * Optional. Specifies which pacing computation to apply in pacing to + * impressions from connected devices. + * + * Generated from protobuf field optional .google.ads.admanager.v1.NielsenCtvPacingEnum.NielsenCtvPacing nielsen_ctv_pacing_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $nielsen_ctv_pacing_type = null; + /** + * Optional. Specifies whether to use Google or Nielsen device breakdown in + * Nielsen Line Item auto pacing. + * + * Generated from protobuf field optional .google.ads.admanager.v1.PacingDeviceCategorizationEnum.PacingDeviceCategorization pacing_device_categorization_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $pacing_device_categorization_type = null; + /** + * Optional. Specifies whether to apply true coviewing in Nielsen Line Item + * auto pacing. This field can only be true if + * [nielsen_ctv_pacing_type][google.ads.admanager.v1.GrpSettings.nielsen_ctv_pacing_type] + * is not NONE. + * + * Generated from protobuf field optional bool apply_true_coview = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $apply_true_coview = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $min_target_age + * Optional. Specifies the minimum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * @type int|string $max_target_age + * Optional. Specifies the maximum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * @type int $target_gender + * Optional. Specifies the target gender of the LineItem. This field is only + * applicable if [provider][google.ads.admanager.v1.GrpSettings.provider] is + * not null. + * @type int $provider + * Optional. Specifies the GRP provider of the LineItem. + * @type int|string $in_target_ratio_estimate_milli_percent + * Optional. Estimate for the in-target ratio given the line item's audience + * targeting. This field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is Nielsen, + * [LineItem.primary_goal.unit_type][] is in-target impressions, and + * [LineItemCostType] is in-target CPM. This field determines the in-target + * ratio to use for pacing Nielsen line items before Nielsen reporting data is + * available. Represented as a milli percent, so 55.7% becomes 55700. + * @type int $nielsen_ctv_pacing_type + * Optional. Specifies which pacing computation to apply in pacing to + * impressions from connected devices. + * @type int $pacing_device_categorization_type + * Optional. Specifies whether to use Google or Nielsen device breakdown in + * Nielsen Line Item auto pacing. + * @type bool $apply_true_coview + * Optional. Specifies whether to apply true coviewing in Nielsen Line Item + * auto pacing. This field can only be true if + * [nielsen_ctv_pacing_type][google.ads.admanager.v1.GrpSettings.nielsen_ctv_pacing_type] + * is not NONE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\GrpSettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Specifies the minimum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * + * Generated from protobuf field optional int64 min_target_age = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMinTargetAge() + { + return isset($this->min_target_age) ? $this->min_target_age : 0; + } + + public function hasMinTargetAge() + { + return isset($this->min_target_age); + } + + public function clearMinTargetAge() + { + unset($this->min_target_age); + } + + /** + * Optional. Specifies the minimum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * + * Generated from protobuf field optional int64 min_target_age = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMinTargetAge($var) + { + GPBUtil::checkInt64($var); + $this->min_target_age = $var; + + return $this; + } + + /** + * Optional. Specifies the maximum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * + * Generated from protobuf field optional int64 max_target_age = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxTargetAge() + { + return isset($this->max_target_age) ? $this->max_target_age : 0; + } + + public function hasMaxTargetAge() + { + return isset($this->max_target_age); + } + + public function clearMaxTargetAge() + { + unset($this->max_target_age); + } + + /** + * Optional. Specifies the maximum target age (in years) of the LineItem. This + * field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is not null. + * + * Generated from protobuf field optional int64 max_target_age = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxTargetAge($var) + { + GPBUtil::checkInt64($var); + $this->max_target_age = $var; + + return $this; + } + + /** + * Optional. Specifies the target gender of the LineItem. This field is only + * applicable if [provider][google.ads.admanager.v1.GrpSettings.provider] is + * not null. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpTargetGenderEnum.GrpTargetGender target_gender = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTargetGender() + { + return isset($this->target_gender) ? $this->target_gender : 0; + } + + public function hasTargetGender() + { + return isset($this->target_gender); + } + + public function clearTargetGender() + { + unset($this->target_gender); + } + + /** + * Optional. Specifies the target gender of the LineItem. This field is only + * applicable if [provider][google.ads.admanager.v1.GrpSettings.provider] is + * not null. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpTargetGenderEnum.GrpTargetGender target_gender = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTargetGender($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\GrpTargetGenderEnum\GrpTargetGender::class); + $this->target_gender = $var; + + return $this; + } + + /** + * Optional. Specifies the GRP provider of the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpProviderEnum.GrpProvider provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getProvider() + { + return isset($this->provider) ? $this->provider : 0; + } + + public function hasProvider() + { + return isset($this->provider); + } + + public function clearProvider() + { + unset($this->provider); + } + + /** + * Optional. Specifies the GRP provider of the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpProviderEnum.GrpProvider provider = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setProvider($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\GrpProviderEnum\GrpProvider::class); + $this->provider = $var; + + return $this; + } + + /** + * Optional. Estimate for the in-target ratio given the line item's audience + * targeting. This field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is Nielsen, + * [LineItem.primary_goal.unit_type][] is in-target impressions, and + * [LineItemCostType] is in-target CPM. This field determines the in-target + * ratio to use for pacing Nielsen line items before Nielsen reporting data is + * available. Represented as a milli percent, so 55.7% becomes 55700. + * + * Generated from protobuf field optional int64 in_target_ratio_estimate_milli_percent = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getInTargetRatioEstimateMilliPercent() + { + return isset($this->in_target_ratio_estimate_milli_percent) ? $this->in_target_ratio_estimate_milli_percent : 0; + } + + public function hasInTargetRatioEstimateMilliPercent() + { + return isset($this->in_target_ratio_estimate_milli_percent); + } + + public function clearInTargetRatioEstimateMilliPercent() + { + unset($this->in_target_ratio_estimate_milli_percent); + } + + /** + * Optional. Estimate for the in-target ratio given the line item's audience + * targeting. This field is only applicable if + * [provider][google.ads.admanager.v1.GrpSettings.provider] is Nielsen, + * [LineItem.primary_goal.unit_type][] is in-target impressions, and + * [LineItemCostType] is in-target CPM. This field determines the in-target + * ratio to use for pacing Nielsen line items before Nielsen reporting data is + * available. Represented as a milli percent, so 55.7% becomes 55700. + * + * Generated from protobuf field optional int64 in_target_ratio_estimate_milli_percent = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setInTargetRatioEstimateMilliPercent($var) + { + GPBUtil::checkInt64($var); + $this->in_target_ratio_estimate_milli_percent = $var; + + return $this; + } + + /** + * Optional. Specifies which pacing computation to apply in pacing to + * impressions from connected devices. + * + * Generated from protobuf field optional .google.ads.admanager.v1.NielsenCtvPacingEnum.NielsenCtvPacing nielsen_ctv_pacing_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNielsenCtvPacingType() + { + return isset($this->nielsen_ctv_pacing_type) ? $this->nielsen_ctv_pacing_type : 0; + } + + public function hasNielsenCtvPacingType() + { + return isset($this->nielsen_ctv_pacing_type); + } + + public function clearNielsenCtvPacingType() + { + unset($this->nielsen_ctv_pacing_type); + } + + /** + * Optional. Specifies which pacing computation to apply in pacing to + * impressions from connected devices. + * + * Generated from protobuf field optional .google.ads.admanager.v1.NielsenCtvPacingEnum.NielsenCtvPacing nielsen_ctv_pacing_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNielsenCtvPacingType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\NielsenCtvPacingEnum\NielsenCtvPacing::class); + $this->nielsen_ctv_pacing_type = $var; + + return $this; + } + + /** + * Optional. Specifies whether to use Google or Nielsen device breakdown in + * Nielsen Line Item auto pacing. + * + * Generated from protobuf field optional .google.ads.admanager.v1.PacingDeviceCategorizationEnum.PacingDeviceCategorization pacing_device_categorization_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPacingDeviceCategorizationType() + { + return isset($this->pacing_device_categorization_type) ? $this->pacing_device_categorization_type : 0; + } + + public function hasPacingDeviceCategorizationType() + { + return isset($this->pacing_device_categorization_type); + } + + public function clearPacingDeviceCategorizationType() + { + unset($this->pacing_device_categorization_type); + } + + /** + * Optional. Specifies whether to use Google or Nielsen device breakdown in + * Nielsen Line Item auto pacing. + * + * Generated from protobuf field optional .google.ads.admanager.v1.PacingDeviceCategorizationEnum.PacingDeviceCategorization pacing_device_categorization_type = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPacingDeviceCategorizationType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\PacingDeviceCategorizationEnum\PacingDeviceCategorization::class); + $this->pacing_device_categorization_type = $var; + + return $this; + } + + /** + * Optional. Specifies whether to apply true coviewing in Nielsen Line Item + * auto pacing. This field can only be true if + * [nielsen_ctv_pacing_type][google.ads.admanager.v1.GrpSettings.nielsen_ctv_pacing_type] + * is not NONE. + * + * Generated from protobuf field optional bool apply_true_coview = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getApplyTrueCoview() + { + return isset($this->apply_true_coview) ? $this->apply_true_coview : false; + } + + public function hasApplyTrueCoview() + { + return isset($this->apply_true_coview); + } + + public function clearApplyTrueCoview() + { + unset($this->apply_true_coview); + } + + /** + * Optional. Specifies whether to apply true coviewing in Nielsen Line Item + * auto pacing. This field can only be true if + * [nielsen_ctv_pacing_type][google.ads.admanager.v1.GrpSettings.nielsen_ctv_pacing_type] + * is not NONE. + * + * Generated from protobuf field optional bool apply_true_coview = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setApplyTrueCoview($var) + { + GPBUtil::checkBool($var); + $this->apply_true_coview = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/GrpTargetGenderEnum.php b/AdsAdManager/src/V1/GrpTargetGenderEnum.php new file mode 100644 index 000000000000..47c3004e01b5 --- /dev/null +++ b/AdsAdManager/src/V1/GrpTargetGenderEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.GrpTargetGenderEnum + */ +class GrpTargetGenderEnum 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\GrpTargetGenderEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/GrpTargetGenderEnum/GrpTargetGender.php b/AdsAdManager/src/V1/GrpTargetGenderEnum/GrpTargetGender.php new file mode 100644 index 000000000000..c3ec849d1f7f --- /dev/null +++ b/AdsAdManager/src/V1/GrpTargetGenderEnum/GrpTargetGender.php @@ -0,0 +1,68 @@ +google.ads.admanager.v1.GrpTargetGenderEnum.GrpTargetGender + */ +class GrpTargetGender +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum GRP_TARGET_GENDER_UNSPECIFIED = 0; + */ + const GRP_TARGET_GENDER_UNSPECIFIED = 0; + /** + * Indicates that the GRP target gender is both male and female. + * + * Generated from protobuf enum BOTH = 1; + */ + const BOTH = 1; + /** + * Indicates that the GRP target gender is Female. + * + * Generated from protobuf enum FEMALE = 2; + */ + const FEMALE = 2; + /** + * Indicates that the GRP target gender is Male. + * + * Generated from protobuf enum MALE = 3; + */ + const MALE = 3; + + private static $valueToName = [ + self::GRP_TARGET_GENDER_UNSPECIFIED => 'GRP_TARGET_GENDER_UNSPECIFIED', + self::BOTH => 'BOTH', + self::FEMALE => 'FEMALE', + self::MALE => 'MALE', + ]; + + 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/LineItem.php b/AdsAdManager/src/V1/LineItem.php index d1c90695d7f9..118260c3e158 100644 --- a/AdsAdManager/src/V1/LineItem.php +++ b/AdsAdManager/src/V1/LineItem.php @@ -32,12 +32,25 @@ class LineItem extends \Google\Protobuf\Internal\Message */ protected $order = null; /** - * Required. The name of the line item. This attribute is required and has a - * maximum length of 255 characters. + * Required. The name of the line item. This attribute has a maximum length of + * 255 characters. * * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; */ protected $display_name = null; + /** + * Optional. An identifier for the LineItem that is meaningful to the + * publisher. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string external_line_item_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_line_item_id = null; + /** + * Output only. The name of the Order. + * + * Generated from protobuf field optional string order_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $order_display_name = null; /** * Required. The date and time on which the LineItem is enabled to begin * serving. This attribute is required and must be in the future. @@ -45,28 +58,254 @@ class LineItem extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional .google.protobuf.Timestamp start_time = 6 [(.google.api.field_behavior) = REQUIRED]; */ protected $start_time = null; + /** + * Optional. The target end time of the line item. This attribute is required + * unless + * [end_time_unlimited][google.ads.admanager.v1.LineItem.end_time_unlimited] + * is set to true. If specified, it must be after the + * [start_time][google.ads.admanager.v1.LineItem.start_time]. This does not + * include auto extension days. + * + * Generated from protobuf field optional .google.protobuf.Timestamp target_end_time = 95 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $target_end_time = null; /** * Output only. The timestamp when the LineItem will stop serving. This - * attribute is read-only and includes auto extension days. + * attribute includes auto extension days. * * Generated from protobuf field optional .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $end_time = null; /** - * Required. Indicates the line item type of a LineItem. This attribute is - * required. The line item type determines the default priority of the line - * item. More information can be found at - * https://support.google.com/admanager/answer/177279. + * Optional. The number of days to allow a line item to deliver past its + * [target_end_time][google.ads.admanager.v1.LineItem.target_end_time]. A + * maximum of 7 days is allowed. This is feature is only available for Ad + * Manager 360 accounts. + * + * Generated from protobuf field optional int32 auto_extension_days = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $auto_extension_days = null; + /** + * Optional. Non-empty default. Specifies whether or not the LineItem has an + * end time. This attribute defaults to false. It can be be set to true for + * only line items of type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE. + * + * Generated from protobuf field optional bool end_time_unlimited = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $end_time_unlimited = null; + /** + * Required. The strategy used for displaying multiple Creative objects that + * are associated with the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $creative_rotation_type = null; + /** + * Optional. Non-empty default. The strategy for delivering ads over the + * course of the line item's duration. This attribute defaults to EVENLY or + * FRONTLOADED depending on the network's configuration. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDeliveryRateTypeEnum.LineItemDeliveryRateType delivery_rate_type = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $delivery_rate_type = null; + /** + * Optional. Non-empty default. Strategy for choosing forecasted traffic + * shapes to pace line items. This field defaults to HISTORICAL. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDeliveryForecastSourceEnum.LineItemDeliveryForecastSource delivery_forecast_source = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $delivery_forecast_source = null; + /** + * Optional. The curve that is used to pace the line item's delivery. This + * field is required if and only if the delivery forecast source is + * CUSTOM_PACING_CURVE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomPacingCurve custom_pacing_curve = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_pacing_curve = null; + /** + * Optional. Non-empty default. The strategy for serving roadblocked + * creatives, that is, instances where multiple creatives must be served + * together on a single web page. This attribute defaults to ONE_OR_MORE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.RoadblockingTypeEnum.RoadblockingType roadblocking_type = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $roadblocking_type = null; + /** + * Optional. Non-empty default. The nature of the line item's creatives' + * skippability. This attribute is only applicable for video line items, and + * defaults to NOT_SKIPPABLE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SkippableAdTypeEnum.SkippableAdType skippable_ad_type = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $skippable_ad_type = null; + /** + * Optional. The set of frequency capping units for this LineItem. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.FrequencyCap frequency_caps = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $frequency_caps; + /** + * Required. Indicates the line item type of a LineItem. The line item type + * determines the default priority of the line item. More information can be + * found at https://support.google.com/admanager/answer/177279. * * Generated from protobuf field optional .google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 17 [(.google.api.field_behavior) = REQUIRED]; */ protected $line_item_type = null; + /** + * Optional. Non-empty default. The priority for the line item. Valid values + * range from 1 to 16. This field defaults to the default priority of the + * LineItemType. The following list shows the default, minimum, and maximum + * priority values are for each line item type: + * - LineItemType: default priority (minimum priority, maximum priority) + * - SPONSORSHIP: 4 (2, 5) + * - STANDARD: 8 (6, 10) + * - NETWORK: 12 (11, 14) + * - BULK: 12 (11, 14) + * - PRICE_PRIORITY: 12 (11, 14) + * - HOUSE: 16 (15, 16) + * - CLICK_TRACKING: 16 (1, 16) + * - AD_EXCHANGE: 12 (1, 16) + * - ADSENSE: 12 (1, 16) + * - BUMPER: 16 (15, 16) + * - ADMOB: 21 (1, 16) + * - PREFERRED_DEAL: 12 (12, 12) + * This field can only be edited by certain networks, otherwise a + * PermissionError will occur. + * + * Generated from protobuf field optional int32 priority = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $priority = null; /** * Required. The amount of money to spend per impression or click. * * Generated from protobuf field optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED]; */ protected $rate = null; + /** + * Optional. Non-empty default. An amount to help the adserver rank inventory. + * [value_cpm][google.ads.admanager.v1.LineItem.value_cpm] artificially raises + * the value of inventory over the + * [rate][google.ads.admanager.v1.LineItem.rate] but avoids raising the actual + * [rate][google.ads.admanager.v1.LineItem.rate]. This attribute defaults to a + * Money object in the local currency with units and nanos set to 0. + * + * Generated from protobuf field optional .google.type.Money value_cpm = 21 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $value_cpm = null; + /** + * Required. The method used for billing this LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 22 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cost_type = null; + /** + * Optional. Discount information for the line item. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDiscount discount = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $discount = null; + /** + * Optional. This attribute is only applicable for certain line item types and + * acts as an "FYI" or note, which does not impact adserving or other backend + * systems. For SPONSORSHIP line items, this represents the minimum quantity, + * which is a lifetime impression volume goal for reporting purposes only. For + * STANDARD line items, this represent the contracted quantity, which is the + * number of units specified in the contract the advertiser has bought for + * this LineItem. This field is just a "FYI" for traffickers to manually + * intervene with the LineItem when needed. This attribute is only available + * for STANDARD line items if you have this feature enabled on your network. + * + * Generated from protobuf field optional int64 contracted_units_bought = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $contracted_units_bought = null; + /** + * Required. Details about the creatives that are expected to serve through + * this LineItem. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 25 [(.google.api.field_behavior) = REQUIRED]; + */ + private $creative_placeholders; + /** + * Optional. Non-empty default. The environment that the LineItem is + * targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, + * then this line item can only target AdUnits that have AdUnitSizes whose + * environmentType is also VIDEO_PLAYER. + * + * Generated from protobuf field optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $environment_type = null; + /** + * Optional. The delivery option for companions. Setting this field is only + * meaningful if the following conditions are met: + * - The "Guaranteed roadblocks" feature is enabled on your network. + * - One of the following is true (both cannot be true, these are mutually + * exclusive). + * - The environmentType is VIDEO_PLAYER. + * - The roadblockingType is CREATIVE_SET. + * This field defaults to OPTIONAL if the conditions are met. + * In all other cases it defaults to UNKNOWN and is not meaningful. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CompanionDeliveryOptionEnum.CompanionDeliveryOption companion_delivery_option = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $companion_delivery_option = null; + /** + * Input only. The flag indicates whether overbooking should be allowed when + * creating or updating reservations of line item types SPONSORSHIP and + * STANDARD. When true, operations on this line item will never + * trigger a ForecastError, which corresponds to an overbook warning in the + * UI. The default value is false. Note: this field won't persist on the + * line item itself, and the value will only affect the current request. + * + * Generated from protobuf field optional bool allow_overbook = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $allow_overbook = null; + /** + * Input only. The flag indicates whether the inventory check should be + * skipped when creating or updating a line item. The default value is false. + * Note: this field won't persist on the line item itself, and the value will + * only affect the current request. + * + * Generated from protobuf field optional bool skip_inventory_check = 29 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $skip_inventory_check = null; + /** + * Input only. True to skip checks for warnings from rules applied to line + * items targeting inventory shared by a distributor partner for cross selling + * when performing an action on this line item. The default is false. Note: + * this field won't persist on the line item itself, and the value will only + * affect the current request. + * + * Generated from protobuf field optional bool skip_cross_selling_rule_warning_checks = 30 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $skip_cross_selling_rule_warning_checks = null; + /** + * Input only. The flag indicates whether inventory should be reserved when + * creating a line item of types SPONSORSHIP and STANDARD in an unapproved + * Order. The default value is false. + * + * Generated from protobuf field optional bool reserve_on_creation = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $reserve_on_creation = null; + /** + * Output only. Contains trafficking statistics for the line item. This will + * be empty in case there are no statistics for a line item yet. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemStats stats = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $stats = null; + /** + * Output only. Indicates how well the line item has been performing. This + * will be empty if the delivery indicator information is not available due to + * one of the following reasons: + * - The line item is not delivering. + * - The line item has an unlimited goal or cap. + * - The line item has a percentage based goal or cap. + * + * Generated from protobuf field optional .google.ads.admanager.v1.DeliveryIndicator delivery_indicator = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delivery_indicator = null; /** * Output only. The amount of money allocated to the LineItem. This attribute * is readonly and is populated by Google. The currency code is readonly. @@ -74,12 +313,137 @@ class LineItem extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $budget = null; + /** + * Output only. The status of the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemComputedStatusEnum.LineItemComputedStatus status = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Output only. Describes whether or not inventory has been reserved for the + * LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemReservationStatusEnum.LineItemReservationStatus reservation_status = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $reservation_status = null; + /** + * Output only. The archival status of the LineItem. + * + * Generated from protobuf field optional bool archived = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $archived = null; + /** + * Optional. The web property code used for dynamic allocation line items. + * This web property is only required with line item types AD_EXCHANGE and + * ADSENSE. + * + * Generated from protobuf field optional string web_property_code = 49 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $web_property_code = null; + /** + * Optional. The set of labels applied directly to this line item. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 50 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $applied_labels; + /** + * Output only. Contains the set of labels inherited from the order that + * contains this line item and the advertiser that owns the order. If a label + * has been negated, only the negated label is returned. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $effective_applied_labels; + /** + * Optional. If a line item has a series of competitive exclusions on it, it + * could be blocked from serving with line items from the same advertiser. + * Setting this to true will allow line items from the same advertiser to + * serve regardless of the other competitive exclusion labels being applied. + * + * Generated from protobuf field optional bool same_advertiser_exception_enabled = 52 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $same_advertiser_exception_enabled = null; + /** + * Output only. The application that last modified this line item. + * + * Generated from protobuf field optional string update_source = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_source = null; + /** + * Optional. Provides any additional notes that may annotate the LineItem. + * This attribute has a maximum length of 65,535 characters. + * + * Generated from protobuf field optional string notes = 54 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $notes = null; + /** + * Optional. Non-empty default. The CompetitiveConstraintScope for the + * competitive exclusion labels assigned to this line item. This field + * defaults to POD. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ExclusionScopeEnum.ExclusionScope competitive_constraint_scope = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $competitive_constraint_scope = null; + /** + * Output only. The time this line item was last modified. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 57 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The time this line item was created. + * + * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 58 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; /** * Optional. The values of the custom fields associated with this line item. * * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL]; */ private $custom_field_values; + /** + * Output only. Indicates if a LineItem is missing any Creative creatives for + * the creativePlaceholders specified. Creative Creatives can be considered + * missing for several reasons including: + * - Not enough Creative creatives of a certain size have been uploaded, as + * determined by + * [expected_creative_count][google.ads.admanager.v1.CreativePlaceholder.expected_creative_count]. + * For example a LineItem specifies 750x350, 400x200 but only a 750x350 was + * uploaded. Or LineItem specifies 750x350 with an expected count of 2, but + * only one was uploaded. + * - The [Creative.applied_labels][] of an associated Creative don't match + * the + * [CreativePlaceholder.applied_labels][google.ads.admanager.v1.CreativePlaceholder.applied_labels] + * of the LineItem. For example LineItem specifies 750x350 with a Foo + * AppliedLabel but a 750x350 creative without a AppliedLabel was uploaded. + * + * Generated from protobuf field optional bool missing_creatives = 61 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $missing_creatives = null; + /** + * Optional. Third party auto-pixeling settings for cross-sell Partners. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ThirdPartyMeasurementSettings third_party_measurement_settings = 67 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $third_party_measurement_settings = null; + /** + * Optional. Designates this line item as intended for YT Kids app. If true, + * all creatives associated with this line item must be reviewed and approved. + * See the help center article for more information: + * https://support.google.com/yt-partner-sales/answer/10015534. + * + * Generated from protobuf field optional bool youtube_kids_restricted = 74 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $youtube_kids_restricted = null; + /** + * Optional. The max duration of a video creative associated with this + * LineItem. This attribute is only meaningful for video line items. This + * attribute is required for video line items and must be greater than 0. + * + * Generated from protobuf field optional .google.protobuf.Duration max_video_creative_duration = 75 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_video_creative_duration = null; /** * Optional. The primary goal that this LineItem is associated with, which is * used in its pacing and budgeting. @@ -87,6 +451,94 @@ class LineItem extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional .google.ads.admanager.v1.Goal goal = 76 [(.google.api.field_behavior) = OPTIONAL]; */ protected $goal = null; + /** + * Optional. The secondary goals that this LineItem is associated with. This + * is required and meaningful only if the + * [line_item_type][google.ads.admanager.v1.LineItem.line_item_type] is + * SPONSORSHIP and [cost_type][google.ads.admanager.v1.LineItem.cost_type] is + * CPM. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Goal secondary_goals = 100 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $secondary_goals; + /** + * Optional. Contains the information for a line item which has a target GRP + * demographic. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpSettings grp_settings = 78 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $grp_settings = null; + /** + * Optional. The deal information associated with this line item, if it is + * programmatic. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDealInfo deal_info = 79 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deal_info = null; + /** + * Optional. Optional IDs of the Company that provide ad verification for this + * line item. + * + * Generated from protobuf field repeated string viewability_provider_companies = 85 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $viewability_provider_companies; + /** + * Optional. Non-empty default. Child content eligibility designation for this + * line item. This field defaults to DISALLOWED. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ChildContentEligibilityEnum.ChildContentEligibility child_content_eligibility = 86 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + */ + protected $child_content_eligibility = null; + /** + * Optional. Custom XML to be rendered in a custom VAST response at serving + * time. + * + * Generated from protobuf field optional string custom_vast_extension = 88 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $custom_vast_extension = null; + /** + * Optional. Whether the line item is enabled for sponsorship exclusivity. If + * true, only exclusive sponsorships can be served on inventory targeted by + * this LineItem. This control should only be available for 100% video + * sponsorships. + * + * Generated from protobuf field optional bool sponsorship_exclusivity_enabled = 89 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sponsorship_exclusivity_enabled = null; + /** + * Optional. Indicates whether repeated creative serving is enabled for this + * line item. + * + * Generated from protobuf field optional bool repeated_creative_serving_enabled = 90 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $repeated_creative_serving_enabled = null; + /** + * Required. Contains the targeting criteria for the ad campaign. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Targeting targeting = 93 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $targeting = null; + /** + * Optional. A list of CreativeTargeting objects that can be used to specify + * creative level targeting for this line item. Creative level targeting is + * specified in a + * [CreativePlaceholder.creative_targeting_display_name][google.ads.admanager.v1.CreativePlaceholder.creative_targeting_display_name] + * field by referencing the [CreativeTargeting.display_name][] field. It also + * needs to be re-specified in the + * [LineItemCreativeAssociation.targeting_display_name][] field when + * associating a line item with a creative that fits into that placeholder. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTargeting creative_targetings = 94 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $creative_targetings; + /** + * Optional. The set of allowed formats for this line item. + * If empty, all formats are allowed. This property only applies + * to programmatic video line items. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LineItemAllowedFormatEnum.LineItemAllowedFormat allowed_formats = 112 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $allowed_formats; /** * Constructor. @@ -101,29 +553,269 @@ class LineItem extends \Google\Protobuf\Internal\Message * Required. Immutable. The ID of the Order to which the LineItem belongs. * Format: `networks/{network_code}/orders/{order}` * @type string $display_name - * Required. The name of the line item. This attribute is required and has a - * maximum length of 255 characters. + * Required. The name of the line item. This attribute has a maximum length of + * 255 characters. + * @type string $external_line_item_id + * Optional. An identifier for the LineItem that is meaningful to the + * publisher. This attribute has a maximum length of 255 characters. + * @type string $order_display_name + * Output only. The name of the Order. * @type \Google\Protobuf\Timestamp $start_time * Required. The date and time on which the LineItem is enabled to begin * serving. This attribute is required and must be in the future. + * @type \Google\Protobuf\Timestamp $target_end_time + * Optional. The target end time of the line item. This attribute is required + * unless + * [end_time_unlimited][google.ads.admanager.v1.LineItem.end_time_unlimited] + * is set to true. If specified, it must be after the + * [start_time][google.ads.admanager.v1.LineItem.start_time]. This does not + * include auto extension days. * @type \Google\Protobuf\Timestamp $end_time * Output only. The timestamp when the LineItem will stop serving. This - * attribute is read-only and includes auto extension days. + * attribute includes auto extension days. + * @type int $auto_extension_days + * Optional. The number of days to allow a line item to deliver past its + * [target_end_time][google.ads.admanager.v1.LineItem.target_end_time]. A + * maximum of 7 days is allowed. This is feature is only available for Ad + * Manager 360 accounts. + * @type bool $end_time_unlimited + * Optional. Non-empty default. Specifies whether or not the LineItem has an + * end time. This attribute defaults to false. It can be be set to true for + * only line items of type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE. + * @type int $creative_rotation_type + * Required. The strategy used for displaying multiple Creative objects that + * are associated with the LineItem. + * @type int $delivery_rate_type + * Optional. Non-empty default. The strategy for delivering ads over the + * course of the line item's duration. This attribute defaults to EVENLY or + * FRONTLOADED depending on the network's configuration. + * @type int $delivery_forecast_source + * Optional. Non-empty default. Strategy for choosing forecasted traffic + * shapes to pace line items. This field defaults to HISTORICAL. + * @type \Google\Ads\AdManager\V1\CustomPacingCurve $custom_pacing_curve + * Optional. The curve that is used to pace the line item's delivery. This + * field is required if and only if the delivery forecast source is + * CUSTOM_PACING_CURVE. + * @type int $roadblocking_type + * Optional. Non-empty default. The strategy for serving roadblocked + * creatives, that is, instances where multiple creatives must be served + * together on a single web page. This attribute defaults to ONE_OR_MORE. + * @type int $skippable_ad_type + * Optional. Non-empty default. The nature of the line item's creatives' + * skippability. This attribute is only applicable for video line items, and + * defaults to NOT_SKIPPABLE. + * @type \Google\Ads\AdManager\V1\FrequencyCap[] $frequency_caps + * Optional. The set of frequency capping units for this LineItem. * @type int $line_item_type - * Required. Indicates the line item type of a LineItem. This attribute is - * required. The line item type determines the default priority of the line - * item. More information can be found at - * https://support.google.com/admanager/answer/177279. + * Required. Indicates the line item type of a LineItem. The line item type + * determines the default priority of the line item. More information can be + * found at https://support.google.com/admanager/answer/177279. + * @type int $priority + * Optional. Non-empty default. The priority for the line item. Valid values + * range from 1 to 16. This field defaults to the default priority of the + * LineItemType. The following list shows the default, minimum, and maximum + * priority values are for each line item type: + * - LineItemType: default priority (minimum priority, maximum priority) + * - SPONSORSHIP: 4 (2, 5) + * - STANDARD: 8 (6, 10) + * - NETWORK: 12 (11, 14) + * - BULK: 12 (11, 14) + * - PRICE_PRIORITY: 12 (11, 14) + * - HOUSE: 16 (15, 16) + * - CLICK_TRACKING: 16 (1, 16) + * - AD_EXCHANGE: 12 (1, 16) + * - ADSENSE: 12 (1, 16) + * - BUMPER: 16 (15, 16) + * - ADMOB: 21 (1, 16) + * - PREFERRED_DEAL: 12 (12, 12) + * This field can only be edited by certain networks, otherwise a + * PermissionError will occur. * @type \Google\Type\Money $rate * Required. The amount of money to spend per impression or click. + * @type \Google\Type\Money $value_cpm + * Optional. Non-empty default. An amount to help the adserver rank inventory. + * [value_cpm][google.ads.admanager.v1.LineItem.value_cpm] artificially raises + * the value of inventory over the + * [rate][google.ads.admanager.v1.LineItem.rate] but avoids raising the actual + * [rate][google.ads.admanager.v1.LineItem.rate]. This attribute defaults to a + * Money object in the local currency with units and nanos set to 0. + * @type int $cost_type + * Required. The method used for billing this LineItem. + * @type \Google\Ads\AdManager\V1\LineItemDiscount $discount + * Optional. Discount information for the line item. + * @type int|string $contracted_units_bought + * Optional. This attribute is only applicable for certain line item types and + * acts as an "FYI" or note, which does not impact adserving or other backend + * systems. For SPONSORSHIP line items, this represents the minimum quantity, + * which is a lifetime impression volume goal for reporting purposes only. For + * STANDARD line items, this represent the contracted quantity, which is the + * number of units specified in the contract the advertiser has bought for + * this LineItem. This field is just a "FYI" for traffickers to manually + * intervene with the LineItem when needed. This attribute is only available + * for STANDARD line items if you have this feature enabled on your network. + * @type \Google\Ads\AdManager\V1\CreativePlaceholder[] $creative_placeholders + * Required. Details about the creatives that are expected to serve through + * this LineItem. + * @type int $environment_type + * Optional. Non-empty default. The environment that the LineItem is + * targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, + * then this line item can only target AdUnits that have AdUnitSizes whose + * environmentType is also VIDEO_PLAYER. + * @type int $companion_delivery_option + * Optional. The delivery option for companions. Setting this field is only + * meaningful if the following conditions are met: + * - The "Guaranteed roadblocks" feature is enabled on your network. + * - One of the following is true (both cannot be true, these are mutually + * exclusive). + * - The environmentType is VIDEO_PLAYER. + * - The roadblockingType is CREATIVE_SET. + * This field defaults to OPTIONAL if the conditions are met. + * In all other cases it defaults to UNKNOWN and is not meaningful. + * @type bool $allow_overbook + * Input only. The flag indicates whether overbooking should be allowed when + * creating or updating reservations of line item types SPONSORSHIP and + * STANDARD. When true, operations on this line item will never + * trigger a ForecastError, which corresponds to an overbook warning in the + * UI. The default value is false. Note: this field won't persist on the + * line item itself, and the value will only affect the current request. + * @type bool $skip_inventory_check + * Input only. The flag indicates whether the inventory check should be + * skipped when creating or updating a line item. The default value is false. + * Note: this field won't persist on the line item itself, and the value will + * only affect the current request. + * @type bool $skip_cross_selling_rule_warning_checks + * Input only. True to skip checks for warnings from rules applied to line + * items targeting inventory shared by a distributor partner for cross selling + * when performing an action on this line item. The default is false. Note: + * this field won't persist on the line item itself, and the value will only + * affect the current request. + * @type bool $reserve_on_creation + * Input only. The flag indicates whether inventory should be reserved when + * creating a line item of types SPONSORSHIP and STANDARD in an unapproved + * Order. The default value is false. + * @type \Google\Ads\AdManager\V1\LineItemStats $stats + * Output only. Contains trafficking statistics for the line item. This will + * be empty in case there are no statistics for a line item yet. + * @type \Google\Ads\AdManager\V1\DeliveryIndicator $delivery_indicator + * Output only. Indicates how well the line item has been performing. This + * will be empty if the delivery indicator information is not available due to + * one of the following reasons: + * - The line item is not delivering. + * - The line item has an unlimited goal or cap. + * - The line item has a percentage based goal or cap. * @type \Google\Type\Money $budget * Output only. The amount of money allocated to the LineItem. This attribute * is readonly and is populated by Google. The currency code is readonly. + * @type int $status + * Output only. The status of the LineItem. + * @type int $reservation_status + * Output only. Describes whether or not inventory has been reserved for the + * LineItem. + * @type bool $archived + * Output only. The archival status of the LineItem. + * @type string $web_property_code + * Optional. The web property code used for dynamic allocation line items. + * This web property is only required with line item types AD_EXCHANGE and + * ADSENSE. + * @type \Google\Ads\AdManager\V1\AppliedLabel[] $applied_labels + * Optional. The set of labels applied directly to this line item. + * @type \Google\Ads\AdManager\V1\AppliedLabel[] $effective_applied_labels + * Output only. Contains the set of labels inherited from the order that + * contains this line item and the advertiser that owns the order. If a label + * has been negated, only the negated label is returned. + * @type bool $same_advertiser_exception_enabled + * Optional. If a line item has a series of competitive exclusions on it, it + * could be blocked from serving with line items from the same advertiser. + * Setting this to true will allow line items from the same advertiser to + * serve regardless of the other competitive exclusion labels being applied. + * @type string $update_source + * Output only. The application that last modified this line item. + * @type string $notes + * Optional. Provides any additional notes that may annotate the LineItem. + * This attribute has a maximum length of 65,535 characters. + * @type int $competitive_constraint_scope + * Optional. Non-empty default. The CompetitiveConstraintScope for the + * competitive exclusion labels assigned to this line item. This field + * defaults to POD. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this line item was last modified. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this line item was created. * @type \Google\Ads\AdManager\V1\CustomFieldValue[] $custom_field_values * Optional. The values of the custom fields associated with this line item. + * @type bool $missing_creatives + * Output only. Indicates if a LineItem is missing any Creative creatives for + * the creativePlaceholders specified. Creative Creatives can be considered + * missing for several reasons including: + * - Not enough Creative creatives of a certain size have been uploaded, as + * determined by + * [expected_creative_count][google.ads.admanager.v1.CreativePlaceholder.expected_creative_count]. + * For example a LineItem specifies 750x350, 400x200 but only a 750x350 was + * uploaded. Or LineItem specifies 750x350 with an expected count of 2, but + * only one was uploaded. + * - The [Creative.applied_labels][] of an associated Creative don't match + * the + * [CreativePlaceholder.applied_labels][google.ads.admanager.v1.CreativePlaceholder.applied_labels] + * of the LineItem. For example LineItem specifies 750x350 with a Foo + * AppliedLabel but a 750x350 creative without a AppliedLabel was uploaded. + * @type \Google\Ads\AdManager\V1\ThirdPartyMeasurementSettings $third_party_measurement_settings + * Optional. Third party auto-pixeling settings for cross-sell Partners. + * @type bool $youtube_kids_restricted + * Optional. Designates this line item as intended for YT Kids app. If true, + * all creatives associated with this line item must be reviewed and approved. + * See the help center article for more information: + * https://support.google.com/yt-partner-sales/answer/10015534. + * @type \Google\Protobuf\Duration $max_video_creative_duration + * Optional. The max duration of a video creative associated with this + * LineItem. This attribute is only meaningful for video line items. This + * attribute is required for video line items and must be greater than 0. * @type \Google\Ads\AdManager\V1\Goal $goal * Optional. The primary goal that this LineItem is associated with, which is * used in its pacing and budgeting. + * @type \Google\Ads\AdManager\V1\Goal[] $secondary_goals + * Optional. The secondary goals that this LineItem is associated with. This + * is required and meaningful only if the + * [line_item_type][google.ads.admanager.v1.LineItem.line_item_type] is + * SPONSORSHIP and [cost_type][google.ads.admanager.v1.LineItem.cost_type] is + * CPM. + * @type \Google\Ads\AdManager\V1\GrpSettings $grp_settings + * Optional. Contains the information for a line item which has a target GRP + * demographic. + * @type \Google\Ads\AdManager\V1\LineItemDealInfo $deal_info + * Optional. The deal information associated with this line item, if it is + * programmatic. + * @type string[] $viewability_provider_companies + * Optional. Optional IDs of the Company that provide ad verification for this + * line item. + * @type int $child_content_eligibility + * Optional. Non-empty default. Child content eligibility designation for this + * line item. This field defaults to DISALLOWED. + * @type string $custom_vast_extension + * Optional. Custom XML to be rendered in a custom VAST response at serving + * time. + * @type bool $sponsorship_exclusivity_enabled + * Optional. Whether the line item is enabled for sponsorship exclusivity. If + * true, only exclusive sponsorships can be served on inventory targeted by + * this LineItem. This control should only be available for 100% video + * sponsorships. + * @type bool $repeated_creative_serving_enabled + * Optional. Indicates whether repeated creative serving is enabled for this + * line item. + * @type \Google\Ads\AdManager\V1\Targeting $targeting + * Required. Contains the targeting criteria for the ad campaign. + * @type \Google\Ads\AdManager\V1\CreativeTargeting[] $creative_targetings + * Optional. A list of CreativeTargeting objects that can be used to specify + * creative level targeting for this line item. Creative level targeting is + * specified in a + * [CreativePlaceholder.creative_targeting_display_name][google.ads.admanager.v1.CreativePlaceholder.creative_targeting_display_name] + * field by referencing the [CreativeTargeting.display_name][] field. It also + * needs to be re-specified in the + * [LineItemCreativeAssociation.targeting_display_name][] field when + * associating a line item with a creative that fits into that placeholder. + * @type int[] $allowed_formats + * Optional. The set of allowed formats for this line item. + * If empty, all formats are allowed. This property only applies + * to programmatic video line items. * } */ public function __construct($data = NULL) { @@ -198,8 +890,8 @@ public function setOrder($var) } /** - * Required. The name of the line item. This attribute is required and has a - * maximum length of 255 characters. + * Required. The name of the line item. This attribute has a maximum length of + * 255 characters. * * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -220,8 +912,8 @@ public function clearDisplayName() } /** - * Required. The name of the line item. This attribute is required and has a - * maximum length of 255 characters. + * Required. The name of the line item. This attribute has a maximum length of + * 255 characters. * * Generated from protobuf field optional string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -235,6 +927,80 @@ public function setDisplayName($var) return $this; } + /** + * Optional. An identifier for the LineItem that is meaningful to the + * publisher. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string external_line_item_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExternalLineItemId() + { + return isset($this->external_line_item_id) ? $this->external_line_item_id : ''; + } + + public function hasExternalLineItemId() + { + return isset($this->external_line_item_id); + } + + public function clearExternalLineItemId() + { + unset($this->external_line_item_id); + } + + /** + * Optional. An identifier for the LineItem that is meaningful to the + * publisher. This attribute has a maximum length of 255 characters. + * + * Generated from protobuf field optional string external_line_item_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExternalLineItemId($var) + { + GPBUtil::checkString($var, True); + $this->external_line_item_id = $var; + + return $this; + } + + /** + * Output only. The name of the Order. + * + * Generated from protobuf field optional string order_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getOrderDisplayName() + { + return isset($this->order_display_name) ? $this->order_display_name : ''; + } + + public function hasOrderDisplayName() + { + return isset($this->order_display_name); + } + + public function clearOrderDisplayName() + { + unset($this->order_display_name); + } + + /** + * Output only. The name of the Order. + * + * Generated from protobuf field optional string order_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setOrderDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->order_display_name = $var; + + return $this; + } + /** * Required. The date and time on which the LineItem is enabled to begin * serving. This attribute is required and must be in the future. @@ -273,9 +1039,55 @@ public function setStartTime($var) return $this; } + /** + * Optional. The target end time of the line item. This attribute is required + * unless + * [end_time_unlimited][google.ads.admanager.v1.LineItem.end_time_unlimited] + * is set to true. If specified, it must be after the + * [start_time][google.ads.admanager.v1.LineItem.start_time]. This does not + * include auto extension days. + * + * Generated from protobuf field optional .google.protobuf.Timestamp target_end_time = 95 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTargetEndTime() + { + return $this->target_end_time; + } + + public function hasTargetEndTime() + { + return isset($this->target_end_time); + } + + public function clearTargetEndTime() + { + unset($this->target_end_time); + } + + /** + * Optional. The target end time of the line item. This attribute is required + * unless + * [end_time_unlimited][google.ads.admanager.v1.LineItem.end_time_unlimited] + * is set to true. If specified, it must be after the + * [start_time][google.ads.admanager.v1.LineItem.start_time]. This does not + * include auto extension days. + * + * Generated from protobuf field optional .google.protobuf.Timestamp target_end_time = 95 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTargetEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->target_end_time = $var; + + return $this; + } + /** * Output only. The timestamp when the LineItem will stop serving. This - * attribute is read-only and includes auto extension days. + * attribute includes auto extension days. * * Generated from protobuf field optional .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Timestamp|null @@ -297,7 +1109,7 @@ public function clearEndTime() /** * Output only. The timestamp when the LineItem will stop serving. This - * attribute is read-only and includes auto extension days. + * attribute includes auto extension days. * * Generated from protobuf field optional .google.protobuf.Timestamp end_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Protobuf\Timestamp $var @@ -312,143 +1124,1719 @@ public function setEndTime($var) } /** - * Required. Indicates the line item type of a LineItem. This attribute is - * required. The line item type determines the default priority of the line - * item. More information can be found at - * https://support.google.com/admanager/answer/177279. + * Optional. The number of days to allow a line item to deliver past its + * [target_end_time][google.ads.admanager.v1.LineItem.target_end_time]. A + * maximum of 7 days is allowed. This is feature is only available for Ad + * Manager 360 accounts. * - * Generated from protobuf field optional .google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 17 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional int32 auto_extension_days = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ - public function getLineItemType() + public function getAutoExtensionDays() { - return isset($this->line_item_type) ? $this->line_item_type : 0; + return isset($this->auto_extension_days) ? $this->auto_extension_days : 0; } - public function hasLineItemType() + public function hasAutoExtensionDays() { - return isset($this->line_item_type); + return isset($this->auto_extension_days); } - public function clearLineItemType() + public function clearAutoExtensionDays() { - unset($this->line_item_type); + unset($this->auto_extension_days); } /** - * Required. Indicates the line item type of a LineItem. This attribute is - * required. The line item type determines the default priority of the line - * item. More information can be found at - * https://support.google.com/admanager/answer/177279. + * Optional. The number of days to allow a line item to deliver past its + * [target_end_time][google.ads.admanager.v1.LineItem.target_end_time]. A + * maximum of 7 days is allowed. This is feature is only available for Ad + * Manager 360 accounts. * - * Generated from protobuf field optional .google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 17 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field optional int32 auto_extension_days = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ - public function setLineItemType($var) + public function setAutoExtensionDays($var) { - GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\LineItemTypeEnum\LineItemType::class); - $this->line_item_type = $var; + GPBUtil::checkInt32($var); + $this->auto_extension_days = $var; return $this; } /** - * Required. The amount of money to spend per impression or click. + * Optional. Non-empty default. Specifies whether or not the LineItem has an + * end time. This attribute defaults to false. It can be be set to true for + * only line items of type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE. * - * Generated from protobuf field optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\Money|null + * Generated from protobuf field optional bool end_time_unlimited = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return bool */ - public function getRate() + public function getEndTimeUnlimited() { - return $this->rate; + return isset($this->end_time_unlimited) ? $this->end_time_unlimited : false; } - public function hasRate() + public function hasEndTimeUnlimited() { - return isset($this->rate); + return isset($this->end_time_unlimited); } - public function clearRate() + public function clearEndTimeUnlimited() { - unset($this->rate); + unset($this->end_time_unlimited); } /** - * Required. The amount of money to spend per impression or click. + * Optional. Non-empty default. Specifies whether or not the LineItem has an + * end time. This attribute defaults to false. It can be be set to true for + * only line items of type SPONSORSHIP, NETWORK, PRICE_PRIORITY and HOUSE. * - * Generated from protobuf field optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\Money $var + * Generated from protobuf field optional bool end_time_unlimited = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param bool $var * @return $this */ - public function setRate($var) + public function setEndTimeUnlimited($var) { - GPBUtil::checkMessage($var, \Google\Type\Money::class); + GPBUtil::checkBool($var); + $this->end_time_unlimited = $var; + + return $this; + } + + /** + * Required. The strategy used for displaying multiple Creative objects that + * are associated with the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCreativeRotationType() + { + return isset($this->creative_rotation_type) ? $this->creative_rotation_type : 0; + } + + public function hasCreativeRotationType() + { + return isset($this->creative_rotation_type); + } + + public function clearCreativeRotationType() + { + unset($this->creative_rotation_type); + } + + /** + * Required. The strategy used for displaying multiple Creative objects that + * are associated with the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CreativeRotationTypeEnum.CreativeRotationType creative_rotation_type = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCreativeRotationType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CreativeRotationTypeEnum\CreativeRotationType::class); + $this->creative_rotation_type = $var; + + return $this; + } + + /** + * Optional. Non-empty default. The strategy for delivering ads over the + * course of the line item's duration. This attribute defaults to EVENLY or + * FRONTLOADED depending on the network's configuration. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDeliveryRateTypeEnum.LineItemDeliveryRateType delivery_rate_type = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getDeliveryRateType() + { + return isset($this->delivery_rate_type) ? $this->delivery_rate_type : 0; + } + + public function hasDeliveryRateType() + { + return isset($this->delivery_rate_type); + } + + public function clearDeliveryRateType() + { + unset($this->delivery_rate_type); + } + + /** + * Optional. Non-empty default. The strategy for delivering ads over the + * course of the line item's duration. This attribute defaults to EVENLY or + * FRONTLOADED depending on the network's configuration. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDeliveryRateTypeEnum.LineItemDeliveryRateType delivery_rate_type = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setDeliveryRateType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\LineItemDeliveryRateTypeEnum\LineItemDeliveryRateType::class); + $this->delivery_rate_type = $var; + + return $this; + } + + /** + * Optional. Non-empty default. Strategy for choosing forecasted traffic + * shapes to pace line items. This field defaults to HISTORICAL. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDeliveryForecastSourceEnum.LineItemDeliveryForecastSource delivery_forecast_source = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getDeliveryForecastSource() + { + return isset($this->delivery_forecast_source) ? $this->delivery_forecast_source : 0; + } + + public function hasDeliveryForecastSource() + { + return isset($this->delivery_forecast_source); + } + + public function clearDeliveryForecastSource() + { + unset($this->delivery_forecast_source); + } + + /** + * Optional. Non-empty default. Strategy for choosing forecasted traffic + * shapes to pace line items. This field defaults to HISTORICAL. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDeliveryForecastSourceEnum.LineItemDeliveryForecastSource delivery_forecast_source = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setDeliveryForecastSource($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\LineItemDeliveryForecastSourceEnum\LineItemDeliveryForecastSource::class); + $this->delivery_forecast_source = $var; + + return $this; + } + + /** + * Optional. The curve that is used to pace the line item's delivery. This + * field is required if and only if the delivery forecast source is + * CUSTOM_PACING_CURVE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomPacingCurve custom_pacing_curve = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\CustomPacingCurve|null + */ + public function getCustomPacingCurve() + { + return $this->custom_pacing_curve; + } + + public function hasCustomPacingCurve() + { + return isset($this->custom_pacing_curve); + } + + public function clearCustomPacingCurve() + { + unset($this->custom_pacing_curve); + } + + /** + * Optional. The curve that is used to pace the line item's delivery. This + * field is required if and only if the delivery forecast source is + * CUSTOM_PACING_CURVE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CustomPacingCurve custom_pacing_curve = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CustomPacingCurve $var + * @return $this + */ + public function setCustomPacingCurve($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CustomPacingCurve::class); + $this->custom_pacing_curve = $var; + + return $this; + } + + /** + * Optional. Non-empty default. The strategy for serving roadblocked + * creatives, that is, instances where multiple creatives must be served + * together on a single web page. This attribute defaults to ONE_OR_MORE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.RoadblockingTypeEnum.RoadblockingType roadblocking_type = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getRoadblockingType() + { + return isset($this->roadblocking_type) ? $this->roadblocking_type : 0; + } + + public function hasRoadblockingType() + { + return isset($this->roadblocking_type); + } + + public function clearRoadblockingType() + { + unset($this->roadblocking_type); + } + + /** + * Optional. Non-empty default. The strategy for serving roadblocked + * creatives, that is, instances where multiple creatives must be served + * together on a single web page. This attribute defaults to ONE_OR_MORE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.RoadblockingTypeEnum.RoadblockingType roadblocking_type = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setRoadblockingType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\RoadblockingTypeEnum\RoadblockingType::class); + $this->roadblocking_type = $var; + + return $this; + } + + /** + * Optional. Non-empty default. The nature of the line item's creatives' + * skippability. This attribute is only applicable for video line items, and + * defaults to NOT_SKIPPABLE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SkippableAdTypeEnum.SkippableAdType skippable_ad_type = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getSkippableAdType() + { + return isset($this->skippable_ad_type) ? $this->skippable_ad_type : 0; + } + + public function hasSkippableAdType() + { + return isset($this->skippable_ad_type); + } + + public function clearSkippableAdType() + { + unset($this->skippable_ad_type); + } + + /** + * Optional. Non-empty default. The nature of the line item's creatives' + * skippability. This attribute is only applicable for video line items, and + * defaults to NOT_SKIPPABLE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SkippableAdTypeEnum.SkippableAdType skippable_ad_type = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setSkippableAdType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\SkippableAdTypeEnum\SkippableAdType::class); + $this->skippable_ad_type = $var; + + return $this; + } + + /** + * Optional. The set of frequency capping units for this LineItem. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.FrequencyCap frequency_caps = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Ads\AdManager\V1\FrequencyCap> + */ + public function getFrequencyCaps() + { + return $this->frequency_caps; + } + + /** + * Optional. The set of frequency capping units for this LineItem. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.FrequencyCap frequency_caps = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\FrequencyCap[] $var + * @return $this + */ + public function setFrequencyCaps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\FrequencyCap::class); + $this->frequency_caps = $arr; + + return $this; + } + + /** + * Required. Indicates the line item type of a LineItem. The line item type + * determines the default priority of the line item. More information can be + * found at https://support.google.com/admanager/answer/177279. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 17 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getLineItemType() + { + return isset($this->line_item_type) ? $this->line_item_type : 0; + } + + public function hasLineItemType() + { + return isset($this->line_item_type); + } + + public function clearLineItemType() + { + unset($this->line_item_type); + } + + /** + * Required. Indicates the line item type of a LineItem. The line item type + * determines the default priority of the line item. More information can be + * found at https://support.google.com/admanager/answer/177279. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemTypeEnum.LineItemType line_item_type = 17 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setLineItemType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\LineItemTypeEnum\LineItemType::class); + $this->line_item_type = $var; + + return $this; + } + + /** + * Optional. Non-empty default. The priority for the line item. Valid values + * range from 1 to 16. This field defaults to the default priority of the + * LineItemType. The following list shows the default, minimum, and maximum + * priority values are for each line item type: + * - LineItemType: default priority (minimum priority, maximum priority) + * - SPONSORSHIP: 4 (2, 5) + * - STANDARD: 8 (6, 10) + * - NETWORK: 12 (11, 14) + * - BULK: 12 (11, 14) + * - PRICE_PRIORITY: 12 (11, 14) + * - HOUSE: 16 (15, 16) + * - CLICK_TRACKING: 16 (1, 16) + * - AD_EXCHANGE: 12 (1, 16) + * - ADSENSE: 12 (1, 16) + * - BUMPER: 16 (15, 16) + * - ADMOB: 21 (1, 16) + * - PREFERRED_DEAL: 12 (12, 12) + * This field can only be edited by certain networks, otherwise a + * PermissionError will occur. + * + * Generated from protobuf field optional int32 priority = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getPriority() + { + return isset($this->priority) ? $this->priority : 0; + } + + public function hasPriority() + { + return isset($this->priority); + } + + public function clearPriority() + { + unset($this->priority); + } + + /** + * Optional. Non-empty default. The priority for the line item. Valid values + * range from 1 to 16. This field defaults to the default priority of the + * LineItemType. The following list shows the default, minimum, and maximum + * priority values are for each line item type: + * - LineItemType: default priority (minimum priority, maximum priority) + * - SPONSORSHIP: 4 (2, 5) + * - STANDARD: 8 (6, 10) + * - NETWORK: 12 (11, 14) + * - BULK: 12 (11, 14) + * - PRICE_PRIORITY: 12 (11, 14) + * - HOUSE: 16 (15, 16) + * - CLICK_TRACKING: 16 (1, 16) + * - AD_EXCHANGE: 12 (1, 16) + * - ADSENSE: 12 (1, 16) + * - BUMPER: 16 (15, 16) + * - ADMOB: 21 (1, 16) + * - PREFERRED_DEAL: 12 (12, 12) + * This field can only be edited by certain networks, otherwise a + * PermissionError will occur. + * + * Generated from protobuf field optional int32 priority = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkInt32($var); + $this->priority = $var; + + return $this; + } + + /** + * Required. The amount of money to spend per impression or click. + * + * Generated from protobuf field optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\Money|null + */ + public function getRate() + { + return $this->rate; + } + + public function hasRate() + { + return isset($this->rate); + } + + public function clearRate() + { + unset($this->rate); + } + + /** + * Required. The amount of money to spend per impression or click. + * + * Generated from protobuf field optional .google.type.Money rate = 20 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\Money $var + * @return $this + */ + public function setRate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); $this->rate = $var; return $this; } /** - * Output only. The amount of money allocated to the LineItem. This attribute - * is readonly and is populated by Google. The currency code is readonly. + * Optional. Non-empty default. An amount to help the adserver rank inventory. + * [value_cpm][google.ads.admanager.v1.LineItem.value_cpm] artificially raises + * the value of inventory over the + * [rate][google.ads.admanager.v1.LineItem.rate] but avoids raising the actual + * [rate][google.ads.admanager.v1.LineItem.rate]. This attribute defaults to a + * Money object in the local currency with units and nanos set to 0. + * + * Generated from protobuf field optional .google.type.Money value_cpm = 21 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return \Google\Type\Money|null + */ + public function getValueCpm() + { + return $this->value_cpm; + } + + public function hasValueCpm() + { + return isset($this->value_cpm); + } + + public function clearValueCpm() + { + unset($this->value_cpm); + } + + /** + * Optional. Non-empty default. An amount to help the adserver rank inventory. + * [value_cpm][google.ads.admanager.v1.LineItem.value_cpm] artificially raises + * the value of inventory over the + * [rate][google.ads.admanager.v1.LineItem.rate] but avoids raising the actual + * [rate][google.ads.admanager.v1.LineItem.rate]. This attribute defaults to a + * Money object in the local currency with units and nanos set to 0. + * + * Generated from protobuf field optional .google.type.Money value_cpm = 21 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param \Google\Type\Money $var + * @return $this + */ + public function setValueCpm($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->value_cpm = $var; + + return $this; + } + + /** + * Required. The method used for billing this LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 22 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getCostType() + { + return isset($this->cost_type) ? $this->cost_type : 0; + } + + public function hasCostType() + { + return isset($this->cost_type); + } + + public function clearCostType() + { + unset($this->cost_type); + } + + /** + * Required. The method used for billing this LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType cost_type = 22 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setCostType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\LineItemCostTypeEnum\LineItemCostType::class); + $this->cost_type = $var; + + return $this; + } + + /** + * Optional. Discount information for the line item. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDiscount discount = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\LineItemDiscount|null + */ + public function getDiscount() + { + return $this->discount; + } + + public function hasDiscount() + { + return isset($this->discount); + } + + public function clearDiscount() + { + unset($this->discount); + } + + /** + * Optional. Discount information for the line item. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDiscount discount = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\LineItemDiscount $var + * @return $this + */ + public function setDiscount($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\LineItemDiscount::class); + $this->discount = $var; + + return $this; + } + + /** + * Optional. This attribute is only applicable for certain line item types and + * acts as an "FYI" or note, which does not impact adserving or other backend + * systems. For SPONSORSHIP line items, this represents the minimum quantity, + * which is a lifetime impression volume goal for reporting purposes only. For + * STANDARD line items, this represent the contracted quantity, which is the + * number of units specified in the contract the advertiser has bought for + * this LineItem. This field is just a "FYI" for traffickers to manually + * intervene with the LineItem when needed. This attribute is only available + * for STANDARD line items if you have this feature enabled on your network. + * + * Generated from protobuf field optional int64 contracted_units_bought = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getContractedUnitsBought() + { + return isset($this->contracted_units_bought) ? $this->contracted_units_bought : 0; + } + + public function hasContractedUnitsBought() + { + return isset($this->contracted_units_bought); + } + + public function clearContractedUnitsBought() + { + unset($this->contracted_units_bought); + } + + /** + * Optional. This attribute is only applicable for certain line item types and + * acts as an "FYI" or note, which does not impact adserving or other backend + * systems. For SPONSORSHIP line items, this represents the minimum quantity, + * which is a lifetime impression volume goal for reporting purposes only. For + * STANDARD line items, this represent the contracted quantity, which is the + * number of units specified in the contract the advertiser has bought for + * this LineItem. This field is just a "FYI" for traffickers to manually + * intervene with the LineItem when needed. This attribute is only available + * for STANDARD line items if you have this feature enabled on your network. + * + * Generated from protobuf field optional int64 contracted_units_bought = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setContractedUnitsBought($var) + { + GPBUtil::checkInt64($var); + $this->contracted_units_bought = $var; + + return $this; + } + + /** + * Required. Details about the creatives that are expected to serve through + * this LineItem. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 25 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Ads\AdManager\V1\CreativePlaceholder> + */ + public function getCreativePlaceholders() + { + return $this->creative_placeholders; + } + + /** + * Required. Details about the creatives that are expected to serve through + * this LineItem. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativePlaceholder creative_placeholders = 25 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CreativePlaceholder[] $var + * @return $this + */ + public function setCreativePlaceholders($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreativePlaceholder::class); + $this->creative_placeholders = $arr; + + return $this; + } + + /** + * Optional. Non-empty default. The environment that the LineItem is + * targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, + * then this line item can only target AdUnits that have AdUnitSizes whose + * environmentType is also VIDEO_PLAYER. + * + * Generated from protobuf field optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getEnvironmentType() + { + return isset($this->environment_type) ? $this->environment_type : 0; + } + + public function hasEnvironmentType() + { + return isset($this->environment_type); + } + + public function clearEnvironmentType() + { + unset($this->environment_type); + } + + /** + * Optional. Non-empty default. The environment that the LineItem is + * targeting. The default value is BROWSER. If this value is VIDEO_PLAYER, + * then this line item can only target AdUnits that have AdUnitSizes whose + * environmentType is also VIDEO_PLAYER. + * + * Generated from protobuf field optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 26 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setEnvironmentType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\EnvironmentTypeEnum\EnvironmentType::class); + $this->environment_type = $var; + + return $this; + } + + /** + * Optional. The delivery option for companions. Setting this field is only + * meaningful if the following conditions are met: + * - The "Guaranteed roadblocks" feature is enabled on your network. + * - One of the following is true (both cannot be true, these are mutually + * exclusive). + * - The environmentType is VIDEO_PLAYER. + * - The roadblockingType is CREATIVE_SET. + * This field defaults to OPTIONAL if the conditions are met. + * In all other cases it defaults to UNKNOWN and is not meaningful. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CompanionDeliveryOptionEnum.CompanionDeliveryOption companion_delivery_option = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getCompanionDeliveryOption() + { + return isset($this->companion_delivery_option) ? $this->companion_delivery_option : 0; + } + + public function hasCompanionDeliveryOption() + { + return isset($this->companion_delivery_option); + } + + public function clearCompanionDeliveryOption() + { + unset($this->companion_delivery_option); + } + + /** + * Optional. The delivery option for companions. Setting this field is only + * meaningful if the following conditions are met: + * - The "Guaranteed roadblocks" feature is enabled on your network. + * - One of the following is true (both cannot be true, these are mutually + * exclusive). + * - The environmentType is VIDEO_PLAYER. + * - The roadblockingType is CREATIVE_SET. + * This field defaults to OPTIONAL if the conditions are met. + * In all other cases it defaults to UNKNOWN and is not meaningful. + * + * Generated from protobuf field optional .google.ads.admanager.v1.CompanionDeliveryOptionEnum.CompanionDeliveryOption companion_delivery_option = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setCompanionDeliveryOption($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\CompanionDeliveryOptionEnum\CompanionDeliveryOption::class); + $this->companion_delivery_option = $var; + + return $this; + } + + /** + * Input only. The flag indicates whether overbooking should be allowed when + * creating or updating reservations of line item types SPONSORSHIP and + * STANDARD. When true, operations on this line item will never + * trigger a ForecastError, which corresponds to an overbook warning in the + * UI. The default value is false. Note: this field won't persist on the + * line item itself, and the value will only affect the current request. + * + * Generated from protobuf field optional bool allow_overbook = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getAllowOverbook() + { + return isset($this->allow_overbook) ? $this->allow_overbook : false; + } + + public function hasAllowOverbook() + { + return isset($this->allow_overbook); + } + + public function clearAllowOverbook() + { + unset($this->allow_overbook); + } + + /** + * Input only. The flag indicates whether overbooking should be allowed when + * creating or updating reservations of line item types SPONSORSHIP and + * STANDARD. When true, operations on this line item will never + * trigger a ForecastError, which corresponds to an overbook warning in the + * UI. The default value is false. Note: this field won't persist on the + * line item itself, and the value will only affect the current request. + * + * Generated from protobuf field optional bool allow_overbook = 28 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAllowOverbook($var) + { + GPBUtil::checkBool($var); + $this->allow_overbook = $var; + + return $this; + } + + /** + * Input only. The flag indicates whether the inventory check should be + * skipped when creating or updating a line item. The default value is false. + * Note: this field won't persist on the line item itself, and the value will + * only affect the current request. + * + * Generated from protobuf field optional bool skip_inventory_check = 29 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getSkipInventoryCheck() + { + return isset($this->skip_inventory_check) ? $this->skip_inventory_check : false; + } + + public function hasSkipInventoryCheck() + { + return isset($this->skip_inventory_check); + } + + public function clearSkipInventoryCheck() + { + unset($this->skip_inventory_check); + } + + /** + * Input only. The flag indicates whether the inventory check should be + * skipped when creating or updating a line item. The default value is false. + * Note: this field won't persist on the line item itself, and the value will + * only affect the current request. + * + * Generated from protobuf field optional bool skip_inventory_check = 29 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSkipInventoryCheck($var) + { + GPBUtil::checkBool($var); + $this->skip_inventory_check = $var; + + return $this; + } + + /** + * Input only. True to skip checks for warnings from rules applied to line + * items targeting inventory shared by a distributor partner for cross selling + * when performing an action on this line item. The default is false. Note: + * this field won't persist on the line item itself, and the value will only + * affect the current request. + * + * Generated from protobuf field optional bool skip_cross_selling_rule_warning_checks = 30 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getSkipCrossSellingRuleWarningChecks() + { + return isset($this->skip_cross_selling_rule_warning_checks) ? $this->skip_cross_selling_rule_warning_checks : false; + } + + public function hasSkipCrossSellingRuleWarningChecks() + { + return isset($this->skip_cross_selling_rule_warning_checks); + } + + public function clearSkipCrossSellingRuleWarningChecks() + { + unset($this->skip_cross_selling_rule_warning_checks); + } + + /** + * Input only. True to skip checks for warnings from rules applied to line + * items targeting inventory shared by a distributor partner for cross selling + * when performing an action on this line item. The default is false. Note: + * this field won't persist on the line item itself, and the value will only + * affect the current request. + * + * Generated from protobuf field optional bool skip_cross_selling_rule_warning_checks = 30 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSkipCrossSellingRuleWarningChecks($var) + { + GPBUtil::checkBool($var); + $this->skip_cross_selling_rule_warning_checks = $var; + + return $this; + } + + /** + * Input only. The flag indicates whether inventory should be reserved when + * creating a line item of types SPONSORSHIP and STANDARD in an unapproved + * Order. The default value is false. + * + * Generated from protobuf field optional bool reserve_on_creation = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getReserveOnCreation() + { + return isset($this->reserve_on_creation) ? $this->reserve_on_creation : false; + } + + public function hasReserveOnCreation() + { + return isset($this->reserve_on_creation); + } + + public function clearReserveOnCreation() + { + unset($this->reserve_on_creation); + } + + /** + * Input only. The flag indicates whether inventory should be reserved when + * creating a line item of types SPONSORSHIP and STANDARD in an unapproved + * Order. The default value is false. + * + * Generated from protobuf field optional bool reserve_on_creation = 31 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReserveOnCreation($var) + { + GPBUtil::checkBool($var); + $this->reserve_on_creation = $var; + + return $this; + } + + /** + * Output only. Contains trafficking statistics for the line item. This will + * be empty in case there are no statistics for a line item yet. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemStats stats = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Ads\AdManager\V1\LineItemStats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Output only. Contains trafficking statistics for the line item. This will + * be empty in case there are no statistics for a line item yet. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemStats stats = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Ads\AdManager\V1\LineItemStats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\LineItemStats::class); + $this->stats = $var; + + return $this; + } + + /** + * Output only. Indicates how well the line item has been performing. This + * will be empty if the delivery indicator information is not available due to + * one of the following reasons: + * - The line item is not delivering. + * - The line item has an unlimited goal or cap. + * - The line item has a percentage based goal or cap. + * + * Generated from protobuf field optional .google.ads.admanager.v1.DeliveryIndicator delivery_indicator = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Ads\AdManager\V1\DeliveryIndicator|null + */ + public function getDeliveryIndicator() + { + return $this->delivery_indicator; + } + + public function hasDeliveryIndicator() + { + return isset($this->delivery_indicator); + } + + public function clearDeliveryIndicator() + { + unset($this->delivery_indicator); + } + + /** + * Output only. Indicates how well the line item has been performing. This + * will be empty if the delivery indicator information is not available due to + * one of the following reasons: + * - The line item is not delivering. + * - The line item has an unlimited goal or cap. + * - The line item has a percentage based goal or cap. + * + * Generated from protobuf field optional .google.ads.admanager.v1.DeliveryIndicator delivery_indicator = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Ads\AdManager\V1\DeliveryIndicator $var + * @return $this + */ + public function setDeliveryIndicator($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\DeliveryIndicator::class); + $this->delivery_indicator = $var; + + return $this; + } + + /** + * Output only. The amount of money allocated to the LineItem. This attribute + * is readonly and is populated by Google. The currency code is readonly. + * + * Generated from protobuf field optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Type\Money|null + */ + public function getBudget() + { + return $this->budget; + } + + public function hasBudget() + { + return isset($this->budget); + } + + public function clearBudget() + { + unset($this->budget); + } + + /** + * Output only. The amount of money allocated to the LineItem. This attribute + * is readonly and is populated by Google. The currency code is readonly. + * + * Generated from protobuf field optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Type\Money $var + * @return $this + */ + public function setBudget($var) + { + GPBUtil::checkMessage($var, \Google\Type\Money::class); + $this->budget = $var; + + return $this; + } + + /** + * Output only. The status of the LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemComputedStatusEnum.LineItemComputedStatus status = 36 [(.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 LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemComputedStatusEnum.LineItemComputedStatus status = 36 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\LineItemComputedStatusEnum\LineItemComputedStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. Describes whether or not inventory has been reserved for the + * LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemReservationStatusEnum.LineItemReservationStatus reservation_status = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReservationStatus() + { + return isset($this->reservation_status) ? $this->reservation_status : 0; + } + + public function hasReservationStatus() + { + return isset($this->reservation_status); + } + + public function clearReservationStatus() + { + unset($this->reservation_status); + } + + /** + * Output only. Describes whether or not inventory has been reserved for the + * LineItem. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemReservationStatusEnum.LineItemReservationStatus reservation_status = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReservationStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\LineItemReservationStatusEnum\LineItemReservationStatus::class); + $this->reservation_status = $var; + + return $this; + } + + /** + * Output only. The archival status of the LineItem. + * + * Generated from protobuf field optional bool archived = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getArchived() + { + return isset($this->archived) ? $this->archived : false; + } + + public function hasArchived() + { + return isset($this->archived); + } + + public function clearArchived() + { + unset($this->archived); + } + + /** + * Output only. The archival status of the LineItem. + * + * Generated from protobuf field optional bool archived = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setArchived($var) + { + GPBUtil::checkBool($var); + $this->archived = $var; + + return $this; + } + + /** + * Optional. The web property code used for dynamic allocation line items. + * This web property is only required with line item types AD_EXCHANGE and + * ADSENSE. + * + * Generated from protobuf field optional string web_property_code = 49 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getWebPropertyCode() + { + return isset($this->web_property_code) ? $this->web_property_code : ''; + } + + public function hasWebPropertyCode() + { + return isset($this->web_property_code); + } + + public function clearWebPropertyCode() + { + unset($this->web_property_code); + } + + /** + * Optional. The web property code used for dynamic allocation line items. + * This web property is only required with line item types AD_EXCHANGE and + * ADSENSE. + * + * Generated from protobuf field optional string web_property_code = 49 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setWebPropertyCode($var) + { + GPBUtil::checkString($var, True); + $this->web_property_code = $var; + + return $this; + } + + /** + * Optional. The set of labels applied directly to this line item. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 50 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Ads\AdManager\V1\AppliedLabel> + */ + public function getAppliedLabels() + { + return $this->applied_labels; + } + + /** + * Optional. The set of labels applied directly to this line item. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel applied_labels = 50 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\AppliedLabel[] $var + * @return $this + */ + public function setAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->applied_labels = $arr; + + return $this; + } + + /** + * Output only. Contains the set of labels inherited from the order that + * contains this line item and the advertiser that owns the order. If a label + * has been negated, only the negated label is returned. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Ads\AdManager\V1\AppliedLabel> + */ + public function getEffectiveAppliedLabels() + { + return $this->effective_applied_labels; + } + + /** + * Output only. Contains the set of labels inherited from the order that + * contains this line item and the advertiser that owns the order. If a label + * has been negated, only the negated label is returned. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.AppliedLabel effective_applied_labels = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Ads\AdManager\V1\AppliedLabel[] $var + * @return $this + */ + public function setEffectiveAppliedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\AppliedLabel::class); + $this->effective_applied_labels = $arr; + + return $this; + } + + /** + * Optional. If a line item has a series of competitive exclusions on it, it + * could be blocked from serving with line items from the same advertiser. + * Setting this to true will allow line items from the same advertiser to + * serve regardless of the other competitive exclusion labels being applied. + * + * Generated from protobuf field optional bool same_advertiser_exception_enabled = 52 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSameAdvertiserExceptionEnabled() + { + return isset($this->same_advertiser_exception_enabled) ? $this->same_advertiser_exception_enabled : false; + } + + public function hasSameAdvertiserExceptionEnabled() + { + return isset($this->same_advertiser_exception_enabled); + } + + public function clearSameAdvertiserExceptionEnabled() + { + unset($this->same_advertiser_exception_enabled); + } + + /** + * Optional. If a line item has a series of competitive exclusions on it, it + * could be blocked from serving with line items from the same advertiser. + * Setting this to true will allow line items from the same advertiser to + * serve regardless of the other competitive exclusion labels being applied. + * + * Generated from protobuf field optional bool same_advertiser_exception_enabled = 52 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSameAdvertiserExceptionEnabled($var) + { + GPBUtil::checkBool($var); + $this->same_advertiser_exception_enabled = $var; + + return $this; + } + + /** + * Output only. The application that last modified this line item. + * + * Generated from protobuf field optional string update_source = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUpdateSource() + { + return isset($this->update_source) ? $this->update_source : ''; + } + + public function hasUpdateSource() + { + return isset($this->update_source); + } + + public function clearUpdateSource() + { + unset($this->update_source); + } + + /** + * Output only. The application that last modified this line item. + * + * Generated from protobuf field optional string update_source = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUpdateSource($var) + { + GPBUtil::checkString($var, True); + $this->update_source = $var; + + return $this; + } + + /** + * Optional. Provides any additional notes that may annotate the LineItem. + * This attribute has a maximum length of 65,535 characters. + * + * Generated from protobuf field optional string notes = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNotes() + { + return isset($this->notes) ? $this->notes : ''; + } + + public function hasNotes() + { + return isset($this->notes); + } + + public function clearNotes() + { + unset($this->notes); + } + + /** + * Optional. Provides any additional notes that may annotate the LineItem. + * This attribute has a maximum length of 65,535 characters. + * + * Generated from protobuf field optional string notes = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNotes($var) + { + GPBUtil::checkString($var, True); + $this->notes = $var; + + return $this; + } + + /** + * Optional. Non-empty default. The CompetitiveConstraintScope for the + * competitive exclusion labels assigned to this line item. This field + * defaults to POD. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ExclusionScopeEnum.ExclusionScope competitive_constraint_scope = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getCompetitiveConstraintScope() + { + return isset($this->competitive_constraint_scope) ? $this->competitive_constraint_scope : 0; + } + + public function hasCompetitiveConstraintScope() + { + return isset($this->competitive_constraint_scope); + } + + public function clearCompetitiveConstraintScope() + { + unset($this->competitive_constraint_scope); + } + + /** + * Optional. Non-empty default. The CompetitiveConstraintScope for the + * competitive exclusion labels assigned to this line item. This field + * defaults to POD. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ExclusionScopeEnum.ExclusionScope competitive_constraint_scope = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setCompetitiveConstraintScope($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ExclusionScopeEnum\ExclusionScope::class); + $this->competitive_constraint_scope = $var; + + return $this; + } + + /** + * Output only. The time this line item was last modified. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 57 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time this line item was last modified. + * + * Generated from protobuf field optional .google.protobuf.Timestamp update_time = 57 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The time this line item was created. + * + * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 58 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time this line item was created. + * + * Generated from protobuf field optional .google.protobuf.Timestamp create_time = 58 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. The values of the custom fields associated with this line item. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Ads\AdManager\V1\CustomFieldValue> + */ + public function getCustomFieldValues() + { + return $this->custom_field_values; + } + + /** + * Optional. The values of the custom fields associated with this line item. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CustomFieldValue[] $var + * @return $this + */ + public function setCustomFieldValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomFieldValue::class); + $this->custom_field_values = $arr; + + return $this; + } + + /** + * Output only. Indicates if a LineItem is missing any Creative creatives for + * the creativePlaceholders specified. Creative Creatives can be considered + * missing for several reasons including: + * - Not enough Creative creatives of a certain size have been uploaded, as + * determined by + * [expected_creative_count][google.ads.admanager.v1.CreativePlaceholder.expected_creative_count]. + * For example a LineItem specifies 750x350, 400x200 but only a 750x350 was + * uploaded. Or LineItem specifies 750x350 with an expected count of 2, but + * only one was uploaded. + * - The [Creative.applied_labels][] of an associated Creative don't match + * the + * [CreativePlaceholder.applied_labels][google.ads.admanager.v1.CreativePlaceholder.applied_labels] + * of the LineItem. For example LineItem specifies 750x350 with a Foo + * AppliedLabel but a 750x350 creative without a AppliedLabel was uploaded. + * + * Generated from protobuf field optional bool missing_creatives = 61 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getMissingCreatives() + { + return isset($this->missing_creatives) ? $this->missing_creatives : false; + } + + public function hasMissingCreatives() + { + return isset($this->missing_creatives); + } + + public function clearMissingCreatives() + { + unset($this->missing_creatives); + } + + /** + * Output only. Indicates if a LineItem is missing any Creative creatives for + * the creativePlaceholders specified. Creative Creatives can be considered + * missing for several reasons including: + * - Not enough Creative creatives of a certain size have been uploaded, as + * determined by + * [expected_creative_count][google.ads.admanager.v1.CreativePlaceholder.expected_creative_count]. + * For example a LineItem specifies 750x350, 400x200 but only a 750x350 was + * uploaded. Or LineItem specifies 750x350 with an expected count of 2, but + * only one was uploaded. + * - The [Creative.applied_labels][] of an associated Creative don't match + * the + * [CreativePlaceholder.applied_labels][google.ads.admanager.v1.CreativePlaceholder.applied_labels] + * of the LineItem. For example LineItem specifies 750x350 with a Foo + * AppliedLabel but a 750x350 creative without a AppliedLabel was uploaded. + * + * Generated from protobuf field optional bool missing_creatives = 61 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setMissingCreatives($var) + { + GPBUtil::checkBool($var); + $this->missing_creatives = $var; + + return $this; + } + + /** + * Optional. Third party auto-pixeling settings for cross-sell Partners. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ThirdPartyMeasurementSettings third_party_measurement_settings = 67 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\ThirdPartyMeasurementSettings|null + */ + public function getThirdPartyMeasurementSettings() + { + return $this->third_party_measurement_settings; + } + + public function hasThirdPartyMeasurementSettings() + { + return isset($this->third_party_measurement_settings); + } + + public function clearThirdPartyMeasurementSettings() + { + unset($this->third_party_measurement_settings); + } + + /** + * Optional. Third party auto-pixeling settings for cross-sell Partners. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ThirdPartyMeasurementSettings third_party_measurement_settings = 67 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\ThirdPartyMeasurementSettings $var + * @return $this + */ + public function setThirdPartyMeasurementSettings($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\ThirdPartyMeasurementSettings::class); + $this->third_party_measurement_settings = $var; + + return $this; + } + + /** + * Optional. Designates this line item as intended for YT Kids app. If true, + * all creatives associated with this line item must be reviewed and approved. + * See the help center article for more information: + * https://support.google.com/yt-partner-sales/answer/10015534. * - * Generated from protobuf field optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Type\Money|null + * Generated from protobuf field optional bool youtube_kids_restricted = 74 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool */ - public function getBudget() + public function getYoutubeKidsRestricted() { - return $this->budget; + return isset($this->youtube_kids_restricted) ? $this->youtube_kids_restricted : false; } - public function hasBudget() + public function hasYoutubeKidsRestricted() { - return isset($this->budget); + return isset($this->youtube_kids_restricted); } - public function clearBudget() + public function clearYoutubeKidsRestricted() { - unset($this->budget); + unset($this->youtube_kids_restricted); } /** - * Output only. The amount of money allocated to the LineItem. This attribute - * is readonly and is populated by Google. The currency code is readonly. + * Optional. Designates this line item as intended for YT Kids app. If true, + * all creatives associated with this line item must be reviewed and approved. + * See the help center article for more information: + * https://support.google.com/yt-partner-sales/answer/10015534. * - * Generated from protobuf field optional .google.type.Money budget = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Type\Money $var + * Generated from protobuf field optional bool youtube_kids_restricted = 74 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var * @return $this */ - public function setBudget($var) + public function setYoutubeKidsRestricted($var) { - GPBUtil::checkMessage($var, \Google\Type\Money::class); - $this->budget = $var; + GPBUtil::checkBool($var); + $this->youtube_kids_restricted = $var; return $this; } /** - * Optional. The values of the custom fields associated with this line item. + * Optional. The max duration of a video creative associated with this + * LineItem. This attribute is only meaningful for video line items. This + * attribute is required for video line items and must be greater than 0. * - * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Ads\AdManager\V1\CustomFieldValue> + * Generated from protobuf field optional .google.protobuf.Duration max_video_creative_duration = 75 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null */ - public function getCustomFieldValues() + public function getMaxVideoCreativeDuration() { - return $this->custom_field_values; + return $this->max_video_creative_duration; + } + + public function hasMaxVideoCreativeDuration() + { + return isset($this->max_video_creative_duration); + } + + public function clearMaxVideoCreativeDuration() + { + unset($this->max_video_creative_duration); } /** - * Optional. The values of the custom fields associated with this line item. + * Optional. The max duration of a video creative associated with this + * LineItem. This attribute is only meaningful for video line items. This + * attribute is required for video line items and must be greater than 0. * - * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 59 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Ads\AdManager\V1\CustomFieldValue[] $var + * Generated from protobuf field optional .google.protobuf.Duration max_video_creative_duration = 75 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var * @return $this */ - public function setCustomFieldValues($var) + public function setMaxVideoCreativeDuration($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CustomFieldValue::class); - $this->custom_field_values = $arr; + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->max_video_creative_duration = $var; return $this; } @@ -491,5 +2879,405 @@ public function setGoal($var) return $this; } + /** + * Optional. The secondary goals that this LineItem is associated with. This + * is required and meaningful only if the + * [line_item_type][google.ads.admanager.v1.LineItem.line_item_type] is + * SPONSORSHIP and [cost_type][google.ads.admanager.v1.LineItem.cost_type] is + * CPM. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Goal secondary_goals = 100 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Ads\AdManager\V1\Goal> + */ + public function getSecondaryGoals() + { + return $this->secondary_goals; + } + + /** + * Optional. The secondary goals that this LineItem is associated with. This + * is required and meaningful only if the + * [line_item_type][google.ads.admanager.v1.LineItem.line_item_type] is + * SPONSORSHIP and [cost_type][google.ads.admanager.v1.LineItem.cost_type] is + * CPM. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Goal secondary_goals = 100 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\Goal[] $var + * @return $this + */ + public function setSecondaryGoals($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Goal::class); + $this->secondary_goals = $arr; + + return $this; + } + + /** + * Optional. Contains the information for a line item which has a target GRP + * demographic. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpSettings grp_settings = 78 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\GrpSettings|null + */ + public function getGrpSettings() + { + return $this->grp_settings; + } + + public function hasGrpSettings() + { + return isset($this->grp_settings); + } + + public function clearGrpSettings() + { + unset($this->grp_settings); + } + + /** + * Optional. Contains the information for a line item which has a target GRP + * demographic. + * + * Generated from protobuf field optional .google.ads.admanager.v1.GrpSettings grp_settings = 78 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\GrpSettings $var + * @return $this + */ + public function setGrpSettings($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\GrpSettings::class); + $this->grp_settings = $var; + + return $this; + } + + /** + * Optional. The deal information associated with this line item, if it is + * programmatic. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDealInfo deal_info = 79 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Ads\AdManager\V1\LineItemDealInfo|null + */ + public function getDealInfo() + { + return $this->deal_info; + } + + public function hasDealInfo() + { + return isset($this->deal_info); + } + + public function clearDealInfo() + { + unset($this->deal_info); + } + + /** + * Optional. The deal information associated with this line item, if it is + * programmatic. + * + * Generated from protobuf field optional .google.ads.admanager.v1.LineItemDealInfo deal_info = 79 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\LineItemDealInfo $var + * @return $this + */ + public function setDealInfo($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\LineItemDealInfo::class); + $this->deal_info = $var; + + return $this; + } + + /** + * Optional. Optional IDs of the Company that provide ad verification for this + * line item. + * + * Generated from protobuf field repeated string viewability_provider_companies = 85 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getViewabilityProviderCompanies() + { + return $this->viewability_provider_companies; + } + + /** + * Optional. Optional IDs of the Company that provide ad verification for this + * line item. + * + * Generated from protobuf field repeated string viewability_provider_companies = 85 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setViewabilityProviderCompanies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->viewability_provider_companies = $arr; + + return $this; + } + + /** + * Optional. Non-empty default. Child content eligibility designation for this + * line item. This field defaults to DISALLOWED. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ChildContentEligibilityEnum.ChildContentEligibility child_content_eligibility = 86 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @return int + */ + public function getChildContentEligibility() + { + return isset($this->child_content_eligibility) ? $this->child_content_eligibility : 0; + } + + public function hasChildContentEligibility() + { + return isset($this->child_content_eligibility); + } + + public function clearChildContentEligibility() + { + unset($this->child_content_eligibility); + } + + /** + * Optional. Non-empty default. Child content eligibility designation for this + * line item. This field defaults to DISALLOWED. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ChildContentEligibilityEnum.ChildContentEligibility child_content_eligibility = 86 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = NON_EMPTY_DEFAULT]; + * @param int $var + * @return $this + */ + public function setChildContentEligibility($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ChildContentEligibilityEnum\ChildContentEligibility::class); + $this->child_content_eligibility = $var; + + return $this; + } + + /** + * Optional. Custom XML to be rendered in a custom VAST response at serving + * time. + * + * Generated from protobuf field optional string custom_vast_extension = 88 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCustomVastExtension() + { + return isset($this->custom_vast_extension) ? $this->custom_vast_extension : ''; + } + + public function hasCustomVastExtension() + { + return isset($this->custom_vast_extension); + } + + public function clearCustomVastExtension() + { + unset($this->custom_vast_extension); + } + + /** + * Optional. Custom XML to be rendered in a custom VAST response at serving + * time. + * + * Generated from protobuf field optional string custom_vast_extension = 88 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCustomVastExtension($var) + { + GPBUtil::checkString($var, True); + $this->custom_vast_extension = $var; + + return $this; + } + + /** + * Optional. Whether the line item is enabled for sponsorship exclusivity. If + * true, only exclusive sponsorships can be served on inventory targeted by + * this LineItem. This control should only be available for 100% video + * sponsorships. + * + * Generated from protobuf field optional bool sponsorship_exclusivity_enabled = 89 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSponsorshipExclusivityEnabled() + { + return isset($this->sponsorship_exclusivity_enabled) ? $this->sponsorship_exclusivity_enabled : false; + } + + public function hasSponsorshipExclusivityEnabled() + { + return isset($this->sponsorship_exclusivity_enabled); + } + + public function clearSponsorshipExclusivityEnabled() + { + unset($this->sponsorship_exclusivity_enabled); + } + + /** + * Optional. Whether the line item is enabled for sponsorship exclusivity. If + * true, only exclusive sponsorships can be served on inventory targeted by + * this LineItem. This control should only be available for 100% video + * sponsorships. + * + * Generated from protobuf field optional bool sponsorship_exclusivity_enabled = 89 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSponsorshipExclusivityEnabled($var) + { + GPBUtil::checkBool($var); + $this->sponsorship_exclusivity_enabled = $var; + + return $this; + } + + /** + * Optional. Indicates whether repeated creative serving is enabled for this + * line item. + * + * Generated from protobuf field optional bool repeated_creative_serving_enabled = 90 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getRepeatedCreativeServingEnabled() + { + return isset($this->repeated_creative_serving_enabled) ? $this->repeated_creative_serving_enabled : false; + } + + public function hasRepeatedCreativeServingEnabled() + { + return isset($this->repeated_creative_serving_enabled); + } + + public function clearRepeatedCreativeServingEnabled() + { + unset($this->repeated_creative_serving_enabled); + } + + /** + * Optional. Indicates whether repeated creative serving is enabled for this + * line item. + * + * Generated from protobuf field optional bool repeated_creative_serving_enabled = 90 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setRepeatedCreativeServingEnabled($var) + { + GPBUtil::checkBool($var); + $this->repeated_creative_serving_enabled = $var; + + return $this; + } + + /** + * Required. Contains the targeting criteria for the ad campaign. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Targeting targeting = 93 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Targeting|null + */ + public function getTargeting() + { + return $this->targeting; + } + + public function hasTargeting() + { + return isset($this->targeting); + } + + public function clearTargeting() + { + unset($this->targeting); + } + + /** + * Required. Contains the targeting criteria for the ad campaign. + * + * Generated from protobuf field optional .google.ads.admanager.v1.Targeting targeting = 93 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Targeting $var + * @return $this + */ + public function setTargeting($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Targeting::class); + $this->targeting = $var; + + return $this; + } + + /** + * Optional. A list of CreativeTargeting objects that can be used to specify + * creative level targeting for this line item. Creative level targeting is + * specified in a + * [CreativePlaceholder.creative_targeting_display_name][google.ads.admanager.v1.CreativePlaceholder.creative_targeting_display_name] + * field by referencing the [CreativeTargeting.display_name][] field. It also + * needs to be re-specified in the + * [LineItemCreativeAssociation.targeting_display_name][] field when + * associating a line item with a creative that fits into that placeholder. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTargeting creative_targetings = 94 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Ads\AdManager\V1\CreativeTargeting> + */ + public function getCreativeTargetings() + { + return $this->creative_targetings; + } + + /** + * Optional. A list of CreativeTargeting objects that can be used to specify + * creative level targeting for this line item. Creative level targeting is + * specified in a + * [CreativePlaceholder.creative_targeting_display_name][google.ads.admanager.v1.CreativePlaceholder.creative_targeting_display_name] + * field by referencing the [CreativeTargeting.display_name][] field. It also + * needs to be re-specified in the + * [LineItemCreativeAssociation.targeting_display_name][] field when + * associating a line item with a creative that fits into that placeholder. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeTargeting creative_targetings = 94 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Ads\AdManager\V1\CreativeTargeting[] $var + * @return $this + */ + public function setCreativeTargetings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreativeTargeting::class); + $this->creative_targetings = $arr; + + return $this; + } + + /** + * Optional. The set of allowed formats for this line item. + * If empty, all formats are allowed. This property only applies + * to programmatic video line items. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LineItemAllowedFormatEnum.LineItemAllowedFormat allowed_formats = 112 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getAllowedFormats() + { + return $this->allowed_formats; + } + + /** + * Optional. The set of allowed formats for this line item. + * If empty, all formats are allowed. This property only applies + * to programmatic video line items. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.LineItemAllowedFormatEnum.LineItemAllowedFormat allowed_formats = 112 [(.google.api.field_behavior) = OPTIONAL]; + * @param int[] $var + * @return $this + */ + public function setAllowedFormats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Ads\AdManager\V1\LineItemAllowedFormatEnum\LineItemAllowedFormat::class); + $this->allowed_formats = $arr; + + return $this; + } + } diff --git a/AdsAdManager/src/V1/LineItemAllowedFormatEnum.php b/AdsAdManager/src/V1/LineItemAllowedFormatEnum.php new file mode 100644 index 000000000000..dead5e895cdd --- /dev/null +++ b/AdsAdManager/src/V1/LineItemAllowedFormatEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.LineItemAllowedFormatEnum + */ +class LineItemAllowedFormatEnum 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\LineItemAllowedFormatEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/LineItemAllowedFormatEnum/LineItemAllowedFormat.php b/AdsAdManager/src/V1/LineItemAllowedFormatEnum/LineItemAllowedFormat.php new file mode 100644 index 000000000000..a0006d898669 --- /dev/null +++ b/AdsAdManager/src/V1/LineItemAllowedFormatEnum/LineItemAllowedFormat.php @@ -0,0 +1,69 @@ +google.ads.admanager.v1.LineItemAllowedFormatEnum.LineItemAllowedFormat + */ +class LineItemAllowedFormat +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum LINE_ITEM_ALLOWED_FORMAT_UNSPECIFIED = 0; + */ + const LINE_ITEM_ALLOWED_FORMAT_UNSPECIFIED = 0; + /** + * Audio format. + * + * Generated from protobuf enum AUDIO = 1; + */ + const AUDIO = 1; + /** + * Video format. + * + * Generated from protobuf enum VIDEO = 2; + */ + const VIDEO = 2; + /** + * Display format. + * + * Generated from protobuf enum DISPLAY = 3; + */ + const DISPLAY = 3; + + private static $valueToName = [ + self::LINE_ITEM_ALLOWED_FORMAT_UNSPECIFIED => 'LINE_ITEM_ALLOWED_FORMAT_UNSPECIFIED', + self::AUDIO => 'AUDIO', + self::VIDEO => 'VIDEO', + self::DISPLAY => 'DISPLAY', + ]; + + 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/LineItemComputedStatusEnum.php b/AdsAdManager/src/V1/LineItemComputedStatusEnum.php new file mode 100644 index 000000000000..c5f0afea0a1e --- /dev/null +++ b/AdsAdManager/src/V1/LineItemComputedStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.LineItemComputedStatusEnum + */ +class LineItemComputedStatusEnum 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\LineItemEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/LineItemComputedStatusEnum/LineItemComputedStatus.php b/AdsAdManager/src/V1/LineItemComputedStatusEnum/LineItemComputedStatus.php new file mode 100644 index 000000000000..142e7c710fbd --- /dev/null +++ b/AdsAdManager/src/V1/LineItemComputedStatusEnum/LineItemComputedStatus.php @@ -0,0 +1,129 @@ +google.ads.admanager.v1.LineItemComputedStatusEnum.LineItemComputedStatus + */ +class LineItemComputedStatus +{ + /** + * No value specified. + * + * Generated from protobuf enum LINE_ITEM_COMPUTED_STATUS_UNSPECIFIED = 0; + */ + const LINE_ITEM_COMPUTED_STATUS_UNSPECIFIED = 0; + /** + * The LineItem has been canceled and is no longer eligible to serve. This + * is a legacy status. + * + * Generated from protobuf enum CANCELED = 1; + */ + const CANCELED = 1; + /** + * The LineItem has completed its run. + * + * Generated from protobuf enum COMPLETED = 2; + */ + const COMPLETED = 2; + /** + * The LineItem has begun serving. + * + * Generated from protobuf enum DELIVERING = 3; + */ + const DELIVERING = 3; + /** + * The LineItem has past its endDateTime with an auto extension, but hasn't + * met its goal. + * + * Generated from protobuf enum DELIVERY_EXTENDED = 4; + */ + const DELIVERY_EXTENDED = 4; + /** + * The LineItem has been disapproved and is not eligible to serve. + * + * Generated from protobuf enum DISAPPROVED = 5; + */ + const DISAPPROVED = 5; + /** + * The LineItem is still being drafted. + * + * Generated from protobuf enum DRAFT = 6; + */ + const DRAFT = 6; + /** + * The LineItem is inactive. It is either caused by missing creatives or the + * network disabling auto-activation. + * + * Generated from protobuf enum INACTIVE = 7; + */ + const INACTIVE = 7; + /** + * The LineItem has been paused from serving. + * + * Generated from protobuf enum PAUSED = 8; + */ + const PAUSED = 8; + /** + * The LineItem has been paused and its reserved inventory has been + * released. The LineItem will not serve. + * + * Generated from protobuf enum PAUSED_INVENTORY_RELEASED = 9; + */ + const PAUSED_INVENTORY_RELEASED = 9; + /** + * The LineItem has been submitted for approval. + * + * Generated from protobuf enum PENDING_APPROVAL = 10; + */ + const PENDING_APPROVAL = 10; + /** + * The LineItem has been activated and is ready to serve. + * + * Generated from protobuf enum READY = 11; + */ + const READY = 11; + + private static $valueToName = [ + self::LINE_ITEM_COMPUTED_STATUS_UNSPECIFIED => 'LINE_ITEM_COMPUTED_STATUS_UNSPECIFIED', + self::CANCELED => 'CANCELED', + self::COMPLETED => 'COMPLETED', + self::DELIVERING => 'DELIVERING', + self::DELIVERY_EXTENDED => 'DELIVERY_EXTENDED', + self::DISAPPROVED => 'DISAPPROVED', + self::DRAFT => 'DRAFT', + self::INACTIVE => 'INACTIVE', + self::PAUSED => 'PAUSED', + self::PAUSED_INVENTORY_RELEASED => 'PAUSED_INVENTORY_RELEASED', + self::PENDING_APPROVAL => 'PENDING_APPROVAL', + self::READY => 'READY', + ]; + + 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/LineItemCostTypeEnum.php b/AdsAdManager/src/V1/LineItemCostTypeEnum.php new file mode 100644 index 000000000000..acedec7883cb --- /dev/null +++ b/AdsAdManager/src/V1/LineItemCostTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.LineItemCostTypeEnum + */ +class LineItemCostTypeEnum 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\LineItemEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/LineItemCostTypeEnum/LineItemCostType.php b/AdsAdManager/src/V1/LineItemCostTypeEnum/LineItemCostType.php new file mode 100644 index 000000000000..7c479717fc4b --- /dev/null +++ b/AdsAdManager/src/V1/LineItemCostTypeEnum/LineItemCostType.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.LineItemCostTypeEnum.LineItemCostType + */ +class LineItemCostType +{ + /** + * Not specified value. + * + * Generated from protobuf enum LINE_ITEM_COST_TYPE_UNSPECIFIED = 0; + */ + const LINE_ITEM_COST_TYPE_UNSPECIFIED = 0; + /** + * Starting February 22, 2024 the CPA LineItemCostType will only be read as + * part of Spotlight deprecation, learn more at: + * https://support.google.com/admanager/answer/7519021#spotlight + * Cost per action. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + * * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + * * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + * * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + * * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + * + * Generated from protobuf enum CPA = 1 [deprecated = true]; + */ + const CPA = 1; + /** + * Cost per click. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + * * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + * * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + * * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + * * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + * * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + * * [LineItemTypeEnum.LineItemType.HOUSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.HOUSE] + * + * Generated from protobuf enum CPC = 2; + */ + const CPC = 2; + /** + * Cost per day. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + * * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + * * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + * + * Generated from protobuf enum CPD = 3; + */ + const CPD = 3; + /** + * Cost per mille (thousand) impressions. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + * * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + * * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + * * [LineItemTypeEnum.LineItemType.BULK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.BULK] + * * [LineItemTypeEnum.LineItemType.NETWORK][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.NETWORK] + * * [LineItemTypeEnum.LineItemType.PRICE_PRIORITY][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.PRICE_PRIORITY] + * * [LineItemTypeEnum.LineItemType.HOUSE][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.HOUSE] + * + * Generated from protobuf enum CPM = 4; + */ + const CPM = 4; + /** + * Cost per mille (thousand) Active View viewable impressions. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + * * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + * + * Generated from protobuf enum VCPM = 5; + */ + const VCPM = 5; + /** + * Cost per millie (thousand) in-target impressions. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + * * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD] + * + * Generated from protobuf enum CPM_IN_TARGET = 6; + */ + const CPM_IN_TARGET = 6; + /** + * Cost for the entire flight of the deal. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be must be + * one of: + * * [LineItemTypeEnum.LineItemType.SPONSORSHIP][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.SPONSORSHIP] + * + * Generated from protobuf enum CPF = 7; + */ + const CPF = 7; + /** + * Cost per completed view. The line item + * [type][google.ads.admanager.v1.LineItem.line_item_type] must be one of: + * * [LineItemTypeEnum.LineItemType.STANDARD][google.ads.admanager.v1.LineItemTypeEnum.LineItemType.STANDARD]. + * + * Generated from protobuf enum CPCV = 8; + */ + const CPCV = 8; + + private static $valueToName = [ + self::LINE_ITEM_COST_TYPE_UNSPECIFIED => 'LINE_ITEM_COST_TYPE_UNSPECIFIED', + self::CPA => 'CPA', + self::CPC => 'CPC', + self::CPD => 'CPD', + self::CPM => 'CPM', + self::VCPM => 'VCPM', + self::CPM_IN_TARGET => 'CPM_IN_TARGET', + self::CPF => 'CPF', + self::CPCV => 'CPCV', + ]; + + 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/LineItemDealInfo.php b/AdsAdManager/src/V1/LineItemDealInfo.php new file mode 100644 index 000000000000..6092fcf5d00e --- /dev/null +++ b/AdsAdManager/src/V1/LineItemDealInfo.php @@ -0,0 +1,81 @@ +google.ads.admanager.v1.LineItemDealInfo + */ +class LineItemDealInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The external deal ID shared between seller and buyer. This field + * is only present if the deal has been finalized. + * + * Generated from protobuf field optional int64 external_deal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_deal_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $external_deal_id + * Optional. The external deal ID shared between seller and buyer. This field + * is only present if the deal has been finalized. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\LineItemDealInfo::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The external deal ID shared between seller and buyer. This field + * is only present if the deal has been finalized. + * + * Generated from protobuf field optional int64 external_deal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getExternalDealId() + { + return isset($this->external_deal_id) ? $this->external_deal_id : 0; + } + + public function hasExternalDealId() + { + return isset($this->external_deal_id); + } + + public function clearExternalDealId() + { + unset($this->external_deal_id); + } + + /** + * Optional. The external deal ID shared between seller and buyer. This field + * is only present if the deal has been finalized. + * + * Generated from protobuf field optional int64 external_deal_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setExternalDealId($var) + { + GPBUtil::checkInt64($var); + $this->external_deal_id = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/LineItemDeliveryForecastSourceEnum.php b/AdsAdManager/src/V1/LineItemDeliveryForecastSourceEnum.php new file mode 100644 index 000000000000..f4bd40bb6156 --- /dev/null +++ b/AdsAdManager/src/V1/LineItemDeliveryForecastSourceEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.LineItemDeliveryForecastSourceEnum + */ +class LineItemDeliveryForecastSourceEnum 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\LineItemDeliveryForecastSourceEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/LineItemDeliveryForecastSourceEnum/LineItemDeliveryForecastSource.php b/AdsAdManager/src/V1/LineItemDeliveryForecastSourceEnum/LineItemDeliveryForecastSource.php new file mode 100644 index 000000000000..092f670a0b2e --- /dev/null +++ b/AdsAdManager/src/V1/LineItemDeliveryForecastSourceEnum/LineItemDeliveryForecastSource.php @@ -0,0 +1,71 @@ +google.ads.admanager.v1.LineItemDeliveryForecastSourceEnum.LineItemDeliveryForecastSource + */ +class LineItemDeliveryForecastSource +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_FORECAST_SOURCE_UNSPECIFIED = 0; + */ + const LINE_ITEM_DELIVERY_FORECAST_SOURCE_UNSPECIFIED = 0; + /** + * A user specified custom pacing curve will be used to pace line item + * delivery. + * + * Generated from protobuf enum CUSTOM_PACING_CURVE = 1; + */ + const CUSTOM_PACING_CURVE = 1; + /** + * The line item's projected future traffic will be used to pace line item + * delivery. + * + * Generated from protobuf enum FORECASTING = 2; + */ + const FORECASTING = 2; + /** + * The line item's historical traffic shape will be used to pace line item + * delivery. + * + * Generated from protobuf enum HISTORICAL = 3; + */ + const HISTORICAL = 3; + + private static $valueToName = [ + self::LINE_ITEM_DELIVERY_FORECAST_SOURCE_UNSPECIFIED => 'LINE_ITEM_DELIVERY_FORECAST_SOURCE_UNSPECIFIED', + self::CUSTOM_PACING_CURVE => 'CUSTOM_PACING_CURVE', + self::FORECASTING => 'FORECASTING', + self::HISTORICAL => 'HISTORICAL', + ]; + + 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/LineItemDeliveryRateTypeEnum.php b/AdsAdManager/src/V1/LineItemDeliveryRateTypeEnum.php new file mode 100644 index 000000000000..1673fa2464a9 --- /dev/null +++ b/AdsAdManager/src/V1/LineItemDeliveryRateTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.LineItemDeliveryRateTypeEnum + */ +class LineItemDeliveryRateTypeEnum 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\DeliveryEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/LineItemDeliveryRateTypeEnum/LineItemDeliveryRateType.php b/AdsAdManager/src/V1/LineItemDeliveryRateTypeEnum/LineItemDeliveryRateType.php new file mode 100644 index 000000000000..1d66851f0ef8 --- /dev/null +++ b/AdsAdManager/src/V1/LineItemDeliveryRateTypeEnum/LineItemDeliveryRateType.php @@ -0,0 +1,74 @@ +google.ads.admanager.v1.LineItemDeliveryRateTypeEnum.LineItemDeliveryRateType + */ +class LineItemDeliveryRateType +{ + /** + * No value specified. + * + * Generated from protobuf enum LINE_ITEM_DELIVERY_RATE_TYPE_UNSPECIFIED = 0; + */ + const LINE_ITEM_DELIVERY_RATE_TYPE_UNSPECIFIED = 0; + /** + * The booked impressions may delivered well before the end time. Other + * lower-priority or lower-value LineItems will be stopped from delivering + * until the LineItem meets the number of impressions or clicks it is + * booked for. + * + * Generated from protobuf enum AS_FAST_AS_POSSIBLE = 3; + */ + const AS_FAST_AS_POSSIBLE = 3; + /** + * LineItems are served as evenly as possible across the number of days + * specified in a LineItem's duration. + * + * Generated from protobuf enum EVENLY = 1; + */ + const EVENLY = 1; + /** + * LineItems are served more aggressively in the beginning of the flight + * date. + * + * Generated from protobuf enum FRONTLOADED = 2; + */ + const FRONTLOADED = 2; + + private static $valueToName = [ + self::LINE_ITEM_DELIVERY_RATE_TYPE_UNSPECIFIED => 'LINE_ITEM_DELIVERY_RATE_TYPE_UNSPECIFIED', + self::AS_FAST_AS_POSSIBLE => 'AS_FAST_AS_POSSIBLE', + self::EVENLY => 'EVENLY', + self::FRONTLOADED => 'FRONTLOADED', + ]; + + 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/LineItemDiscount.php b/AdsAdManager/src/V1/LineItemDiscount.php new file mode 100644 index 000000000000..bf429b6ed29d --- /dev/null +++ b/AdsAdManager/src/V1/LineItemDiscount.php @@ -0,0 +1,137 @@ +google.ads.admanager.v1.LineItemDiscount + */ +class LineItemDiscount extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The type of discount being applied to a LineItem, either + * percentage based or absolute. This attribute is optional and defaults to + * PERCENTAGE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.DiscountTypeEnum.DiscountType discount_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $discount_type = null; + /** + * Optional. The number here is either a percentage or an absolute value + * depending on the DiscountType. If the DiscountType is PERCENTAGE, then only + * non-fractional values are supported. + * + * Generated from protobuf field optional double discount = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $discount = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $discount_type + * Optional. The type of discount being applied to a LineItem, either + * percentage based or absolute. This attribute is optional and defaults to + * PERCENTAGE. + * @type float $discount + * Optional. The number here is either a percentage or an absolute value + * depending on the DiscountType. If the DiscountType is PERCENTAGE, then only + * non-fractional values are supported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\LineItemDiscount::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The type of discount being applied to a LineItem, either + * percentage based or absolute. This attribute is optional and defaults to + * PERCENTAGE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.DiscountTypeEnum.DiscountType discount_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiscountType() + { + return isset($this->discount_type) ? $this->discount_type : 0; + } + + public function hasDiscountType() + { + return isset($this->discount_type); + } + + public function clearDiscountType() + { + unset($this->discount_type); + } + + /** + * Optional. The type of discount being applied to a LineItem, either + * percentage based or absolute. This attribute is optional and defaults to + * PERCENTAGE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.DiscountTypeEnum.DiscountType discount_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiscountType($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\DiscountTypeEnum\DiscountType::class); + $this->discount_type = $var; + + return $this; + } + + /** + * Optional. The number here is either a percentage or an absolute value + * depending on the DiscountType. If the DiscountType is PERCENTAGE, then only + * non-fractional values are supported. + * + * Generated from protobuf field optional double discount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getDiscount() + { + return isset($this->discount) ? $this->discount : 0.0; + } + + public function hasDiscount() + { + return isset($this->discount); + } + + public function clearDiscount() + { + unset($this->discount); + } + + /** + * Optional. The number here is either a percentage or an absolute value + * depending on the DiscountType. If the DiscountType is PERCENTAGE, then only + * non-fractional values are supported. + * + * Generated from protobuf field optional double discount = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setDiscount($var) + { + GPBUtil::checkDouble($var); + $this->discount = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/LineItemReservationStatusEnum.php b/AdsAdManager/src/V1/LineItemReservationStatusEnum.php new file mode 100644 index 000000000000..56798c245581 --- /dev/null +++ b/AdsAdManager/src/V1/LineItemReservationStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.LineItemReservationStatusEnum + */ +class LineItemReservationStatusEnum 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\LineItemEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/LineItemReservationStatusEnum/LineItemReservationStatus.php b/AdsAdManager/src/V1/LineItemReservationStatusEnum/LineItemReservationStatus.php new file mode 100644 index 000000000000..a125bf8effe8 --- /dev/null +++ b/AdsAdManager/src/V1/LineItemReservationStatusEnum/LineItemReservationStatus.php @@ -0,0 +1,61 @@ +google.ads.admanager.v1.LineItemReservationStatusEnum.LineItemReservationStatus + */ +class LineItemReservationStatus +{ + /** + * No value specified + * + * Generated from protobuf enum LINE_ITEM_RESERVATION_STATUS_UNSPECIFIED = 0; + */ + const LINE_ITEM_RESERVATION_STATUS_UNSPECIFIED = 0; + /** + * Indicates that inventory has been reserved for the line item. + * + * Generated from protobuf enum RESERVED = 1; + */ + const RESERVED = 1; + /** + * Indicates that inventory has not been reserved for the line item. + * + * Generated from protobuf enum UNRESERVED = 2; + */ + const UNRESERVED = 2; + + private static $valueToName = [ + self::LINE_ITEM_RESERVATION_STATUS_UNSPECIFIED => 'LINE_ITEM_RESERVATION_STATUS_UNSPECIFIED', + self::RESERVED => 'RESERVED', + self::UNRESERVED => 'UNRESERVED', + ]; + + 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/LineItemStats.php b/AdsAdManager/src/V1/LineItemStats.php new file mode 100644 index 000000000000..f42e10da686d --- /dev/null +++ b/AdsAdManager/src/V1/LineItemStats.php @@ -0,0 +1,291 @@ +google.ads.admanager.v1.LineItemStats + */ +class LineItemStats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The number of impressions delivered. + * + * Generated from protobuf field optional int64 impressions_delivered = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $impressions_delivered = null; + /** + * Output only. The number of clicks delivered + * + * Generated from protobuf field optional int64 clicks_delivered = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $clicks_delivered = null; + /** + * Output only. The number of video completions delivered. + * + * Generated from protobuf field optional int64 video_completions_delivered = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $video_completions_delivered = null; + /** + * Output only. The number of video starts delivered. + * + * Generated from protobuf field optional int64 video_starts_delivered = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $video_starts_delivered = null; + /** + * Output only. The number of viewable impressions delivered. + * + * Generated from protobuf field optional int64 viewable_impressions_delivered = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $viewable_impressions_delivered = null; + /** + * Output only. Clicks or impressions delivered for each of the last 7 days. + * Values are in chronological order (oldest to newest). + * + * Generated from protobuf field repeated int64 delivery_data = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $delivery_data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $impressions_delivered + * Output only. The number of impressions delivered. + * @type int|string $clicks_delivered + * Output only. The number of clicks delivered + * @type int|string $video_completions_delivered + * Output only. The number of video completions delivered. + * @type int|string $video_starts_delivered + * Output only. The number of video starts delivered. + * @type int|string $viewable_impressions_delivered + * Output only. The number of viewable impressions delivered. + * @type int[]|string[] $delivery_data + * Output only. Clicks or impressions delivered for each of the last 7 days. + * Values are in chronological order (oldest to newest). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\LineItemStats::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The number of impressions delivered. + * + * Generated from protobuf field optional int64 impressions_delivered = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getImpressionsDelivered() + { + return isset($this->impressions_delivered) ? $this->impressions_delivered : 0; + } + + public function hasImpressionsDelivered() + { + return isset($this->impressions_delivered); + } + + public function clearImpressionsDelivered() + { + unset($this->impressions_delivered); + } + + /** + * Output only. The number of impressions delivered. + * + * Generated from protobuf field optional int64 impressions_delivered = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setImpressionsDelivered($var) + { + GPBUtil::checkInt64($var); + $this->impressions_delivered = $var; + + return $this; + } + + /** + * Output only. The number of clicks delivered + * + * Generated from protobuf field optional int64 clicks_delivered = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getClicksDelivered() + { + return isset($this->clicks_delivered) ? $this->clicks_delivered : 0; + } + + public function hasClicksDelivered() + { + return isset($this->clicks_delivered); + } + + public function clearClicksDelivered() + { + unset($this->clicks_delivered); + } + + /** + * Output only. The number of clicks delivered + * + * Generated from protobuf field optional int64 clicks_delivered = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setClicksDelivered($var) + { + GPBUtil::checkInt64($var); + $this->clicks_delivered = $var; + + return $this; + } + + /** + * Output only. The number of video completions delivered. + * + * Generated from protobuf field optional int64 video_completions_delivered = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getVideoCompletionsDelivered() + { + return isset($this->video_completions_delivered) ? $this->video_completions_delivered : 0; + } + + public function hasVideoCompletionsDelivered() + { + return isset($this->video_completions_delivered); + } + + public function clearVideoCompletionsDelivered() + { + unset($this->video_completions_delivered); + } + + /** + * Output only. The number of video completions delivered. + * + * Generated from protobuf field optional int64 video_completions_delivered = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setVideoCompletionsDelivered($var) + { + GPBUtil::checkInt64($var); + $this->video_completions_delivered = $var; + + return $this; + } + + /** + * Output only. The number of video starts delivered. + * + * Generated from protobuf field optional int64 video_starts_delivered = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getVideoStartsDelivered() + { + return isset($this->video_starts_delivered) ? $this->video_starts_delivered : 0; + } + + public function hasVideoStartsDelivered() + { + return isset($this->video_starts_delivered); + } + + public function clearVideoStartsDelivered() + { + unset($this->video_starts_delivered); + } + + /** + * Output only. The number of video starts delivered. + * + * Generated from protobuf field optional int64 video_starts_delivered = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setVideoStartsDelivered($var) + { + GPBUtil::checkInt64($var); + $this->video_starts_delivered = $var; + + return $this; + } + + /** + * Output only. The number of viewable impressions delivered. + * + * Generated from protobuf field optional int64 viewable_impressions_delivered = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getViewableImpressionsDelivered() + { + return isset($this->viewable_impressions_delivered) ? $this->viewable_impressions_delivered : 0; + } + + public function hasViewableImpressionsDelivered() + { + return isset($this->viewable_impressions_delivered); + } + + public function clearViewableImpressionsDelivered() + { + unset($this->viewable_impressions_delivered); + } + + /** + * Output only. The number of viewable impressions delivered. + * + * Generated from protobuf field optional int64 viewable_impressions_delivered = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setViewableImpressionsDelivered($var) + { + GPBUtil::checkInt64($var); + $this->viewable_impressions_delivered = $var; + + return $this; + } + + /** + * Output only. Clicks or impressions delivered for each of the last 7 days. + * Values are in chronological order (oldest to newest). + * + * Generated from protobuf field repeated int64 delivery_data = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField|RepeatedField + */ + public function getDeliveryData() + { + return $this->delivery_data; + } + + /** + * Output only. Clicks or impressions delivered for each of the last 7 days. + * Values are in chronological order (oldest to newest). + * + * Generated from protobuf field repeated int64 delivery_data = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int[]|string[] $var + * @return $this + */ + public function setDeliveryData($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->delivery_data = $arr; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/ListCreativeSetsRequest.php b/AdsAdManager/src/V1/ListCreativeSetsRequest.php new file mode 100644 index 000000000000..a429130cdcbd --- /dev/null +++ b/AdsAdManager/src/V1/ListCreativeSetsRequest.php @@ -0,0 +1,328 @@ +google.ads.admanager.v1.ListCreativeSetsRequest + */ +class ListCreativeSetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of CreativeSets. + * 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 `CreativeSets` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CreativeSets` + * 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 `ListCreativeSets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeSets` 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 + * Filterable fields: + *
    + *
  • companionCreatives
  • + *
  • displayName
  • + *
  • masterCreative
  • + *
  • name
  • + *
  • updateTime
  • + *
+ * + * 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 CreativeSets. + * Format: `networks/{network_code}` + * Please see {@see CreativeSetServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListCreativeSetsRequest + * + * @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 CreativeSets. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `CreativeSets` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CreativeSets` + * 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 `ListCreativeSets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeSets` 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 + * Filterable fields: + *
    + *
  • companionCreatives
  • + *
  • displayName
  • + *
  • masterCreative
  • + *
  • name
  • + *
  • updateTime
  • + *
+ * @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\CreativeSetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of CreativeSets. + * 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 CreativeSets. + * 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 `CreativeSets` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CreativeSets` + * 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 `CreativeSets` to return. The service may + * return fewer than this value. If unspecified, at most 50 `CreativeSets` + * 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 `ListCreativeSets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeSets` 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 `ListCreativeSets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCreativeSets` 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 + * Filterable fields: + *
    + *
  • companionCreatives
  • + *
  • displayName
  • + *
  • masterCreative
  • + *
  • name
  • + *
  • updateTime
  • + *
+ * + * 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 + * Filterable fields: + *
    + *
  • companionCreatives
  • + *
  • displayName
  • + *
  • masterCreative
  • + *
  • name
  • + *
  • updateTime
  • + *
+ * + * 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/ListCreativeSetsResponse.php b/AdsAdManager/src/V1/ListCreativeSetsResponse.php new file mode 100644 index 000000000000..96a4d4e66598 --- /dev/null +++ b/AdsAdManager/src/V1/ListCreativeSetsResponse.php @@ -0,0 +1,172 @@ +google.ads.admanager.v1.ListCreativeSetsResponse + */ +class ListCreativeSetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `CreativeSet` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeSet creative_sets = 1; + */ + private $creative_sets; + /** + * 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 `CreativeSet` 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 \Google\Ads\AdManager\V1\CreativeSet[] $creative_sets + * The `CreativeSet` 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 `CreativeSet` 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\CreativeSetService::initOnce(); + parent::__construct($data); + } + + /** + * The `CreativeSet` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeSet creative_sets = 1; + * @return RepeatedField<\Google\Ads\AdManager\V1\CreativeSet> + */ + public function getCreativeSets() + { + return $this->creative_sets; + } + + /** + * The `CreativeSet` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.CreativeSet creative_sets = 1; + * @param \Google\Ads\AdManager\V1\CreativeSet[] $var + * @return $this + */ + public function setCreativeSets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\CreativeSet::class); + $this->creative_sets = $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 `CreativeSet` 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 `CreativeSet` 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/ListLineItemsRequest.php b/AdsAdManager/src/V1/ListLineItemsRequest.php index 9040120e2968..220a936c47cc 100644 --- a/AdsAdManager/src/V1/ListLineItemsRequest.php +++ b/AdsAdManager/src/V1/ListLineItemsRequest.php @@ -46,13 +46,40 @@ class ListLineItemsRequest extends \Google\Protobuf\Internal\Message * https://developers.google.com/ad-manager/api/beta/filters * Filterable fields: *
    + *
  • archived
  • + *
  • contractedUnitsBought
  • + *
  • costType
  • + *
  • createTime
  • + *
  • creativePlaceholders.size.canonicalName
  • + *
  • dealInfo.externalDealId
  • + *
  • deliveryRateType
  • *
  • displayName
  • *
  • endTime
  • + *
  • environmentType
  • + *
  • externalLineItemId
  • *
  • goal.units
  • + *
  • grpSettings.growbirdNielsenEnabled
  • + *
  • grpSettings.inTargetRatioEstimateMilliPercent
  • *
  • lineItemType
  • + *
  • missingCreatives
  • *
  • name
  • + *
  • notes
  • *
  • order
  • + *
  • orderDisplayName
  • + *
  • priority
  • + *
  • roadblockingType
  • *
  • startTime
  • + *
  • stats.clickThroughRate
  • + *
  • stats.clicksDelivered
  • + *
  • stats.impressionsDelivered
  • + *
  • stats.viewableImpressionsDelivered
  • + *
  • status
  • + *
  • targeting.inventoryTargeting.targetedAdUnits.adUnit
  • + *
  • targeting.inventoryTargeting.targetedPlacements
  • + *
  • targeting.mobileApplicationTargeting.firstPartyTargeting.targetedApplications
  • + *
  • updateSource
  • + *
  • updateTime
  • + *
  • webPropertyCode
  • *
* * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -113,13 +140,40 @@ public static function build(string $parent): self * https://developers.google.com/ad-manager/api/beta/filters * Filterable fields: *
    + *
  • archived
  • + *
  • contractedUnitsBought
  • + *
  • costType
  • + *
  • createTime
  • + *
  • creativePlaceholders.size.canonicalName
  • + *
  • dealInfo.externalDealId
  • + *
  • deliveryRateType
  • *
  • displayName
  • *
  • endTime
  • + *
  • environmentType
  • + *
  • externalLineItemId
  • *
  • goal.units
  • + *
  • grpSettings.growbirdNielsenEnabled
  • + *
  • grpSettings.inTargetRatioEstimateMilliPercent
  • *
  • lineItemType
  • + *
  • missingCreatives
  • *
  • name
  • + *
  • notes
  • *
  • order
  • + *
  • orderDisplayName
  • + *
  • priority
  • + *
  • roadblockingType
  • *
  • startTime
  • + *
  • stats.clickThroughRate
  • + *
  • stats.clicksDelivered
  • + *
  • stats.impressionsDelivered
  • + *
  • stats.viewableImpressionsDelivered
  • + *
  • status
  • + *
  • targeting.inventoryTargeting.targetedAdUnits.adUnit
  • + *
  • targeting.inventoryTargeting.targetedPlacements
  • + *
  • targeting.mobileApplicationTargeting.firstPartyTargeting.targetedApplications
  • + *
  • updateSource
  • + *
  • updateTime
  • + *
  • webPropertyCode
  • *
* @type string $order_by * Optional. Expression to specify sorting order. @@ -232,13 +286,40 @@ public function setPageToken($var) * https://developers.google.com/ad-manager/api/beta/filters * Filterable fields: *
    + *
  • archived
  • + *
  • contractedUnitsBought
  • + *
  • costType
  • + *
  • createTime
  • + *
  • creativePlaceholders.size.canonicalName
  • + *
  • dealInfo.externalDealId
  • + *
  • deliveryRateType
  • *
  • displayName
  • *
  • endTime
  • + *
  • environmentType
  • + *
  • externalLineItemId
  • *
  • goal.units
  • + *
  • grpSettings.growbirdNielsenEnabled
  • + *
  • grpSettings.inTargetRatioEstimateMilliPercent
  • *
  • lineItemType
  • + *
  • missingCreatives
  • *
  • name
  • + *
  • notes
  • *
  • order
  • + *
  • orderDisplayName
  • + *
  • priority
  • + *
  • roadblockingType
  • *
  • startTime
  • + *
  • stats.clickThroughRate
  • + *
  • stats.clicksDelivered
  • + *
  • stats.impressionsDelivered
  • + *
  • stats.viewableImpressionsDelivered
  • + *
  • status
  • + *
  • targeting.inventoryTargeting.targetedAdUnits.adUnit
  • + *
  • targeting.inventoryTargeting.targetedPlacements
  • + *
  • targeting.mobileApplicationTargeting.firstPartyTargeting.targetedApplications
  • + *
  • updateSource
  • + *
  • updateTime
  • + *
  • webPropertyCode
  • *
* * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -255,13 +336,40 @@ public function getFilter() * https://developers.google.com/ad-manager/api/beta/filters * Filterable fields: *
    + *
  • archived
  • + *
  • contractedUnitsBought
  • + *
  • costType
  • + *
  • createTime
  • + *
  • creativePlaceholders.size.canonicalName
  • + *
  • dealInfo.externalDealId
  • + *
  • deliveryRateType
  • *
  • displayName
  • *
  • endTime
  • + *
  • environmentType
  • + *
  • externalLineItemId
  • *
  • goal.units
  • + *
  • grpSettings.growbirdNielsenEnabled
  • + *
  • grpSettings.inTargetRatioEstimateMilliPercent
  • *
  • lineItemType
  • + *
  • missingCreatives
  • *
  • name
  • + *
  • notes
  • *
  • order
  • + *
  • orderDisplayName
  • + *
  • priority
  • + *
  • roadblockingType
  • *
  • startTime
  • + *
  • stats.clickThroughRate
  • + *
  • stats.clicksDelivered
  • + *
  • stats.impressionsDelivered
  • + *
  • stats.viewableImpressionsDelivered
  • + *
  • status
  • + *
  • targeting.inventoryTargeting.targetedAdUnits.adUnit
  • + *
  • targeting.inventoryTargeting.targetedPlacements
  • + *
  • targeting.mobileApplicationTargeting.firstPartyTargeting.targetedApplications
  • + *
  • updateSource
  • + *
  • updateTime
  • + *
  • webPropertyCode
  • *
* * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/AdsAdManager/src/V1/ListOrdersRequest.php b/AdsAdManager/src/V1/ListOrdersRequest.php index 7da30ceab33e..70b5aaad5487 100644 --- a/AdsAdManager/src/V1/ListOrdersRequest.php +++ b/AdsAdManager/src/V1/ListOrdersRequest.php @@ -54,6 +54,7 @@ class ListOrdersRequest extends \Google\Protobuf\Internal\Message *
  • displayName
  • *
  • endTime
  • *
  • externalOrderId
  • + *
  • impressionsDelivered
  • *
  • name
  • *
  • orderId
  • *
  • poNumber
  • @@ -63,6 +64,8 @@ class ListOrdersRequest extends \Google\Protobuf\Internal\Message *
  • secondaryTraffickers
  • *
  • startTime
  • *
  • status
  • + *
  • totalClicksDelivered
  • + *
  • totalViewableImpressionsDelivered
  • *
  • trafficker
  • *
  • updateTime
  • * @@ -133,6 +136,7 @@ public static function build(string $parent): self *
  • displayName
  • *
  • endTime
  • *
  • externalOrderId
  • + *
  • impressionsDelivered
  • *
  • name
  • *
  • orderId
  • *
  • poNumber
  • @@ -142,6 +146,8 @@ public static function build(string $parent): self *
  • secondaryTraffickers
  • *
  • startTime
  • *
  • status
  • + *
  • totalClicksDelivered
  • + *
  • totalViewableImpressionsDelivered
  • *
  • trafficker
  • *
  • updateTime
  • * @@ -264,6 +270,7 @@ public function setPageToken($var) *
  • displayName
  • *
  • endTime
  • *
  • externalOrderId
  • + *
  • impressionsDelivered
  • *
  • name
  • *
  • orderId
  • *
  • poNumber
  • @@ -273,6 +280,8 @@ public function setPageToken($var) *
  • secondaryTraffickers
  • *
  • startTime
  • *
  • status
  • + *
  • totalClicksDelivered
  • + *
  • totalViewableImpressionsDelivered
  • *
  • trafficker
  • *
  • updateTime
  • * @@ -299,6 +308,7 @@ public function getFilter() *
  • displayName
  • *
  • endTime
  • *
  • externalOrderId
  • + *
  • impressionsDelivered
  • *
  • name
  • *
  • orderId
  • *
  • poNumber
  • @@ -308,6 +318,8 @@ public function getFilter() *
  • secondaryTraffickers
  • *
  • startTime
  • *
  • status
  • + *
  • totalClicksDelivered
  • + *
  • totalViewableImpressionsDelivered
  • *
  • trafficker
  • *
  • updateTime
  • * diff --git a/AdsAdManager/src/V1/ListSlatesRequest.php b/AdsAdManager/src/V1/ListSlatesRequest.php new file mode 100644 index 000000000000..70c222d31d6f --- /dev/null +++ b/AdsAdManager/src/V1/ListSlatesRequest.php @@ -0,0 +1,312 @@ +google.ads.admanager.v1.ListSlatesRequest + */ +class ListSlatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource containing the Slates. + * 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 `Slates` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Slates` 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 `ListSlates` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSlates` 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://google.aip.dev/160 + * Filterable fields: + *
      + *
    • displayName
    • + *
    • name
    • + *
    • status
    • + *
    + * + * 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://google.aip.dev/132#ordering + * + * 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 resource containing the Slates. + * Format: `networks/{network_code}` + * Please see {@see SlateServiceClient::networkName()} for help formatting this field. + * + * @return \Google\Ads\AdManager\V1\ListSlatesRequest + * + * @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 resource containing the Slates. + * Format: `networks/{network_code}` + * @type int $page_size + * Optional. The maximum number of `Slates` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Slates` 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 `ListSlates` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSlates` must + * match the call that provided the page token. + * @type string $filter + * Optional. Expression to filter the response. + * See syntax details at https://google.aip.dev/160 + * Filterable fields: + *
      + *
    • displayName
    • + *
    • name
    • + *
    • status
    • + *
    + * @type string $order_by + * Optional. Expression to specify sorting order. + * See syntax details at https://google.aip.dev/132#ordering + * @type int $skip + * Optional. Number of individual resources to skip while paginating. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource containing the Slates. + * 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 containing the Slates. + * 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 `Slates` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Slates` 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 `Slates` to return. The service may return + * fewer than this value. If unspecified, at most 50 `Slates` 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 `ListSlates` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSlates` 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 `ListSlates` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListSlates` 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://google.aip.dev/160 + * Filterable fields: + *
      + *
    • displayName
    • + *
    • name
    • + *
    • status
    • + *
    + * + * 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://google.aip.dev/160 + * Filterable fields: + *
      + *
    • displayName
    • + *
    • name
    • + *
    • status
    • + *
    + * + * 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://google.aip.dev/132#ordering + * + * 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://google.aip.dev/132#ordering + * + * 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/ListSlatesResponse.php b/AdsAdManager/src/V1/ListSlatesResponse.php new file mode 100644 index 000000000000..8d56cebad5b6 --- /dev/null +++ b/AdsAdManager/src/V1/ListSlatesResponse.php @@ -0,0 +1,151 @@ +google.ads.admanager.v1.ListSlatesResponse + */ +class ListSlatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The `Slate` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + */ + private $slates; + /** + * A token that 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 `Slate` objects. + * If a filter was included in the request, this reflects the total number + * after filtering. + * `total_size` will not be returned if `skip` is nonzero. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Slate[] $slates + * The `Slate` objects from the specified network. + * @type string $next_page_token + * A token that 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 `Slate` objects. + * If a filter was included in the request, this reflects the total number + * after filtering. + * `total_size` will not be returned if `skip` is nonzero. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * The `Slate` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + * @return RepeatedField<\Google\Ads\AdManager\V1\Slate> + */ + public function getSlates() + { + return $this->slates; + } + + /** + * The `Slate` objects from the specified network. + * + * Generated from protobuf field repeated .google.ads.admanager.v1.Slate slates = 1; + * @param \Google\Ads\AdManager\V1\Slate[] $var + * @return $this + */ + public function setSlates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\AdManager\V1\Slate::class); + $this->slates = $arr; + + return $this; + } + + /** + * A token that 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 that 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 `Slate` objects. + * If a filter was included in the request, this reflects the total number + * after filtering. + * `total_size` will not be returned if `skip` is nonzero. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total number of `Slate` objects. + * If a filter was included in the request, this reflects the total number + * after filtering. + * `total_size` will not be returned if `skip` is nonzero. + * + * 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/MobileCarrierTargeting.php b/AdsAdManager/src/V1/MobileCarrierTargeting.php index cdf9d740f436..49340988c3f8 100644 --- a/AdsAdManager/src/V1/MobileCarrierTargeting.php +++ b/AdsAdManager/src/V1/MobileCarrierTargeting.php @@ -10,8 +10,7 @@ /** * Mobile Carrier Targeting. - * Can be used to target/exclude a variety of mobile carriers, such as AT&T, - * Verizon, or T-Mobile. + * Used to target or exclude mobile carriers. * * Generated from protobuf message google.ads.admanager.v1.MobileCarrierTargeting */ diff --git a/AdsAdManager/src/V1/NielsenCtvPacingEnum.php b/AdsAdManager/src/V1/NielsenCtvPacingEnum.php new file mode 100644 index 000000000000..69e7f0407758 --- /dev/null +++ b/AdsAdManager/src/V1/NielsenCtvPacingEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.NielsenCtvPacingEnum + */ +class NielsenCtvPacingEnum 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\NielsenCtvPacingEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/NielsenCtvPacingEnum/NielsenCtvPacing.php b/AdsAdManager/src/V1/NielsenCtvPacingEnum/NielsenCtvPacing.php new file mode 100644 index 000000000000..1e2cf3c3ffca --- /dev/null +++ b/AdsAdManager/src/V1/NielsenCtvPacingEnum/NielsenCtvPacing.php @@ -0,0 +1,73 @@ +google.ads.admanager.v1.NielsenCtvPacingEnum.NielsenCtvPacing + */ +class NielsenCtvPacing +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum NIELSEN_CTV_PACING_UNSPECIFIED = 0; + */ + const NIELSEN_CTV_PACING_UNSPECIFIED = 0; + /** + * Indicates that Nielsen impressions on connected devices are included, and + * we apply coviewing in pacing. + * + * Generated from protobuf enum COVIEW = 1; + */ + const COVIEW = 1; + /** + * The value returned if Nielsen measurement is disabled for connected + * devices. + * + * Generated from protobuf enum NONE = 2; + */ + const NONE = 2; + /** + * Indicates that Nielsen impressions on connected devices are included, and + * we apply strict coviewing in pacing. + * + * Generated from protobuf enum STRICT_COVIEW = 3; + */ + const STRICT_COVIEW = 3; + + private static $valueToName = [ + self::NIELSEN_CTV_PACING_UNSPECIFIED => 'NIELSEN_CTV_PACING_UNSPECIFIED', + self::COVIEW => 'COVIEW', + self::NONE => 'NONE', + self::STRICT_COVIEW => 'STRICT_COVIEW', + ]; + + 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/Order.php b/AdsAdManager/src/V1/Order.php index d98ab5f36563..9847581d9e58 100644 --- a/AdsAdManager/src/V1/Order.php +++ b/AdsAdManager/src/V1/Order.php @@ -219,6 +219,28 @@ class Order extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.ads.admanager.v1.CustomFieldValue custom_field_values = 38 [(.google.api.field_behavior) = OPTIONAL]; */ private $custom_field_values; + /** + * Output only. The total number of impressions delivered for Line items in + * this order. + * + * Generated from protobuf field optional int64 impressions_delivered = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $impressions_delivered = null; + /** + * Output only. Total clicks delivered for all Line items of this `Order`. + * This value is calculated from the associated `LineItem` values. + * + * Generated from protobuf field optional int64 total_clicks_delivered = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_clicks_delivered = null; + /** + * Output only. Total viewable impressions delivered for all Line items of + * this `Order`. This value is calculated from the associated `LineItem` + * values. + * + * Generated from protobuf field optional int64 total_viewable_impressions_delivered = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_viewable_impressions_delivered = null; /** * Constructor. @@ -313,6 +335,16 @@ class Order extends \Google\Protobuf\Internal\Message * assigned by Google. * @type \Google\Ads\AdManager\V1\CustomFieldValue[] $custom_field_values * Optional. The set of custom field values to this order. + * @type int|string $impressions_delivered + * Output only. The total number of impressions delivered for Line items in + * this order. + * @type int|string $total_clicks_delivered + * Output only. Total clicks delivered for all Line items of this `Order`. + * This value is calculated from the associated `LineItem` values. + * @type int|string $total_viewable_impressions_delivered + * Output only. Total viewable impressions delivered for all Line items of + * this `Order`. This value is calculated from the associated `LineItem` + * values. * } */ public function __construct($data = NULL) { @@ -1332,5 +1364,121 @@ public function setCustomFieldValues($var) return $this; } + /** + * Output only. The total number of impressions delivered for Line items in + * this order. + * + * Generated from protobuf field optional int64 impressions_delivered = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getImpressionsDelivered() + { + return isset($this->impressions_delivered) ? $this->impressions_delivered : 0; + } + + public function hasImpressionsDelivered() + { + return isset($this->impressions_delivered); + } + + public function clearImpressionsDelivered() + { + unset($this->impressions_delivered); + } + + /** + * Output only. The total number of impressions delivered for Line items in + * this order. + * + * Generated from protobuf field optional int64 impressions_delivered = 41 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setImpressionsDelivered($var) + { + GPBUtil::checkInt64($var); + $this->impressions_delivered = $var; + + return $this; + } + + /** + * Output only. Total clicks delivered for all Line items of this `Order`. + * This value is calculated from the associated `LineItem` values. + * + * Generated from protobuf field optional int64 total_clicks_delivered = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalClicksDelivered() + { + return isset($this->total_clicks_delivered) ? $this->total_clicks_delivered : 0; + } + + public function hasTotalClicksDelivered() + { + return isset($this->total_clicks_delivered); + } + + public function clearTotalClicksDelivered() + { + unset($this->total_clicks_delivered); + } + + /** + * Output only. Total clicks delivered for all Line items of this `Order`. + * This value is calculated from the associated `LineItem` values. + * + * Generated from protobuf field optional int64 total_clicks_delivered = 53 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalClicksDelivered($var) + { + GPBUtil::checkInt64($var); + $this->total_clicks_delivered = $var; + + return $this; + } + + /** + * Output only. Total viewable impressions delivered for all Line items of + * this `Order`. This value is calculated from the associated `LineItem` + * values. + * + * Generated from protobuf field optional int64 total_viewable_impressions_delivered = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalViewableImpressionsDelivered() + { + return isset($this->total_viewable_impressions_delivered) ? $this->total_viewable_impressions_delivered : 0; + } + + public function hasTotalViewableImpressionsDelivered() + { + return isset($this->total_viewable_impressions_delivered); + } + + public function clearTotalViewableImpressionsDelivered() + { + unset($this->total_viewable_impressions_delivered); + } + + /** + * Output only. Total viewable impressions delivered for all Line items of + * this `Order`. This value is calculated from the associated `LineItem` + * values. + * + * Generated from protobuf field optional int64 total_viewable_impressions_delivered = 54 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalViewableImpressionsDelivered($var) + { + GPBUtil::checkInt64($var); + $this->total_viewable_impressions_delivered = $var; + + return $this; + } + } diff --git a/AdsAdManager/src/V1/PacingDeviceCategorizationEnum.php b/AdsAdManager/src/V1/PacingDeviceCategorizationEnum.php new file mode 100644 index 000000000000..47f522a8934e --- /dev/null +++ b/AdsAdManager/src/V1/PacingDeviceCategorizationEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.PacingDeviceCategorizationEnum + */ +class PacingDeviceCategorizationEnum 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\PacingDeviceCategorizationEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/PacingDeviceCategorizationEnum/PacingDeviceCategorization.php b/AdsAdManager/src/V1/PacingDeviceCategorizationEnum/PacingDeviceCategorization.php new file mode 100644 index 000000000000..4863d7f3ffc9 --- /dev/null +++ b/AdsAdManager/src/V1/PacingDeviceCategorizationEnum/PacingDeviceCategorization.php @@ -0,0 +1,62 @@ +google.ads.admanager.v1.PacingDeviceCategorizationEnum.PacingDeviceCategorization + */ +class PacingDeviceCategorization +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum PACING_DEVICE_CATEGORIZATION_UNSPECIFIED = 0; + */ + const PACING_DEVICE_CATEGORIZATION_UNSPECIFIED = 0; + /** + * Use Google's device categorization in auto-pacing. + * + * Generated from protobuf enum GOOGLE = 1; + */ + const GOOGLE = 1; + /** + * Use Nielsen device categorization in auto-pacing + * + * Generated from protobuf enum NIELSEN = 2; + */ + const NIELSEN = 2; + + private static $valueToName = [ + self::PACING_DEVICE_CATEGORIZATION_UNSPECIFIED => 'PACING_DEVICE_CATEGORIZATION_UNSPECIFIED', + self::GOOGLE => 'GOOGLE', + self::NIELSEN => 'NIELSEN', + ]; + + 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/ReachPartnerEnum.php b/AdsAdManager/src/V1/ReachPartnerEnum.php new file mode 100644 index 000000000000..c3547c69c058 --- /dev/null +++ b/AdsAdManager/src/V1/ReachPartnerEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.ReachPartnerEnum + */ +class ReachPartnerEnum 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\ReachPartnerEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ReachPartnerEnum/ReachPartner.php b/AdsAdManager/src/V1/ReachPartnerEnum/ReachPartner.php new file mode 100644 index 000000000000..47e1cfa786d1 --- /dev/null +++ b/AdsAdManager/src/V1/ReachPartnerEnum/ReachPartner.php @@ -0,0 +1,110 @@ +google.ads.admanager.v1.ReachPartnerEnum.ReachPartner + */ +class ReachPartner +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum REACH_PARTNER_UNSPECIFIED = 0; + */ + const REACH_PARTNER_UNSPECIFIED = 0; + /** + * Indicates third-party reach integration partner Audience Project + * + * Generated from protobuf enum AUDIENCE_PROJECT = 1; + */ + const AUDIENCE_PROJECT = 1; + /** + * Indicates third-party reach integration partner Comscore. + * + * Generated from protobuf enum COMSCORE = 2; + */ + const COMSCORE = 2; + /** + * Indicates third-party reach integration partner Gemius. + * + * Generated from protobuf enum GEMIUS = 3; + */ + const GEMIUS = 3; + /** + * Indicates third-party reach integration partner iSpot.TV + * + * Generated from protobuf enum ISPOT_TV = 5; + */ + const ISPOT_TV = 5; + /** + * Indicates third-party reach integration partner Kantar. + * + * Generated from protobuf enum KANTAR_MILLWARD_BROWN = 6; + */ + const KANTAR_MILLWARD_BROWN = 6; + /** + * Indicates third-party reach integration partner Nielsen. + * + * Generated from protobuf enum NIELSEN = 7; + */ + const NIELSEN = 7; + /** + * Indicates there's no third-party reach integration partner. + * + * Generated from protobuf enum NONE = 8; + */ + const NONE = 8; + /** + * Indicates third-party reach integration partner VideoAmp + * + * Generated from protobuf enum VIDEO_AMP = 9; + */ + const VIDEO_AMP = 9; + /** + * Indicates third-party reach integration partner Video Research. + * + * Generated from protobuf enum VIDEO_RESEARCH = 10; + */ + const VIDEO_RESEARCH = 10; + + private static $valueToName = [ + self::REACH_PARTNER_UNSPECIFIED => 'REACH_PARTNER_UNSPECIFIED', + self::AUDIENCE_PROJECT => 'AUDIENCE_PROJECT', + self::COMSCORE => 'COMSCORE', + self::GEMIUS => 'GEMIUS', + self::ISPOT_TV => 'ISPOT_TV', + self::KANTAR_MILLWARD_BROWN => 'KANTAR_MILLWARD_BROWN', + self::NIELSEN => 'NIELSEN', + self::NONE => 'NONE', + self::VIDEO_AMP => 'VIDEO_AMP', + self::VIDEO_RESEARCH => 'VIDEO_RESEARCH', + ]; + + 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 index 160d15e94cd8..db86bdcd79a1 100644 --- a/AdsAdManager/src/V1/ReportDefinition/Dimension.php +++ b/AdsAdManager/src/V1/ReportDefinition/Dimension.php @@ -2123,7 +2123,7 @@ class Dimension * Corresponds to "Demand channel value" in the Ad Manager UI (when showing * API fields). * Compatible with the following report types: `HISTORICAL`, `REACH`, - * `REVENUE_VERIFICATION`, `AD_SPEED` + * `REVENUE_VERIFICATION`, `AD_SPEED`, `ON_PLATFORM_MULTICALL` * Data format: `ENUM` * * Generated from protobuf enum DEMAND_CHANNEL = 9; @@ -2133,7 +2133,7 @@ class Dimension * Demand channel name. * Corresponds to "Demand channel" in the Ad Manager UI. * Compatible with the following report types: `HISTORICAL`, `REACH`, - * `REVENUE_VERIFICATION`, `AD_SPEED` + * `REVENUE_VERIFICATION`, `AD_SPEED`, `ON_PLATFORM_MULTICALL` * Data format: `STRING` * * Generated from protobuf enum DEMAND_CHANNEL_NAME = 10; diff --git a/AdsAdManager/src/V1/RoadblockingTypeEnum.php b/AdsAdManager/src/V1/RoadblockingTypeEnum.php new file mode 100644 index 000000000000..2758f1fe6b78 --- /dev/null +++ b/AdsAdManager/src/V1/RoadblockingTypeEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.RoadblockingTypeEnum + */ +class RoadblockingTypeEnum 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\DeliveryEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/RoadblockingTypeEnum/RoadblockingType.php b/AdsAdManager/src/V1/RoadblockingTypeEnum/RoadblockingType.php new file mode 100644 index 000000000000..7d643062a6f9 --- /dev/null +++ b/AdsAdManager/src/V1/RoadblockingTypeEnum/RoadblockingType.php @@ -0,0 +1,88 @@ +google.ads.admanager.v1.RoadblockingTypeEnum.RoadblockingType + */ +class RoadblockingType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum ROADBLOCKING_TYPE_UNSPECIFIED = 0; + */ + const ROADBLOCKING_TYPE_UNSPECIFIED = 0; + /** + * All or none of the creatives from a line item will serve. This option + * will only work if served to a GPT tag using SRA (single request + * architecture mode). + * + * Generated from protobuf enum ALL_ROADBLOCK = 1; + */ + const ALL_ROADBLOCK = 1; + /** + * As many creatives from a line item as can fit on a page will serve. This + * could mean anywhere from one to all of a line item's creatives given the + * size constraints of ad slots on a page. + * + * Generated from protobuf enum AS_MANY_AS_POSSIBLE = 2; + */ + const AS_MANY_AS_POSSIBLE = 2; + /** + * A master/companion creative set roadblocking type. + * A [CreativePlaceholder][google.ads.admanager.v1.CreativePlaceholder] must + * be set accordingly. + * + * Generated from protobuf enum CREATIVE_SET = 3; + */ + const CREATIVE_SET = 3; + /** + * Any number of creatives from a line item can serve together at a time. + * + * Generated from protobuf enum ONE_OR_MORE = 4; + */ + const ONE_OR_MORE = 4; + /** + * Only one creative from a line item can serve at a time. + * + * Generated from protobuf enum ONLY_ONE = 5; + */ + const ONLY_ONE = 5; + + private static $valueToName = [ + self::ROADBLOCKING_TYPE_UNSPECIFIED => 'ROADBLOCKING_TYPE_UNSPECIFIED', + self::ALL_ROADBLOCK => 'ALL_ROADBLOCK', + self::AS_MANY_AS_POSSIBLE => 'AS_MANY_AS_POSSIBLE', + self::CREATIVE_SET => 'CREATIVE_SET', + self::ONE_OR_MORE => 'ONE_OR_MORE', + self::ONLY_ONE => 'ONLY_ONE', + ]; + + 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.php b/AdsAdManager/src/V1/ScheduleOptions.php index 0fd5184a1120..9c01114f3789 100644 --- a/AdsAdManager/src/V1/ScheduleOptions.php +++ b/AdsAdManager/src/V1/ScheduleOptions.php @@ -1,6 +1,6 @@ google.ads.admanager.v1.SkippableAdTypeEnum + */ +class SkippableAdTypeEnum 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\SkippableAdTypeEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/SkippableAdTypeEnum/SkippableAdType.php b/AdsAdManager/src/V1/SkippableAdTypeEnum/SkippableAdType.php new file mode 100644 index 000000000000..0e6e22bc4caa --- /dev/null +++ b/AdsAdManager/src/V1/SkippableAdTypeEnum/SkippableAdType.php @@ -0,0 +1,76 @@ +google.ads.admanager.v1.SkippableAdTypeEnum.SkippableAdType + */ +class SkippableAdType +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum SKIPPABLE_AD_TYPE_UNSPECIFIED = 0; + */ + const SKIPPABLE_AD_TYPE_UNSPECIFIED = 0; + /** + * Any skippable or not skippable. This is only for programmatic case when + * the creative skippability is decided by the buyside. + * + * Generated from protobuf enum ANY = 1; + */ + const ANY = 1; + /** + * The ad is not skippable. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + /** + * The ad is skippable. + * + * Generated from protobuf enum ENABLED = 3; + */ + const ENABLED = 3; + /** + * The ad is an instream select ad. + * + * Generated from protobuf enum INSTREAM_SELECT = 4; + */ + const INSTREAM_SELECT = 4; + + private static $valueToName = [ + self::SKIPPABLE_AD_TYPE_UNSPECIFIED => 'SKIPPABLE_AD_TYPE_UNSPECIFIED', + self::ANY => 'ANY', + self::DISABLED => 'DISABLED', + self::ENABLED => 'ENABLED', + self::INSTREAM_SELECT => 'INSTREAM_SELECT', + ]; + + 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/Slate.php b/AdsAdManager/src/V1/Slate.php new file mode 100644 index 000000000000..ef294e45d718 --- /dev/null +++ b/AdsAdManager/src/V1/Slate.php @@ -0,0 +1,305 @@ +google.ads.admanager.v1.Slate + */ +class Slate extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the `Slate`. + * Format: `networks/{network_code}/slates/{slate_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The display name of the Slate. It 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; + /** + * Output only. The status of this Slate. Slates are created in the + * [SlateStatus.ACTIVE][] state. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SlateStatusEnum.SlateStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status = null; + /** + * Output only. Server side transcoding status of the current slate. + * + * Generated from protobuf field optional .google.ads.admanager.v1.VideoTranscodeStatusEnum.VideoTranscodeStatus transcode_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $transcode_status = null; + /** + * Optional. The location of the original asset if publisher provided and + * slate is externally hosted. + * + * Generated from protobuf field optional string video_source_url = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $video_source_url = null; + /** + * Output only. The date and time this slate was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the `Slate`. + * Format: `networks/{network_code}/slates/{slate_id}` + * @type string $display_name + * Required. The display name of the Slate. It has a maximum length of 255 + * characters. + * @type int $status + * Output only. The status of this Slate. Slates are created in the + * [SlateStatus.ACTIVE][] state. + * @type int $transcode_status + * Output only. Server side transcoding status of the current slate. + * @type string $video_source_url + * Optional. The location of the original asset if publisher provided and + * slate is externally hosted. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The date and time this slate was last modified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateMessages::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the `Slate`. + * Format: `networks/{network_code}/slates/{slate_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 `Slate`. + * Format: `networks/{network_code}/slates/{slate_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 Slate. It 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 Slate. It 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; + } + + /** + * Output only. The status of this Slate. Slates are created in the + * [SlateStatus.ACTIVE][] state. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SlateStatusEnum.SlateStatus status = 3 [(.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 this Slate. Slates are created in the + * [SlateStatus.ACTIVE][] state. + * + * Generated from protobuf field optional .google.ads.admanager.v1.SlateStatusEnum.SlateStatus status = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\SlateStatusEnum\SlateStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Output only. Server side transcoding status of the current slate. + * + * Generated from protobuf field optional .google.ads.admanager.v1.VideoTranscodeStatusEnum.VideoTranscodeStatus transcode_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTranscodeStatus() + { + return isset($this->transcode_status) ? $this->transcode_status : 0; + } + + public function hasTranscodeStatus() + { + return isset($this->transcode_status); + } + + public function clearTranscodeStatus() + { + unset($this->transcode_status); + } + + /** + * Output only. Server side transcoding status of the current slate. + * + * Generated from protobuf field optional .google.ads.admanager.v1.VideoTranscodeStatusEnum.VideoTranscodeStatus transcode_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTranscodeStatus($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\VideoTranscodeStatusEnum\VideoTranscodeStatus::class); + $this->transcode_status = $var; + + return $this; + } + + /** + * Optional. The location of the original asset if publisher provided and + * slate is externally hosted. + * + * Generated from protobuf field optional string video_source_url = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVideoSourceUrl() + { + return isset($this->video_source_url) ? $this->video_source_url : ''; + } + + public function hasVideoSourceUrl() + { + return isset($this->video_source_url); + } + + public function clearVideoSourceUrl() + { + unset($this->video_source_url); + } + + /** + * Optional. The location of the original asset if publisher provided and + * slate is externally hosted. + * + * Generated from protobuf field optional string video_source_url = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVideoSourceUrl($var) + { + GPBUtil::checkString($var, True); + $this->video_source_url = $var; + + return $this; + } + + /** + * Output only. The date and time this slate was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The date and time this slate was last modified. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/SlateStatusEnum.php b/AdsAdManager/src/V1/SlateStatusEnum.php new file mode 100644 index 000000000000..1399dfa92089 --- /dev/null +++ b/AdsAdManager/src/V1/SlateStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.SlateStatusEnum + */ +class SlateStatusEnum 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\LiveStreamEventEnums::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/SlateStatusEnum/SlateStatus.php b/AdsAdManager/src/V1/SlateStatusEnum/SlateStatus.php new file mode 100644 index 000000000000..3fa6d860b6db --- /dev/null +++ b/AdsAdManager/src/V1/SlateStatusEnum/SlateStatus.php @@ -0,0 +1,61 @@ +google.ads.admanager.v1.SlateStatusEnum.SlateStatus + */ +class SlateStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum SLATE_STATUS_UNSPECIFIED = 0; + */ + const SLATE_STATUS_UNSPECIFIED = 0; + /** + * Indicates the Slate has been created and is eligible for streaming. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Indicates the Slate has been archived. + * + * Generated from protobuf enum ARCHIVED = 2; + */ + const ARCHIVED = 2; + + private static $valueToName = [ + self::SLATE_STATUS_UNSPECIFIED => 'SLATE_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::ARCHIVED => 'ARCHIVED', + ]; + + 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/ThirdPartyMeasurementSettings.php b/AdsAdManager/src/V1/ThirdPartyMeasurementSettings.php new file mode 100644 index 000000000000..aad14d1c52f0 --- /dev/null +++ b/AdsAdManager/src/V1/ThirdPartyMeasurementSettings.php @@ -0,0 +1,745 @@ +google.ads.admanager.v1.ThirdPartyMeasurementSettings + */ +class ThirdPartyMeasurementSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A field to determine the type of ViewabilityPartner. This field + * default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartner viewability_partner = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $viewability_partner = null; + /** + * Optional. The third party partner ID for YouTube viewability verification. + * + * Generated from protobuf field optional string viewability_client_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $viewability_client_id = null; + /** + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data. + * + * Generated from protobuf field optional string viewability_reporting_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $viewability_reporting_id = null; + /** + * Optional. A field to determine the type of publisher's viewability partner. + * This field default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartner publisher_viewability_partner = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher_viewability_partner = null; + /** + * Optional. The third party partner ID for YouTube viewability verification + * for publisher. + * + * Generated from protobuf field optional string publisher_viewability_client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher_viewability_client_id = null; + /** + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data for publisher. + * + * Generated from protobuf field optional string publisher_viewability_reporting_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher_viewability_reporting_id = null; + /** + * Optional. A field to determine the type of BrandLiftPartner. This field + * default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.BrandLiftPartnerEnum.BrandLiftPartner brand_lift_partner = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $brand_lift_partner = null; + /** + * Optional. The third party partner ID for YouTube brand lift verification. + * + * Generated from protobuf field optional string brand_lift_client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $brand_lift_client_id = null; + /** + * Optional. The reporting ID that maps brand lift partner data with a + * campaign (or a group of related campaigns) specific data. + * + * Generated from protobuf field optional string brand_lift_reporting_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $brand_lift_reporting_id = null; + /** + * Optional. A field to determine the type of advertiser's ReachPartner. This + * field default is UNKNOWN. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReachPartnerEnum.ReachPartner reach_partner = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reach_partner = null; + /** + * Optional. The third party partner ID for YouTube reach verification for + * advertiser. + * + * Generated from protobuf field optional string reach_client_id = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reach_client_id = null; + /** + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for advertiser. + * + * Generated from protobuf field optional string reach_reporting_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $reach_reporting_id = null; + /** + * Optional. A field to determine the type of publisher's ReachPartner. This + * field default is UNKNOWN. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReachPartnerEnum.ReachPartner publisher_reach_partner = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher_reach_partner = null; + /** + * Optional. The third party partner ID for YouTube reach verification for + * publisher. + * + * Generated from protobuf field optional string publisher_reach_client_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher_reach_client_id = null; + /** + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for publisher. + * + * Generated from protobuf field optional string publisher_reach_reporting_id = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $publisher_reach_reporting_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $viewability_partner + * Optional. A field to determine the type of ViewabilityPartner. This field + * default is NONE. + * @type string $viewability_client_id + * Optional. The third party partner ID for YouTube viewability verification. + * @type string $viewability_reporting_id + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data. + * @type int $publisher_viewability_partner + * Optional. A field to determine the type of publisher's viewability partner. + * This field default is NONE. + * @type string $publisher_viewability_client_id + * Optional. The third party partner ID for YouTube viewability verification + * for publisher. + * @type string $publisher_viewability_reporting_id + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data for publisher. + * @type int $brand_lift_partner + * Optional. A field to determine the type of BrandLiftPartner. This field + * default is NONE. + * @type string $brand_lift_client_id + * Optional. The third party partner ID for YouTube brand lift verification. + * @type string $brand_lift_reporting_id + * Optional. The reporting ID that maps brand lift partner data with a + * campaign (or a group of related campaigns) specific data. + * @type int $reach_partner + * Optional. A field to determine the type of advertiser's ReachPartner. This + * field default is UNKNOWN. + * @type string $reach_client_id + * Optional. The third party partner ID for YouTube reach verification for + * advertiser. + * @type string $reach_reporting_id + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for advertiser. + * @type int $publisher_reach_partner + * Optional. A field to determine the type of publisher's ReachPartner. This + * field default is UNKNOWN. + * @type string $publisher_reach_client_id + * Optional. The third party partner ID for YouTube reach verification for + * publisher. + * @type string $publisher_reach_reporting_id + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for publisher. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\ThirdPartyMeasurementSettings::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A field to determine the type of ViewabilityPartner. This field + * default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartner viewability_partner = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getViewabilityPartner() + { + return isset($this->viewability_partner) ? $this->viewability_partner : 0; + } + + public function hasViewabilityPartner() + { + return isset($this->viewability_partner); + } + + public function clearViewabilityPartner() + { + unset($this->viewability_partner); + } + + /** + * Optional. A field to determine the type of ViewabilityPartner. This field + * default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartner viewability_partner = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setViewabilityPartner($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ViewabilityPartnerEnum\ViewabilityPartner::class); + $this->viewability_partner = $var; + + return $this; + } + + /** + * Optional. The third party partner ID for YouTube viewability verification. + * + * Generated from protobuf field optional string viewability_client_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getViewabilityClientId() + { + return isset($this->viewability_client_id) ? $this->viewability_client_id : ''; + } + + public function hasViewabilityClientId() + { + return isset($this->viewability_client_id); + } + + public function clearViewabilityClientId() + { + unset($this->viewability_client_id); + } + + /** + * Optional. The third party partner ID for YouTube viewability verification. + * + * Generated from protobuf field optional string viewability_client_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setViewabilityClientId($var) + { + GPBUtil::checkString($var, True); + $this->viewability_client_id = $var; + + return $this; + } + + /** + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data. + * + * Generated from protobuf field optional string viewability_reporting_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getViewabilityReportingId() + { + return isset($this->viewability_reporting_id) ? $this->viewability_reporting_id : ''; + } + + public function hasViewabilityReportingId() + { + return isset($this->viewability_reporting_id); + } + + public function clearViewabilityReportingId() + { + unset($this->viewability_reporting_id); + } + + /** + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data. + * + * Generated from protobuf field optional string viewability_reporting_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setViewabilityReportingId($var) + { + GPBUtil::checkString($var, True); + $this->viewability_reporting_id = $var; + + return $this; + } + + /** + * Optional. A field to determine the type of publisher's viewability partner. + * This field default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartner publisher_viewability_partner = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPublisherViewabilityPartner() + { + return isset($this->publisher_viewability_partner) ? $this->publisher_viewability_partner : 0; + } + + public function hasPublisherViewabilityPartner() + { + return isset($this->publisher_viewability_partner); + } + + public function clearPublisherViewabilityPartner() + { + unset($this->publisher_viewability_partner); + } + + /** + * Optional. A field to determine the type of publisher's viewability partner. + * This field default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartner publisher_viewability_partner = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPublisherViewabilityPartner($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ViewabilityPartnerEnum\ViewabilityPartner::class); + $this->publisher_viewability_partner = $var; + + return $this; + } + + /** + * Optional. The third party partner ID for YouTube viewability verification + * for publisher. + * + * Generated from protobuf field optional string publisher_viewability_client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPublisherViewabilityClientId() + { + return isset($this->publisher_viewability_client_id) ? $this->publisher_viewability_client_id : ''; + } + + public function hasPublisherViewabilityClientId() + { + return isset($this->publisher_viewability_client_id); + } + + public function clearPublisherViewabilityClientId() + { + unset($this->publisher_viewability_client_id); + } + + /** + * Optional. The third party partner ID for YouTube viewability verification + * for publisher. + * + * Generated from protobuf field optional string publisher_viewability_client_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPublisherViewabilityClientId($var) + { + GPBUtil::checkString($var, True); + $this->publisher_viewability_client_id = $var; + + return $this; + } + + /** + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data for publisher. + * + * Generated from protobuf field optional string publisher_viewability_reporting_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPublisherViewabilityReportingId() + { + return isset($this->publisher_viewability_reporting_id) ? $this->publisher_viewability_reporting_id : ''; + } + + public function hasPublisherViewabilityReportingId() + { + return isset($this->publisher_viewability_reporting_id); + } + + public function clearPublisherViewabilityReportingId() + { + unset($this->publisher_viewability_reporting_id); + } + + /** + * Optional. The reporting ID that maps viewability partner data with a + * campaign (or a group of related campaigns) specific data for publisher. + * + * Generated from protobuf field optional string publisher_viewability_reporting_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPublisherViewabilityReportingId($var) + { + GPBUtil::checkString($var, True); + $this->publisher_viewability_reporting_id = $var; + + return $this; + } + + /** + * Optional. A field to determine the type of BrandLiftPartner. This field + * default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.BrandLiftPartnerEnum.BrandLiftPartner brand_lift_partner = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBrandLiftPartner() + { + return isset($this->brand_lift_partner) ? $this->brand_lift_partner : 0; + } + + public function hasBrandLiftPartner() + { + return isset($this->brand_lift_partner); + } + + public function clearBrandLiftPartner() + { + unset($this->brand_lift_partner); + } + + /** + * Optional. A field to determine the type of BrandLiftPartner. This field + * default is NONE. + * + * Generated from protobuf field optional .google.ads.admanager.v1.BrandLiftPartnerEnum.BrandLiftPartner brand_lift_partner = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBrandLiftPartner($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\BrandLiftPartnerEnum\BrandLiftPartner::class); + $this->brand_lift_partner = $var; + + return $this; + } + + /** + * Optional. The third party partner ID for YouTube brand lift verification. + * + * Generated from protobuf field optional string brand_lift_client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBrandLiftClientId() + { + return isset($this->brand_lift_client_id) ? $this->brand_lift_client_id : ''; + } + + public function hasBrandLiftClientId() + { + return isset($this->brand_lift_client_id); + } + + public function clearBrandLiftClientId() + { + unset($this->brand_lift_client_id); + } + + /** + * Optional. The third party partner ID for YouTube brand lift verification. + * + * Generated from protobuf field optional string brand_lift_client_id = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBrandLiftClientId($var) + { + GPBUtil::checkString($var, True); + $this->brand_lift_client_id = $var; + + return $this; + } + + /** + * Optional. The reporting ID that maps brand lift partner data with a + * campaign (or a group of related campaigns) specific data. + * + * Generated from protobuf field optional string brand_lift_reporting_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBrandLiftReportingId() + { + return isset($this->brand_lift_reporting_id) ? $this->brand_lift_reporting_id : ''; + } + + public function hasBrandLiftReportingId() + { + return isset($this->brand_lift_reporting_id); + } + + public function clearBrandLiftReportingId() + { + unset($this->brand_lift_reporting_id); + } + + /** + * Optional. The reporting ID that maps brand lift partner data with a + * campaign (or a group of related campaigns) specific data. + * + * Generated from protobuf field optional string brand_lift_reporting_id = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBrandLiftReportingId($var) + { + GPBUtil::checkString($var, True); + $this->brand_lift_reporting_id = $var; + + return $this; + } + + /** + * Optional. A field to determine the type of advertiser's ReachPartner. This + * field default is UNKNOWN. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReachPartnerEnum.ReachPartner reach_partner = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getReachPartner() + { + return isset($this->reach_partner) ? $this->reach_partner : 0; + } + + public function hasReachPartner() + { + return isset($this->reach_partner); + } + + public function clearReachPartner() + { + unset($this->reach_partner); + } + + /** + * Optional. A field to determine the type of advertiser's ReachPartner. This + * field default is UNKNOWN. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReachPartnerEnum.ReachPartner reach_partner = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setReachPartner($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReachPartnerEnum\ReachPartner::class); + $this->reach_partner = $var; + + return $this; + } + + /** + * Optional. The third party partner ID for YouTube reach verification for + * advertiser. + * + * Generated from protobuf field optional string reach_client_id = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReachClientId() + { + return isset($this->reach_client_id) ? $this->reach_client_id : ''; + } + + public function hasReachClientId() + { + return isset($this->reach_client_id); + } + + public function clearReachClientId() + { + unset($this->reach_client_id); + } + + /** + * Optional. The third party partner ID for YouTube reach verification for + * advertiser. + * + * Generated from protobuf field optional string reach_client_id = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReachClientId($var) + { + GPBUtil::checkString($var, True); + $this->reach_client_id = $var; + + return $this; + } + + /** + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for advertiser. + * + * Generated from protobuf field optional string reach_reporting_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getReachReportingId() + { + return isset($this->reach_reporting_id) ? $this->reach_reporting_id : ''; + } + + public function hasReachReportingId() + { + return isset($this->reach_reporting_id); + } + + public function clearReachReportingId() + { + unset($this->reach_reporting_id); + } + + /** + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for advertiser. + * + * Generated from protobuf field optional string reach_reporting_id = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setReachReportingId($var) + { + GPBUtil::checkString($var, True); + $this->reach_reporting_id = $var; + + return $this; + } + + /** + * Optional. A field to determine the type of publisher's ReachPartner. This + * field default is UNKNOWN. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReachPartnerEnum.ReachPartner publisher_reach_partner = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPublisherReachPartner() + { + return isset($this->publisher_reach_partner) ? $this->publisher_reach_partner : 0; + } + + public function hasPublisherReachPartner() + { + return isset($this->publisher_reach_partner); + } + + public function clearPublisherReachPartner() + { + unset($this->publisher_reach_partner); + } + + /** + * Optional. A field to determine the type of publisher's ReachPartner. This + * field default is UNKNOWN. + * + * Generated from protobuf field optional .google.ads.admanager.v1.ReachPartnerEnum.ReachPartner publisher_reach_partner = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPublisherReachPartner($var) + { + GPBUtil::checkEnum($var, \Google\Ads\AdManager\V1\ReachPartnerEnum\ReachPartner::class); + $this->publisher_reach_partner = $var; + + return $this; + } + + /** + * Optional. The third party partner ID for YouTube reach verification for + * publisher. + * + * Generated from protobuf field optional string publisher_reach_client_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPublisherReachClientId() + { + return isset($this->publisher_reach_client_id) ? $this->publisher_reach_client_id : ''; + } + + public function hasPublisherReachClientId() + { + return isset($this->publisher_reach_client_id); + } + + public function clearPublisherReachClientId() + { + unset($this->publisher_reach_client_id); + } + + /** + * Optional. The third party partner ID for YouTube reach verification for + * publisher. + * + * Generated from protobuf field optional string publisher_reach_client_id = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPublisherReachClientId($var) + { + GPBUtil::checkString($var, True); + $this->publisher_reach_client_id = $var; + + return $this; + } + + /** + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for publisher. + * + * Generated from protobuf field optional string publisher_reach_reporting_id = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPublisherReachReportingId() + { + return isset($this->publisher_reach_reporting_id) ? $this->publisher_reach_reporting_id : ''; + } + + public function hasPublisherReachReportingId() + { + return isset($this->publisher_reach_reporting_id); + } + + public function clearPublisherReachReportingId() + { + unset($this->publisher_reach_reporting_id); + } + + /** + * Optional. The reporting ID that maps reach partner data with a campaign (or + * a group of related campaigns) specific data for publisher. + * + * Generated from protobuf field optional string publisher_reach_reporting_id = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPublisherReachReportingId($var) + { + GPBUtil::checkString($var, True); + $this->publisher_reach_reporting_id = $var; + + return $this; + } + +} + diff --git a/AdsAdManager/src/V1/UnitTypeEnum/UnitType.php b/AdsAdManager/src/V1/UnitTypeEnum/UnitType.php index 0aa383332c5a..bba7d52d4579 100644 --- a/AdsAdManager/src/V1/UnitTypeEnum/UnitType.php +++ b/AdsAdManager/src/V1/UnitTypeEnum/UnitType.php @@ -8,9 +8,9 @@ /** * Indicates the type of unit used for defining a reservation. The - * [LineItem.cost_type][] can differ from the UnitType - an - * ad can have an impression goal, but be billed by its click. Usually - * CostType and UnitType will refer to the same unit. + * [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] can differ + * from the UnitType - an ad can have an impression goal, but be billed by its + * click. Usually CostType and UnitType will refer to the same unit. * * Protobuf type google.ads.admanager.v1.UnitTypeEnum.UnitType */ @@ -43,7 +43,8 @@ class UnitType /** * The number of click-through Cost-Per-Action (CPA) conversions from * creatives associated with the line item. This is only supported as - * secondary goal and the [LineItem.cost_type][] must be + * secondary goal and the + * [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] must be * [CostTypeEnum.CostType.CPA][]. * * Generated from protobuf enum CLICK_THROUGH_CPA_CONVERSIONS = 3; @@ -52,7 +53,8 @@ class UnitType /** * The number of view-through Cost-Per-Action (CPA) conversions from * creatives associated with the line item. This is only supported as - * secondary goal and the [LineItem.cost_type][] must be + * secondary goal and the + * [LineItem.cost_type][google.ads.admanager.v1.LineItem.cost_type] must be * [CostTypeEnum.CostType.CPA}. * * Generated from protobuf enum VIEW_THROUGH_CPA_CONVERSIONS = 4; diff --git a/AdsAdManager/src/V1/UpdateCreativeSetRequest.php b/AdsAdManager/src/V1/UpdateCreativeSetRequest.php new file mode 100644 index 000000000000..1fa9ec99c377 --- /dev/null +++ b/AdsAdManager/src/V1/UpdateCreativeSetRequest.php @@ -0,0 +1,142 @@ +google.ads.admanager.v1.UpdateCreativeSetRequest + */ +class UpdateCreativeSetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `CreativeSet` to update. + * The `CreativeSet`'s `name` is used to identify the `CreativeSet` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeSet creative_set = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $creative_set = null; + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\CreativeSet $creativeSet Required. The `CreativeSet` to update. + * + * The `CreativeSet`'s `name` is used to identify the `CreativeSet` to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateCreativeSetRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\CreativeSet $creativeSet, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCreativeSet($creativeSet) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\CreativeSet $creative_set + * Required. The `CreativeSet` to update. + * The `CreativeSet`'s `name` is used to identify the `CreativeSet` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\CreativeSetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `CreativeSet` to update. + * The `CreativeSet`'s `name` is used to identify the `CreativeSet` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeSet creative_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\CreativeSet|null + */ + public function getCreativeSet() + { + return $this->creative_set; + } + + public function hasCreativeSet() + { + return isset($this->creative_set); + } + + public function clearCreativeSet() + { + unset($this->creative_set); + } + + /** + * Required. The `CreativeSet` to update. + * The `CreativeSet`'s `name` is used to identify the `CreativeSet` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.CreativeSet creative_set = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\CreativeSet $var + * @return $this + */ + public function setCreativeSet($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\CreativeSet::class); + $this->creative_set = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/UpdateOrderRequest.php b/AdsAdManager/src/V1/UpdateOrderRequest.php new file mode 100644 index 000000000000..f2ddc051aeda --- /dev/null +++ b/AdsAdManager/src/V1/UpdateOrderRequest.php @@ -0,0 +1,129 @@ +google.ads.admanager.v1.UpdateOrderRequest + */ +class UpdateOrderRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Order` to update. + * The Order's name is used to identify the order to update. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field .google.ads.admanager.v1.Order order = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $order = null; + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Order $order + * Required. The `Order` to update. + * The Order's name is used to identify the order to update. + * Format: `networks/{network_code}/orders/{order_id}` + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\OrderService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Order` to update. + * The Order's name is used to identify the order to update. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field .google.ads.admanager.v1.Order order = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Order|null + */ + public function getOrder() + { + return $this->order; + } + + public function hasOrder() + { + return isset($this->order); + } + + public function clearOrder() + { + unset($this->order); + } + + /** + * Required. The `Order` to update. + * The Order's name is used to identify the order to update. + * Format: `networks/{network_code}/orders/{order_id}` + * + * Generated from protobuf field .google.ads.admanager.v1.Order order = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Order $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Order::class); + $this->order = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/UpdateSlateRequest.php b/AdsAdManager/src/V1/UpdateSlateRequest.php new file mode 100644 index 000000000000..6f973dd5e5f0 --- /dev/null +++ b/AdsAdManager/src/V1/UpdateSlateRequest.php @@ -0,0 +1,142 @@ +google.ads.admanager.v1.UpdateSlateRequest + */ +class UpdateSlateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Slate` to update. + * The `Slate`'s `name` is used to identify the `Slate` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $slate = null; + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\Slate $slate Required. The `Slate` to update. + * + * The `Slate`'s `name` is used to identify the `Slate` to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateSlateRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\Slate $slate, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSlate($slate) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\Slate $slate + * Required. The `Slate` to update. + * The `Slate`'s `name` is used to identify the `Slate` to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\SlateService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Slate` to update. + * The `Slate`'s `name` is used to identify the `Slate` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\Slate|null + */ + public function getSlate() + { + return $this->slate; + } + + public function hasSlate() + { + return isset($this->slate); + } + + public function clearSlate() + { + unset($this->slate); + } + + /** + * Required. The `Slate` to update. + * The `Slate`'s `name` is used to identify the `Slate` to update. + * + * Generated from protobuf field .google.ads.admanager.v1.Slate slate = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\Slate $var + * @return $this + */ + public function setSlate($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\Slate::class); + $this->slate = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/UpdateTargetingPresetRequest.php b/AdsAdManager/src/V1/UpdateTargetingPresetRequest.php new file mode 100644 index 000000000000..6388060c3b0c --- /dev/null +++ b/AdsAdManager/src/V1/UpdateTargetingPresetRequest.php @@ -0,0 +1,147 @@ +google.ads.admanager.v1.UpdateTargetingPresetRequest + */ +class UpdateTargetingPresetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `TargetingPreset` to update. + * The `TargetingPreset`'s `name` is used to identify the `TargetingPreset` to + * update. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetingPreset targeting_preset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $targeting_preset = null; + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Ads\AdManager\V1\TargetingPreset $targetingPreset Required. The `TargetingPreset` to update. + * + * The `TargetingPreset`'s `name` is used to identify the `TargetingPreset` to + * update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * + * @return \Google\Ads\AdManager\V1\UpdateTargetingPresetRequest + * + * @experimental + */ + public static function build(\Google\Ads\AdManager\V1\TargetingPreset $targetingPreset, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setTargetingPreset($targetingPreset) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Ads\AdManager\V1\TargetingPreset $targeting_preset + * Required. The `TargetingPreset` to update. + * The `TargetingPreset`'s `name` is used to identify the `TargetingPreset` to + * update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Ads\Admanager\V1\TargetingPresetService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `TargetingPreset` to update. + * The `TargetingPreset`'s `name` is used to identify the `TargetingPreset` to + * update. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetingPreset targeting_preset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Ads\AdManager\V1\TargetingPreset|null + */ + public function getTargetingPreset() + { + return $this->targeting_preset; + } + + public function hasTargetingPreset() + { + return isset($this->targeting_preset); + } + + public function clearTargetingPreset() + { + unset($this->targeting_preset); + } + + /** + * Required. The `TargetingPreset` to update. + * The `TargetingPreset`'s `name` is used to identify the `TargetingPreset` to + * update. + * + * Generated from protobuf field .google.ads.admanager.v1.TargetingPreset targeting_preset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Ads\AdManager\V1\TargetingPreset $var + * @return $this + */ + public function setTargetingPreset($var) + { + GPBUtil::checkMessage($var, \Google\Ads\AdManager\V1\TargetingPreset::class); + $this->targeting_preset = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to update. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/VideoTranscodeStatusEnum.php b/AdsAdManager/src/V1/VideoTranscodeStatusEnum.php new file mode 100644 index 000000000000..ae4c070aa40a --- /dev/null +++ b/AdsAdManager/src/V1/VideoTranscodeStatusEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.VideoTranscodeStatusEnum + */ +class VideoTranscodeStatusEnum 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\VideoTranscodeStatusEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/VideoTranscodeStatusEnum/VideoTranscodeStatus.php b/AdsAdManager/src/V1/VideoTranscodeStatusEnum/VideoTranscodeStatus.php new file mode 100644 index 000000000000..ed115b6cba4d --- /dev/null +++ b/AdsAdManager/src/V1/VideoTranscodeStatusEnum/VideoTranscodeStatus.php @@ -0,0 +1,82 @@ +google.ads.admanager.v1.VideoTranscodeStatusEnum.VideoTranscodeStatus + */ +class VideoTranscodeStatus +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum VIDEO_TRANSCODE_STATUS_UNSPECIFIED = 0; + */ + const VIDEO_TRANSCODE_STATUS_UNSPECIFIED = 0; + /** + * The video transcoding is complete. + * + * Generated from protobuf enum COMPLETED = 1; + */ + const COMPLETED = 1; + /** + * The video transcoding failed. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * The video transcode is in progress. + * + * Generated from protobuf enum IN_PROGRESS = 3; + */ + const IN_PROGRESS = 3; + /** + * The video needs to be transcoded. + * + * Generated from protobuf enum NEEDS_TRANSCODE = 4; + */ + const NEEDS_TRANSCODE = 4; + /** + * The video is not ready. + * + * Generated from protobuf enum NOT_READY = 5; + */ + const NOT_READY = 5; + + private static $valueToName = [ + self::VIDEO_TRANSCODE_STATUS_UNSPECIFIED => 'VIDEO_TRANSCODE_STATUS_UNSPECIFIED', + self::COMPLETED => 'COMPLETED', + self::FAILED => 'FAILED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::NEEDS_TRANSCODE => 'NEEDS_TRANSCODE', + self::NOT_READY => 'NOT_READY', + ]; + + 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/ViewabilityPartnerEnum.php b/AdsAdManager/src/V1/ViewabilityPartnerEnum.php new file mode 100644 index 000000000000..4781fb1950df --- /dev/null +++ b/AdsAdManager/src/V1/ViewabilityPartnerEnum.php @@ -0,0 +1,34 @@ +google.ads.admanager.v1.ViewabilityPartnerEnum + */ +class ViewabilityPartnerEnum 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\ViewabilityPartnerEnum::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AdsAdManager/src/V1/ViewabilityPartnerEnum/ViewabilityPartner.php b/AdsAdManager/src/V1/ViewabilityPartnerEnum/ViewabilityPartner.php new file mode 100644 index 000000000000..38089011c04b --- /dev/null +++ b/AdsAdManager/src/V1/ViewabilityPartnerEnum/ViewabilityPartner.php @@ -0,0 +1,91 @@ +google.ads.admanager.v1.ViewabilityPartnerEnum.ViewabilityPartner + */ +class ViewabilityPartner +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum VIEWABILITY_PARTNER_UNSPECIFIED = 0; + */ + const VIEWABILITY_PARTNER_UNSPECIFIED = 0; + /** + * Indicates viewability partner Comscore. + * + * Generated from protobuf enum COMSCORE = 1; + */ + const COMSCORE = 1; + /** + * Indicates viewability partner Double Verify. + * + * Generated from protobuf enum DOUBLE_VERIFY = 2; + */ + const DOUBLE_VERIFY = 2; + /** + * Indicates viewability partner Integral Ad + * Science. + * + * Generated from protobuf enum INTEGRAL_AD_SCIENCE = 4; + */ + const INTEGRAL_AD_SCIENCE = 4; + /** + * Indicates viewability partner Oracle Moat. + * + * Generated from protobuf enum MOAT = 5; + */ + const MOAT = 5; + /** + * Indicates there's no viewability partner. + * + * Generated from protobuf enum NONE = 6; + */ + const NONE = 6; + /** + * Indicates viewability partner Telemetry. + * + * Generated from protobuf enum TELEMETRY = 7; + */ + const TELEMETRY = 7; + + private static $valueToName = [ + self::VIEWABILITY_PARTNER_UNSPECIFIED => 'VIEWABILITY_PARTNER_UNSPECIFIED', + self::COMSCORE => 'COMSCORE', + self::DOUBLE_VERIFY => 'DOUBLE_VERIFY', + self::INTEGRAL_AD_SCIENCE => 'INTEGRAL_AD_SCIENCE', + self::MOAT => 'MOAT', + self::NONE => 'NONE', + self::TELEMETRY => 'TELEMETRY', + ]; + + 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/gapic_metadata.json b/AdsAdManager/src/V1/gapic_metadata.json index 8d05d5bd7275..eb40ea8a7cef 100644 --- a/AdsAdManager/src/V1/gapic_metadata.json +++ b/AdsAdManager/src/V1/gapic_metadata.json @@ -510,6 +510,16 @@ "grpc": { "libraryClient": "ContentBundleServiceGapicClient", "rpcs": { + "BatchActivateContentBundles": { + "methods": [ + "batchActivateContentBundles" + ] + }, + "BatchDeactivateContentBundles": { + "methods": [ + "batchDeactivateContentBundles" + ] + }, "GetContentBundle": { "methods": [ "getContentBundle" @@ -562,6 +572,35 @@ } } }, + "CreativeSetService": { + "clients": { + "grpc": { + "libraryClient": "CreativeSetServiceGapicClient", + "rpcs": { + "CreateCreativeSet": { + "methods": [ + "createCreativeSet" + ] + }, + "GetCreativeSet": { + "methods": [ + "getCreativeSet" + ] + }, + "ListCreativeSets": { + "methods": [ + "listCreativeSets" + ] + }, + "UpdateCreativeSet": { + "methods": [ + "updateCreativeSet" + ] + } + } + } + } + }, "CreativeTemplateService": { "clients": { "grpc": { @@ -1127,6 +1166,96 @@ "grpc": { "libraryClient": "OrderServiceGapicClient", "rpcs": { + "BatchApproveAndOverbookOrders": { + "methods": [ + "batchApproveAndOverbookOrders" + ] + }, + "BatchApproveOrders": { + "methods": [ + "batchApproveOrders" + ] + }, + "BatchApproveOrdersWithoutReservation": { + "methods": [ + "batchApproveOrdersWithoutReservation" + ] + }, + "BatchArchiveOrders": { + "methods": [ + "batchArchiveOrders" + ] + }, + "BatchCreateOrders": { + "methods": [ + "batchCreateOrders" + ] + }, + "BatchDeleteOrders": { + "methods": [ + "batchDeleteOrders" + ] + }, + "BatchDisapproveOrders": { + "methods": [ + "batchDisapproveOrders" + ] + }, + "BatchDisapproveOrdersWithoutReservationChanges": { + "methods": [ + "batchDisapproveOrdersWithoutReservationChanges" + ] + }, + "BatchPauseOrders": { + "methods": [ + "batchPauseOrders" + ] + }, + "BatchResumeAndOverbookOrders": { + "methods": [ + "batchResumeAndOverbookOrders" + ] + }, + "BatchResumeOrders": { + "methods": [ + "batchResumeOrders" + ] + }, + "BatchRetractOrders": { + "methods": [ + "batchRetractOrders" + ] + }, + "BatchRetractOrdersWithoutReservationChanges": { + "methods": [ + "batchRetractOrdersWithoutReservationChanges" + ] + }, + "BatchSubmitOrdersForApproval": { + "methods": [ + "batchSubmitOrdersForApproval" + ] + }, + "BatchSubmitOrdersForApprovalAndOverbook": { + "methods": [ + "batchSubmitOrdersForApprovalAndOverbook" + ] + }, + "BatchSubmitOrdersForApprovalWithoutReservationChanges": { + "methods": [ + "batchSubmitOrdersForApprovalWithoutReservationChanges" + ] + }, + "BatchUnarchiveOrders": { + "methods": [ + "batchUnarchiveOrders" + ] + }, + "BatchUpdateOrders": { + "methods": [ + "batchUpdateOrders" + ] + }, "GetOrder": { "methods": [ "getOrder" @@ -1398,6 +1527,55 @@ } } }, + "SlateService": { + "clients": { + "grpc": { + "libraryClient": "SlateServiceGapicClient", + "rpcs": { + "BatchArchiveSlates": { + "methods": [ + "batchArchiveSlates" + ] + }, + "BatchCreateSlates": { + "methods": [ + "batchCreateSlates" + ] + }, + "BatchUnarchiveSlates": { + "methods": [ + "batchUnarchiveSlates" + ] + }, + "BatchUpdateSlates": { + "methods": [ + "batchUpdateSlates" + ] + }, + "CreateSlate": { + "methods": [ + "createSlate" + ] + }, + "GetSlate": { + "methods": [ + "getSlate" + ] + }, + "ListSlates": { + "methods": [ + "listSlates" + ] + }, + "UpdateSlate": { + "methods": [ + "updateSlate" + ] + } + } + } + } + }, "SuggestedAdUnitService": { "clients": { "grpc": { @@ -1437,6 +1615,11 @@ "batchDeactivateTargetingPresets" ] }, + "BatchUpdateTargetingPresets": { + "methods": [ + "batchUpdateTargetingPresets" + ] + }, "CreateTargetingPreset": { "methods": [ "createTargetingPreset" @@ -1451,6 +1634,11 @@ "methods": [ "listTargetingPresets" ] + }, + "UpdateTargetingPreset": { + "methods": [ + "updateTargetingPreset" + ] } } } diff --git a/AdsAdManager/src/V1/resources/content_bundle_service_client_config.json b/AdsAdManager/src/V1/resources/content_bundle_service_client_config.json index 4a7146ed4e3b..692715d2bc5f 100644 --- a/AdsAdManager/src/V1/resources/content_bundle_service_client_config.json +++ b/AdsAdManager/src/V1/resources/content_bundle_service_client_config.json @@ -16,6 +16,16 @@ } }, "methods": { + "BatchActivateContentBundles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchDeactivateContentBundles": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "GetContentBundle": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", diff --git a/AdsAdManager/src/V1/resources/content_bundle_service_descriptor_config.php b/AdsAdManager/src/V1/resources/content_bundle_service_descriptor_config.php index 75f84ad16ac8..5841f089c107 100644 --- a/AdsAdManager/src/V1/resources/content_bundle_service_descriptor_config.php +++ b/AdsAdManager/src/V1/resources/content_bundle_service_descriptor_config.php @@ -23,6 +23,30 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.ContentBundleService' => [ + 'BatchActivateContentBundles' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchActivateContentBundlesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateContentBundles' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDeactivateContentBundlesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'GetContentBundle' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Ads\AdManager\V1\ContentBundle', 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 index fd30b6bdbad3..658ed60ee1bd 100644 --- a/AdsAdManager/src/V1/resources/content_bundle_service_rest_client_config.php +++ b/AdsAdManager/src/V1/resources/content_bundle_service_rest_client_config.php @@ -23,6 +23,30 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.ContentBundleService' => [ + 'BatchActivateContentBundles' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/contentBundles:batchActivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeactivateContentBundles' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/contentBundles:batchDeactivate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'GetContentBundle' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=networks/*/contentBundles/*}', diff --git a/AdsAdManager/src/V1/resources/creative_set_service_client_config.json b/AdsAdManager/src/V1/resources/creative_set_service_client_config.json new file mode 100644 index 000000000000..bbcfd6f582d4 --- /dev/null +++ b/AdsAdManager/src/V1/resources/creative_set_service_client_config.json @@ -0,0 +1,42 @@ +{ + "interfaces": { + "google.ads.admanager.v1.CreativeSetService": { + "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": { + "CreateCreativeSet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetCreativeSet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListCreativeSets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateCreativeSet": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/creative_set_service_descriptor_config.php b/AdsAdManager/src/V1/resources/creative_set_service_descriptor_config.php new file mode 100644 index 000000000000..109312aed5cc --- /dev/null +++ b/AdsAdManager/src/V1/resources/creative_set_service_descriptor_config.php @@ -0,0 +1,90 @@ + [ + 'google.ads.admanager.v1.CreativeSetService' => [ + 'CreateCreativeSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CreativeSet', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetCreativeSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CreativeSet', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCreativeSets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCreativeSets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListCreativeSetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCreativeSet' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\CreativeSet', + 'headerParams' => [ + [ + 'keyName' => 'creative_set.name', + 'fieldAccessors' => [ + 'getCreativeSet', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'creative' => 'networks/{network_code}/creatives/{creative}', + 'creativeSet' => 'networks/{network_code}/creativeSets/{creative_set}', + 'network' => 'networks/{network_code}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/creative_set_service_rest_client_config.php b/AdsAdManager/src/V1/resources/creative_set_service_rest_client_config.php new file mode 100644 index 000000000000..be3cdad53e6b --- /dev/null +++ b/AdsAdManager/src/V1/resources/creative_set_service_rest_client_config.php @@ -0,0 +1,100 @@ + [ + 'google.ads.admanager.v1.CreativeSetService' => [ + 'CreateCreativeSet' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/creativeSets', + 'body' => 'creative_set', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetCreativeSet' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/creativeSets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCreativeSets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/creativeSets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCreativeSet' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{creative_set.name=networks/*/creativeSets/*}', + 'body' => 'creative_set', + 'placeholders' => [ + 'creative_set.name' => [ + 'getters' => [ + 'getCreativeSet', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/order_service_client_config.json b/AdsAdManager/src/V1/resources/order_service_client_config.json index de7c27588915..445a748b57b7 100644 --- a/AdsAdManager/src/V1/resources/order_service_client_config.json +++ b/AdsAdManager/src/V1/resources/order_service_client_config.json @@ -28,6 +28,96 @@ } }, "methods": { + "BatchApproveAndOverbookOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchApproveOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchApproveOrdersWithoutReservation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchArchiveOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchCreateOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchDeleteOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchDisapproveOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchDisapproveOrdersWithoutReservationChanges": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchPauseOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchResumeAndOverbookOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchResumeOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchRetractOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchRetractOrdersWithoutReservationChanges": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchSubmitOrdersForApproval": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchSubmitOrdersForApprovalAndOverbook": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchSubmitOrdersForApprovalWithoutReservationChanges": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchUnarchiveOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "BatchUpdateOrders": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetOrder": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/AdsAdManager/src/V1/resources/order_service_descriptor_config.php b/AdsAdManager/src/V1/resources/order_service_descriptor_config.php index 9cf7e3962ede..748091619d00 100644 --- a/AdsAdManager/src/V1/resources/order_service_descriptor_config.php +++ b/AdsAdManager/src/V1/resources/order_service_descriptor_config.php @@ -23,6 +23,222 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.OrderService' => [ + 'BatchApproveAndOverbookOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchApproveAndOverbookOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchApproveOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchApproveOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchApproveOrdersWithoutReservation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchApproveOrdersWithoutReservationResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchArchiveOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchArchiveOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreateOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDeleteOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDisapproveOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDisapproveOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDisapproveOrdersWithoutReservationChanges' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchDisapproveOrdersWithoutReservationChangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchPauseOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchPauseOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchResumeAndOverbookOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchResumeAndOverbookOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchResumeOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchResumeOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchRetractOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchRetractOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchRetractOrdersWithoutReservationChanges' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchRetractOrdersWithoutReservationChangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitOrdersForApproval' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitOrdersForApprovalAndOverbook' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalAndOverbookResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitOrdersForApprovalWithoutReservationChanges' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalWithoutReservationChangesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUnarchiveOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUnarchiveOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateOrders' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateOrdersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'GetOrder' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Ads\AdManager\V1\Order', @@ -56,8 +272,14 @@ ], ], 'templateMap' => [ + 'company' => 'networks/{network_code}/companies/{company}', + 'contact' => 'networks/{network_code}/contacts/{contact}', + 'customField' => 'networks/{network_code}/customFields/{custom_field}', + 'label' => 'networks/{network_code}/labels/{label}', 'network' => 'networks/{network_code}', 'order' => 'networks/{network_code}/orders/{order}', + 'team' => 'networks/{network_code}/teams/{team}', + 'user' => 'networks/{network_code}/users/{user}', ], ], ], diff --git a/AdsAdManager/src/V1/resources/order_service_rest_client_config.php b/AdsAdManager/src/V1/resources/order_service_rest_client_config.php index f73d390101eb..cdb66e94e91d 100644 --- a/AdsAdManager/src/V1/resources/order_service_rest_client_config.php +++ b/AdsAdManager/src/V1/resources/order_service_rest_client_config.php @@ -23,6 +23,222 @@ return [ 'interfaces' => [ 'google.ads.admanager.v1.OrderService' => [ + 'BatchApproveAndOverbookOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchApproveAndOverbook', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchApproveOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchApprove', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchApproveOrdersWithoutReservation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchApproveWithoutReservation', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchArchiveOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchArchive', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDeleteOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchDelete', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDisapproveOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchDisapprove', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchDisapproveOrdersWithoutReservationChanges' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchDisapproveWithoutReservationChanges', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchPauseOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchPause', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchResumeAndOverbookOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchResumeAndOverbook', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchResumeOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchResume', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchRetractOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchRetract', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchRetractOrdersWithoutReservationChanges' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchRetractWithoutReservationChanges', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitOrdersForApproval' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchSubmitForApproval', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitOrdersForApprovalAndOverbook' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchSubmitForApprovalAndOverbook', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchSubmitOrdersForApprovalWithoutReservationChanges' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchSubmitForApprovalWithoutReservationChanges', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUnarchiveOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchUnarchive', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateOrders' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/orders:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'GetOrder' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=networks/*/orders/*}', diff --git a/AdsAdManager/src/V1/resources/slate_service_client_config.json b/AdsAdManager/src/V1/resources/slate_service_client_config.json new file mode 100644 index 000000000000..3c35fdab6df3 --- /dev/null +++ b/AdsAdManager/src/V1/resources/slate_service_client_config.json @@ -0,0 +1,62 @@ +{ + "interfaces": { + "google.ads.admanager.v1.SlateService": { + "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": { + "BatchArchiveSlates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchCreateSlates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUnarchiveSlates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "BatchUpdateSlates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateSlate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSlate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSlates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSlate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AdsAdManager/src/V1/resources/slate_service_descriptor_config.php b/AdsAdManager/src/V1/resources/slate_service_descriptor_config.php new file mode 100644 index 000000000000..7d36bb2908fd --- /dev/null +++ b/AdsAdManager/src/V1/resources/slate_service_descriptor_config.php @@ -0,0 +1,137 @@ + [ + 'google.ads.admanager.v1.SlateService' => [ + 'BatchArchiveSlates' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchArchiveSlatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateSlates' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchCreateSlatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUnarchiveSlates' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUnarchiveSlatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateSlates' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateSlatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSlate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Slate', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetSlate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Slate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSlates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSlates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\ListSlatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSlate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\Slate', + 'headerParams' => [ + [ + 'keyName' => 'slate.name', + 'fieldAccessors' => [ + 'getSlate', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'network' => 'networks/{network_code}', + 'slate' => 'networks/{network_code}/slates/{slate}', + ], + ], + ], +]; diff --git a/AdsAdManager/src/V1/resources/slate_service_rest_client_config.php b/AdsAdManager/src/V1/resources/slate_service_rest_client_config.php new file mode 100644 index 000000000000..2b2189b3e7f9 --- /dev/null +++ b/AdsAdManager/src/V1/resources/slate_service_rest_client_config.php @@ -0,0 +1,148 @@ + [ + 'google.ads.admanager.v1.SlateService' => [ + 'BatchArchiveSlates' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/slates:batchArchive', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchCreateSlates' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/slates:batchCreate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUnarchiveSlates' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/slates:batchUnarchive', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'BatchUpdateSlates' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/slates:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSlate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/slates', + 'body' => 'slate', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetSlate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/slates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSlates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=networks/*}/slates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateSlate' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{slate.name=networks/*/slates/*}', + 'body' => 'slate', + 'placeholders' => [ + 'slate.name' => [ + 'getters' => [ + 'getSlate', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=networks/*/operations/reports/runs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AdsAdManager/src/V1/resources/targeting_preset_service_client_config.json b/AdsAdManager/src/V1/resources/targeting_preset_service_client_config.json index 6a232f534b1b..d7a261876782 100644 --- a/AdsAdManager/src/V1/resources/targeting_preset_service_client_config.json +++ b/AdsAdManager/src/V1/resources/targeting_preset_service_client_config.json @@ -26,6 +26,11 @@ "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "BatchUpdateTargetingPresets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "CreateTargetingPreset": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", @@ -40,6 +45,11 @@ "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" + }, + "UpdateTargetingPreset": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" } } } diff --git a/AdsAdManager/src/V1/resources/targeting_preset_service_descriptor_config.php b/AdsAdManager/src/V1/resources/targeting_preset_service_descriptor_config.php index 111a7d0e115c..005e5c7d269b 100644 --- a/AdsAdManager/src/V1/resources/targeting_preset_service_descriptor_config.php +++ b/AdsAdManager/src/V1/resources/targeting_preset_service_descriptor_config.php @@ -47,6 +47,18 @@ ], ], ], + 'BatchUpdateTargetingPresets' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\BatchUpdateTargetingPresetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'CreateTargetingPreset' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Ads\AdManager\V1\TargetingPreset', @@ -91,6 +103,19 @@ ], ], ], + 'UpdateTargetingPreset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Ads\AdManager\V1\TargetingPreset', + 'headerParams' => [ + [ + 'keyName' => 'targeting_preset.name', + 'fieldAccessors' => [ + 'getTargetingPreset', + 'getName', + ], + ], + ], + ], 'templateMap' => [ 'adUnit' => 'networks/{network_code}/adUnits/{ad_unit}', 'application' => 'networks/{network_code}/applications/{application}', diff --git a/AdsAdManager/src/V1/resources/targeting_preset_service_rest_client_config.php b/AdsAdManager/src/V1/resources/targeting_preset_service_rest_client_config.php index deafe1579c59..d395a37bbe3c 100644 --- a/AdsAdManager/src/V1/resources/targeting_preset_service_rest_client_config.php +++ b/AdsAdManager/src/V1/resources/targeting_preset_service_rest_client_config.php @@ -47,6 +47,18 @@ ], ], ], + 'BatchUpdateTargetingPresets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=networks/*}/targetingPresets:batchUpdate', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'CreateTargetingPreset' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=networks/*}/targetingPresets', @@ -81,6 +93,19 @@ ], ], ], + 'UpdateTargetingPreset' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{targeting_preset.name=networks/*/targetingPresets/*}', + 'body' => 'targeting_preset', + 'placeholders' => [ + 'targeting_preset.name' => [ + 'getters' => [ + 'getTargetingPreset', + 'getName', + ], + ], + ], + ], ], 'google.longrunning.Operations' => [ 'CancelOperation' => [ diff --git a/AdsAdManager/tests/Unit/V1/Client/ContentBundleServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/ContentBundleServiceClientTest.php index 84db23ba868b..f84347417746 100644 --- a/AdsAdManager/tests/Unit/V1/Client/ContentBundleServiceClientTest.php +++ b/AdsAdManager/tests/Unit/V1/Client/ContentBundleServiceClientTest.php @@ -22,6 +22,10 @@ namespace Google\Ads\AdManager\Tests\Unit\V1\Client; +use Google\Ads\AdManager\V1\BatchActivateContentBundlesRequest; +use Google\Ads\AdManager\V1\BatchActivateContentBundlesResponse; +use Google\Ads\AdManager\V1\BatchDeactivateContentBundlesRequest; +use Google\Ads\AdManager\V1\BatchDeactivateContentBundlesResponse; use Google\Ads\AdManager\V1\Client\ContentBundleServiceClient; use Google\Ads\AdManager\V1\ContentBundle; use Google\Ads\AdManager\V1\GetContentBundleRequest; @@ -64,6 +68,143 @@ private function createClient(array $options = []) return new ContentBundleServiceClient($options); } + /** @test */ + public function batchActivateContentBundlesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchActivateContentBundlesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]')]; + $request = (new BatchActivateContentBundlesRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivateContentBundles($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/BatchActivateContentBundles', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchActivateContentBundlesExceptionTest() + { + $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->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]')]; + $request = (new BatchActivateContentBundlesRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchActivateContentBundles($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 batchDeactivateContentBundlesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDeactivateContentBundlesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]')]; + $request = (new BatchDeactivateContentBundlesRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchDeactivateContentBundles($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/BatchDeactivateContentBundles', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeactivateContentBundlesExceptionTest() + { + $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->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]')]; + $request = (new BatchDeactivateContentBundlesRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchDeactivateContentBundles($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 getContentBundleTest() { @@ -205,7 +346,7 @@ public function listContentBundlesExceptionTest() } /** @test */ - public function getContentBundleAsyncTest() + public function batchActivateContentBundlesAsyncTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -213,24 +354,23 @@ public function getContentBundleAsyncTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $expectedResponse = new ContentBundle(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); + $expectedResponse = new BatchActivateContentBundlesResponse(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]'); - $request = (new GetContentBundleRequest())->setName($formattedName); - $response = $gapicClient->getContentBundleAsync($request)->wait(); + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->contentBundleName('[NETWORK_CODE]', '[CONTENT_BUNDLE]')]; + $request = (new BatchActivateContentBundlesRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchActivateContentBundlesAsync($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->assertSame('/google.ads.admanager.v1.ContentBundleService/BatchActivateContentBundles', $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/CreativeSetServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/CreativeSetServiceClientTest.php new file mode 100644 index 000000000000..7d69d31ee67b --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/CreativeSetServiceClientTest.php @@ -0,0 +1,417 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return CreativeSetServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CreativeSetServiceClient($options); + } + + /** @test */ + public function createCreativeSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $masterCreative = 'masterCreative1906705644'; + $expectedResponse = new CreativeSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterCreative($masterCreative); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $creativeSet = new CreativeSet(); + $creativeSetDisplayName = 'creativeSetDisplayName561983034'; + $creativeSet->setDisplayName($creativeSetDisplayName); + $creativeSetMasterCreative = $gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]'); + $creativeSet->setMasterCreative($creativeSetMasterCreative); + $creativeSetCompanionCreatives = [$gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]')]; + $creativeSet->setCompanionCreatives($creativeSetCompanionCreatives); + $request = (new CreateCreativeSetRequest())->setParent($formattedParent)->setCreativeSet($creativeSet); + $response = $gapicClient->createCreativeSet($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.CreativeSetService/CreateCreativeSet', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCreativeSet(); + $this->assertProtobufEquals($creativeSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCreativeSetExceptionTest() + { + $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]'); + $creativeSet = new CreativeSet(); + $creativeSetDisplayName = 'creativeSetDisplayName561983034'; + $creativeSet->setDisplayName($creativeSetDisplayName); + $creativeSetMasterCreative = $gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]'); + $creativeSet->setMasterCreative($creativeSetMasterCreative); + $creativeSetCompanionCreatives = [$gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]')]; + $creativeSet->setCompanionCreatives($creativeSetCompanionCreatives); + $request = (new CreateCreativeSetRequest())->setParent($formattedParent)->setCreativeSet($creativeSet); + try { + $gapicClient->createCreativeSet($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 getCreativeSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $masterCreative = 'masterCreative1906705644'; + $expectedResponse = new CreativeSet(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterCreative($masterCreative); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->creativeSetName('[NETWORK_CODE]', '[CREATIVE_SET]'); + $request = (new GetCreativeSetRequest())->setName($formattedName); + $response = $gapicClient->getCreativeSet($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.CreativeSetService/GetCreativeSet', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCreativeSetExceptionTest() + { + $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->creativeSetName('[NETWORK_CODE]', '[CREATIVE_SET]'); + $request = (new GetCreativeSetRequest())->setName($formattedName); + try { + $gapicClient->getCreativeSet($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 listCreativeSetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $creativeSetsElement = new CreativeSet(); + $creativeSets = [$creativeSetsElement]; + $expectedResponse = new ListCreativeSetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setCreativeSets($creativeSets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListCreativeSetsRequest())->setParent($formattedParent); + $response = $gapicClient->listCreativeSets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCreativeSets()[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.CreativeSetService/ListCreativeSets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCreativeSetsExceptionTest() + { + $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 ListCreativeSetsRequest())->setParent($formattedParent); + try { + $gapicClient->listCreativeSets($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 updateCreativeSetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $masterCreative = 'masterCreative1906705644'; + $expectedResponse = new CreativeSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterCreative($masterCreative); + $transport->addResponse($expectedResponse); + // Mock request + $creativeSet = new CreativeSet(); + $creativeSetDisplayName = 'creativeSetDisplayName561983034'; + $creativeSet->setDisplayName($creativeSetDisplayName); + $creativeSetMasterCreative = $gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]'); + $creativeSet->setMasterCreative($creativeSetMasterCreative); + $creativeSetCompanionCreatives = [$gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]')]; + $creativeSet->setCompanionCreatives($creativeSetCompanionCreatives); + $request = (new UpdateCreativeSetRequest())->setCreativeSet($creativeSet); + $response = $gapicClient->updateCreativeSet($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.CreativeSetService/UpdateCreativeSet', $actualFuncCall); + $actualValue = $actualRequestObject->getCreativeSet(); + $this->assertProtobufEquals($creativeSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCreativeSetExceptionTest() + { + $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 + $creativeSet = new CreativeSet(); + $creativeSetDisplayName = 'creativeSetDisplayName561983034'; + $creativeSet->setDisplayName($creativeSetDisplayName); + $creativeSetMasterCreative = $gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]'); + $creativeSet->setMasterCreative($creativeSetMasterCreative); + $creativeSetCompanionCreatives = [$gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]')]; + $creativeSet->setCompanionCreatives($creativeSetCompanionCreatives); + $request = (new UpdateCreativeSetRequest())->setCreativeSet($creativeSet); + try { + $gapicClient->updateCreativeSet($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 createCreativeSetAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $masterCreative = 'masterCreative1906705644'; + $expectedResponse = new CreativeSet(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setMasterCreative($masterCreative); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $creativeSet = new CreativeSet(); + $creativeSetDisplayName = 'creativeSetDisplayName561983034'; + $creativeSet->setDisplayName($creativeSetDisplayName); + $creativeSetMasterCreative = $gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]'); + $creativeSet->setMasterCreative($creativeSetMasterCreative); + $creativeSetCompanionCreatives = [$gapicClient->creativeName('[NETWORK_CODE]', '[CREATIVE]')]; + $creativeSet->setCompanionCreatives($creativeSetCompanionCreatives); + $request = (new CreateCreativeSetRequest())->setParent($formattedParent)->setCreativeSet($creativeSet); + $response = $gapicClient->createCreativeSetAsync($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.CreativeSetService/CreateCreativeSet', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCreativeSet(); + $this->assertProtobufEquals($creativeSet, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AdsAdManager/tests/Unit/V1/Client/LineItemServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/LineItemServiceClientTest.php index 849ec587be8c..9b8dc253eb27 100644 --- a/AdsAdManager/tests/Unit/V1/Client/LineItemServiceClientTest.php +++ b/AdsAdManager/tests/Unit/V1/Client/LineItemServiceClientTest.php @@ -76,10 +76,50 @@ public function getLineItemTest() $name2 = 'name2-1052831874'; $order = 'order106006350'; $displayName = 'displayName1615086568'; + $externalLineItemId = 'externalLineItemId-845306768'; + $orderDisplayName = 'orderDisplayName790164793'; + $autoExtensionDays = 2065627367; + $endTimeUnlimited = false; + $priority = 1165461084; + $contractedUnitsBought = 424175607; + $allowOverbook = false; + $skipInventoryCheck = false; + $skipCrossSellingRuleWarningChecks = false; + $reserveOnCreation = true; + $archived = true; + $webPropertyCode = 'webPropertyCode2013601900'; + $sameAdvertiserExceptionEnabled = true; + $updateSource = 'updateSource-1348638639'; + $notes = 'notes105008833'; + $missingCreatives = false; + $youtubeKidsRestricted = false; + $customVastExtension = 'customVastExtension2046703770'; + $sponsorshipExclusivityEnabled = true; + $repeatedCreativeServingEnabled = false; $expectedResponse = new LineItem(); $expectedResponse->setName($name2); $expectedResponse->setOrder($order); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalLineItemId($externalLineItemId); + $expectedResponse->setOrderDisplayName($orderDisplayName); + $expectedResponse->setAutoExtensionDays($autoExtensionDays); + $expectedResponse->setEndTimeUnlimited($endTimeUnlimited); + $expectedResponse->setPriority($priority); + $expectedResponse->setContractedUnitsBought($contractedUnitsBought); + $expectedResponse->setAllowOverbook($allowOverbook); + $expectedResponse->setSkipInventoryCheck($skipInventoryCheck); + $expectedResponse->setSkipCrossSellingRuleWarningChecks($skipCrossSellingRuleWarningChecks); + $expectedResponse->setReserveOnCreation($reserveOnCreation); + $expectedResponse->setArchived($archived); + $expectedResponse->setWebPropertyCode($webPropertyCode); + $expectedResponse->setSameAdvertiserExceptionEnabled($sameAdvertiserExceptionEnabled); + $expectedResponse->setUpdateSource($updateSource); + $expectedResponse->setNotes($notes); + $expectedResponse->setMissingCreatives($missingCreatives); + $expectedResponse->setYoutubeKidsRestricted($youtubeKidsRestricted); + $expectedResponse->setCustomVastExtension($customVastExtension); + $expectedResponse->setSponsorshipExclusivityEnabled($sponsorshipExclusivityEnabled); + $expectedResponse->setRepeatedCreativeServingEnabled($repeatedCreativeServingEnabled); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->lineItemName('[NETWORK_CODE]', '[LINE_ITEM]'); @@ -218,10 +258,50 @@ public function getLineItemAsyncTest() $name2 = 'name2-1052831874'; $order = 'order106006350'; $displayName = 'displayName1615086568'; + $externalLineItemId = 'externalLineItemId-845306768'; + $orderDisplayName = 'orderDisplayName790164793'; + $autoExtensionDays = 2065627367; + $endTimeUnlimited = false; + $priority = 1165461084; + $contractedUnitsBought = 424175607; + $allowOverbook = false; + $skipInventoryCheck = false; + $skipCrossSellingRuleWarningChecks = false; + $reserveOnCreation = true; + $archived = true; + $webPropertyCode = 'webPropertyCode2013601900'; + $sameAdvertiserExceptionEnabled = true; + $updateSource = 'updateSource-1348638639'; + $notes = 'notes105008833'; + $missingCreatives = false; + $youtubeKidsRestricted = false; + $customVastExtension = 'customVastExtension2046703770'; + $sponsorshipExclusivityEnabled = true; + $repeatedCreativeServingEnabled = false; $expectedResponse = new LineItem(); $expectedResponse->setName($name2); $expectedResponse->setOrder($order); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalLineItemId($externalLineItemId); + $expectedResponse->setOrderDisplayName($orderDisplayName); + $expectedResponse->setAutoExtensionDays($autoExtensionDays); + $expectedResponse->setEndTimeUnlimited($endTimeUnlimited); + $expectedResponse->setPriority($priority); + $expectedResponse->setContractedUnitsBought($contractedUnitsBought); + $expectedResponse->setAllowOverbook($allowOverbook); + $expectedResponse->setSkipInventoryCheck($skipInventoryCheck); + $expectedResponse->setSkipCrossSellingRuleWarningChecks($skipCrossSellingRuleWarningChecks); + $expectedResponse->setReserveOnCreation($reserveOnCreation); + $expectedResponse->setArchived($archived); + $expectedResponse->setWebPropertyCode($webPropertyCode); + $expectedResponse->setSameAdvertiserExceptionEnabled($sameAdvertiserExceptionEnabled); + $expectedResponse->setUpdateSource($updateSource); + $expectedResponse->setNotes($notes); + $expectedResponse->setMissingCreatives($missingCreatives); + $expectedResponse->setYoutubeKidsRestricted($youtubeKidsRestricted); + $expectedResponse->setCustomVastExtension($customVastExtension); + $expectedResponse->setSponsorshipExclusivityEnabled($sponsorshipExclusivityEnabled); + $expectedResponse->setRepeatedCreativeServingEnabled($repeatedCreativeServingEnabled); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->lineItemName('[NETWORK_CODE]', '[LINE_ITEM]'); diff --git a/AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php index e79b907632a0..e35a0ccfdf51 100644 --- a/AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php +++ b/AdsAdManager/tests/Unit/V1/Client/OrderServiceClientTest.php @@ -22,6 +22,42 @@ namespace Google\Ads\AdManager\Tests\Unit\V1\Client; +use Google\Ads\AdManager\V1\BatchApproveAndOverbookOrdersRequest; +use Google\Ads\AdManager\V1\BatchApproveAndOverbookOrdersResponse; +use Google\Ads\AdManager\V1\BatchApproveOrdersRequest; +use Google\Ads\AdManager\V1\BatchApproveOrdersResponse; +use Google\Ads\AdManager\V1\BatchApproveOrdersWithoutReservationRequest; +use Google\Ads\AdManager\V1\BatchApproveOrdersWithoutReservationResponse; +use Google\Ads\AdManager\V1\BatchArchiveOrdersRequest; +use Google\Ads\AdManager\V1\BatchArchiveOrdersResponse; +use Google\Ads\AdManager\V1\BatchCreateOrdersRequest; +use Google\Ads\AdManager\V1\BatchCreateOrdersResponse; +use Google\Ads\AdManager\V1\BatchDeleteOrdersRequest; +use Google\Ads\AdManager\V1\BatchDeleteOrdersResponse; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersRequest; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersResponse; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersWithoutReservationChangesRequest; +use Google\Ads\AdManager\V1\BatchDisapproveOrdersWithoutReservationChangesResponse; +use Google\Ads\AdManager\V1\BatchPauseOrdersRequest; +use Google\Ads\AdManager\V1\BatchPauseOrdersResponse; +use Google\Ads\AdManager\V1\BatchResumeAndOverbookOrdersRequest; +use Google\Ads\AdManager\V1\BatchResumeAndOverbookOrdersResponse; +use Google\Ads\AdManager\V1\BatchResumeOrdersRequest; +use Google\Ads\AdManager\V1\BatchResumeOrdersResponse; +use Google\Ads\AdManager\V1\BatchRetractOrdersRequest; +use Google\Ads\AdManager\V1\BatchRetractOrdersResponse; +use Google\Ads\AdManager\V1\BatchRetractOrdersWithoutReservationChangesRequest; +use Google\Ads\AdManager\V1\BatchRetractOrdersWithoutReservationChangesResponse; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalAndOverbookRequest; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalAndOverbookResponse; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalRequest; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalResponse; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalWithoutReservationChangesRequest; +use Google\Ads\AdManager\V1\BatchSubmitOrdersForApprovalWithoutReservationChangesResponse; +use Google\Ads\AdManager\V1\BatchUnarchiveOrdersRequest; +use Google\Ads\AdManager\V1\BatchUnarchiveOrdersResponse; +use Google\Ads\AdManager\V1\BatchUpdateOrdersRequest; +use Google\Ads\AdManager\V1\BatchUpdateOrdersResponse; use Google\Ads\AdManager\V1\Client\OrderServiceClient; use Google\Ads\AdManager\V1\GetOrderRequest; use Google\Ads\AdManager\V1\ListOrdersRequest; @@ -64,6 +100,1247 @@ private function createClient(array $options = []) return new OrderServiceClient($options); } + /** @test */ + public function batchApproveAndOverbookOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchApproveAndOverbookOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchApproveAndOverbookOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchApproveAndOverbookOrders($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.OrderService/BatchApproveAndOverbookOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchApproveAndOverbookOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchApproveAndOverbookOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchApproveAndOverbookOrders($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 batchApproveOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchApproveOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchApproveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchApproveOrders($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.OrderService/BatchApproveOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchApproveOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchApproveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchApproveOrders($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 batchApproveOrdersWithoutReservationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchApproveOrdersWithoutReservationResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchApproveOrdersWithoutReservationRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->batchApproveOrdersWithoutReservation($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.OrderService/BatchApproveOrdersWithoutReservation', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchApproveOrdersWithoutReservationExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchApproveOrdersWithoutReservationRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->batchApproveOrdersWithoutReservation($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 batchArchiveOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchArchiveOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchArchiveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchArchiveOrders($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.OrderService/BatchArchiveOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchArchiveOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchArchiveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchArchiveOrders($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 batchCreateOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateOrdersRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateOrders($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.OrderService/BatchCreateOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateOrdersExceptionTest() + { + $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 BatchCreateOrdersRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreateOrders($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 batchDeleteOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDeleteOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchDeleteOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchDeleteOrders($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.OrderService/BatchDeleteOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDeleteOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchDeleteOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchDeleteOrders($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 batchDisapproveOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDisapproveOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchDisapproveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchDisapproveOrders($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.OrderService/BatchDisapproveOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDisapproveOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchDisapproveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchDisapproveOrders($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 batchDisapproveOrdersWithoutReservationChangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchDisapproveOrdersWithoutReservationChangesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchDisapproveOrdersWithoutReservationChangesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->batchDisapproveOrdersWithoutReservationChanges($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.OrderService/BatchDisapproveOrdersWithoutReservationChanges', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchDisapproveOrdersWithoutReservationChangesExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchDisapproveOrdersWithoutReservationChangesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->batchDisapproveOrdersWithoutReservationChanges($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 batchPauseOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchPauseOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchPauseOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchPauseOrders($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.OrderService/BatchPauseOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchPauseOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchPauseOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchPauseOrders($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 batchResumeAndOverbookOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchResumeAndOverbookOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchResumeAndOverbookOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchResumeAndOverbookOrders($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.OrderService/BatchResumeAndOverbookOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchResumeAndOverbookOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchResumeAndOverbookOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchResumeAndOverbookOrders($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 batchResumeOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchResumeOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchResumeOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchResumeOrders($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.OrderService/BatchResumeOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchResumeOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchResumeOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchResumeOrders($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 batchRetractOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchRetractOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchRetractOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchRetractOrders($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.OrderService/BatchRetractOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchRetractOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchRetractOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchRetractOrders($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 batchRetractOrdersWithoutReservationChangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchRetractOrdersWithoutReservationChangesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchRetractOrdersWithoutReservationChangesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->batchRetractOrdersWithoutReservationChanges($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.OrderService/BatchRetractOrdersWithoutReservationChanges', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchRetractOrdersWithoutReservationChangesExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchRetractOrdersWithoutReservationChangesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->batchRetractOrdersWithoutReservationChanges($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 batchSubmitOrdersForApprovalTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchSubmitOrdersForApprovalResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchSubmitOrdersForApprovalRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchSubmitOrdersForApproval($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.OrderService/BatchSubmitOrdersForApproval', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchSubmitOrdersForApprovalExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchSubmitOrdersForApprovalRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchSubmitOrdersForApproval($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 batchSubmitOrdersForApprovalAndOverbookTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchSubmitOrdersForApprovalAndOverbookResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchSubmitOrdersForApprovalAndOverbookRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->batchSubmitOrdersForApprovalAndOverbook($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.OrderService/BatchSubmitOrdersForApprovalAndOverbook', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchSubmitOrdersForApprovalAndOverbookExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchSubmitOrdersForApprovalAndOverbookRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->batchSubmitOrdersForApprovalAndOverbook($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 batchSubmitOrdersForApprovalWithoutReservationChangesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchSubmitOrdersForApprovalWithoutReservationChangesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchSubmitOrdersForApprovalWithoutReservationChangesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + $response = $gapicClient->batchSubmitOrdersForApprovalWithoutReservationChanges($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.OrderService/BatchSubmitOrdersForApprovalWithoutReservationChanges', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchSubmitOrdersForApprovalWithoutReservationChangesExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchSubmitOrdersForApprovalWithoutReservationChangesRequest()) + ->setParent($formattedParent) + ->setNames($formattedNames); + try { + $gapicClient->batchSubmitOrdersForApprovalWithoutReservationChanges($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 batchUnarchiveOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUnarchiveOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchUnarchiveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchUnarchiveOrders($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.OrderService/BatchUnarchiveOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUnarchiveOrdersExceptionTest() + { + $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->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchUnarchiveOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchUnarchiveOrders($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 batchUpdateOrdersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateOrdersResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateOrdersRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateOrders($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.OrderService/BatchUpdateOrders', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateOrdersExceptionTest() + { + $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 BatchUpdateOrdersRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateOrders($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 getOrderTest() { @@ -89,6 +1366,9 @@ public function getOrderTest() $notes = 'notes105008833'; $poNumber = 'poNumber1281088905'; $salesperson = 'salesperson-2087326879'; + $impressionsDelivered = 1410685425; + $totalClicksDelivered = 506686261; + $totalViewableImpressionsDelivered = 1084108714; $expectedResponse = new Order(); $expectedResponse->setName($name2); $expectedResponse->setOrderId($orderId); @@ -106,6 +1386,9 @@ public function getOrderTest() $expectedResponse->setNotes($notes); $expectedResponse->setPoNumber($poNumber); $expectedResponse->setSalesperson($salesperson); + $expectedResponse->setImpressionsDelivered($impressionsDelivered); + $expectedResponse->setTotalClicksDelivered($totalClicksDelivered); + $expectedResponse->setTotalViewableImpressionsDelivered($totalViewableImpressionsDelivered); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->orderName('[NETWORK_CODE]', '[ORDER]'); @@ -233,7 +1516,7 @@ public function listOrdersExceptionTest() } /** @test */ - public function getOrderAsyncTest() + public function batchApproveAndOverbookOrdersAsyncTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -241,52 +1524,23 @@ public function getOrderAsyncTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response - $name2 = 'name2-1052831874'; - $orderId = 1234304940; - $displayName = 'displayName1615086568'; - $programmatic = true; - $trafficker = 'trafficker-606937285'; - $advertiser = 'advertiser72080683'; - $agency = 'agency-1419699195'; - $creator = 'creator1028554796'; - $currencyCode = 'currencyCode1108728155'; - $unlimitedEndTime = false; - $externalOrderId = 1332092512; - $archived = true; - $lastModifiedByApp = 'lastModifiedByApp-1580292922'; - $notes = 'notes105008833'; - $poNumber = 'poNumber1281088905'; - $salesperson = 'salesperson-2087326879'; - $expectedResponse = new Order(); - $expectedResponse->setName($name2); - $expectedResponse->setOrderId($orderId); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setProgrammatic($programmatic); - $expectedResponse->setTrafficker($trafficker); - $expectedResponse->setAdvertiser($advertiser); - $expectedResponse->setAgency($agency); - $expectedResponse->setCreator($creator); - $expectedResponse->setCurrencyCode($currencyCode); - $expectedResponse->setUnlimitedEndTime($unlimitedEndTime); - $expectedResponse->setExternalOrderId($externalOrderId); - $expectedResponse->setArchived($archived); - $expectedResponse->setLastModifiedByApp($lastModifiedByApp); - $expectedResponse->setNotes($notes); - $expectedResponse->setPoNumber($poNumber); - $expectedResponse->setSalesperson($salesperson); + $expectedResponse = new BatchApproveAndOverbookOrdersResponse(); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->orderName('[NETWORK_CODE]', '[ORDER]'); - $request = (new GetOrderRequest())->setName($formattedName); - $response = $gapicClient->getOrderAsync($request)->wait(); + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->orderName('[NETWORK_CODE]', '[ORDER]')]; + $request = (new BatchApproveAndOverbookOrdersRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchApproveAndOverbookOrdersAsync($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.OrderService/GetOrder', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertSame('/google.ads.admanager.v1.OrderService/BatchApproveAndOverbookOrders', $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/SlateServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/SlateServiceClientTest.php new file mode 100644 index 000000000000..5276daeaeb19 --- /dev/null +++ b/AdsAdManager/tests/Unit/V1/Client/SlateServiceClientTest.php @@ -0,0 +1,665 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return SlateServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SlateServiceClient($options); + } + + /** @test */ + public function batchArchiveSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchArchiveSlatesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->slateName('[NETWORK_CODE]', '[SLATE]')]; + $request = (new BatchArchiveSlatesRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchArchiveSlates($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.SlateService/BatchArchiveSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchArchiveSlatesExceptionTest() + { + $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->slateName('[NETWORK_CODE]', '[SLATE]')]; + $request = (new BatchArchiveSlatesRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchArchiveSlates($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 batchCreateSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCreateSlatesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchCreateSlatesRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchCreateSlates($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.SlateService/BatchCreateSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCreateSlatesExceptionTest() + { + $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 BatchCreateSlatesRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchCreateSlates($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 batchUnarchiveSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUnarchiveSlatesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->slateName('[NETWORK_CODE]', '[SLATE]')]; + $request = (new BatchUnarchiveSlatesRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchUnarchiveSlates($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.SlateService/BatchUnarchiveSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getNames(); + $this->assertProtobufEquals($formattedNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUnarchiveSlatesExceptionTest() + { + $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->slateName('[NETWORK_CODE]', '[SLATE]')]; + $request = (new BatchUnarchiveSlatesRequest())->setParent($formattedParent)->setNames($formattedNames); + try { + $gapicClient->batchUnarchiveSlates($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 batchUpdateSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateSlatesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateSlatesRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateSlates($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.SlateService/BatchUpdateSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateSlatesExceptionTest() + { + $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 BatchUpdateSlatesRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateSlates($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 createSlateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $videoSourceUrl = 'videoSourceUrl2100956559'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVideoSourceUrl($videoSourceUrl); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $slate = new Slate(); + $slateDisplayName = 'slateDisplayName-1205103852'; + $slate->setDisplayName($slateDisplayName); + $request = (new CreateSlateRequest())->setParent($formattedParent)->setSlate($slate); + $response = $gapicClient->createSlate($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.SlateService/CreateSlate', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSlateExceptionTest() + { + $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]'); + $slate = new Slate(); + $slateDisplayName = 'slateDisplayName-1205103852'; + $slate->setDisplayName($slateDisplayName); + $request = (new CreateSlateRequest())->setParent($formattedParent)->setSlate($slate); + try { + $gapicClient->createSlate($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 getSlateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $videoSourceUrl = 'videoSourceUrl2100956559'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVideoSourceUrl($videoSourceUrl); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->slateName('[NETWORK_CODE]', '[SLATE]'); + $request = (new GetSlateRequest())->setName($formattedName); + $response = $gapicClient->getSlate($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.SlateService/GetSlate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSlateExceptionTest() + { + $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->slateName('[NETWORK_CODE]', '[SLATE]'); + $request = (new GetSlateRequest())->setName($formattedName); + try { + $gapicClient->getSlate($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 listSlatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $slatesElement = new Slate(); + $slates = [$slatesElement]; + $expectedResponse = new ListSlatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setSlates($slates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $request = (new ListSlatesRequest())->setParent($formattedParent); + $response = $gapicClient->listSlates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSlates()[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.SlateService/ListSlates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSlatesExceptionTest() + { + $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 ListSlatesRequest())->setParent($formattedParent); + try { + $gapicClient->listSlates($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 updateSlateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $videoSourceUrl = 'videoSourceUrl2100956559'; + $expectedResponse = new Slate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setVideoSourceUrl($videoSourceUrl); + $transport->addResponse($expectedResponse); + // Mock request + $slate = new Slate(); + $slateDisplayName = 'slateDisplayName-1205103852'; + $slate->setDisplayName($slateDisplayName); + $request = (new UpdateSlateRequest())->setSlate($slate); + $response = $gapicClient->updateSlate($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.SlateService/UpdateSlate', $actualFuncCall); + $actualValue = $actualRequestObject->getSlate(); + $this->assertProtobufEquals($slate, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSlateExceptionTest() + { + $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 + $slate = new Slate(); + $slateDisplayName = 'slateDisplayName-1205103852'; + $slate->setDisplayName($slateDisplayName); + $request = (new UpdateSlateRequest())->setSlate($slate); + try { + $gapicClient->updateSlate($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 batchArchiveSlatesAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchArchiveSlatesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $formattedNames = [$gapicClient->slateName('[NETWORK_CODE]', '[SLATE]')]; + $request = (new BatchArchiveSlatesRequest())->setParent($formattedParent)->setNames($formattedNames); + $response = $gapicClient->batchArchiveSlatesAsync($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.SlateService/BatchArchiveSlates', $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/TargetingPresetServiceClientTest.php b/AdsAdManager/tests/Unit/V1/Client/TargetingPresetServiceClientTest.php index 1bf97213e143..dfc2d70e6ead 100644 --- a/AdsAdManager/tests/Unit/V1/Client/TargetingPresetServiceClientTest.php +++ b/AdsAdManager/tests/Unit/V1/Client/TargetingPresetServiceClientTest.php @@ -26,6 +26,8 @@ use Google\Ads\AdManager\V1\BatchCreateTargetingPresetsResponse; use Google\Ads\AdManager\V1\BatchDeactivateTargetingPresetsRequest; use Google\Ads\AdManager\V1\BatchDeactivateTargetingPresetsResponse; +use Google\Ads\AdManager\V1\BatchUpdateTargetingPresetsRequest; +use Google\Ads\AdManager\V1\BatchUpdateTargetingPresetsResponse; use Google\Ads\AdManager\V1\Client\TargetingPresetServiceClient; use Google\Ads\AdManager\V1\CreateTargetingPresetRequest; use Google\Ads\AdManager\V1\GetTargetingPresetRequest; @@ -33,6 +35,7 @@ use Google\Ads\AdManager\V1\ListTargetingPresetsResponse; use Google\Ads\AdManager\V1\Targeting; use Google\Ads\AdManager\V1\TargetingPreset; +use Google\Ads\AdManager\V1\UpdateTargetingPresetRequest; use Google\ApiCore\ApiException; use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; @@ -212,6 +215,76 @@ public function batchDeactivateTargetingPresetsExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function batchUpdateTargetingPresetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchUpdateTargetingPresetsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->networkName('[NETWORK_CODE]'); + $requests = []; + $request = (new BatchUpdateTargetingPresetsRequest())->setParent($formattedParent)->setRequests($requests); + $response = $gapicClient->batchUpdateTargetingPresets($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.TargetingPresetService/BatchUpdateTargetingPresets', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchUpdateTargetingPresetsExceptionTest() + { + $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 BatchUpdateTargetingPresetsRequest())->setParent($formattedParent)->setRequests($requests); + try { + $gapicClient->batchUpdateTargetingPresets($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 createTargetingPresetTest() { @@ -435,6 +508,81 @@ public function listTargetingPresetsExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function updateTargetingPresetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $expectedResponse = new TargetingPreset(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $targetingPreset = new TargetingPreset(); + $targetingPresetDisplayName = 'targetingPresetDisplayName818581853'; + $targetingPreset->setDisplayName($targetingPresetDisplayName); + $targetingPresetTargeting = new Targeting(); + $targetingPreset->setTargeting($targetingPresetTargeting); + $request = (new UpdateTargetingPresetRequest())->setTargetingPreset($targetingPreset); + $response = $gapicClient->updateTargetingPreset($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.TargetingPresetService/UpdateTargetingPreset', $actualFuncCall); + $actualValue = $actualRequestObject->getTargetingPreset(); + $this->assertProtobufEquals($targetingPreset, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTargetingPresetExceptionTest() + { + $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 + $targetingPreset = new TargetingPreset(); + $targetingPresetDisplayName = 'targetingPresetDisplayName818581853'; + $targetingPreset->setDisplayName($targetingPresetDisplayName); + $targetingPresetTargeting = new Targeting(); + $targetingPreset->setTargeting($targetingPresetTargeting); + $request = (new UpdateTargetingPresetRequest())->setTargetingPreset($targetingPreset); + try { + $gapicClient->updateTargetingPreset($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 batchCreateTargetingPresetsAsyncTest() {