Class: Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceResponse::Data
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceResponse::Data
- Defined in:
- lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb,
sig/stigg/models/v1/events/beta/customer_retrieve_governance_response.rbs
Instance Attribute Summary collapse
-
#cadence ⇒ String?
Usage-reset cadence as an ISO-8601 single-unit duration, e.g.
-
#currency_id ⇒ String?
The metered currency ID (present when the configured capability is a credit currency).
-
#current_usage ⇒ Float?
Usage consumed in the current cadence period (may lag the live counter by a short interval).
-
#display_name ⇒ String?
Human-readable name of the entity, or null when none is set (display the entity id instead).
-
#entity_id ⇒ String
External id of the entity at this node.
-
#entity_type_id ⇒ String
External id of the entity type (e.g.
team,user). -
#feature_id ⇒ String?
The metered feature ID (present when the configured capability is a feature).
-
#parent_id ⇒ String?
External id of the parent entity in the tree.
-
#scope_entity_ids ⇒ Array<String>
The configuration scope (entity ids).
-
#usage_limit ⇒ Float?
Hard usage limit for this node per cadence period.
-
#usage_period_end ⇒ Time?
Exclusive end of the cadence period in progress now — when usage resets.
-
#usage_period_start ⇒ Time?
Start of the cadence period in progress now, derived from the cadence and the assignment anchor — it stays correct across a rollover.
-
#utilization ⇒ Float?
currentUsage / usageLimit(1 when usageLimit is 0 — always at limit).
Instance Method Summary collapse
-
#initialize(data:, pagination:) ⇒ Object
constructor
Paginated list of governance tree nodes, each with its usage configuration and current usage.
- #to_hash ⇒ {
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(data:, pagination:) ⇒ Object
Paginated list of governance tree nodes, each with its usage configuration and current usage.
29 30 31 32 33 34 35 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 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 29 class Data < Stigg::Internal::Type::BaseModel # @!attribute cadence # Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`, # `PT1M`; `null` when the node has no usage configuration. # # @return [String, nil] required :cadence, String, nil?: true # @!attribute current_usage # Usage consumed in the current cadence period (may lag the live counter by a # short interval). # # @return [Float, nil] required :current_usage, Float, api_name: :currentUsage, nil?: true # @!attribute display_name # Human-readable name of the entity, or null when none is set (display the entity # id instead). # # @return [String, nil] required :display_name, String, api_name: :displayName, nil?: true # @!attribute entity_id # External id of the entity at this node. # # @return [String] required :entity_id, String, api_name: :entityId # @!attribute entity_type_id # External id of the entity type (e.g. `team`, `user`). # # @return [String] required :entity_type_id, String, api_name: :entityTypeId # @!attribute parent_id # External id of the parent entity in the tree. `null` means the entity is either # a root or not yet placed in the hierarchy — placement rides on an assignment, so # an entity with no limits set has no parent yet. Both render at the top level; # use it to rebuild the tree. # # @return [String, nil] required :parent_id, String, api_name: :parentId, nil?: true # @!attribute scope_entity_ids # The configuration scope (entity ids). Empty is the node-wide configuration; a # non-empty set is a dimension-scoped sub-configuration. # # @return [Array<String>] required :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds # @!attribute usage_limit # Hard usage limit for this node per cadence period. # # @return [Float, nil] required :usage_limit, Float, api_name: :usageLimit, nil?: true # @!attribute usage_period_end # Exclusive end of the cadence period in progress now — when usage resets. `null` # when the node has no usage configuration, or when a stored cadence cannot be # parsed. # # @return [Time, nil] required :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true # @!attribute usage_period_start # Start of the cadence period in progress now, derived from the cadence and the # assignment anchor — it stays correct across a rollover. `null` when the node has # no usage configuration, or when a stored cadence cannot be parsed. # # @return [Time, nil] required :usage_period_start, Time, api_name: :usagePeriodStart, nil?: true # @!attribute utilization # `currentUsage / usageLimit` (1 when usageLimit is 0 — always at limit). The # cross-capability-safe sort key. # # @return [Float, nil] required :utilization, Float, nil?: true # @!attribute currency_id # The metered currency ID (present when the configured capability is a credit # currency). # # @return [String, nil] optional :currency_id, String, api_name: :currencyId # @!attribute feature_id # The metered feature ID (present when the configured capability is a feature). # # @return [String, nil] optional :feature_id, String, api_name: :featureId # @!method initialize(cadence:, current_usage:, display_name:, entity_id:, entity_type_id:, parent_id:, scope_entity_ids:, usage_limit:, usage_period_end:, usage_period_start:, utilization:, currency_id: nil, feature_id: nil) # Some parameter documentations has been truncated, see # {Stigg::Models::V1::Events::Beta::CustomerRetrieveGovernanceResponse::Data} for # more details. # # A node of the governance hierarchy tree with its usage configuration (limit, # cadence, scope) and current usage. Usage is read from a periodically-refreshed # read model and may lag the live counter by a short interval; it never gates # access. # # @param cadence [String, nil] Usage-reset cadence as an ISO-8601 single-unit duration, e.g. `P1M`, `P30D`, `PT # # @param current_usage [Float, nil] Usage consumed in the current cadence period (may lag the live counter by a shor # # @param display_name [String, nil] Human-readable name of the entity, or null when none is set (display the entity # # @param entity_id [String] External id of the entity at this node. # # @param entity_type_id [String] External id of the entity type (e.g. `team`, `user`). # # @param parent_id [String, nil] External id of the parent entity in the tree. `null` means the entity is either # # @param scope_entity_ids [Array<String>] The configuration scope (entity ids). Empty is the node-wide configuration; a no # # @param usage_limit [Float, nil] Hard usage limit for this node per cadence period. # # @param usage_period_end [Time, nil] Exclusive end of the cadence period in progress now — when usage resets. `null` # # @param usage_period_start [Time, nil] Start of the cadence period in progress now, derived from the cadence and the as # # @param utilization [Float, nil] `currentUsage / usageLimit` (1 when usageLimit is 0 — always at limit). The cros # # @param currency_id [String] The metered currency ID (present when the configured capability is a credit curr # # @param feature_id [String] The metered feature ID (present when the configured capability is a feature). end |
Instance Attribute Details
#cadence ⇒ String?
Usage-reset cadence as an ISO-8601 single-unit duration, e.g. P1M, P30D,
PT1M; null when the node has no usage configuration.
35 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 35 required :cadence, String, nil?: true |
#currency_id ⇒ String?
The metered currency ID (present when the configured capability is a credit currency).
113 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 113 optional :currency_id, String, api_name: :currencyId |
#current_usage ⇒ Float?
Usage consumed in the current cadence period (may lag the live counter by a short interval).
42 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 42 required :current_usage, Float, api_name: :currentUsage, nil?: true |
#display_name ⇒ String?
Human-readable name of the entity, or null when none is set (display the entity id instead).
49 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 49 required :display_name, String, api_name: :displayName, nil?: true |
#entity_id ⇒ String
External id of the entity at this node.
55 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 55 required :entity_id, String, api_name: :entityId |
#entity_type_id ⇒ String
External id of the entity type (e.g. team, user).
61 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 61 required :entity_type_id, String, api_name: :entityTypeId |
#feature_id ⇒ String?
The metered feature ID (present when the configured capability is a feature).
119 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 119 optional :feature_id, String, api_name: :featureId |
#parent_id ⇒ String?
External id of the parent entity in the tree. null means the entity is either
a root or not yet placed in the hierarchy — placement rides on an assignment, so
an entity with no limits set has no parent yet. Both render at the top level;
use it to rebuild the tree.
70 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 70 required :parent_id, String, api_name: :parentId, nil?: true |
#scope_entity_ids ⇒ Array<String>
The configuration scope (entity ids). Empty is the node-wide configuration; a non-empty set is a dimension-scoped sub-configuration.
77 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 77 required :scope_entity_ids, Stigg::Internal::Type::ArrayOf[String], api_name: :scopeEntityIds |
#usage_limit ⇒ Float?
Hard usage limit for this node per cadence period.
83 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 83 required :usage_limit, Float, api_name: :usageLimit, nil?: true |
#usage_period_end ⇒ Time?
Exclusive end of the cadence period in progress now — when usage resets. null
when the node has no usage configuration, or when a stored cadence cannot be
parsed.
91 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 91 required :usage_period_end, Time, api_name: :usagePeriodEnd, nil?: true |
#usage_period_start ⇒ Time?
Start of the cadence period in progress now, derived from the cadence and the
assignment anchor — it stays correct across a rollover. null when the node has
no usage configuration, or when a stored cadence cannot be parsed.
99 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 99 required :usage_period_start, Time, api_name: :usagePeriodStart, nil?: true |
#utilization ⇒ Float?
currentUsage / usageLimit (1 when usageLimit is 0 — always at limit). The
cross-capability-safe sort key.
106 |
# File 'lib/stigg/models/v1/events/beta/customer_retrieve_governance_response.rb', line 106 required :utilization, Float, nil?: true |
Instance Method Details
#to_hash ⇒ {
91 |
# File 'sig/stigg/models/v1/events/beta/customer_retrieve_governance_response.rbs', line 91
def to_hash: -> {
|