account_budget.proto 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  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.resources;
  16. import "google/ads/googleads/v10/enums/account_budget_proposal_type.proto";
  17. import "google/ads/googleads/v10/enums/account_budget_status.proto";
  18. import "google/ads/googleads/v10/enums/spending_limit_type.proto";
  19. import "google/ads/googleads/v10/enums/time_type.proto";
  20. import "google/api/field_behavior.proto";
  21. import "google/api/resource.proto";
  22. option csharp_namespace = "Google.Ads.GoogleAds.V10.Resources";
  23. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v10/resources;resources";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "AccountBudgetProto";
  26. option java_package = "com.google.ads.googleads.v10.resources";
  27. option objc_class_prefix = "GAA";
  28. option php_namespace = "Google\\Ads\\GoogleAds\\V10\\Resources";
  29. option ruby_package = "Google::Ads::GoogleAds::V10::Resources";
  30. // Proto file describing the AccountBudget resource.
  31. // An account-level budget. It contains information about the budget itself,
  32. // as well as the most recently approved changes to the budget and proposed
  33. // changes that are pending approval. The proposed changes that are pending
  34. // approval, if any, are found in 'pending_proposal'. Effective details about
  35. // the budget are found in fields prefixed 'approved_', 'adjusted_' and those
  36. // without a prefix. Since some effective details may differ from what the user
  37. // had originally requested (e.g. spending limit), these differences are
  38. // juxtaposed via 'proposed_', 'approved_', and possibly 'adjusted_' fields.
  39. //
  40. // This resource is mutated using AccountBudgetProposal and cannot be mutated
  41. // directly. A budget may have at most one pending proposal at any given time.
  42. // It is read through pending_proposal.
  43. //
  44. // Once approved, a budget may be subject to adjustments, such as credit
  45. // adjustments. Adjustments create differences between the 'approved' and
  46. // 'adjusted' fields, which would otherwise be identical.
  47. message AccountBudget {
  48. option (google.api.resource) = {
  49. type: "googleads.googleapis.com/AccountBudget"
  50. pattern: "customers/{customer_id}/accountBudgets/{account_budget_id}"
  51. };
  52. // A pending proposal associated with the enclosing account-level budget,
  53. // if applicable.
  54. message PendingAccountBudgetProposal {
  55. // Output only. The resource name of the proposal.
  56. // AccountBudgetProposal resource names have the form:
  57. //
  58. // `customers/{customer_id}/accountBudgetProposals/{account_budget_proposal_id}`
  59. optional string account_budget_proposal = 12 [
  60. (google.api.field_behavior) = OUTPUT_ONLY,
  61. (google.api.resource_reference) = {
  62. type: "googleads.googleapis.com/AccountBudgetProposal"
  63. }
  64. ];
  65. // Output only. The type of this proposal, e.g. END to end the budget associated
  66. // with this proposal.
  67. google.ads.googleads.v10.enums.AccountBudgetProposalTypeEnum.AccountBudgetProposalType proposal_type = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  68. // Output only. The name to assign to the account-level budget.
  69. optional string name = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  70. // Output only. The start time in yyyy-MM-dd HH:mm:ss format.
  71. optional string start_date_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  72. // Output only. A purchase order number is a value that helps users reference this budget
  73. // in their monthly invoices.
  74. optional string purchase_order_number = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  75. // Output only. Notes associated with this budget.
  76. optional string notes = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
  77. // Output only. The time when this account-level budget proposal was created.
  78. // Formatted as yyyy-MM-dd HH:mm:ss.
  79. optional string creation_date_time = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
  80. // The end time of the account-level budget.
  81. oneof end_time {
  82. // Output only. The end time in yyyy-MM-dd HH:mm:ss format.
  83. string end_date_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  84. // Output only. The end time as a well-defined type, e.g. FOREVER.
  85. google.ads.googleads.v10.enums.TimeTypeEnum.TimeType end_time_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  86. }
  87. // The spending limit.
  88. oneof spending_limit {
  89. // Output only. The spending limit in micros. One million is equivalent to
  90. // one unit.
  91. int64 spending_limit_micros = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  92. // Output only. The spending limit as a well-defined type, e.g. INFINITE.
  93. google.ads.googleads.v10.enums.SpendingLimitTypeEnum.SpendingLimitType spending_limit_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  94. }
  95. }
  96. // Output only. The resource name of the account-level budget.
  97. // AccountBudget resource names have the form:
  98. //
  99. // `customers/{customer_id}/accountBudgets/{account_budget_id}`
  100. string resource_name = 1 [
  101. (google.api.field_behavior) = OUTPUT_ONLY,
  102. (google.api.resource_reference) = {
  103. type: "googleads.googleapis.com/AccountBudget"
  104. }
  105. ];
  106. // Output only. The ID of the account-level budget.
  107. optional int64 id = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
  108. // Output only. The resource name of the billing setup associated with this account-level
  109. // budget. BillingSetup resource names have the form:
  110. //
  111. // `customers/{customer_id}/billingSetups/{billing_setup_id}`
  112. optional string billing_setup = 24 [
  113. (google.api.field_behavior) = OUTPUT_ONLY,
  114. (google.api.resource_reference) = {
  115. type: "googleads.googleapis.com/BillingSetup"
  116. }
  117. ];
  118. // Output only. The status of this account-level budget.
  119. google.ads.googleads.v10.enums.AccountBudgetStatusEnum.AccountBudgetStatus status = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  120. // Output only. The name of the account-level budget.
  121. optional string name = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
  122. // Output only. The proposed start time of the account-level budget in
  123. // yyyy-MM-dd HH:mm:ss format. If a start time type of NOW was proposed,
  124. // this is the time of request.
  125. optional string proposed_start_date_time = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
  126. // Output only. The approved start time of the account-level budget in yyyy-MM-dd HH:mm:ss
  127. // format.
  128. //
  129. // For example, if a new budget is approved after the proposed start time,
  130. // the approved start time is the time of approval.
  131. optional string approved_start_date_time = 27 [(google.api.field_behavior) = OUTPUT_ONLY];
  132. // Output only. The total adjustments amount.
  133. //
  134. // An example of an adjustment is courtesy credits.
  135. int64 total_adjustments_micros = 33 [(google.api.field_behavior) = OUTPUT_ONLY];
  136. // Output only. The value of Ads that have been served, in micros.
  137. //
  138. // This includes overdelivery costs, in which case a credit might be
  139. // automatically applied to the budget (see total_adjustments_micros).
  140. int64 amount_served_micros = 34 [(google.api.field_behavior) = OUTPUT_ONLY];
  141. // Output only. A purchase order number is a value that helps users reference this budget
  142. // in their monthly invoices.
  143. optional string purchase_order_number = 35 [(google.api.field_behavior) = OUTPUT_ONLY];
  144. // Output only. Notes associated with the budget.
  145. optional string notes = 36 [(google.api.field_behavior) = OUTPUT_ONLY];
  146. // Output only. The pending proposal to modify this budget, if applicable.
  147. PendingAccountBudgetProposal pending_proposal = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
  148. // The proposed end time of the account-level budget.
  149. oneof proposed_end_time {
  150. // Output only. The proposed end time in yyyy-MM-dd HH:mm:ss format.
  151. string proposed_end_date_time = 28 [(google.api.field_behavior) = OUTPUT_ONLY];
  152. // Output only. The proposed end time as a well-defined type, e.g. FOREVER.
  153. google.ads.googleads.v10.enums.TimeTypeEnum.TimeType proposed_end_time_type = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  154. }
  155. // The approved end time of the account-level budget.
  156. //
  157. // For example, if a budget's end time is updated and the proposal is approved
  158. // after the proposed end time, the approved end time is the time of approval.
  159. oneof approved_end_time {
  160. // Output only. The approved end time in yyyy-MM-dd HH:mm:ss format.
  161. string approved_end_date_time = 29 [(google.api.field_behavior) = OUTPUT_ONLY];
  162. // Output only. The approved end time as a well-defined type, e.g. FOREVER.
  163. google.ads.googleads.v10.enums.TimeTypeEnum.TimeType approved_end_time_type = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  164. }
  165. // The proposed spending limit.
  166. oneof proposed_spending_limit {
  167. // Output only. The proposed spending limit in micros. One million is equivalent to
  168. // one unit.
  169. int64 proposed_spending_limit_micros = 30 [(google.api.field_behavior) = OUTPUT_ONLY];
  170. // Output only. The proposed spending limit as a well-defined type, e.g. INFINITE.
  171. google.ads.googleads.v10.enums.SpendingLimitTypeEnum.SpendingLimitType proposed_spending_limit_type = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  172. }
  173. // The approved spending limit.
  174. //
  175. // For example, if the amount already spent by the account exceeds the
  176. // proposed spending limit at the time the proposal is approved, the approved
  177. // spending limit is set to the amount already spent.
  178. oneof approved_spending_limit {
  179. // Output only. The approved spending limit in micros. One million is equivalent to
  180. // one unit. This will only be populated if the proposed spending limit
  181. // is finite, and will always be greater than or equal to the
  182. // proposed spending limit.
  183. int64 approved_spending_limit_micros = 31 [(google.api.field_behavior) = OUTPUT_ONLY];
  184. // Output only. The approved spending limit as a well-defined type, e.g. INFINITE. This
  185. // will only be populated if the approved spending limit is INFINITE.
  186. google.ads.googleads.v10.enums.SpendingLimitTypeEnum.SpendingLimitType approved_spending_limit_type = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  187. }
  188. // The spending limit after adjustments have been applied. Adjustments are
  189. // stored in total_adjustments_micros.
  190. //
  191. // This value has the final say on how much the account is allowed to spend.
  192. oneof adjusted_spending_limit {
  193. // Output only. The adjusted spending limit in micros. One million is equivalent to
  194. // one unit.
  195. //
  196. // If the approved spending limit is finite, the adjusted
  197. // spending limit may vary depending on the types of adjustments applied
  198. // to this budget, if applicable.
  199. //
  200. // The different kinds of adjustments are described here:
  201. // https://support.google.com/google-ads/answer/1704323
  202. //
  203. // For example, a debit adjustment reduces how much the account is
  204. // allowed to spend.
  205. int64 adjusted_spending_limit_micros = 32 [(google.api.field_behavior) = OUTPUT_ONLY];
  206. // Output only. The adjusted spending limit as a well-defined type, e.g. INFINITE.
  207. // This will only be populated if the adjusted spending limit is INFINITE,
  208. // which is guaranteed to be true if the approved spending limit is
  209. // INFINITE.
  210. google.ads.googleads.v10.enums.SpendingLimitTypeEnum.SpendingLimitType adjusted_spending_limit_type = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  211. }
  212. }