Class: Google::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1Filter

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

Overview

A filter for a budget, limiting the scope of the cost to calculate.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudBillingBudgetsV1beta1Filter

Returns a new instance of GoogleCloudBillingBudgetsV1beta1Filter.



308
309
310
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 308

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

Instance Attribute Details

#calendar_periodString

Optional. Specifies to track usage for recurring calendar period. For example, assume that CalendarPeriod.QUARTER is set. The budget will track usage from April 1 to June 30, when the current calendar month is April, May, June. After that, it will track usage from July 1 to September 30 when the current calendar month is July, August, September, so on. Corresponds to the JSON property calendarPeriod

Returns:

  • (String)


251
252
253
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 251

def calendar_period
  @calendar_period
end

#credit_typesArray<String>

Optional. If Filter.credit_types_treatment is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be subtracted from gross cost to determine the spend for threshold calculations. See a list of acceptable credit type values. If Filter.credit_types_treatment is not INCLUDE_SPECIFIED_CREDITS, this field must be empty. Corresponds to the JSON property creditTypes

Returns:

  • (Array<String>)


261
262
263
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 261

def credit_types
  @credit_types
end

#credit_types_treatmentString

Optional. If not set, default behavior is INCLUDE_ALL_CREDITS. Corresponds to the JSON property creditTypesTreatment

Returns:

  • (String)


266
267
268
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 266

def credit_types_treatment
  @credit_types_treatment
end

#custom_periodGoogle::Apis::BillingbudgetsV1beta1::GoogleCloudBillingBudgetsV1beta1CustomPeriod

All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). Corresponds to the JSON property customPeriod



271
272
273
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 271

def custom_period
  @custom_period
end

#labelsHash<String,Array<Object>>

Optional. A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. Currently, multiple entries or multiple values per entry are not allowed. If omitted, the report will include all labeled and unlabeled usage. Corresponds to the JSON property labels

Returns:

  • (Hash<String,Array<Object>>)


279
280
281
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 279

def labels
  @labels
end

#projectsArray<String>

Optional. A set of projects of the form projects/project`, specifying that usage from only this set of projects should be included in the budget. If omitted, the report will include all usage for the billing account, regardless of which project the usage occurred on. Only zero or one project can be specified currently. Corresponds to the JSON propertyprojects`

Returns:

  • (Array<String>)


288
289
290
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 288

def projects
  @projects
end

#servicesArray<String>

Optional. A set of services of the form services/service_id`, specifying that usage from only this set of services should be included in the budget. If omitted, the report will include usage for all the services. The service names are available through the Catalog API: https://cloud.google.com/billing/v1/how- tos/catalog-api. Corresponds to the JSON propertyservices`

Returns:

  • (Array<String>)


297
298
299
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 297

def services
  @services
end

#subaccountsArray<String>

Optional. A set of subaccounts of the form billingAccounts/account_id`, specifying that usage from only this set of subaccounts should be included in the budget. If a subaccount is set to the name of the parent account, usage from the parent account will be included. If omitted, the report will include usage from the parent account and all subaccounts, if they exist. Corresponds to the JSON propertysubaccounts`

Returns:

  • (Array<String>)


306
307
308
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 306

def subaccounts
  @subaccounts
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



313
314
315
316
317
318
319
320
321
322
# File 'lib/google/apis/billingbudgets_v1beta1/classes.rb', line 313

def update!(**args)
  @calendar_period = args[:calendar_period] if args.key?(:calendar_period)
  @credit_types = args[:credit_types] if args.key?(:credit_types)
  @credit_types_treatment = args[:credit_types_treatment] if args.key?(:credit_types_treatment)
  @custom_period = args[:custom_period] if args.key?(:custom_period)
  @labels = args[:labels] if args.key?(:labels)
  @projects = args[:projects] if args.key?(:projects)
  @services = args[:services] if args.key?(:services)
  @subaccounts = args[:subaccounts] if args.key?(:subaccounts)
end