Class: OCI::IdentityDomains::Models::MyRequestApprovalDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/identity_domains/models/my_request_approval_details.rb

Overview

Approvals created for this request.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MyRequestApprovalDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :approver_id (String)

    The value to assign to the #approver_id property

  • :approver_display_name (String)

    The value to assign to the #approver_display_name property

  • :justification (String)

    The value to assign to the #justification property

  • :status (String)

    The value to assign to the #status property

  • :order (Integer)

    The value to assign to the #order property

  • :approval_type (String)

    The value to assign to the #approval_type property

  • :time_updated (String)

    The value to assign to the #time_updated property



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
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 152

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.approver_id = attributes[:'approverId'] if attributes[:'approverId']

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

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

  self.approver_display_name = attributes[:'approverDisplayName'] if attributes[:'approverDisplayName']

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

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

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

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

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

  self.approval_type = attributes[:'approvalType'] if attributes[:'approvalType']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

Instance Attribute Details

#approval_typeString

Approval Type (Escalation or Regular)

Added In: 2307071836

SCIM++ Properties: - idcsSearchable: false - multiValued: false - returned: default - type: string - uniqueness: none - mutability: readOnly

Returns:

  • (String)


93
94
95
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 93

def approval_type
  @approval_type
end

#approver_display_nameString

Approver display name

Added In: 2307071836

SCIM++ Properties: - idcsSearchable: false - multiValued: false - returned: default - type: string - uniqueness: none - mutability: readOnly

Returns:

  • (String)


37
38
39
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 37

def approver_display_name
  @approver_display_name
end

#approver_idString

Approver Id

Added In: 2307071836

SCIM++ Properties: - idcsSearchable: false - multiValued: false - returned: default - type: string - uniqueness: none - mutability: readOnly

Returns:

  • (String)


23
24
25
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 23

def approver_id
  @approver_id
end

#justificationString

Approval Justification

Added In: 2307071836

SCIM++ Properties: - multiValued: false - idcsSearchable: false - returned: default - type: string - uniqueness: none - mutability: readOnly

Returns:

  • (String)


51
52
53
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 51

def justification
  @justification
end

#orderInteger

Approval Order

Added In: 2307071836

SCIM++ Properties: - idcsSearchable: false - multiValued: false - returned: default - type: integer - uniqueness: none - mutability: readOnly

Returns:

  • (Integer)


79
80
81
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 79

def order
  @order
end

#statusString

Approval Status

Added In: 2307071836

SCIM++ Properties: - idcsSearchable: false - multiValued: false - returned: default - type: string - uniqueness: none - mutability: readOnly

Returns:

  • (String)


65
66
67
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 65

def status
  @status
end

#time_updatedString

Approval Update Time

Added In: 2307071836

SCIM++ Properties: - multiValued: false - idcsSearchable: false - returned: default - type: dateTime - uniqueness: none - mutability: readOnly

Returns:

  • (String)


107
108
109
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 107

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



110
111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 110

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'approver_id': :'approverId',
    'approver_display_name': :'approverDisplayName',
    'justification': :'justification',
    'status': :'status',
    'order': :'order',
    'approval_type': :'approvalType',
    'time_updated': :'timeUpdated'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 125

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'approver_id': :'String',
    'approver_display_name': :'String',
    'justification': :'String',
    'status': :'String',
    'order': :'Integer',
    'approval_type': :'String',
    'time_updated': :'String'
    # 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



196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 196

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

  self.class == other.class &&
    approver_id == other.approver_id &&
    approver_display_name == other.approver_display_name &&
    justification == other.justification &&
    status == other.status &&
    order == other.order &&
    approval_type == other.approval_type &&
    time_updated == other.time_updated
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



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 232

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


212
213
214
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 212

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



221
222
223
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 221

def hash
  [approver_id, approver_display_name, justification, status, order, approval_type, time_updated].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



265
266
267
268
269
270
271
272
273
274
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 265

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



259
260
261
# File 'lib/oci/identity_domains/models/my_request_approval_details.rb', line 259

def to_s
  to_hash.to_s
end