1 // Copyright 2019 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.v1.services;
20 import "google/ads/googleads/v1/resources/ad_group.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.V1.Services";
27 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
28 option java_multiple_files = true;
29 option java_outer_classname = "AdGroupServiceProto";
30 option java_package = "com.google.ads.googleads.v1.services";
31 option objc_class_prefix = "GAA";
32 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
33 option ruby_package = "Google::Ads::GoogleAds::V1::Services";
34 // Proto file describing the Ad Group service.
36 // Service to manage ad groups.
37 service AdGroupService {
38 // Returns the requested ad group in full detail.
39 rpc GetAdGroup(GetAdGroupRequest) returns (google.ads.googleads.v1.resources.AdGroup) {
40 option (google.api.http) = {
41 get: "/v1/{resource_name=customers/*/adGroups/*}"
45 // Creates, updates, or removes ad groups. Operation statuses are returned.
46 rpc MutateAdGroups(MutateAdGroupsRequest) returns (MutateAdGroupsResponse) {
47 option (google.api.http) = {
48 post: "/v1/customers/{customer_id=*}/adGroups:mutate"
54 // Request message for [AdGroupService.GetAdGroup][google.ads.googleads.v1.services.AdGroupService.GetAdGroup].
55 message GetAdGroupRequest {
56 // The resource name of the ad group to fetch.
57 string resource_name = 1;
60 // Request message for [AdGroupService.MutateAdGroups][google.ads.googleads.v1.services.AdGroupService.MutateAdGroups].
61 message MutateAdGroupsRequest {
62 // The ID of the customer whose ad groups are being modified.
63 string customer_id = 1;
65 // The list of operations to perform on individual ad groups.
66 repeated AdGroupOperation operations = 2;
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.
72 bool partial_failure = 3;
74 // If true, the request is validated but not executed. Only errors are
75 // returned, not results.
76 bool validate_only = 4;
79 // A single operation (create, update, remove) on an ad group.
80 message AdGroupOperation {
81 // FieldMask that determines which resource fields are modified in an update.
82 google.protobuf.FieldMask update_mask = 4;
84 // The mutate operation.
86 // Create operation: No resource name is expected for the new ad group.
87 google.ads.googleads.v1.resources.AdGroup create = 1;
89 // Update operation: The ad group is expected to have a valid resource name.
90 google.ads.googleads.v1.resources.AdGroup update = 2;
92 // Remove operation: A resource name for the removed ad group is expected,
95 // `customers/{customer_id}/adGroups/{ad_group_id}`
100 // Response message for an ad group mutate.
101 message MutateAdGroupsResponse {
102 // Errors that pertain to operation failures in the partial failure mode.
103 // Returned only when partial_failure = true and all errors occur inside the
104 // operations. If any errors occur outside the operations (e.g. auth errors),
105 // we return an RPC level error.
106 google.rpc.Status partial_failure_error = 3;
108 // All results for the mutate.
109 repeated MutateAdGroupResult results = 2;
112 // The result for the ad group mutate.
113 message MutateAdGroupResult {
114 // Returned for successful operations.
115 string resource_name = 1;