Class: IbmCloudGlobalTagging::HealthSummary

Inherits:
ApiModelBase show all
Defined in:
lib/ibm_cloud_global_tagging/models/health_summary.rb

Overview

Information about of microservice health.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ HealthSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 109

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudGlobalTagging::HealthSummary` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `IbmCloudGlobalTagging::HealthSummary`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'plan')
    self.plan = attributes[:'plan']
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  end

  if attributes.key?(:'dep_status')
    self.dep_status = attributes[:'dep_status']
  end

  if attributes.key?(:'service_input')
    self.service_input = attributes[:'service_input']
  end

  if attributes.key?(:'response_time')
    self.response_time = attributes[:'response_time']
  end

  if attributes.key?(:'deploy_version')
    self.deploy_version = attributes[:'deploy_version']
  end

  if attributes.key?(:'dep_cloudant_tag_db')
    self.dep_cloudant_tag_db = attributes[:'dep_cloudant_tag_db']
  end

  if attributes.key?(:'service_output')
    self.service_output = attributes[:'service_output']
  end

  if attributes.key?(:'dep_istio_egress')
    self.dep_istio_egress = attributes[:'dep_istio_egress']
  end

  if attributes.key?(:'dep_maintenance')
    self.dep_maintenance = attributes[:'dep_maintenance']
  end

  if attributes.key?(:'dep_iam_xacml')
    self.dep_iam_xacml = attributes[:'dep_iam_xacml']
  end

  if attributes.key?(:'dep_user_mgmt')
    self.dep_user_mgmt = attributes[:'dep_user_mgmt']
  end
end

Instance Attribute Details

#dep_cloudant_tag_dbObject

Cloudant cluster dependencies status



38
39
40
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 38

def dep_cloudant_tag_db
  @dep_cloudant_tag_db
end

#dep_iam_xacmlObject

IAM dependency status



50
51
52
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 50

def dep_iam_xacml
  @dep_iam_xacml
end

#dep_istio_egressObject

Istio cluster dependencies status



44
45
46
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 44

def dep_istio_egress
  @dep_istio_egress
end

#dep_maintenanceObject

Maintenance status



47
48
49
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 47

def dep_maintenance
  @dep_maintenance
end

#dep_statusObject

status dependencies service



26
27
28
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 26

def dep_status
  @dep_status
end

#dep_user_mgmtObject

User management dependency status



53
54
55
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 53

def dep_user_mgmt
  @dep_user_mgmt
end

#deploy_versionObject

deploy version



35
36
37
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 35

def deploy_version
  @deploy_version
end

#planObject

plan service



20
21
22
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 20

def plan
  @plan
end

#response_timeObject

response Time



32
33
34
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 32

def response_time
  @response_time
end

#service_inputObject

service input



29
30
31
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 29

def service_input
  @service_input
end

#service_outputObject

service output



41
42
43
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 41

def service_output
  @service_output
end

#statusObject

status service



23
24
25
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 23

def status
  @status
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



74
75
76
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 74

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



79
80
81
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 79

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 56

def self.attribute_map
  {
    :'plan' => :'plan',
    :'status' => :'status',
    :'dep_status' => :'depStatus',
    :'service_input' => :'serviceInput',
    :'response_time' => :'responseTime',
    :'deploy_version' => :'deployVersion',
    :'dep_cloudant_tag_db' => :'depCloudantTagDb',
    :'service_output' => :'serviceOutput',
    :'dep_istio_egress' => :'depIstioEgress',
    :'dep_maintenance' => :'depMaintenance',
    :'dep_iam_xacml' => :'depIamXacml',
    :'dep_user_mgmt' => :'depUserMgmt'
  }
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



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 221

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



102
103
104
105
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 102

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 84

def self.openapi_types
  {
    :'plan' => :'String',
    :'status' => :'String',
    :'dep_status' => :'String',
    :'service_input' => :'String',
    :'response_time' => :'Integer',
    :'deploy_version' => :'String',
    :'dep_cloudant_tag_db' => :'Integer',
    :'service_output' => :'String',
    :'dep_istio_egress' => :'Integer',
    :'dep_maintenance' => :'Integer',
    :'dep_iam_xacml' => :'Integer',
    :'dep_user_mgmt' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 189

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      plan == o.plan &&
      status == o.status &&
      dep_status == o.dep_status &&
      service_input == o.service_input &&
      response_time == o.response_time &&
      deploy_version == o.deploy_version &&
      dep_cloudant_tag_db == o.dep_cloudant_tag_db &&
      service_output == o.service_output &&
      dep_istio_egress == o.dep_istio_egress &&
      dep_maintenance == o.dep_maintenance &&
      dep_iam_xacml == o.dep_iam_xacml &&
      dep_user_mgmt == o.dep_user_mgmt
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


208
209
210
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 208

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



214
215
216
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 214

def hash
  [plan, status, dep_status, service_input, response_time, deploy_version, dep_cloudant_tag_db, service_output, dep_istio_egress, dep_maintenance, dep_iam_xacml, dep_user_mgmt].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



174
175
176
177
178
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 174

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



243
244
245
246
247
248
249
250
251
252
253
254
255
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 243

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



182
183
184
185
# File 'lib/ibm_cloud_global_tagging/models/health_summary.rb', line 182

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end