Class: MistApi::GatewayWanProbeOverride

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/gateway_wan_probe_override.rb

Overview

Only if ‘usage`==`wan`

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(ip6s = SKIP, ips = SKIP, probe_profile = GatewayWanProbeOverrideProbeProfileEnum::BROADBAND) ⇒ GatewayWanProbeOverride

Returns a new instance of GatewayWanProbeOverride.



47
48
49
50
51
52
53
54
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 47

def initialize(
  ip6s = SKIP, ips = SKIP,
  probe_profile = GatewayWanProbeOverrideProbeProfileEnum::BROADBAND
)
  @ip6s = ip6s unless ip6s == SKIP
  @ips = ips unless ips == SKIP
  @probe_profile = probe_profile unless probe_profile == SKIP
end

Instance Attribute Details

#ip6sArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


14
15
16
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 14

def ip6s
  @ip6s
end

#ipsArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


18
19
20
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 18

def ips
  @ips
end

#probe_profileGatewayWanProbeOverrideProbeProfileEnum

enum: ‘broadband`, `lte`



22
23
24
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 22

def probe_profile
  @probe_profile
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  ip6s = hash.key?('ip6s') ? hash['ip6s'] : SKIP
  ips = hash.key?('ips') ? hash['ips'] : SKIP
  probe_profile =
    hash['probe_profile'] ||= GatewayWanProbeOverrideProbeProfileEnum::BROADBAND

  # Create object from extracted values.
  GatewayWanProbeOverride.new(ip6s,
                              ips,
                              probe_profile)
end

.namesObject

A mapping from model property names to API property names.



25
26
27
28
29
30
31
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 25

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['ip6s'] = 'ip6s'
  @_hash['ips'] = 'ips'
  @_hash['probe_profile'] = 'probe_profile'
  @_hash
end

.nullablesObject

An array for nullable fields



43
44
45
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 43

def self.nullables
  []
end

.optionalsObject

An array for optional fields



34
35
36
37
38
39
40
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 34

def self.optionals
  %w[
    ip6s
    ips
    probe_profile
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:



74
75
76
77
78
79
80
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 74

def self.validate(value)
  return true if value.instance_of? self

  return false unless value.instance_of? Hash

  true
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



89
90
91
92
93
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 89

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} ip6s: #{@ip6s.inspect}, ips: #{@ips.inspect}, probe_profile:"\
  " #{@probe_profile.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



83
84
85
86
# File 'lib/mist_api/models/gateway_wan_probe_override.rb', line 83

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} ip6s: #{@ip6s}, ips: #{@ips}, probe_profile: #{@probe_profile}>"
end