Class: OCI::Opensearch::Models::CertificateConfig
- Inherits:
-
Object
- Object
- OCI::Opensearch::Models::CertificateConfig
- Defined in:
- lib/oci/opensearch/models/certificate_config.rb
Overview
Custom certificate config for customer provided certs.
Constant Summary collapse
- CLUSTER_CERTIFICATE_MODE_ENUM =
[ CLUSTER_CERTIFICATE_MODE_OCI_CERTIFICATES_SERVICE = 'OCI_CERTIFICATES_SERVICE'.freeze, CLUSTER_CERTIFICATE_MODE_OPENSEARCH_SERVICE = 'OPENSEARCH_SERVICE'.freeze, CLUSTER_CERTIFICATE_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- DASHBOARD_CERTIFICATE_MODE_ENUM =
[ DASHBOARD_CERTIFICATE_MODE_OCI_CERTIFICATES_SERVICE = 'OCI_CERTIFICATES_SERVICE'.freeze, DASHBOARD_CERTIFICATE_MODE_OPENSEARCH_SERVICE = 'OPENSEARCH_SERVICE'.freeze, DASHBOARD_CERTIFICATE_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#cluster_certificate_mode ⇒ String
Specifies whether the certificate to be used in cluster is managed by OpenSearch or OCI Certificates service.
-
#dashboard_certificate_mode ⇒ String
Specifies whether the certificate to be used in dashboard is managed by OpenSearch or OCI Certificates service.
-
#open_search_api_certificate_id ⇒ String
certificate to be used for OpenSearch cluster api communication.
-
#open_search_dashboard_certificate_id ⇒ String
certificate to be used for OpenSearch dashboard api communication.
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 = {}) ⇒ CertificateConfig
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 = {}) ⇒ CertificateConfig
Initializes the object
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 100 101 102 103 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 74 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.cluster_certificate_mode = attributes[:'clusterCertificateMode'] if attributes[:'clusterCertificateMode'] raise 'You cannot provide both :clusterCertificateMode and :cluster_certificate_mode' if attributes.key?(:'clusterCertificateMode') && attributes.key?(:'cluster_certificate_mode') self.cluster_certificate_mode = attributes[:'cluster_certificate_mode'] if attributes[:'cluster_certificate_mode'] self.dashboard_certificate_mode = attributes[:'dashboardCertificateMode'] if attributes[:'dashboardCertificateMode'] raise 'You cannot provide both :dashboardCertificateMode and :dashboard_certificate_mode' if attributes.key?(:'dashboardCertificateMode') && attributes.key?(:'dashboard_certificate_mode') self.dashboard_certificate_mode = attributes[:'dashboard_certificate_mode'] if attributes[:'dashboard_certificate_mode'] self.open_search_api_certificate_id = attributes[:'openSearchApiCertificateId'] if attributes[:'openSearchApiCertificateId'] raise 'You cannot provide both :openSearchApiCertificateId and :open_search_api_certificate_id' if attributes.key?(:'openSearchApiCertificateId') && attributes.key?(:'open_search_api_certificate_id') self.open_search_api_certificate_id = attributes[:'open_search_api_certificate_id'] if attributes[:'open_search_api_certificate_id'] self.open_search_dashboard_certificate_id = attributes[:'openSearchDashboardCertificateId'] if attributes[:'openSearchDashboardCertificateId'] raise 'You cannot provide both :openSearchDashboardCertificateId and :open_search_dashboard_certificate_id' if attributes.key?(:'openSearchDashboardCertificateId') && attributes.key?(:'open_search_dashboard_certificate_id') self.open_search_dashboard_certificate_id = attributes[:'open_search_dashboard_certificate_id'] if attributes[:'open_search_dashboard_certificate_id'] end |
Instance Attribute Details
#cluster_certificate_mode ⇒ String
Specifies whether the certificate to be used in cluster is managed by OpenSearch or OCI Certificates service.
26 27 28 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 26 def cluster_certificate_mode @cluster_certificate_mode end |
#dashboard_certificate_mode ⇒ String
Specifies whether the certificate to be used in dashboard is managed by OpenSearch or OCI Certificates service.
30 31 32 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 30 def dashboard_certificate_mode @dashboard_certificate_mode end |
#open_search_api_certificate_id ⇒ String
certificate to be used for OpenSearch cluster api communication
34 35 36 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 34 def open_search_api_certificate_id @open_search_api_certificate_id end |
#open_search_dashboard_certificate_id ⇒ String
certificate to be used for OpenSearch dashboard api communication
38 39 40 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 38 def open_search_dashboard_certificate_id @open_search_dashboard_certificate_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'cluster_certificate_mode': :'clusterCertificateMode', 'dashboard_certificate_mode': :'dashboardCertificateMode', 'open_search_api_certificate_id': :'openSearchApiCertificateId', 'open_search_dashboard_certificate_id': :'openSearchDashboardCertificateId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 53 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'cluster_certificate_mode': :'String', 'dashboard_certificate_mode': :'String', 'open_search_api_certificate_id': :'String', 'open_search_dashboard_certificate_id': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 138 def ==(other) return true if equal?(other) self.class == other.class && cluster_certificate_mode == other.cluster_certificate_mode && dashboard_certificate_mode == other.dashboard_certificate_mode && open_search_api_certificate_id == other.open_search_api_certificate_id && open_search_dashboard_certificate_id == other.open_search_dashboard_certificate_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 171 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
151 152 153 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 151 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
160 161 162 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 160 def hash [cluster_certificate_mode, dashboard_certificate_mode, open_search_api_certificate_id, open_search_dashboard_certificate_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
204 205 206 207 208 209 210 211 212 213 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 204 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
198 199 200 |
# File 'lib/oci/opensearch/models/certificate_config.rb', line 198 def to_s to_hash.to_s end |