Class: OCI::Database::Models::RotateAutonomousVmClusterOrdsCertsDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb

Overview

The details for configuring the SSL certificates on Autonomous VM Cluster

Constant Summary collapse

CERTIFICATE_GENERATION_TYPE_ENUM =
[
  CERTIFICATE_GENERATION_TYPE_SYSTEM = 'SYSTEM'.freeze,
  CERTIFICATE_GENERATION_TYPE_BYOC = 'BYOC'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ RotateAutonomousVmClusterOrdsCertsDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 70

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.certificate_generation_type = attributes[:'certificateGenerationType'] if attributes[:'certificateGenerationType']

  raise 'You cannot provide both :certificateGenerationType and :certificate_generation_type' if attributes.key?(:'certificateGenerationType') && attributes.key?(:'certificate_generation_type')

  self.certificate_generation_type = attributes[:'certificate_generation_type'] if attributes[:'certificate_generation_type']

  self.certificate_id = attributes[:'certificateId'] if attributes[:'certificateId']

  raise 'You cannot provide both :certificateId and :certificate_id' if attributes.key?(:'certificateId') && attributes.key?(:'certificate_id')

  self.certificate_id = attributes[:'certificate_id'] if attributes[:'certificate_id']

  self.certificate_authority_id = attributes[:'certificateAuthorityId'] if attributes[:'certificateAuthorityId']

  raise 'You cannot provide both :certificateAuthorityId and :certificate_authority_id' if attributes.key?(:'certificateAuthorityId') && attributes.key?(:'certificate_authority_id')

  self.certificate_authority_id = attributes[:'certificate_authority_id'] if attributes[:'certificate_authority_id']

  self.ca_bundle_id = attributes[:'caBundleId'] if attributes[:'caBundleId']

  raise 'You cannot provide both :caBundleId and :ca_bundle_id' if attributes.key?(:'caBundleId') && attributes.key?(:'ca_bundle_id')

  self.ca_bundle_id = attributes[:'ca_bundle_id'] if attributes[:'ca_bundle_id']
end

Instance Attribute Details

#ca_bundle_idString

The OCID of the certificate bundle.

Returns:

  • (String)


34
35
36
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 34

def ca_bundle_id
  @ca_bundle_id
end

#certificate_authority_idString

The OCID of the certificate authority.

Returns:

  • (String)


29
30
31
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 29

def certificate_authority_id
  @certificate_authority_id
end

#certificate_generation_typeString

[Required] Specify SYSTEM to use Oracle-managed certificates. Specify BYOC when you want to bring your own certificate.

Returns:

  • (String)


19
20
21
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 19

def certificate_generation_type
  @certificate_generation_type
end

#certificate_idString

The OCID of the certificate to use.

Returns:

  • (String)


24
25
26
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 24

def certificate_id
  @certificate_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



37
38
39
40
41
42
43
44
45
46
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 37

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'certificate_generation_type': :'certificateGenerationType',
    'certificate_id': :'certificateId',
    'certificate_authority_id': :'certificateAuthorityId',
    'ca_bundle_id': :'caBundleId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



49
50
51
52
53
54
55
56
57
58
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 49

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'certificate_generation_type': :'String',
    'certificate_id': :'String',
    'certificate_authority_id': :'String',
    'ca_bundle_id': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



116
117
118
119
120
121
122
123
124
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 116

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    certificate_generation_type == other.certificate_generation_type &&
    certificate_id == other.certificate_id &&
    certificate_authority_id == other.certificate_authority_id &&
    ca_bundle_id == other.ca_bundle_id
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 149

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


129
130
131
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 129

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



138
139
140
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 138

def hash
  [certificate_generation_type, certificate_id, certificate_authority_id, ca_bundle_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



182
183
184
185
186
187
188
189
190
191
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 182

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



176
177
178
# File 'lib/oci/database/models/rotate_autonomous_vm_cluster_ords_certs_details.rb', line 176

def to_s
  to_hash.to_s
end