Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / ads / googleads / v1 / services / account_budget_proposal_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/resources/account_budget_proposal.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/field_mask.proto";
23
24 option csharp_namespace = "Google.Ads.GoogleAds.V1.Services";
25 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/services;services";
26 option java_multiple_files = true;
27 option java_outer_classname = "AccountBudgetProposalServiceProto";
28 option java_package = "com.google.ads.googleads.v1.services";
29 option objc_class_prefix = "GAA";
30 option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Services";
31 option ruby_package = "Google::Ads::GoogleAds::V1::Services";
32 // Proto file describing the AccountBudgetProposal service.
33
34 // A service for managing account-level budgets via proposals.
35 //
36 // A proposal is a request to create a new budget or make changes to an
37 // existing one.
38 //
39 // Reads for account-level budgets managed by these proposals will be
40 // supported in a future version.  Please use BudgetOrderService until then:
41 // https://developers.google.com/adwords/api/docs/guides/budget-order
42 //
43 // Mutates:
44 // The CREATE operation creates a new proposal.
45 // UPDATE operations aren't supported.
46 // The REMOVE operation cancels a pending proposal.
47 service AccountBudgetProposalService {
48   // Returns an account-level budget proposal in full detail.
49   rpc GetAccountBudgetProposal(GetAccountBudgetProposalRequest) returns (google.ads.googleads.v1.resources.AccountBudgetProposal) {
50     option (google.api.http) = {
51       get: "/v1/{resource_name=customers/*/accountBudgetProposals/*}"
52     };
53   }
54
55   // Creates, updates, or removes account budget proposals.  Operation statuses
56   // are returned.
57   rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) returns (MutateAccountBudgetProposalResponse) {
58     option (google.api.http) = {
59       post: "/v1/customers/{customer_id=*}/accountBudgetProposals:mutate"
60       body: "*"
61     };
62   }
63 }
64
65 // Request message for
66 // [AccountBudgetProposalService.GetAccountBudgetProposal][google.ads.googleads.v1.services.AccountBudgetProposalService.GetAccountBudgetProposal].
67 message GetAccountBudgetProposalRequest {
68   // The resource name of the account-level budget proposal to fetch.
69   string resource_name = 1;
70 }
71
72 // Request message for
73 // [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v1.services.AccountBudgetProposalService.MutateAccountBudgetProposal].
74 message MutateAccountBudgetProposalRequest {
75   // The ID of the customer.
76   string customer_id = 1;
77
78   // The operation to perform on an individual account-level budget proposal.
79   AccountBudgetProposalOperation operation = 2;
80
81   // If true, the request is validated but not executed. Only errors are
82   // returned, not results.
83   bool validate_only = 3;
84 }
85
86 // A single operation to propose the creation of a new account-level budget or
87 // edit/end/remove an existing one.
88 message AccountBudgetProposalOperation {
89   // FieldMask that determines which budget fields are modified.  While budgets
90   // may be modified, proposals that propose such modifications are final.
91   // Therefore, update operations are not supported for proposals.
92   //
93   // Proposals that modify budgets have the 'update' proposal type.  Specifying
94   // a mask for any other proposal type is considered an error.
95   google.protobuf.FieldMask update_mask = 3;
96
97   // The mutate operation.
98   oneof operation {
99     // Create operation: A new proposal to create a new budget, edit an
100     // existing budget, end an actively running budget, or remove an approved
101     // budget scheduled to start in the future.
102     // No resource name is expected for the new proposal.
103     google.ads.googleads.v1.resources.AccountBudgetProposal create = 2;
104
105     // Remove operation: A resource name for the removed proposal is expected,
106     // in this format:
107     //
108     //
109     // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
110     // A request may be cancelled iff it is pending.
111     string remove = 1;
112   }
113 }
114
115 // Response message for account-level budget mutate operations.
116 message MutateAccountBudgetProposalResponse {
117   // The result of the mutate.
118   MutateAccountBudgetProposalResult result = 2;
119 }
120
121 // The result for the account budget proposal mutate.
122 message MutateAccountBudgetProposalResult {
123   // Returned for successful operations.
124   string resource_name = 1;
125 }