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.v14.services; 18 19import "google/ads/googleads/v14/enums/response_content_type.proto"; 20import "google/ads/googleads/v14/resources/custom_conversion_goal.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"; 26 27option csharp_namespace = "Google.Ads.GoogleAds.V14.Services"; 28option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/services;services"; 29option java_multiple_files = true; 30option java_outer_classname = "CustomConversionGoalServiceProto"; 31option java_package = "com.google.ads.googleads.v14.services"; 32option objc_class_prefix = "GAA"; 33option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Services"; 34option ruby_package = "Google::Ads::GoogleAds::V14::Services"; 35 36// Proto file describing the CustomConversionGoal service. 37 38// Service to manage custom conversion goal. 39service CustomConversionGoalService { 40 option (google.api.default_host) = "googleads.googleapis.com"; 41 option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords"; 42 43 // Creates, updates or removes custom conversion goals. Operation statuses 44 // are returned. 45 rpc MutateCustomConversionGoals(MutateCustomConversionGoalsRequest) 46 returns (MutateCustomConversionGoalsResponse) { 47 option (google.api.http) = { 48 post: "/v14/customers/{customer_id=*}/customConversionGoals:mutate" 49 body: "*" 50 }; 51 option (google.api.method_signature) = "customer_id,operations"; 52 } 53} 54 55// Request message for 56// [CustomConversionGoalService.MutateCustomConversionGoals][google.ads.googleads.v14.services.CustomConversionGoalService.MutateCustomConversionGoals]. 57message MutateCustomConversionGoalsRequest { 58 // Required. The ID of the customer whose custom conversion goals are being 59 // modified. 60 string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; 61 62 // Required. The list of operations to perform on individual custom conversion 63 // goal. 64 repeated CustomConversionGoalOperation operations = 2 65 [(google.api.field_behavior) = REQUIRED]; 66 67 // If true, the request is validated but not executed. Only errors are 68 // returned, not results. 69 bool validate_only = 3; 70 71 // The response content type setting. Determines whether the mutable resource 72 // or just the resource name should be returned post mutation. 73 google.ads.googleads.v14.enums.ResponseContentTypeEnum.ResponseContentType 74 response_content_type = 4; 75} 76 77// A single operation (create, remove) on a custom conversion goal. 78message CustomConversionGoalOperation { 79 // FieldMask that determines which resource fields are modified in an update. 80 google.protobuf.FieldMask update_mask = 4; 81 82 // The mutate operation. 83 oneof operation { 84 // Create operation: No resource name is expected for the new custom 85 // conversion goal 86 google.ads.googleads.v14.resources.CustomConversionGoal create = 1; 87 88 // Update operation: The custom conversion goal is expected to have a 89 // valid resource name. 90 google.ads.googleads.v14.resources.CustomConversionGoal update = 2; 91 92 // Remove operation: A resource name for the removed custom conversion goal 93 // is expected, in this format: 94 // 95 // 'customers/{customer_id}/conversionActions/{ConversionGoal.custom_goal_config.conversion_type_ids}' 96 string remove = 3 [(google.api.resource_reference) = { 97 type: "googleads.googleapis.com/CustomConversionGoal" 98 }]; 99 } 100} 101 102// Response message for a custom conversion goal mutate. 103message MutateCustomConversionGoalsResponse { 104 // All results for the mutate. 105 repeated MutateCustomConversionGoalResult results = 1; 106} 107 108// The result for the custom conversion goal mutate. 109message MutateCustomConversionGoalResult { 110 // Returned for successful operations. 111 string resource_name = 1 [(google.api.resource_reference) = { 112 type: "googleads.googleapis.com/CustomConversionGoal" 113 }]; 114 115 // The mutated CustomConversionGoal with only mutable fields after mutate. 116 // The field will only be returned when response_content_type is set to 117 // "MUTABLE_RESOURCE". 118 google.ads.googleads.v14.resources.CustomConversionGoal 119 custom_conversion_goal = 2; 120} 121