Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / ads / googleads / v0 / services / ad_group_criterion_service.proto
1 // Copyright 2018 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 //
15
16 syntax = "proto3";
17
18 package google.ads.googleads.v0.services;
19
20 import "google/ads/googleads/v0/resources/ad_group_criterion.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/field_mask.proto";
23 import "google/protobuf/wrappers.proto";
24 import "google/rpc/status.proto";
25
26 option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
27 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
28 option java_multiple_files = true;
29 option java_outer_classname = "AdGroupCriterionServiceProto";
30 option java_package = "com.google.ads.googleads.v0.services";
31 option objc_class_prefix = "GAA";
32 option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
33 option ruby_package = "Google::Ads::GoogleAds::V0::Services";
34
35 // Proto file describing the Ad Group Criterion service.
36
37 // Service to manage ad group criteria.
38 service AdGroupCriterionService {
39   // Returns the requested criterion in full detail.
40   rpc GetAdGroupCriterion(GetAdGroupCriterionRequest)
41       returns (google.ads.googleads.v0.resources.AdGroupCriterion) {
42     option (google.api.http) = {
43       get: "/v0/{resource_name=customers/*/adGroupCriteria/*}"
44     };
45   }
46
47   // Creates, updates, or removes criteria. Operation statuses are returned.
48   rpc MutateAdGroupCriteria(MutateAdGroupCriteriaRequest)
49       returns (MutateAdGroupCriteriaResponse) {
50     option (google.api.http) = {
51       post: "/v0/customers/{customer_id=*}/adGroupCriteria:mutate"
52       body: "*"
53     };
54   }
55 }
56
57 // Request message for
58 // [AdGroupCriterionService.GetAdGroupCriterion][google.ads.googleads.v0.services.AdGroupCriterionService.GetAdGroupCriterion].
59 message GetAdGroupCriterionRequest {
60   // The resource name of the criterion to fetch.
61   string resource_name = 1;
62 }
63
64 // Request message for
65 // [AdGroupCriterionService.MutateAdGroupCriteria][google.ads.googleads.v0.services.AdGroupCriterionService.MutateAdGroupCriteria].
66 message MutateAdGroupCriteriaRequest {
67   // ID of the customer whose criteria are being modified.
68   string customer_id = 1;
69
70   // The list of operations to perform on individual criteria.
71   repeated AdGroupCriterionOperation operations = 2;
72
73   // If true, successful operations will be carried out and invalid
74   // operations will return errors. If false, all operations will be carried
75   // out in one transaction if and only if they are all valid.
76   // Default is false.
77   bool partial_failure = 3;
78
79   // If true, the request is validated but not executed. Only errors are
80   // returned, not results.
81   bool validate_only = 4;
82 }
83
84 // A single operation (create, remove, update) on an ad group criterion.
85 message AdGroupCriterionOperation {
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 criterion.
92     google.ads.googleads.v0.resources.AdGroupCriterion create = 1;
93
94     // Update operation: The criterion is expected to have a valid resource
95     // name.
96     google.ads.googleads.v0.resources.AdGroupCriterion update = 2;
97
98     // Remove operation: A resource name for the removed criterion is expected,
99     // in this format:
100     //
101     // `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}`
102     string remove = 3;
103   }
104 }
105
106 // Response message for an ad group criterion mutate.
107 message MutateAdGroupCriteriaResponse {
108   // Errors that pertain to operation failures in the partial failure mode.
109   // Returned only when partial_failure = true and all errors occur inside the
110   // operations. If any errors occur outside the operations (e.g. auth errors),
111   // we return an RPC level error.
112   google.rpc.Status partial_failure_error = 3;
113
114   // All results for the mutate.
115   repeated MutateAdGroupCriterionResult results = 2;
116 }
117
118 // The result for the criterion mutate.
119 message MutateAdGroupCriterionResult {
120   // Returned for successful operations.
121   string resource_name = 1;
122 }