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.
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
89 90 91 92 93 94 95 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 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 89 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'] 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 |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 50 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 64 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 165 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. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 200 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
180 181 182 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 180 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
189 190 191 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 189 def hash [approval_action, time_approved_for_access, approval_type, approver_comment, approver_id, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
233 234 235 236 237 238 239 240 241 242 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 233 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
227 228 229 |
# File 'lib/oci/delegate_access_control/models/delegated_resource_access_request_approval_details.rb', line 227 def to_s to_hash.to_s end |