Class: OCI::IdentityDomains::Models::Meta
- Inherits:
-
Object
- Object
- OCI::IdentityDomains::Models::Meta
- Defined in:
- lib/oci/identity_domains/models/meta.rb
Overview
A complex attribute that contains resource metadata. All sub-attributes are OPTIONAL.
SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - idcsCsvAttributeNameMappings: [[columnHeaderName:Created Date, mapsTo:meta.created]] - type: complex
Instance Attribute Summary collapse
-
#created ⇒ String
The DateTime the Resource was added to the Service Provider.
-
#last_modified ⇒ String
The most recent DateTime that the details of this Resource were updated at the Service Provider.
-
#location ⇒ String
The URI of the Resource being returned.
-
#resource_type ⇒ String
Name of the resource type of the resource–for example, Users or Groups.
-
#version ⇒ String
The version of the Resource being returned.
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 = {}) ⇒ Meta
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 = {}) ⇒ Meta
Initializes the object
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/oci/identity_domains/models/meta.rb', line 128 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.resource_type = attributes[:'resourceType'] if attributes[:'resourceType'] raise 'You cannot provide both :resourceType and :resource_type' if attributes.key?(:'resourceType') && attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] if attributes[:'resource_type'] self.created = attributes[:'created'] if attributes[:'created'] self.last_modified = attributes[:'lastModified'] if attributes[:'lastModified'] raise 'You cannot provide both :lastModified and :last_modified' if attributes.key?(:'lastModified') && attributes.key?(:'last_modified') self.last_modified = attributes[:'last_modified'] if attributes[:'last_modified'] self.location = attributes[:'location'] if attributes[:'location'] self.version = attributes[:'version'] if attributes[:'version'] end |
Instance Attribute Details
#created ⇒ String
The DateTime the Resource was added to the Service Provider
SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: dateTime - uniqueness: none
47 48 49 |
# File 'lib/oci/identity_domains/models/meta.rb', line 47 def created @created end |
#last_modified ⇒ String
The most recent DateTime that the details of this Resource were updated at the Service Provider. If this Resource has never been modified since its initial creation, the value MUST be the same as the value of created. The attribute MUST be a DateTime.
SCIM++ Properties: - caseExact: false - idcsSearchable: true - multiValued: false - mutability: readOnly - required: false - returned: default - type: dateTime - uniqueness: none
61 62 63 |
# File 'lib/oci/identity_domains/models/meta.rb', line 61 def last_modified @last_modified end |
#location ⇒ String
The URI of the Resource being returned. This value MUST be the same as the Location HTTP response header.
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
75 76 77 |
# File 'lib/oci/identity_domains/models/meta.rb', line 75 def location @location end |
#resource_type ⇒ String
Name of the resource type of the resource–for example, Users or Groups
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
33 34 35 |
# File 'lib/oci/identity_domains/models/meta.rb', line 33 def resource_type @resource_type end |
#version ⇒ String
The version of the Resource being returned. This value must be the same as the ETag HTTP response header.
SCIM++ Properties: - caseExact: false - idcsSearchable: false - multiValued: false - mutability: readOnly - required: false - returned: default - type: string - uniqueness: none
89 90 91 |
# File 'lib/oci/identity_domains/models/meta.rb', line 89 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/identity_domains/models/meta.rb', line 92 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'resource_type': :'resourceType', 'created': :'created', 'last_modified': :'lastModified', 'location': :'location', 'version': :'version' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/identity_domains/models/meta.rb', line 105 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'resource_type': :'String', 'created': :'String', 'last_modified': :'String', 'location': :'String', 'version': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
160 161 162 163 164 165 166 167 168 169 |
# File 'lib/oci/identity_domains/models/meta.rb', line 160 def ==(other) return true if equal?(other) self.class == other.class && resource_type == other.resource_type && created == other.created && last_modified == other.last_modified && location == other.location && version == other.version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/oci/identity_domains/models/meta.rb', line 194 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
174 175 176 |
# File 'lib/oci/identity_domains/models/meta.rb', line 174 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
183 184 185 |
# File 'lib/oci/identity_domains/models/meta.rb', line 183 def hash [resource_type, created, last_modified, location, version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/identity_domains/models/meta.rb', line 227 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
221 222 223 |
# File 'lib/oci/identity_domains/models/meta.rb', line 221 def to_s to_hash.to_s end |