Class: OCI::Lockbox::Models::AccessRequestExt

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/lockbox/models/access_request_ext.rb

Overview

An access request to a customer's resource that includes additional requestor metadata. An access request is a subsidiary resource of the Lockbox entity.

Constant Summary collapse

LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  LIFECYCLE_STATE_WAITING = 'WAITING'.freeze,
  LIFECYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  LIFECYCLE_STATE_CANCELING = 'CANCELING'.freeze,
  LIFECYCLE_STATE_CANCELED = 'CANCELED'.freeze,
  LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_DETAILS_ENUM =
[
  LIFECYCLE_STATE_DETAILS_PROCESSING = 'PROCESSING'.freeze,
  LIFECYCLE_STATE_DETAILS_WAITING_FOR_APPROVALS = 'WAITING_FOR_APPROVALS'.freeze,
  LIFECYCLE_STATE_DETAILS_APPROVED = 'APPROVED'.freeze,
  LIFECYCLE_STATE_DETAILS_AUTO_APPROVED = 'AUTO_APPROVED'.freeze,
  LIFECYCLE_STATE_DETAILS_CANCELLING_ACCESS = 'CANCELLING_ACCESS'.freeze,
  LIFECYCLE_STATE_DETAILS_EXPIRED = 'EXPIRED'.freeze,
  LIFECYCLE_STATE_DETAILS_REVOKED = 'REVOKED'.freeze,
  LIFECYCLE_STATE_DETAILS_DENIED = 'DENIED'.freeze,
  LIFECYCLE_STATE_DETAILS_ERROR = 'ERROR'.freeze,
  LIFECYCLE_STATE_DETAILS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AccessRequestExt

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :requestor_user_name (String)

    The value to assign to the #requestor_user_name property

  • :id (String)

    The value to assign to the #id property

  • :lockbox_id (String)

    The value to assign to the #lockbox_id property

  • :display_name (String)

    The value to assign to the #display_name property

  • :description (String)

    The value to assign to the #description property

  • :requestor_id (String)

    The value to assign to the #requestor_id property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :lifecycle_state_details (String)

    The value to assign to the #lifecycle_state_details property

  • :access_duration (String)

    The value to assign to the #access_duration property

  • :context (Hash<String, String>)

    The value to assign to the #context property

  • :activity_logs (Array<OCI::Lockbox::Models::ActivityLog>)

    The value to assign to the #activity_logs property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :time_expired (DateTime)

    The value to assign to the #time_expired property

  • :time_reminded (DateTime)

    The value to assign to the #time_reminded property

  • :reminder_count (Integer)

    The value to assign to the #reminder_count property

  • :requestor_location (String)

    The value to assign to the #requestor_location property



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
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 190

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

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

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

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

  self.lockbox_id = attributes[:'lockboxId'] if attributes[:'lockboxId']

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

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

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

  self.requestor_id = attributes[:'requestorId'] if attributes[:'requestorId']

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.lifecycle_state_details = attributes[:'lifecycleStateDetails'] if attributes[:'lifecycleStateDetails']

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

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

  self.access_duration = attributes[:'accessDuration'] if attributes[:'accessDuration']

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

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

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

  self.activity_logs = attributes[:'activityLogs'] if attributes[:'activityLogs']

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  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']

  self.time_expired = attributes[:'timeExpired'] if attributes[:'timeExpired']

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

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

  self.time_reminded = attributes[:'timeReminded'] if attributes[:'timeReminded']

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

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

  self.reminder_count = attributes[:'reminderCount'] if attributes[:'reminderCount']

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

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

  self.requestor_location = attributes[:'requestorLocation'] if attributes[:'requestorLocation']

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

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

Instance Attribute Details

#access_durationString

[Required] The maximum amount of time operator has access to associated resources.

Returns:

  • (String)


72
73
74
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 72

def access_duration
  @access_duration
end

#activity_logsArray<OCI::Lockbox::Models::ActivityLog>

[Required] The actions taken by different persona on the access request, e.g. approve/deny/revoke



80
81
82
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 80

def activity_logs
  @activity_logs
end

#contextHash<String, String>

The context object containing the access request specific details.

Returns:

  • (Hash<String, String>)


76
77
78
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 76

def context
  @context
end

#descriptionString

[Required] The rationale for requesting the access request and any other related details..

Returns:

  • (String)


56
57
58
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 56

def description
  @description
end

#display_nameString

[Required] The name of the access request.

Returns:

  • (String)


52
53
54
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 52

def display_name
  @display_name
end

#idString

[Required] The unique identifier (OCID) of the access request, which can't be changed after creation.

Returns:

  • (String)


44
45
46
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 44

def id
  @id
end

#lifecycle_stateString

[Required] Possible access request lifecycle states.

Returns:

  • (String)


64
65
66
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 64

def lifecycle_state
  @lifecycle_state
end

#lifecycle_state_detailsString

[Required] Details of access request lifecycle state.

Returns:

  • (String)


68
69
70
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 68

def lifecycle_state_details
  @lifecycle_state_details
end

#lockbox_idString

[Required] The unique identifier (OCID) of the lockbox box that the access request is associated with, which can't be changed after creation.

Returns:

  • (String)


48
49
50
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 48

def lockbox_id
  @lockbox_id
end

#reminder_countInteger

[Required] The count of times the access request was reminded.

Returns:

  • (Integer)


109
110
111
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 109

def reminder_count
  @reminder_count
end

#requestor_idString

[Required] The unique identifier of the requestor.

Returns:

  • (String)


60
61
62
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 60

def requestor_id
  @requestor_id
end

#requestor_locationString

[Required] The location of the requestor. Format with be two letters indicatiog operator's country code defined by jira-sd.mc1.oracleiaas.com/browse/SSD-17880 Example: US

Returns:

  • (String)


115
116
117
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 115

def requestor_location
  @requestor_location
end

#requestor_user_nameString

[Required] The user name i.e. userId of the requestor.

Returns:

  • (String)


40
41
42
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 40

def requestor_user_name
  @requestor_user_name
end

#time_createdDateTime

[Required] The time the access request was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

Returns:

  • (DateTime)


86
87
88
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 86

def time_created
  @time_created
end

#time_expiredDateTime

[Required] The time the access request expired. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

Returns:

  • (DateTime)


98
99
100
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 98

def time_expired
  @time_expired
end

#time_remindedDateTime

[Required] The time the access request was last reminded. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

Returns:

  • (DateTime)


104
105
106
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 104

def time_reminded
  @time_reminded
end

#time_updatedDateTime

[Required] The time the access request was last updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z

Returns:

  • (DateTime)


92
93
94
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 92

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 118

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'requestor_user_name': :'requestorUserName',
    'id': :'id',
    'lockbox_id': :'lockboxId',
    'display_name': :'displayName',
    'description': :'description',
    'requestor_id': :'requestorId',
    'lifecycle_state': :'lifecycleState',
    'lifecycle_state_details': :'lifecycleStateDetails',
    'access_duration': :'accessDuration',
    'context': :'context',
    'activity_logs': :'activityLogs',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'time_expired': :'timeExpired',
    'time_reminded': :'timeReminded',
    'reminder_count': :'reminderCount',
    'requestor_location': :'requestorLocation'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 143

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'requestor_user_name': :'String',
    'id': :'String',
    'lockbox_id': :'String',
    'display_name': :'String',
    'description': :'String',
    'requestor_id': :'String',
    'lifecycle_state': :'String',
    'lifecycle_state_details': :'String',
    'access_duration': :'String',
    'context': :'Hash<String, String>',
    'activity_logs': :'Array<OCI::Lockbox::Models::ActivityLog>',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'time_expired': :'DateTime',
    'time_reminded': :'DateTime',
    'reminder_count': :'Integer',
    'requestor_location': :'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



320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 320

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

  self.class == other.class &&
    requestor_user_name == other.requestor_user_name &&
    id == other.id &&
    lockbox_id == other.lockbox_id &&
    display_name == other.display_name &&
    description == other.description &&
    requestor_id == other.requestor_id &&
    lifecycle_state == other.lifecycle_state &&
    lifecycle_state_details == other.lifecycle_state_details &&
    access_duration == other.access_duration &&
    context == other.context &&
    activity_logs == other.activity_logs &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    time_expired == other.time_expired &&
    time_reminded == other.time_reminded &&
    reminder_count == other.reminder_count &&
    requestor_location == other.requestor_location
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



366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 366

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


346
347
348
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 346

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



355
356
357
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 355

def hash
  [requestor_user_name, id, lockbox_id, display_name, description, requestor_id, lifecycle_state, lifecycle_state_details, access_duration, context, activity_logs, time_created, time_updated, time_expired, time_reminded, reminder_count, requestor_location].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



399
400
401
402
403
404
405
406
407
408
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 399

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



393
394
395
# File 'lib/oci/lockbox/models/access_request_ext.rb', line 393

def to_s
  to_hash.to_s
end