Class: OCI::DelegateAccessControl::Models::DelegatedResourceAccessRequestApprovalDetails
- Inherits:
-
Object
- Object
- OCI::DelegateAccessControl::Models::DelegatedResourceAccessRequestApprovalDetails
- Defined in:
- lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb
Overview
Approval info for initial access or extension of a Delegated Resource Access Request
Constant Summary collapse
- APPROVAL_ACTION_ENUM =
[ APPROVAL_ACTION_APPROVE = 'APPROVE'.freeze, APPROVAL_ACTION_REJECT = 'REJECT'.freeze, APPROVAL_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- APPROVAL_TYPE_ENUM =
[ APPROVAL_TYPE_INITIAL = 'INITIAL'.freeze, APPROVAL_TYPE_EXTENSION = 'EXTENSION'.freeze, APPROVAL_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#approval_action ⇒ String
Indicated whether the request is approved or rejected.
-
#approval_type ⇒ String
approval type, initial or extension.
-
#approver_additional_message ⇒ String
Additional message specified by the approver of the request.
-
#approver_comment ⇒ String
[Required] Comment specified by the approver of the request.
-
#approver_id ⇒ String
User ID of the approver.
-
#time_approved_for_access ⇒ DateTime
Access start time that is actually approved by the customer in 3339[https://tools.ietf.org/html/rfc3339]timestamp format, e.g.
-
#time_of_action ⇒ DateTime
Time when the access request was approved or rejected by the customer in RFC 3339 timestamp format, e.g.
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 = {}) ⇒ DelegatedResourceAccessRequestApprovalDetails
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 = {}) ⇒ DelegatedResourceAccessRequestApprovalDetails
Initializes the object
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 140 141 142 143 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 96 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.approval_action = attributes[:'approvalAction'] if attributes[:'approvalAction'] raise 'You cannot provide both :approvalAction and :approval_action' if attributes.key?(:'approvalAction') && attributes.key?(:'approval_action') self.approval_action = attributes[:'approval_action'] if attributes[:'approval_action'] self.time_approved_for_access = attributes[:'timeApprovedForAccess'] if attributes[:'timeApprovedForAccess'] raise 'You cannot provide both :timeApprovedForAccess and :time_approved_for_access' if attributes.key?(:'timeApprovedForAccess') && attributes.key?(:'time_approved_for_access') self.time_approved_for_access = attributes[:'time_approved_for_access'] if attributes[:'time_approved_for_access'] 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.approver_comment = attributes[:'approverComment'] if attributes[:'approverComment'] raise 'You cannot provide both :approverComment and :approver_comment' if attributes.key?(:'approverComment') && attributes.key?(:'approver_comment') self.approver_comment = attributes[:'approver_comment'] if attributes[:'approver_comment'] 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. = attributes[:'approverAdditionalMessage'] if attributes[:'approverAdditionalMessage'] raise 'You cannot provide both :approverAdditionalMessage and :approver_additional_message' if attributes.key?(:'approverAdditionalMessage') && attributes.key?(:'approver_additional_message') self. = attributes[:'approver_additional_message'] if attributes[:'approver_additional_message'] self.time_of_action = attributes[:'timeOfAction'] if attributes[:'timeOfAction'] raise 'You cannot provide both :timeOfAction and :time_of_action' if attributes.key?(:'timeOfAction') && attributes.key?(:'time_of_action') self.time_of_action = attributes[:'time_of_action'] if attributes[:'time_of_action'] end |
Instance Attribute Details
#approval_action ⇒ String
Indicated whether the request is approved or rejected.
27 28 29 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 27 def approval_action @approval_action end |
#approval_type ⇒ String
approval type, initial or extension
35 36 37 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 35 def approval_type @approval_type end |
#approver_additional_message ⇒ String
Additional message specified by the approver of the request.
47 48 49 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 47 def @approver_additional_message end |
#approver_comment ⇒ String
[Required] Comment specified by the approver of the request.
39 40 41 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 39 def approver_comment @approver_comment end |
#approver_id ⇒ String
User ID of the approver.
43 44 45 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 43 def approver_id @approver_id end |
#time_approved_for_access ⇒ DateTime
Access start time that is actually approved by the customer in 3339[https://tools.ietf.org/html/rfc3339]timestamp format, e.g. '2020-05-22T21:10:29.600Z'.
31 32 33 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 31 def time_approved_for_access @time_approved_for_access end |
#time_of_action ⇒ DateTime
Time when the access request was approved or rejected by the customer in RFC 3339 timestamp format, e.g. '2020-05-22T21:10:29.600Z'.
51 52 53 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 51 def time_of_action @time_of_action end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 54 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'approval_action': :'approvalAction', 'time_approved_for_access': :'timeApprovedForAccess', 'approval_type': :'approvalType', 'approver_comment': :'approverComment', 'approver_id': :'approverId', 'approver_additional_message': :'approverAdditionalMessage', 'time_of_action': :'timeOfAction' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 69 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'approval_action': :'String', 'time_approved_for_access': :'DateTime', 'approval_type': :'String', 'approver_comment': :'String', 'approver_id': :'String', 'approver_additional_message': :'String', 'time_of_action': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 178 def ==(other) return true if equal?(other) self.class == other.class && approval_action == other.approval_action && time_approved_for_access == other.time_approved_for_access && approval_type == other.approval_type && approver_comment == other.approver_comment && approver_id == other.approver_id && == other. && time_of_action == other.time_of_action end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 214 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
194 195 196 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 194 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
203 204 205 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 203 def hash [approval_action, time_approved_for_access, approval_type, approver_comment, approver_id, , time_of_action].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 247 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
241 242 243 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 241 def to_s to_hash.to_s end |