Class: Openlayer::Models::Governance::RuleCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openlayer/models/governance/rule_create_params.rb,
sig/openlayer/models/governance/rule_create_params.rbs

Overview

See Also:

  • Openlayer::Resources::Governance::Rules#create

Defined Under Namespace

Modules: EvidenceType, Scope, Type

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Openlayer

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(workspace_id:, name:, scope:, type:, assignee_id: nil, automation_params: nil, automation_type: nil, deactivated: nil, description: nil, evidence_type: nil, renewal_cadence_days: nil, tag_ids: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Openlayer::Models::Governance::RuleCreateParams for more details.

Parameters:

  • workspace_id (String)
  • name (String) —

    The rule name.

  • scope (Symbol, Openlayer::Models::Governance::RuleCreateParams::Scope) —

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

  • type (Symbol, Openlayer::Models::Governance::RuleCreateParams::Type) —

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

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

    The user responsible for satisfying the rule.

  • 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

  • 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::RuleCreateParams::EvidenceType, nil) (defaults to: nil) —

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

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

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

  • tag_ids (Array<String>, nil) (defaults to: nil) —

    The ids of the rule tags to associate with the rule. Replaces the rule's tags. R

  • request_options (Openlayer::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/openlayer/models/governance/rule_create_params.rb', line 95

Instance Attribute Details

#assignee_id ⇒ String?

The user responsible for satisfying the rule.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


40
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 40

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:

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

Returns:

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


46
47
48
49
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 46

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)


57
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 57

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

#deactivated ⇒ Boolean?

Whether the rule is excluded from compliance calculations.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


63
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 63

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

#description ⇒ String?

What the rule requires.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


69
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 69

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::RuleCreateParams::evidence_type, nil)

Returns:



75
76
77
78
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 75

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

#name ⇒ String

The rule name.

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 20

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)


85
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 85

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

#scope ⇒ Symbol, Openlayer::Models::Governance::RuleCreateParams::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::RuleCreateParams::scope)

Returns:



27
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 27

required :scope, enum: -> { Openlayer::Governance::RuleCreateParams::Scope }

#tag_ids ⇒ Array<String>?

The ids of the rule tags to associate with the rule. Replaces the rule's tags. Read them back from tags, and list the tags available in the workspace with GET /workspaces/{workspaceId}/rule-tags.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


93
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 93

optional :tag_ids, Openlayer::Internal::Type::ArrayOf[String], api_name: :tagIds, nil?: true

#type ⇒ Symbol, Openlayer::Models::Governance::RuleCreateParams::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::RuleCreateParams::type_)

Returns:



34
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 34

required :type, enum: -> { Openlayer::Governance::RuleCreateParams::Type }

#workspace_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/openlayer/models/governance/rule_create_params.rb', line 14

required :workspace_id, String

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openlayer/models/governance/rule_create_params.rb', line 133

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


67
# File 'sig/openlayer/models/governance/rule_create_params.rbs', line 67

def to_hash: -> {