Class: CtdDocumentation::ActionablePolicy

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/ctd_documentation/models/actionable_policy.rb

Overview

ActionablePolicy Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(actionable_id = SKIP, role_number = SKIP, role_name = SKIP, resource_id = SKIP, id = SKIP, site_id = SKIP, action = SKIP, active = SKIP, approved_user_id = SKIP, approved_username = SKIP, categories = SKIP, categories_access = SKIP, cloud_reputation = SKIP, created_user_id = SKIP, created_username = SKIP, description = SKIP, full_match = SKIP, hit_count = SKIP, port_ranges = SKIP, ports = SKIP, protocols = SKIP, valid = SKIP, state = SKIP, usage_percentage = SKIP, modified_user_id = SKIP, modified_username = SKIP, last_modified = SKIP, timestamp = SKIP, last_user_modified = SKIP, state_modified = SKIP, virtual_zones = SKIP) ⇒ ActionablePolicy

Returns a new instance of ActionablePolicy.



215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 215

def initialize(actionable_id = SKIP,
               role_number = SKIP,
               role_name = SKIP,
               resource_id = SKIP,
               id = SKIP,
               site_id = SKIP,
               action = SKIP,
               active = SKIP,
               approved_user_id = SKIP,
               approved_username = SKIP,
               categories = SKIP,
               categories_access = SKIP,
               cloud_reputation = SKIP,
               created_user_id = SKIP,
               created_username = SKIP,
               description = SKIP,
               full_match = SKIP,
               hit_count = SKIP,
               port_ranges = SKIP,
               ports = SKIP,
               protocols = SKIP,
               valid = SKIP,
               state = SKIP,
               usage_percentage = SKIP,
               modified_user_id = SKIP,
               modified_username = SKIP,
               last_modified = SKIP,
               timestamp = SKIP,
               last_user_modified = SKIP,
               state_modified = SKIP,
               virtual_zones = SKIP)
  @actionable_id = actionable_id unless actionable_id == SKIP
  @role_number = role_number unless role_number == SKIP
  @role_name = role_name unless role_name == SKIP
  @resource_id = resource_id unless resource_id == SKIP
  @id = id unless id == SKIP
  @site_id = site_id unless site_id == SKIP
  @action = action unless action == SKIP
  @active = active unless active == SKIP
  @approved_user_id = approved_user_id unless approved_user_id == SKIP
  @approved_username = approved_username unless approved_username == SKIP
  @categories = categories unless categories == SKIP
  @categories_access = categories_access unless categories_access == SKIP
  @cloud_reputation = cloud_reputation unless cloud_reputation == SKIP
  @created_user_id = created_user_id unless created_user_id == SKIP
  @created_username = created_username unless created_username == SKIP
  @description = description unless description == SKIP
  @full_match = full_match unless full_match == SKIP
  @hit_count = hit_count unless hit_count == SKIP
  @port_ranges = port_ranges unless port_ranges == SKIP
  @ports = ports unless ports == SKIP
  @protocols = protocols unless protocols == SKIP
  @valid = valid unless valid == SKIP
  @state = state unless state == SKIP
  @usage_percentage = usage_percentage unless usage_percentage == SKIP
  @modified_user_id = modified_user_id unless modified_user_id == SKIP
  @modified_username = modified_username unless modified_username == SKIP
  @last_modified = last_modified unless last_modified == SKIP
  @timestamp = timestamp unless timestamp == SKIP
  @last_user_modified = last_user_modified unless last_user_modified == SKIP
  @state_modified = state_modified unless state_modified == SKIP
  @virtual_zones = virtual_zones unless virtual_zones == SKIP
end

Instance Attribute Details

#actionInteger

TODO: Write general description for this method

Returns:

  • (Integer)


38
39
40
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 38

def action
  @action
end

#actionable_idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


14
15
16
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 14

def actionable_id
  @actionable_id
end

#activeTrueClass|FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass|FalseClass)


42
43
44
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 42

def active
  @active
end

#approved_user_idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


46
47
48
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 46

def approved_user_id
  @approved_user_id
end

#approved_usernameString

TODO: Write general description for this method

Returns:

  • (String)


50
51
52
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 50

def approved_username
  @approved_username
end

#categoriesList of Integer

TODO: Write general description for this method

Returns:

  • (List of Integer)


54
55
56
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 54

def categories
  @categories
end

#categories_accessList of Integer

TODO: Write general description for this method

Returns:

  • (List of Integer)


58
59
60
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 58

def categories_access
  @categories_access
end

#cloud_reputationInteger

TODO: Write general description for this method

Returns:

  • (Integer)


62
63
64
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 62

def cloud_reputation
  @cloud_reputation
end

#created_user_idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


66
67
68
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 66

def created_user_id
  @created_user_id
end

#created_usernameString

TODO: Write general description for this method

Returns:

  • (String)


70
71
72
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 70

def created_username
  @created_username
end

#descriptionString

TODO: Write general description for this method

Returns:

  • (String)


74
75
76
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 74

def description
  @description
end

#full_matchTrueClass|FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass|FalseClass)


78
79
80
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 78

def full_match
  @full_match
end

#hit_countInteger

TODO: Write general description for this method

Returns:

  • (Integer)


82
83
84
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 82

def hit_count
  @hit_count
end

#idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


30
31
32
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 30

def id
  @id
end

#last_modifiedString

TODO: Write general description for this method

Returns:

  • (String)


118
119
120
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 118

def last_modified
  @last_modified
end

#last_user_modifiedString

TODO: Write general description for this method

Returns:

  • (String)


126
127
128
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 126

def last_user_modified
  @last_user_modified
end

#modified_user_idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


110
111
112
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 110

def modified_user_id
  @modified_user_id
end

#modified_usernameString

TODO: Write general description for this method

Returns:

  • (String)


114
115
116
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 114

def modified_username
  @modified_username
end

#port_rangesList of String

TODO: Write general description for this method

Returns:

  • (List of String)


86
87
88
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 86

def port_ranges
  @port_ranges
end

#portsList of String

TODO: Write general description for this method

Returns:

  • (List of String)


90
91
92
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 90

def ports
  @ports
end

#protocolsList of String

TODO: Write general description for this method

Returns:

  • (List of String)


94
95
96
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 94

def protocols
  @protocols
end

#resource_idString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 26

def resource_id
  @resource_id
end

#role_nameString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 22

def role_name
  @role_name
end

#role_numberInteger

TODO: Write general description for this method

Returns:

  • (Integer)


18
19
20
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 18

def role_number
  @role_number
end

#site_idInteger

TODO: Write general description for this method

Returns:

  • (Integer)


34
35
36
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 34

def site_id
  @site_id
end

#stateInteger

TODO: Write general description for this method

Returns:

  • (Integer)


102
103
104
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 102

def state
  @state
end

#state_modifiedString

TODO: Write general description for this method

Returns:

  • (String)


130
131
132
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 130

def state_modified
  @state_modified
end

#timestampString

TODO: Write general description for this method

Returns:

  • (String)


122
123
124
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 122

def timestamp
  @timestamp
end

#usage_percentageInteger

TODO: Write general description for this method

Returns:

  • (Integer)


106
107
108
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 106

def usage_percentage
  @usage_percentage
end

#validTrueClass|FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass|FalseClass)


98
99
100
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 98

def valid
  @valid
end

#virtual_zonesVirtualZones

TODO: Write general description for this method

Returns:



134
135
136
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 134

def virtual_zones
  @virtual_zones
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 280

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  actionable_id = hash.key?('actionable_id') ? hash['actionable_id'] : SKIP
  role_number = hash.key?('role_number') ? hash['role_number'] : SKIP
  role_name = hash.key?('role_name') ? hash['role_name'] : SKIP
  resource_id = hash.key?('resource_id') ? hash['resource_id'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  action = hash.key?('action') ? hash['action'] : SKIP
  active = hash.key?('active') ? hash['active'] : SKIP
  approved_user_id =
    hash.key?('approved_user_id') ? hash['approved_user_id'] : SKIP
  approved_username =
    hash.key?('approved_username') ? hash['approved_username'] : SKIP
  categories = hash.key?('categories') ? hash['categories'] : SKIP
  categories_access =
    hash.key?('categories_access') ? hash['categories_access'] : SKIP
  cloud_reputation =
    hash.key?('cloud_reputation') ? hash['cloud_reputation'] : SKIP
  created_user_id =
    hash.key?('created_user_id') ? hash['created_user_id'] : SKIP
  created_username =
    hash.key?('created_username') ? hash['created_username'] : SKIP
  description = hash.key?('description') ? hash['description'] : SKIP
  full_match = hash.key?('full_match') ? hash['full_match'] : SKIP
  hit_count = hash.key?('hit_count') ? hash['hit_count'] : SKIP
  port_ranges = hash.key?('port_ranges') ? hash['port_ranges'] : SKIP
  ports = hash.key?('ports') ? hash['ports'] : SKIP
  protocols = hash.key?('protocols') ? hash['protocols'] : SKIP
  valid = hash.key?('valid') ? hash['valid'] : SKIP
  state = hash.key?('state') ? hash['state'] : SKIP
  usage_percentage =
    hash.key?('usage_percentage') ? hash['usage_percentage'] : SKIP
  modified_user_id =
    hash.key?('modified_user_id') ? hash['modified_user_id'] : SKIP
  modified_username =
    hash.key?('modified_username') ? hash['modified_username'] : SKIP
  last_modified = hash.key?('last_modified') ? hash['last_modified'] : SKIP
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
  last_user_modified =
    hash.key?('last_user_modified') ? hash['last_user_modified'] : SKIP
  state_modified =
    hash.key?('state_modified') ? hash['state_modified'] : SKIP
  virtual_zones = VirtualZones.from_hash(hash['virtual_zones']) if hash['virtual_zones']

  # Create object from extracted values.
  ActionablePolicy.new(actionable_id,
                       role_number,
                       role_name,
                       resource_id,
                       id,
                       site_id,
                       action,
                       active,
                       approved_user_id,
                       approved_username,
                       categories,
                       categories_access,
                       cloud_reputation,
                       created_user_id,
                       created_username,
                       description,
                       full_match,
                       hit_count,
                       port_ranges,
                       ports,
                       protocols,
                       valid,
                       state,
                       usage_percentage,
                       modified_user_id,
                       modified_username,
                       last_modified,
                       timestamp,
                       last_user_modified,
                       state_modified,
                       virtual_zones)
end

.namesObject

A mapping from model property names to API property names.



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 137

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['actionable_id'] = 'actionable_id'
  @_hash['role_number'] = 'role_number'
  @_hash['role_name'] = 'role_name'
  @_hash['resource_id'] = 'resource_id'
  @_hash['id'] = 'id'
  @_hash['site_id'] = 'site_id'
  @_hash['action'] = 'action'
  @_hash['active'] = 'active'
  @_hash['approved_user_id'] = 'approved_user_id'
  @_hash['approved_username'] = 'approved_username'
  @_hash['categories'] = 'categories'
  @_hash['categories_access'] = 'categories_access'
  @_hash['cloud_reputation'] = 'cloud_reputation'
  @_hash['created_user_id'] = 'created_user_id'
  @_hash['created_username'] = 'created_username'
  @_hash['description'] = 'description'
  @_hash['full_match'] = 'full_match'
  @_hash['hit_count'] = 'hit_count'
  @_hash['port_ranges'] = 'port_ranges'
  @_hash['ports'] = 'ports'
  @_hash['protocols'] = 'protocols'
  @_hash['valid'] = 'valid'
  @_hash['state'] = 'state'
  @_hash['usage_percentage'] = 'usage_percentage'
  @_hash['modified_user_id'] = 'modified_user_id'
  @_hash['modified_username'] = 'modified_username'
  @_hash['last_modified'] = 'last_modified'
  @_hash['timestamp'] = 'timestamp'
  @_hash['last_user_modified'] = 'last_user_modified'
  @_hash['state_modified'] = 'state_modified'
  @_hash['virtual_zones'] = 'virtual_zones'
  @_hash
end

.nullablesObject

An array for nullable fields



211
212
213
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 211

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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
# File 'lib/ctd_documentation/models/actionable_policy.rb', line 174

def self.optionals
  %w[
    actionable_id
    role_number
    role_name
    resource_id
    id
    site_id
    action
    active
    approved_user_id
    approved_username
    categories
    categories_access
    cloud_reputation
    created_user_id
    created_username
    description
    full_match
    hit_count
    port_ranges
    ports
    protocols
    valid
    state
    usage_percentage
    modified_user_id
    modified_username
    last_modified
    timestamp
    last_user_modified
    state_modified
    virtual_zones
  ]
end