Class: Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector

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

Defined Under Namespace

Classes: Match

Instance Attribute 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(workspace_id:, name:, description: nil, enabled: nil, project_selector: nil, tags: nil, request_options: {}) ⇒ Object

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

Parameters:

  • workspace_id (String)
  • name (String) —

    The framework name.

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

    A short description of the framework.

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

    Whether the framework is active. Rules of a disabled framework are not evaluated

  • project_selector (Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector, nil) (defaults to: nil) —

    Determines which projects the framework applies to. An empty or null match a

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

    Free-form labels on the framework.

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


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
# File 'lib/openlayer/models/governance/framework_create_params.rb', line 69

class ProjectSelector < Openlayer::Internal::Type::BaseModel
  # @!attribute match
  #   Match criteria, ANDed together.
  #
  #   @return [Array<Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector::Match>, nil]
  optional :match,
           -> {
             Openlayer::Internal::Type::ArrayOf[Openlayer::Governance::FrameworkCreateParams::ProjectSelector::Match]
           },
           nil?: true

  # @!method initialize(match: nil)
  #   Determines which projects the framework applies to. An empty or `null` `match`
  #   array applies the framework to every project in the workspace.
  #
  #   @param match [Array<Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector::Match>, nil] Match criteria, ANDed together.

  class Match < Openlayer::Internal::Type::BaseModel
    # @!attribute property
    #   The project property to match against.
    #
    #   @return [Symbol, Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector::Match::Property]
    required :property,
             enum: -> { Openlayer::Governance::FrameworkCreateParams::ProjectSelector::Match::Property }

    # @!attribute value
    #   The value to match against. Pass an array to match any of several values, or
    #   `null` to match projects where the property is unset. Omit it for `exists` and
    #   `notExists`.
    #
    #   @return [Object]
    required :value, Openlayer::Internal::Type::Unknown

    # @!attribute operator
    #   How to compare the project property with `value`. One of `equals`, `notEquals`,
    #   `contains`, `notContains`, `startsWith`, `endsWith`, `in`, `notIn`,
    #   `greaterThan`, `greaterThanOrEqual`, `lessThan`, `lessThanOrEqual`,
    #   `equalsIgnoreCase`, `containsIgnoreCase`, `matches`, `exists`, or `notExists`.
    #
    #   @return [String, nil]
    optional :operator, String

    # @!method initialize(property:, value:, operator: nil)
    #   Some parameter documentations has been truncated, see
    #   {Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector::Match}
    #   for more details.
    #
    #   @param property [Symbol, Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector::Match::Property] The project property to match against.
    #
    #   @param value [Object] The value to match against. Pass an array to match any of several values, or `nu
    #
    #   @param operator [String] How to compare the project property with `value`. One of `equals`, `notEquals`,

    # The project property to match against.
    #
    # @see Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector::Match#property
    module Property
      extend Openlayer::Internal::Type::Enum

      TASK_TYPE = :taskType
      RISK_LEVEL = :riskLevel
      RISK_TOTAL_SCORE = :riskTotalScore
      NAME = :name
      OWNER_ID = :ownerId
      MODEL_TYPES = :modelTypes

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

Instance Attribute Details

#match ⇒ Array<Openlayer::Models::Governance::FrameworkCreateParams::ProjectSelector::Match>?

Match criteria, ANDed together.

Parameters:

  • value (::Array[Openlayer::Governance::FrameworkCreateParams::ProjectSelector::Match], nil)

Returns:



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

optional :match,
-> {
  Openlayer::Internal::Type::ArrayOf[Openlayer::Governance::FrameworkCreateParams::ProjectSelector::Match]
},
nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


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

def to_hash: -> {