Class: Authentik::Api::OutpostHealth
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Authentik::Api::OutpostHealth
- Defined in:
- lib/authentik/api/models/outpost_health.rb
Overview
Outpost health status
Instance Attribute Summary collapse
-
#build_hash ⇒ Object
Returns the value of attribute build_hash.
-
#build_hash_should ⇒ Object
Returns the value of attribute build_hash_should.
-
#fips_enabled ⇒ Object
Get FIPS enabled.
-
#golang_version ⇒ Object
Returns the value of attribute golang_version.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#last_seen ⇒ Object
Returns the value of attribute last_seen.
-
#openssl_enabled ⇒ Object
Returns the value of attribute openssl_enabled.
-
#openssl_version ⇒ Object
Returns the value of attribute openssl_version.
-
#uid ⇒ Object
Returns the value of attribute uid.
-
#version ⇒ Object
Returns the value of attribute version.
-
#version_outdated ⇒ Object
Returns the value of attribute version_outdated.
-
#version_should ⇒ Object
Returns the value of attribute version_should.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ OutpostHealth
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ OutpostHealth
Initializes the object
93 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 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 171 172 173 174 175 176 177 178 |
# File 'lib/authentik/api/models/outpost_health.rb', line 93 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::OutpostHealth` 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 `Authentik::Api::OutpostHealth`. 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?(:'uid') self.uid = attributes[:'uid'] else self.uid = nil end if attributes.key?(:'last_seen') self.last_seen = attributes[:'last_seen'] else self.last_seen = nil end if attributes.key?(:'version') self.version = attributes[:'version'] else self.version = nil end if attributes.key?(:'golang_version') self.golang_version = attributes[:'golang_version'] else self.golang_version = nil end if attributes.key?(:'openssl_enabled') self.openssl_enabled = attributes[:'openssl_enabled'] else self.openssl_enabled = nil end if attributes.key?(:'openssl_version') self.openssl_version = attributes[:'openssl_version'] else self.openssl_version = nil end if attributes.key?(:'fips_enabled') self.fips_enabled = attributes[:'fips_enabled'] else self.fips_enabled = nil end if attributes.key?(:'version_should') self.version_should = attributes[:'version_should'] else self.version_should = nil end if attributes.key?(:'version_outdated') self.version_outdated = attributes[:'version_outdated'] else self.version_outdated = nil end if attributes.key?(:'build_hash') self.build_hash = attributes[:'build_hash'] else self.build_hash = nil end if attributes.key?(:'build_hash_should') self.build_hash_should = attributes[:'build_hash_should'] else self.build_hash_should = nil end if attributes.key?(:'hostname') self.hostname = attributes[:'hostname'] else self.hostname = nil end end |
Instance Attribute Details
#build_hash ⇒ Object
Returns the value of attribute build_hash.
32 33 34 |
# File 'lib/authentik/api/models/outpost_health.rb', line 32 def build_hash @build_hash end |
#build_hash_should ⇒ Object
Returns the value of attribute build_hash_should.
34 35 36 |
# File 'lib/authentik/api/models/outpost_health.rb', line 34 def build_hash_should @build_hash_should end |
#fips_enabled ⇒ Object
Get FIPS enabled
26 27 28 |
# File 'lib/authentik/api/models/outpost_health.rb', line 26 def fips_enabled @fips_enabled end |
#golang_version ⇒ Object
Returns the value of attribute golang_version.
19 20 21 |
# File 'lib/authentik/api/models/outpost_health.rb', line 19 def golang_version @golang_version end |
#hostname ⇒ Object
Returns the value of attribute hostname.
36 37 38 |
# File 'lib/authentik/api/models/outpost_health.rb', line 36 def hostname @hostname end |
#last_seen ⇒ Object
Returns the value of attribute last_seen.
15 16 17 |
# File 'lib/authentik/api/models/outpost_health.rb', line 15 def last_seen @last_seen end |
#openssl_enabled ⇒ Object
Returns the value of attribute openssl_enabled.
21 22 23 |
# File 'lib/authentik/api/models/outpost_health.rb', line 21 def openssl_enabled @openssl_enabled end |
#openssl_version ⇒ Object
Returns the value of attribute openssl_version.
23 24 25 |
# File 'lib/authentik/api/models/outpost_health.rb', line 23 def openssl_version @openssl_version end |
#uid ⇒ Object
Returns the value of attribute uid.
13 14 15 |
# File 'lib/authentik/api/models/outpost_health.rb', line 13 def uid @uid end |
#version ⇒ Object
Returns the value of attribute version.
17 18 19 |
# File 'lib/authentik/api/models/outpost_health.rb', line 17 def version @version end |
#version_outdated ⇒ Object
Returns the value of attribute version_outdated.
30 31 32 |
# File 'lib/authentik/api/models/outpost_health.rb', line 30 def version_outdated @version_outdated end |
#version_should ⇒ Object
Returns the value of attribute version_should.
28 29 30 |
# File 'lib/authentik/api/models/outpost_health.rb', line 28 def version_should @version_should end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
57 58 59 |
# File 'lib/authentik/api/models/outpost_health.rb', line 57 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
62 63 64 |
# File 'lib/authentik/api/models/outpost_health.rb', line 62 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/authentik/api/models/outpost_health.rb', line 39 def self.attribute_map { :'uid' => :'uid', :'last_seen' => :'last_seen', :'version' => :'version', :'golang_version' => :'golang_version', :'openssl_enabled' => :'openssl_enabled', :'openssl_version' => :'openssl_version', :'fips_enabled' => :'fips_enabled', :'version_should' => :'version_should', :'version_outdated' => :'version_outdated', :'build_hash' => :'build_hash', :'build_hash_should' => :'build_hash_should', :'hostname' => :'hostname' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/authentik/api/models/outpost_health.rb', line 394 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_nullable ⇒ Object
List of attributes with nullable: true
85 86 87 88 89 |
# File 'lib/authentik/api/models/outpost_health.rb', line 85 def self.openapi_nullable Set.new([ :'fips_enabled', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/authentik/api/models/outpost_health.rb', line 67 def self.openapi_types { :'uid' => :'String', :'last_seen' => :'Time', :'version' => :'String', :'golang_version' => :'String', :'openssl_enabled' => :'Boolean', :'openssl_version' => :'String', :'fips_enabled' => :'Boolean', :'version_should' => :'String', :'version_outdated' => :'Boolean', :'build_hash' => :'String', :'build_hash_should' => :'String', :'hostname' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 |
# File 'lib/authentik/api/models/outpost_health.rb', line 362 def ==(o) return true if self.equal?(o) self.class == o.class && uid == o.uid && last_seen == o.last_seen && version == o.version && golang_version == o.golang_version && openssl_enabled == o.openssl_enabled && openssl_version == o.openssl_version && fips_enabled == o.fips_enabled && version_should == o.version_should && version_outdated == o.version_outdated && build_hash == o.build_hash && build_hash_should == o.build_hash_should && hostname == o.hostname end |
#eql?(o) ⇒ Boolean
381 382 383 |
# File 'lib/authentik/api/models/outpost_health.rb', line 381 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
387 388 389 |
# File 'lib/authentik/api/models/outpost_health.rb', line 387 def hash [uid, last_seen, version, golang_version, openssl_enabled, openssl_version, fips_enabled, version_should, version_outdated, build_hash, build_hash_should, hostname].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/authentik/api/models/outpost_health.rb', line 182 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @uid.nil? invalid_properties.push('invalid value for "uid", uid cannot be nil.') end if @last_seen.nil? invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') end if @version.nil? invalid_properties.push('invalid value for "version", version cannot be nil.') end if @golang_version.nil? invalid_properties.push('invalid value for "golang_version", golang_version cannot be nil.') end if @openssl_enabled.nil? invalid_properties.push('invalid value for "openssl_enabled", openssl_enabled cannot be nil.') end if @openssl_version.nil? invalid_properties.push('invalid value for "openssl_version", openssl_version cannot be nil.') end if @version_should.nil? invalid_properties.push('invalid value for "version_should", version_should cannot be nil.') end if @version_outdated.nil? invalid_properties.push('invalid value for "version_outdated", version_outdated cannot be nil.') end if @build_hash.nil? invalid_properties.push('invalid value for "build_hash", build_hash cannot be nil.') end if @build_hash_should.nil? invalid_properties.push('invalid value for "build_hash_should", build_hash_should cannot be nil.') end if @hostname.nil? invalid_properties.push('invalid value for "hostname", hostname cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
416 417 418 419 420 421 422 423 424 425 426 427 428 |
# File 'lib/authentik/api/models/outpost_health.rb', line 416 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
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/authentik/api/models/outpost_health.rb', line 234 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @uid.nil? return false if @last_seen.nil? return false if @version.nil? return false if @golang_version.nil? return false if @openssl_enabled.nil? return false if @openssl_version.nil? return false if @version_should.nil? return false if @version_outdated.nil? return false if @build_hash.nil? return false if @build_hash_should.nil? return false if @hostname.nil? true end |