• 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/customizer_attribute.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.V14.Services";
29option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v14/services;services";
30option java_multiple_files = true;
31option java_outer_classname = "CustomizerAttributeServiceProto";
32option java_package = "com.google.ads.googleads.v14.services";
33option objc_class_prefix = "GAA";
34option php_namespace = "Google\\Ads\\GoogleAds\\V14\\Services";
35option ruby_package = "Google::Ads::GoogleAds::V14::Services";
36
37// Proto file describing the CustomizerAttribute service.
38
39// Service to manage customizer attribute
40service CustomizerAttributeService {
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 customizer attributes. Operation statuses are
45  // returned.
46  rpc MutateCustomizerAttributes(MutateCustomizerAttributesRequest)
47      returns (MutateCustomizerAttributesResponse) {
48    option (google.api.http) = {
49      post: "/v14/customers/{customer_id=*}/customizerAttributes:mutate"
50      body: "*"
51    };
52    option (google.api.method_signature) = "customer_id,operations";
53  }
54}
55
56// Request message for
57// [CustomizerAttributeService.MutateCustomizerAttributes][google.ads.googleads.v14.services.CustomizerAttributeService.MutateCustomizerAttributes].
58message MutateCustomizerAttributesRequest {
59  // Required. The ID of the customer whose customizer attributes are being
60  // modified.
61  string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
62
63  // Required. The list of operations to perform on individual customizer
64  // attributes.
65  repeated CustomizerAttributeOperation operations = 2
66      [(google.api.field_behavior) = REQUIRED];
67
68  // If true, successful operations will be carried out and invalid
69  // operations will return errors. If false, all operations will be carried
70  // out in one transaction if and only if they are all valid.
71  // Default is false.
72  bool partial_failure = 3;
73
74  // If true, the request is validated but not executed. Only errors are
75  // returned, not results.
76  bool validate_only = 4;
77
78  // The response content type setting. Determines whether the mutable resource
79  // or just the resource name should be returned post mutation.
80  google.ads.googleads.v14.enums.ResponseContentTypeEnum.ResponseContentType
81      response_content_type = 5;
82}
83
84// A single operation (create, remove) on a customizer attribute.
85message CustomizerAttributeOperation {
86  // FieldMask that determines which resource fields are modified in an update.
87  google.protobuf.FieldMask update_mask = 4;
88
89  // The mutate operation.
90  oneof operation {
91    // Create operation: No resource name is expected for the new customizer
92    // attribute
93    google.ads.googleads.v14.resources.CustomizerAttribute create = 1;
94
95    // Remove operation: A resource name for the removed customizer attribute is
96    // expected, in this format:
97    // `customers/{customer_id}/customizerAttributes/{customizer_attribute_id}`
98    string remove = 2 [(google.api.resource_reference) = {
99      type: "googleads.googleapis.com/CustomizerAttribute"
100    }];
101  }
102}
103
104// Response message for a customizer attribute mutate.
105message MutateCustomizerAttributesResponse {
106  // All results for the mutate.
107  repeated MutateCustomizerAttributeResult results = 1;
108
109  // Errors that pertain to operation failures in the partial failure mode.
110  // Returned only when partial_failure = true and all errors occur inside the
111  // operations. If any errors occur outside the operations (for example, auth
112  // errors), we return an RPC level error.
113  google.rpc.Status partial_failure_error = 2;
114}
115
116// The result for the customizer attribute mutate.
117message MutateCustomizerAttributeResult {
118  // Returned for successful operations.
119  string resource_name = 1 [(google.api.resource_reference) = {
120    type: "googleads.googleapis.com/CustomizerAttribute"
121  }];
122
123  // The mutated CustomizerAttribute with only mutable fields after mutate.
124  // The field will only be returned when response_content_type is set to
125  // "MUTABLE_RESOURCE".
126  google.ads.googleads.v14.resources.CustomizerAttribute customizer_attribute =
127      2;
128}
129