--- v18/services/campaign_service.proto 2025-08-05 14:36:14.000000000 +0000 +++ v19/services/campaign_service.proto 2025-08-05 14:36:21.000000000 +0000 @@ -82,7 +82,31 @@ rpc MutateCampaigns(MutateCampaignsRequest) returns (MutateCampaignsResponse) { option (google.api.http) = { - post: "/v18/customers/{customer_id=*}/campaigns:mutate" + post: "/v19/customers/{customer_id=*}/campaigns:mutate" + body: "*" + }; + option (google.api.method_signature) = "customer_id,operations"; + } + + // Enables Brand Guidelines for Performance Max campaigns. + // + // List of thrown errors: + // [AuthenticationError]() + // [AssetError]() + // [AssetLinkError]() + // [AuthorizationError]() + // [BrandGuidelinesMigrationError]() + // [CampaignError]() + // [HeaderError]() + // [InternalError]() + // [MutateError]() + // [QuotaError]() + // [RequestError]() + // [ResourceCountLimitExceededError]() + rpc EnablePMaxBrandGuidelines(EnablePMaxBrandGuidelinesRequest) + returns (EnablePMaxBrandGuidelinesResponse) { + option (google.api.http) = { + post: "/v19/customers/{customer_id=*}/campaigns:enablePMaxBrandGuidelines" body: "*" }; option (google.api.method_signature) = "customer_id,operations"; @@ -160,5 +184,84 @@ // The mutated campaign with only mutable fields after mutate. The field will // only be returned when response_content_type is set to "MUTABLE_RESOURCE". - google.ads.googleads.v18.resources.Campaign campaign = 2; + google.ads.googleads.v19.resources.Campaign campaign = 2; +} + +// Request to enable Brand Guidelines for a Performance Max campaign. +message EnablePMaxBrandGuidelinesRequest { + // Required. The ID of the customer whose campaigns are being enabled. + string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of individual campaign operations. A maximum of 10 + // enable operations can be executed in a request. + repeated EnableOperation operations = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A single enable operation of a campaign. +message EnableOperation { + // Required. The resource name of the campaign to enable. + string campaign = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + } + ]; + + // Required. The switch to automatically populate top-performing brand assets. + // This field is required. If true, top-performing brand assets will be + // automatically populated. If false, the brand_assets field is required. + bool auto_populate_brand_assets = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The brand assets linked to the campaign. This field is required + // when the value of auto_populate_brand_assets is false. + BrandCampaignAssets brand_assets = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The domain of the final uri. + string final_uri_domain = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hex code representation of the main brand color, for example + // #00ff00. main_color is required when accent color is specified. + string main_color = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hex code representation of the accent brand color, for example + // #00ff00. accent_color is required when main_color is specified. + string accent_color = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The font family is specified as a string, and must be one of the + // following: "Open Sans", "Roboto", "Roboto Slab", "Montserrat", "Poppins", + // "Lato", "Oswald", or "Playfair Display". + string font_family = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Assets linked at the campaign level. +// A business_name and at least one logo_asset are required. +message BrandCampaignAssets { + // Required. The resource name of the business name text asset. + string business_name_asset = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of square logo assets. + repeated string logo_asset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The resource name of landscape logo assets. + repeated string landscape_logo_asset = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Brand Guidelines campaign enablement response. +message EnablePMaxBrandGuidelinesResponse { + // Campaign enablement results per campaign. + repeated EnablementResult results = 1; +} + +// A single enablement result of a campaign. +message EnablementResult { + // This indicates the campaign for which enablement was tried, regardless of + // the outcome. + string campaign = 1 [(google.api.resource_reference) = { + type: "googleads.googleapis.com/Campaign" + }]; + + // Details of the error when enablement fails. + google.rpc.Status enablement_error = 2; }
/services/campaign_service.proto
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-21。
[null,null,["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# /services/campaign_service.proto\n\n```diff\n--- v18/services/campaign_service.proto 2025-08-05 14:36:14.000000000 +0000\n+++ v19/services/campaign_service.proto 2025-08-05 14:36:21.000000000 +0000\n@@ -82,7 +82,31 @@\n rpc MutateCampaigns(MutateCampaignsRequest)\n returns (MutateCampaignsResponse) {\n option (google.api.http) = {\n- post: \"/v18/customers/{customer_id=*}/campaigns:mutate\"\n+ post: \"/v19/customers/{customer_id=*}/campaigns:mutate\"\n+ body: \"*\"\n+ };\n+ option (google.api.method_signature) = \"customer_id,operations\";\n+ }\n+\n+ // Enables Brand Guidelines for Performance Max campaigns.\n+ //\n+ // List of thrown errors:\n+ // [AuthenticationError]()\n+ // [AssetError]()\n+ // [AssetLinkError]()\n+ // [AuthorizationError]()\n+ // [BrandGuidelinesMigrationError]()\n+ // [CampaignError]()\n+ // [HeaderError]()\n+ // [InternalError]()\n+ // [MutateError]()\n+ // [QuotaError]()\n+ // [RequestError]()\n+ // [ResourceCountLimitExceededError]()\n+ rpc EnablePMaxBrandGuidelines(EnablePMaxBrandGuidelinesRequest)\n+ returns (EnablePMaxBrandGuidelinesResponse) {\n+ option (google.api.http) = {\n+ post: \"/v19/customers/{customer_id=*}/campaigns:enablePMaxBrandGuidelines\"\n body: \"*\"\n };\n option (google.api.method_signature) = \"customer_id,operations\";\n@@ -160,5 +184,84 @@\n\n // The mutated campaign with only mutable fields after mutate. The field will\n // only be returned when response_content_type is set to \"MUTABLE_RESOURCE\".\n- google.ads.googleads.v18.resources.Campaign campaign = 2;\n+ google.ads.googleads.v19.resources.Campaign campaign = 2;\n+}\n+\n+// Request to enable Brand Guidelines for a Performance Max campaign.\n+message EnablePMaxBrandGuidelinesRequest {\n+ // Required. The ID of the customer whose campaigns are being enabled.\n+ string customer_id = 1 [(google.api.field_behavior) = REQUIRED];\n+\n+ // Required. The list of individual campaign operations. A maximum of 10\n+ // enable operations can be executed in a request.\n+ repeated EnableOperation operations = 2\n+ [(google.api.field_behavior) = REQUIRED];\n+}\n+\n+// A single enable operation of a campaign.\n+message EnableOperation {\n+ // Required. The resource name of the campaign to enable.\n+ string campaign = 1 [\n+ (google.api.field_behavior) = REQUIRED,\n+ (google.api.resource_reference) = {\n+ type: \"googleads.googleapis.com/Campaign\"\n+ }\n+ ];\n+\n+ // Required. The switch to automatically populate top-performing brand assets.\n+ // This field is required. If true, top-performing brand assets will be\n+ // automatically populated. If false, the brand_assets field is required.\n+ bool auto_populate_brand_assets = 2 [(google.api.field_behavior) = REQUIRED];\n+\n+ // Optional. The brand assets linked to the campaign. This field is required\n+ // when the value of auto_populate_brand_assets is false.\n+ BrandCampaignAssets brand_assets = 3 [(google.api.field_behavior) = OPTIONAL];\n+\n+ // Optional. The domain of the final uri.\n+ string final_uri_domain = 4 [(google.api.field_behavior) = OPTIONAL];\n+\n+ // Optional. Hex code representation of the main brand color, for example\n+ // #00ff00. main_color is required when accent color is specified.\n+ string main_color = 5 [(google.api.field_behavior) = OPTIONAL];\n+\n+ // Optional. Hex code representation of the accent brand color, for example\n+ // #00ff00. accent_color is required when main_color is specified.\n+ string accent_color = 6 [(google.api.field_behavior) = OPTIONAL];\n+\n+ // Optional. The font family is specified as a string, and must be one of the\n+ // following: \"Open Sans\", \"Roboto\", \"Roboto Slab\", \"Montserrat\", \"Poppins\",\n+ // \"Lato\", \"Oswald\", or \"Playfair Display\".\n+ string font_family = 7 [(google.api.field_behavior) = OPTIONAL];\n+}\n+\n+// Assets linked at the campaign level.\n+// A business_name and at least one logo_asset are required.\n+message BrandCampaignAssets {\n+ // Required. The resource name of the business name text asset.\n+ string business_name_asset = 1 [(google.api.field_behavior) = REQUIRED];\n+\n+ // Required. The resource name of square logo assets.\n+ repeated string logo_asset = 2 [(google.api.field_behavior) = REQUIRED];\n+\n+ // Optional. The resource name of landscape logo assets.\n+ repeated string landscape_logo_asset = 3\n+ [(google.api.field_behavior) = OPTIONAL];\n+}\n+\n+// Brand Guidelines campaign enablement response.\n+message EnablePMaxBrandGuidelinesResponse {\n+ // Campaign enablement results per campaign.\n+ repeated EnablementResult results = 1;\n+}\n+\n+// A single enablement result of a campaign.\n+message EnablementResult {\n+ // This indicates the campaign for which enablement was tried, regardless of\n+ // the outcome.\n+ string campaign = 1 [(google.api.resource_reference) = {\n+ type: \"googleads.googleapis.com/Campaign\"\n+ }];\n+\n+ // Details of the error when enablement fails.\n+ google.rpc.Status enablement_error = 2;\n }\n```"]]