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

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

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:, feature_id:, feature_name:, points:, total_credits:, tags: nil) ⇒ Object

Some parameter documentations has been truncated, see Stigg::Models::V1::CreditGetUsageResponse::Data::Series for more details.

Credit usage data for a single feature

Parameters:

  • event_count (Float)

    Number of distinct usage events that consumed credits in this series. This count

  • feature_id (String, nil)

    The feature ID; null when grouping by dimensions only

  • feature_name (String, nil)

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

  • points (Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Point>)

    Time-series data points for this feature

  • total_credits (Float)

    Total credits consumed by this feature in the time range

  • tags (Array<Stigg::Models::V1::CreditGetUsageResponse::Data::Series::Tag>) (defaults to: nil)

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



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/stigg/models/v1/credit_get_usage_response.rb', line 187

class Point < Stigg::Internal::Type::BaseModel
  # @!attribute event_count
  #   Number of distinct usage events that consumed credits in this time bucket
  #
  #   @return [Float]
  required :event_count, Float, api_name: :eventCount

  # @!attribute timestamp
  #   The timestamp of the data point
  #
  #   @return [Time]
  required :timestamp, Time

  # @!attribute value
  #   The credit usage value at this point
  #
  #   @return [Float]
  required :value, Float

  # @!method initialize(event_count:, timestamp:, value:)
  #   A single data point in the credit usage time series
  #
  #   @param event_count [Float] Number of distinct usage events that consumed credits in this time bucket
  #
  #   @param timestamp [Time] The timestamp of the data point
  #
  #   @param value [Float] The credit usage value at this point
end

Instance Attribute Details

#event_countFloat

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

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :event_count, Float, api_name: :eventCount

#timestampTime

The timestamp of the data point

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :timestamp, Time

#valueFloat

The credit usage value at this point

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :value, Float

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {