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