123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374 |
- // 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.v11.services;
- import "google/ads/googleads/v11/enums/response_content_type.proto";
- import "google/ads/googleads/v11/resources/campaign_experiment.proto";
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/longrunning/operations.proto";
- import "google/protobuf/empty.proto";
- import "google/protobuf/field_mask.proto";
- import "google/rpc/status.proto";
- option csharp_namespace = "Google.Ads.GoogleAds.V11.Services";
- option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v11/services;services";
- option java_multiple_files = true;
- option java_outer_classname = "CampaignExperimentServiceProto";
- option java_package = "com.google.ads.googleads.v11.services";
- option objc_class_prefix = "GAA";
- option php_namespace = "Google\\Ads\\GoogleAds\\V11\\Services";
- option ruby_package = "Google::Ads::GoogleAds::V11::Services";
- // Proto file describing the Campaign Experiment service.
- // CampaignExperimentService manages the life cycle of campaign experiments.
- // It is used to create new experiments from drafts, modify experiment
- // properties, promote changes in an experiment back to its base campaign,
- // graduate experiments into new stand-alone campaigns, and to remove an
- // experiment.
- //
- // An experiment consists of two variants or arms - the base campaign and the
- // experiment campaign, directing a fixed share of traffic to each arm.
- // A campaign experiment is created from a draft of changes to the base campaign
- // and will be a snapshot of changes in the draft at the time of creation.
- service CampaignExperimentService {
- option (google.api.default_host) = "googleads.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
- // Creates a campaign experiment based on a campaign draft. The draft campaign
- // will be forked into a real campaign (called the experiment campaign) that
- // will begin serving ads if successfully created.
- //
- // The campaign experiment is created immediately with status INITIALIZING.
- // This method return a long running operation that tracks the forking of the
- // draft campaign. If the forking fails, a list of errors can be retrieved
- // using the ListCampaignExperimentAsyncErrors method. The operation's
- // metadata will be a StringValue containing the resource name of the created
- // campaign experiment.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [CampaignExperimentError]()
- // [DatabaseError]()
- // [DateError]()
- // [DateRangeError]()
- // [FieldError]()
- // [HeaderError]()
- // [InternalError]()
- // [QuotaError]()
- // [RangeError]()
- // [RequestError]()
- rpc CreateCampaignExperiment(CreateCampaignExperimentRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v11/customers/{customer_id=*}/campaignExperiments:create"
- body: "*"
- };
- option (google.api.method_signature) = "customer_id,campaign_experiment";
- option (google.longrunning.operation_info) = {
- response_type: "google.protobuf.Empty"
- metadata_type: "google.ads.googleads.v11.services.CreateCampaignExperimentMetadata"
- };
- }
- // Updates campaign experiments. Operation statuses are returned.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [CampaignExperimentError]()
- // [HeaderError]()
- // [InternalError]()
- // [QuotaError]()
- // [RequestError]()
- rpc MutateCampaignExperiments(MutateCampaignExperimentsRequest) returns (MutateCampaignExperimentsResponse) {
- option (google.api.http) = {
- post: "/v11/customers/{customer_id=*}/campaignExperiments:mutate"
- body: "*"
- };
- option (google.api.method_signature) = "customer_id,operations";
- }
- // Graduates a campaign experiment to a full campaign. The base and experiment
- // campaigns will start running independently with their own budgets.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [CampaignExperimentError]()
- // [HeaderError]()
- // [InternalError]()
- // [MutateError]()
- // [QuotaError]()
- // [RequestError]()
- rpc GraduateCampaignExperiment(GraduateCampaignExperimentRequest) returns (GraduateCampaignExperimentResponse) {
- option (google.api.http) = {
- post: "/v11/{campaign_experiment=customers/*/campaignExperiments/*}:graduate"
- body: "*"
- };
- option (google.api.method_signature) = "campaign_experiment,campaign_budget";
- }
- // Promotes the changes in a experiment campaign back to the base campaign.
- //
- // The campaign experiment is updated immediately with status PROMOTING.
- // This method return a long running operation that tracks the promoting of
- // the experiment campaign. If the promoting fails, a list of errors can be
- // retrieved using the ListCampaignExperimentAsyncErrors method.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [HeaderError]()
- // [InternalError]()
- // [QuotaError]()
- // [RequestError]()
- rpc PromoteCampaignExperiment(PromoteCampaignExperimentRequest) returns (google.longrunning.Operation) {
- option (google.api.http) = {
- post: "/v11/{campaign_experiment=customers/*/campaignExperiments/*}:promote"
- body: "*"
- };
- option (google.api.method_signature) = "campaign_experiment";
- option (google.longrunning.operation_info) = {
- response_type: "google.protobuf.Empty"
- metadata_type: "google.protobuf.Empty"
- };
- }
- // Immediately ends a campaign experiment, changing the experiment's scheduled
- // end date and without waiting for end of day. End date is updated to be the
- // time of the request.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [CampaignExperimentError]()
- // [HeaderError]()
- // [InternalError]()
- // [QuotaError]()
- // [RequestError]()
- rpc EndCampaignExperiment(EndCampaignExperimentRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- post: "/v11/{campaign_experiment=customers/*/campaignExperiments/*}:end"
- body: "*"
- };
- option (google.api.method_signature) = "campaign_experiment";
- }
- // Returns all errors that occurred during CampaignExperiment create or
- // promote (whichever occurred last).
- // Supports standard list paging.
- //
- // List of thrown errors:
- // [AuthenticationError]()
- // [AuthorizationError]()
- // [HeaderError]()
- // [InternalError]()
- // [QuotaError]()
- // [RequestError]()
- rpc ListCampaignExperimentAsyncErrors(ListCampaignExperimentAsyncErrorsRequest) returns (ListCampaignExperimentAsyncErrorsResponse) {
- option (google.api.http) = {
- get: "/v11/{resource_name=customers/*/campaignExperiments/*}:listAsyncErrors"
- };
- option (google.api.method_signature) = "resource_name";
- }
- }
- // Request message for [CampaignExperimentService.MutateCampaignExperiments][google.ads.googleads.v11.services.CampaignExperimentService.MutateCampaignExperiments].
- message MutateCampaignExperimentsRequest {
- // Required. The ID of the customer whose campaign experiments are being modified.
- string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The list of operations to perform on individual campaign experiments.
- repeated CampaignExperimentOperation operations = 2 [(google.api.field_behavior) = REQUIRED];
- // If true, successful operations will be carried out and invalid
- // operations will return errors. If false, all operations will be carried
- // out in one transaction if and only if they are all valid.
- // Default is false.
- bool partial_failure = 3;
- // If true, the request is validated but not executed. Only errors are
- // returned, not results.
- bool validate_only = 4;
- // The response content type setting. Determines whether the mutable resource
- // or just the resource name should be returned post mutation.
- google.ads.googleads.v11.enums.ResponseContentTypeEnum.ResponseContentType response_content_type = 5;
- }
- // A single update operation on a campaign experiment.
- message CampaignExperimentOperation {
- // FieldMask that determines which resource fields are modified in an update.
- google.protobuf.FieldMask update_mask = 3;
- // The mutate operation.
- oneof operation {
- // Update operation: The campaign experiment is expected to have a valid
- // resource name.
- google.ads.googleads.v11.resources.CampaignExperiment update = 1;
- // Remove operation: The campaign experiment is expected to have a valid
- // resource name, in this format:
- //
- // `customers/{customer_id}/campaignExperiments/{campaign_experiment_id}`
- string remove = 2 [(google.api.resource_reference) = {
- type: "googleads.googleapis.com/CampaignExperiment"
- }];
- }
- }
- // Response message for campaign experiment mutate.
- message MutateCampaignExperimentsResponse {
- // 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 (for example, auth
- // errors), we return an RPC level error.
- google.rpc.Status partial_failure_error = 3;
- // All results for the mutate.
- repeated MutateCampaignExperimentResult results = 2;
- }
- // The result for the campaign experiment mutate.
- message MutateCampaignExperimentResult {
- // Returned for successful operations.
- string resource_name = 1 [(google.api.resource_reference) = {
- type: "googleads.googleapis.com/CampaignExperiment"
- }];
- // The mutated campaign experiment with only mutable fields after mutate. The
- // field will only be returned when response_content_type is set to
- // "MUTABLE_RESOURCE".
- google.ads.googleads.v11.resources.CampaignExperiment campaign_experiment = 2;
- }
- // Request message for [CampaignExperimentService.CreateCampaignExperiment][google.ads.googleads.v11.services.CampaignExperimentService.CreateCampaignExperiment].
- message CreateCampaignExperimentRequest {
- // Required. The ID of the customer whose campaign experiment is being created.
- string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The campaign experiment to be created.
- google.ads.googleads.v11.resources.CampaignExperiment campaign_experiment = 2 [(google.api.field_behavior) = REQUIRED];
- // If true, the request is validated but not executed. Only errors are
- // returned, not results.
- bool validate_only = 3;
- }
- // Message used as metadata returned in Long Running Operations for
- // CreateCampaignExperimentRequest
- message CreateCampaignExperimentMetadata {
- // Resource name of campaign experiment created.
- string campaign_experiment = 1;
- }
- // Request message for [CampaignExperimentService.GraduateCampaignExperiment][google.ads.googleads.v11.services.CampaignExperimentService.GraduateCampaignExperiment].
- message GraduateCampaignExperimentRequest {
- // Required. The resource name of the campaign experiment to graduate.
- string campaign_experiment = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "googleads.googleapis.com/CampaignExperiment"
- }
- ];
- // Required. Resource name of the budget to attach to the campaign graduated from the
- // experiment.
- string campaign_budget = 2 [(google.api.field_behavior) = REQUIRED];
- // If true, the request is validated but not executed. Only errors are
- // returned, not results.
- bool validate_only = 3;
- }
- // Response message for campaign experiment graduate.
- message GraduateCampaignExperimentResponse {
- // The resource name of the campaign from the graduated experiment.
- // This campaign is the same one as CampaignExperiment.experiment_campaign.
- string graduated_campaign = 1;
- }
- // Request message for [CampaignExperimentService.PromoteCampaignExperiment][google.ads.googleads.v11.services.CampaignExperimentService.PromoteCampaignExperiment].
- message PromoteCampaignExperimentRequest {
- // Required. The resource name of the campaign experiment to promote.
- string campaign_experiment = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "googleads.googleapis.com/CampaignExperiment"
- }
- ];
- // If true, the request is validated but no Long Running Operation is created.
- // Only errors are returned.
- bool validate_only = 2;
- }
- // Request message for [CampaignExperimentService.EndCampaignExperiment][google.ads.googleads.v11.services.CampaignExperimentService.EndCampaignExperiment].
- message EndCampaignExperimentRequest {
- // Required. The resource name of the campaign experiment to end.
- string campaign_experiment = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "googleads.googleapis.com/CampaignExperiment"
- }
- ];
- // If true, the request is validated but not executed. Only errors are
- // returned, not results.
- bool validate_only = 2;
- }
- // Request message for
- // [CampaignExperimentService.ListCampaignExperimentAsyncErrors][google.ads.googleads.v11.services.CampaignExperimentService.ListCampaignExperimentAsyncErrors].
- message ListCampaignExperimentAsyncErrorsRequest {
- // Required. The name of the campaign experiment from which to retrieve the async
- // errors.
- string resource_name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "googleads.googleapis.com/CampaignExperiment"
- }
- ];
- // Token of the page to retrieve. If not specified, the first
- // page of results will be returned. Use the value obtained from
- // `next_page_token` in the previous response in order to request
- // the next page of results.
- string page_token = 2;
- // Number of elements to retrieve in a single page.
- // When a page request is too large, the server may decide to
- // further limit the number of returned resources.
- int32 page_size = 3;
- }
- // Response message for
- // [CampaignExperimentService.ListCampaignExperimentAsyncErrors][google.ads.googleads.v11.services.CampaignExperimentService.ListCampaignExperimentAsyncErrors].
- message ListCampaignExperimentAsyncErrorsResponse {
- // Details of the errors when performing the asynchronous operation.
- repeated google.rpc.Status errors = 1;
- // Pagination token used to retrieve the next page of results.
- // Pass the content of this string as the `page_token` attribute of
- // the next request. `next_page_token` is not returned for the last
- // page.
- string next_page_token = 2;
- }
|