Class: OCI::CloudBridge::Models::OlvmCertificate
- Inherits:
-
Object
- Object
- OCI::CloudBridge::Models::OlvmCertificate
- Defined in:
- lib/oci/cloud_bridge/models/olvm_certificate.rb
Overview
The TLS certificate in case of a TLS connection.
Instance Attribute Summary collapse
-
#certificate_description ⇒ String
A human-readable description in plain text.
-
#comment ⇒ String
Free text containing comments about this object.
-
#content ⇒ String
Content of the certificate.
-
#id ⇒ String
A unique identifier.
-
#name ⇒ String
A human-readable name in plain text.
-
#organization ⇒ String
Organization of the certificate.
-
#subject ⇒ String
Subject of the certificate.
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 = {}) ⇒ OlvmCertificate
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 = {}) ⇒ OlvmCertificate
Initializes the object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 82 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.comment = attributes[:'comment'] if attributes[:'comment'] self.content = attributes[:'content'] if attributes[:'content'] self.certificate_description = attributes[:'certificateDescription'] if attributes[:'certificateDescription'] raise 'You cannot provide both :certificateDescription and :certificate_description' if attributes.key?(:'certificateDescription') && attributes.key?(:'certificate_description') self.certificate_description = attributes[:'certificate_description'] if attributes[:'certificate_description'] self.id = attributes[:'id'] if attributes[:'id'] self.name = attributes[:'name'] if attributes[:'name'] self.organization = attributes[:'organization'] if attributes[:'organization'] self.subject = attributes[:'subject'] if attributes[:'subject'] end |
Instance Attribute Details
#certificate_description ⇒ String
A human-readable description in plain text.
21 22 23 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 21 def certificate_description @certificate_description end |
#comment ⇒ String
Free text containing comments about this object.
13 14 15 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 13 def comment @comment end |
#content ⇒ String
Content of the certificate.
17 18 19 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 17 def content @content end |
#id ⇒ String
A unique identifier.
25 26 27 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 25 def id @id end |
#name ⇒ String
A human-readable name in plain text.
29 30 31 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 29 def name @name end |
#organization ⇒ String
Organization of the certificate
33 34 35 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 33 def organization @organization end |
#subject ⇒ String
Subject of the certificate
37 38 39 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 37 def subject @subject end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 40 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'comment': :'comment', 'content': :'content', 'certificate_description': :'certificateDescription', 'id': :'id', 'name': :'name', 'organization': :'organization', 'subject': :'subject' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'comment': :'String', 'content': :'String', 'certificate_description': :'String', 'id': :'String', 'name': :'String', 'organization': :'String', 'subject': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 114 def ==(other) return true if equal?(other) self.class == other.class && comment == other.comment && content == other.content && certificate_description == other.certificate_description && id == other.id && name == other.name && organization == other.organization && subject == other.subject end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 150 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
130 131 132 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 130 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
139 140 141 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 139 def hash [comment, content, certificate_description, id, name, organization, subject].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 183 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
177 178 179 |
# File 'lib/oci/cloud_bridge/models/olvm_certificate.rb', line 177 def to_s to_hash.to_s end |