account_budget_proposal_service.proto 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.ads.googleads.v10.services;
  16. import "google/ads/googleads/v10/resources/account_budget_proposal.proto";
  17. import "google/api/annotations.proto";
  18. import "google/api/client.proto";
  19. import "google/api/field_behavior.proto";
  20. import "google/api/resource.proto";
  21. import "google/protobuf/field_mask.proto";
  22. option csharp_namespace = "Google.Ads.GoogleAds.V10.Services";
  23. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/services;services";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "AccountBudgetProposalServiceProto";
  26. option java_package = "com.google.ads.googleads.v10.services";
  27. option objc_class_prefix = "GAA";
  28. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Services";
  29. option ruby_package = "Google::Ads::GoogleAds::V10::Services";
  30. // Proto file describing the AccountBudgetProposal service.
  31. // A service for managing account-level budgets via proposals.
  32. //
  33. // A proposal is a request to create a new budget or make changes to an
  34. // existing one.
  35. //
  36. // Mutates:
  37. // The CREATE operation creates a new proposal.
  38. // UPDATE operations aren't supported.
  39. // The REMOVE operation cancels a pending proposal.
  40. service AccountBudgetProposalService {
  41. option (google.api.default_host) = "googleads.googleapis.com";
  42. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/adwords";
  43. // Creates, updates, or removes account budget proposals. Operation statuses
  44. // are returned.
  45. //
  46. // List of thrown errors:
  47. // [AccountBudgetProposalError]()
  48. // [AuthenticationError]()
  49. // [AuthorizationError]()
  50. // [DatabaseError]()
  51. // [DateError]()
  52. // [FieldError]()
  53. // [FieldMaskError]()
  54. // [HeaderError]()
  55. // [InternalError]()
  56. // [MutateError]()
  57. // [QuotaError]()
  58. // [RequestError]()
  59. // [StringLengthError]()
  60. rpc MutateAccountBudgetProposal(MutateAccountBudgetProposalRequest) returns (MutateAccountBudgetProposalResponse) {
  61. option (google.api.http) = {
  62. post: "/v10/customers/{customer_id=*}/accountBudgetProposals:mutate"
  63. body: "*"
  64. };
  65. option (google.api.method_signature) = "customer_id,operation";
  66. }
  67. }
  68. // Request message for
  69. // [AccountBudgetProposalService.MutateAccountBudgetProposal][google.ads.googleads.v10.services.AccountBudgetProposalService.MutateAccountBudgetProposal].
  70. message MutateAccountBudgetProposalRequest {
  71. // Required. The ID of the customer.
  72. string customer_id = 1 [(google.api.field_behavior) = REQUIRED];
  73. // Required. The operation to perform on an individual account-level budget proposal.
  74. AccountBudgetProposalOperation operation = 2 [(google.api.field_behavior) = REQUIRED];
  75. // If true, the request is validated but not executed. Only errors are
  76. // returned, not results.
  77. bool validate_only = 3;
  78. }
  79. // A single operation to propose the creation of a new account-level budget or
  80. // edit/end/remove an existing one.
  81. message AccountBudgetProposalOperation {
  82. // FieldMask that determines which budget fields are modified. While budgets
  83. // may be modified, proposals that propose such modifications are final.
  84. // Therefore, update operations are not supported for proposals.
  85. //
  86. // Proposals that modify budgets have the 'update' proposal type. Specifying
  87. // a mask for any other proposal type is considered an error.
  88. google.protobuf.FieldMask update_mask = 3;
  89. // The mutate operation.
  90. oneof operation {
  91. // Create operation: A new proposal to create a new budget, edit an
  92. // existing budget, end an actively running budget, or remove an approved
  93. // budget scheduled to start in the future.
  94. // No resource name is expected for the new proposal.
  95. google.ads.googleads.v10.resources.AccountBudgetProposal create = 2;
  96. // Remove operation: A resource name for the removed proposal is expected,
  97. // in this format:
  98. //
  99. // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
  100. // A request may be cancelled iff it is pending.
  101. string remove = 1 [(google.api.resource_reference) = {
  102. type: "googleads.googleapis.com/AccountBudgetProposal"
  103. }];
  104. }
  105. }
  106. // Response message for account-level budget mutate operations.
  107. message MutateAccountBudgetProposalResponse {
  108. // The result of the mutate.
  109. MutateAccountBudgetProposalResult result = 2;
  110. }
  111. // The result for the account budget proposal mutate.
  112. message MutateAccountBudgetProposalResult {
  113. // Returned for successful operations.
  114. string resource_name = 1 [(google.api.resource_reference) = {
  115. type: "googleads.googleapis.com/AccountBudgetProposal"
  116. }];
  117. }