Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / ads / googleads / v0 / services / campaign_bid_modifier_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/campaign_bid_modifier.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 = "CampaignBidModifierServiceProto";
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 Campaign Bid Modifier service.
36
37 // Service to manage campaign bid modifiers.
38 service CampaignBidModifierService {
39   // Returns the requested campaign bid modifier in full detail.
40   rpc GetCampaignBidModifier(GetCampaignBidModifierRequest)
41       returns (google.ads.googleads.v0.resources.CampaignBidModifier) {
42     option (google.api.http) = {
43       get: "/v0/{resource_name=customers/*/campaignBidModifiers/*}"
44     };
45   }
46
47   // Creates, updates, or removes campaign bid modifiers.
48   // Operation statuses are returned.
49   rpc MutateCampaignBidModifiers(MutateCampaignBidModifiersRequest)
50       returns (MutateCampaignBidModifiersResponse) {
51     option (google.api.http) = {
52       post: "/v0/customers/{customer_id=*}/campaignBidModifiers:mutate"
53       body: "*"
54     };
55   }
56 }
57
58 // Request message for
59 // [CampaignBidModifierService.GetCampaignBidModifier][google.ads.googleads.v0.services.CampaignBidModifierService.GetCampaignBidModifier].
60 message GetCampaignBidModifierRequest {
61   // The resource name of the campaign bid modifier to fetch.
62   string resource_name = 1;
63 }
64
65 // Request message for [CampaignBidModifierService.MutateCampaignBidModifier][].
66 message MutateCampaignBidModifiersRequest {
67   // ID of the customer whose campaign bid modifiers are being modified.
68   string customer_id = 1;
69
70   // The list of operations to perform on individual campaign bid modifiers.
71   repeated CampaignBidModifierOperation 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 a campaign bid modifier.
85 message CampaignBidModifierOperation {
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 campaign bid
92     // modifier.
93     google.ads.googleads.v0.resources.CampaignBidModifier create = 1;
94
95     // Update operation: The campaign bid modifier is expected to have a valid
96     // resource name.
97     google.ads.googleads.v0.resources.CampaignBidModifier update = 2;
98
99     // Remove operation: A resource name for the removed campaign bid modifier
100     // is expected, in this format:
101     //
102     //
103     // `customers/{customer_id}/CampaignBidModifiers/{campaign_id}_{criterion_id}`
104     string remove = 3;
105   }
106 }
107
108 // Response message for campaign bid modifiers mutate.
109 message MutateCampaignBidModifiersResponse {
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 MutateCampaignBidModifierResult results = 2;
118 }
119
120 // The result for the criterion mutate.
121 message MutateCampaignBidModifierResult {
122   // Returned for successful operations.
123   string resource_name = 1;
124 }