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