Class: Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openlayer/models/governance/frameworks/document_list_response.rb,
sig/openlayer/models/governance/frameworks/document_list_response.rbs

Defined Under Namespace

Modules: EvidenceType, Scope, Type

Instance Attribute Summary collapse

Class Method 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(id:, name:, scope:, type:, automation_params: nil, automation_type: nil, date_created: nil, date_updated: nil, deactivated: nil, description: nil, evidence_type: nil, immutable: nil, renewal_cadence_days: nil) ⇒ Object

Some parameter documentations has been truncated, see Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule for more details.

Parameters:

  • id (String) —

    The rule id.

  • name (String) —

    The rule name.

  • scope (Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Scope) —

    Whether the rule is evaluated once for the whole workspace, or once per project

  • type (Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Type) —

    platform rules are evaluated automatically from the state of your Openlayer wo

  • automation_params (Hash{Symbol=>Object}, nil) (defaults to: nil) —

    Configuration for the platform check, when the automation takes parameters.

  • automation_type (String, nil) (defaults to: nil) —

    Which workspace signal a platform rule checks, for example `monitoring_mode_enab

  • date_created (Time) (defaults to: nil) —

    The creation date.

  • date_updated (Time) (defaults to: nil) —

    The last update date.

  • deactivated (Boolean) (defaults to: nil) —

    Whether the rule is excluded from compliance calculations.

  • description (String, nil) (defaults to: nil) —

    What the rule requires.

  • evidence_type (Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::EvidenceType, nil) (defaults to: nil) —

    The kind of evidence that satisfies the rule. null for platform rules.

  • immutable (Boolean) (defaults to: nil) —

    Whether the rule is managed by Openlayer and cannot be edited.

  • renewal_cadence_days (Integer, nil) (defaults to: nil) —

    How often evidence must be renewed, in days. Once evidence is older than this, t



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 159

class Rule < Openlayer::Internal::Type::BaseModel
  # @!attribute name
  #   The rule name.
  #
  #   @return [String]
  required :name, String

  # @!attribute scope
  #   Whether the rule is evaluated once for the whole workspace, or once per project
  #   the rule's frameworks apply to.
  #
  #   @return [Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Scope]
  required :scope,
           enum: -> { Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Scope }

  # @!attribute type
  #   `platform` rules are evaluated automatically from the state of your Openlayer
  #   workspace. `evidence` rules are satisfied by attaching evidence.
  #
  #   @return [Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Type]
  required :type,
           enum: -> { Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Type }

  # @!attribute automation_params
  #   Configuration for the platform check, when the automation takes parameters.
  #
  #   @return [Hash{Symbol=>Object}, nil]
  optional :automation_params,
           Openlayer::Internal::Type::HashOf[Openlayer::Internal::Type::Unknown],
           api_name: :automationParams,
           nil?: true

  # @!attribute automation_type
  #   Which workspace signal a platform rule checks, for example
  #   `monitoring_mode_enabled`, `test_setup`, or `project_owner_set`. `null` for
  #   evidence rules.
  #
  #   @return [String, nil]
  optional :automation_type, String, api_name: :automationType, nil?: true

  # @!attribute deactivated
  #   Whether the rule is excluded from compliance calculations.
  #
  #   @return [Boolean, nil]
  optional :deactivated, Openlayer::Internal::Type::Boolean

  # @!attribute description
  #   What the rule requires.
  #
  #   @return [String, nil]
  optional :description, String, nil?: true

  # @!attribute evidence_type
  #   The kind of evidence that satisfies the rule. `null` for platform rules.
  #
  #   @return [Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::EvidenceType, nil]
  optional :evidence_type,
           enum: -> { Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::EvidenceType },
           api_name: :evidenceType,
           nil?: true

  # @!attribute renewal_cadence_days
  #   How often evidence must be renewed, in days. Once evidence is older than this,
  #   the rule result becomes `due_soon` and then `failing`.
  #
  #   @return [Integer, nil]
  optional :renewal_cadence_days, Integer, api_name: :renewalCadenceDays, nil?: true

  response_only do
    # @!attribute id
    #   The rule id.
    #
    #   @return [String]
    required :id, String

    # @!attribute date_created
    #   The creation date.
    #
    #   @return [Time, nil]
    optional :date_created, Time, api_name: :dateCreated

    # @!attribute date_updated
    #   The last update date.
    #
    #   @return [Time, nil]
    optional :date_updated, Time, api_name: :dateUpdated

    # @!attribute immutable
    #   Whether the rule is managed by Openlayer and cannot be edited.
    #
    #   @return [Boolean, nil]
    optional :immutable, Openlayer::Internal::Type::Boolean
  end

  # @!method initialize(id:, name:, scope:, type:, automation_params: nil, automation_type: nil, date_created: nil, date_updated: nil, deactivated: nil, description: nil, evidence_type: nil, immutable: nil, renewal_cadence_days: nil)
  #   Some parameter documentations has been truncated, see
  #   {Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule}
  #   for more details.
  #
  #   @param id [String] The rule id.
  #
  #   @param name [String] The rule name.
  #
  #   @param scope [Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Scope] Whether the rule is evaluated once for the whole workspace, or once per project
  #
  #   @param type [Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Type] `platform` rules are evaluated automatically from the state of your Openlayer wo
  #
  #   @param automation_params [Hash{Symbol=>Object}, nil] Configuration for the platform check, when the automation takes parameters.
  #
  #   @param automation_type [String, nil] Which workspace signal a platform rule checks, for example `monitoring_mode_enab
  #
  #   @param date_created [Time] The creation date.
  #
  #   @param date_updated [Time] The last update date.
  #
  #   @param deactivated [Boolean] Whether the rule is excluded from compliance calculations.
  #
  #   @param description [String, nil] What the rule requires.
  #
  #   @param evidence_type [Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::EvidenceType, nil] The kind of evidence that satisfies the rule. `null` for platform rules.
  #
  #   @param immutable [Boolean] Whether the rule is managed by Openlayer and cannot be edited.
  #
  #   @param renewal_cadence_days [Integer, nil] How often evidence must be renewed, in days. Once evidence is older than this, t

  # Whether the rule is evaluated once for the whole workspace, or once per project
  # the rule's frameworks apply to.
  #
  # @see Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule#scope
  module Scope
    extend Openlayer::Internal::Type::Enum

    PROJECT = :project
    WORKSPACE = :workspace

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # `platform` rules are evaluated automatically from the state of your Openlayer
  # workspace. `evidence` rules are satisfied by attaching evidence.
  #
  # @see Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule#type
  module Type
    extend Openlayer::Internal::Type::Enum

    PLATFORM = :platform
    EVIDENCE = :evidence

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The kind of evidence that satisfies the rule. `null` for platform rules.
  #
  # @see Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule#evidence_type
  module EvidenceType
    extend Openlayer::Internal::Type::Enum

    DOCUMENT = :document
    TEXT = :text
    URL = :url
    CATEGORY_VALUE = :categoryValue

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#automation_params ⇒ Hash{Symbol=>Object}?

Configuration for the platform check, when the automation takes parameters.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:

  • (Hash{Symbol=>Object}, nil)


186
187
188
189
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 186

optional :automation_params,
Openlayer::Internal::Type::HashOf[Openlayer::Internal::Type::Unknown],
api_name: :automationParams,
nil?: true

#automation_type ⇒ String?

Which workspace signal a platform rule checks, for example monitoring_mode_enabled, test_setup, or project_owner_set. null for evidence rules.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


197
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 197

optional :automation_type, String, api_name: :automationType, nil?: true

#date_created ⇒ Time? (readonly)

Returns the value of attribute date_created.

Returns:

  • (Time, nil)


172
173
174
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 172

def date_created
  @date_created
end

#date_updated ⇒ Time? (readonly)

Returns the value of attribute date_updated.

Returns:

  • (Time, nil)


176
177
178
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 176

def date_updated
  @date_updated
end

#deactivated ⇒ Boolean?

Whether the rule is excluded from compliance calculations.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


203
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 203

optional :deactivated, Openlayer::Internal::Type::Boolean

#description ⇒ String?

What the rule requires.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


209
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 209

optional :description, String, nil?: true

#evidence_type ⇒ Symbol, ...

The kind of evidence that satisfies the rule. null for platform rules.

Parameters:

  • value (Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::evidence_type, nil)

Returns:



215
216
217
218
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 215

optional :evidence_type,
enum: -> { Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::EvidenceType },
api_name: :evidenceType,
nil?: true

#id ⇒ String

Returns the value of attribute id.

Returns:

  • (String)


170
171
172
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 170

def id
  @id
end

#immutable ⇒ Boolean? (readonly)

Returns the value of attribute immutable.

Returns:

  • (Boolean, nil)


180
181
182
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 180

def immutable
  @immutable
end

#name ⇒ String

The rule name.

Parameters:

  • value (String)

Returns:

  • (String)


164
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 164

required :name, String

#renewal_cadence_days ⇒ Integer?

How often evidence must be renewed, in days. Once evidence is older than this, the rule result becomes due_soon and then failing.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


225
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 225

optional :renewal_cadence_days, Integer, api_name: :renewalCadenceDays, nil?: true

#scope ⇒ Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Scope

Whether the rule is evaluated once for the whole workspace, or once per project the rule's frameworks apply to.

Parameters:

  • value (Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::scope)

Returns:



171
172
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 171

required :scope,
enum: -> { Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Scope }

#type ⇒ Symbol, Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Type

platform rules are evaluated automatically from the state of your Openlayer workspace. evidence rules are satisfied by attaching evidence.

Parameters:

  • value (Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::type_)

Returns:



179
180
# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 179

required :type,
enum: -> { Openlayer::Models::Governance::Frameworks::DocumentListResponse::Item::Section::Rule::Type }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openlayer/models/governance/frameworks/document_list_response.rb', line 294

Instance Method Details

#date_created= ⇒ Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


174
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 174

def date_created=: (Time) -> Time

#date_updated= ⇒ Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


178
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 178

def date_updated=: (Time) -> Time

#immutable= ⇒ Boolean (readonly)

Parameters:

  • (Boolean)

Returns:

  • (Boolean)


182
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 182

def immutable=: (bool) -> bool

#to_hash ⇒ {

Returns:

  • ({)


200
# File 'sig/openlayer/models/governance/frameworks/document_list_response.rbs', line 200

def to_hash: -> {