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