1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.ads.googleads.v16.services; 18 19import "google/ads/googleads/v16/enums/response_content_type.proto"; 20import "google/ads/googleads/v16/resources/experiment_arm.proto"; 21import "google/api/annotations.proto"; 22import "google/api/client.proto"; 23import "google/api/field_behavior.proto"; 24import "google/api/resource.proto"; 25import "google/protobuf/field_mask.proto"; 26import "google/rpc/status.proto"; 27 28option csharp_namespace = "Google.Ads.GoogleAds.V16.Services"; 29option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v16/services;services"; 30option java_multiple_files = true; 31option java_outer_classname = "ExperimentArmServiceProto"; 32option java_package = "com.google.ads.googleads.v16.services"; 33option objc_class_prefix = "GAA"; 34option php_namespace = "Google\\Ads\\GoogleAds\\V16\\Services"; 35option ruby_package = "Google::Ads::GoogleAds::V16::Services"; 36 37// Proto file describing the Experiment Arm service. 38 39// Service to manage experiment arms. 40service ExperimentArmService { 41 option (google.api.default_host) = "googleads.googleapis.com"; 42 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords"; 43 44 // Creates, updates, or removes experiment arms. Operation statuses are 45 // returned. 46 // 47 // List of thrown errors: 48 // [AuthenticationError]() 49 // [AuthorizationError]() 50 // [ExperimentArmError]() 51 // [HeaderError]() 52 // [InternalError]() 53 // [QuotaError]() 54 // [RequestError]() 55 rpc MutateExperimentArms(MutateExperimentArmsRequest) 56 returns (MutateExperimentArmsResponse) { 57 option (google.api.http) = { 58 post: "/v16/customers/{customer_id=*}/experimentArms:mutate" 59 body: "*" 60 }; 61 option (google.api.method_signature) = "customer_id,operations"; 62 } 63} 64 65// Request message for 66// [ExperimentArmService.MutateExperimentArms][google.ads.googleads.v16.services.ExperimentArmService.MutateExperimentArms]. 67message MutateExperimentArmsRequest { 68 // Required. The ID of the customer whose experiments are being modified. 69 string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; 70 71 // Required. The list of operations to perform on individual experiment arm. 72 repeated ExperimentArmOperation operations = 2 73 [(google.api.field_behavior) = REQUIRED]; 74 75 // If true, successful operations will be carried out and invalid 76 // operations will return errors. If false, all operations will be carried 77 // out in one transaction if and only if they are all valid. 78 // Default is false. 79 bool partial_failure = 3; 80 81 // If true, the request is validated but not executed. Only errors are 82 // returned, not results. 83 bool validate_only = 4; 84 85 // The response content type setting. Determines whether the mutable resource 86 // or just the resource name should be returned post mutation. 87 google.ads.googleads.v16.enums.ResponseContentTypeEnum.ResponseContentType 88 response_content_type = 5; 89} 90 91// A single operation on an experiment arm. 92message ExperimentArmOperation { 93 // FieldMask that determines which resource fields are modified in an update. 94 google.protobuf.FieldMask update_mask = 4; 95 96 // The mutate operation. 97 oneof operation { 98 // Create operation 99 google.ads.googleads.v16.resources.ExperimentArm create = 1; 100 101 // Update operation: The experiment arm is expected to have a valid 102 // resource name. 103 google.ads.googleads.v16.resources.ExperimentArm update = 2; 104 105 // Remove operation: The experiment arm is expected to have a valid 106 // resource name, in this format: 107 // 108 // `customers/{customer_id}/experiments/{campaign_experiment_id}` 109 string remove = 3 [(google.api.resource_reference) = { 110 type: "googleads.googleapis.com/ExperimentArm" 111 }]; 112 } 113} 114 115// Response message for experiment arm mutate. 116message MutateExperimentArmsResponse { 117 // Errors that pertain to operation failures in the partial failure mode. 118 // Returned only when partial_failure = true and all errors occur inside the 119 // operations. If any errors occur outside the operations (for example, auth 120 // errors), we return an RPC level error. 121 google.rpc.Status partial_failure_error = 1; 122 123 // All results for the mutate. 124 repeated MutateExperimentArmResult results = 2; 125} 126 127// The result for the experiment arm mutate. 128message MutateExperimentArmResult { 129 // Returned for successful operations. 130 string resource_name = 1 [(google.api.resource_reference) = { 131 type: "googleads.googleapis.com/ExperimentArm" 132 }]; 133 134 // The mutated experiment arm with only mutable fields after mutate. The 135 // field will only be returned when response_content_type is set to 136 // "MUTABLE_RESOURCE". 137 google.ads.googleads.v16.resources.ExperimentArm experiment_arm = 2; 138} 139