Class: Falcon::NetworkScanTemplates
- Inherits:
-
Object
- Object
- Falcon::NetworkScanTemplates
- Defined in:
- lib/crimson-falcon/api/network_scan_templates.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_templates(body, opts = {}) ⇒ DomainTemplateEntitiesResponse
Create "templates" using provided specifications.
-
#create_templates_with_http_info(body, opts = {}) ⇒ Array<(DomainTemplateEntitiesResponse, Integer, Hash)>
Create "templates" using provided specifications.
-
#delete_templates(ids, opts = {}) ⇒ MsaspecQueryResponse
Delete "templates" by their IDs.
-
#delete_templates_with_http_info(ids, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Delete "templates" by their IDs.
-
#get_template_configs(opts = {}) ⇒ MsaspecQueryResponse
Get details on the network scan template configurations.
-
#get_template_configs_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Get details on the network scan template configurations.
-
#get_templates(ids, opts = {}) ⇒ DomainTemplateEntitiesResponse
Get "templates" by their IDs.
-
#get_templates_with_http_info(ids, opts = {}) ⇒ Array<(DomainTemplateEntitiesResponse, Integer, Hash)>
Get "templates" by their IDs.
-
#initialize(api_client = ApiClient.default) ⇒ NetworkScanTemplates
constructor
A new instance of NetworkScanTemplates.
-
#query_templates(opts = {}) ⇒ MsaspecQueryResponse
Get "templates IDs" by filter.
-
#query_templates_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Get "templates IDs" by filter.
-
#update_templates(body, opts = {}) ⇒ DomainTemplateEntitiesResponse
Update "templates" using provided specifications.
-
#update_templates_with_http_info(body, opts = {}) ⇒ Array<(DomainTemplateEntitiesResponse, Integer, Hash)>
Update "templates" using provided specifications.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ NetworkScanTemplates
Returns a new instance of NetworkScanTemplates.
35 36 37 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 35 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
33 34 35 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 33 def api_client @api_client end |
Instance Method Details
#create_templates(body, opts = {}) ⇒ DomainTemplateEntitiesResponse
Create "templates" using provided specifications
43 44 45 46 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 43 def create_templates(body, opts = {}) data, _status_code, _headers = create_templates_with_http_info(body, opts) data end |
#create_templates_with_http_info(body, opts = {}) ⇒ Array<(DomainTemplateEntitiesResponse, Integer, Hash)>
Create "templates" using provided specifications
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 53 def create_templates_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkScanTemplates.create_templates ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkScanTemplates.create_templates" end # resource path local_var_path = '/netscan/entities/templates/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-CS-USERUUID'] = opts[:'x_cs_useruuid'] if !opts[:'x_cs_useruuid'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'DomainTemplateEntitiesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"NetworkScanTemplates.create_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkScanTemplates#create_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_templates(ids, opts = {}) ⇒ MsaspecQueryResponse
Delete "templates" by their IDs
112 113 114 115 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 112 def delete_templates(ids, opts = {}) data, _status_code, _headers = delete_templates_with_http_info(ids, opts) data end |
#delete_templates_with_http_info(ids, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Delete "templates" by their IDs
122 123 124 125 126 127 128 129 130 131 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 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 122 def delete_templates_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkScanTemplates.delete_templates ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling NetworkScanTemplates.delete_templates" end # resource path local_var_path = '/netscan/entities/templates/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'ids'] = @api_client.build_collection_param(ids, :multi) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-CS-USERUUID'] = opts[:'x_cs_useruuid'] if !opts[:'x_cs_useruuid'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"NetworkScanTemplates.delete_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkScanTemplates#delete_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_template_configs(opts = {}) ⇒ MsaspecQueryResponse
Get details on the network scan template configurations
176 177 178 179 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 176 def get_template_configs(opts = {}) data, _status_code, _headers = get_template_configs_with_http_info(opts) data end |
#get_template_configs_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Get details on the network scan template configurations
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 221 222 223 224 225 226 227 228 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 185 def get_template_configs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkScanTemplates.get_template_configs ...' end # resource path local_var_path = '/netscan/entities/template-configs/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-CS-USERUUID'] = opts[:'x_cs_useruuid'] if !opts[:'x_cs_useruuid'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"NetworkScanTemplates.get_template_configs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkScanTemplates#get_template_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_templates(ids, opts = {}) ⇒ DomainTemplateEntitiesResponse
Get "templates" by their IDs
235 236 237 238 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 235 def get_templates(ids, opts = {}) data, _status_code, _headers = get_templates_with_http_info(ids, opts) data end |
#get_templates_with_http_info(ids, opts = {}) ⇒ Array<(DomainTemplateEntitiesResponse, Integer, Hash)>
Get "templates" by their IDs
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 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 245 def get_templates_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkScanTemplates.get_templates ...' end # verify the required parameter 'ids' is set if @api_client.config.client_side_validation && ids.nil? fail ArgumentError, "Missing the required parameter 'ids' when calling NetworkScanTemplates.get_templates" end # resource path local_var_path = '/netscan/entities/templates/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'ids'] = @api_client.build_collection_param(ids, :multi) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-CS-USERUUID'] = opts[:'x_cs_useruuid'] if !opts[:'x_cs_useruuid'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DomainTemplateEntitiesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"NetworkScanTemplates.get_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkScanTemplates#get_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#query_templates(opts = {}) ⇒ MsaspecQueryResponse
Get "templates IDs" by filter
303 304 305 306 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 303 def query_templates(opts = {}) data, _status_code, _headers = query_templates_with_http_info(opts) data end |
#query_templates_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>
Get "templates IDs" by filter
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 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 316 def query_templates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkScanTemplates.query_templates ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling NetworkScanTemplates.query_templates, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NetworkScanTemplates.query_templates, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling NetworkScanTemplates.query_templates, must be greater than or equal to 1.' end # resource path local_var_path = '/netscan/queries/templates/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'X-CS-USERUUID'] = opts[:'x_cs_useruuid'] if !opts[:'x_cs_useruuid'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"NetworkScanTemplates.query_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkScanTemplates#query_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_templates(body, opts = {}) ⇒ DomainTemplateEntitiesResponse
Update "templates" using provided specifications
382 383 384 385 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 382 def update_templates(body, opts = {}) data, _status_code, _headers = update_templates_with_http_info(body, opts) data end |
#update_templates_with_http_info(body, opts = {}) ⇒ Array<(DomainTemplateEntitiesResponse, Integer, Hash)>
Update "templates" using provided specifications
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/crimson-falcon/api/network_scan_templates.rb', line 392 def update_templates_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: NetworkScanTemplates.update_templates ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling NetworkScanTemplates.update_templates" end # resource path local_var_path = '/netscan/entities/templates/v1' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'X-CS-USERUUID'] = opts[:'x_cs_useruuid'] if !opts[:'x_cs_useruuid'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'DomainTemplateEntitiesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"NetworkScanTemplates.update_templates", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: NetworkScanTemplates#update_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |