Class: OCI::CertificatesManagement::Models::UpdateCertificateAuthorityConfigDetails
- Inherits:
-
Object
- Object
- OCI::CertificatesManagement::Models::UpdateCertificateAuthorityConfigDetails
- Defined in:
- lib/oci/certificates_management/models/update_certificate_authority_config_details.rb
Overview
The configuration details for updating a certificate authority (CA). This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
Direct Known Subclasses
UpdateRootCaByGeneratingInternallyConfigDetails, UpdateSubordinateCaIssuedByInternalCaConfigDetails
Constant Summary collapse
- CONFIG_TYPE_ENUM =
[ CONFIG_TYPE_ROOT_CA_GENERATED_INTERNALLY = 'ROOT_CA_GENERATED_INTERNALLY'.freeze, CONFIG_TYPE_SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA = 'SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA'.freeze ].freeze
- STAGE_ENUM =
[ STAGE_CURRENT = 'CURRENT'.freeze, STAGE_PENDING = 'PENDING'.freeze ].freeze
Instance Attribute Summary collapse
-
#config_type ⇒ String
[Required] The origin of the CA.
-
#stage ⇒ String
The rotation state of the CA.
-
#version_name ⇒ String
The name of the CA version.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
.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 = {}) ⇒ UpdateCertificateAuthorityConfigDetails
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 = {}) ⇒ UpdateCertificateAuthorityConfigDetails
Initializes the object
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 85 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.config_type = attributes[:'configType'] if attributes[:'configType'] raise 'You cannot provide both :configType and :config_type' if attributes.key?(:'configType') && attributes.key?(:'config_type') self.config_type = attributes[:'config_type'] if attributes[:'config_type'] self.version_name = attributes[:'versionName'] if attributes[:'versionName'] self.version_name = "null" if version_name.nil? && !attributes.key?(:'versionName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :versionName and :version_name' if attributes.key?(:'versionName') && attributes.key?(:'version_name') self.version_name = attributes[:'version_name'] if attributes[:'version_name'] self.version_name = "null" if version_name.nil? && !attributes.key?(:'versionName') && !attributes.key?(:'version_name') # rubocop:disable Style/StringLiterals self.stage = attributes[:'stage'] if attributes[:'stage'] self.stage = "PENDING" if stage.nil? && !attributes.key?(:'stage') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#config_type ⇒ String
[Required] The origin of the CA.
24 25 26 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 24 def config_type @config_type end |
#stage ⇒ String
The rotation state of the CA. The default is PENDING
, meaning that the CA is staged and available for use. A CA version that you mark as CURRENT
is currently in use, but you don't yet want to rotate it into current, active use. For example, you might create or update a CA and mark its rotation state as PENDING
if you haven't yet updated the certificate on the target system.
36 37 38 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 36 def stage @stage end |
#version_name ⇒ String
The name of the CA version. When the value is not null, a name is unique across versions of a given CA.
29 30 31 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 29 def version_name @version_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
39 40 41 42 43 44 45 46 47 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 39 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'config_type': :'configType', 'version_name': :'versionName', 'stage': :'stage' # rubocop:enable Style/SymbolLiteral } end |
.get_subtype(object_hash) ⇒ Object
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 65 def self.get_subtype(object_hash) type = object_hash[:'configType'] # rubocop:disable Style/SymbolLiteral return 'OCI::CertificatesManagement::Models::UpdateSubordinateCaIssuedByInternalCaConfigDetails' if type == 'SUBORDINATE_CA_ISSUED_BY_INTERNAL_CA' return 'OCI::CertificatesManagement::Models::UpdateRootCaByGeneratingInternallyConfigDetails' if type == 'ROOT_CA_GENERATED_INTERNALLY' # TODO: Log a warning when the subtype is not found. 'OCI::CertificatesManagement::Models::UpdateCertificateAuthorityConfigDetails' end |
.swagger_types ⇒ Object
Attribute type mapping.
50 51 52 53 54 55 56 57 58 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 50 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'config_type': :'String', 'version_name': :'String', 'stage': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
132 133 134 135 136 137 138 139 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 132 def ==(other) return true if equal?(other) self.class == other.class && config_type == other.config_type && version_name == other.version_name && stage == other.stage end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 164 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
144 145 146 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 144 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
153 154 155 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 153 def hash [config_type, version_name, stage].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
197 198 199 200 201 202 203 204 205 206 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 197 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
191 192 193 |
# File 'lib/oci/certificates_management/models/update_certificate_authority_config_details.rb', line 191 def to_s to_hash.to_s end |