1 // Copyright 2019 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.ads.googleads.v1.services;
20 import "google/ads/googleads/v1/resources/conversion_action.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/field_mask.proto";
23 import "google/protobuf/wrappers.proto";
24 import "google/rpc/status.proto";
26 option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
27 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
28 option java_multiple_files = true;
29 option java_outer_classname = "ConversionActionServiceProto";
30 option java_package = "com.google.ads.googleads.v1.services";
31 option objc_class_prefix = "GAA";
32 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
33 option ruby_package = "Google::Ads::GoogleAds::V1::Services";
34 // Proto file describing the Conversion Action service.
36 // Service to manage conversion actions.
37 service ConversionActionService {
38 // Returns the requested conversion action.
39 rpc GetConversionAction(GetConversionActionRequest) returns (google.ads.googleads.v1.resources.ConversionAction) {
40 option (google.api.http) = {
41 get: "/v1/{resource_name=customers/*/conversionActions/*}"
45 // Creates, updates or removes conversion actions. Operation statuses are
47 rpc MutateConversionActions(MutateConversionActionsRequest) returns (MutateConversionActionsResponse) {
48 option (google.api.http) = {
49 post: "/v1/customers/{customer_id=*}/conversionActions:mutate"
55 // Request message for [ConversionActionService.GetConversionAction][google.ads.googleads.v1.services.ConversionActionService.GetConversionAction].
56 message GetConversionActionRequest {
57 // The resource name of the conversion action to fetch.
58 string resource_name = 1;
61 // Request message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions].
62 message MutateConversionActionsRequest {
63 // The ID of the customer whose conversion actions are being modified.
64 string customer_id = 1;
66 // The list of operations to perform on individual conversion actions.
67 repeated ConversionActionOperation operations = 2;
69 // If true, successful operations will be carried out and invalid
70 // operations will return errors. If false, all operations will be carried
71 // out in one transaction if and only if they are all valid.
73 bool partial_failure = 3;
75 // If true, the request is validated but not executed. Only errors are
76 // returned, not results.
77 bool validate_only = 4;
80 // A single operation (create, update, remove) on a conversion action.
81 message ConversionActionOperation {
82 // FieldMask that determines which resource fields are modified in an update.
83 google.protobuf.FieldMask update_mask = 4;
85 // The mutate operation.
87 // Create operation: No resource name is expected for the new conversion
89 google.ads.googleads.v1.resources.ConversionAction create = 1;
91 // Update operation: The conversion action is expected to have a valid
93 google.ads.googleads.v1.resources.ConversionAction update = 2;
95 // Remove operation: A resource name for the removed conversion action is
96 // expected, in this format:
98 // `customers/{customer_id}/conversionActions/{conversion_action_id}`
103 // Response message for [ConversionActionService.MutateConversionActions][google.ads.googleads.v1.services.ConversionActionService.MutateConversionActions].
104 message MutateConversionActionsResponse {
105 // Errors that pertain to operation failures in the partial failure mode.
106 // Returned only when partial_failure = true and all errors occur inside the
107 // operations. If any errors occur outside the operations (e.g. auth errors),
108 // we return an RPC level error.
109 google.rpc.Status partial_failure_error = 3;
111 // All results for the mutate.
112 repeated MutateConversionActionResult results = 2;
115 // The result for the conversion action mutate.
116 message MutateConversionActionResult {
117 // Returned for successful operations.
118 string resource_name = 1;