Class: OCI::CertificatesManagement::Models::CreateCertificateConfigDetails
- Inherits:
 - 
      Object
      
        
- Object
 - OCI::CertificatesManagement::Models::CreateCertificateConfigDetails
 
 
- Defined in:
 - lib/oci/certificates_management/models/create_certificate_config_details.rb
 
Overview
The details of the contents of the certificate and certificate metadata. 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
CreateCertificateByImportingConfigDetails, CreateCertificateIssuedByInternalCaConfigDetails, CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails
Constant Summary collapse
- CONFIG_TYPE_ENUM =
 [ CONFIG_TYPE_ISSUED_BY_INTERNAL_CA = 'ISSUED_BY_INTERNAL_CA'.freeze, CONFIG_TYPE_MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA = 'MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA'.freeze, CONFIG_TYPE_IMPORTED = 'IMPORTED'.freeze ].freeze
Instance Attribute Summary collapse
- 
  
    
      #config_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
[Required] The origin of the certificate.
 - 
  
    
      #version_name  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
A name for the certificate.
 
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 = {})  ⇒ CreateCertificateConfigDetails 
    
    
  
  
  
    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 = {}) ⇒ CreateCertificateConfigDetails
Initializes the object
      71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 71 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 end  | 
  
Instance Attribute Details
#config_type ⇒ String
[Required] The origin of the certificate.
      20 21 22  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 20 def config_type @config_type end  | 
  
#version_name ⇒ String
A name for the certificate. When the value is not null, a name is unique across versions of a given certificate.
      24 25 26  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 24 def version_name @version_name end  | 
  
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
      27 28 29 30 31 32 33 34  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 27 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'config_type': :'configType', 'version_name': :'versionName' # 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.
      51 52 53 54 55 56 57 58 59 60  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 51 def self.get_subtype(object_hash) type = object_hash[:'configType'] # rubocop:disable Style/SymbolLiteral return 'OCI::CertificatesManagement::Models::CreateCertificateManagedExternallyIssuedByInternalCaConfigDetails' if type == 'MANAGED_EXTERNALLY_ISSUED_BY_INTERNAL_CA' return 'OCI::CertificatesManagement::Models::CreateCertificateIssuedByInternalCaConfigDetails' if type == 'ISSUED_BY_INTERNAL_CA' return 'OCI::CertificatesManagement::Models::CreateCertificateByImportingConfigDetails' if type == 'IMPORTED' # TODO: Log a warning when the subtype is not found. 'OCI::CertificatesManagement::Models::CreateCertificateConfigDetails' end  | 
  
.swagger_types ⇒ Object
Attribute type mapping.
      37 38 39 40 41 42 43 44  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 37 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'config_type': :'String', 'version_name': :'String' # rubocop:enable Style/SymbolLiteral } end  | 
  
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
      107 108 109 110 111 112 113  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 107 def ==(other) return true if equal?(other) self.class == other.class && config_type == other.config_type && version_name == other.version_name end  | 
  
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
      138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 138 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
      118 119 120  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 118 def eql?(other) self == other end  | 
  
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
      127 128 129  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 127 def hash [config_type, version_name].hash end  | 
  
#to_hash ⇒ Hash
Returns the object in the form of hash
      171 172 173 174 175 176 177 178 179 180  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 171 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
      165 166 167  | 
    
      # File 'lib/oci/certificates_management/models/create_certificate_config_details.rb', line 165 def to_s to_hash.to_s end  |