Class: OCI::Marketplace::Models::MarketplaceMetadataPublicKeySummary
- Inherits:
-
Object
- Object
- OCI::Marketplace::Models::MarketplaceMetadataPublicKeySummary
- Defined in:
- lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb
Overview
Model that contains signed marketplace instance metadata and associated signature in JWT form
Instance Attribute Summary collapse
-
#certificate_chain ⇒ Array<String>
[Required] chain of certificates used to sign JWT.
-
#certificate_thumbprint ⇒ String
[Required] unique identifier of associated X509 certificate.
-
#exponent ⇒ String
[Required] base64 encoded exponent for public key.
-
#key_algorithm ⇒ String
[Required] algorithm for public key (i.e. RS256).
-
#key_id ⇒ String
[Required] unique id that maps to public certificate, directs user which certificate to use to verfiy.
-
#key_type ⇒ String
[Required] key type (i.e. RSA).
-
#key_use ⇒ String
[Required] how key is to be used.
-
#modulus ⇒ String
[Required] RSA public modulus.
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 = {}) ⇒ MarketplaceMetadataPublicKeySummary
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 = {}) ⇒ MarketplaceMetadataPublicKeySummary
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 131 132 133 134 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.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.key_algorithm = attributes[:'keyAlgorithm'] if attributes[:'keyAlgorithm'] raise 'You cannot provide both :keyAlgorithm and :key_algorithm' if attributes.key?(:'keyAlgorithm') && attributes.key?(:'key_algorithm') self.key_algorithm = attributes[:'key_algorithm'] if attributes[:'key_algorithm'] self.key_type = attributes[:'keyType'] if attributes[:'keyType'] raise 'You cannot provide both :keyType and :key_type' if attributes.key?(:'keyType') && attributes.key?(:'key_type') self.key_type = attributes[:'key_type'] if attributes[:'key_type'] self.key_use = attributes[:'keyUse'] if attributes[:'keyUse'] raise 'You cannot provide both :keyUse and :key_use' if attributes.key?(:'keyUse') && attributes.key?(:'key_use') self.key_use = attributes[:'key_use'] if attributes[:'key_use'] self.key_id = attributes[:'keyId'] if attributes[:'keyId'] raise 'You cannot provide both :keyId and :key_id' if attributes.key?(:'keyId') && attributes.key?(:'key_id') self.key_id = attributes[:'key_id'] if attributes[:'key_id'] self.exponent = attributes[:'exponent'] if attributes[:'exponent'] self.modulus = attributes[:'modulus'] if attributes[:'modulus'] self.certificate_chain = attributes[:'certificateChain'] if attributes[:'certificateChain'] raise 'You cannot provide both :certificateChain and :certificate_chain' if attributes.key?(:'certificateChain') && attributes.key?(:'certificate_chain') self.certificate_chain = attributes[:'certificate_chain'] if attributes[:'certificate_chain'] self.certificate_thumbprint = attributes[:'certificateThumbprint'] if attributes[:'certificateThumbprint'] raise 'You cannot provide both :certificateThumbprint and :certificate_thumbprint' if attributes.key?(:'certificateThumbprint') && attributes.key?(:'certificate_thumbprint') self.certificate_thumbprint = attributes[:'certificate_thumbprint'] if attributes[:'certificate_thumbprint'] end |
Instance Attribute Details
#certificate_chain ⇒ Array<String>
[Required] chain of certificates used to sign JWT
37 38 39 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 37 def certificate_chain @certificate_chain end |
#certificate_thumbprint ⇒ String
[Required] unique identifier of associated X509 certificate
41 42 43 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 41 def certificate_thumbprint @certificate_thumbprint end |
#exponent ⇒ String
[Required] base64 encoded exponent for public key
29 30 31 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 29 def exponent @exponent end |
#key_algorithm ⇒ String
[Required] algorithm for public key (i.e. RS256)
13 14 15 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 13 def key_algorithm @key_algorithm end |
#key_id ⇒ String
[Required] unique id that maps to public certificate, directs user which certificate to use to verfiy
25 26 27 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 25 def key_id @key_id end |
#key_type ⇒ String
[Required] key type (i.e. RSA)
17 18 19 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 17 def key_type @key_type end |
#key_use ⇒ String
[Required] how key is to be used
21 22 23 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 21 def key_use @key_use end |
#modulus ⇒ String
[Required] RSA public modulus
33 34 35 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 33 def modulus @modulus end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'key_algorithm': :'keyAlgorithm', 'key_type': :'keyType', 'key_use': :'keyUse', 'key_id': :'keyId', 'exponent': :'exponent', 'modulus': :'modulus', 'certificate_chain': :'certificateChain', 'certificate_thumbprint': :'certificateThumbprint' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 60 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'key_algorithm': :'String', 'key_type': :'String', 'key_use': :'String', 'key_id': :'String', 'exponent': :'String', 'modulus': :'String', 'certificate_chain': :'Array<String>', 'certificate_thumbprint': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 143 def ==(other) return true if equal?(other) self.class == other.class && key_algorithm == other.key_algorithm && key_type == other.key_type && key_use == other.key_use && key_id == other.key_id && exponent == other.exponent && modulus == other.modulus && certificate_chain == other.certificate_chain && certificate_thumbprint == other.certificate_thumbprint end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 180 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
160 161 162 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 160 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
169 170 171 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 169 def hash [key_algorithm, key_type, key_use, key_id, exponent, modulus, certificate_chain, certificate_thumbprint].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
213 214 215 216 217 218 219 220 221 222 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 213 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
207 208 209 |
# File 'lib/oci/marketplace/models/marketplace_metadata_public_key_summary.rb', line 207 def to_s to_hash.to_s end |