Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / ads / googleads / v0 / services / ad_parameter_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_parameter.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 = "AdParameterServiceProto";
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 Parameter service.
36
37 // Service to manage ad parameters.
38 service AdParameterService {
39   // Returns the requested ad parameter in full detail.
40   rpc GetAdParameter(GetAdParameterRequest)
41       returns (google.ads.googleads.v0.resources.AdParameter) {
42     option (google.api.http) = {
43       get: "/v0/{resource_name=customers/*/adParameters/*}"
44     };
45   }
46
47   // Creates, updates, or removes ad parameters. Operation statuses are
48   // returned.
49   rpc MutateAdParameters(MutateAdParametersRequest)
50       returns (MutateAdParametersResponse) {
51     option (google.api.http) = {
52       post: "/v0/customers/{customer_id=*}/adParameters:mutate"
53       body: "*"
54     };
55   }
56 }
57
58 // Request message for
59 // [AdParameterService.GetAdParameter][google.ads.googleads.v0.services.AdParameterService.GetAdParameter]
60 message GetAdParameterRequest {
61   // The resource name of the ad parameter to fetch.
62   string resource_name = 1;
63 }
64
65 // Request message for
66 // [AdParameterService.MutateAdParameters][google.ads.googleads.v0.services.AdParameterService.MutateAdParameters]
67 message MutateAdParametersRequest {
68   // The ID of the customer whose ad parameters are being modified.
69   string customer_id = 1;
70
71   // The list of operations to perform on individual ad parameters.
72   repeated AdParameterOperation operations = 2;
73
74   // If true, successful operations will be carried out and invalid
75   // operations will return errors. If false, all operations will be carried
76   // out in one transaction if and only if they are all valid.
77   // Default is false.
78   bool partial_failure = 3;
79
80   // If true, the request is validated but not executed. Only errors are
81   // returned, not results.
82   bool validate_only = 4;
83 }
84
85 // A single operation (create, update, remove) on ad parameter.
86 message AdParameterOperation {
87   // FieldMask that determines which resource fields are modified in an update.
88   google.protobuf.FieldMask update_mask = 4;
89
90   // The mutate operation.
91   oneof operation {
92     // Create operation: No resource name is expected for the new ad parameter.
93     google.ads.googleads.v0.resources.AdParameter create = 1;
94
95     // Update operation: The ad parameter is expected to have a valid resource
96     // name.
97     google.ads.googleads.v0.resources.AdParameter update = 2;
98
99     // Remove operation: A resource name for the ad parameter to remove is
100     // expected in this format:
101     //
102     //
103     // `customers/{customer_id}/adParameters/{ad_group_id}_{criterion_id}_{parameter_index}`
104     string remove = 3;
105   }
106 }
107
108 // Response message for an ad parameter mutate.
109 message MutateAdParametersResponse {
110   // Errors that pertain to operation failures in the partial failure mode.
111   // Returned only when partial_failure = true and all errors occur inside the
112   // operations. If any errors occur outside the operations (e.g. auth errors),
113   // we return an RPC level error.
114   google.rpc.Status partial_failure_error = 3;
115
116   // All results for the mutate.
117   repeated MutateAdParameterResult results = 2;
118 }
119
120 // The result for the ad parameter mutate.
121 message MutateAdParameterResult {
122   // The resource name returned for successful operations.
123   string resource_name = 1;
124 }