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.



24866
24867
24868
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24866

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)


24737
24738
24739
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24737

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)


24748
24749
24750
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24748

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)


24754
24755
24756
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24754

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)


24767
24768
24769
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24767

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)


24774
24775
24776
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24774

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)


24783
24784
24785
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24783

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)


24792
24793
24794
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24792

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)


24798
24799
24800
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24798

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)


24805
24806
24807
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24805

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)


24811
24812
24813
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24811

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)


24818
24819
24820
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24818

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)


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

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)


24830
24831
24832
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24830

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)


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

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)


24843
24844
24845
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24843

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)


24848
24849
24850
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24848

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)


24859
24860
24861
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24859

def total_amount_micros
  @total_amount_micros
end

#typeString

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

Returns:

  • (String)


24864
24865
24866
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24864

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
# File 'lib/google/apis/searchads360_v23/classes.rb', line 24871

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