Class: Openlayer::Models::Governance::RuleListResponse::Item

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

Defined Under Namespace

Modules: EvidenceType, Scope, Type Classes: Framework, Result, ResultsSummary, Tag

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(passing: nil, total: nil) ⇒ Object

Pass-rate counts across all of the rule's entities, independent of any status filter applied to the request.

Parameters:

  • (defaults to: nil)
  • (defaults to: nil)


17
18
19
20
21
22
23
24
25
26
27
28
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
157
158
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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
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
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 17

class Item < 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::RuleListResponse::Item::Scope]
  required :scope, enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::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::RuleListResponse::Item::Type]
  required :type, enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::Type }

  # @!attribute assignee_id
  #   The user responsible for satisfying the rule.
  #
  #   @return [String, nil]
  optional :assignee_id, String, api_name: :assigneeId, nil?: true

  # @!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::RuleListResponse::Item::EvidenceType, nil]
  optional :evidence_type,
           enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::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]
    required :date_created, Time, api_name: :dateCreated

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

    # @!attribute workspace_id
    #   The id of the workspace the rule belongs to.
    #
    #   @return [String]
    required :workspace_id, String, api_name: :workspaceId

    # @!attribute frameworks
    #   The frameworks that include this rule.
    #
    #   @return [Array<Openlayer::Models::Governance::RuleListResponse::Item::Framework>, nil]
    optional :frameworks,
             -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::Governance::RuleListResponse::Item::Framework] }

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

    # @!attribute results
    #   The rule's results, one per entity the rule is evaluated against. Only returned
    #   when `includeResults` is `true`.
    #
    #   @return [Array<Openlayer::Models::Governance::RuleListResponse::Item::Result>, nil]
    optional :results,
             -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::Governance::RuleListResponse::Item::Result] }

    # @!attribute results_summary
    #   Pass-rate counts across all of the rule's entities, independent of any status
    #   filter applied to the request.
    #
    #   @return [Openlayer::Models::Governance::RuleListResponse::Item::ResultsSummary, nil]
    optional :results_summary,
             -> { Openlayer::Models::Governance::RuleListResponse::Item::ResultsSummary },
             api_name: :resultsSummary,
             nil?: true

    # @!attribute tags
    #   The rule tags associated with the rule.
    #
    #   @return [Array<Openlayer::Models::Governance::RuleListResponse::Item::Tag>, nil]
    optional :tags,
             -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::Governance::RuleListResponse::Item::Tag] },
             nil?: true
  end

  # @!method initialize(id:, date_created:, date_updated:, name:, scope:, type:, workspace_id:, assignee_id: nil, automation_params: nil, automation_type: nil, deactivated: nil, description: nil, evidence_type: nil, frameworks: nil, immutable: nil, renewal_cadence_days: nil, results: nil, results_summary: nil, tags: nil)
  #   Some parameter documentations has been truncated, see
  #   {Openlayer::Models::Governance::RuleListResponse::Item} for more details.
  #
  #   @param id [String] The rule id.
  #
  #   @param date_created [Time] The creation date.
  #
  #   @param date_updated [Time] The last update date.
  #
  #   @param name [String] The rule name.
  #
  #   @param scope [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Scope] Whether the rule is evaluated once for the whole workspace, or once per project
  #
  #   @param type [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Type] `platform` rules are evaluated automatically from the state of your Openlayer wo
  #
  #   @param workspace_id [String] The id of the workspace the rule belongs to.
  #
  #   @param assignee_id [String, nil] The user responsible for satisfying the rule.
  #
  #   @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 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::RuleListResponse::Item::EvidenceType, nil] The kind of evidence that satisfies the rule. `null` for platform rules.
  #
  #   @param frameworks [Array<Openlayer::Models::Governance::RuleListResponse::Item::Framework>] The frameworks that include this rule.
  #
  #   @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
  #
  #   @param results [Array<Openlayer::Models::Governance::RuleListResponse::Item::Result>] The rule's results, one per entity the rule is evaluated against. Only returned
  #
  #   @param results_summary [Openlayer::Models::Governance::RuleListResponse::Item::ResultsSummary, nil] Pass-rate counts across all of the rule's entities, independent of any status fi
  #
  #   @param tags [Array<Openlayer::Models::Governance::RuleListResponse::Item::Tag>, nil] The rule tags associated with the rule.

  # Whether the rule is evaluated once for the whole workspace, or once per project
  # the rule's frameworks apply to.
  #
  # @see Openlayer::Models::Governance::RuleListResponse::Item#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::RuleListResponse::Item#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::RuleListResponse::Item#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

  class Framework < Openlayer::Internal::Type::BaseModel
    # @!attribute avatar
    #   The icon shown for the framework.
    #
    #   @return [Openlayer::Models::Governance::RuleListResponse::Item::Framework::Avatar, nil]
    required :avatar,
             -> { Openlayer::Models::Governance::RuleListResponse::Item::Framework::Avatar },
             nil?: true

    # @!attribute built_in_slug
    #   Identifies a framework that ships with Openlayer, for example `eu_ai_act`,
    #   `iso_42001`, `nist_ai_rmf`, or `traiga`. `null` for frameworks you create
    #   yourself.
    #
    #   @return [String, nil]
    required :built_in_slug, String, api_name: :builtInSlug, nil?: true

    # @!attribute enabled
    #   Whether the framework is active. Rules of a disabled framework are not evaluated
    #   and do not count towards compliance.
    #
    #   @return [Boolean]
    required :enabled, Openlayer::Internal::Type::Boolean

    # @!attribute name
    #   The framework name.
    #
    #   @return [String]
    required :name, String

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

    # @!method initialize(id:, avatar:, built_in_slug:, enabled:, name:)
    #   Some parameter documentations has been truncated, see
    #   {Openlayer::Models::Governance::RuleListResponse::Item::Framework} for more
    #   details.
    #
    #   @param id [String] The framework id.
    #
    #   @param avatar [Openlayer::Models::Governance::RuleListResponse::Item::Framework::Avatar, nil] The icon shown for the framework.
    #
    #   @param built_in_slug [String, nil] Identifies a framework that ships with Openlayer, for example `eu_ai_act`,
    #   `iso\_
    #
    #   @param enabled [Boolean] Whether the framework is active. Rules of a disabled framework are not evaluated
    #
    #   @param name [String] The framework name.

    # @see Openlayer::Models::Governance::RuleListResponse::Item::Framework#avatar
    class Avatar < Openlayer::Internal::Type::BaseModel
      # @!attribute type
      #
      #   @return [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Framework::Avatar::Type]
      required :type,
               enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::Framework::Avatar::Type }

      # @!attribute value
      #
      #   @return [String]
      required :value, String

      # @!method initialize(type:, value:)
      #   The icon shown for the framework.
      #
      #   @param type [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Framework::Avatar::Type]
      #   @param value [String]

      # @see Openlayer::Models::Governance::RuleListResponse::Item::Framework::Avatar#type
      module Type
        extend Openlayer::Internal::Type::Enum

        EMOJI = :emoji
        IMAGE_URL = :imageUrl
        BUILTIN_IMAGE = :builtinImage

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

  class Result < Openlayer::Internal::Type::BaseModel
    # @!attribute deactivated
    #   Whether this result is excluded from compliance calculations.
    #
    #   @return [Boolean]
    required :deactivated, Openlayer::Internal::Type::Boolean

    # @!attribute status
    #   The compliance status of the rule for this entity.
    #
    #   @return [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Result::Status]
    required :status, enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::Result::Status }

    # @!attribute assignee_id
    #   The user responsible for this result.
    #
    #   @return [String, nil]
    optional :assignee_id, String, api_name: :assigneeId, nil?: true

    # @!attribute blocked_by
    #   Rule results that must pass before this one can be satisfied.
    #
    #   @return [Array<Openlayer::Models::Governance::RuleListResponse::Item::Result::BlockedBy>, nil]
    optional :blocked_by,
             -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::Governance::RuleListResponse::Item::Result::BlockedBy] },
             api_name: :blockedBy

    # @!attribute blocking
    #   Rule results that this one blocks.
    #
    #   @return [Array<Openlayer::Models::Governance::RuleListResponse::Item::Result::Blocking>, nil]
    optional :blocking,
             -> { Openlayer::Internal::Type::ArrayOf[Openlayer::Models::Governance::RuleListResponse::Item::Result::Blocking] }

    # @!attribute deactivated_reason
    #   Why the result was excluded.
    #
    #   @return [String, nil]
    optional :deactivated_reason, String, api_name: :deactivatedReason, nil?: true

    # @!attribute status_message
    #   A human-readable explanation of the status.
    #
    #   @return [String, nil]
    optional :status_message, String, api_name: :statusMessage, nil?: true

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

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

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

      # @!attribute rule_id
      #   The rule this result belongs to.
      #
      #   @return [String]
      required :rule_id, String, api_name: :ruleId

      # @!attribute workspace_id
      #   The id of the workspace the rule result belongs to.
      #
      #   @return [String]
      required :workspace_id, String, api_name: :workspaceId

      # @!attribute date_last_evaluated
      #   When the rule was last evaluated. Platform rules only.
      #
      #   @return [Time, nil]
      optional :date_last_evaluated, Time, api_name: :dateLastEvaluated, nil?: true

      # @!attribute date_of_latest_evidence
      #   When the most recent piece of evidence was attached. Evidence rules only.
      #
      #   @return [Time, nil]
      optional :date_of_latest_evidence, Time, api_name: :dateOfLatestEvidence, nil?: true

      # @!attribute date_of_next_evaluation
      #   When the rule will next be evaluated. Platform rules only.
      #
      #   @return [Time, nil]
      optional :date_of_next_evaluation, Time, api_name: :dateOfNextEvaluation, nil?: true

      # @!attribute date_of_renewal
      #   When the evidence must be renewed. Evidence rules with a renewal cadence only.
      #
      #   @return [Time, nil]
      optional :date_of_renewal, Time, api_name: :dateOfRenewal, nil?: true

      # @!attribute project_id
      #   The project this result was evaluated for. `null` for workspace-scoped rules.
      #
      #   @return [String, nil]
      optional :project_id, String, api_name: :projectId, nil?: true
    end

    # @!method initialize(id:, date_created:, date_updated:, deactivated:, rule_id:, status:, workspace_id:, assignee_id: nil, blocked_by: nil, blocking: nil, date_last_evaluated: nil, date_of_latest_evidence: nil, date_of_next_evaluation: nil, date_of_renewal: nil, deactivated_reason: nil, project_id: nil, status_message: nil)
    #   @param id [String] The rule result id.
    #
    #   @param date_created [Time] The creation date.
    #
    #   @param date_updated [Time] The last update date.
    #
    #   @param deactivated [Boolean] Whether this result is excluded from compliance calculations.
    #
    #   @param rule_id [String] The rule this result belongs to.
    #
    #   @param status [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Result::Status] The compliance status of the rule for this entity.
    #
    #   @param workspace_id [String] The id of the workspace the rule result belongs to.
    #
    #   @param assignee_id [String, nil] The user responsible for this result.
    #
    #   @param blocked_by [Array<Openlayer::Models::Governance::RuleListResponse::Item::Result::BlockedBy>] Rule results that must pass before this one can be satisfied.
    #
    #   @param blocking [Array<Openlayer::Models::Governance::RuleListResponse::Item::Result::Blocking>] Rule results that this one blocks.
    #
    #   @param date_last_evaluated [Time, nil] When the rule was last evaluated. Platform rules only.
    #
    #   @param date_of_latest_evidence [Time, nil] When the most recent piece of evidence was attached. Evidence rules only.
    #
    #   @param date_of_next_evaluation [Time, nil] When the rule will next be evaluated. Platform rules only.
    #
    #   @param date_of_renewal [Time, nil] When the evidence must be renewed. Evidence rules with a renewal cadence only.
    #
    #   @param deactivated_reason [String, nil] Why the result was excluded.
    #
    #   @param project_id [String, nil] The project this result was evaluated for. `null` for workspace-scoped rules.
    #
    #   @param status_message [String, nil] A human-readable explanation of the status.

    # The compliance status of the rule for this entity.
    #
    # @see Openlayer::Models::Governance::RuleListResponse::Item::Result#status
    module Status
      extend Openlayer::Internal::Type::Enum

      RUNNING = :running
      PASSING = :passing
      FAILING = :failing
      SKIPPED = :skipped
      ERROR = :error
      PENDING = :pending
      DUE_SOON = :due_soon

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

    class BlockedBy < Openlayer::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String, nil]
      optional :id, String

      # @!attribute status
      #   The compliance status of the rule for this entity.
      #
      #   @return [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Result::BlockedBy::Status, nil]
      optional :status,
               enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::Result::BlockedBy::Status }

      # @!method initialize(id: nil, status: nil)
      #   @param id [String]
      #
      #   @param status [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Result::BlockedBy::Status] The compliance status of the rule for this entity.

      # The compliance status of the rule for this entity.
      #
      # @see Openlayer::Models::Governance::RuleListResponse::Item::Result::BlockedBy#status
      module Status
        extend Openlayer::Internal::Type::Enum

        RUNNING = :running
        PASSING = :passing
        FAILING = :failing
        SKIPPED = :skipped
        ERROR = :error
        PENDING = :pending
        DUE_SOON = :due_soon

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

    class Blocking < Openlayer::Internal::Type::BaseModel
      # @!attribute id
      #
      #   @return [String, nil]
      optional :id, String

      # @!attribute status
      #   The compliance status of the rule for this entity.
      #
      #   @return [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Result::Blocking::Status, nil]
      optional :status,
               enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::Result::Blocking::Status }

      # @!method initialize(id: nil, status: nil)
      #   @param id [String]
      #
      #   @param status [Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Result::Blocking::Status] The compliance status of the rule for this entity.

      # The compliance status of the rule for this entity.
      #
      # @see Openlayer::Models::Governance::RuleListResponse::Item::Result::Blocking#status
      module Status
        extend Openlayer::Internal::Type::Enum

        RUNNING = :running
        PASSING = :passing
        FAILING = :failing
        SKIPPED = :skipped
        ERROR = :error
        PENDING = :pending
        DUE_SOON = :due_soon

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

  # @see Openlayer::Models::Governance::RuleListResponse::Item#results_summary
  class ResultsSummary < Openlayer::Internal::Type::BaseModel
    # @!attribute passing
    #
    #   @return [Integer, nil]
    optional :passing, Integer

    # @!attribute total
    #
    #   @return [Integer, nil]
    optional :total, Integer

    # @!method initialize(passing: nil, total: nil)
    #   Pass-rate counts across all of the rule's entities, independent of any status
    #   filter applied to the request.
    #
    #   @param passing [Integer]
    #   @param total [Integer]
  end

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

    # @!attribute color
    #   The color the tag is displayed with.
    #
    #   @return [String, nil]
    optional :color, String, nil?: true

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

      # @!attribute creator_id
      #   The user who created the tag. `null` for tags that ship with Openlayer.
      #
      #   @return [String, nil]
      required :creator_id, String, api_name: :creatorId, nil?: true

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

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

      # @!attribute immutable
      #   Whether the tag is managed by Openlayer and cannot be edited or deleted.
      #
      #   @return [Boolean]
      required :immutable, Openlayer::Internal::Type::Boolean

      # @!attribute workspace_id
      #   The id of the workspace the tag belongs to.
      #
      #   @return [String]
      required :workspace_id, String, api_name: :workspaceId
    end

    # @!method initialize(id:, creator_id:, date_created:, date_updated:, immutable:, name:, workspace_id:, color: nil)
    #   @param id [String] The rule tag id.
    #
    #   @param creator_id [String, nil] The user who created the tag. `null` for tags that ship with Openlayer.
    #
    #   @param date_created [Time] The creation date.
    #
    #   @param date_updated [Time] The last update date.
    #
    #   @param immutable [Boolean] Whether the tag is managed by Openlayer and cannot be edited or deleted.
    #
    #   @param name [String] The tag name.
    #
    #   @param workspace_id [String] The id of the workspace the tag belongs to.
    #
    #   @param color [String, nil] The color the tag is displayed with.
  end
end

Instance Attribute Details

#assignee_id ⇒ String?

The user responsible for satisfying the rule.

Parameters:

Returns:



42
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 42

optional :assignee_id, String, api_name: :assigneeId, nil?: true

#automation_params ⇒ Hash{Symbol=>Object}?

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

Parameters:

Returns:



48
49
50
51
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 48

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:

Returns:



59
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 59

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

#date_created ⇒ Time

Returns the value of attribute date_created.

Returns:



69
70
71
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 69

def date_created
  @date_created
end

#date_updated ⇒ Time

Returns the value of attribute date_updated.

Returns:



71
72
73
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 71

def date_updated
  @date_updated
end

#deactivated ⇒ Boolean?

Whether the rule is excluded from compliance calculations.

Parameters:

Returns:



65
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 65

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

#description ⇒ String?

What the rule requires.

Parameters:

Returns:



71
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 71

optional :description, String, nil?: true

#evidence_type ⇒ Symbol, ...

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

Parameters:

Returns:



77
78
79
80
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 77

optional :evidence_type,
enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::EvidenceType },
api_name: :evidenceType,
nil?: true

#frameworks ⇒ ::Array[Openlayer::Models::Governance::RuleListResponse::Item::Framework]? (readonly)

Returns the value of attribute frameworks.

Returns:



75
76
77
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 75

def frameworks
  @frameworks
end

#id ⇒ String

Returns the value of attribute id.

Returns:



67
68
69
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 67

def id
  @id
end

#immutable ⇒ Boolean? (readonly)

Returns the value of attribute immutable.

Returns:



81
82
83
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 81

def immutable
  @immutable
end

#name ⇒ String

The rule name.

Parameters:

Returns:



22
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 22

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:

Returns:



87
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 87

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

#results ⇒ ::Array[Openlayer::Models::Governance::RuleListResponse::Item::Result]? (readonly)

Returns the value of attribute results.

Returns:



85
86
87
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 85

def results
  @results
end

#results_summary ⇒ Openlayer::Models::Governance::RuleListResponse::Item::ResultsSummary?

Returns the value of attribute results_summary.

Returns:



91
92
93
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 91

def results_summary
  @results_summary
end

#scope ⇒ Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Scope

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

Parameters:

Returns:



29
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 29

required :scope, enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::Scope }

#tags ⇒ ::Array[Openlayer::Models::Governance::RuleListResponse::Item::Tag]?

Returns the value of attribute tags.

Returns:



93
94
95
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 93

def tags
  @tags
end

#type ⇒ Symbol, Openlayer::Models::Governance::RuleListResponse::Item::Type

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

Parameters:

Returns:



36
# File 'lib/openlayer/models/governance/rule_list_response.rb', line 36

required :type, enum: -> { Openlayer::Models::Governance::RuleListResponse::Item::Type }

#workspace_id ⇒ String

Returns the value of attribute workspace_id.

Returns:



73
74
75
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 73

def workspace_id
  @workspace_id
end

Class Method Details

.values ⇒ Array<Symbol>

Returns:



# File 'lib/openlayer/models/governance/rule_list_response.rb', line 206

Instance Method Details

#frameworks= ⇒ Object (readonly)



77
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 77

def frameworks=: (

#immutable= ⇒ Boolean (readonly)

Parameters:

Returns:



83
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 83

def immutable=: (bool) -> bool

#results= ⇒ Object (readonly)



87
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 87

def results=: (

#to_hash ⇒ {

Returns:



117
# File 'sig/openlayer/models/governance/rule_list_response.rbs', line 117

def to_hash: -> {