Class: OCI::Bds::Models::CertificateServiceInfoSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/bds/models/certificate_service_info_summary.rb

Overview

List of TLS/SSL information of services

Constant Summary collapse

SERVICE_ENUM =
[
  SERVICE_ZOOKEEPER = 'ZOOKEEPER'.freeze,
  SERVICE_AMS = 'AMS'.freeze,
  SERVICE_HDFS = 'HDFS'.freeze,
  SERVICE_YARN = 'YARN'.freeze,
  SERVICE_MAPREDUCE = 'MAPREDUCE'.freeze,
  SERVICE_OOZIE = 'OOZIE'.freeze,
  SERVICE_HBASE = 'HBASE'.freeze,
  SERVICE_SPARK = 'SPARK'.freeze,
  SERVICE_HIVE = 'HIVE'.freeze,
  SERVICE_KAFKA = 'KAFKA'.freeze,
  SERVICE_FLINK = 'FLINK'.freeze,
  SERVICE_REGISTRY = 'REGISTRY'.freeze,
  SERVICE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
SERVICE_CERTIFICATE_STATUS_ENUM =
[
  SERVICE_CERTIFICATE_STATUS_ENABLED = 'ENABLED'.freeze,
  SERVICE_CERTIFICATE_STATUS_DISABLED = 'DISABLED'.freeze,
  SERVICE_CERTIFICATE_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CertificateServiceInfoSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 77

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

  self.service_certificate_status = attributes[:'serviceCertificateStatus'] if attributes[:'serviceCertificateStatus']

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

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

  self.host_specific_certificate_details = attributes[:'hostSpecificCertificateDetails'] if attributes[:'hostSpecificCertificateDetails']

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

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

Instance Attribute Details

#host_specific_certificate_detailsArray<OCI::Bds::Models::HostSpecificCertificateDetails>

[Required] List of Host specific certificate details



44
45
46
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 44

def host_specific_certificate_details
  @host_specific_certificate_details
end

#serviceString

[Required] Name of the service

Returns:

  • (String)


36
37
38
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 36

def service
  @service
end

#service_certificate_statusString

[Required] Whether certificate is enabled or disabled

Returns:

  • (String)


40
41
42
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 40

def service_certificate_status
  @service_certificate_status
end

Class Method Details

.attribute_mapObject

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



47
48
49
50
51
52
53
54
55
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 47

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'service': :'service',
    'service_certificate_status': :'serviceCertificateStatus',
    'host_specific_certificate_details': :'hostSpecificCertificateDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



58
59
60
61
62
63
64
65
66
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 58

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'service': :'String',
    'service_certificate_status': :'String',
    'host_specific_certificate_details': :'Array<OCI::Bds::Models::HostSpecificCertificateDetails>'
    # 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



131
132
133
134
135
136
137
138
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 131

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

  self.class == other.class &&
    service == other.service &&
    service_certificate_status == other.service_certificate_status &&
    host_specific_certificate_details == other.host_specific_certificate_details
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



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 163

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


143
144
145
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 143

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



152
153
154
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 152

def hash
  [service, service_certificate_status, host_specific_certificate_details].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



196
197
198
199
200
201
202
203
204
205
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 196

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



190
191
192
# File 'lib/oci/bds/models/certificate_service_info_summary.rb', line 190

def to_s
  to_hash.to_s
end