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/campaign_budget.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 = "CampaignBudgetServiceProto";
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 Campaign Budget service.
37 // Service to manage campaign budgets.
38 service CampaignBudgetService {
39 // Returns the requested Campaign Budget in full detail.
40 rpc GetCampaignBudget(GetCampaignBudgetRequest)
41 returns (google.ads.googleads.v0.resources.CampaignBudget) {
42 option (google.api.http) = {
43 get: "/v0/{resource_name=customers/*/campaignBudgets/*}"
47 // Creates, updates, or removes campaign budgets. Operation statuses are
49 rpc MutateCampaignBudgets(MutateCampaignBudgetsRequest)
50 returns (MutateCampaignBudgetsResponse) {
51 option (google.api.http) = {
52 post: "/v0/customers/{customer_id=*}/campaignBudgets:mutate"
58 // Request message for
59 // [CampaignBudgetService.GetCampaignBudget][google.ads.googleads.v0.services.CampaignBudgetService.GetCampaignBudget].
60 message GetCampaignBudgetRequest {
61 // The resource name of the campaign budget to fetch.
62 string resource_name = 1;
65 // Request message for
66 // [CampaignBudgetService.MutateCampaignBudgets][google.ads.googleads.v0.services.CampaignBudgetService.MutateCampaignBudgets].
67 message MutateCampaignBudgetsRequest {
68 // The ID of the customer whose campaign budgets are being modified.
69 string customer_id = 1;
71 // The list of operations to perform on individual campaign budgets.
72 repeated CampaignBudgetOperation operations = 2;
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.
78 bool partial_failure = 3;
80 // If true, the request is validated but not executed. Only errors are
81 // returned, not results.
82 bool validate_only = 4;
85 // A single operation (create, update, remove) on a campaign budget.
86 message CampaignBudgetOperation {
87 // FieldMask that determines which resource fields are modified in an update.
88 google.protobuf.FieldMask update_mask = 4;
90 // The mutate operation.
92 // Create operation: No resource name is expected for the new budget.
93 google.ads.googleads.v0.resources.CampaignBudget create = 1;
95 // Update operation: The campaign budget is expected to have a valid
97 google.ads.googleads.v0.resources.CampaignBudget update = 2;
99 // Remove operation: A resource name for the removed budget is expected, in
102 // `customers/{customer_id}/campaignBudgets/{budget_id}`
107 // Response message for campaign budget mutate.
108 message MutateCampaignBudgetsResponse {
109 // Errors that pertain to operation failures in the partial failure mode.
110 // Returned only when partial_failure = true and all errors occur inside the
111 // operations. If any errors occur outside the operations (e.g. auth errors),
112 // we return an RPC level error.
113 google.rpc.Status partial_failure_error = 3;
115 // All results for the mutate.
116 repeated MutateCampaignBudgetResult results = 2;
119 // The result for the campaign budget mutate.
120 message MutateCampaignBudgetResult {
121 // Returned for successful operations.
122 string resource_name = 1;