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.



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

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)


24824
24825
24826
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24824

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)


24835
24836
24837
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24835

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)


24841
24842
24843
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24841

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)


24854
24855
24856
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24854

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)


24861
24862
24863
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24861

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)


24870
24871
24872
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24870

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)


24879
24880
24881
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24879

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)


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

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)


24892
24893
24894
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24892

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)


24898
24899
24900
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24898

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)


24905
24906
24907
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24905

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)


24911
24912
24913
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24911

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)


24917
24918
24919
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24917

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)


24923
24924
24925
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24923

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)


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

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)


24935
24936
24937
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24935

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)


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

def total_amount_micros
  @total_amount_micros
end

#typeString

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

Returns:

  • (String)


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

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24958

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