Class: ConnectWise::ManagementItSolution

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise/models/management_it_solution.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ManagementItSolution

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Raises:

  • (ArgumentError)


156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
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
# File 'lib/connect_wise/models/management_it_solution.rb', line 156

def initialize(attributes = {})
  raise ArgumentError, 'The input argument (attributes) must be a hash in `ConnectWise::ManagementItSolution` initialize method' unless attributes.is_a?(Hash)

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) do |(k, v), h|
    raise ArgumentError, "`#{k}` is not a valid attribute in `ConnectWise::ManagementItSolution`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect unless self.class.attribute_map.key?(k.to_sym)

    h[k.to_sym] = v
  end

  self.name = attributes[:name] if attributes.key?(:name)

  self.management_it_solution_type = attributes[:management_it_solution_type] if attributes.key?(:management_it_solution_type)

  self.id = attributes[:id] if attributes.key?(:id)

  self.management_solution_name = attributes[:management_solution_name] if attributes.key?(:management_solution_name)

  self.management_server_url = attributes[:management_server_url] if attributes.key?(:management_server_url)

  self.webservice_override_url = attributes[:webservice_override_url] if attributes.key?(:webservice_override_url)

  self. = attributes[:portal_override_login_url] if attributes.key?(:portal_override_login_url)

  self. = attributes[:global_login_flag] if attributes.key?(:global_login_flag)

  self. = attributes[:global_login_username] if attributes.key?(:global_login_username)

  self. = attributes[:global_login_password] if attributes.key?(:global_login_password)

  self.using_ssl_flag = attributes[:using_ssl_flag] if attributes.key?(:using_ssl_flag)

  self.n_able_username = attributes[:n_able_username] if attributes.key?(:n_able_username)

  self.n_able_password = attributes[:n_able_password] if attributes.key?(:n_able_password)

  self.override_web_service_location_flag = attributes[:override_web_service_location_flag] if attributes.key?(:override_web_service_location_flag)

  self. = attributes[:override_login_location_flag] if attributes.key?(:override_login_location_flag)

  self.continuum_api_username = attributes[:continuum_api_username] if attributes.key?(:continuum_api_username)

  self.continuum_api_password = attributes[:continuum_api_password] if attributes.key?(:continuum_api_password)

  self.level_api_username = attributes[:level_api_username] if attributes.key?(:level_api_username)

  self.level_api_password = attributes[:level_api_password] if attributes.key?(:level_api_password)

  self.level_var_domain = attributes[:level_var_domain] if attributes.key?(:level_var_domain)

  self.no_display_flag = attributes[:no_display_flag] if attributes.key?(:no_display_flag)

  return unless attributes.key?(:_info)
  return unless (value = attributes[:_info]).is_a?(Hash)

  self._info = value
end

Instance Attribute Details

#_infoObject

Returns the value of attribute _info.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def _info
  @_info
end

#continuum_api_passwordObject

This is only required for Continuum solution Max length: 100;



49
50
51
# File 'lib/connect_wise/models/management_it_solution.rb', line 49

def continuum_api_password
  @continuum_api_password
end

#continuum_api_usernameObject

This is only required for Continuum solution Max length: 100;



46
47
48
# File 'lib/connect_wise/models/management_it_solution.rb', line 46

def continuum_api_username
  @continuum_api_username
end

#global_login_flagObject

Returns the value of attribute global_login_flag.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def 
  @global_login_flag
end

#global_login_passwordObject

This is only required when globalLoginFlag = true Max length: 50;



37
38
39
# File 'lib/connect_wise/models/management_it_solution.rb', line 37

def 
  @global_login_password
end

#global_login_usernameObject

This is only required when globalLoginFlag = true Max length: 50;



34
35
36
# File 'lib/connect_wise/models/management_it_solution.rb', line 34

def 
  @global_login_username
end

#idObject

Returns the value of attribute id.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def id
  @id
end

#level_api_passwordObject

This is only required for Level Platforms solution Max length: 100;



55
56
57
# File 'lib/connect_wise/models/management_it_solution.rb', line 55

def level_api_password
  @level_api_password
end

#level_api_usernameObject

This is only required for Level Platforms solution Max length: 100;



52
53
54
# File 'lib/connect_wise/models/management_it_solution.rb', line 52

def level_api_username
  @level_api_username
end

#level_var_domainObject

This is only required for Level Platforms solution Max length: 100;



58
59
60
# File 'lib/connect_wise/models/management_it_solution.rb', line 58

def level_var_domain
  @level_var_domain
end

#management_it_solution_typeObject

Returns the value of attribute management_it_solution_type.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def management_it_solution_type
  @management_it_solution_type
end

#management_server_urlObject

This is only required for Level Platforms Max length: 200;



25
26
27
# File 'lib/connect_wise/models/management_it_solution.rb', line 25

def management_server_url
  @management_server_url
end

#management_solution_nameObject

This is only required when managementItSolutionType is Custom Max length: 30;



22
23
24
# File 'lib/connect_wise/models/management_it_solution.rb', line 22

def management_solution_name
  @management_solution_name
end

#n_able_passwordObject

This is only required for N-Able solution Max length: 50;



43
44
45
# File 'lib/connect_wise/models/management_it_solution.rb', line 43

def n_able_password
  @n_able_password
end

#n_able_usernameObject

This is only required for N-Able solution Max length: 50;



40
41
42
# File 'lib/connect_wise/models/management_it_solution.rb', line 40

def n_able_username
  @n_able_username
end

#nameObject

Max length: 30;



17
18
19
# File 'lib/connect_wise/models/management_it_solution.rb', line 17

def name
  @name
end

#no_display_flagObject

Returns the value of attribute no_display_flag.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def no_display_flag
  @no_display_flag
end

#override_login_location_flagObject

Returns the value of attribute override_login_location_flag.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def 
  @override_login_location_flag
end

#override_web_service_location_flagObject

Returns the value of attribute override_web_service_location_flag.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def override_web_service_location_flag
  @override_web_service_location_flag
end

#portal_override_login_urlObject

This is only required for Level Platforms when overrideLoginLocationFlag is true Max length: 200;



31
32
33
# File 'lib/connect_wise/models/management_it_solution.rb', line 31

def 
  @portal_override_login_url
end

#using_ssl_flagObject

Returns the value of attribute using_ssl_flag.



19
20
21
# File 'lib/connect_wise/models/management_it_solution.rb', line 19

def using_ssl_flag
  @using_ssl_flag
end

#webservice_override_urlObject

This is only required for Level Platforms when overrideWebServiceLocationFlag is true Max length: 200;



28
29
30
# File 'lib/connect_wise/models/management_it_solution.rb', line 28

def webservice_override_url
  @webservice_override_url
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



110
111
112
# File 'lib/connect_wise/models/management_it_solution.rb', line 110

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



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
# File 'lib/connect_wise/models/management_it_solution.rb', line 82

def self.attribute_map
  {
    name: :name,
    management_it_solution_type: :managementItSolutionType,
    id: :id,
    management_solution_name: :managementSolutionName,
    management_server_url: :managementServerUrl,
    webservice_override_url: :webserviceOverrideUrl,
    portal_override_login_url: :portalOverrideLoginUrl,
    global_login_flag: :globalLoginFlag,
    global_login_username: :globalLoginUsername,
    global_login_password: :globalLoginPassword,
    using_ssl_flag: :usingSslFlag,
    n_able_username: :nAbleUsername,
    n_able_password: :nAblePassword,
    override_web_service_location_flag: :overrideWebServiceLocationFlag,
    override_login_location_flag: :overrideLoginLocationFlag,
    continuum_api_username: :continuumApiUsername,
    continuum_api_password: :continuumApiPassword,
    level_api_username: :levelApiUsername,
    level_api_password: :levelApiPassword,
    level_var_domain: :levelVarDomain,
    no_display_flag: :noDisplayFlag,
    _info: :_info
  }
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



288
289
290
# File 'lib/connect_wise/models/management_it_solution.rb', line 288

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



143
144
145
146
147
148
149
150
151
152
# File 'lib/connect_wise/models/management_it_solution.rb', line 143

def self.openapi_nullable
  Set.new(%i[
            management_it_solution_type
            global_login_flag
            using_ssl_flag
            override_web_service_location_flag
            override_login_location_flag
            no_display_flag
          ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/connect_wise/models/management_it_solution.rb', line 115

def self.openapi_types
  {
    name: :String,
    management_it_solution_type: :String,
    id: :Integer,
    management_solution_name: :String,
    management_server_url: :String,
    webservice_override_url: :String,
    portal_override_login_url: :String,
    global_login_flag: :Boolean,
    global_login_username: :String,
    global_login_password: :String,
    using_ssl_flag: :Boolean,
    n_able_username: :String,
    n_able_password: :String,
    override_web_service_location_flag: :Boolean,
    override_login_location_flag: :Boolean,
    continuum_api_username: :String,
    continuum_api_password: :String,
    level_api_username: :String,
    level_api_password: :String,
    level_var_domain: :String,
    no_display_flag: :Boolean,
    _info: :'Hash<String, String>'
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# File 'lib/connect_wise/models/management_it_solution.rb', line 245

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

  self.class == other.class &&
    name == other.name &&
    management_it_solution_type == other.management_it_solution_type &&
    id == other.id &&
    management_solution_name == other.management_solution_name &&
    management_server_url == other.management_server_url &&
    webservice_override_url == other.webservice_override_url &&
     == other. &&
     == other. &&
     == other. &&
     == other. &&
    using_ssl_flag == other.using_ssl_flag &&
    n_able_username == other.n_able_username &&
    n_able_password == other.n_able_password &&
    override_web_service_location_flag == other.override_web_service_location_flag &&
     == other. &&
    continuum_api_username == other.continuum_api_username &&
    continuum_api_password == other.continuum_api_password &&
    level_api_username == other.level_api_username &&
    level_api_password == other.level_api_password &&
    level_var_domain == other.level_var_domain &&
    no_display_flag == other.no_display_flag &&
    _info == other._info
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/connect_wise/models/management_it_solution.rb', line 318

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = ConnectWise.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/connect_wise/models/management_it_solution.rb', line 389

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
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



295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/connect_wise/models/management_it_solution.rb', line 295

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      send("#{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
      send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(::Regexp.last_match(1), v) }) if attributes[self.class.attribute_map[key]].is_a?(Array)
    elsif !attributes[self.class.attribute_map[key]].nil?
      send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


275
276
277
# File 'lib/connect_wise/models/management_it_solution.rb', line 275

def eql?(other)
  self == other
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



281
282
283
# File 'lib/connect_wise/models/management_it_solution.rb', line 281

def hash
  [name, management_it_solution_type, id, management_solution_name, management_server_url, webservice_override_url, , , , , using_ssl_flag, n_able_username, n_able_password, override_web_service_location_flag, , continuum_api_username, continuum_api_password, level_api_username, level_api_password, level_var_domain, no_display_flag, _info].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



216
217
218
219
220
221
# File 'lib/connect_wise/models/management_it_solution.rb', line 216

def list_invalid_properties
  invalid_properties = []
  invalid_properties.push('invalid value for "name", name cannot be nil.') if @name.nil?

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



365
366
367
# File 'lib/connect_wise/models/management_it_solution.rb', line 365

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/connect_wise/models/management_it_solution.rb', line 371

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = 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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



359
360
361
# File 'lib/connect_wise/models/management_it_solution.rb', line 359

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



225
226
227
228
229
230
231
232
# File 'lib/connect_wise/models/management_it_solution.rb', line 225

def valid?
  return false if @name.nil?

  management_it_solution_type_validator = EnumAttributeValidator.new('String', %w[LevelPlatforms NAble Continuum Custom])
  return false unless management_it_solution_type_validator.valid?(@management_it_solution_type)

  true
end