Class: UntitledApi::ApiV1ConstDefaultGatewayConfigResponse1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb

Overview

ApiV1ConstDefaultGatewayConfigResponse1 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(port_config = SKIP, networks = SKIP, ip_configs = SKIP, dhcpd_config = SKIP, path_preferences = SKIP, service_policies = SKIP) ⇒ ApiV1ConstDefaultGatewayConfigResponse1

Returns a new instance of ApiV1ConstDefaultGatewayConfigResponse1.



65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 65

def initialize(port_config = SKIP,
               networks = SKIP,
               ip_configs = SKIP,
               dhcpd_config = SKIP,
               path_preferences = SKIP,
               service_policies = SKIP)
  @port_config = port_config unless port_config == SKIP
  @networks = networks unless networks == SKIP
  @ip_configs = ip_configs unless ip_configs == SKIP
  @dhcpd_config = dhcpd_config unless dhcpd_config == SKIP
  @path_preferences = path_preferences unless path_preferences == SKIP
  @service_policies = service_policies unless service_policies == SKIP
end

Instance Attribute Details

#dhcpd_configObject

TODO: Write general description for this method

Returns:

  • (Object)


26
27
28
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 26

def dhcpd_config
  @dhcpd_config
end

#ip_configsObject

TODO: Write general description for this method

Returns:

  • (Object)


22
23
24
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 22

def ip_configs
  @ip_configs
end

#networksObject

TODO: Write general description for this method

Returns:

  • (Object)


18
19
20
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 18

def networks
  @networks
end

#path_preferencesObject

TODO: Write general description for this method

Returns:

  • (Object)


30
31
32
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 30

def path_preferences
  @path_preferences
end

#port_configObject

TODO: Write general description for this method

Returns:

  • (Object)


14
15
16
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 14

def port_config
  @port_config
end

#service_policiesObject

TODO: Write general description for this method

Returns:

  • (Object)


34
35
36
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 34

def service_policies
  @service_policies
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 80

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  port_config = hash.key?('port_config') ? hash['port_config'] : SKIP
  networks = hash.key?('networks') ? hash['networks'] : SKIP
  ip_configs = hash.key?('ip_configs') ? hash['ip_configs'] : SKIP
  dhcpd_config = hash.key?('dhcpd_config') ? hash['dhcpd_config'] : SKIP
  path_preferences =
    hash.key?('path_preferences') ? hash['path_preferences'] : SKIP
  service_policies =
    hash.key?('service_policies') ? hash['service_policies'] : SKIP

  # Create object from extracted values.
  ApiV1ConstDefaultGatewayConfigResponse1.new(port_config,
                                              networks,
                                              ip_configs,
                                              dhcpd_config,
                                              path_preferences,
                                              service_policies)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['port_config'] = 'port_config'
  @_hash['networks'] = 'networks'
  @_hash['ip_configs'] = 'ip_configs'
  @_hash['dhcpd_config'] = 'dhcpd_config'
  @_hash['path_preferences'] = 'path_preferences'
  @_hash['service_policies'] = 'service_policies'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



49
50
51
52
53
54
55
56
57
58
# File 'lib/untitled_api/models/api_v1_const_default_gateway_config_response1.rb', line 49

def self.optionals
  %w[
    port_config
    networks
    ip_configs
    dhcpd_config
    path_preferences
    service_policies
  ]
end