Class: MistApi::AppProbingCustomApp
- Defined in:
- lib/mist_api/models/app_probing_custom_app.rb
Overview
AppProbingCustomApp Model.
Instance Attribute Summary collapse
-
#address ⇒ String
Required if ‘protocol`==`icmp`.
-
#app_type ⇒ String
Required if ‘protocol`==`icmp`.
-
#hostnames ⇒ Array[String]
If ‘protocol`==`http`.
-
#key ⇒ String
If ‘protocol`==`http`.
-
#name ⇒ String
If ‘protocol`==`http`.
-
#network ⇒ String
If ‘protocol`==`http`.
-
#packet_size ⇒ Integer
If ‘protocol`==`icmp`.
-
#protocol ⇒ AppProbingCustomAppProtocolEnum
enum: ‘http`, `icmp`.
-
#url ⇒ String
If ‘protocol`==`http`.
-
#vrf ⇒ String
If ‘protocol`==`http`.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(address = SKIP, app_type = SKIP, hostnames = SKIP, key = SKIP, name = SKIP, network = SKIP, packet_size = SKIP, protocol = AppProbingCustomAppProtocolEnum::HTTP, url = SKIP, vrf = SKIP) ⇒ AppProbingCustomApp
constructor
A new instance of AppProbingCustomApp.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(address = SKIP, app_type = SKIP, hostnames = SKIP, key = SKIP, name = SKIP, network = SKIP, packet_size = SKIP, protocol = AppProbingCustomAppProtocolEnum::HTTP, url = SKIP, vrf = SKIP) ⇒ AppProbingCustomApp
Returns a new instance of AppProbingCustomApp.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 89 def initialize(address = SKIP, app_type = SKIP, hostnames = SKIP, key = SKIP, name = SKIP, network = SKIP, packet_size = SKIP, protocol = AppProbingCustomAppProtocolEnum::HTTP, url = SKIP, vrf = SKIP) @address = address unless address == SKIP @app_type = app_type unless app_type == SKIP @hostnames = hostnames unless hostnames == SKIP @key = key unless key == SKIP @name = name unless name == SKIP @network = network unless network == SKIP @packet_size = packet_size unless packet_size == SKIP @protocol = protocol unless protocol == SKIP @url = url unless url == SKIP @vrf = vrf unless vrf == SKIP end |
Instance Attribute Details
#address ⇒ String
Required if ‘protocol`==`icmp`
14 15 16 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 14 def address @address end |
#app_type ⇒ String
Required if ‘protocol`==`icmp`
18 19 20 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 18 def app_type @app_type end |
#hostnames ⇒ Array[String]
If ‘protocol`==`http`
22 23 24 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 22 def hostnames @hostnames end |
#key ⇒ String
If ‘protocol`==`http`
26 27 28 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 26 def key @key end |
#name ⇒ String
If ‘protocol`==`http`
30 31 32 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 30 def name @name end |
#network ⇒ String
If ‘protocol`==`http`
34 35 36 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 34 def network @network end |
#packet_size ⇒ Integer
If ‘protocol`==`icmp`
38 39 40 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 38 def packet_size @packet_size end |
#protocol ⇒ AppProbingCustomAppProtocolEnum
enum: ‘http`, `icmp`
42 43 44 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 42 def protocol @protocol end |
#url ⇒ String
If ‘protocol`==`http`
46 47 48 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 46 def url @url end |
#vrf ⇒ String
If ‘protocol`==`http`
50 51 52 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 50 def vrf @vrf end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 106 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. address = hash.key?('address') ? hash['address'] : SKIP app_type = hash.key?('app_type') ? hash['app_type'] : SKIP hostnames = hash.key?('hostnames') ? hash['hostnames'] : SKIP key = hash.key?('key') ? hash['key'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP network = hash.key?('network') ? hash['network'] : SKIP packet_size = hash.key?('packetSize') ? hash['packetSize'] : SKIP protocol = hash['protocol'] ||= AppProbingCustomAppProtocolEnum::HTTP url = hash.key?('url') ? hash['url'] : SKIP vrf = hash.key?('vrf') ? hash['vrf'] : SKIP # Create object from extracted values. AppProbingCustomApp.new(address, app_type, hostnames, key, name, network, packet_size, protocol, url, vrf) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['address'] = 'address' @_hash['app_type'] = 'app_type' @_hash['hostnames'] = 'hostnames' @_hash['key'] = 'key' @_hash['name'] = 'name' @_hash['network'] = 'network' @_hash['packet_size'] = 'packetSize' @_hash['protocol'] = 'protocol' @_hash['url'] = 'url' @_hash['vrf'] = 'vrf' @_hash end |
.nullables ⇒ Object
An array for nullable fields
85 86 87 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 85 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 69 def self.optionals %w[ address app_type hostnames key name network packet_size protocol url vrf ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
143 144 145 146 147 148 149 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 143 def inspect class_name = self.class.name.split('::').last "<#{class_name} address: #{@address.inspect}, app_type: #{@app_type.inspect}, hostnames:"\ " #{@hostnames.inspect}, key: #{@key.inspect}, name: #{@name.inspect}, network:"\ " #{@network.inspect}, packet_size: #{@packet_size.inspect}, protocol: #{@protocol.inspect},"\ " url: #{@url.inspect}, vrf: #{@vrf.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
135 136 137 138 139 140 |
# File 'lib/mist_api/models/app_probing_custom_app.rb', line 135 def to_s class_name = self.class.name.split('::').last "<#{class_name} address: #{@address}, app_type: #{@app_type}, hostnames: #{@hostnames},"\ " key: #{@key}, name: #{@name}, network: #{@network}, packet_size: #{@packet_size},"\ " protocol: #{@protocol}, url: #{@url}, vrf: #{@vrf}>" end |