Class: Stigg::Models::V1::CreditGetUsageResponse::Data::Series

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/credit_get_usage_response.rb,
sig/stigg/models/v1/credit_get_usage_response.rbs

Defined Under Namespace

Classes: Point, Tag

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(event_count:, timestamp:, value:) ⇒ Object

A single data point in the credit usage time series

Parameters:

  • event_count (Float)

    Number of distinct usage events that consumed credits in this time bucket

  • timestamp (Time)

    The timestamp of the data point

  • value (Float)

    The credit usage value at this point



# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 206

Instance Attribute Details

#event_countFloat

Number of distinct usage events that consumed credits in this series. This count is not additive across series, because an event matched by several meters appears in more than one series.

Parameters:

  • value (Float)

Returns:

  • (Float)


135
# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 135

required :event_count, Float, api_name: :eventCount

#feature_idString?

The feature ID; null when grouping by dimensions only

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


141
# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 141

required :feature_id, String, api_name: :featureId, nil?: true

#feature_nameString?

The display name of the feature; null when grouping by dimensions only

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


147
# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 147

required :feature_name, String, api_name: :featureName, nil?: true

#pointsArray<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Point>

Time-series data points for this feature



153
154
# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 153

required :points,
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Point] }

#tagsArray<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Tag>?

Dimension key/value pairs identifying this series when groupBy is applied



166
167
# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 166

optional :tags,
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Tag] }

#total_creditsFloat

Total credits consumed by this feature in the time range

Parameters:

  • value (Float)

Returns:

  • (Float)


160
# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 160

required :total_credits, Float, api_name: :totalCredits

Instance Method Details

#to_hash{

Returns:

  • ({)


129
# File 'sig/stigg/models/v1/credit_get_usage_response.rbs', line 129

def to_hash: -> {