123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- // Copyright 2022 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- syntax = "proto3";
- package google.ads.googleads.v10.services;
- import "google/ads/googleads/v10/common/extensions.proto";
- import "google/ads/googleads/v10/enums/keyword_match_type.proto";
- import "google/ads/googleads/v10/resources/ad.proto";
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/rpc/status.proto";
- option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
- option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
- option java_multiple_files = true;
- option java_outer_classname = "RecommendationServiceProto";
- option java_package = "com.google.ads.googleads.v10.services";
- option objc_class_prefix = "GAA";
- option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
- option ruby_package = "Google::Ads::GoogleAds::V10::Services";
- // Proto file describing the Recommendation service.
- // Service to manage recommendations.
- service RecommendationService {
- option (google.api.default_host) = "googleads.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
- // Applies given recommendations with corresponding apply parameters.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [DatabaseError]()
- // [FieldError]()
- // [HeaderError]()
- // [InternalError]()
- // [MutateError]()
- // [QuotaError]()
- // [RecommendationError]()
- // [RequestError]()
- // [UrlFieldError]()
- rpc ApplyRecommendation(ApplyRecommendationRequest) returns (ApplyRecommendationResponse) {
- option (google.api.http) = {
- post: "/v10/customers/{customer_id=*}/recommendations:apply"
- body: "*"
- };
- option (google.api.method_signature) = "customer_id,operations";
- }
- // Dismisses given recommendations.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [HeaderError]()
- // [InternalError]()
- // [QuotaError]()
- // [RecommendationError]()
- // [RequestError]()
- rpc DismissRecommendation(DismissRecommendationRequest) returns (DismissRecommendationResponse) {
- option (google.api.http) = {
- post: "/v10/customers/{customer_id=*}/recommendations:dismiss"
- body: "*"
- };
- option (google.api.method_signature) = "customer_id,operations";
- }
- }
- // Request message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v10.services.RecommendationService.ApplyRecommendation].
- message ApplyRecommendationRequest {
- // Required. The ID of the customer with the recommendation.
- string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The list of operations to apply recommendations.
- // If partial_failure=false all recommendations should be of the same type
- // There is a limit of 100 operations per request.
- repeated ApplyRecommendationOperation operations = 2 [(google.api.field_behavior) = REQUIRED];
- // If true, successful operations will be carried out and invalid
- // operations will return errors. If false, operations will be carried
- // out as a transaction if and only if they are all valid.
- // Default is false.
- bool partial_failure = 3;
- }
- // Information about the operation to apply a recommendation and any parameters
- // to customize it.
- message ApplyRecommendationOperation {
- // Parameters to use when applying a campaign budget recommendation.
- message CampaignBudgetParameters {
- // New budget amount to set for target budget resource. This is a required
- // field.
- optional int64 new_budget_amount_micros = 2;
- }
- // Parameters to use when applying a text ad recommendation.
- message TextAdParameters {
- // New ad to add to recommended ad group. All necessary fields need to be
- // set in this message. This is a required field.
- google.ads.googleads.v10.resources.Ad ad = 1;
- }
- // Parameters to use when applying keyword recommendation.
- message KeywordParameters {
- // The ad group resource to add keyword to. This is a required field.
- optional string ad_group = 4;
- // The match type of the keyword. This is a required field.
- google.ads.googleads.v10.enums.KeywordMatchTypeEnum.KeywordMatchType match_type = 2;
- // Optional, CPC bid to set for the keyword. If not set, keyword will use
- // bid based on bidding strategy used by target ad group.
- optional int64 cpc_bid_micros = 5;
- }
- // Parameters to use when applying Target CPA recommendation.
- message TargetCpaOptInParameters {
- // Average CPA to use for Target CPA bidding strategy. This is a required
- // field.
- optional int64 target_cpa_micros = 3;
- // Optional, budget amount to set for the campaign.
- optional int64 new_campaign_budget_amount_micros = 4;
- }
- // Parameters to use when applying a Target ROAS opt-in recommendation.
- message TargetRoasOptInParameters {
- // Average ROAS (revenue per unit of spend) to use for Target ROAS bidding
- // strategy. The value is between 0.01 and 1000.0, inclusive. This is a
- // required field, unless new_campaign_budget_amount_micros is set.
- optional double target_roas = 1;
- // Optional, budget amount to set for the campaign.
- optional int64 new_campaign_budget_amount_micros = 2;
- }
- // Parameters to use when applying callout extension recommendation.
- message CalloutExtensionParameters {
- // Callout extensions to be added. This is a required field.
- repeated google.ads.googleads.v10.common.CalloutFeedItem callout_extensions = 1;
- }
- // Parameters to use when applying call extension recommendation.
- message CallExtensionParameters {
- // Call extensions to be added. This is a required field.
- repeated google.ads.googleads.v10.common.CallFeedItem call_extensions = 1;
- }
- // Parameters to use when applying sitelink extension recommendation.
- message SitelinkExtensionParameters {
- // Sitelink extensions to be added. This is a required field.
- repeated google.ads.googleads.v10.common.SitelinkFeedItem sitelink_extensions = 1;
- }
- // Parameters to use when applying move unused budget recommendation.
- message MoveUnusedBudgetParameters {
- // Budget amount to move from excess budget to constrained budget. This is
- // a required field.
- optional int64 budget_micros_to_move = 2;
- }
- // Parameters to use when applying a responsive search ad asset
- // recommendation.
- message ResponsiveSearchAdAssetParameters {
- // Updated ad. The current ad's content will be replaced.
- google.ads.googleads.v10.resources.Ad updated_ad = 1;
- }
- // Parameters to use when applying a responsive search ad recommendation.
- message ResponsiveSearchAdParameters {
- // Required. New ad to add to recommended ad group.
- google.ads.googleads.v10.resources.Ad ad = 1 [(google.api.field_behavior) = REQUIRED];
- }
- // Parameters to use when applying a use broad match keyword recommendation.
- message UseBroadMatchKeywordParameters {
- // New budget amount to set for target budget resource.
- optional int64 new_budget_amount_micros = 1;
- }
- // The resource name of the recommendation to apply.
- string resource_name = 1 [(google.api.resource_reference) = {
- type: "googleads.googleapis.com/Recommendation"
- }];
- // Parameters to use when applying the recommendation.
- oneof apply_parameters {
- // Optional parameters to use when applying a campaign budget
- // recommendation.
- CampaignBudgetParameters campaign_budget = 2;
- // Optional parameters to use when applying a text ad recommendation.
- TextAdParameters text_ad = 3;
- // Optional parameters to use when applying keyword recommendation.
- KeywordParameters keyword = 4;
- // Optional parameters to use when applying target CPA opt-in
- // recommendation.
- TargetCpaOptInParameters target_cpa_opt_in = 5;
- // Optional parameters to use when applying target ROAS opt-in
- // recommendation.
- TargetRoasOptInParameters target_roas_opt_in = 10;
- // Parameters to use when applying callout extension recommendation.
- CalloutExtensionParameters callout_extension = 6;
- // Parameters to use when applying call extension recommendation.
- CallExtensionParameters call_extension = 7;
- // Parameters to use when applying sitelink extension recommendation.
- SitelinkExtensionParameters sitelink_extension = 8;
- // Parameters to use when applying move unused budget recommendation.
- MoveUnusedBudgetParameters move_unused_budget = 9;
- // Parameters to use when applying a responsive search ad recommendation.
- ResponsiveSearchAdParameters responsive_search_ad = 11;
- // Parameters to use when applying a use broad match keyword recommendation.
- UseBroadMatchKeywordParameters use_broad_match_keyword = 12;
- // Parameters to use when applying a responsive search ad recommendation.
- ResponsiveSearchAdAssetParameters responsive_search_ad_asset = 13;
- }
- }
- // Response message for [RecommendationService.ApplyRecommendation][google.ads.googleads.v10.services.RecommendationService.ApplyRecommendation].
- message ApplyRecommendationResponse {
- // Results of operations to apply recommendations.
- repeated ApplyRecommendationResult results = 1;
- // Errors that pertain to operation failures in the partial failure mode.
- // Returned only when partial_failure = true and all errors occur inside the
- // operations. If any errors occur outside the operations (e.g. auth errors)
- // we return the RPC level error.
- google.rpc.Status partial_failure_error = 2;
- }
- // The result of applying a recommendation.
- message ApplyRecommendationResult {
- // Returned for successful applies.
- string resource_name = 1 [(google.api.resource_reference) = {
- type: "googleads.googleapis.com/Recommendation"
- }];
- }
- // Request message for [RecommendationService.DismissRecommendation][google.ads.googleads.v10.services.RecommendationService.DismissRecommendation].
- message DismissRecommendationRequest {
- // Operation to dismiss a single recommendation identified by resource_name.
- message DismissRecommendationOperation {
- // The resource name of the recommendation to dismiss.
- string resource_name = 1;
- }
- // Required. The ID of the customer with the recommendation.
- string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The list of operations to dismiss recommendations.
- // If partial_failure=false all recommendations should be of the same type
- // There is a limit of 100 operations per request.
- repeated DismissRecommendationOperation operations = 3 [(google.api.field_behavior) = REQUIRED];
- // If true, successful operations will be carried out and invalid
- // operations will return errors. If false, operations will be carried in a
- // single transaction if and only if they are all valid.
- // Default is false.
- bool partial_failure = 2;
- }
- // Response message for [RecommendationService.DismissRecommendation][google.ads.googleads.v10.services.RecommendationService.DismissRecommendation].
- message DismissRecommendationResponse {
- // The result of dismissing a recommendation.
- message DismissRecommendationResult {
- // Returned for successful dismissals.
- string resource_name = 1;
- }
- // Results of operations to dismiss recommendations.
- repeated DismissRecommendationResult results = 1;
- // Errors that pertain to operation failures in the partial failure mode.
- // Returned only when partial_failure = true and all errors occur inside the
- // operations. If any errors occur outside the operations (e.g. auth errors)
- // we return the RPC level error.
- google.rpc.Status partial_failure_error = 2;
- }
|