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.v15.services; 18 19import "google/ads/googleads/v15/enums/response_content_type.proto"; 20import "google/ads/googleads/v15/resources/conversion_action.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.V15.Services"; 29option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v15/services;services"; 30option java_multiple_files = true; 31option java_outer_classname = "ConversionActionServiceProto"; 32option java_package = "com.google.ads.googleads.v15.services"; 33option objc_class_prefix = "GAA"; 34option php_namespace = "Google\\Ads\\GoogleAds\\V15\\Services"; 35option ruby_package = "Google::Ads::GoogleAds::V15::Services"; 36 37// Proto file describing the Conversion Action service. 38 39// Service to manage conversion actions. 40service ConversionActionService { 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 conversion actions. Operation statuses are 45 // returned. 46 // 47 // List of thrown errors: 48 // [AuthenticationError]() 49 // [AuthorizationError]() 50 // [ConversionActionError]() 51 // [CurrencyCodeError]() 52 // [DatabaseError]() 53 // [FieldError]() 54 // [FieldMaskError]() 55 // [HeaderError]() 56 // [InternalError]() 57 // [MutateError]() 58 // [NewResourceCreationError]() 59 // [QuotaError]() 60 // [RangeError]() 61 // [RequestError]() 62 // [ResourceCountLimitExceededError]() 63 // [StringLengthError]() 64 rpc MutateConversionActions(MutateConversionActionsRequest) 65 returns (MutateConversionActionsResponse) { 66 option (google.api.http) = { 67 post: "/v15/customers/{customer_id=*}/conversionActions:mutate" 68 body: "*" 69 }; 70 option (google.api.method_signature) = "customer_id,operations"; 71 } 72} 73 74// Request message for 75// [ConversionActionService.MutateConversionActions][google.ads.googleads.v15.services.ConversionActionService.MutateConversionActions]. 76message MutateConversionActionsRequest { 77 // Required. The ID of the customer whose conversion actions are being 78 // modified. 79 string customer_id = 1 [(google.api.field_behavior) = REQUIRED]; 80 81 // Required. The list of operations to perform on individual conversion 82 // actions. 83 repeated ConversionActionOperation operations = 2 84 [(google.api.field_behavior) = REQUIRED]; 85 86 // If true, successful operations will be carried out and invalid 87 // operations will return errors. If false, all operations will be carried 88 // out in one transaction if and only if they are all valid. 89 // Default is false. 90 bool partial_failure = 3; 91 92 // If true, the request is validated but not executed. Only errors are 93 // returned, not results. 94 bool validate_only = 4; 95 96 // The response content type setting. Determines whether the mutable resource 97 // or just the resource name should be returned post mutation. 98 google.ads.googleads.v15.enums.ResponseContentTypeEnum.ResponseContentType 99 response_content_type = 5; 100} 101 102// A single operation (create, update, remove) on a conversion action. 103message ConversionActionOperation { 104 // FieldMask that determines which resource fields are modified in an update. 105 google.protobuf.FieldMask update_mask = 4; 106 107 // The mutate operation. 108 oneof operation { 109 // Create operation: No resource name is expected for the new conversion 110 // action. 111 google.ads.googleads.v15.resources.ConversionAction create = 1; 112 113 // Update operation: The conversion action is expected to have a valid 114 // resource name. 115 google.ads.googleads.v15.resources.ConversionAction update = 2; 116 117 // Remove operation: A resource name for the removed conversion action is 118 // expected, in this format: 119 // 120 // `customers/{customer_id}/conversionActions/{conversion_action_id}` 121 string remove = 3 [(google.api.resource_reference) = { 122 type: "googleads.googleapis.com/ConversionAction" 123 }]; 124 } 125} 126 127// Response message for 128// [ConversionActionService.MutateConversionActions][google.ads.googleads.v15.services.ConversionActionService.MutateConversionActions]. 129message MutateConversionActionsResponse { 130 // Errors that pertain to operation failures in the partial failure mode. 131 // Returned only when partial_failure = true and all errors occur inside the 132 // operations. If any errors occur outside the operations (for example, auth 133 // errors), we return an RPC level error. 134 google.rpc.Status partial_failure_error = 3; 135 136 // All results for the mutate. 137 repeated MutateConversionActionResult results = 2; 138} 139 140// The result for the conversion action mutate. 141message MutateConversionActionResult { 142 // Returned for successful operations. 143 string resource_name = 1 [(google.api.resource_reference) = { 144 type: "googleads.googleapis.com/ConversionAction" 145 }]; 146 147 // The mutated conversion action with only mutable fields after mutate. The 148 // field will only be returned when response_content_type is set to 149 // "MUTABLE_RESOURCE". 150 google.ads.googleads.v15.resources.ConversionAction conversion_action = 2; 151} 152