Class: Authentik::Api::SystemInfoRuntime

Inherits:
ApiModelBase show all
Defined in:
lib/authentik/api/models/system_info_runtime.rb

Overview

Get versions

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 = {}) ⇒ SystemInfoRuntime

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
# File 'lib/authentik/api/models/system_info_runtime.rb', line 76

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Authentik::Api::SystemInfoRuntime` 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::SystemInfoRuntime`. 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?(:'python_version')
    self.python_version = attributes[:'python_version']
  else
    self.python_version = nil
  end

  if attributes.key?(:'environment')
    self.environment = attributes[:'environment']
  else
    self.environment = nil
  end

  if attributes.key?(:'architecture')
    self.architecture = attributes[:'architecture']
  else
    self.architecture = nil
  end

  if attributes.key?(:'platform')
    self.platform = attributes[:'platform']
  else
    self.platform = nil
  end

  if attributes.key?(:'uname')
    self.uname = attributes[:'uname']
  else
    self.uname = nil
  end

  if attributes.key?(:'openssl_version')
    self.openssl_version = attributes[:'openssl_version']
  else
    self.openssl_version = nil
  end

  if attributes.key?(:'openssl_fips_enabled')
    self.openssl_fips_enabled = attributes[:'openssl_fips_enabled']
  else
    self.openssl_fips_enabled = nil
  end

  if attributes.key?(:'authentik_version')
    self.authentik_version = attributes[:'authentik_version']
  else
    self.authentik_version = nil
  end
end

Instance Attribute Details

#architectureObject

Returns the value of attribute architecture.



17
18
19
# File 'lib/authentik/api/models/system_info_runtime.rb', line 17

def architecture
  @architecture
end

#authentik_versionObject

Returns the value of attribute authentik_version.



27
28
29
# File 'lib/authentik/api/models/system_info_runtime.rb', line 27

def authentik_version
  @authentik_version
end

#environmentObject

Returns the value of attribute environment.



15
16
17
# File 'lib/authentik/api/models/system_info_runtime.rb', line 15

def environment
  @environment
end

#openssl_fips_enabledObject

Returns the value of attribute openssl_fips_enabled.



25
26
27
# File 'lib/authentik/api/models/system_info_runtime.rb', line 25

def openssl_fips_enabled
  @openssl_fips_enabled
end

#openssl_versionObject

Returns the value of attribute openssl_version.



23
24
25
# File 'lib/authentik/api/models/system_info_runtime.rb', line 23

def openssl_version
  @openssl_version
end

#platformObject

Returns the value of attribute platform.



19
20
21
# File 'lib/authentik/api/models/system_info_runtime.rb', line 19

def platform
  @platform
end

#python_versionObject

Returns the value of attribute python_version.



13
14
15
# File 'lib/authentik/api/models/system_info_runtime.rb', line 13

def python_version
  @python_version
end

#unameObject

Returns the value of attribute uname.



21
22
23
# File 'lib/authentik/api/models/system_info_runtime.rb', line 21

def uname
  @uname
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



44
45
46
# File 'lib/authentik/api/models/system_info_runtime.rb', line 44

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



49
50
51
# File 'lib/authentik/api/models/system_info_runtime.rb', line 49

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/authentik/api/models/system_info_runtime.rb', line 30

def self.attribute_map
  {
    :'python_version' => :'python_version',
    :'environment' => :'environment',
    :'architecture' => :'architecture',
    :'platform' => :'platform',
    :'uname' => :'uname',
    :'openssl_version' => :'openssl_version',
    :'openssl_fips_enabled' => :'openssl_fips_enabled',
    :'authentik_version' => :'authentik_version'
  }
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



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# File 'lib/authentik/api/models/system_info_runtime.rb', line 289

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



68
69
70
71
72
# File 'lib/authentik/api/models/system_info_runtime.rb', line 68

def self.openapi_nullable
  Set.new([
    :'openssl_fips_enabled',
  ])
end

.openapi_typesObject

Attribute type mapping.



54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/authentik/api/models/system_info_runtime.rb', line 54

def self.openapi_types
  {
    :'python_version' => :'String',
    :'environment' => :'String',
    :'architecture' => :'String',
    :'platform' => :'String',
    :'uname' => :'String',
    :'openssl_version' => :'String',
    :'openssl_fips_enabled' => :'Boolean',
    :'authentik_version' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/authentik/api/models/system_info_runtime.rb', line 261

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      python_version == o.python_version &&
      environment == o.environment &&
      architecture == o.architecture &&
      platform == o.platform &&
      uname == o.uname &&
      openssl_version == o.openssl_version &&
      openssl_fips_enabled == o.openssl_fips_enabled &&
      authentik_version == o.authentik_version
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


276
277
278
# File 'lib/authentik/api/models/system_info_runtime.rb', line 276

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



282
283
284
# File 'lib/authentik/api/models/system_info_runtime.rb', line 282

def hash
  [python_version, environment, architecture, platform, uname, openssl_version, openssl_fips_enabled, authentik_version].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/authentik/api/models/system_info_runtime.rb', line 141

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @python_version.nil?
    invalid_properties.push('invalid value for "python_version", python_version cannot be nil.')
  end

  if @environment.nil?
    invalid_properties.push('invalid value for "environment", environment cannot be nil.')
  end

  if @architecture.nil?
    invalid_properties.push('invalid value for "architecture", architecture cannot be nil.')
  end

  if @platform.nil?
    invalid_properties.push('invalid value for "platform", platform cannot be nil.')
  end

  if @uname.nil?
    invalid_properties.push('invalid value for "uname", uname cannot be nil.')
  end

  if @openssl_version.nil?
    invalid_properties.push('invalid value for "openssl_version", openssl_version cannot be nil.')
  end

  if @authentik_version.nil?
    invalid_properties.push('invalid value for "authentik_version", authentik_version cannot be nil.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/authentik/api/models/system_info_runtime.rb', line 311

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



177
178
179
180
181
182
183
184
185
186
187
# File 'lib/authentik/api/models/system_info_runtime.rb', line 177

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @python_version.nil?
  return false if @environment.nil?
  return false if @architecture.nil?
  return false if @platform.nil?
  return false if @uname.nil?
  return false if @openssl_version.nil?
  return false if @authentik_version.nil?
  true
end