Class: MistApi::OrgServicePolicy
- Defined in:
- lib/mist_api/models/org_service_policy.rb
Overview
OrgServicePolicy Model.
Instance Attribute Summary collapse
-
#aamw ⇒ ServicePolicyAamw
SRX only.
-
#action ⇒ AllowDenyEnum
enum: ‘allow`, `deny`.
-
#antivirus ⇒ ServicePolicyAntivirus
For SRX-only.
-
#appqoe ⇒ ServicePolicyAppqoe
SRX only.
-
#created_time ⇒ Float
When the object has been created, in epoch.
-
#ewf ⇒ Array[ServicePolicyEwfRule]
When the object has been created, in epoch.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#idp ⇒ IdpConfig
Unique ID of the object instance in the Mist Organization.
-
#local_routing ⇒ TrueClass | FalseClass
access within the same VRF.
-
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch.
-
#name ⇒ String
When the object has been modified for the last time, in epoch.
-
#org_id ⇒ UUID | String
When the object has been modified for the last time, in epoch.
-
#path_preference ⇒ String
By default, we derive all paths available and use them, optionally, you can customize by using ‘path_preference`.
-
#secintel ⇒ ServicePolicySecintel
SRX only.
-
#services ⇒ Array[String]
SRX only.
-
#ssl_proxy ⇒ ServicePolicySslProxy
For SRX-only.
-
#tenants ⇒ Array[String]
For SRX-only.
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(aamw = SKIP, action = SKIP, antivirus = SKIP, appqoe = SKIP, created_time = SKIP, ewf = SKIP, id = SKIP, idp = SKIP, local_routing = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, path_preference = SKIP, secintel = SKIP, services = SKIP, ssl_proxy = SKIP, tenants = SKIP, additional_properties = nil) ⇒ OrgServicePolicy
constructor
A new instance of OrgServicePolicy.
-
#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(aamw = SKIP, action = SKIP, antivirus = SKIP, appqoe = SKIP, created_time = SKIP, ewf = SKIP, id = SKIP, idp = SKIP, local_routing = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, path_preference = SKIP, secintel = SKIP, services = SKIP, ssl_proxy = SKIP, tenants = SKIP, additional_properties = nil) ⇒ OrgServicePolicy
Returns a new instance of OrgServicePolicy.
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/mist_api/models/org_service_policy.rb', line 132 def initialize(aamw = SKIP, action = SKIP, antivirus = SKIP, appqoe = SKIP, created_time = SKIP, ewf = SKIP, id = SKIP, idp = SKIP, local_routing = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, path_preference = SKIP, secintel = SKIP, services = SKIP, ssl_proxy = SKIP, tenants = SKIP, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @aamw = aamw unless aamw == SKIP @action = action unless action == SKIP @antivirus = antivirus unless antivirus == SKIP @appqoe = appqoe unless appqoe == SKIP @created_time = created_time unless created_time == SKIP @ewf = ewf unless ewf == SKIP @id = id unless id == SKIP @idp = idp unless idp == SKIP @local_routing = local_routing unless local_routing == SKIP @modified_time = modified_time unless modified_time == SKIP @name = name unless name == SKIP @org_id = org_id unless org_id == SKIP @path_preference = path_preference unless path_preference == SKIP @secintel = secintel unless secintel == SKIP @services = services unless services == SKIP @ssl_proxy = ssl_proxy unless ssl_proxy == SKIP @tenants = tenants unless tenants == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#aamw ⇒ ServicePolicyAamw
SRX only
14 15 16 |
# File 'lib/mist_api/models/org_service_policy.rb', line 14 def aamw @aamw end |
#action ⇒ AllowDenyEnum
enum: ‘allow`, `deny`
18 19 20 |
# File 'lib/mist_api/models/org_service_policy.rb', line 18 def action @action end |
#antivirus ⇒ ServicePolicyAntivirus
For SRX-only
22 23 24 |
# File 'lib/mist_api/models/org_service_policy.rb', line 22 def antivirus @antivirus end |
#appqoe ⇒ ServicePolicyAppqoe
SRX only
26 27 28 |
# File 'lib/mist_api/models/org_service_policy.rb', line 26 def appqoe @appqoe end |
#created_time ⇒ Float
When the object has been created, in epoch
30 31 32 |
# File 'lib/mist_api/models/org_service_policy.rb', line 30 def created_time @created_time end |
#ewf ⇒ Array[ServicePolicyEwfRule]
When the object has been created, in epoch
34 35 36 |
# File 'lib/mist_api/models/org_service_policy.rb', line 34 def ewf @ewf end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
38 39 40 |
# File 'lib/mist_api/models/org_service_policy.rb', line 38 def id @id end |
#idp ⇒ IdpConfig
Unique ID of the object instance in the Mist Organization
42 43 44 |
# File 'lib/mist_api/models/org_service_policy.rb', line 42 def idp @idp end |
#local_routing ⇒ TrueClass | FalseClass
access within the same VRF
46 47 48 |
# File 'lib/mist_api/models/org_service_policy.rb', line 46 def local_routing @local_routing end |
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch
50 51 52 |
# File 'lib/mist_api/models/org_service_policy.rb', line 50 def modified_time @modified_time end |
#name ⇒ String
When the object has been modified for the last time, in epoch
54 55 56 |
# File 'lib/mist_api/models/org_service_policy.rb', line 54 def name @name end |
#org_id ⇒ UUID | String
When the object has been modified for the last time, in epoch
58 59 60 |
# File 'lib/mist_api/models/org_service_policy.rb', line 58 def org_id @org_id end |
#path_preference ⇒ String
By default, we derive all paths available and use them, optionally, you can customize by using ‘path_preference`
63 64 65 |
# File 'lib/mist_api/models/org_service_policy.rb', line 63 def path_preference @path_preference end |
#secintel ⇒ ServicePolicySecintel
SRX only
67 68 69 |
# File 'lib/mist_api/models/org_service_policy.rb', line 67 def secintel @secintel end |
#services ⇒ Array[String]
SRX only
71 72 73 |
# File 'lib/mist_api/models/org_service_policy.rb', line 71 def services @services end |
#ssl_proxy ⇒ ServicePolicySslProxy
For SRX-only
75 76 77 |
# File 'lib/mist_api/models/org_service_policy.rb', line 75 def ssl_proxy @ssl_proxy end |
#tenants ⇒ Array[String]
For SRX-only
79 80 81 |
# File 'lib/mist_api/models/org_service_policy.rb', line 79 def tenants @tenants end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 213 214 215 216 217 218 219 220 |
# File 'lib/mist_api/models/org_service_policy.rb', line 162 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. aamw = ServicePolicyAamw.from_hash(hash['aamw']) if hash['aamw'] action = hash.key?('action') ? hash['action'] : SKIP antivirus = ServicePolicyAntivirus.from_hash(hash['antivirus']) if hash['antivirus'] appqoe = ServicePolicyAppqoe.from_hash(hash['appqoe']) if hash['appqoe'] created_time = hash.key?('created_time') ? hash['created_time'] : SKIP # Parameter is an array, so we need to iterate through it ewf = nil unless hash['ewf'].nil? ewf = [] hash['ewf'].each do |structure| ewf << (ServicePolicyEwfRule.from_hash(structure) if structure) end end ewf = SKIP unless hash.key?('ewf') id = hash.key?('id') ? hash['id'] : SKIP idp = IdpConfig.from_hash(hash['idp']) if hash['idp'] local_routing = hash.key?('local_routing') ? hash['local_routing'] : SKIP modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP path_preference = hash.key?('path_preference') ? hash['path_preference'] : SKIP secintel = ServicePolicySecintel.from_hash(hash['secintel']) if hash['secintel'] services = hash.key?('services') ? hash['services'] : SKIP ssl_proxy = ServicePolicySslProxy.from_hash(hash['ssl_proxy']) if hash['ssl_proxy'] tenants = hash.key?('tenants') ? hash['tenants'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. OrgServicePolicy.new(aamw, action, antivirus, appqoe, created_time, ewf, id, idp, local_routing, modified_time, name, org_id, path_preference, secintel, services, ssl_proxy, tenants, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/mist_api/models/org_service_policy.rb', line 82 def self.names @_hash = {} if @_hash.nil? @_hash['aamw'] = 'aamw' @_hash['action'] = 'action' @_hash['antivirus'] = 'antivirus' @_hash['appqoe'] = 'appqoe' @_hash['created_time'] = 'created_time' @_hash['ewf'] = 'ewf' @_hash['id'] = 'id' @_hash['idp'] = 'idp' @_hash['local_routing'] = 'local_routing' @_hash['modified_time'] = 'modified_time' @_hash['name'] = 'name' @_hash['org_id'] = 'org_id' @_hash['path_preference'] = 'path_preference' @_hash['secintel'] = 'secintel' @_hash['services'] = 'services' @_hash['ssl_proxy'] = 'ssl_proxy' @_hash['tenants'] = 'tenants' @_hash end |
.nullables ⇒ Object
An array for nullable fields
128 129 130 |
# File 'lib/mist_api/models/org_service_policy.rb', line 128 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/mist_api/models/org_service_policy.rb', line 105 def self.optionals %w[ aamw action antivirus appqoe created_time ewf id idp local_routing modified_time name org_id path_preference secintel services ssl_proxy tenants ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/mist_api/models/org_service_policy.rb', line 234 def inspect class_name = self.class.name.split('::').last "<#{class_name} aamw: #{@aamw.inspect}, action: #{@action.inspect}, antivirus:"\ " #{@antivirus.inspect}, appqoe: #{@appqoe.inspect}, created_time: #{@created_time.inspect},"\ " ewf: #{@ewf.inspect}, id: #{@id.inspect}, idp: #{@idp.inspect}, local_routing:"\ " #{@local_routing.inspect}, modified_time: #{@modified_time.inspect}, name:"\ " #{@name.inspect}, org_id: #{@org_id.inspect}, path_preference:"\ " #{@path_preference.inspect}, secintel: #{@secintel.inspect}, services:"\ " #{@services.inspect}, ssl_proxy: #{@ssl_proxy.inspect}, tenants: #{@tenants.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
223 224 225 226 227 228 229 230 231 |
# File 'lib/mist_api/models/org_service_policy.rb', line 223 def to_s class_name = self.class.name.split('::').last "<#{class_name} aamw: #{@aamw}, action: #{@action}, antivirus: #{@antivirus}, appqoe:"\ " #{@appqoe}, created_time: #{@created_time}, ewf: #{@ewf}, id: #{@id}, idp: #{@idp},"\ " local_routing: #{@local_routing}, modified_time: #{@modified_time}, name: #{@name},"\ " org_id: #{@org_id}, path_preference: #{@path_preference}, secintel: #{@secintel},"\ " services: #{@services}, ssl_proxy: #{@ssl_proxy}, tenants: #{@tenants},"\ " additional_properties: #{@additional_properties}>" end |