• 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.v14.services;
18
19import "google/ads/googleads/v14/enums/response_content_type.proto";
20import "google/ads/googleads/v14/resources/customer_customizer.proto";
21import "google/api/annotations.proto";
22import "google/api/client.proto";
23import "google/api/field_behavior.proto";
24import "google/api/resource.proto";
25import "google/rpc/status.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 = "CustomerCustomizerServiceProto";
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 CustomerCustomizer service.
37
38// Service to manage customer customizer
39service CustomerCustomizerService {
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 customer customizers. Operation statuses are
44  // returned.
45  rpc MutateCustomerCustomizers(MutateCustomerCustomizersRequest)
46      returns (MutateCustomerCustomizersResponse) {
47    option (google.api.http) = {
48      post: "/v14/customers/{customer_id=*}/CustomerCustomizers:mutate"
49      body: "*"
50    };
51    option (google.api.method_signature) = "customer_id,operations";
52  }
53}
54
55// Request message for
56// [CustomerCustomizerService.MutateCustomerCustomizers][google.ads.googleads.v14.services.CustomerCustomizerService.MutateCustomerCustomizers].
57message MutateCustomerCustomizersRequest {
58  // Required. The ID of the customer whose customer customizers 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 customer
63  // customizers.
64  repeated CustomerCustomizerOperation operations = 2
65      [(google.api.field_behavior) = REQUIRED];
66
67  // If true, successful operations will be carried out and invalid
68  // operations will return errors. If false, all operations will be carried
69  // out in one transaction if and only if they are all valid.
70  // Default is false.
71  bool partial_failure = 3;
72
73  // If true, the request is validated but not executed. Only errors are
74  // returned, not results.
75  bool validate_only = 4;
76
77  // The response content type setting. Determines whether the mutable resource
78  // or just the resource name should be returned post mutation.
79  google.ads.googleads.v14.enums.ResponseContentTypeEnum.ResponseContentType
80      response_content_type = 5;
81}
82
83// A single operation (create, remove) on a customizer attribute.
84message CustomerCustomizerOperation {
85  // The mutate operation.
86  oneof operation {
87    // Create operation: No resource name is expected for the new customer
88    // customizer
89    google.ads.googleads.v14.resources.CustomerCustomizer create = 1;
90
91    // Remove operation: A resource name for the removed customer customizer is
92    // expected, in this format:
93    // `customers/{customer_id}/customerCustomizers/{customizer_attribute_id}`
94    string remove = 2 [(google.api.resource_reference) = {
95      type: "googleads.googleapis.com/CustomerCustomizer"
96    }];
97  }
98}
99
100// Response message for a customizer attribute mutate.
101message MutateCustomerCustomizersResponse {
102  // All results for the mutate.
103  repeated MutateCustomerCustomizerResult results = 1;
104
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 (for example, auth
108  // errors), we return an RPC level error.
109  google.rpc.Status partial_failure_error = 2;
110}
111
112// The result for the customizer attribute mutate.
113message MutateCustomerCustomizerResult {
114  // Returned for successful operations.
115  string resource_name = 1 [(google.api.resource_reference) = {
116    type: "googleads.googleapis.com/CustomerCustomizer"
117  }];
118
119  // The mutated CustomerCustomizer with only mutable fields after mutate.
120  // The field will only be returned when response_content_type is set to
121  // "MUTABLE_RESOURCE".
122  google.ads.googleads.v14.resources.CustomerCustomizer customer_customizer = 2;
123}
124