• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_custom_variable.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 = "ConversionCustomVariableServiceProto";
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 Custom Variable service.
38
39// Service to manage conversion custom variables.
40service ConversionCustomVariableService {
41  option (google.api.default_host) = "googleads.googleapis.com";
42  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
43
44  // Creates or updates conversion custom variables. Operation statuses are
45  // returned.
46  //
47  // List of thrown errors:
48  //   [AuthenticationError]()
49  //   [AuthorizationError]()
50  //   [ConversionCustomVariableError]()
51  //   [DatabaseError]()
52  //   [HeaderError]()
53  //   [InternalError]()
54  //   [QuotaError]()
55  //   [RequestError]()
56  rpc MutateConversionCustomVariables(MutateConversionCustomVariablesRequest)
57      returns (MutateConversionCustomVariablesResponse) {
58    option (google.api.http) = {
59      post: "/v15/customers/{customer_id=*}/conversionCustomVariables:mutate"
60      body: "*"
61    };
62    option (google.api.method_signature) = "customer_id,operations";
63  }
64}
65
66// Request message for
67// [ConversionCustomVariableService.MutateConversionCustomVariables][google.ads.googleads.v15.services.ConversionCustomVariableService.MutateConversionCustomVariables].
68message MutateConversionCustomVariablesRequest {
69  // Required. The ID of the customer whose conversion custom variables are
70  // being modified.
71  string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
72
73  // Required. The list of operations to perform on individual conversion custom
74  // variables.
75  repeated ConversionCustomVariableOperation operations = 2
76      [(google.api.field_behavior) = REQUIRED];
77
78  // If true, successful operations will be carried out and invalid
79  // operations will return errors. If false, all operations will be carried
80  // out in one transaction if and only if they are all valid.
81  // Default is false.
82  bool partial_failure = 3;
83
84  // If true, the request is validated but not executed. Only errors are
85  // returned, not results.
86  bool validate_only = 4;
87
88  // The response content type setting. Determines whether the mutable resource
89  // or just the resource name should be returned post mutation.
90  google.ads.googleads.v15.enums.ResponseContentTypeEnum.ResponseContentType
91      response_content_type = 5;
92}
93
94// A single operation (create, update) on a conversion custom variable.
95message ConversionCustomVariableOperation {
96  // FieldMask that determines which resource fields are modified in an update.
97  google.protobuf.FieldMask update_mask = 3;
98
99  // The mutate operation.
100  oneof operation {
101    // Create operation: No resource name is expected for the new conversion
102    // custom variable.
103    google.ads.googleads.v15.resources.ConversionCustomVariable create = 1;
104
105    // Update operation: The conversion custom variable is expected to have a
106    // valid resource name.
107    google.ads.googleads.v15.resources.ConversionCustomVariable update = 2;
108  }
109}
110
111// Response message for
112// [ConversionCustomVariableService.MutateConversionCustomVariables][google.ads.googleads.v15.services.ConversionCustomVariableService.MutateConversionCustomVariables].
113message MutateConversionCustomVariablesResponse {
114  // Errors that pertain to operation failures in the partial failure mode.
115  // Returned only when partial_failure = true and all errors occur inside the
116  // operations. If any errors occur outside the operations (for example, auth
117  // errors), we return an RPC level error.
118  google.rpc.Status partial_failure_error = 1;
119
120  // All results for the mutate.
121  repeated MutateConversionCustomVariableResult results = 2;
122}
123
124// The result for the conversion custom variable mutate.
125message MutateConversionCustomVariableResult {
126  // Returned for successful operations.
127  string resource_name = 1 [(google.api.resource_reference) = {
128    type: "googleads.googleapis.com/ConversionCustomVariable"
129  }];
130
131  // The mutated conversion custom variable with only mutable fields after
132  // mutate. The field will only be returned when response_content_type is set
133  // to "MUTABLE_RESOURCE".
134  google.ads.googleads.v15.resources.ConversionCustomVariable
135      conversion_custom_variable = 2;
136}
137