Class: Google::Apis::Searchads360V23::GoogleAdsSearchads360V23ResourcesCampaignBudget

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/searchads360_v23/classes.rb,
lib/google/apis/searchads360_v23/representations.rb,
lib/google/apis/searchads360_v23/representations.rb

Overview

A campaign budget.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAdsSearchads360V23ResourcesCampaignBudget

Returns a new instance of GoogleAdsSearchads360V23ResourcesCampaignBudget.



25013
25014
25015
# File 'lib/google/apis/searchads360_v23/classes.rb', line 25013

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aligned_bidding_strategy_idFixnum

ID of the portfolio bidding strategy that this shared campaign budget is aligned with. When a bidding strategy and a campaign budget are aligned, they are attached to the same set of campaigns. After a campaign budget is aligned with a bidding strategy, campaigns that are added to the campaign budget must also use the aligned bidding strategy. Corresponds to the JSON property alignedBiddingStrategyId

Returns:

  • (Fixnum)


24884
24885
24886
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24884

def aligned_bidding_strategy_id
  @aligned_bidding_strategy_id
end

#amount_microsFixnum

The average daily amount to be spent by the campaign. This field is used when the CampaignBudget period is set to DAILY, which is the default. Amount is specified in micros in the account's local currency. One million micros is equivalent to one currency unit. The effective monthly spend is capped at 30.4 times this daily amount. This field is mutually exclusive with ' total_amount_micros'. Only one of 'amount_micros' or 'total_amount_micros' should be set. Corresponds to the JSON property amountMicros

Returns:

  • (Fixnum)


24895
24896
24897
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24895

def amount_micros
  @amount_micros
end

#delivery_methodString

The delivery method that determines the rate at which the campaign budget is spent. Defaults to STANDARD if unspecified in a create operation. Corresponds to the JSON property deliveryMethod

Returns:

  • (String)


24901
24902
24903
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24901

def delivery_method
  @delivery_method
end

#explicitly_sharedBoolean Also known as: explicitly_shared?

Specifies whether the budget is explicitly shared. Defaults to true if unspecified in a create operation. If true, the budget was created with the purpose of sharing across one or more campaigns. If false, the budget was created with the intention of only being used with a single campaign. The budget's name and status will stay in sync with the campaign's name and status. Attempting to share the budget with a second campaign will result in an error. A non-shared budget can become an explicitly shared. The same operation must also assign the budget a name. A shared campaign budget can never become non- shared. Corresponds to the JSON property explicitlyShared

Returns:

  • (Boolean)


24914
24915
24916
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24914

def explicitly_shared
  @explicitly_shared
end

Output only. Indicates whether there is a recommended budget for this campaign budget. This field is read-only. Corresponds to the JSON property hasRecommendedBudget

Returns:

  • (Boolean)


24921
24922
24923
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24921

def has_recommended_budget
  @has_recommended_budget
end

#idFixnum

Output only. The ID of the campaign budget. A campaign budget is created using the CampaignBudgetService create operation and is assigned a budget ID. A budget ID can be shared across different campaigns; the system will then allocate the campaign budget among different campaigns to get optimum results. Corresponds to the JSON property id

Returns:

  • (Fixnum)


24930
24931
24932
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24930

def id
  @id
end

#nameString

The name of the campaign budget. When creating a campaign budget through CampaignBudgetService, every explicitly shared campaign budget must have a non- null, non-empty name. Campaign budgets that are not explicitly shared derive their name from the attached campaign's name. The length of this string must be between 1 and 255, inclusive, in UTF-8 bytes, (trimmed). Corresponds to the JSON property name

Returns:

  • (String)


24939
24940
24941
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24939

def name
  @name
end

#periodString

Immutable. Period over which to spend the budget. Defaults to DAILY if not specified. Corresponds to the JSON property period

Returns:

  • (String)


24945
24946
24947
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24945

def period
  @period
end

Output only. The recommended budget amount. If no recommendation is available, this will be set to the budget amount. Amount is specified in micros, where one million is equivalent to one currency unit. This field is read-only. Corresponds to the JSON property recommendedBudgetAmountMicros

Returns:

  • (Fixnum)


24952
24953
24954
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24952

def recommended_budget_amount_micros
  @recommended_budget_amount_micros
end

Output only. The estimated change in weekly clicks if the recommended budget is applied. This field is read-only. Corresponds to the JSON property recommendedBudgetEstimatedChangeWeeklyClicks

Returns:

  • (Fixnum)


24958
24959
24960
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24958

def recommended_budget_estimated_change_weekly_clicks
  @recommended_budget_estimated_change_weekly_clicks
end

Output only. The estimated change in weekly cost in micros if the recommended budget is applied. One million is equivalent to one currency unit. This field is read-only. Corresponds to the JSON property recommendedBudgetEstimatedChangeWeeklyCostMicros

Returns:

  • (Fixnum)


24965
24966
24967
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24965

def recommended_budget_estimated_change_weekly_cost_micros
  @recommended_budget_estimated_change_weekly_cost_micros
end

Output only. The estimated change in weekly interactions if the recommended budget is applied. This field is read-only. Corresponds to the JSON property recommendedBudgetEstimatedChangeWeeklyInteractions

Returns:

  • (Fixnum)


24971
24972
24973
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24971

def recommended_budget_estimated_change_weekly_interactions
  @recommended_budget_estimated_change_weekly_interactions
end

Output only. The estimated change in weekly views if the recommended budget is applied. This field is read-only. Corresponds to the JSON property recommendedBudgetEstimatedChangeWeeklyViews

Returns:

  • (Fixnum)


24977
24978
24979
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24977

def recommended_budget_estimated_change_weekly_views
  @recommended_budget_estimated_change_weekly_views
end

#reference_countFixnum

Output only. The number of campaigns actively using the budget. This field is read-only. Corresponds to the JSON property referenceCount

Returns:

  • (Fixnum)


24983
24984
24985
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24983

def reference_count
  @reference_count
end

#resource_nameString

Immutable. The resource name of the campaign budget. Campaign budget resource names have the form: customers/customer_id/campaignBudgets/ campaign_budget_id` Corresponds to the JSON propertyresourceName`

Returns:

  • (String)


24990
24991
24992
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24990

def resource_name
  @resource_name
end

#statusString

Output only. The status of this campaign budget. This field is read-only. Corresponds to the JSON property status

Returns:

  • (String)


24995
24996
24997
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24995

def status
  @status
end

#total_amount_microsFixnum

The total amount to be spent by the campaign over its entire duration. This field is used only when the CampaignBudget period is set to CUSTOM_PERIOD . It represents the budget cap for the campaign's lifetime, rather than a daily limit. The amount is specified in micros in the account's local currency. One million micros is equivalent to one currency unit. This field is mutually exclusive with 'amount_micros'. Only one of 'total_amount_micros' or ' amount_micros' should be set. Corresponds to the JSON property totalAmountMicros

Returns:

  • (Fixnum)


25006
25007
25008
# File 'lib/google/apis/searchads360_v23/classes.rb', line 25006

def total_amount_micros
  @total_amount_micros
end

#typeString

Immutable. The type of the campaign budget. Corresponds to the JSON property type

Returns:

  • (String)


25011
25012
25013
# File 'lib/google/apis/searchads360_v23/classes.rb', line 25011

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
# File 'lib/google/apis/searchads360_v23/classes.rb', line 25018

def update!(**args)
  @aligned_bidding_strategy_id = args[:aligned_bidding_strategy_id] if args.key?(:aligned_bidding_strategy_id)
  @amount_micros = args[:amount_micros] if args.key?(:amount_micros)
  @delivery_method = args[:delivery_method] if args.key?(:delivery_method)
  @explicitly_shared = args[:explicitly_shared] if args.key?(:explicitly_shared)
  @has_recommended_budget = args[:has_recommended_budget] if args.key?(:has_recommended_budget)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @period = args[:period] if args.key?(:period)
  @recommended_budget_amount_micros = args[:recommended_budget_amount_micros] if args.key?(:recommended_budget_amount_micros)
  @recommended_budget_estimated_change_weekly_clicks = args[:recommended_budget_estimated_change_weekly_clicks] if args.key?(:recommended_budget_estimated_change_weekly_clicks)
  @recommended_budget_estimated_change_weekly_cost_micros = args[:recommended_budget_estimated_change_weekly_cost_micros] if args.key?(:recommended_budget_estimated_change_weekly_cost_micros)
  @recommended_budget_estimated_change_weekly_interactions = args[:recommended_budget_estimated_change_weekly_interactions] if args.key?(:recommended_budget_estimated_change_weekly_interactions)
  @recommended_budget_estimated_change_weekly_views = args[:recommended_budget_estimated_change_weekly_views] if args.key?(:recommended_budget_estimated_change_weekly_views)
  @reference_count = args[:reference_count] if args.key?(:reference_count)
  @resource_name = args[:resource_name] if args.key?(:resource_name)
  @status = args[:status] if args.key?(:status)
  @total_amount_micros = args[:total_amount_micros] if args.key?(:total_amount_micros)
  @type = args[:type] if args.key?(:type)
end