Class: Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::Rule

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openlayer/models/governance/frameworks/document_retrieve_response.rb,
sig/openlayer/models/governance/frameworks/document_retrieve_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::DocumentRetrieveResponse::Section::Subsection::Rule for more details.

Parameters:



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 387

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::DocumentRetrieveResponse::Section::Subsection::Rule::Scope]
  required :scope,
           enum: -> { Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::Rule::Type]
  required :type,
           enum: -> { Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::Rule::EvidenceType, nil]
  optional :evidence_type,
           enum: -> { Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::Rule}
  #   for more details.
  #
  #   @param id [String] The rule id.
  #
  #   @param name [String] The rule name.
  #
  #   @param scope [Symbol, Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::Rule::Scope] Whether the rule is evaluated once for the whole workspace, or once per project
  #
  #   @param type [Symbol, Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::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)


414
415
416
417
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 414

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)


425
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 425

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

#date_created ⇒ Time? (readonly)

Returns the value of attribute date_created.

Returns:

  • (Time, nil)


333
334
335
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 333

def date_created
  @date_created
end

#date_updated ⇒ Time? (readonly)

Returns the value of attribute date_updated.

Returns:

  • (Time, nil)


337
338
339
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 337

def date_updated
  @date_updated
end

#deactivated ⇒ Boolean?

Whether the rule is excluded from compliance calculations.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


431
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 431

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

#description ⇒ String?

What the rule requires.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


437
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 437

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::DocumentRetrieveResponse::Section::Subsection::Rule::evidence_type, nil)

Returns:



443
444
445
446
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 443

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

#id ⇒ String

Returns the value of attribute id.

Returns:

  • (String)


331
332
333
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 331

def id
  @id
end

#immutable ⇒ Boolean? (readonly)

Returns the value of attribute immutable.

Returns:

  • (Boolean, nil)


341
342
343
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 341

def immutable
  @immutable
end

#name ⇒ String

The rule name.

Parameters:

  • value (String)

Returns:

  • (String)


392
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 392

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)


453
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 453

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

#scope ⇒ Symbol, Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::Rule::scope)

Returns:



399
400
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 399

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

#type ⇒ Symbol, Openlayer::Models::Governance::Frameworks::DocumentRetrieveResponse::Section::Subsection::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::DocumentRetrieveResponse::Section::Subsection::Rule::type_)

Returns:



407
408
# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 407

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

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openlayer/models/governance/frameworks/document_retrieve_response.rb', line 522

Instance Method Details

#date_created= ⇒ Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


335
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 335

def date_created=: (Time) -> Time

#date_updated= ⇒ Time (readonly)

Parameters:

  • (Time)

Returns:

  • (Time)


339
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 339

def date_updated=: (Time) -> Time

#immutable= ⇒ Boolean (readonly)

Parameters:

  • (Boolean)

Returns:

  • (Boolean)


343
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 343

def immutable=: (bool) -> bool

#to_hash ⇒ {

Returns:

  • ({)


361
# File 'sig/openlayer/models/governance/frameworks/document_retrieve_response.rbs', line 361

def to_hash: -> {