|
34 | 34 | https://developers.google.com/google-ads/api/docs/conversions/overview#conversion_actions |
35 | 35 | """ |
36 | 36 |
|
37 | | - |
38 | 37 | import argparse |
39 | 38 | from datetime import datetime, timedelta |
40 | 39 | import sys |
@@ -390,20 +389,30 @@ def create_performance_max_campaign_operation( |
390 | 389 | ) |
391 | 390 |
|
392 | 391 | # Optional fields |
393 | | - campaign.start_date_time = (datetime.now() + timedelta(1)).strftime("%Y%m%d 00:00:00") |
394 | | - campaign.end_date_time = (datetime.now() + timedelta(365)).strftime("%Y%m%d 23:59:59") |
| 392 | + campaign.start_date_time = (datetime.now() + timedelta(1)).strftime( |
| 393 | + "%Y%m%d 00:00:00" |
| 394 | + ) |
| 395 | + campaign.end_date_time = (datetime.now() + timedelta(365)).strftime( |
| 396 | + "%Y%m%d 23:59:59" |
| 397 | + ) |
395 | 398 |
|
396 | 399 | # Configures the optional opt-in/out status for asset automation settings. |
397 | 400 | for asset_automation_type_enum in [ |
398 | 401 | client.enums.AssetAutomationTypeEnum.GENERATE_IMAGE_EXTRACTION, |
399 | 402 | client.enums.AssetAutomationTypeEnum.FINAL_URL_EXPANSION_TEXT_ASSET_AUTOMATION, |
400 | 403 | client.enums.AssetAutomationTypeEnum.TEXT_ASSET_AUTOMATION, |
401 | 404 | client.enums.AssetAutomationTypeEnum.GENERATE_ENHANCED_YOUTUBE_VIDEOS, |
402 | | - client.enums.AssetAutomationTypeEnum.GENERATE_IMAGE_ENHANCEMENT |
| 405 | + client.enums.AssetAutomationTypeEnum.GENERATE_IMAGE_ENHANCEMENT, |
403 | 406 | ]: |
404 | | - asset_automattion_setting: Campaign.AssetAutomationSetting = client.get_type("Campaign").AssetAutomationSetting() |
405 | | - asset_automattion_setting.asset_automation_type = asset_automation_type_enum |
406 | | - asset_automattion_setting.asset_automation_status = client.enums.AssetAutomationStatusEnum.OPTED_IN |
| 407 | + asset_automattion_setting: Campaign.AssetAutomationSetting = ( |
| 408 | + client.get_type("Campaign").AssetAutomationSetting() |
| 409 | + ) |
| 410 | + asset_automattion_setting.asset_automation_type = ( |
| 411 | + asset_automation_type_enum |
| 412 | + ) |
| 413 | + asset_automattion_setting.asset_automation_status = ( |
| 414 | + client.enums.AssetAutomationStatusEnum.OPTED_IN |
| 415 | + ) |
407 | 416 | campaign.asset_automation_settings.append(asset_automattion_setting) |
408 | 417 |
|
409 | 418 | return mutate_operation |
@@ -1239,7 +1248,7 @@ def print_response_details(response: MutateGoogleAdsResponse) -> None: |
1239 | 1248 | "-b", |
1240 | 1249 | "--brand_guidelines_enabled", |
1241 | 1250 | type=bool, |
1242 | | - default=False, |
| 1251 | + default=True, |
1243 | 1252 | help=( |
1244 | 1253 | "A boolean value indicating if the created campaign is enabled " |
1245 | 1254 | "for brand guidelines." |
|
0 commit comments