Class: OCI::Lockbox::Models::AccessRequest
- Inherits:
- 
      Object
      
        - Object
- OCI::Lockbox::Models::AccessRequest
 
- Defined in:
- lib/oci/lockbox/models/access_request.rb
Overview
An access request to a customer's resource. 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
- 
  
    
      #access_duration  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The maximum amount of time operator has access to associated resources. 
- 
  
    
      #activity_logs  ⇒ Array<OCI::Lockbox::Models::ActivityLog> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The actions taken by different persona on the access request, e.g. 
- 
  
    
      #context  ⇒ Hash<String, String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The context object containing the access request specific details. 
- 
  
    
      #description  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The rationale for requesting the access request and any other related details.. 
- 
  
    
      #display_name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The name of the access request. 
- 
  
    
      #id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The unique identifier (OCID) of the access request, which can't be changed after creation. 
- 
  
    
      #lifecycle_state  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] Possible access request lifecycle states. 
- 
  
    
      #lifecycle_state_details  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] Details of access request lifecycle state. 
- 
  
    
      #lockbox_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The unique identifier (OCID) of the lockbox box that the access request is associated with, which can't be changed after creation. 
- 
  
    
      #reminder_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The count of times the access request was reminded. 
- 
  
    
      #requestor_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The unique identifier of the requestor. 
- 
  
    
      #requestor_location  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The location of the requestor. 
- 
  
    
      #time_created  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The time the access request was created. 
- 
  
    
      #time_expired  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The time the access request expired. 
- 
  
    
      #time_reminded  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The time the access request was last reminded. 
- 
  
    
      #time_updated  ⇒ DateTime 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The time the access request was last updated. 
Class Method Summary collapse
- 
  
    
      .attribute_map  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute mapping from ruby-style variable name to JSON key. 
- 
  
    
      .swagger_types  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Attribute type mapping. 
Instance Method Summary collapse
- 
  
    
      #==(other)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Checks equality by comparing each attribute. 
- 
  
    
      #build_from_hash(attributes)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Builds the object from hash. 
- #eql?(other) ⇒ Boolean
- 
  
    
      #hash  ⇒ Fixnum 
    
    
  
  
  
  
  
  
  
  
  
    Calculates hash code according to all attributes. 
- 
  
    
      #initialize(attributes = {})  ⇒ AccessRequest 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    Initializes the object. 
- 
  
    
      #to_hash  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    Returns the object in the form of hash. 
- 
  
    
      #to_s  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    Returns the string representation of the object. 
Constructor Details
#initialize(attributes = {}) ⇒ AccessRequest
Initializes the object
| 182 183 184 185 186 187 188 189 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 | # File 'lib/oci/lockbox/models/access_request.rb', line 182 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.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_duration ⇒ String
[Required] The maximum amount of time operator has access to associated resources.
| 67 68 69 | # File 'lib/oci/lockbox/models/access_request.rb', line 67 def access_duration @access_duration end | 
#activity_logs ⇒ Array<OCI::Lockbox::Models::ActivityLog>
[Required] The actions taken by different persona on the access request, e.g. approve/deny/revoke
| 75 76 77 | # File 'lib/oci/lockbox/models/access_request.rb', line 75 def activity_logs @activity_logs end | 
#context ⇒ Hash<String, String>
The context object containing the access request specific details.
| 71 72 73 | # File 'lib/oci/lockbox/models/access_request.rb', line 71 def context @context end | 
#description ⇒ String
[Required] The rationale for requesting the access request and any other related details..
| 51 52 53 | # File 'lib/oci/lockbox/models/access_request.rb', line 51 def description @description end | 
#display_name ⇒ String
[Required] The name of the access request.
| 47 48 49 | # File 'lib/oci/lockbox/models/access_request.rb', line 47 def display_name @display_name end | 
#id ⇒ String
[Required] The unique identifier (OCID) of the access request, which can't be changed after creation.
| 39 40 41 | # File 'lib/oci/lockbox/models/access_request.rb', line 39 def id @id end | 
#lifecycle_state ⇒ String
[Required] Possible access request lifecycle states.
| 59 60 61 | # File 'lib/oci/lockbox/models/access_request.rb', line 59 def lifecycle_state @lifecycle_state end | 
#lifecycle_state_details ⇒ String
[Required] Details of access request lifecycle state.
| 63 64 65 | # File 'lib/oci/lockbox/models/access_request.rb', line 63 def lifecycle_state_details @lifecycle_state_details end | 
#lockbox_id ⇒ String
[Required] The unique identifier (OCID) of the lockbox box that the access request is associated with, which can't be changed after creation.
| 43 44 45 | # File 'lib/oci/lockbox/models/access_request.rb', line 43 def lockbox_id @lockbox_id end | 
#reminder_count ⇒ Integer
[Required] The count of times the access request was reminded.
| 104 105 106 | # File 'lib/oci/lockbox/models/access_request.rb', line 104 def reminder_count @reminder_count end | 
#requestor_id ⇒ String
[Required] The unique identifier of the requestor.
| 55 56 57 | # File 'lib/oci/lockbox/models/access_request.rb', line 55 def requestor_id @requestor_id end | 
#requestor_location ⇒ String
[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
| 110 111 112 | # File 'lib/oci/lockbox/models/access_request.rb', line 110 def requestor_location @requestor_location end | 
#time_created ⇒ DateTime
[Required] The time the access request was created. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
| 81 82 83 | # File 'lib/oci/lockbox/models/access_request.rb', line 81 def time_created @time_created end | 
#time_expired ⇒ DateTime
[Required] The time the access request expired. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
| 93 94 95 | # File 'lib/oci/lockbox/models/access_request.rb', line 93 def time_expired @time_expired end | 
#time_reminded ⇒ DateTime
[Required] The time the access request was last reminded. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
| 99 100 101 | # File 'lib/oci/lockbox/models/access_request.rb', line 99 def time_reminded @time_reminded end | 
#time_updated ⇒ DateTime
[Required] The time the access request was last updated. Format is defined by RFC3339. Example: 2020-01-25T21:10:29.600Z
| 87 88 89 | # File 'lib/oci/lockbox/models/access_request.rb', line 87 def time_updated @time_updated end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | # File 'lib/oci/lockbox/models/access_request.rb', line 113 def self.attribute_map { # rubocop:disable Style/SymbolLiteral '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_types ⇒ Object
Attribute type mapping.
| 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | # File 'lib/oci/lockbox/models/access_request.rb', line 137 def self.swagger_types { # rubocop:disable Style/SymbolLiteral '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.
| 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | # File 'lib/oci/lockbox/models/access_request.rb', line 306 def ==(other) return true if equal?(other) self.class == other.class && 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
| 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | # File 'lib/oci/lockbox/models/access_request.rb', line 351 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
| 331 332 333 | # File 'lib/oci/lockbox/models/access_request.rb', line 331 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 340 341 342 | # File 'lib/oci/lockbox/models/access_request.rb', line 340 def hash [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_hash ⇒ Hash
Returns the object in the form of hash
| 384 385 386 387 388 389 390 391 392 393 | # File 'lib/oci/lockbox/models/access_request.rb', line 384 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_s ⇒ String
Returns the string representation of the object
| 378 379 380 | # File 'lib/oci/lockbox/models/access_request.rb', line 378 def to_s to_hash.to_s end |