1 // Copyright 2018 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.ads.googleads.v0.services;
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";
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";
35 // Proto file describing the Ad Group Criterion service.
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/*}"
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"
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;
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;
70 // The list of operations to perform on individual criteria.
71 repeated AdGroupCriterionOperation operations = 2;
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.
77 bool partial_failure = 3;
79 // If true, the request is validated but not executed. Only errors are
80 // returned, not results.
81 bool validate_only = 4;
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;
89 // The mutate operation.
91 // Create operation: No resource name is expected for the new criterion.
92 google.ads.googleads.v0.resources.AdGroupCriterion create = 1;
94 // Update operation: The criterion is expected to have a valid resource
96 google.ads.googleads.v0.resources.AdGroupCriterion update = 2;
98 // Remove operation: A resource name for the removed criterion is expected,
101 // `customers/{customer_id}/adGroupCriteria/{ad_group_id}_{criterion_id}`
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;
114 // All results for the mutate.
115 repeated MutateAdGroupCriterionResult results = 2;
118 // The result for the criterion mutate.
119 message MutateAdGroupCriterionResult {
120 // Returned for successful operations.
121 string resource_name = 1;