1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.ads.googleads.v15.resources; 18 19import "google/ads/googleads/v15/enums/budget_delivery_method.proto"; 20import "google/ads/googleads/v15/enums/budget_period.proto"; 21import "google/ads/googleads/v15/enums/budget_status.proto"; 22import "google/ads/googleads/v15/enums/budget_type.proto"; 23import "google/api/field_behavior.proto"; 24import "google/api/resource.proto"; 25 26option csharp_namespace = "Google.Ads.GoogleAds.V15.Resources"; 27option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v15/resources;resources"; 28option java_multiple_files = true; 29option java_outer_classname = "CampaignBudgetProto"; 30option java_package = "com.google.ads.googleads.v15.resources"; 31option objc_class_prefix = "GAA"; 32option php_namespace = "Google\\Ads\\GoogleAds\\V15\\Resources"; 33option ruby_package = "Google::Ads::GoogleAds::V15::Resources"; 34 35// Proto file describing the Budget resource. 36 37// A campaign budget. 38message CampaignBudget { 39 option (google.api.resource) = { 40 type: "googleads.googleapis.com/CampaignBudget" 41 pattern: "customers/{customer_id}/campaignBudgets/{campaign_budget_id}" 42 }; 43 44 // Immutable. The resource name of the campaign budget. 45 // Campaign budget resource names have the form: 46 // 47 // `customers/{customer_id}/campaignBudgets/{campaign_budget_id}` 48 string resource_name = 1 [ 49 (google.api.field_behavior) = IMMUTABLE, 50 (google.api.resource_reference) = { 51 type: "googleads.googleapis.com/CampaignBudget" 52 } 53 ]; 54 55 // Output only. The ID of the campaign budget. 56 // 57 // A campaign budget is created using the CampaignBudgetService create 58 // operation and is assigned a budget ID. A budget ID can be shared across 59 // different campaigns; the system will then allocate the campaign budget 60 // among different campaigns to get optimum results. 61 optional int64 id = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; 62 63 // The name of the campaign budget. 64 // 65 // When creating a campaign budget through CampaignBudgetService, every 66 // explicitly shared campaign budget must have a non-null, non-empty name. 67 // Campaign budgets that are not explicitly shared derive their name from the 68 // attached campaign's name. 69 // 70 // The length of this string must be between 1 and 255, inclusive, 71 // in UTF-8 bytes, (trimmed). 72 optional string name = 20; 73 74 // The amount of the budget, in the local currency for the account. 75 // Amount is specified in micros, where one million is equivalent to one 76 // currency unit. Monthly spend is capped at 30.4 times this amount. 77 optional int64 amount_micros = 21; 78 79 // The lifetime amount of the budget, in the local currency for the account. 80 // Amount is specified in micros, where one million is equivalent to one 81 // currency unit. 82 optional int64 total_amount_micros = 22; 83 84 // Output only. The status of this campaign budget. This field is read-only. 85 google.ads.googleads.v15.enums.BudgetStatusEnum.BudgetStatus status = 6 86 [(google.api.field_behavior) = OUTPUT_ONLY]; 87 88 // The delivery method that determines the rate at which the campaign budget 89 // is spent. 90 // 91 // Defaults to STANDARD if unspecified in a create operation. 92 google.ads.googleads.v15.enums.BudgetDeliveryMethodEnum.BudgetDeliveryMethod 93 delivery_method = 7; 94 95 // Specifies whether the budget is explicitly shared. Defaults to true if 96 // unspecified in a create operation. 97 // 98 // If true, the budget was created with the purpose of sharing 99 // across one or more campaigns. 100 // 101 // If false, the budget was created with the intention of only being used 102 // with a single campaign. The budget's name and status will stay in sync 103 // with the campaign's name and status. Attempting to share the budget with a 104 // second campaign will result in an error. 105 // 106 // A non-shared budget can become an explicitly shared. The same operation 107 // must also assign the budget a name. 108 // 109 // A shared campaign budget can never become non-shared. 110 optional bool explicitly_shared = 23; 111 112 // Output only. The number of campaigns actively using the budget. 113 // 114 // This field is read-only. 115 optional int64 reference_count = 24 116 [(google.api.field_behavior) = OUTPUT_ONLY]; 117 118 // Output only. Indicates whether there is a recommended budget for this 119 // campaign budget. 120 // 121 // This field is read-only. 122 optional bool has_recommended_budget = 25 123 [(google.api.field_behavior) = OUTPUT_ONLY]; 124 125 // Output only. The recommended budget amount. If no recommendation is 126 // available, this will be set to the budget amount. Amount is specified in 127 // micros, where one million is equivalent to one currency unit. 128 // 129 // This field is read-only. 130 optional int64 recommended_budget_amount_micros = 26 131 [(google.api.field_behavior) = OUTPUT_ONLY]; 132 133 // Immutable. Period over which to spend the budget. Defaults to DAILY if not 134 // specified. 135 google.ads.googleads.v15.enums.BudgetPeriodEnum.BudgetPeriod period = 13 136 [(google.api.field_behavior) = IMMUTABLE]; 137 138 // Output only. The estimated change in weekly clicks if the recommended 139 // budget is applied. 140 // 141 // This field is read-only. 142 optional int64 recommended_budget_estimated_change_weekly_clicks = 27 143 [(google.api.field_behavior) = OUTPUT_ONLY]; 144 145 // Output only. The estimated change in weekly cost in micros if the 146 // recommended budget is applied. One million is equivalent to one currency 147 // unit. 148 // 149 // This field is read-only. 150 optional int64 recommended_budget_estimated_change_weekly_cost_micros = 28 151 [(google.api.field_behavior) = OUTPUT_ONLY]; 152 153 // Output only. The estimated change in weekly interactions if the recommended 154 // budget is applied. 155 // 156 // This field is read-only. 157 optional int64 recommended_budget_estimated_change_weekly_interactions = 29 158 [(google.api.field_behavior) = OUTPUT_ONLY]; 159 160 // Output only. The estimated change in weekly views if the recommended budget 161 // is applied. 162 // 163 // This field is read-only. 164 optional int64 recommended_budget_estimated_change_weekly_views = 30 165 [(google.api.field_behavior) = OUTPUT_ONLY]; 166 167 // Immutable. The type of the campaign budget. 168 google.ads.googleads.v15.enums.BudgetTypeEnum.BudgetType type = 18 169 [(google.api.field_behavior) = IMMUTABLE]; 170 171 // ID of the portfolio bidding strategy that this shared campaign budget 172 // is aligned with. When a bidding strategy and a campaign budget are aligned, 173 // they are attached to the same set of campaigns. After a campaign budget is 174 // aligned with a bidding strategy, campaigns that are added to the campaign 175 // budget must also use the aligned bidding strategy. 176 int64 aligned_bidding_strategy_id = 31; 177} 178