Class: OCI::OperatorAccessControl::Models::AssignmentValidationStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/operator_access_control/models/assignment_validation_status.rb

Overview

Summary of assignment Validation status.

Constant Summary collapse

EXECUTION_STATUS_ENUM =
[
  EXECUTION_STATUS_PROGRESS = 'PROGRESS'.freeze,
  EXECUTION_STATUS_SUCCESS = 'SUCCESS'.freeze,
  EXECUTION_STATUS_FAILED = 'FAILED'.freeze,
  EXECUTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AssignmentValidationStatus

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 99

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.execution_id = attributes[:'executionId'] if attributes[:'executionId']

  raise 'You cannot provide both :executionId and :execution_id' if attributes.key?(:'executionId') && attributes.key?(:'execution_id')

  self.execution_id = attributes[:'execution_id'] if attributes[:'execution_id']

  self.user_id = attributes[:'userId'] if attributes[:'userId']

  raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id')

  self.user_id = attributes[:'user_id'] if attributes[:'user_id']

  self.access_request_id = attributes[:'accessRequestId'] if attributes[:'accessRequestId']

  raise 'You cannot provide both :accessRequestId and :access_request_id' if attributes.key?(:'accessRequestId') && attributes.key?(:'access_request_id')

  self.access_request_id = attributes[:'access_request_id'] if attributes[:'access_request_id']

  self.error_message = attributes[:'errorMessage'] if attributes[:'errorMessage']

  raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message')

  self.error_message = attributes[:'error_message'] if attributes[:'error_message']

  self.execution_status = attributes[:'executionStatus'] if attributes[:'executionStatus']

  raise 'You cannot provide both :executionStatus and :execution_status' if attributes.key?(:'executionStatus') && attributes.key?(:'execution_status')

  self.execution_status = attributes[:'execution_status'] if attributes[:'execution_status']

  self.status_detail = attributes[:'statusDetail'] if attributes[:'statusDetail']

  raise 'You cannot provide both :statusDetail and :status_detail' if attributes.key?(:'statusDetail') && attributes.key?(:'status_detail')

  self.status_detail = attributes[:'status_detail'] if attributes[:'status_detail']

  self.time_of_validation_start = attributes[:'timeOfValidationStart'] if attributes[:'timeOfValidationStart']

  raise 'You cannot provide both :timeOfValidationStart and :time_of_validation_start' if attributes.key?(:'timeOfValidationStart') && attributes.key?(:'time_of_validation_start')

  self.time_of_validation_start = attributes[:'time_of_validation_start'] if attributes[:'time_of_validation_start']

  self.time_of_validation_finish = attributes[:'timeOfValidationFinish'] if attributes[:'timeOfValidationFinish']

  raise 'You cannot provide both :timeOfValidationFinish and :time_of_validation_finish' if attributes.key?(:'timeOfValidationFinish') && attributes.key?(:'time_of_validation_finish')

  self.time_of_validation_finish = attributes[:'time_of_validation_finish'] if attributes[:'time_of_validation_finish']
end

Instance Attribute Details

#access_request_idString

Id of the accessRequest which got created as part of Assignment Validation.

Returns:

  • (String)


29
30
31
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 29

def access_request_id
  @access_request_id
end

#error_messageString

any errorMessage during validation.

Returns:

  • (String)


33
34
35
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 33

def error_message
  @error_message
end

#execution_idString

[Required] Id of the unique execution.

Returns:

  • (String)


21
22
23
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 21

def execution_id
  @execution_id
end

#execution_statusString

[Required] Status of the execution Success or Failure.

Returns:

  • (String)


37
38
39
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 37

def execution_status
  @execution_status
end

#status_detailArray<OCI::OperatorAccessControl::Models::StatusDetail>

List of execution detail for the validate assignment.



41
42
43
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 41

def status_detail
  @status_detail
end

#time_of_validation_finishDateTime

Time when the respective action happened in 3339[https://tools.ietf.org/html/rfc3339]timestamp format. Example: '2020-05-22T21:10:29.600Z'.

Returns:

  • (DateTime)


51
52
53
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 51

def time_of_validation_finish
  @time_of_validation_finish
end

#time_of_validation_startDateTime

Time when the respective action happened in 3339[https://tools.ietf.org/html/rfc3339]timestamp format. Example: '2020-05-22T21:10:29.600Z'.

Returns:

  • (DateTime)


46
47
48
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 46

def time_of_validation_start
  @time_of_validation_start
end

#user_idString

Id of the user who triggered the Assignment Validation.

Returns:

  • (String)


25
26
27
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 25

def user_id
  @user_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 54

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'execution_id': :'executionId',
    'user_id': :'userId',
    'access_request_id': :'accessRequestId',
    'error_message': :'errorMessage',
    'execution_status': :'executionStatus',
    'status_detail': :'statusDetail',
    'time_of_validation_start': :'timeOfValidationStart',
    'time_of_validation_finish': :'timeOfValidationFinish'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 70

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'execution_id': :'String',
    'user_id': :'String',
    'access_request_id': :'String',
    'error_message': :'String',
    'execution_status': :'String',
    'status_detail': :'Array<OCI::OperatorAccessControl::Models::StatusDetail>',
    'time_of_validation_start': :'DateTime',
    'time_of_validation_finish': :'DateTime'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 174

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    execution_id == other.execution_id &&
    user_id == other.user_id &&
    access_request_id == other.access_request_id &&
    error_message == other.error_message &&
    execution_status == other.execution_status &&
    status_detail == other.status_detail &&
    time_of_validation_start == other.time_of_validation_start &&
    time_of_validation_finish == other.time_of_validation_finish
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 211

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


191
192
193
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 191

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



200
201
202
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 200

def hash
  [execution_id, user_id, access_request_id, error_message, execution_status, status_detail, time_of_validation_start, time_of_validation_finish].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



244
245
246
247
248
249
250
251
252
253
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 244

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



238
239
240
# File 'lib/oci/operator_access_control/models/assignment_validation_status.rb', line 238

def to_s
  to_hash.to_s
end