class ConnectWise::Configuration

Attributes

_info[RW]

Metadata of the entity

access_token[RW]

Defines the access token (Bearer) used with OAuth2.

active_flag[RW]
api_key[RW]

Defines API keys used with API Key authentications.

@return [Hash] key: parameter name, value: parameter value (API key)

@example parameter name is “api_key”, API key is “xxx” (e.g. “api_key=xxx” in query string)

config.api_key['api_key'] = 'xxx'
api_key_prefix[RW]

Defines API key prefixes used with API Key authentications.

@return [Hash] key: parameter name, value: API key prefix

@example parameter name is “Authorization”, API key prefix is “Token” (e.g. “Authorization: Token xxx” in headers)

config.api_key_prefix['api_key'] = 'Token'
backup_billable_space_gb[RW]
backup_failed[RW]
backup_incomplete[RW]
backup_month[RW]
backup_protected_device_list[RW]
backup_restores[RW]
backup_server_name[RW]
backup_successes[RW]
backup_year[RW]
base_path[RW]

Defines url base path

bill_flag[RW]
business_unit_id[RW]
cert_file[RW]
TLS/SSL setting

Client certificate file (for client certificate)

client_id[RW]

Defines the clientId header to send with requests

@return [String]

client_side_validation[RW]

Set this to false to skip client side validation in the operation. Default to true. @return [true, false]

company[RW]
contact[RW]
cpu_speed[RW]
custom_fields[RW]
debugging[RW]

Set this to enable/disable debugging. When enabled (set to true), HTTP request/response details will be logged with `logger.debug` (see the `logger` attribute). Default to false.

@return [true, false]

default_gateway[RW]
device_identifier[RW]
display_vendor_flag[RW]
force_ending_format[RW]
host[RW]

Defines url host

id[RW]
inject_format[RW]
installation_date[RW]
installed_by[RW]
ip_address[RW]
key_file[RW]
TLS/SSL setting

Client private key file (for client certificate)

last_backup_date[RW]
last_login_name[RW]
local_hard_drives[RW]
location_id[RW]
logger[RW]

Defines the logger used for debugging. Default to `Rails.logger` (when in Rails) or logging to STDOUT.

@return [#debug]

mac_address[RW]
manufacturer[RW]
mobile_guid[RW]
model_number[RW]
name[RW]
notes[RW]
os_info[RW]
os_type[RW]
params_encoding[RW]

Set this to customize parameters encoding of array parameter with multi collectionFormat. Default to nil.

@see The params_encoding option of Ethon. Related source code: github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96

parent_configuration_id[RW]
password[RW]

Defines the password used with HTTP basic authentication.

@return [String]

purchase_date[RW]
questions[RW]
ram[RW]
scheme[RW]

Defines url scheme

serial_number[RW]
site[RW]
sla[RW]
ssl_ca_cert[RW]
TLS/SSL setting

Set this to customize the certificate file to verify the peer.

@return [String] the path to the certificate file

@see The `cainfo` option of Typhoeus, `–cert` option of libcurl. Related source code: github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145

status[RW]
tag_number[RW]
temp_folder_path[RW]

Defines the temporary folder to store downloaded files (for API endpoints that have file response). Default to use `Tempfile`.

@return [String]

timeout[RW]

The time limit for HTTP request in seconds. Default to 0 (never times out).

type[RW]
username[RW]

Defines the username used with HTTP basic authentication.

@return [String]

vendor[RW]
vendor_notes[RW]
verify_ssl[RW]
TLS/SSL setting

Set this to false to skip verifying SSL certificate when calling API from https server. Default to true.

@note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.

@return [true, false]

verify_ssl_host[RW]
TLS/SSL setting

Set this to false to skip verifying SSL host name Default to true.

@note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.

@return [true, false]

warranty_expiration_date[RW]

Public Class Methods

attribute_map() click to toggle source

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

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 112
def self.attribute_map
  {
    :'id' => :'id',
    :'name' => :'name',
    :'type' => :'type',
    :'status' => :'status',
    :'company' => :'company',
    :'contact' => :'contact',
    :'site' => :'site',
    :'location_id' => :'locationId',
    :'business_unit_id' => :'businessUnitId',
    :'device_identifier' => :'deviceIdentifier',
    :'serial_number' => :'serialNumber',
    :'model_number' => :'modelNumber',
    :'tag_number' => :'tagNumber',
    :'purchase_date' => :'purchaseDate',
    :'installation_date' => :'installationDate',
    :'installed_by' => :'installedBy',
    :'warranty_expiration_date' => :'warrantyExpirationDate',
    :'vendor_notes' => :'vendorNotes',
    :'notes' => :'notes',
    :'mac_address' => :'macAddress',
    :'last_login_name' => :'lastLoginName',
    :'bill_flag' => :'billFlag',
    :'backup_successes' => :'backupSuccesses',
    :'backup_incomplete' => :'backupIncomplete',
    :'backup_failed' => :'backupFailed',
    :'backup_restores' => :'backupRestores',
    :'last_backup_date' => :'lastBackupDate',
    :'backup_server_name' => :'backupServerName',
    :'backup_billable_space_gb' => :'backupBillableSpaceGb',
    :'backup_protected_device_list' => :'backupProtectedDeviceList',
    :'backup_year' => :'backupYear',
    :'backup_month' => :'backupMonth',
    :'ip_address' => :'ipAddress',
    :'default_gateway' => :'defaultGateway',
    :'os_type' => :'osType',
    :'os_info' => :'osInfo',
    :'cpu_speed' => :'cpuSpeed',
    :'ram' => :'ram',
    :'local_hard_drives' => :'localHardDrives',
    :'parent_configuration_id' => :'parentConfigurationId',
    :'vendor' => :'vendor',
    :'manufacturer' => :'manufacturer',
    :'questions' => :'questions',
    :'active_flag' => :'activeFlag',
    :'management_link' => :'managementLink',
    :'remote_link' => :'remoteLink',
    :'sla' => :'sla',
    :'mobile_guid' => :'mobileGuid',
    :'_info' => :'_info',
    :'display_vendor_flag' => :'displayVendorFlag',
    :'custom_fields' => :'customFields'
  }
end
default() click to toggle source

The default Configuration object.

# File lib/connectwise-ruby-sdk/configuration.rb, line 147
def self.default
  @@default ||= Configuration.new
end
new() { |self| ... } click to toggle source
# File lib/connectwise-ruby-sdk/configuration.rb, line 125
def initialize
  @scheme = 'https'
  @host = 'api-na.myconnectwise.net'
  @base_path = '/v4_6_release/apis/3.0'
  @api_key = {}
  @api_key_prefix = {}
  @timeout = 0
  @client_side_validation = true
  @verify_ssl = true
  @verify_ssl_host = true
  @params_encoding = nil
  @cert_file = nil
  @key_file = nil
  @debugging = false
  @inject_format = false
  @force_ending_format = false
  @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)

  yield(self) if block_given?
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 169
def self.swagger_types
  {
    :'id' => :'Integer',
    :'name' => :'String',
    :'type' => :'ConfigurationTypeReference',
    :'status' => :'ConfigurationStatusReference',
    :'company' => :'CompanyReference',
    :'contact' => :'ContactReference',
    :'site' => :'SiteReference',
    :'location_id' => :'Integer',
    :'business_unit_id' => :'Integer',
    :'device_identifier' => :'String',
    :'serial_number' => :'String',
    :'model_number' => :'String',
    :'tag_number' => :'String',
    :'purchase_date' => :'DateTime',
    :'installation_date' => :'DateTime',
    :'installed_by' => :'MemberReference',
    :'warranty_expiration_date' => :'DateTime',
    :'vendor_notes' => :'String',
    :'notes' => :'String',
    :'mac_address' => :'String',
    :'last_login_name' => :'String',
    :'bill_flag' => :'BOOLEAN',
    :'backup_successes' => :'Integer',
    :'backup_incomplete' => :'Integer',
    :'backup_failed' => :'Integer',
    :'backup_restores' => :'Integer',
    :'last_backup_date' => :'DateTime',
    :'backup_server_name' => :'String',
    :'backup_billable_space_gb' => :'Float',
    :'backup_protected_device_list' => :'String',
    :'backup_year' => :'Integer',
    :'backup_month' => :'Integer',
    :'ip_address' => :'String',
    :'default_gateway' => :'String',
    :'os_type' => :'String',
    :'os_info' => :'String',
    :'cpu_speed' => :'String',
    :'ram' => :'String',
    :'local_hard_drives' => :'String',
    :'parent_configuration_id' => :'Integer',
    :'vendor' => :'CompanyReference',
    :'manufacturer' => :'ManufacturerReference',
    :'questions' => :'Array<ConfigurationQuestion>',
    :'active_flag' => :'BOOLEAN',
    :'management_link' => :'String',
    :'remote_link' => :'String',
    :'sla' => :'SLAReference',
    :'mobile_guid' => :'Guid',
    :'_info' => :'Metadata',
    :'display_vendor_flag' => :'BOOLEAN',
    :'custom_fields' => :'Array<CustomFieldValue>'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 732
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      id == o.id &&
      name == o.name &&
      type == o.type &&
      status == o.status &&
      company == o.company &&
      contact == o.contact &&
      site == o.site &&
      location_id == o.location_id &&
      business_unit_id == o.business_unit_id &&
      device_identifier == o.device_identifier &&
      serial_number == o.serial_number &&
      model_number == o.model_number &&
      tag_number == o.tag_number &&
      purchase_date == o.purchase_date &&
      installation_date == o.installation_date &&
      installed_by == o.installed_by &&
      warranty_expiration_date == o.warranty_expiration_date &&
      vendor_notes == o.vendor_notes &&
      notes == o.notes &&
      mac_address == o.mac_address &&
      last_login_name == o.last_login_name &&
      bill_flag == o.bill_flag &&
      backup_successes == o.backup_successes &&
      backup_incomplete == o.backup_incomplete &&
      backup_failed == o.backup_failed &&
      backup_restores == o.backup_restores &&
      last_backup_date == o.last_backup_date &&
      backup_server_name == o.backup_server_name &&
      backup_billable_space_gb == o.backup_billable_space_gb &&
      backup_protected_device_list == o.backup_protected_device_list &&
      backup_year == o.backup_year &&
      backup_month == o.backup_month &&
      ip_address == o.ip_address &&
      default_gateway == o.default_gateway &&
      os_type == o.os_type &&
      os_info == o.os_info &&
      cpu_speed == o.cpu_speed &&
      ram == o.ram &&
      local_hard_drives == o.local_hard_drives &&
      parent_configuration_id == o.parent_configuration_id &&
      vendor == o.vendor &&
      manufacturer == o.manufacturer &&
      questions == o.questions &&
      active_flag == o.active_flag &&
      management_link == o.management_link &&
      remote_link == o.remote_link &&
      sla == o.sla &&
      mobile_guid == o.mobile_guid &&
      _info == o._info &&
      display_vendor_flag == o.display_vendor_flag &&
      custom_fields == o.custom_fields
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 824
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = ConnectWise.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 890
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
api_key_with_prefix(param_name) click to toggle source

Gets API key (with prefix if set). @param [String] param_name the parameter name of API key auth

# File lib/connectwise-ruby-sdk/configuration.rb, line 178
def api_key_with_prefix(param_name)
  if @api_key_prefix[param_name]
    "#{@api_key_prefix[param_name]} #{@api_key[param_name]}"
  else
    @api_key[param_name]
  end
end
auth_settings() click to toggle source

Returns Auth Settings hash for api client.

# File lib/connectwise-ruby-sdk/configuration.rb, line 192
def auth_settings
  {
    'BasicAuth' =>
      {
        type: 'basic',
        in: 'header',
        key: 'Authorization',
        value: basic_auth_token
      },
  }
end
backup_server_name=(backup_server_name) click to toggle source

Custom attribute writer method with validation @param [Object] backup_server_name Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 633
def backup_server_name=(backup_server_name)

  if !backup_server_name.nil? && backup_server_name.to_s.length > 50
    fail ArgumentError, "invalid value for 'backup_server_name', the character length must be smaller than or equal to 50."
  end

  @backup_server_name = backup_server_name
end
base_path=(base_path) click to toggle source
# File lib/connectwise-ruby-sdk/configuration.rb, line 165
def base_path=(base_path)
  # Add leading and trailing slashes to base_path
  @base_path = "/#{base_path}".gsub(/\/+/, '/')
  @base_path = "" if @base_path == "/"
end
base_url() click to toggle source
# File lib/connectwise-ruby-sdk/configuration.rb, line 171
def base_url
  url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
  URI.encode(url)
end
basic_auth_token() click to toggle source

Gets Basic Auth token string

# File lib/connectwise-ruby-sdk/configuration.rb, line 187
def basic_auth_token
  'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 803
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/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)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(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
configure() { |self| ... } click to toggle source
# File lib/connectwise-ruby-sdk/configuration.rb, line 151
def configure
  yield(self) if block_given?
end
cpu_speed=(cpu_speed) click to toggle source

Custom attribute writer method with validation @param [Object] cpu_speed Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 688
def cpu_speed=(cpu_speed)

  if !cpu_speed.nil? && cpu_speed.to_s.length > 100
    fail ArgumentError, "invalid value for 'cpu_speed', the character length must be smaller than or equal to 100."
  end

  @cpu_speed = cpu_speed
end
default_gateway=(default_gateway) click to toggle source

Custom attribute writer method with validation @param [Object] default_gateway Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 655
def default_gateway=(default_gateway)

  if !default_gateway.nil? && default_gateway.to_s.length > 50
    fail ArgumentError, "invalid value for 'default_gateway', the character length must be smaller than or equal to 50."
  end

  @default_gateway = default_gateway
end
device_identifier=(device_identifier) click to toggle source

Custom attribute writer method with validation @param [Object] device_identifier Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 567
def device_identifier=(device_identifier)

  if !device_identifier.nil? && device_identifier.to_s.length > 100
    fail ArgumentError, "invalid value for 'device_identifier', the character length must be smaller than or equal to 100."
  end

  @device_identifier = device_identifier
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 790
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 796
def hash
  [id, name, type, status, company, contact, site, location_id, business_unit_id, device_identifier, serial_number, model_number, tag_number, purchase_date, installation_date, installed_by, warranty_expiration_date, vendor_notes, notes, mac_address, last_login_name, bill_flag, backup_successes, backup_incomplete, backup_failed, backup_restores, last_backup_date, backup_server_name, backup_billable_space_gb, backup_protected_device_list, backup_year, backup_month, ip_address, default_gateway, os_type, os_info, cpu_speed, ram, local_hard_drives, parent_configuration_id, vendor, manufacturer, questions, active_flag, management_link, remote_link, sla, mobile_guid, _info, display_vendor_flag, custom_fields].hash
end
host=(host) click to toggle source
# File lib/connectwise-ruby-sdk/configuration.rb, line 160
def host=(host)
  # remove http(s):// and anything after a slash
  @host = host.sub(/https?:\/\//, '').split('/').first
end
ip_address=(ip_address) click to toggle source

Custom attribute writer method with validation @param [Object] ip_address Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 644
def ip_address=(ip_address)

  if !ip_address.nil? && ip_address.to_s.length > 50
    fail ArgumentError, "invalid value for 'ip_address', the character length must be smaller than or equal to 50."
  end

  @ip_address = ip_address
end
last_login_name=(last_login_name) click to toggle source

Custom attribute writer method with validation @param [Object] last_login_name Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 622
def last_login_name=(last_login_name)

  if !last_login_name.nil? && last_login_name.to_s.length > 100
    fail ArgumentError, "invalid value for 'last_login_name', the character length must be smaller than or equal to 100."
  end

  @last_login_name = last_login_name
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 445
def list_invalid_properties
  invalid_properties = Array.new
  if @name.nil?
    invalid_properties.push("invalid value for 'name', name cannot be nil.")
  end

  if @name.to_s.length > 100
    invalid_properties.push("invalid value for 'name', the character length must be smaller than or equal to 100.")
  end

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

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

  if !@device_identifier.nil? && @device_identifier.to_s.length > 100
    invalid_properties.push("invalid value for 'device_identifier', the character length must be smaller than or equal to 100.")
  end

  if !@serial_number.nil? && @serial_number.to_s.length > 250
    invalid_properties.push("invalid value for 'serial_number', the character length must be smaller than or equal to 250.")
  end

  if !@model_number.nil? && @model_number.to_s.length > 50
    invalid_properties.push("invalid value for 'model_number', the character length must be smaller than or equal to 50.")
  end

  if !@tag_number.nil? && @tag_number.to_s.length > 50
    invalid_properties.push("invalid value for 'tag_number', the character length must be smaller than or equal to 50.")
  end

  if !@mac_address.nil? && @mac_address.to_s.length > 25
    invalid_properties.push("invalid value for 'mac_address', the character length must be smaller than or equal to 25.")
  end

  if !@last_login_name.nil? && @last_login_name.to_s.length > 100
    invalid_properties.push("invalid value for 'last_login_name', the character length must be smaller than or equal to 100.")
  end

  if !@backup_server_name.nil? && @backup_server_name.to_s.length > 50
    invalid_properties.push("invalid value for 'backup_server_name', the character length must be smaller than or equal to 50.")
  end

  if !@ip_address.nil? && @ip_address.to_s.length > 50
    invalid_properties.push("invalid value for 'ip_address', the character length must be smaller than or equal to 50.")
  end

  if !@default_gateway.nil? && @default_gateway.to_s.length > 50
    invalid_properties.push("invalid value for 'default_gateway', the character length must be smaller than or equal to 50.")
  end

  if !@os_type.nil? && @os_type.to_s.length > 250
    invalid_properties.push("invalid value for 'os_type', the character length must be smaller than or equal to 250.")
  end

  if !@os_info.nil? && @os_info.to_s.length > 250
    invalid_properties.push("invalid value for 'os_info', the character length must be smaller than or equal to 250.")
  end

  if !@cpu_speed.nil? && @cpu_speed.to_s.length > 100
    invalid_properties.push("invalid value for 'cpu_speed', the character length must be smaller than or equal to 100.")
  end

  if !@ram.nil? && @ram.to_s.length > 25
    invalid_properties.push("invalid value for 'ram', the character length must be smaller than or equal to 25.")
  end

  if !@management_link.nil? && @management_link.to_s.length > 200
    invalid_properties.push("invalid value for 'management_link', the character length must be smaller than or equal to 200.")
  end

  if !@remote_link.nil? && @remote_link.to_s.length > 200
    invalid_properties.push("invalid value for 'remote_link', the character length must be smaller than or equal to 200.")
  end

  return invalid_properties
end
mac_address=(mac_address) click to toggle source

Custom attribute writer method with validation @param [Object] mac_address Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 611
def mac_address=(mac_address)

  if !mac_address.nil? && mac_address.to_s.length > 25
    fail ArgumentError, "invalid value for 'mac_address', the character length must be smaller than or equal to 25."
  end

  @mac_address = mac_address
end
model_number=(model_number) click to toggle source

Custom attribute writer method with validation @param [Object] model_number Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 589
def model_number=(model_number)

  if !model_number.nil? && model_number.to_s.length > 50
    fail ArgumentError, "invalid value for 'model_number', the character length must be smaller than or equal to 50."
  end

  @model_number = model_number
end
name=(name) click to toggle source

Custom attribute writer method with validation @param [Object] name Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 553
def name=(name)
  if name.nil?
    fail ArgumentError, "name cannot be nil"
  end

  if name.to_s.length > 100
    fail ArgumentError, "invalid value for 'name', the character length must be smaller than or equal to 100."
  end

  @name = name
end
os_info=(os_info) click to toggle source

Custom attribute writer method with validation @param [Object] os_info Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 677
def os_info=(os_info)

  if !os_info.nil? && os_info.to_s.length > 250
    fail ArgumentError, "invalid value for 'os_info', the character length must be smaller than or equal to 250."
  end

  @os_info = os_info
end
os_type=(os_type) click to toggle source

Custom attribute writer method with validation @param [Object] os_type Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 666
def os_type=(os_type)

  if !os_type.nil? && os_type.to_s.length > 250
    fail ArgumentError, "invalid value for 'os_type', the character length must be smaller than or equal to 250."
  end

  @os_type = os_type
end
ram=(ram) click to toggle source

Custom attribute writer method with validation @param [Object] ram Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 699
def ram=(ram)

  if !ram.nil? && ram.to_s.length > 25
    fail ArgumentError, "invalid value for 'ram', the character length must be smaller than or equal to 25."
  end

  @ram = ram
end
scheme=(scheme) click to toggle source
# File lib/connectwise-ruby-sdk/configuration.rb, line 155
def scheme=(scheme)
  # remove :// from scheme
  @scheme = scheme.sub(/:\/\//, '')
end
serial_number=(serial_number) click to toggle source

Custom attribute writer method with validation @param [Object] serial_number Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 578
def serial_number=(serial_number)

  if !serial_number.nil? && serial_number.to_s.length > 250
    fail ArgumentError, "invalid value for 'serial_number', the character length must be smaller than or equal to 250."
  end

  @serial_number = serial_number
end
tag_number=(tag_number) click to toggle source

Custom attribute writer method with validation @param [Object] tag_number Value to be assigned

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 600
def tag_number=(tag_number)

  if !tag_number.nil? && tag_number.to_s.length > 50
    fail ArgumentError, "invalid value for 'tag_number', the character length must be smaller than or equal to 50."
  end

  @tag_number = tag_number
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 870
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 876
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 864
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/connectwise-ruby-sdk/models/configuration.rb, line 528
def valid?
  return false if @name.nil?
  return false if @name.to_s.length > 100
  return false if @type.nil?
  return false if @company.nil?
  return false if !@device_identifier.nil? && @device_identifier.to_s.length > 100
  return false if !@serial_number.nil? && @serial_number.to_s.length > 250
  return false if !@model_number.nil? && @model_number.to_s.length > 50
  return false if !@tag_number.nil? && @tag_number.to_s.length > 50
  return false if !@mac_address.nil? && @mac_address.to_s.length > 25
  return false if !@last_login_name.nil? && @last_login_name.to_s.length > 100
  return false if !@backup_server_name.nil? && @backup_server_name.to_s.length > 50
  return false if !@ip_address.nil? && @ip_address.to_s.length > 50
  return false if !@default_gateway.nil? && @default_gateway.to_s.length > 50
  return false if !@os_type.nil? && @os_type.to_s.length > 250
  return false if !@os_info.nil? && @os_info.to_s.length > 250
  return false if !@cpu_speed.nil? && @cpu_speed.to_s.length > 100
  return false if !@ram.nil? && @ram.to_s.length > 25
  return false if !@management_link.nil? && @management_link.to_s.length > 200
  return false if !@remote_link.nil? && @remote_link.to_s.length > 200
  return true
end