Class: MistApi::AccountOauthInfoAccount

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

Overview

OAuth linked apps account info

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(account_id = SKIP, auto_probe_subnet = SKIP, client_id = SKIP, cloud_name = SKIP, company = SKIP, enable_probe = SKIP, error = SKIP, errors = SKIP, instance_url = SKIP, key_id = SKIP, last_status = SKIP, last_sync = SKIP, linked_by = SKIP, linked_timestamp = SKIP, max_daily_api_requests = SKIP, name = SKIP, password = SKIP, region = SKIP, regions = SKIP, service_account_name = SKIP, service_connections = SKIP, smartgroup_name = SKIP, tsg_id = SKIP, username = SKIP, webhook_auth_type = SKIP, webhook_enabled = SKIP, webhook_password = SKIP, webhook_secret = SKIP, webhook_token = SKIP, webhook_url = SKIP, webhook_username = SKIP, zdx_org_id = SKIP) ⇒ AccountOauthInfoAccount

Returns a new instance of AccountOauthInfoAccount.



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
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 223

def initialize( = SKIP, auto_probe_subnet = SKIP,
               client_id = SKIP, cloud_name = SKIP, company = SKIP,
               enable_probe = SKIP, error = SKIP, errors = SKIP,
               instance_url = SKIP, key_id = SKIP, last_status = SKIP,
               last_sync = SKIP, linked_by = SKIP, linked_timestamp = SKIP,
               max_daily_api_requests = SKIP, name = SKIP, password = SKIP,
               region = SKIP, regions = SKIP,  = SKIP,
               service_connections = SKIP, smartgroup_name = SKIP,
               tsg_id = SKIP, username = SKIP, webhook_auth_type = SKIP,
               webhook_enabled = SKIP, webhook_password = SKIP,
               webhook_secret = SKIP, webhook_token = SKIP,
               webhook_url = SKIP, webhook_username = SKIP,
               zdx_org_id = SKIP)
  @account_id =  unless  == SKIP
  @auto_probe_subnet = auto_probe_subnet unless auto_probe_subnet == SKIP
  @client_id = client_id unless client_id == SKIP
  @cloud_name = cloud_name unless cloud_name == SKIP
  @company = company unless company == SKIP
  @enable_probe = enable_probe unless enable_probe == SKIP
  @error = error unless error == SKIP
  @errors = errors unless errors == SKIP
  @instance_url = instance_url unless instance_url == SKIP
  @key_id = key_id unless key_id == SKIP
  @last_status = last_status unless last_status == SKIP
  @last_sync = last_sync unless last_sync == SKIP
  @linked_by = linked_by unless linked_by == SKIP
  @linked_timestamp = linked_timestamp unless linked_timestamp == SKIP
  @max_daily_api_requests = max_daily_api_requests unless max_daily_api_requests == SKIP
  @name = name unless name == SKIP
  @password = password unless password == SKIP
  @region = region unless region == SKIP
  @regions = regions unless regions == SKIP
  @service_account_name =  unless  == SKIP
  @service_connections = service_connections unless service_connections == SKIP
  @smartgroup_name = smartgroup_name unless smartgroup_name == SKIP
  @tsg_id = tsg_id unless tsg_id == SKIP
  @username = username unless username == SKIP
  @webhook_auth_type = webhook_auth_type unless webhook_auth_type == SKIP
  @webhook_enabled = webhook_enabled unless webhook_enabled == SKIP
  @webhook_password = webhook_password unless webhook_password == SKIP
  @webhook_secret = webhook_secret unless webhook_secret == SKIP
  @webhook_token = webhook_token unless webhook_token == SKIP
  @webhook_url = webhook_url unless webhook_url == SKIP
  @webhook_username = webhook_username unless webhook_username == SKIP
  @zdx_org_id = zdx_org_id unless zdx_org_id == SKIP
end

Instance Attribute Details

#account_idString

Linked app account id

Returns:

  • (String)


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

def 
  @account_id
end

#auto_probe_subnetString

For Prisma accounts only, tunnel auto probe subnet

Returns:

  • (String)


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

def auto_probe_subnet
  @auto_probe_subnet
end

#client_idString

Customer account Client ID

Returns:

  • (String)


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

def client_id
  @client_id
end

#cloud_nameString

Name of the company whose account mist has subscribed to

Returns:

  • (String)


26
27
28
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 26

def cloud_name
  @cloud_name
end

#companyString

Name of the company whose account mist has subscribed to

Returns:

  • (String)


30
31
32
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 30

def company
  @company
end

#enable_probeTrueClass | FalseClass

For Prisma accounts only, tunnel probe enable/disable

Returns:

  • (TrueClass | FalseClass)


34
35
36
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 34

def enable_probe
  @enable_probe
end

#errorString

This error is provided when the account fails to fetch token/data

Returns:

  • (String)


38
39
40
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 38

def error
  @error
end

#errorsArray[String]

This error is provided when the account fails to fetch token/data

Returns:

  • (Array[String])


42
43
44
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 42

def errors
  @errors
end

#instance_urlString

Customer account instance URL

Returns:

  • (String)


46
47
48
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 46

def instance_url
  @instance_url
end

#key_idString

For ZDX Account only, Customer account API key ID

Returns:

  • (String)


50
51
52
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 50

def key_id
  @key_id
end

#last_statusString

Is the last data pull for account is successful or not

Returns:

  • (String)


54
55
56
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 54

def last_status
  @last_status
end

#last_syncInteger

Last data pull timestamp, background jobs that pull account data

Returns:

  • (Integer)


58
59
60
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 58

def last_sync
  @last_sync
end

#linked_byString

First name of the user who linked the account

Returns:

  • (String)


62
63
64
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 62

def linked_by
  @linked_by
end

#linked_timestampFloat

First name of the user who linked the account

Returns:

  • (Float)


66
67
68
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 66

def linked_timestamp
  @linked_timestamp
end

#max_daily_api_requestsInteger

Zoom daily api request quota, developers.zoom.us/docs/api/rest/rate-limits/

Returns:

  • (Integer)


71
72
73
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 71

def max_daily_api_requests
  @max_daily_api_requests
end

#nameString

Name of the company whose account mist has subscribed to

Returns:

  • (String)


75
76
77
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 75

def name
  @name
end

#passwordString

Customer account password instance URL

Returns:

  • (String)


79
80
81
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 79

def password
  @password
end

#regionString

For Prisma accounts only

Returns:

  • (String)


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

def region
  @region
end

#regionsHash[String, AccountOauthInfoAccountRegion]

For Prisma accounts only, property key is the region name. Regions with allocated bandwidth

Returns:



88
89
90
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 88

def regions
  @regions
end

#service_account_nameString

For Prisma accounts only

Returns:

  • (String)


92
93
94
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 92

def 
  @service_account_name
end

#service_connectionsHash[String, AccountOauthInfoAccountServiceConnection]

For Prisma accounts only, property key is the service connection name

Returns:



96
97
98
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 96

def service_connections
  @service_connections
end

#smartgroup_nameString

Smart group membership for determining compliance status

Returns:

  • (String)


100
101
102
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 100

def smartgroup_name
  @smartgroup_name
end

#tsg_idString

For Prisma accounts only, Prisma Tenant Service Group id

Returns:

  • (String)


104
105
106
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 104

def tsg_id
  @tsg_id
end

#usernameString

Customer account username

Returns:

  • (String)


108
109
110
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 108

def username
  @username
end

#webhook_auth_typeString

For Crowdstrike, JAMF, SentinelOne and VMWare accounts only

Returns:

  • (String)


112
113
114
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 112

def webhook_auth_type
  @webhook_auth_type
end

#webhook_enabledTrueClass | FalseClass

For Crowdstrike, JAMF, SentinelOne and VMWare accounts only

Returns:

  • (TrueClass | FalseClass)


116
117
118
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 116

def webhook_enabled
  @webhook_enabled
end

#webhook_passwordString

For VMWare accounts only

Returns:

  • (String)


120
121
122
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 120

def webhook_password
  @webhook_password
end

#webhook_secretString

For Crowdstrike accounts only

Returns:

  • (String)


124
125
126
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 124

def webhook_secret
  @webhook_secret
end

#webhook_tokenString

For JAMF and SentinelOne accounts only

Returns:

  • (String)


128
129
130
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 128

def webhook_token
  @webhook_token
end

#webhook_urlString

For Crowdstrike, JAMF, SentinelOne and VMWare accounts only

Returns:

  • (String)


132
133
134
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 132

def webhook_url
  @webhook_url
end

#webhook_usernameString

For VMWare accounts only

Returns:

  • (String)


136
137
138
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 136

def webhook_username
  @webhook_username
end

#zdx_org_idString

For ZDX Account only, ZDX organization id

Returns:

  • (String)


140
141
142
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 140

def zdx_org_id
  @zdx_org_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



271
272
273
274
275
276
277
278
279
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
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 271

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
   = hash.key?('account_id') ? hash['account_id'] : SKIP
  auto_probe_subnet =
    hash.key?('auto_probe_subnet') ? hash['auto_probe_subnet'] : SKIP
  client_id = hash.key?('client_id') ? hash['client_id'] : SKIP
  cloud_name = hash.key?('cloud_name') ? hash['cloud_name'] : SKIP
  company = hash.key?('company') ? hash['company'] : SKIP
  enable_probe = hash.key?('enable_probe') ? hash['enable_probe'] : SKIP
  error = hash.key?('error') ? hash['error'] : SKIP
  errors = hash.key?('errors') ? hash['errors'] : SKIP
  instance_url = hash.key?('instance_url') ? hash['instance_url'] : SKIP
  key_id = hash.key?('key_id') ? hash['key_id'] : SKIP
  last_status = hash.key?('last_status') ? hash['last_status'] : SKIP
  last_sync = hash.key?('last_sync') ? hash['last_sync'] : SKIP
  linked_by = hash.key?('linked_by') ? hash['linked_by'] : SKIP
  linked_timestamp =
    hash.key?('linked_timestamp') ? hash['linked_timestamp'] : SKIP
  max_daily_api_requests =
    hash.key?('max_daily_api_requests') ? hash['max_daily_api_requests'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  password = hash.key?('password') ? hash['password'] : SKIP
  region = hash.key?('region') ? hash['region'] : SKIP
  regions = AccountOauthInfoAccountRegion.from_hash(hash['regions']) if hash['regions']

  regions = SKIP unless hash.key?('regions')
   =
    hash.key?('service_account_name') ? hash['service_account_name'] : SKIP
  if hash['service_connections']
    service_connections = AccountOauthInfoAccountServiceConnection.from_hash(hash['service_connections'])
  end

  service_connections = SKIP unless hash.key?('service_connections')
  smartgroup_name =
    hash.key?('smartgroup_name') ? hash['smartgroup_name'] : SKIP
  tsg_id = hash.key?('tsg_id') ? hash['tsg_id'] : SKIP
  username = hash.key?('username') ? hash['username'] : SKIP
  webhook_auth_type =
    hash.key?('webhook_auth_type') ? hash['webhook_auth_type'] : SKIP
  webhook_enabled =
    hash.key?('webhook_enabled') ? hash['webhook_enabled'] : SKIP
  webhook_password =
    hash.key?('webhook_password') ? hash['webhook_password'] : SKIP
  webhook_secret =
    hash.key?('webhook_secret') ? hash['webhook_secret'] : SKIP
  webhook_token = hash.key?('webhook_token') ? hash['webhook_token'] : SKIP
  webhook_url = hash.key?('webhook_url') ? hash['webhook_url'] : SKIP
  webhook_username =
    hash.key?('webhook_username') ? hash['webhook_username'] : SKIP
  zdx_org_id = hash.key?('zdx_org_id') ? hash['zdx_org_id'] : SKIP

  # Create object from extracted values.
  AccountOauthInfoAccount.new(,
                              auto_probe_subnet,
                              client_id,
                              cloud_name,
                              company,
                              enable_probe,
                              error,
                              errors,
                              instance_url,
                              key_id,
                              last_status,
                              last_sync,
                              linked_by,
                              linked_timestamp,
                              max_daily_api_requests,
                              name,
                              password,
                              region,
                              regions,
                              ,
                              service_connections,
                              smartgroup_name,
                              tsg_id,
                              username,
                              webhook_auth_type,
                              webhook_enabled,
                              webhook_password,
                              webhook_secret,
                              webhook_token,
                              webhook_url,
                              webhook_username,
                              zdx_org_id)
end

.namesObject

A mapping from model property names to API property names.



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
172
173
174
175
176
177
178
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 143

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['account_id'] = 'account_id'
  @_hash['auto_probe_subnet'] = 'auto_probe_subnet'
  @_hash['client_id'] = 'client_id'
  @_hash['cloud_name'] = 'cloud_name'
  @_hash['company'] = 'company'
  @_hash['enable_probe'] = 'enable_probe'
  @_hash['error'] = 'error'
  @_hash['errors'] = 'errors'
  @_hash['instance_url'] = 'instance_url'
  @_hash['key_id'] = 'key_id'
  @_hash['last_status'] = 'last_status'
  @_hash['last_sync'] = 'last_sync'
  @_hash['linked_by'] = 'linked_by'
  @_hash['linked_timestamp'] = 'linked_timestamp'
  @_hash['max_daily_api_requests'] = 'max_daily_api_requests'
  @_hash['name'] = 'name'
  @_hash['password'] = 'password'
  @_hash['region'] = 'region'
  @_hash['regions'] = 'regions'
  @_hash['service_account_name'] = 'service_account_name'
  @_hash['service_connections'] = 'service_connections'
  @_hash['smartgroup_name'] = 'smartgroup_name'
  @_hash['tsg_id'] = 'tsg_id'
  @_hash['username'] = 'username'
  @_hash['webhook_auth_type'] = 'webhook_auth_type'
  @_hash['webhook_enabled'] = 'webhook_enabled'
  @_hash['webhook_password'] = 'webhook_password'
  @_hash['webhook_secret'] = 'webhook_secret'
  @_hash['webhook_token'] = 'webhook_token'
  @_hash['webhook_url'] = 'webhook_url'
  @_hash['webhook_username'] = 'webhook_username'
  @_hash['zdx_org_id'] = 'zdx_org_id'
  @_hash
end

.nullablesObject

An array for nullable fields



219
220
221
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 219

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 181

def self.optionals
  %w[
    account_id
    auto_probe_subnet
    client_id
    cloud_name
    company
    enable_probe
    error
    errors
    instance_url
    key_id
    last_status
    last_sync
    linked_by
    linked_timestamp
    max_daily_api_requests
    name
    password
    region
    regions
    service_account_name
    service_connections
    smartgroup_name
    tsg_id
    username
    webhook_auth_type
    webhook_enabled
    webhook_password
    webhook_secret
    webhook_token
    webhook_url
    webhook_username
    zdx_org_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 377

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} account_id: #{@account_id.inspect}, auto_probe_subnet:"\
  " #{@auto_probe_subnet.inspect}, client_id: #{@client_id.inspect}, cloud_name:"\
  " #{@cloud_name.inspect}, company: #{@company.inspect}, enable_probe:"\
  " #{@enable_probe.inspect}, error: #{@error.inspect}, errors: #{@errors.inspect},"\
  " instance_url: #{@instance_url.inspect}, key_id: #{@key_id.inspect}, last_status:"\
  " #{@last_status.inspect}, last_sync: #{@last_sync.inspect}, linked_by:"\
  " #{@linked_by.inspect}, linked_timestamp: #{@linked_timestamp.inspect},"\
  " max_daily_api_requests: #{@max_daily_api_requests.inspect}, name: #{@name.inspect},"\
  " password: #{@password.inspect}, region: #{@region.inspect}, regions: #{@regions.inspect},"\
  " service_account_name: #{@service_account_name.inspect}, service_connections:"\
  " #{@service_connections.inspect}, smartgroup_name: #{@smartgroup_name.inspect}, tsg_id:"\
  " #{@tsg_id.inspect}, username: #{@username.inspect}, webhook_auth_type:"\
  " #{@webhook_auth_type.inspect}, webhook_enabled: #{@webhook_enabled.inspect},"\
  " webhook_password: #{@webhook_password.inspect}, webhook_secret:"\
  " #{@webhook_secret.inspect}, webhook_token: #{@webhook_token.inspect}, webhook_url:"\
  " #{@webhook_url.inspect}, webhook_username: #{@webhook_username.inspect}, zdx_org_id:"\
  " #{@zdx_org_id.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/mist_api/models/account_oauth_info_account.rb', line 360

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} account_id: #{@account_id}, auto_probe_subnet: #{@auto_probe_subnet},"\
  " client_id: #{@client_id}, cloud_name: #{@cloud_name}, company: #{@company}, enable_probe:"\
  " #{@enable_probe}, error: #{@error}, errors: #{@errors}, instance_url: #{@instance_url},"\
  " key_id: #{@key_id}, last_status: #{@last_status}, last_sync: #{@last_sync}, linked_by:"\
  " #{@linked_by}, linked_timestamp: #{@linked_timestamp}, max_daily_api_requests:"\
  " #{@max_daily_api_requests}, name: #{@name}, password: #{@password}, region: #{@region},"\
  " regions: #{@regions}, service_account_name: #{@service_account_name}, service_connections:"\
  " #{@service_connections}, smartgroup_name: #{@smartgroup_name}, tsg_id: #{@tsg_id},"\
  " username: #{@username}, webhook_auth_type: #{@webhook_auth_type}, webhook_enabled:"\
  " #{@webhook_enabled}, webhook_password: #{@webhook_password}, webhook_secret:"\
  " #{@webhook_secret}, webhook_token: #{@webhook_token}, webhook_url: #{@webhook_url},"\
  " webhook_username: #{@webhook_username}, zdx_org_id: #{@zdx_org_id}>"
end