Class: OCI::Bds::Models::BdsApiKey
- Inherits:
-
Object
- Object
- OCI::Bds::Models::BdsApiKey
- Defined in:
- lib/oci/bds/models/bds_api_key.rb
Overview
The API key information.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#default_region ⇒ String
[Required] The name of the region to establish the Object Storage endpoint.
-
#domain_ocid ⇒ String
Identity domain OCID ,where user is present.
-
#fingerprint ⇒ String
[Required] The fingerprint that corresponds to the public API key requested.
-
#id ⇒ String
[Required] Identifier of the user's API key.
-
#key_alias ⇒ String
[Required] User friendly identifier used to uniquely differentiate between different API keys.
-
#lifecycle_state ⇒ String
[Required] The state of the key.
-
#pemfilepath ⇒ String
[Required] The full path and file name of the private key used for authentication.
-
#tenant_id ⇒ String
[Required] The OCID of your tenancy.
-
#time_created ⇒ DateTime
The time the API key was created, shown as an RFC 3339 formatted datetime string.
-
#user_id ⇒ String
[Required] The user OCID for which this API key was created.
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 = {}) ⇒ BdsApiKey
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 = {}) ⇒ BdsApiKey
Initializes the object
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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 117 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.user_id = attributes[:'userId'] if attributes[:'userId'] raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id') self.user_id = attributes[:'user_id'] if attributes[:'user_id'] self.key_alias = attributes[:'keyAlias'] if attributes[:'keyAlias'] raise 'You cannot provide both :keyAlias and :key_alias' if attributes.key?(:'keyAlias') && attributes.key?(:'key_alias') self.key_alias = attributes[:'key_alias'] if attributes[:'key_alias'] self.default_region = attributes[:'defaultRegion'] if attributes[:'defaultRegion'] raise 'You cannot provide both :defaultRegion and :default_region' if attributes.key?(:'defaultRegion') && attributes.key?(:'default_region') self.default_region = attributes[:'default_region'] if attributes[:'default_region'] self.tenant_id = attributes[:'tenantId'] if attributes[:'tenantId'] raise 'You cannot provide both :tenantId and :tenant_id' if attributes.key?(:'tenantId') && attributes.key?(:'tenant_id') self.tenant_id = attributes[:'tenant_id'] if attributes[:'tenant_id'] self.fingerprint = attributes[:'fingerprint'] if attributes[:'fingerprint'] self.pemfilepath = attributes[:'pemfilepath'] if attributes[:'pemfilepath'] 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.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.domain_ocid = attributes[:'domainOcid'] if attributes[:'domainOcid'] raise 'You cannot provide both :domainOcid and :domain_ocid' if attributes.key?(:'domainOcid') && attributes.key?(:'domain_ocid') self.domain_ocid = attributes[:'domain_ocid'] if attributes[:'domain_ocid'] end |
Instance Attribute Details
#default_region ⇒ String
[Required] The name of the region to establish the Object Storage endpoint. Example us-phoenix-1 .
37 38 39 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 37 def default_region @default_region end |
#domain_ocid ⇒ String
Identity domain OCID ,where user is present. For default domain ,this field will be optional.
63 64 65 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 63 def domain_ocid @domain_ocid end |
#fingerprint ⇒ String
[Required] The fingerprint that corresponds to the public API key requested.
45 46 47 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 45 def fingerprint @fingerprint end |
#id ⇒ String
[Required] Identifier of the user's API key.
23 24 25 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 23 def id @id end |
#key_alias ⇒ String
[Required] User friendly identifier used to uniquely differentiate between different API keys. Only ASCII alphanumeric characters with no spaces allowed.
33 34 35 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 33 def key_alias @key_alias end |
#lifecycle_state ⇒ String
[Required] The state of the key.
59 60 61 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 59 def lifecycle_state @lifecycle_state end |
#pemfilepath ⇒ String
[Required] The full path and file name of the private key used for authentication. This location will be automatically selected on the BDS local file system.
51 52 53 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 51 def pemfilepath @pemfilepath end |
#tenant_id ⇒ String
[Required] The OCID of your tenancy.
41 42 43 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 41 def tenant_id @tenant_id end |
#time_created ⇒ DateTime
The time the API key was created, shown as an RFC 3339 formatted datetime string.
55 56 57 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 55 def time_created @time_created end |
#user_id ⇒ String
[Required] The user OCID for which this API key was created.
27 28 29 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 27 def user_id @user_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 66 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'user_id': :'userId', 'key_alias': :'keyAlias', 'default_region': :'defaultRegion', 'tenant_id': :'tenantId', 'fingerprint': :'fingerprint', 'pemfilepath': :'pemfilepath', 'time_created': :'timeCreated', 'lifecycle_state': :'lifecycleState', 'domain_ocid': :'domainOcid' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 84 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'user_id': :'String', 'key_alias': :'String', 'default_region': :'String', 'tenant_id': :'String', 'fingerprint': :'String', 'pemfilepath': :'String', 'time_created': :'DateTime', 'lifecycle_state': :'String', 'domain_ocid': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 192 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && user_id == other.user_id && key_alias == other.key_alias && default_region == other.default_region && tenant_id == other.tenant_id && fingerprint == other.fingerprint && pemfilepath == other.pemfilepath && time_created == other.time_created && lifecycle_state == other.lifecycle_state && domain_ocid == other.domain_ocid end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 231 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
211 212 213 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 211 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
220 221 222 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 220 def hash [id, user_id, key_alias, default_region, tenant_id, fingerprint, pemfilepath, time_created, lifecycle_state, domain_ocid].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
264 265 266 267 268 269 270 271 272 273 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 264 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
258 259 260 |
# File 'lib/oci/bds/models/bds_api_key.rb', line 258 def to_s to_hash.to_s end |