Class: OCI::Vault::Models::SecretVersionSummary
- Inherits:
-
Object
- Object
- OCI::Vault::Models::SecretVersionSummary
- Defined in:
- lib/oci/vault/models/secret_version_summary.rb
Overview
The secret version summary object, which doesn't include the contents of the secret.
Constant Summary collapse
- CONTENT_TYPE_ENUM =
[ CONTENT_TYPE_BASE64 = 'BASE64'.freeze, CONTENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- STAGES_ENUM =
[ STAGES_CURRENT = 'CURRENT'.freeze, STAGES_PENDING = 'PENDING'.freeze, STAGES_LATEST = 'LATEST'.freeze, STAGES_PREVIOUS = 'PREVIOUS'.freeze, STAGES_DEPRECATED = 'DEPRECATED'.freeze, STAGES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#content_type ⇒ String
The content type of the secret version's secret contents.
-
#is_content_auto_generated ⇒ BOOLEAN
Boolean flag indicating whether secret content for this secret version was auto-generated or not.
-
#name ⇒ String
The name of the secret version.
-
#secret_id ⇒ String
[Required] The OCID of the secret.
-
#stages ⇒ Array<String>
A list of possible rotation states for the secret version.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format.
-
#time_of_deletion ⇒ DateTime
An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format.
-
#time_of_expiry ⇒ DateTime
An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format.
-
#version_number ⇒ Integer
[Required] The version number of the secret.
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 = {}) ⇒ SecretVersionSummary
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 = {}) ⇒ SecretVersionSummary
Initializes the object
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 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 135 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.content_type = attributes[:'contentType'] if attributes[:'contentType'] raise 'You cannot provide both :contentType and :content_type' if attributes.key?(:'contentType') && attributes.key?(:'content_type') self.content_type = attributes[:'content_type'] if attributes[:'content_type'] self.name = attributes[:'name'] if attributes[:'name'] self.secret_id = attributes[:'secretId'] if attributes[:'secretId'] raise 'You cannot provide both :secretId and :secret_id' if attributes.key?(:'secretId') && attributes.key?(:'secret_id') self.secret_id = attributes[:'secret_id'] if attributes[:'secret_id'] self.stages = attributes[:'stages'] if attributes[:'stages'] 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_of_deletion = attributes[:'timeOfDeletion'] if attributes[:'timeOfDeletion'] raise 'You cannot provide both :timeOfDeletion and :time_of_deletion' if attributes.key?(:'timeOfDeletion') && attributes.key?(:'time_of_deletion') self.time_of_deletion = attributes[:'time_of_deletion'] if attributes[:'time_of_deletion'] self.time_of_expiry = attributes[:'timeOfExpiry'] if attributes[:'timeOfExpiry'] raise 'You cannot provide both :timeOfExpiry and :time_of_expiry' if attributes.key?(:'timeOfExpiry') && attributes.key?(:'time_of_expiry') self.time_of_expiry = attributes[:'time_of_expiry'] if attributes[:'time_of_expiry'] self.version_number = attributes[:'versionNumber'] if attributes[:'versionNumber'] raise 'You cannot provide both :versionNumber and :version_number' if attributes.key?(:'versionNumber') && attributes.key?(:'version_number') self.version_number = attributes[:'version_number'] if attributes[:'version_number'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] self.is_content_auto_generated = attributes[:'isContentAutoGenerated'] unless attributes[:'isContentAutoGenerated'].nil? raise 'You cannot provide both :isContentAutoGenerated and :is_content_auto_generated' if attributes.key?(:'isContentAutoGenerated') && attributes.key?(:'is_content_auto_generated') self.is_content_auto_generated = attributes[:'is_content_auto_generated'] unless attributes[:'is_content_auto_generated'].nil? end |
Instance Attribute Details
#content_type ⇒ String
The content type of the secret version's secret contents.
28 29 30 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 28 def content_type @content_type end |
#is_content_auto_generated ⇒ BOOLEAN
Boolean flag indicating whether secret content for this secret version was auto-generated or not.
81 82 83 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 81 def is_content_auto_generated @is_content_auto_generated end |
#name ⇒ String
The name of the secret version. A name is unique across versions of a secret.
33 34 35 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 33 def name @name end |
#secret_id ⇒ String
[Required] The OCID of the secret.
37 38 39 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 37 def secret_id @secret_id end |
#stages ⇒ Array<String>
A list of possible rotation states for the secret version. A secret version marked CURRENT
is currently in use. A secret version marked PENDING
is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated into current, active use. The secret most recently uploaded to a vault is always marked LATEST
. (The first version of a secret is always marked as both CURRENT
and LATEST
.) A secret version marked PREVIOUS
is the secret version that was most recently marked CURRENT
, before the last secret version rotation. A secret version marked DEPRECATED
is neither current, pending, nor the previous one in use. Only secret versions marked DEPRECATED
can be scheduled for deletion.
47 48 49 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 47 def stages @stages end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
76 77 78 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 76 def @system_tags end |
#time_created ⇒ DateTime
[Required] A optional property indicating when the secret version was created, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
53 54 55 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 53 def time_created @time_created end |
#time_of_deletion ⇒ DateTime
An optional property indicating when to delete the secret version, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
59 60 61 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 59 def time_of_deletion @time_of_deletion end |
#time_of_expiry ⇒ DateTime
An optional property indicating when the secret version will expire, expressed in RFC 3339 timestamp format. Example: 2019-04-03T21:10:29.600Z
65 66 67 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 65 def time_of_expiry @time_of_expiry end |
#version_number ⇒ Integer
[Required] The version number of the secret.
69 70 71 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 69 def version_number @version_number end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 84 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'content_type': :'contentType', 'name': :'name', 'secret_id': :'secretId', 'stages': :'stages', 'time_created': :'timeCreated', 'time_of_deletion': :'timeOfDeletion', 'time_of_expiry': :'timeOfExpiry', 'version_number': :'versionNumber', 'system_tags': :'systemTags', 'is_content_auto_generated': :'isContentAutoGenerated' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 102 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'content_type': :'String', 'name': :'String', 'secret_id': :'String', 'stages': :'Array<String>', 'time_created': :'DateTime', 'time_of_deletion': :'DateTime', 'time_of_expiry': :'DateTime', 'version_number': :'Integer', 'system_tags': :'Hash<String, Hash<String, Object>>', 'is_content_auto_generated': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 234 def ==(other) return true if equal?(other) self.class == other.class && content_type == other.content_type && name == other.name && secret_id == other.secret_id && stages == other.stages && time_created == other.time_created && time_of_deletion == other.time_of_deletion && time_of_expiry == other.time_of_expiry && version_number == other.version_number && == other. && is_content_auto_generated == other.is_content_auto_generated end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 273 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
253 254 255 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 253 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
262 263 264 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 262 def hash [content_type, name, secret_id, stages, time_created, time_of_deletion, time_of_expiry, version_number, , is_content_auto_generated].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
306 307 308 309 310 311 312 313 314 315 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 306 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
300 301 302 |
# File 'lib/oci/vault/models/secret_version_summary.rb', line 300 def to_s to_hash.to_s end |