Class: OCI::Wlms::Models::ScanResultSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/wlms/models/scan_result_summary.rb

Overview

The result of a server check in a managed instance.

Constant Summary collapse

SERVER_CHECK_STATUS_ENUM =
[
  SERVER_CHECK_STATUS_OK = 'OK'.freeze,
  SERVER_CHECK_STATUS_WARNING = 'WARNING'.freeze,
  SERVER_CHECK_STATUS_FAILURE = 'FAILURE'.freeze,
  SERVER_CHECK_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 = {}) ⇒ ScanResultSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 94

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

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

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

  self.server_name = attributes[:'serverName'] if attributes[:'serverName']

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

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

  self.time_of_server_check = attributes[:'timeOfServerCheck'] if attributes[:'timeOfServerCheck']

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

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

  self.server_check_status = attributes[:'serverCheckStatus'] if attributes[:'serverCheckStatus']

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

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

  self.server_check_name = attributes[:'serverCheckName'] if attributes[:'serverCheckName']

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

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

  self.server_check_result_id = attributes[:'serverCheckResultId'] if attributes[:'serverCheckResultId']

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

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

  self.server_check_result = attributes[:'serverCheckResult'] if attributes[:'serverCheckResult']

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

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

Instance Attribute Details

#server_check_nameString

[Required] The name of the check performed.

Returns:

  • (String)


41
42
43
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 41

def server_check_name
  @server_check_name
end

#server_check_resultString

[Required] The result of the server check.

Returns:

  • (String)


49
50
51
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 49

def server_check_result
  @server_check_result
end

#server_check_result_idString

The identifier of the the server check result.

Returns:

  • (String)


45
46
47
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 45

def server_check_result_id
  @server_check_result_id
end

#server_check_statusString

[Required] The status of the server check which is OK, FAILURE, or WARNING.

Returns:

  • (String)


37
38
39
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 37

def server_check_status
  @server_check_status
end

#server_nameString

[Required] The name of the WebLogic server to which the server check belongs.

Returns:

  • (String)


26
27
28
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 26

def server_name
  @server_name
end

#time_of_server_checkDateTime

[Required] The date when the WebLogic server health check is performed (in RFC 3339 format).

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


33
34
35
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 33

def time_of_server_check
  @time_of_server_check
end

#wls_domain_idString

[Required] The OCID of the WebLogic domain.

Returns:

  • (String)


22
23
24
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 22

def wls_domain_id
  @wls_domain_id
end

Class Method Details

.attribute_mapObject

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



52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 52

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'wls_domain_id': :'wlsDomainId',
    'server_name': :'serverName',
    'time_of_server_check': :'timeOfServerCheck',
    'server_check_status': :'serverCheckStatus',
    'server_check_name': :'serverCheckName',
    'server_check_result_id': :'serverCheckResultId',
    'server_check_result': :'serverCheckResult'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 67

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'wls_domain_id': :'String',
    'server_name': :'String',
    'time_of_server_check': :'DateTime',
    'server_check_status': :'String',
    'server_check_name': :'String',
    'server_check_result_id': :'String',
    'server_check_result': :'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



163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 163

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

  self.class == other.class &&
    wls_domain_id == other.wls_domain_id &&
    server_name == other.server_name &&
    time_of_server_check == other.time_of_server_check &&
    server_check_status == other.server_check_status &&
    server_check_name == other.server_check_name &&
    server_check_result_id == other.server_check_result_id &&
    server_check_result == other.server_check_result
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



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 199

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


179
180
181
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 179

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



188
189
190
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 188

def hash
  [wls_domain_id, server_name, time_of_server_check, server_check_status, server_check_name, server_check_result_id, server_check_result].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



232
233
234
235
236
237
238
239
240
241
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 232

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



226
227
228
# File 'lib/oci/wlms/models/scan_result_summary.rb', line 226

def to_s
  to_hash.to_s
end