Class: Stigg::Models::V1::UsageReportParams::Usage
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Stigg::Models::V1::UsageReportParams::Usage
- Defined in:
- lib/stigg/models/v1/usage_report_params.rb
Defined Under Namespace
Modules: Dimension, UpdateBehavior
Instance Attribute Summary collapse
-
#created_at ⇒ Time?
Timestamp of when the record was created.
-
#customer_id ⇒ String
Customer id.
-
#dimensions ⇒ Hash{Symbol=>String, Float, Boolean}?
Additional dimensions for the usage report.
-
#feature_id ⇒ String
Feature id.
-
#resource_id ⇒ String?
Resource id.
-
#update_behavior ⇒ Symbol, ...
The method by which the usage value should be updated.
-
#value ⇒ Integer
The value to report for usage.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(usages:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Object constructor
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(usages:, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 36 class Usage < Stigg::Internal::Type::BaseModel # @!attribute customer_id # Customer id # # @return [String] required :customer_id, String, api_name: :customerId # @!attribute feature_id # Feature id # # @return [String] required :feature_id, String, api_name: :featureId # @!attribute value # The value to report for usage # # @return [Integer] required :value, Integer # @!attribute created_at # Timestamp of when the record was created # # @return [Time, nil] optional :created_at, Time, api_name: :createdAt # @!attribute dimensions # Additional dimensions for the usage report # # @return [Hash{Symbol=>String, Float, Boolean}, nil] optional :dimensions, -> { Stigg::Internal::Type::HashOf[union: Stigg::V1::UsageReportParams::Usage::Dimension] } # @!attribute resource_id # Resource id # # @return [String, nil] optional :resource_id, String, api_name: :resourceId, nil?: true # @!attribute update_behavior # The method by which the usage value should be updated # # @return [Symbol, Stigg::Models::V1::UsageReportParams::Usage::UpdateBehavior, nil] optional :update_behavior, enum: -> { Stigg::V1::UsageReportParams::Usage::UpdateBehavior }, api_name: :updateBehavior # @!method initialize(customer_id:, feature_id:, value:, created_at: nil, dimensions: nil, resource_id: nil, update_behavior: nil) # Single usage measurement # # @param customer_id [String] Customer id # # @param feature_id [String] Feature id # # @param value [Integer] The value to report for usage # # @param created_at [Time] Timestamp of when the record was created # # @param dimensions [Hash{Symbol=>String, Float, Boolean}] Additional dimensions for the usage report # # @param resource_id [String, nil] Resource id # # @param update_behavior [Symbol, Stigg::Models::V1::UsageReportParams::Usage::UpdateBehavior] The method by which the usage value should be updated module Dimension extend Stigg::Internal::Type::Union variant String variant Float variant Stigg::Internal::Type::Boolean # @!method self.variants # @return [Array(String, Float, Boolean)] end # The method by which the usage value should be updated # # @see Stigg::Models::V1::UsageReportParams::Usage#update_behavior module UpdateBehavior extend Stigg::Internal::Type::Enum DELTA = :DELTA SET = :SET # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#created_at ⇒ Time?
Timestamp of when the record was created
59 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 59 optional :created_at, Time, api_name: :createdAt |
#customer_id ⇒ String
Customer id
41 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 41 required :customer_id, String, api_name: :customerId |
#dimensions ⇒ Hash{Symbol=>String, Float, Boolean}?
Additional dimensions for the usage report
65 66 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 65 optional :dimensions, -> { Stigg::Internal::Type::HashOf[union: Stigg::V1::UsageReportParams::Usage::Dimension] } |
#feature_id ⇒ String
Feature id
47 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 47 required :feature_id, String, api_name: :featureId |
#resource_id ⇒ String?
Resource id
72 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 72 optional :resource_id, String, api_name: :resourceId, nil?: true |
#update_behavior ⇒ Symbol, ...
The method by which the usage value should be updated
78 79 80 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 78 optional :update_behavior, enum: -> { Stigg::V1::UsageReportParams::Usage::UpdateBehavior }, api_name: :updateBehavior |
#value ⇒ Integer
The value to report for usage
53 |
# File 'lib/stigg/models/v1/usage_report_params.rb', line 53 required :value, Integer |
Class Method Details
.variants ⇒ Array(String, Float, Boolean)
|
|
# File 'lib/stigg/models/v1/usage_report_params.rb', line 108
|