From 4f67c6707effe6d4a8bae074b134d52eb97294fc Mon Sep 17 00:00:00 2001 From: Carlos Matos Date: Mon, 27 Jan 2025 14:40:29 -0500 Subject: [PATCH] feat: new sdk operation updates as of 2025-01-27 --- README.md | 498 +++++++++--- docs/ASPM.md | 190 ++++- docs/Alerts.md | 78 +- docs/ApiCreateRuleOperationV1.md | 22 + docs/ApiGetEntitiesRulesResponseV1.md | 22 + docs/ApiPatchRuleOperationV1.md | 22 + docs/ApiPatchRuleSearchV1.md | 24 + docs/ApiRuleCreateRequestV1.md | 38 + docs/ApiRuleOperationV1.md | 24 + docs/ApiRulePatchRequestV1.md | 34 + docs/ApiRuleScheduleV1.md | 18 + docs/ApiRuleScheduleV1Patch.md | 18 + docs/ApiRuleSearchV1.md | 24 + docs/ApiRuleV1.md | 70 +- docs/ApidomainSavedSearchExecuteRequestV1.md | 12 - docs/AssetsGetResourceIDsResponse.md | 22 + docs/AssetsGetResourcesResponse.md | 22 + ...seSetContentUpdatePolicyPrecedenceReqV1.md | 18 + docs/ClientFQLStatement.md | 22 - docs/{Default.md => CloudAwsRegistration.md} | 50 +- docs/CloudAzureRegistration.md | 77 ++ docs/CloudSecurityAssets.md | 159 ++++ docs/ContainerAlerts.md | 22 +- docs/ContainerDetections.md | 60 +- docs/ContainerImages.md | 144 ++-- docs/ContainerPackages.md | 160 +++- docs/ContainerVulnerabilities.md | 140 ++-- docs/ContentUpdateCreatePoliciesReqV1.md | 18 + docs/ContentUpdateCreatePolicyReqV1.md | 22 + docs/ContentUpdatePolicies.md | 745 +++++++++++++++++ docs/ContentUpdateRingAssignmentSettingsV1.md | 20 + docs/ContentUpdateSettingsV1.md | 18 + docs/ContentUpdateUpdatePoliciesReqV1.md | 18 + docs/ContentUpdateUpdatePolicyReqV1.md | 24 + docs/CorrelationRules.md | 517 ++++++++++++ docs/CspmRegistration.md | 96 ++- docs/CustomIoa.md | 36 +- docs/D4cRegistration.md | 84 +- docs/DataclassificationsLabel.md | 22 + docs/DataclassificationsResponse.md | 26 + docs/DataclassificationsTag.md | 24 + docs/Deployments.md | 83 ++ docs/DeploymentsAPIDeploymentRingView.md | 30 + docs/DeploymentsAPIDeploymentView.md | 32 + docs/DeploymentsAPIDeploymentViewWrapper.md | 22 + docs/DetectsapiPostCombinedAlertsV1Meta.md | 24 + docs/DetectsapiPostCombinedAlertsV1Paging.md | 22 + ...tsapiPostCombinedAlertsV1RequestSwagger.md | 24 + ...sapiPostCombinedAlertsV1ResponseSwagger.md | 22 + docs/DeviceContent.md | 155 ++++ docs/DeviceControlUSBClassExceptionsReqV1.md | 2 +- ...DeviceControlUSBClassExceptionsResponse.md | 2 +- docs/DevicecontentContentCategory.md | 18 + docs/DevicecontentState.md | 40 + docs/DevicecontentapiEntitiesResponseV1.md | 22 + docs/DevicecontentapiQueryResponseV1.md | 22 + docs/Discover.md | 70 ++ docs/DomainAWSAccountResourceMetadata.md | 10 + docs/DomainBenchmark.md | 2 + docs/DomainContentUpdatePolicyRespV1.md | 52 ++ docs/DomainContentUpdateSettingsV1.md | 18 + docs/DomainDiscoverAPIActiveDiscoveryHost.md | 4 + docs/DomainDiscoverAPIApplicationHost.md | 2 + docs/DomainDiscoverAPIHost.md | 6 + docs/DomainDiscoverAPIIoTHost.md | 6 + docs/DomainKestrelParams.md | 18 + docs/DomainLookupFile.md | 50 ++ docs/DomainLookupFileWrapper.md | 22 + docs/DomainReportMetadata.md | 2 + docs/DomainRingAssignmentSettingsV1.md | 22 + docs/DomainScheduledReportV1.md | 2 + docs/DomainUpdateRuleRequestV1.md | 2 + docs/DriftIndicators.md | 48 +- docs/ExposureManagement.md | 4 + docs/FalconContainerImage.md | 28 +- docs/FalconxSandbox.md | 4 +- docs/FigapiAdversary.md | 18 + docs/FigapiCountry.md | 20 + docs/FigapiDomain.md | 40 + docs/FigapiEmailAddress.md | 22 + docs/FigapiFile.md | 30 + docs/FigapiIPv4.md | 24 + docs/FigapiIPv6.md | 24 + docs/FigapiIndicator.md | 62 ++ docs/FigapiMXRecord.md | 26 + docs/FigapiNameServer.md | 22 + docs/FigapiReport.md | 18 + docs/FigapiSector.md | 20 + docs/FigapiThreat.md | 18 + docs/FigapiURL.md | 20 + docs/FigapiVulnerability.md | 48 ++ docs/FigapiWhoIS.md | 24 + docs/FigapiWhoisRecord.md | 34 + docs/FigapiX509Certificate.md | 32 + docs/Filevantage.md | 54 +- docs/FirewallManagement.md | 72 +- docs/FoundryLogscale.md | 4 +- docs/GraphCondition.md | 4 +- docs/Help.md | 18 + docs/HostMigration.md | 12 +- docs/IngestionCVEExploitReference.md | 22 + docs/IngestionCVEExploitSource.md | 24 + docs/IngestionExPRTRatingFactors.md | 24 + docs/IngestionReference.md | 20 + docs/IntelligenceIndicatorGraph.md | 85 ++ docs/InventoryapiSurfaceError.md | 22 + docs/InventoryapiUserExternalAsset.md | 20 + docs/InventoryapiUserExternalAssetCreate.md | 20 + ...toryapiUserExternalAssetCreateRequestV1.md | 18 + ...oryapiUserExternalAssetCreateResponseV1.md | 22 + docs/InventoryapiUserExternalAssetResult.md | 32 + docs/InventoryapidomainSubsidiary.md | 20 + docs/JsonschemaPivot.md | 4 + docs/JsonschemaSignalsExtensions.md | 6 +- docs/JsonschemaUIExtensions.md | 8 +- docs/KubernetesProtection.md | 304 +++---- docs/LookupFiles.md | 163 ++++ docs/ModelsAPICustomerAndImage.md | 2 + docs/ModelsAPIImageCombinedExport.md | 4 + docs/ModelsAPIPackageCombined.md | 2 + docs/ModelsAPIPackageCombinedV2.md | 38 + docs/ModelsAPIVulnerabilityCombined.md | 2 + docs/ModelsApplicationLibrary.md | 4 +- docs/ModelsContainer.md | 2 + docs/ModelsExtAPIImageCombined.md | 2 + docs/ModelsMessage.md | 18 + docs/ModelsPartialFingerprints.md | 18 + docs/ModelsResult.md | 32 + docs/ModelsResultLocation.md | 20 + docs/ModelsResultLocationProperties.md | 20 + docs/ModelsResultPhysicalLocation.md | 20 + ...sResultPhysicalLocationArtifactLocation.md | 18 + docs/ModelsResultPhysicalLocationRegion.md | 18 + docs/ModelsResultProperties.md | 36 + docs/ModelsRule.md | 32 + docs/ModelsRuleDefaultConfiguration.md | 18 + docs/ModelsRuleProperties.md | 78 ++ docs/ModelsRun.md | 20 + docs/ModelsRunTool.md | 18 + docs/ModelsRunToolDriver.md | 24 + docs/ModelsVulnerabilitySARIF.md | 22 + docs/PackagesApiCombinedPackageV2.md | 22 + docs/PolicyframeworkBenchmark.md | 20 + docs/PolicyframeworkControl.md | 30 + docs/QuickscanproQueryScanResultsResponse.md | 2 + docs/Recon.md | 2 +- docs/RegistrationAWSAccountExtV2.md | 4 + docs/RegistrationAWSAccountPatch.md | 4 + docs/RegistrationAWSAccountResponseV2.md | 2 +- ...ationAzureDownloadCertificateResponseV1.md | 2 +- docs/RegistrationIOMEventV2.md | 2 + docs/ReleaseNotes.md | 247 ++++++ docs/ReleasecontentsReleaseContent.md | 32 + docs/ReleasecontentsReleaseContentVersion.md | 22 + docs/ReleasenotesEntitiesGetRequest.md | 18 + .../ReleasenotesEntitiesGetResponseWrapper.md | 22 + docs/ReleasenotesNoteDetail.md | 24 + docs/ReleasenotesReleaseNoteV1.md | 28 + docs/ReleasenotesReleaseNoteWrapperV1.md | 22 + docs/Releases.md | 89 ++ docs/ReleasesRelease.md | 34 + docs/ReleasesReleaseWrapper.md | 22 + docs/ResourcesApp.md | 20 + docs/ResourcesAssetGraph.md | 20 + docs/ResourcesCloudContext.md | 50 ++ docs/ResourcesCloudResource.md | 98 +++ docs/ResourcesCompliance.md | 30 + docs/ResourcesDetections.md | 28 + docs/ResourcesHost.md | 50 ++ docs/ResourcesRelationship.md | 24 + docs/ResourcesVulnerability.md | 22 + docs/RestAzureDownloadScriptRequestData.md | 18 + docs/RestAzureDownloadScriptRequestV1.md | 18 + ...zureProvisionGetAccountScriptResponseV1.md | 22 + docs/RestAzureScript.md | 24 + docs/RestCursorAndLimitMetaInfo.md | 28 + docs/RestCursorMetaInfo.md | 26 + docs/RestCursorResponseFields.md | 20 + docs/RestPaging.md | 22 + docs/RestapiIndicatorResponse.md | 22 + docs/RestapiIndicatorsQueryRequest.md | 20 + docs/RestapiIndicatorsQuerySortRequest.md | 22 + docs/RuntimeDetections.md | 20 +- docs/SadomainTyposquattingBaseDomain.md | 4 + docs/SadomainTyposquattingSubdomain.md | 2 - docs/SampleUploads.md | 2 +- docs/SpotlightVulnerabilities.md | 36 +- docs/StringWrapper.md | 22 + docs/Threatgraph.md | 16 +- docs/TypesGetExecutorNodesMetadataResponse.md | 26 + ...ypesGetIntegrationTasksMetadataResponse.md | 24 + docs/UnidentifiedContainers.md | 28 +- docs/V2ForLoop.md | 2 + docs/Vulnerabilities.md | 85 ++ ...ilitiesVulnerabilityEntitySARIFResponse.md | 22 + lib/crimson-falcon.rb | 136 +++- lib/crimson-falcon/api/alerts.rb | 74 +- lib/crimson-falcon/api/aspm.rb | 199 +++++ .../{default.rb => cloud_aws_registration.rb} | 58 +- .../api/cloud_azure_registration.rb | 105 +++ .../api/cloud_security_assets.rb | 179 ++++ lib/crimson-falcon/api/container_alerts.rb | 20 +- .../api/container_detections.rb | 54 +- lib/crimson-falcon/api/container_images.rb | 132 +-- lib/crimson-falcon/api/container_packages.rb | 142 +++- .../api/container_vulnerabilities.rb | 120 +-- .../api/content_update_policies.rb | 769 ++++++++++++++++++ lib/crimson-falcon/api/correlation_rules.rb | 505 ++++++++++++ lib/crimson-falcon/api/cspm_registration.rb | 91 ++- lib/crimson-falcon/api/custom_ioa.rb | 30 +- lib/crimson-falcon/api/d4c_registration.rb | 87 +- lib/crimson-falcon/api/deployments.rb | 115 +++ lib/crimson-falcon/api/device_content.rb | 176 ++++ lib/crimson-falcon/api/discover.rb | 66 ++ lib/crimson-falcon/api/drift_indicators.rb | 44 +- lib/crimson-falcon/api/exposure_management.rb | 6 + .../api/falcon_container_image.rb | 20 +- lib/crimson-falcon/api/falconx_sandbox.rb | 4 +- lib/crimson-falcon/api/filevantage.rb | 44 +- lib/crimson-falcon/api/firewall_management.rb | 54 +- lib/crimson-falcon/api/foundry_logscale.rb | 4 +- lib/crimson-falcon/api/host_migration.rb | 12 +- .../api/intelligence_indicator_graph.rb | 118 +++ .../api/kubernetes_protection.rb | 280 +++---- lib/crimson-falcon/api/lookup_files.rb | 239 ++++++ lib/crimson-falcon/api/release_notes.rb | 287 +++++++ lib/crimson-falcon/api/releases.rb | 125 +++ lib/crimson-falcon/api/runtime_detections.rb | 18 +- lib/crimson-falcon/api/sample_uploads.rb | 2 +- .../api/spotlight_vulnerabilities.rb | 32 +- lib/crimson-falcon/api/threatgraph.rb | 16 +- .../api/unidentified_containers.rb | 26 +- lib/crimson-falcon/api/vulnerabilities.rb | 106 +++ .../models/api_create_rule_operation_v1.rb | 257 ++++++ .../api_get_entities_rules_response_v1.rb | 266 ++++++ .../models/api_patch_rule_operation_v1.rb | 257 ++++++ .../models/api_patch_rule_search_v1.rb | 261 ++++++ .../models/api_rule_create_request_v1.rb | 354 ++++++++ .../models/api_rule_operation_v1.rb | 266 ++++++ .../models/api_rule_patch_request_v1.rb | 311 +++++++ .../models/api_rule_schedule_v1.rb | 239 ++++++ .../models/api_rule_schedule_v1_patch.rb | 239 ++++++ .../models/api_rule_search_v1.rb | 276 +++++++ lib/crimson-falcon/models/api_rule_v1.rb | 335 +++----- ...idomain_saved_search_execute_request_v1.rb | 90 +- .../assets_get_resource_ids_response.rb | 261 ++++++ .../models/assets_get_resources_response.rb | 266 ++++++ ...content_update_policy_precedence_req_v1.rb | 242 ++++++ .../content_update_create_policies_req_v1.rb | 241 ++++++ .../content_update_create_policy_req_v1.rb | 259 ++++++ ...tent_update_ring_assignment_settings_v1.rb | 253 ++++++ .../models/content_update_settings_v1.rb | 241 ++++++ .../content_update_update_policies_req_v1.rb | 241 ++++++ .../content_update_update_policy_req_v1.rb | 269 ++++++ .../models/dataclassifications_label.rb | 267 ++++++ .../models/dataclassifications_response.rb | 284 +++++++ .../models/dataclassifications_tag.rb | 283 +++++++ .../deployments_api_deployment_ring_view.rb | 302 +++++++ .../models/deployments_api_deployment_view.rb | 309 +++++++ ...deployments_api_deployment_view_wrapper.rb | 271 ++++++ ...detectsapi_post_combined_alerts_v1_meta.rb | 271 ++++++ ...tectsapi_post_combined_alerts_v1_paging.rb | 262 ++++++ ...post_combined_alerts_v1_request_swagger.rb | 261 ++++++ ...ost_combined_alerts_v1_response_swagger.rb | 272 +++++++ ...ice_control_usb_class_exceptions_req_v1.rb | 6 +- ...e_control_usb_class_exceptions_response.rb | 6 +- .../models/devicecontent_content_category.rb | 234 ++++++ .../models/devicecontent_state.rb | 345 ++++++++ .../devicecontentapi_entities_response_v1.rb | 271 ++++++ .../devicecontentapi_query_response_v1.rb | 271 ++++++ .../domain_aws_account_resource_metadata.rb | 67 +- lib/crimson-falcon/models/domain_benchmark.rb | 13 +- .../domain_content_update_policy_resp_v1.rb | 474 +++++++++++ .../domain_content_update_settings_v1.rb | 241 ++++++ ...main_discover_api_active_discovery_host.rb | 22 +- .../domain_discover_api_application_host.rb | 14 +- .../models/domain_discover_api_host.rb | 34 +- .../models/domain_discover_apiio_t_host.rb | 34 +- .../models/domain_kestrel_params.rb | 239 ++++++ .../models/domain_lookup_file.rb | 453 +++++++++++ .../models/domain_lookup_file_wrapper.rb | 271 ++++++ .../models/domain_report_metadata.rb | 11 +- .../domain_ring_assignment_settings_v1.rb | 267 ++++++ .../models/domain_scheduled_report_v1.rb | 16 +- .../models/domain_update_rule_request_v1.rb | 19 +- lib/crimson-falcon/models/figapi_adversary.rb | 235 ++++++ lib/crimson-falcon/models/figapi_country.rb | 245 ++++++ lib/crimson-falcon/models/figapi_domain.rb | 345 ++++++++ .../models/figapi_email_address.rb | 252 ++++++ lib/crimson-falcon/models/figapi_file.rb | 299 +++++++ lib/crimson-falcon/models/figapi_indicator.rb | 458 +++++++++++ lib/crimson-falcon/models/figapi_ipv4.rb | 269 ++++++ lib/crimson-falcon/models/figapi_ipv6.rb | 269 ++++++ lib/crimson-falcon/models/figapi_mx_record.rb | 284 +++++++ .../models/figapi_name_server.rb | 254 ++++++ lib/crimson-falcon/models/figapi_report.rb | 235 ++++++ lib/crimson-falcon/models/figapi_sector.rb | 245 ++++++ lib/crimson-falcon/models/figapi_threat.rb | 235 ++++++ lib/crimson-falcon/models/figapi_url.rb | 247 ++++++ .../models/figapi_vulnerability.rb | 374 +++++++++ lib/crimson-falcon/models/figapi_who_is.rb | 261 ++++++ .../models/figapi_whois_record.rb | 306 +++++++ .../models/figapi_x509_certificate.rb | 297 +++++++ lib/crimson-falcon/models/graph_condition.rb | 14 +- lib/crimson-falcon/models/help.rb | 239 ++++++ .../models/ingestion_cve_exploit_reference.rb | 267 ++++++ .../models/ingestion_cve_exploit_source.rb | 283 +++++++ .../models/ingestion_ex_prt_rating_factors.rb | 281 +++++++ .../models/ingestion_reference.rb | 255 ++++++ .../models/inventoryapi_surface_error.rb | 260 ++++++ ...rb => inventoryapi_user_external_asset.rb} | 44 +- ...inventoryapi_user_external_asset_create.rb | 257 ++++++ ...i_user_external_asset_create_request_v1.rb | 242 ++++++ ..._user_external_asset_create_response_v1.rb | 266 ++++++ ...inventoryapi_user_external_asset_result.rb | 322 ++++++++ .../models/inventoryapidomain_subsidiary.rb | 245 ++++++ lib/crimson-falcon/models/jsonschema_pivot.rb | 20 +- .../models/jsonschema_signals_extensions.rb | 26 +- .../models/jsonschema_ui_extensions.rb | 38 +- .../models/models_api_customer_and_image.rb | 16 +- .../models_api_image_combined_export.rb | 27 +- .../models/models_api_package_combined.rb | 16 +- .../models/models_api_package_combined_v2.rb | 381 +++++++++ .../models_api_vulnerability_combined.rb | 16 +- .../models/models_application_library.rb | 17 +- lib/crimson-falcon/models/models_container.rb | 16 +- .../models/models_ext_api_image_combined.rb | 16 +- lib/crimson-falcon/models/models_message.rb | 239 ++++++ .../models/models_partial_fingerprints.rb | 239 ++++++ lib/crimson-falcon/models/models_result.rb | 339 ++++++++ .../models/models_result_location.rb | 253 ++++++ .../models_result_location_properties.rb | 253 ++++++ .../models/models_result_physical_location.rb | 253 ++++++ ...ult_physical_location_artifact_location.rb | 239 ++++++ .../models_result_physical_location_region.rb | 239 ++++++ .../models/models_result_properties.rb | 365 +++++++++ lib/crimson-falcon/models/models_rule.rb | 337 ++++++++ .../models_rule_default_configuration.rb | 239 ++++++ .../models/models_rule_properties.rb | 669 +++++++++++++++ lib/crimson-falcon/models/models_run.rb | 255 ++++++ lib/crimson-falcon/models/models_run_tool.rb | 239 ++++++ .../models/models_run_tool_driver.rb | 283 +++++++ .../models/models_vulnerability_sarif.rb | 269 ++++++ .../packages_api_combined_package_v2.rb | 266 ++++++ .../models/policyframework_benchmark.rb | 253 ++++++ .../models/policyframework_control.rb | 290 +++++++ ...uickscanpro_query_scan_results_response.rb | 11 +- .../models/registration_aws_account_ext_v2.rb | 20 +- .../models/registration_aws_account_patch.rb | 20 +- .../registration_aws_account_response_v2.rb | 5 - ..._azure_download_certificate_response_v1.rb | 5 - .../models/registration_iom_event_v2.rb | 13 +- .../models/releasecontents_release_content.rb | 327 ++++++++ ...releasecontents_release_content_version.rb | 267 ++++++ .../releasenotes_entities_get_request.rb | 241 ++++++ ...easenotes_entities_get_response_wrapper.rb | 269 ++++++ .../models/releasenotes_note_detail.rb | 270 ++++++ .../models/releasenotes_release_note_v1.rb | 303 +++++++ .../releasenotes_release_note_wrapper_v1.rb | 271 ++++++ lib/crimson-falcon/models/releases_release.rb | 328 ++++++++ .../models/releases_release_wrapper.rb | 271 ++++++ lib/crimson-falcon/models/resources_app.rb | 243 ++++++ .../models/resources_asset_graph.rb | 243 ++++++ .../models/resources_cloud_context.rb | 378 +++++++++ .../models/resources_cloud_resource.rb | 604 ++++++++++++++ .../models/resources_compliance.rb | 307 +++++++ .../models/resources_detections.rb | 291 +++++++ lib/crimson-falcon/models/resources_host.rb | 390 +++++++++ .../models/resources_relationship.rb | 261 ++++++ .../models/resources_vulnerability.rb | 262 ++++++ ...rest_azure_download_script_request_data.rb | 239 ++++++ .../rest_azure_download_script_request_v1.rb | 241 ++++++ ...rovision_get_account_script_response_v1.rb | 266 ++++++ .../models/rest_azure_script.rb | 276 +++++++ .../models/rest_cursor_and_limit_meta_info.rb | 289 +++++++ .../models/rest_cursor_meta_info.rb | 280 +++++++ .../models/rest_cursor_response_fields.rb | 250 ++++++ lib/crimson-falcon/models/rest_paging.rb | 262 ++++++ .../models/restapi_indicator_response.rb | 271 ++++++ .../restapi_indicators_query_request.rb | 255 ++++++ .../restapi_indicators_query_sort_request.rb | 267 ++++++ .../sadomain_typosquatting_base_domain.rb | 20 +- .../sadomain_typosquatting_subdomain.rb | 16 +- lib/crimson-falcon/models/string_wrapper.rb | 266 ++++++ ...es_get_executor_nodes_metadata_response.rb | 278 +++++++ ...get_integration_tasks_metadata_response.rb | 267 ++++++ lib/crimson-falcon/models/v2_for_loop.rb | 11 +- ...ies_vulnerability_entity_sarif_response.rb | 266 ++++++ lib/crimson-falcon/version.rb | 2 +- spec/api/alerts_spec.rb | 15 +- spec/api/aspm_spec.rb | 43 + ...spec.rb => cloud_aws_registration_spec.rb} | 12 +- spec/api/cloud_azure_registration_spec.rb | 63 ++ spec/api/cloud_security_assets_spec.rb | 78 ++ spec/api/container_alerts_spec.rb | 8 +- spec/api/container_detections_spec.rb | 20 +- spec/api/container_images_spec.rb | 60 +- spec/api/container_packages_spec.rb | 41 +- spec/api/container_vulnerabilities_spec.rb | 40 +- spec/api/content_update_policies_spec.rb | 177 ++++ spec/api/correlation_rules_spec.rb | 137 ++++ spec/api/cspm_registration_spec.rb | 16 +- spec/api/custom_ioa_spec.rb | 8 +- spec/api/d4c_registration_spec.rb | 15 +- spec/api/deployments_spec.rb | 65 ++ spec/api/device_content_spec.rb | 77 ++ spec/api/discover_spec.rb | 11 + spec/api/drift_indicators_spec.rb | 16 +- spec/api/exposure_management_spec.rb | 2 + spec/api/falcon_container_image_spec.rb | 10 +- spec/api/filevantage_spec.rb | 12 +- spec/api/firewall_management_spec.rb | 16 +- spec/api/host_migration_spec.rb | 4 +- spec/api/intelligence_indicator_graph_spec.rb | 66 ++ spec/api/kubernetes_protection_spec.rb | 116 +-- spec/api/lookup_files_spec.rb | 80 ++ spec/api/release_notes_spec.rb | 97 +++ spec/api/releases_spec.rb | 68 ++ spec/api/runtime_detections_spec.rb | 6 +- spec/api/spotlight_vulnerabilities_spec.rb | 8 +- spec/api/unidentified_containers_spec.rb | 10 +- spec/api/vulnerabilities_spec.rb | 66 ++ .../api_create_rule_operation_v1_spec.rb | 63 ++ ...api_get_entities_rules_response_v1_spec.rb | 63 ++ .../api_patch_rule_operation_v1_spec.rb | 63 ++ spec/models/api_patch_rule_search_v1_spec.rb | 69 ++ .../models/api_rule_create_request_v1_spec.rb | 111 +++ spec/models/api_rule_operation_v1_spec.rb | 69 ++ spec/models/api_rule_patch_request_v1_spec.rb | 99 +++ .../models/api_rule_schedule_v1_patch_spec.rb | 51 ++ spec/models/api_rule_schedule_v1_spec.rb | 51 ++ spec/models/api_rule_search_v1_spec.rb | 69 ++ spec/models/api_rule_v1_spec.rb | 50 +- ...in_saved_search_execute_request_v1_spec.rb | 36 - .../assets_get_resource_ids_response_spec.rb | 63 ++ .../assets_get_resources_response_spec.rb | 63 ++ ...nt_update_policy_precedence_req_v1_spec.rb | 51 ++ ...tent_update_create_policies_req_v1_spec.rb | 51 ++ ...ontent_update_create_policy_req_v1_spec.rb | 63 ++ ...update_ring_assignment_settings_v1_spec.rb | 57 ++ .../models/content_update_settings_v1_spec.rb | 51 ++ ...tent_update_update_policies_req_v1_spec.rb | 51 ++ ...ontent_update_update_policy_req_v1_spec.rb | 69 ++ spec/models/dataclassifications_label_spec.rb | 63 ++ .../dataclassifications_response_spec.rb | 75 ++ spec/models/dataclassifications_tag_spec.rb | 69 ++ ...ployments_api_deployment_ring_view_spec.rb | 87 ++ .../deployments_api_deployment_view_spec.rb | 93 +++ ...yments_api_deployment_view_wrapper_spec.rb | 63 ++ ...tsapi_post_combined_alerts_v1_meta_spec.rb | 69 ++ ...api_post_combined_alerts_v1_paging_spec.rb | 63 ++ ...combined_alerts_v1_request_swagger_spec.rb | 69 ++ ...ombined_alerts_v1_response_swagger_spec.rb | 63 ++ ...ontrol_usb_class_exceptions_req_v1_spec.rb | 2 +- ...trol_usb_class_exceptions_response_spec.rb | 2 +- .../devicecontent_content_category_spec.rb | 51 ++ spec/models/devicecontent_state_spec.rb | 117 +++ ...icecontentapi_entities_response_v1_spec.rb | 63 ++ ...devicecontentapi_query_response_v1_spec.rb | 63 ++ ...main_aws_account_resource_metadata_spec.rb | 30 + spec/models/domain_benchmark_spec.rb | 6 + ...main_content_update_policy_resp_v1_spec.rb | 153 ++++ .../domain_content_update_settings_v1_spec.rb | 51 ++ ...discover_api_active_discovery_host_spec.rb | 12 + ...main_discover_api_application_host_spec.rb | 6 + spec/models/domain_discover_api_host_spec.rb | 18 + .../domain_discover_apiio_t_host_spec.rb | 18 + spec/models/domain_kestrel_params_spec.rb | 51 ++ spec/models/domain_lookup_file_spec.rb | 147 ++++ .../models/domain_lookup_file_wrapper_spec.rb | 63 ++ spec/models/domain_report_metadata_spec.rb | 6 + ...domain_ring_assignment_settings_v1_spec.rb | 63 ++ .../models/domain_scheduled_report_v1_spec.rb | 6 + .../domain_update_rule_request_v1_spec.rb | 6 + spec/models/figapi_adversary_spec.rb | 51 ++ spec/models/figapi_country_spec.rb | 57 ++ spec/models/figapi_domain_spec.rb | 117 +++ spec/models/figapi_email_address_spec.rb | 63 ++ spec/models/figapi_file_spec.rb | 87 ++ spec/models/figapi_indicator_spec.rb | 183 +++++ spec/models/figapi_ipv4_spec.rb | 69 ++ spec/models/figapi_ipv6_spec.rb | 69 ++ spec/models/figapi_mx_record_spec.rb | 75 ++ spec/models/figapi_name_server_spec.rb | 63 ++ spec/models/figapi_report_spec.rb | 51 ++ spec/models/figapi_sector_spec.rb | 57 ++ spec/models/figapi_threat_spec.rb | 51 ++ spec/models/figapi_url_spec.rb | 57 ++ spec/models/figapi_vulnerability_spec.rb | 141 ++++ spec/models/figapi_who_is_spec.rb | 69 ++ spec/models/figapi_whois_record_spec.rb | 99 +++ spec/models/figapi_x509_certificate_spec.rb | 93 +++ spec/models/graph_condition_spec.rb | 6 - spec/models/help_spec.rb | 51 ++ .../ingestion_cve_exploit_reference_spec.rb | 63 ++ .../ingestion_cve_exploit_source_spec.rb | 69 ++ .../ingestion_ex_prt_rating_factors_spec.rb | 69 ++ spec/models/ingestion_reference_spec.rb | 57 ++ .../models/inventoryapi_surface_error_spec.rb | 63 ++ ...r_external_asset_create_request_v1_spec.rb | 51 ++ ..._external_asset_create_response_v1_spec.rb | 63 ++ ...toryapi_user_external_asset_create_spec.rb | 57 ++ ...toryapi_user_external_asset_result_spec.rb | 93 +++ .../inventoryapi_user_external_asset_spec.rb | 57 ++ .../inventoryapidomain_subsidiary_spec.rb | 57 ++ spec/models/jsonschema_pivot_spec.rb | 12 + .../jsonschema_signals_extensions_spec.rb | 12 + spec/models/jsonschema_ui_extensions_spec.rb | 18 + .../models_api_customer_and_image_spec.rb | 6 + .../models_api_image_combined_export_spec.rb | 12 + .../models_api_package_combined_spec.rb | 6 + .../models_api_package_combined_v2_spec.rb | 111 +++ .../models_api_vulnerability_combined_spec.rb | 6 + .../models/models_application_library_spec.rb | 6 + spec/models/models_container_spec.rb | 6 + .../models_ext_api_image_combined_spec.rb | 6 + spec/models/models_message_spec.rb | 51 ++ .../models_partial_fingerprints_spec.rb | 51 ++ .../models_result_location_properties_spec.rb | 57 ++ spec/models/models_result_location_spec.rb | 57 ++ ...hysical_location_artifact_location_spec.rb | 51 ++ ...ls_result_physical_location_region_spec.rb | 51 ++ .../models_result_physical_location_spec.rb | 57 ++ spec/models/models_result_properties_spec.rb | 105 +++ spec/models/models_result_spec.rb | 93 +++ .../models_rule_default_configuration_spec.rb | 51 ++ spec/models/models_rule_properties_spec.rb | 231 ++++++ spec/models/models_rule_spec.rb | 93 +++ spec/models/models_run_spec.rb | 57 ++ spec/models/models_run_tool_driver_spec.rb | 69 ++ spec/models/models_run_tool_spec.rb | 51 ++ .../models/models_vulnerability_sarif_spec.rb | 63 ++ .../packages_api_combined_package_v2_spec.rb | 63 ++ spec/models/policyframework_benchmark_spec.rb | 57 ++ spec/models/policyframework_control_spec.rb | 87 ++ ...canpro_query_scan_results_response_spec.rb | 6 + .../registration_aws_account_ext_v2_spec.rb | 12 + .../registration_aws_account_patch_spec.rb | 12 + spec/models/registration_iom_event_v2_spec.rb | 6 + .../releasecontents_release_content_spec.rb | 93 +++ ...secontents_release_content_version_spec.rb | 63 ++ .../releasenotes_entities_get_request_spec.rb | 51 ++ ...otes_entities_get_response_wrapper_spec.rb | 63 ++ spec/models/releasenotes_note_detail_spec.rb | 69 ++ .../releasenotes_release_note_v1_spec.rb | 81 ++ ...leasenotes_release_note_wrapper_v1_spec.rb | 63 ++ spec/models/releases_release_spec.rb | 99 +++ spec/models/releases_release_wrapper_spec.rb | 63 ++ spec/models/resources_app_spec.rb | 57 ++ spec/models/resources_asset_graph_spec.rb | 57 ++ spec/models/resources_cloud_context_spec.rb | 147 ++++ spec/models/resources_cloud_resource_spec.rb | 291 +++++++ spec/models/resources_compliance_spec.rb | 87 ++ spec/models/resources_detections_spec.rb | 81 ++ spec/models/resources_host_spec.rb | 147 ++++ spec/models/resources_relationship_spec.rb | 69 ++ spec/models/resources_vulnerability_spec.rb | 63 ++ ...azure_download_script_request_data_spec.rb | 51 ++ ...t_azure_download_script_request_v1_spec.rb | 51 ++ ...ion_get_account_script_response_v1_spec.rb | 63 ++ spec/models/rest_azure_script_spec.rb | 69 ++ .../rest_cursor_and_limit_meta_info_spec.rb | 81 ++ spec/models/rest_cursor_meta_info_spec.rb | 75 ++ .../rest_cursor_response_fields_spec.rb | 57 ++ ..._statement_spec.rb => rest_paging_spec.rb} | 18 +- .../models/restapi_indicator_response_spec.rb | 63 ++ .../restapi_indicators_query_request_spec.rb | 57 ++ ...tapi_indicators_query_sort_request_spec.rb | 63 ++ ...sadomain_typosquatting_base_domain_spec.rb | 12 + .../sadomain_typosquatting_subdomain_spec.rb | 6 - spec/models/string_wrapper_spec.rb | 63 ++ ...t_executor_nodes_metadata_response_spec.rb | 75 ++ ...ntegration_tasks_metadata_response_spec.rb | 69 ++ spec/models/v2_for_loop_spec.rb | 6 + ...ulnerability_entity_sarif_response_spec.rb | 63 ++ 575 files changed, 56504 insertions(+), 2193 deletions(-) create mode 100644 docs/ApiCreateRuleOperationV1.md create mode 100644 docs/ApiGetEntitiesRulesResponseV1.md create mode 100644 docs/ApiPatchRuleOperationV1.md create mode 100644 docs/ApiPatchRuleSearchV1.md create mode 100644 docs/ApiRuleCreateRequestV1.md create mode 100644 docs/ApiRuleOperationV1.md create mode 100644 docs/ApiRulePatchRequestV1.md create mode 100644 docs/ApiRuleScheduleV1.md create mode 100644 docs/ApiRuleScheduleV1Patch.md create mode 100644 docs/ApiRuleSearchV1.md create mode 100644 docs/AssetsGetResourceIDsResponse.md create mode 100644 docs/AssetsGetResourcesResponse.md create mode 100644 docs/BaseSetContentUpdatePolicyPrecedenceReqV1.md delete mode 100644 docs/ClientFQLStatement.md rename docs/{Default.md => CloudAwsRegistration.md} (80%) create mode 100644 docs/CloudAzureRegistration.md create mode 100644 docs/CloudSecurityAssets.md create mode 100644 docs/ContentUpdateCreatePoliciesReqV1.md create mode 100644 docs/ContentUpdateCreatePolicyReqV1.md create mode 100644 docs/ContentUpdatePolicies.md create mode 100644 docs/ContentUpdateRingAssignmentSettingsV1.md create mode 100644 docs/ContentUpdateSettingsV1.md create mode 100644 docs/ContentUpdateUpdatePoliciesReqV1.md create mode 100644 docs/ContentUpdateUpdatePolicyReqV1.md create mode 100644 docs/CorrelationRules.md create mode 100644 docs/DataclassificationsLabel.md create mode 100644 docs/DataclassificationsResponse.md create mode 100644 docs/DataclassificationsTag.md create mode 100644 docs/Deployments.md create mode 100644 docs/DeploymentsAPIDeploymentRingView.md create mode 100644 docs/DeploymentsAPIDeploymentView.md create mode 100644 docs/DeploymentsAPIDeploymentViewWrapper.md create mode 100644 docs/DetectsapiPostCombinedAlertsV1Meta.md create mode 100644 docs/DetectsapiPostCombinedAlertsV1Paging.md create mode 100644 docs/DetectsapiPostCombinedAlertsV1RequestSwagger.md create mode 100644 docs/DetectsapiPostCombinedAlertsV1ResponseSwagger.md create mode 100644 docs/DeviceContent.md create mode 100644 docs/DevicecontentContentCategory.md create mode 100644 docs/DevicecontentState.md create mode 100644 docs/DevicecontentapiEntitiesResponseV1.md create mode 100644 docs/DevicecontentapiQueryResponseV1.md create mode 100644 docs/DomainContentUpdatePolicyRespV1.md create mode 100644 docs/DomainContentUpdateSettingsV1.md create mode 100644 docs/DomainKestrelParams.md create mode 100644 docs/DomainLookupFile.md create mode 100644 docs/DomainLookupFileWrapper.md create mode 100644 docs/DomainRingAssignmentSettingsV1.md create mode 100644 docs/FigapiAdversary.md create mode 100644 docs/FigapiCountry.md create mode 100644 docs/FigapiDomain.md create mode 100644 docs/FigapiEmailAddress.md create mode 100644 docs/FigapiFile.md create mode 100644 docs/FigapiIPv4.md create mode 100644 docs/FigapiIPv6.md create mode 100644 docs/FigapiIndicator.md create mode 100644 docs/FigapiMXRecord.md create mode 100644 docs/FigapiNameServer.md create mode 100644 docs/FigapiReport.md create mode 100644 docs/FigapiSector.md create mode 100644 docs/FigapiThreat.md create mode 100644 docs/FigapiURL.md create mode 100644 docs/FigapiVulnerability.md create mode 100644 docs/FigapiWhoIS.md create mode 100644 docs/FigapiWhoisRecord.md create mode 100644 docs/FigapiX509Certificate.md create mode 100644 docs/Help.md create mode 100644 docs/IngestionCVEExploitReference.md create mode 100644 docs/IngestionCVEExploitSource.md create mode 100644 docs/IngestionExPRTRatingFactors.md create mode 100644 docs/IngestionReference.md create mode 100644 docs/IntelligenceIndicatorGraph.md create mode 100644 docs/InventoryapiSurfaceError.md create mode 100644 docs/InventoryapiUserExternalAsset.md create mode 100644 docs/InventoryapiUserExternalAssetCreate.md create mode 100644 docs/InventoryapiUserExternalAssetCreateRequestV1.md create mode 100644 docs/InventoryapiUserExternalAssetCreateResponseV1.md create mode 100644 docs/InventoryapiUserExternalAssetResult.md create mode 100644 docs/InventoryapidomainSubsidiary.md create mode 100644 docs/LookupFiles.md create mode 100644 docs/ModelsAPIPackageCombinedV2.md create mode 100644 docs/ModelsMessage.md create mode 100644 docs/ModelsPartialFingerprints.md create mode 100644 docs/ModelsResult.md create mode 100644 docs/ModelsResultLocation.md create mode 100644 docs/ModelsResultLocationProperties.md create mode 100644 docs/ModelsResultPhysicalLocation.md create mode 100644 docs/ModelsResultPhysicalLocationArtifactLocation.md create mode 100644 docs/ModelsResultPhysicalLocationRegion.md create mode 100644 docs/ModelsResultProperties.md create mode 100644 docs/ModelsRule.md create mode 100644 docs/ModelsRuleDefaultConfiguration.md create mode 100644 docs/ModelsRuleProperties.md create mode 100644 docs/ModelsRun.md create mode 100644 docs/ModelsRunTool.md create mode 100644 docs/ModelsRunToolDriver.md create mode 100644 docs/ModelsVulnerabilitySARIF.md create mode 100644 docs/PackagesApiCombinedPackageV2.md create mode 100644 docs/PolicyframeworkBenchmark.md create mode 100644 docs/PolicyframeworkControl.md create mode 100644 docs/ReleaseNotes.md create mode 100644 docs/ReleasecontentsReleaseContent.md create mode 100644 docs/ReleasecontentsReleaseContentVersion.md create mode 100644 docs/ReleasenotesEntitiesGetRequest.md create mode 100644 docs/ReleasenotesEntitiesGetResponseWrapper.md create mode 100644 docs/ReleasenotesNoteDetail.md create mode 100644 docs/ReleasenotesReleaseNoteV1.md create mode 100644 docs/ReleasenotesReleaseNoteWrapperV1.md create mode 100644 docs/Releases.md create mode 100644 docs/ReleasesRelease.md create mode 100644 docs/ReleasesReleaseWrapper.md create mode 100644 docs/ResourcesApp.md create mode 100644 docs/ResourcesAssetGraph.md create mode 100644 docs/ResourcesCloudContext.md create mode 100644 docs/ResourcesCloudResource.md create mode 100644 docs/ResourcesCompliance.md create mode 100644 docs/ResourcesDetections.md create mode 100644 docs/ResourcesHost.md create mode 100644 docs/ResourcesRelationship.md create mode 100644 docs/ResourcesVulnerability.md create mode 100644 docs/RestAzureDownloadScriptRequestData.md create mode 100644 docs/RestAzureDownloadScriptRequestV1.md create mode 100644 docs/RestAzureProvisionGetAccountScriptResponseV1.md create mode 100644 docs/RestAzureScript.md create mode 100644 docs/RestCursorAndLimitMetaInfo.md create mode 100644 docs/RestCursorMetaInfo.md create mode 100644 docs/RestCursorResponseFields.md create mode 100644 docs/RestPaging.md create mode 100644 docs/RestapiIndicatorResponse.md create mode 100644 docs/RestapiIndicatorsQueryRequest.md create mode 100644 docs/RestapiIndicatorsQuerySortRequest.md create mode 100644 docs/StringWrapper.md create mode 100644 docs/TypesGetExecutorNodesMetadataResponse.md create mode 100644 docs/TypesGetIntegrationTasksMetadataResponse.md create mode 100644 docs/Vulnerabilities.md create mode 100644 docs/VulnerabilitiesVulnerabilityEntitySARIFResponse.md rename lib/crimson-falcon/api/{default.rb => cloud_aws_registration.rb} (85%) create mode 100644 lib/crimson-falcon/api/cloud_azure_registration.rb create mode 100644 lib/crimson-falcon/api/cloud_security_assets.rb create mode 100644 lib/crimson-falcon/api/content_update_policies.rb create mode 100644 lib/crimson-falcon/api/correlation_rules.rb create mode 100644 lib/crimson-falcon/api/deployments.rb create mode 100644 lib/crimson-falcon/api/device_content.rb create mode 100644 lib/crimson-falcon/api/intelligence_indicator_graph.rb create mode 100644 lib/crimson-falcon/api/lookup_files.rb create mode 100644 lib/crimson-falcon/api/release_notes.rb create mode 100644 lib/crimson-falcon/api/releases.rb create mode 100644 lib/crimson-falcon/api/vulnerabilities.rb create mode 100644 lib/crimson-falcon/models/api_create_rule_operation_v1.rb create mode 100644 lib/crimson-falcon/models/api_get_entities_rules_response_v1.rb create mode 100644 lib/crimson-falcon/models/api_patch_rule_operation_v1.rb create mode 100644 lib/crimson-falcon/models/api_patch_rule_search_v1.rb create mode 100644 lib/crimson-falcon/models/api_rule_create_request_v1.rb create mode 100644 lib/crimson-falcon/models/api_rule_operation_v1.rb create mode 100644 lib/crimson-falcon/models/api_rule_patch_request_v1.rb create mode 100644 lib/crimson-falcon/models/api_rule_schedule_v1.rb create mode 100644 lib/crimson-falcon/models/api_rule_schedule_v1_patch.rb create mode 100644 lib/crimson-falcon/models/api_rule_search_v1.rb create mode 100644 lib/crimson-falcon/models/assets_get_resource_ids_response.rb create mode 100644 lib/crimson-falcon/models/assets_get_resources_response.rb create mode 100644 lib/crimson-falcon/models/base_set_content_update_policy_precedence_req_v1.rb create mode 100644 lib/crimson-falcon/models/content_update_create_policies_req_v1.rb create mode 100644 lib/crimson-falcon/models/content_update_create_policy_req_v1.rb create mode 100644 lib/crimson-falcon/models/content_update_ring_assignment_settings_v1.rb create mode 100644 lib/crimson-falcon/models/content_update_settings_v1.rb create mode 100644 lib/crimson-falcon/models/content_update_update_policies_req_v1.rb create mode 100644 lib/crimson-falcon/models/content_update_update_policy_req_v1.rb create mode 100644 lib/crimson-falcon/models/dataclassifications_label.rb create mode 100644 lib/crimson-falcon/models/dataclassifications_response.rb create mode 100644 lib/crimson-falcon/models/dataclassifications_tag.rb create mode 100644 lib/crimson-falcon/models/deployments_api_deployment_ring_view.rb create mode 100644 lib/crimson-falcon/models/deployments_api_deployment_view.rb create mode 100644 lib/crimson-falcon/models/deployments_api_deployment_view_wrapper.rb create mode 100644 lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_meta.rb create mode 100644 lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_paging.rb create mode 100644 lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_request_swagger.rb create mode 100644 lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_response_swagger.rb create mode 100644 lib/crimson-falcon/models/devicecontent_content_category.rb create mode 100644 lib/crimson-falcon/models/devicecontent_state.rb create mode 100644 lib/crimson-falcon/models/devicecontentapi_entities_response_v1.rb create mode 100644 lib/crimson-falcon/models/devicecontentapi_query_response_v1.rb create mode 100644 lib/crimson-falcon/models/domain_content_update_policy_resp_v1.rb create mode 100644 lib/crimson-falcon/models/domain_content_update_settings_v1.rb create mode 100644 lib/crimson-falcon/models/domain_kestrel_params.rb create mode 100644 lib/crimson-falcon/models/domain_lookup_file.rb create mode 100644 lib/crimson-falcon/models/domain_lookup_file_wrapper.rb create mode 100644 lib/crimson-falcon/models/domain_ring_assignment_settings_v1.rb create mode 100644 lib/crimson-falcon/models/figapi_adversary.rb create mode 100644 lib/crimson-falcon/models/figapi_country.rb create mode 100644 lib/crimson-falcon/models/figapi_domain.rb create mode 100644 lib/crimson-falcon/models/figapi_email_address.rb create mode 100644 lib/crimson-falcon/models/figapi_file.rb create mode 100644 lib/crimson-falcon/models/figapi_indicator.rb create mode 100644 lib/crimson-falcon/models/figapi_ipv4.rb create mode 100644 lib/crimson-falcon/models/figapi_ipv6.rb create mode 100644 lib/crimson-falcon/models/figapi_mx_record.rb create mode 100644 lib/crimson-falcon/models/figapi_name_server.rb create mode 100644 lib/crimson-falcon/models/figapi_report.rb create mode 100644 lib/crimson-falcon/models/figapi_sector.rb create mode 100644 lib/crimson-falcon/models/figapi_threat.rb create mode 100644 lib/crimson-falcon/models/figapi_url.rb create mode 100644 lib/crimson-falcon/models/figapi_vulnerability.rb create mode 100644 lib/crimson-falcon/models/figapi_who_is.rb create mode 100644 lib/crimson-falcon/models/figapi_whois_record.rb create mode 100644 lib/crimson-falcon/models/figapi_x509_certificate.rb create mode 100644 lib/crimson-falcon/models/help.rb create mode 100644 lib/crimson-falcon/models/ingestion_cve_exploit_reference.rb create mode 100644 lib/crimson-falcon/models/ingestion_cve_exploit_source.rb create mode 100644 lib/crimson-falcon/models/ingestion_ex_prt_rating_factors.rb create mode 100644 lib/crimson-falcon/models/ingestion_reference.rb create mode 100644 lib/crimson-falcon/models/inventoryapi_surface_error.rb rename lib/crimson-falcon/models/{client_fql_statement.rb => inventoryapi_user_external_asset.rb} (88%) create mode 100644 lib/crimson-falcon/models/inventoryapi_user_external_asset_create.rb create mode 100644 lib/crimson-falcon/models/inventoryapi_user_external_asset_create_request_v1.rb create mode 100644 lib/crimson-falcon/models/inventoryapi_user_external_asset_create_response_v1.rb create mode 100644 lib/crimson-falcon/models/inventoryapi_user_external_asset_result.rb create mode 100644 lib/crimson-falcon/models/inventoryapidomain_subsidiary.rb create mode 100644 lib/crimson-falcon/models/models_api_package_combined_v2.rb create mode 100644 lib/crimson-falcon/models/models_message.rb create mode 100644 lib/crimson-falcon/models/models_partial_fingerprints.rb create mode 100644 lib/crimson-falcon/models/models_result.rb create mode 100644 lib/crimson-falcon/models/models_result_location.rb create mode 100644 lib/crimson-falcon/models/models_result_location_properties.rb create mode 100644 lib/crimson-falcon/models/models_result_physical_location.rb create mode 100644 lib/crimson-falcon/models/models_result_physical_location_artifact_location.rb create mode 100644 lib/crimson-falcon/models/models_result_physical_location_region.rb create mode 100644 lib/crimson-falcon/models/models_result_properties.rb create mode 100644 lib/crimson-falcon/models/models_rule.rb create mode 100644 lib/crimson-falcon/models/models_rule_default_configuration.rb create mode 100644 lib/crimson-falcon/models/models_rule_properties.rb create mode 100644 lib/crimson-falcon/models/models_run.rb create mode 100644 lib/crimson-falcon/models/models_run_tool.rb create mode 100644 lib/crimson-falcon/models/models_run_tool_driver.rb create mode 100644 lib/crimson-falcon/models/models_vulnerability_sarif.rb create mode 100644 lib/crimson-falcon/models/packages_api_combined_package_v2.rb create mode 100644 lib/crimson-falcon/models/policyframework_benchmark.rb create mode 100644 lib/crimson-falcon/models/policyframework_control.rb create mode 100644 lib/crimson-falcon/models/releasecontents_release_content.rb create mode 100644 lib/crimson-falcon/models/releasecontents_release_content_version.rb create mode 100644 lib/crimson-falcon/models/releasenotes_entities_get_request.rb create mode 100644 lib/crimson-falcon/models/releasenotes_entities_get_response_wrapper.rb create mode 100644 lib/crimson-falcon/models/releasenotes_note_detail.rb create mode 100644 lib/crimson-falcon/models/releasenotes_release_note_v1.rb create mode 100644 lib/crimson-falcon/models/releasenotes_release_note_wrapper_v1.rb create mode 100644 lib/crimson-falcon/models/releases_release.rb create mode 100644 lib/crimson-falcon/models/releases_release_wrapper.rb create mode 100644 lib/crimson-falcon/models/resources_app.rb create mode 100644 lib/crimson-falcon/models/resources_asset_graph.rb create mode 100644 lib/crimson-falcon/models/resources_cloud_context.rb create mode 100644 lib/crimson-falcon/models/resources_cloud_resource.rb create mode 100644 lib/crimson-falcon/models/resources_compliance.rb create mode 100644 lib/crimson-falcon/models/resources_detections.rb create mode 100644 lib/crimson-falcon/models/resources_host.rb create mode 100644 lib/crimson-falcon/models/resources_relationship.rb create mode 100644 lib/crimson-falcon/models/resources_vulnerability.rb create mode 100644 lib/crimson-falcon/models/rest_azure_download_script_request_data.rb create mode 100644 lib/crimson-falcon/models/rest_azure_download_script_request_v1.rb create mode 100644 lib/crimson-falcon/models/rest_azure_provision_get_account_script_response_v1.rb create mode 100644 lib/crimson-falcon/models/rest_azure_script.rb create mode 100644 lib/crimson-falcon/models/rest_cursor_and_limit_meta_info.rb create mode 100644 lib/crimson-falcon/models/rest_cursor_meta_info.rb create mode 100644 lib/crimson-falcon/models/rest_cursor_response_fields.rb create mode 100644 lib/crimson-falcon/models/rest_paging.rb create mode 100644 lib/crimson-falcon/models/restapi_indicator_response.rb create mode 100644 lib/crimson-falcon/models/restapi_indicators_query_request.rb create mode 100644 lib/crimson-falcon/models/restapi_indicators_query_sort_request.rb create mode 100644 lib/crimson-falcon/models/string_wrapper.rb create mode 100644 lib/crimson-falcon/models/types_get_executor_nodes_metadata_response.rb create mode 100644 lib/crimson-falcon/models/types_get_integration_tasks_metadata_response.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_vulnerability_entity_sarif_response.rb rename spec/api/{default_spec.rb => cloud_aws_registration_spec.rb} (93%) create mode 100644 spec/api/cloud_azure_registration_spec.rb create mode 100644 spec/api/cloud_security_assets_spec.rb create mode 100644 spec/api/content_update_policies_spec.rb create mode 100644 spec/api/correlation_rules_spec.rb create mode 100644 spec/api/deployments_spec.rb create mode 100644 spec/api/device_content_spec.rb create mode 100644 spec/api/intelligence_indicator_graph_spec.rb create mode 100644 spec/api/lookup_files_spec.rb create mode 100644 spec/api/release_notes_spec.rb create mode 100644 spec/api/releases_spec.rb create mode 100644 spec/api/vulnerabilities_spec.rb create mode 100644 spec/models/api_create_rule_operation_v1_spec.rb create mode 100644 spec/models/api_get_entities_rules_response_v1_spec.rb create mode 100644 spec/models/api_patch_rule_operation_v1_spec.rb create mode 100644 spec/models/api_patch_rule_search_v1_spec.rb create mode 100644 spec/models/api_rule_create_request_v1_spec.rb create mode 100644 spec/models/api_rule_operation_v1_spec.rb create mode 100644 spec/models/api_rule_patch_request_v1_spec.rb create mode 100644 spec/models/api_rule_schedule_v1_patch_spec.rb create mode 100644 spec/models/api_rule_schedule_v1_spec.rb create mode 100644 spec/models/api_rule_search_v1_spec.rb create mode 100644 spec/models/assets_get_resource_ids_response_spec.rb create mode 100644 spec/models/assets_get_resources_response_spec.rb create mode 100644 spec/models/base_set_content_update_policy_precedence_req_v1_spec.rb create mode 100644 spec/models/content_update_create_policies_req_v1_spec.rb create mode 100644 spec/models/content_update_create_policy_req_v1_spec.rb create mode 100644 spec/models/content_update_ring_assignment_settings_v1_spec.rb create mode 100644 spec/models/content_update_settings_v1_spec.rb create mode 100644 spec/models/content_update_update_policies_req_v1_spec.rb create mode 100644 spec/models/content_update_update_policy_req_v1_spec.rb create mode 100644 spec/models/dataclassifications_label_spec.rb create mode 100644 spec/models/dataclassifications_response_spec.rb create mode 100644 spec/models/dataclassifications_tag_spec.rb create mode 100644 spec/models/deployments_api_deployment_ring_view_spec.rb create mode 100644 spec/models/deployments_api_deployment_view_spec.rb create mode 100644 spec/models/deployments_api_deployment_view_wrapper_spec.rb create mode 100644 spec/models/detectsapi_post_combined_alerts_v1_meta_spec.rb create mode 100644 spec/models/detectsapi_post_combined_alerts_v1_paging_spec.rb create mode 100644 spec/models/detectsapi_post_combined_alerts_v1_request_swagger_spec.rb create mode 100644 spec/models/detectsapi_post_combined_alerts_v1_response_swagger_spec.rb create mode 100644 spec/models/devicecontent_content_category_spec.rb create mode 100644 spec/models/devicecontent_state_spec.rb create mode 100644 spec/models/devicecontentapi_entities_response_v1_spec.rb create mode 100644 spec/models/devicecontentapi_query_response_v1_spec.rb create mode 100644 spec/models/domain_content_update_policy_resp_v1_spec.rb create mode 100644 spec/models/domain_content_update_settings_v1_spec.rb create mode 100644 spec/models/domain_kestrel_params_spec.rb create mode 100644 spec/models/domain_lookup_file_spec.rb create mode 100644 spec/models/domain_lookup_file_wrapper_spec.rb create mode 100644 spec/models/domain_ring_assignment_settings_v1_spec.rb create mode 100644 spec/models/figapi_adversary_spec.rb create mode 100644 spec/models/figapi_country_spec.rb create mode 100644 spec/models/figapi_domain_spec.rb create mode 100644 spec/models/figapi_email_address_spec.rb create mode 100644 spec/models/figapi_file_spec.rb create mode 100644 spec/models/figapi_indicator_spec.rb create mode 100644 spec/models/figapi_ipv4_spec.rb create mode 100644 spec/models/figapi_ipv6_spec.rb create mode 100644 spec/models/figapi_mx_record_spec.rb create mode 100644 spec/models/figapi_name_server_spec.rb create mode 100644 spec/models/figapi_report_spec.rb create mode 100644 spec/models/figapi_sector_spec.rb create mode 100644 spec/models/figapi_threat_spec.rb create mode 100644 spec/models/figapi_url_spec.rb create mode 100644 spec/models/figapi_vulnerability_spec.rb create mode 100644 spec/models/figapi_who_is_spec.rb create mode 100644 spec/models/figapi_whois_record_spec.rb create mode 100644 spec/models/figapi_x509_certificate_spec.rb create mode 100644 spec/models/help_spec.rb create mode 100644 spec/models/ingestion_cve_exploit_reference_spec.rb create mode 100644 spec/models/ingestion_cve_exploit_source_spec.rb create mode 100644 spec/models/ingestion_ex_prt_rating_factors_spec.rb create mode 100644 spec/models/ingestion_reference_spec.rb create mode 100644 spec/models/inventoryapi_surface_error_spec.rb create mode 100644 spec/models/inventoryapi_user_external_asset_create_request_v1_spec.rb create mode 100644 spec/models/inventoryapi_user_external_asset_create_response_v1_spec.rb create mode 100644 spec/models/inventoryapi_user_external_asset_create_spec.rb create mode 100644 spec/models/inventoryapi_user_external_asset_result_spec.rb create mode 100644 spec/models/inventoryapi_user_external_asset_spec.rb create mode 100644 spec/models/inventoryapidomain_subsidiary_spec.rb create mode 100644 spec/models/models_api_package_combined_v2_spec.rb create mode 100644 spec/models/models_message_spec.rb create mode 100644 spec/models/models_partial_fingerprints_spec.rb create mode 100644 spec/models/models_result_location_properties_spec.rb create mode 100644 spec/models/models_result_location_spec.rb create mode 100644 spec/models/models_result_physical_location_artifact_location_spec.rb create mode 100644 spec/models/models_result_physical_location_region_spec.rb create mode 100644 spec/models/models_result_physical_location_spec.rb create mode 100644 spec/models/models_result_properties_spec.rb create mode 100644 spec/models/models_result_spec.rb create mode 100644 spec/models/models_rule_default_configuration_spec.rb create mode 100644 spec/models/models_rule_properties_spec.rb create mode 100644 spec/models/models_rule_spec.rb create mode 100644 spec/models/models_run_spec.rb create mode 100644 spec/models/models_run_tool_driver_spec.rb create mode 100644 spec/models/models_run_tool_spec.rb create mode 100644 spec/models/models_vulnerability_sarif_spec.rb create mode 100644 spec/models/packages_api_combined_package_v2_spec.rb create mode 100644 spec/models/policyframework_benchmark_spec.rb create mode 100644 spec/models/policyframework_control_spec.rb create mode 100644 spec/models/releasecontents_release_content_spec.rb create mode 100644 spec/models/releasecontents_release_content_version_spec.rb create mode 100644 spec/models/releasenotes_entities_get_request_spec.rb create mode 100644 spec/models/releasenotes_entities_get_response_wrapper_spec.rb create mode 100644 spec/models/releasenotes_note_detail_spec.rb create mode 100644 spec/models/releasenotes_release_note_v1_spec.rb create mode 100644 spec/models/releasenotes_release_note_wrapper_v1_spec.rb create mode 100644 spec/models/releases_release_spec.rb create mode 100644 spec/models/releases_release_wrapper_spec.rb create mode 100644 spec/models/resources_app_spec.rb create mode 100644 spec/models/resources_asset_graph_spec.rb create mode 100644 spec/models/resources_cloud_context_spec.rb create mode 100644 spec/models/resources_cloud_resource_spec.rb create mode 100644 spec/models/resources_compliance_spec.rb create mode 100644 spec/models/resources_detections_spec.rb create mode 100644 spec/models/resources_host_spec.rb create mode 100644 spec/models/resources_relationship_spec.rb create mode 100644 spec/models/resources_vulnerability_spec.rb create mode 100644 spec/models/rest_azure_download_script_request_data_spec.rb create mode 100644 spec/models/rest_azure_download_script_request_v1_spec.rb create mode 100644 spec/models/rest_azure_provision_get_account_script_response_v1_spec.rb create mode 100644 spec/models/rest_azure_script_spec.rb create mode 100644 spec/models/rest_cursor_and_limit_meta_info_spec.rb create mode 100644 spec/models/rest_cursor_meta_info_spec.rb create mode 100644 spec/models/rest_cursor_response_fields_spec.rb rename spec/models/{client_fql_statement_spec.rb => rest_paging_spec.rb} (80%) create mode 100644 spec/models/restapi_indicator_response_spec.rb create mode 100644 spec/models/restapi_indicators_query_request_spec.rb create mode 100644 spec/models/restapi_indicators_query_sort_request_spec.rb create mode 100644 spec/models/string_wrapper_spec.rb create mode 100644 spec/models/types_get_executor_nodes_metadata_response_spec.rb create mode 100644 spec/models/types_get_integration_tasks_metadata_response_spec.rb create mode 100644 spec/models/vulnerabilities_vulnerability_entity_sarif_response_spec.rb diff --git a/README.md b/README.md index b1af6002..bc8df705 100644 --- a/README.md +++ b/README.md @@ -188,6 +188,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::ASPM` +- **Operation**: [**get_executor_nodes_metadata**](docs/ASPM.md#get_executor_nodes_metadata) +- **GET**: /aspm-api-gateway/api/v1/executor_nodes/metadata +- **Description**: Get metadata about all executor nodes + +--- + +**Class**: `Falcon::ASPM` + - **Operation**: [**get_integration_tasks**](docs/ASPM.md#get_integration_tasks) - **GET**: /aspm-api-gateway/api/v1/integration_tasks - **Description**: Get all the integration tasks @@ -196,6 +204,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::ASPM` +- **Operation**: [**get_integration_tasks_metadata**](docs/ASPM.md#get_integration_tasks_metadata) +- **GET**: /aspm-api-gateway/api/v1/integration_tasks/metadata +- **Description**: Get metadata about all integration tasks + +--- + +**Class**: `Falcon::ASPM` + - **Operation**: [**get_integration_types**](docs/ASPM.md#get_integration_types) - **GET**: /aspm-api-gateway/api/v1/integration_types - **Description**: Get all the integration types @@ -348,6 +364,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::Alerts` +- **Operation**: [**post_combined_alerts_v1**](docs/Alerts.md#post_combined_alerts_v1) +- **POST**: /alerts/combined/alerts/v1 +- **Description**: Retrieves all Alerts that match a particular FQL filter. + +--- + +**Class**: `Falcon::Alerts` + - **Operation**: [**post_entities_alerts_v1**](docs/Alerts.md#post_entities_alerts_v1) - **POST**: /alerts/entities/alerts/v1 - **Description**: Deprecated: please use version v2 of this endpoint. Retrieves all Alerts given their ids. @@ -434,6 +458,62 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::CloudAwsRegistration` + +- **Operation**: [**cloud_registration_aws_create_account**](docs/CloudAwsRegistration.md#cloud_registration_aws_create_account) +- **POST**: /cloud-security-registration-aws/entities/account/v1 +- **Description**: Creates a new account in our system for a customer. + +--- + +**Class**: `Falcon::CloudAwsRegistration` + +- **Operation**: [**cloud_registration_aws_delete_account**](docs/CloudAwsRegistration.md#cloud_registration_aws_delete_account) +- **DELETE**: /cloud-security-registration-aws/entities/account/v1 +- **Description**: Deletes an existing AWS account or organization in our system. + +--- + +**Class**: `Falcon::CloudAwsRegistration` + +- **Operation**: [**cloud_registration_aws_get_accounts**](docs/CloudAwsRegistration.md#cloud_registration_aws_get_accounts) +- **GET**: /cloud-security-registration-aws/entities/account/v1 +- **Description**: Retrieve existing AWS accounts by account IDs + +--- + +**Class**: `Falcon::CloudAwsRegistration` + +- **Operation**: [**cloud_registration_aws_query_accounts**](docs/CloudAwsRegistration.md#cloud_registration_aws_query_accounts) +- **GET**: /cloud-security-registration-aws/queries/account/v1 +- **Description**: Retrieve existing AWS accounts by account IDs + +--- + +**Class**: `Falcon::CloudAwsRegistration` + +- **Operation**: [**cloud_registration_aws_update_account**](docs/CloudAwsRegistration.md#cloud_registration_aws_update_account) +- **PATCH**: /cloud-security-registration-aws/entities/account/v1 +- **Description**: Patches a existing account in our system for a customer. + +--- + +**Class**: `Falcon::CloudAwsRegistration` + +- **Operation**: [**cloud_registration_aws_validate_accounts**](docs/CloudAwsRegistration.md#cloud_registration_aws_validate_accounts) +- **POST**: /cloud-security-registration-aws/entities/account/validate/v1 +- **Description**: Validates the AWS account in our system for a provided CID. For internal clients only. + +--- + +**Class**: `Falcon::CloudAzureRegistration` + +- **Operation**: [**cloud_registration_azure_download_script**](docs/CloudAzureRegistration.md#cloud_registration_azure_download_script) +- **POST**: /cloud-security-registration-azure/entities/scripts/v1 +- **Description**: Retrieve script to create resources + +--- + **Class**: `Falcon::CloudConnectAws` - **Operation**: [**create_or_update_aws_settings**](docs/CloudConnectAws.md#create_or_update_aws_settings) @@ -506,6 +586,22 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::CloudSecurityAssets` + +- **Operation**: [**cloud_security_assets_entities_get**](docs/CloudSecurityAssets.md#cloud_security_assets_entities_get) +- **GET**: /cloud-security-assets/entities/resources/v1 +- **Description**: Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. + +--- + +**Class**: `Falcon::CloudSecurityAssets` + +- **Operation**: [**cloud_security_assets_queries**](docs/CloudSecurityAssets.md#cloud_security_assets_queries) +- **GET**: /cloud-security-assets/queries/resources/v1 +- **Description**: Gets a list of resource IDs for the given parameters, filters and sort criteria + +--- + **Class**: `Falcon::CloudSnapshots` - **Operation**: [**create_deployment_entity**](docs/CloudSnapshots.md#create_deployment_entity) @@ -686,7 +782,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**search_and_read_container_alerts**](docs/ContainerAlerts.md#search_and_read_container_alerts) - **GET**: /container-security/combined/container-alerts/v1 -- **Description**: Search Container Alerts by the provided search criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -694,7 +790,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_combined_detections**](docs/ContainerDetections.md#read_combined_detections) - **GET**: /container-security/combined/detections/v1 -- **Description**: Retrieve image assessment detections identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -702,7 +798,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_detections**](docs/ContainerDetections.md#read_detections) - **GET**: /container-security/entities/detections/v1 -- **Description**: Retrieve image assessment detection entities identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -734,7 +830,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**search_detections**](docs/ContainerDetections.md#search_detections) - **GET**: /container-security/queries/detections/v1 -- **Description**: Retrieve image assessment detection entities identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -774,7 +870,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**combined_base_images**](docs/ContainerImages.md#combined_base_images) - **GET**: /container-security/combined/base-images/v1 -- **Description**: Retrieve base images for provided filter +- **Description**: Retrieves a list of base images for the provided filter. Maximum page size: 100 --- @@ -790,7 +886,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**combined_image_detail**](docs/ContainerImages.md#combined_image_detail) - **GET**: /container-security/combined/images/detail/v1 -- **Description**: Retrieve image entities identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -830,7 +926,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**get_combined_images**](docs/ContainerImages.md#get_combined_images) - **GET**: /container-security/combined/image-assessment/images/v1 -- **Description**: Get image assessment results by providing an FQL filter and paging details +- **Description**: Maximum offset = 10000 - limit --- @@ -838,7 +934,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_combined_images_export**](docs/ContainerImages.md#read_combined_images_export) - **GET**: /container-security/combined/images/export/v1 -- **Description**: Retrieve images with an option to expand aggregated vulnerabilities/detections +- **Description**: Maximum offset = 10000 - limit --- @@ -846,7 +942,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_packages_by_fixable_vuln_count**](docs/ContainerPackages.md#read_packages_by_fixable_vuln_count) - **GET**: /container-security/combined/packages/app-by-fixable-vulnerability-count/v1 -- **Description**: Retrieve top x app packages with the most fixable vulnerabilities +- **Description**: Maximum offset = 10000 - limit --- @@ -854,7 +950,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_packages_by_vuln_count**](docs/ContainerPackages.md#read_packages_by_vuln_count) - **GET**: /container-security/combined/packages/by-vulnerability-count/v1 -- **Description**: Retrieve top x packages with the most vulnerabilities +- **Description**: Maximum offset = 10000 - limit --- @@ -862,7 +958,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_packages_combined**](docs/ContainerPackages.md#read_packages_combined) - **GET**: /container-security/combined/packages/v1 -- **Description**: Retrieve packages identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -870,7 +966,15 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_packages_combined_export**](docs/ContainerPackages.md#read_packages_combined_export) - **GET**: /container-security/combined/packages/export/v1 -- **Description**: Retrieve packages identified by the provided filter criteria for the purpose of export +- **Description**: Maximum offset = 10000 - limit + +--- + +**Class**: `Falcon::ContainerPackages` + +- **Operation**: [**read_packages_combined_v2**](docs/ContainerPackages.md#read_packages_combined_v2) +- **GET**: /container-security/combined/packages/v2 +- **Description**: Maximum offset = 10000 - limit --- @@ -886,7 +990,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_combined_vulnerabilities**](docs/ContainerVulnerabilities.md#read_combined_vulnerabilities) - **GET**: /container-security/combined/vulnerabilities/v1 -- **Description**: Retrieve vulnerability and aggregate data filtered by the provided FQL +- **Description**: Maximum offset = 10000 - limit --- @@ -894,7 +998,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_combined_vulnerabilities_details**](docs/ContainerVulnerabilities.md#read_combined_vulnerabilities_details) - **GET**: /container-security/combined/vulnerabilities/details/v1 -- **Description**: Retrieve vulnerability details related to an image +- **Description**: Maximum offset = 10000 - limit --- @@ -902,7 +1006,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_combined_vulnerabilities_info**](docs/ContainerVulnerabilities.md#read_combined_vulnerabilities_info) - **GET**: /container-security/combined/vulnerabilities/info/v1 -- **Description**: Retrieve vulnerability and package related info for this customer +- **Description**: Maximum offset = 10000 - limit --- @@ -910,7 +1014,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_vulnerabilities_by_image_count**](docs/ContainerVulnerabilities.md#read_vulnerabilities_by_image_count) - **GET**: /container-security/combined/vulnerabilities/by-image-count/v1 -- **Description**: Retrieve top x vulnerabilities with the most impacted images +- **Description**: Maximum offset = 10000 - limit --- @@ -918,7 +1022,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_vulnerabilities_publication_date**](docs/ContainerVulnerabilities.md#read_vulnerabilities_publication_date) - **GET**: /container-security/combined/vulnerabilities/by-published-date/v1 -- **Description**: Retrieve top x vulnerabilities with the most recent publication date +- **Description**: Maximum offset = 10000 - limit --- @@ -926,7 +1030,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_vulnerability_count**](docs/ContainerVulnerabilities.md#read_vulnerability_count) - **GET**: /container-security/aggregates/vulnerabilities/count/v1 -- **Description**: Aggregate count of vulnerabilities +- **Description**: Maximum offset = 10000 - limit --- @@ -934,7 +1038,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_vulnerability_count_by_actively_exploited**](docs/ContainerVulnerabilities.md#read_vulnerability_count_by_actively_exploited) - **GET**: /container-security/aggregates/vulnerabilities/count-by-actively-exploited/v1 -- **Description**: Aggregate count of vulnerabilities grouped by actively exploited +- **Description**: Maximum offset = 10000 - limit --- @@ -942,7 +1046,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_vulnerability_count_by_cps_rating**](docs/ContainerVulnerabilities.md#read_vulnerability_count_by_cps_rating) - **GET**: /container-security/aggregates/vulnerabilities/count-by-cps-rating/v1 -- **Description**: Aggregate count of vulnerabilities grouped by csp_rating +- **Description**: Maximum offset = 10000 - limit --- @@ -950,7 +1054,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_vulnerability_count_by_cvss_score**](docs/ContainerVulnerabilities.md#read_vulnerability_count_by_cvss_score) - **GET**: /container-security/aggregates/vulnerabilities/count-by-cvss-score/v1 -- **Description**: Aggregate count of vulnerabilities grouped by cvss score +- **Description**: Maximum offset = 10000 - limit --- @@ -958,7 +1062,143 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_vulnerability_count_by_severity**](docs/ContainerVulnerabilities.md#read_vulnerability_count_by_severity) - **GET**: /container-security/aggregates/vulnerabilities/count-by-severity/v1 -- **Description**: Aggregate count of vulnerabilities grouped by severity +- **Description**: Maximum offset = 10000 - limit + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**create_content_update_policies**](docs/ContentUpdatePolicies.md#create_content_update_policies) +- **POST**: /policy/entities/content-update/v1 +- **Description**: Create Content Update Policies by specifying details about the policy to create + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**delete_content_update_policies**](docs/ContentUpdatePolicies.md#delete_content_update_policies) +- **DELETE**: /policy/entities/content-update/v1 +- **Description**: Delete a set of Content Update Policies by specifying their IDs + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**get_content_update_policies**](docs/ContentUpdatePolicies.md#get_content_update_policies) +- **GET**: /policy/entities/content-update/v1 +- **Description**: Retrieve a set of Content Update Policies by specifying their IDs + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**perform_content_update_policies_action**](docs/ContentUpdatePolicies.md#perform_content_update_policies_action) +- **POST**: /policy/entities/content-update-actions/v1 +- **Description**: Perform the specified action on the Content Update Policies specified in the request + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**query_combined_content_update_policies**](docs/ContentUpdatePolicies.md#query_combined_content_update_policies) +- **GET**: /policy/combined/content-update/v1 +- **Description**: Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**query_combined_content_update_policy_members**](docs/ContentUpdatePolicies.md#query_combined_content_update_policy_members) +- **GET**: /policy/combined/content-update-members/v1 +- **Description**: Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**query_content_update_policies**](docs/ContentUpdatePolicies.md#query_content_update_policies) +- **GET**: /policy/queries/content-update/v1 +- **Description**: Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**query_content_update_policy_members**](docs/ContentUpdatePolicies.md#query_content_update_policy_members) +- **GET**: /policy/queries/content-update-members/v1 +- **Description**: Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**set_content_update_policies_precedence**](docs/ContentUpdatePolicies.md#set_content_update_policies_precedence) +- **POST**: /policy/entities/content-update-precedence/v1 +- **Description**: Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence + +--- + +**Class**: `Falcon::ContentUpdatePolicies` + +- **Operation**: [**update_content_update_policies**](docs/ContentUpdatePolicies.md#update_content_update_policies) +- **PATCH**: /policy/entities/content-update/v1 +- **Description**: Update Content Update Policies by specifying the ID of the policy and details to update + +--- + +**Class**: `Falcon::CorrelationRules` + +- **Operation**: [**combined_rules_get_v1**](docs/CorrelationRules.md#combined_rules_get_v1) +- **GET**: /correlation-rules/combined/rules/v1 +- **Description**: Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + +--- + +**Class**: `Falcon::CorrelationRules` + +- **Operation**: [**entities_rule_versions_delete_v1**](docs/CorrelationRules.md#entities_rule_versions_delete_v1) +- **DELETE**: /correlation-rules/entities/rule-versions/v1 +- **Description**: Delete versions by IDs + +--- + +**Class**: `Falcon::CorrelationRules` + +- **Operation**: [**entities_rules_delete_v1**](docs/CorrelationRules.md#entities_rules_delete_v1) +- **DELETE**: /correlation-rules/entities/rules/v1 +- **Description**: Delete rules by IDs + +--- + +**Class**: `Falcon::CorrelationRules` + +- **Operation**: [**entities_rules_get_v1**](docs/CorrelationRules.md#entities_rules_get_v1) +- **GET**: /correlation-rules/entities/rules/v1 +- **Description**: Retrieve rules by IDs + +--- + +**Class**: `Falcon::CorrelationRules` + +- **Operation**: [**entities_rules_patch_v1**](docs/CorrelationRules.md#entities_rules_patch_v1) +- **PATCH**: /correlation-rules/entities/rules/v1 +- **Description**: Update rules + +--- + +**Class**: `Falcon::CorrelationRules` + +- **Operation**: [**entities_rules_post_v1**](docs/CorrelationRules.md#entities_rules_post_v1) +- **POST**: /correlation-rules/entities/rules/v1 +- **Description**: Create rule + +--- + +**Class**: `Falcon::CorrelationRules` + +- **Operation**: [**queries_rules_get_v1**](docs/CorrelationRules.md#queries_rules_get_v1) +- **GET**: /correlation-rules/queries/rules/v1 +- **Description**: Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on --- @@ -980,6 +1220,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CspmRegistration` +- **Operation**: [**azure_refresh_certificate**](docs/CspmRegistration.md#azure_refresh_certificate) +- **POST**: /cloud-connect-cspm-azure/entities/refresh-certificate/v1 +- **Description**: Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. + +--- + +**Class**: `Falcon::CspmRegistration` + - **Operation**: [**connect_cspm_gcp_account**](docs/CspmRegistration.md#connect_cspm_gcp_account) - **POST**: /cloud-connect-cspm-gcp/entities/account/v2 - **Description**: Creates a new GCP account with newly-uploaded service account or connects with existing service account with only the following fields: parent_id, parent_type and service_account_id @@ -1292,7 +1540,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CustomIoa` -- **Operation**: [**delete_rules_0**](docs/CustomIoa.md#delete_rules_0) +- **Operation**: [**delete_rules**](docs/CustomIoa.md#delete_rules) - **DELETE**: /ioarules/entities/rules/v1 - **Description**: Delete rules from a rule group by ID. @@ -1404,7 +1652,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CustomIoa` -- **Operation**: [**update_rules_0**](docs/CustomIoa.md#update_rules_0) +- **Operation**: [**update_rules**](docs/CustomIoa.md#update_rules) - **PATCH**: /ioarules/entities/rules/v1 - **Description**: Update rules within a rule group. Return the updated rules. @@ -1572,14 +1820,6 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::D4cRegistration` -- **Operation**: [**discover_cloud_azure_download_certificate**](docs/D4cRegistration.md#discover_cloud_azure_download_certificate) -- **GET**: /cloud-connect-azure/entities/download-certificate/v1 -- **Description**: Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - ---- - -**Class**: `Falcon::D4cRegistration` - - **Operation**: [**get_d4_c_aws_account**](docs/D4cRegistration.md#get_d4_c_aws_account) - **GET**: /cloud-connect-aws/entities/account/v2 - **Description**: Returns information about the current status of an AWS account. @@ -1714,54 +1954,6 @@ We appreciate your interest in our project and look forward to collaborating wit --- -**Class**: `Falcon::Default` - -- **Operation**: [**cloud_registration_aws_create_account**](docs/Default.md#cloud_registration_aws_create_account) -- **POST**: /cloud-security-registration-aws/entities/account/v1 -- **Description**: Creates a new account in our system for a customer. - ---- - -**Class**: `Falcon::Default` - -- **Operation**: [**cloud_registration_aws_delete_account**](docs/Default.md#cloud_registration_aws_delete_account) -- **DELETE**: /cloud-security-registration-aws/entities/account/v1 -- **Description**: Deletes an existing AWS account or organization in our system. - ---- - -**Class**: `Falcon::Default` - -- **Operation**: [**cloud_registration_aws_get_accounts**](docs/Default.md#cloud_registration_aws_get_accounts) -- **GET**: /cloud-security-registration-aws/entities/account/v1 -- **Description**: Retrieve existing AWS accounts by account IDs - ---- - -**Class**: `Falcon::Default` - -- **Operation**: [**cloud_registration_aws_query_accounts**](docs/Default.md#cloud_registration_aws_query_accounts) -- **GET**: /cloud-security-registration-aws/queries/account/v1 -- **Description**: Retrieve existing AWS accounts by account IDs - ---- - -**Class**: `Falcon::Default` - -- **Operation**: [**cloud_registration_aws_update_account**](docs/Default.md#cloud_registration_aws_update_account) -- **PATCH**: /cloud-security-registration-aws/entities/account/v1 -- **Description**: Patches a existing account in our system for a customer. - ---- - -**Class**: `Falcon::Default` - -- **Operation**: [**cloud_registration_aws_validate_accounts**](docs/Default.md#cloud_registration_aws_validate_accounts) -- **POST**: /cloud-security-registration-aws/entities/account/validate/v1 -- **Description**: Validates the AWS account in our system for a provided CID. For internal clients only. - ---- - **Class**: `Falcon::DeliverySettings` - **Operation**: [**get_delivery_settings**](docs/DeliverySettings.md#get_delivery_settings) @@ -1778,6 +1970,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::Deployments` + +- **Operation**: [**get_deployments_external_v1**](docs/Deployments.md#get_deployments_external_v1) +- **GET**: /deployment-coordinator/entities/deployments/external/v1 +- **Description**: Get deployment resources by ids + +--- + **Class**: `Falcon::Detects` - **Operation**: [**get_aggregate_detects**](docs/Detects.md#get_aggregate_detects) @@ -1810,6 +2010,22 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::DeviceContent` + +- **Operation**: [**entities_states_v1**](docs/DeviceContent.md#entities_states_v1) +- **GET**: /device-content/entities/states/v1 +- **Description**: Retrieve the host content state for a number of ids between 1 and 100. + +--- + +**Class**: `Falcon::DeviceContent` + +- **Operation**: [**queries_states_v1**](docs/DeviceContent.md#queries_states_v1) +- **GET**: /device-content/queries/states/v1 +- **Description**: Query for the content state of the host. + +--- + **Class**: `Falcon::DeviceControlPolicies` - **Operation**: [**create_device_control_policies**](docs/DeviceControlPolicies.md#create_device_control_policies) @@ -1956,6 +2172,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::Discover` +- **Operation**: [**post_external_assets_inventory_v1**](docs/Discover.md#post_external_assets_inventory_v1) +- **POST**: /fem/entities/external-asset-inventory/v1 +- **Description**: Add external assets for external asset scanning. + +--- + +**Class**: `Falcon::Discover` + - **Operation**: [**query_accounts**](docs/Discover.md#query_accounts) - **GET**: /discover/queries/accounts/v1 - **Description**: Search for accounts in your environment by providing an FQL (Falcon Query Language) filter and paging details. Returns a set of account IDs which match the filter criteria. @@ -2054,7 +2278,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**search_and_read_drift_indicator_entities**](docs/DriftIndicators.md#search_and_read_drift_indicator_entities) - **GET**: /container-security/combined/drift-indicators/v1 -- **Description**: Retrieve Drift Indicators by the provided search criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -2062,7 +2286,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**search_drift_indicators**](docs/DriftIndicators.md#search_drift_indicators) - **GET**: /container-security/queries/drift-indicators/v1 -- **Description**: Retrieve all drift indicators that match the given query +- **Description**: Maximum offset = 10000 - limit --- @@ -2414,7 +2638,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_registry_entities**](docs/FalconContainerImage.md#read_registry_entities) - **GET**: /container-security/queries/registries/v1 -- **Description**: Retrieve registry entities identified by the customer id +- **Description**: Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 --- @@ -2422,7 +2646,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_registry_entities_by_uuid**](docs/FalconContainerImage.md#read_registry_entities_by_uuid) - **GET**: /container-security/entities/registries/v1 -- **Description**: Retrieve the registry entity identified by the entity UUID +- **Description**: Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 --- @@ -2572,7 +2796,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::Filevantage` -- **Operation**: [**create_policies_0**](docs/Filevantage.md#create_policies_0) +- **Operation**: [**create_policies**](docs/Filevantage.md#create_policies) - **POST**: /filevantage/entities/policies/v1 - **Description**: Creates a new policy of the specified type. New policies are always added at the end of the precedence list for the provided policy type. @@ -2756,7 +2980,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::Filevantage` -- **Operation**: [**update_policies_0**](docs/Filevantage.md#update_policies_0) +- **Operation**: [**update_policies**](docs/Filevantage.md#update_policies) - **PATCH**: /filevantage/entities/policies/v1 - **Description**: Updates the general information of the provided policy. @@ -2772,7 +2996,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::Filevantage` -- **Operation**: [**update_policy_precedence_0**](docs/Filevantage.md#update_policy_precedence_0) +- **Operation**: [**update_policy_precedence**](docs/Filevantage.md#update_policy_precedence) - **PATCH**: /filevantage/entities/policies-precedence/v1 - **Description**: Updates the policy precedence for all policies of a specific type. @@ -2884,7 +3108,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FirewallManagement` -- **Operation**: [**delete_rule_groups_0**](docs/FirewallManagement.md#delete_rule_groups_0) +- **Operation**: [**delete_rule_groups**](docs/FirewallManagement.md#delete_rule_groups) - **DELETE**: /fwmgr/entities/rule-groups/v1 - **Description**: Delete rule group entities by ID @@ -2940,7 +3164,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FirewallManagement` -- **Operation**: [**get_rule_groups_0**](docs/FirewallManagement.md#get_rule_groups_0) +- **Operation**: [**get_rule_groups**](docs/FirewallManagement.md#get_rule_groups) - **GET**: /fwmgr/entities/rule-groups/v1 - **Description**: Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. @@ -2948,7 +3172,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FirewallManagement` -- **Operation**: [**get_rules_0**](docs/FirewallManagement.md#get_rules_0) +- **Operation**: [**get_rules**](docs/FirewallManagement.md#get_rules) - **GET**: /fwmgr/entities/rules/v1 - **Description**: Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) @@ -2996,7 +3220,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FirewallManagement` -- **Operation**: [**query_rule_groups_0**](docs/FirewallManagement.md#query_rule_groups_0) +- **Operation**: [**query_rule_groups**](docs/FirewallManagement.md#query_rule_groups) - **GET**: /fwmgr/queries/rule-groups/v1 - **Description**: Find all rule group IDs matching the query with filter @@ -4042,6 +4266,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::IntelligenceIndicatorGraph` + +- **Operation**: [**search_indicators**](docs/IntelligenceIndicatorGraph.md#search_indicators) +- **POST**: /intelligence/combined/indicators/v1 +- **Description**: Search indicators based on FQL filter. + +--- + **Class**: `Falcon::IoaExclusions` - **Operation**: [**create_ioa_exclusions_v1**](docs/IoaExclusions.md#create_ioa_exclusions_v1) @@ -4278,7 +4510,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**find_containers_by_container_run_time_version**](docs/KubernetesProtection.md#find_containers_by_container_run_time_version) - **GET**: /container-security/aggregates/containers/find-by-runtimeversion/v1 -- **Description**: Retrieve containers by container_runtime_version +- **Description**: Maximum offset = 10000 - limit --- @@ -4390,7 +4622,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_cluster_combined**](docs/KubernetesProtection.md#read_cluster_combined) - **GET**: /container-security/combined/clusters/v1 -- **Description**: Retrieve kubernetes clusters identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -4438,7 +4670,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_container_combined**](docs/KubernetesProtection.md#read_container_combined) - **GET**: /container-security/combined/containers/v1 -- **Description**: Retrieve containers identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -4454,7 +4686,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_container_count_by_registry**](docs/KubernetesProtection.md#read_container_count_by_registry) - **GET**: /container-security/aggregates/containers/count-by-registry/v1 -- **Description**: Retrieve top container image registries +- **Description**: Retrieves a list with the top container image registries. Maximum page size: 200 --- @@ -4518,7 +4750,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_deployment_combined**](docs/KubernetesProtection.md#read_deployment_combined) - **GET**: /container-security/combined/deployments/v1 -- **Description**: Retrieve kubernetes deployments identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -4598,7 +4830,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_node_combined**](docs/KubernetesProtection.md#read_node_combined) - **GET**: /container-security/combined/nodes/v1 -- **Description**: Retrieve kubernetes nodes identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -4646,7 +4878,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_pod_combined**](docs/KubernetesProtection.md#read_pod_combined) - **GET**: /container-security/combined/pods/v1 -- **Description**: Retrieve kubernetes pods identified by the provided filter criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -4678,7 +4910,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**read_running_container_images**](docs/KubernetesProtection.md#read_running_container_images) - **GET**: /container-security/combined/container-images/v1 -- **Description**: Retrieve images on running containers +- **Description**: Maximum offset = 10000 - limit --- @@ -4702,7 +4934,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**search_and_read_kubernetes_iom_entities**](docs/KubernetesProtection.md#search_and_read_kubernetes_iom_entities) - **GET**: /container-security/combined/kubernetes-ioms/v1 -- **Description**: Search Kubernetes IOM by the provided search criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -4710,7 +4942,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**search_kubernetes_ioms**](docs/KubernetesProtection.md#search_kubernetes_ioms) - **GET**: /container-security/queries/kubernetes-ioms/v1 -- **Description**: Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query +- **Description**: Maximum offset = 10000 - limit --- @@ -4730,6 +4962,22 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::LookupFiles` + +- **Operation**: [**create_file_v1**](docs/LookupFiles.md#create_file_v1) +- **POST**: /loggingapi/entities/lookup-files/v1 +- **Description**: Creates a lookup file + +--- + +**Class**: `Falcon::LookupFiles` + +- **Operation**: [**update_file_v1**](docs/LookupFiles.md#update_file_v1) +- **PATCH**: /loggingapi/entities/lookup-files/v1 +- **Description**: Updates a lookup file + +--- + **Class**: `Falcon::Malquery` - **Operation**: [**get_mal_query_download_v1**](docs/Malquery.md#get_mal_query_download_v1) @@ -6098,6 +6346,38 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::ReleaseNotes` + +- **Operation**: [**combined_release_notes_v1**](docs/ReleaseNotes.md#combined_release_notes_v1) +- **GET**: /deployment-coordinator/combined/release-notes/v1 +- **Description**: Queries for release-notes resources and returns details + +--- + +**Class**: `Falcon::ReleaseNotes` + +- **Operation**: [**get_entity_ids_by_query_post**](docs/ReleaseNotes.md#get_entity_ids_by_query_post) +- **POST**: /deployment-coordinator/entities/release-notes/GET/v1 +- **Description**: returns the IDs of all entities in the database for the given page + +--- + +**Class**: `Falcon::ReleaseNotes` + +- **Operation**: [**query_release_notes_v1**](docs/ReleaseNotes.md#query_release_notes_v1) +- **GET**: /deployment-coordinator/queries/release-notes/v1 +- **Description**: Queries for release-notes resources and returns ids + +--- + +**Class**: `Falcon::Releases` + +- **Operation**: [**combined_releases_v1_mixin0**](docs/Releases.md#combined_releases_v1_mixin0) +- **GET**: /deployment-coordinator/combined/releases/v1 +- **Description**: Queries for releases resources and returns details + +--- + **Class**: `Falcon::ReportExecutions` - **Operation**: [**report_executions_download_get**](docs/ReportExecutions.md#report_executions_download_get) @@ -6214,7 +6494,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**get_runtime_detections_combined_v2**](docs/RuntimeDetections.md#get_runtime_detections_combined_v2) - **GET**: /container-security/combined/runtime-detections/v2 -- **Description**: Retrieve container runtime detections by the provided search criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -6636,7 +6916,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::SpotlightVulnerabilities` -- **Operation**: [**get_vulnerabilities_0**](docs/SpotlightVulnerabilities.md#get_vulnerabilities_0) +- **Operation**: [**get_vulnerabilities**](docs/SpotlightVulnerabilities.md#get_vulnerabilities) - **GET**: /spotlight/entities/vulnerabilities/v2 - **Description**: Get details on vulnerabilities by providing one or more IDs @@ -6644,7 +6924,7 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::SpotlightVulnerabilities` -- **Operation**: [**query_vulnerabilities_0**](docs/SpotlightVulnerabilities.md#query_vulnerabilities_0) +- **Operation**: [**query_vulnerabilities**](docs/SpotlightVulnerabilities.md#query_vulnerabilities) - **GET**: /spotlight/queries/vulnerabilities/v1 - **Description**: Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability IDs which match the filter criteria @@ -6718,7 +6998,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**search_and_read_unidentified_containers**](docs/UnidentifiedContainers.md#search_and_read_unidentified_containers) - **GET**: /container-security/combined/unidentified-containers/v1 -- **Description**: Search Unidentified Containers by the provided search criteria +- **Description**: Maximum offset = 10000 - limit --- @@ -6898,6 +7178,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::Vulnerabilities` + +- **Operation**: [**get_combined_vulnerabilities_sarif**](docs/Vulnerabilities.md#get_combined_vulnerabilities_sarif) +- **GET**: /lambdas/combined/vulnerabilities/sarif/v1 +- **Description**: Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format + +--- + **Class**: `Falcon::Workflows` - **Operation**: [**workflow_activities_combined**](docs/Workflows.md#workflow_activities_combined) diff --git a/docs/ASPM.md b/docs/ASPM.md index fd7054e6..79ffbcdd 100644 --- a/docs/ASPM.md +++ b/docs/ASPM.md @@ -13,7 +13,9 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**delete_tags**](ASPM.md#delete_tags) | **POST** /aspm-api-gateway/api/v1/tags | Remove existing tags | | [**execute_query**](ASPM.md#execute_query) | **POST** /aspm-api-gateway/api/v1/query | Execute a query. The syntax used is identical to that of the query page. | | [**get_executor_nodes**](ASPM.md#get_executor_nodes) | **GET** /aspm-api-gateway/api/v1/executor_nodes | Get all the relay nodes | +| [**get_executor_nodes_metadata**](ASPM.md#get_executor_nodes_metadata) | **GET** /aspm-api-gateway/api/v1/executor_nodes/metadata | Get metadata about all executor nodes | | [**get_integration_tasks**](ASPM.md#get_integration_tasks) | **GET** /aspm-api-gateway/api/v1/integration_tasks | Get all the integration tasks | +| [**get_integration_tasks_metadata**](ASPM.md#get_integration_tasks_metadata) | **GET** /aspm-api-gateway/api/v1/integration_tasks/metadata | Get metadata about all integration tasks | | [**get_integration_types**](ASPM.md#get_integration_types) | **GET** /aspm-api-gateway/api/v1/integration_types | Get all the integration types | | [**get_integrations**](ASPM.md#get_integrations) | **GET** /aspm-api-gateway/api/v1/integrations | Get a list of all the integrations | | [**get_service_violation_types**](ASPM.md#get_service_violation_types) | **GET** /aspm-api-gateway/api/v1/services/violations/types | Get the different types of violation | @@ -599,7 +601,15 @@ end api_instance = Falcon::ASPM.new node_type = 'node_type_example' # String | opts = { - integration_type: 56 # Integer | + integration_type: 56, # Integer | + offset: 56, # Integer | + limit: 56, # Integer | + order_by: 'name', # String | + direction: 'asc', # String | + executor_node_ids: ['inner_example'], # Array | executor node ids + executor_node_names: ['inner_example'], # Array | executor node names + executor_node_states: [37], # Array | executor node states + executor_node_types: ['inner_example'] # Array | executor node types } begin @@ -635,6 +645,14 @@ end | ---- | ---- | ----------- | ----- | | **node_type** | **String** | | | | **integration_type** | **Integer** | | [optional] | +| **offset** | **Integer** | | [optional] | +| **limit** | **Integer** | | [optional] | +| **order_by** | **String** | | [optional] | +| **direction** | **String** | | [optional] | +| **executor_node_ids** | [**Array<String>**](String.md) | executor node ids | [optional] | +| **executor_node_names** | [**Array<String>**](String.md) | executor node names | [optional] | +| **executor_node_states** | [**Array<Integer>**](Integer.md) | executor node states | [optional] | +| **executor_node_types** | [**Array<String>**](String.md) | executor node types | [optional] | ### Return type @@ -650,6 +668,83 @@ end - **Accept**: application/json +## get_executor_nodes_metadata + +> get_executor_nodes_metadata(opts) + +Get metadata about all executor nodes + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ASPM.new +opts = { + executor_node_ids: ['inner_example'], # Array | executor node ids + executor_node_names: ['inner_example'], # Array | executor node names + executor_node_states: [37], # Array | executor node states + executor_node_types: ['inner_example'] # Array | executor node types +} + +begin + # Get metadata about all executor nodes + result = api_instance.get_executor_nodes_metadata(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ASPM->get_executor_nodes_metadata: #{e}" +end +``` + +#### Using the get_executor_nodes_metadata_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_executor_nodes_metadata_with_http_info(opts) + +```ruby +begin + # Get metadata about all executor nodes + data, status_code, headers = api_instance.get_executor_nodes_metadata_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ASPM->get_executor_nodes_metadata_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **executor_node_ids** | [**Array<String>**](String.md) | executor node ids | [optional] | +| **executor_node_names** | [**Array<String>**](String.md) | executor node names | [optional] | +| **executor_node_states** | [**Array<Integer>**](Integer.md) | executor node states | [optional] | +| **executor_node_types** | [**Array<String>**](String.md) | executor node types | [optional] | + +### Return type + +[**TypesGetExecutorNodesMetadataResponse**](TypesGetExecutorNodesMetadataResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_integration_tasks > get_integration_tasks(opts) @@ -672,7 +767,14 @@ end api_instance = Falcon::ASPM.new opts = { integration_task_type: 56, # Integer | - category: 'category_example' # String | + category: 'category_example', # String | + offset: 56, # Integer | + limit: 56, # Integer | + order_by: 'name', # String | + direction: 'asc', # String | + integration_task_types: 56, # Integer | + ids: 56, # Integer | + names: 'names_example' # String | } begin @@ -708,6 +810,13 @@ end | ---- | ---- | ----------- | ----- | | **integration_task_type** | **Integer** | | [optional] | | **category** | **String** | | [optional] | +| **offset** | **Integer** | | [optional] | +| **limit** | **Integer** | | [optional] | +| **order_by** | **String** | | [optional] | +| **direction** | **String** | | [optional] | +| **integration_task_types** | **Integer** | | [optional] | +| **ids** | **Integer** | | [optional] | +| **names** | **String** | | [optional] | ### Return type @@ -723,6 +832,83 @@ end - **Accept**: application/json +## get_integration_tasks_metadata + +> get_integration_tasks_metadata(opts) + +Get metadata about all integration tasks + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ASPM.new +opts = { + category: 'collecting', # String | + integration_task_types: 56, # Integer | + ids: 56, # Integer | + names: 'names_example' # String | +} + +begin + # Get metadata about all integration tasks + result = api_instance.get_integration_tasks_metadata(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ASPM->get_integration_tasks_metadata: #{e}" +end +``` + +#### Using the get_integration_tasks_metadata_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_integration_tasks_metadata_with_http_info(opts) + +```ruby +begin + # Get metadata about all integration tasks + data, status_code, headers = api_instance.get_integration_tasks_metadata_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ASPM->get_integration_tasks_metadata_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **category** | **String** | | [optional] | +| **integration_task_types** | **Integer** | | [optional] | +| **ids** | **Integer** | | [optional] | +| **names** | **String** | | [optional] | + +### Return type + +[**TypesGetIntegrationTasksMetadataResponse**](TypesGetIntegrationTasksMetadataResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_integration_types > get_integration_types diff --git a/docs/Alerts.md b/docs/Alerts.md index 4dea9d86..73033c5c 100644 --- a/docs/Alerts.md +++ b/docs/Alerts.md @@ -10,6 +10,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**patch_entities_alerts_v3**](Alerts.md#patch_entities_alerts_v3) | **PATCH** /alerts/entities/alerts/v3 | Perform actions on Alerts identified by composite ID(s) in request. Each action has a name and a description which describes what the action does. If a request adds and removes tag in a single request, the order of processing would be to remove tags before adding new ones in. | | [**post_aggregates_alerts_v1**](Alerts.md#post_aggregates_alerts_v1) | **POST** /alerts/aggregates/alerts/v1 | Deprecated: Please use version v2 of this endpoint. Retrieves aggregate values for Alerts across all CIDs. | | [**post_aggregates_alerts_v2**](Alerts.md#post_aggregates_alerts_v2) | **POST** /alerts/aggregates/alerts/v2 | Retrieves aggregate values for Alerts across all CIDs. | +| [**post_combined_alerts_v1**](Alerts.md#post_combined_alerts_v1) | **POST** /alerts/combined/alerts/v1 | Retrieves all Alerts that match a particular FQL filter. | | [**post_entities_alerts_v1**](Alerts.md#post_entities_alerts_v1) | **POST** /alerts/entities/alerts/v1 | Deprecated: please use version v2 of this endpoint. Retrieves all Alerts given their ids. | | [**post_entities_alerts_v2**](Alerts.md#post_entities_alerts_v2) | **POST** /alerts/entities/alerts/v2 | Retrieves all Alerts given their composite ids. | @@ -36,7 +37,7 @@ end api_instance = Falcon::Alerts.new opts = { offset: 56, # Integer | The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - limit: 56, # Integer | The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + limit: 56, # Integer | The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. sort: 'sort_example', # String | Sort parameter takes the form . Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering filter: 'filter_example', # String | Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). q: 'q_example' # String | Search all alert metadata for the provided string @@ -74,7 +75,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **offset** | **Integer** | The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. | [optional] | -| **limit** | **Integer** | The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. | [optional] | +| **limit** | **Integer** | The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. | [optional] | | **sort** | **String** | Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering | [optional] | | **filter** | **String** | Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). | [optional] | | **q** | **String** | Search all alert metadata for the provided string | [optional] | @@ -116,7 +117,7 @@ api_instance = Falcon::Alerts.new opts = { include_hidden: true, # Boolean | allows previously hidden alerts to be retrieved offset: 56, # Integer | The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - limit: 56, # Integer | The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + limit: 56, # Integer | The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. sort: 'sort_example', # String | Sort parameter takes the form . Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering filter: 'filter_example', # String | Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). q: 'q_example' # String | Search all alert metadata for the provided string @@ -155,7 +156,7 @@ end | ---- | ---- | ----------- | ----- | | **include_hidden** | **Boolean** | allows previously hidden alerts to be retrieved | [optional][default to true] | | **offset** | **Integer** | The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. | [optional] | -| **limit** | **Integer** | The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. | [optional] | +| **limit** | **Integer** | The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. | [optional] | | **sort** | **String** | Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering | [optional] | | **filter** | **String** | Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). | [optional] | | **q** | **String** | Search all alert metadata for the provided string | [optional] | @@ -458,6 +459,75 @@ end - **Accept**: application/json +## post_combined_alerts_v1 + +> post_combined_alerts_v1(body) + +Retrieves all Alerts that match a particular FQL filter. + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::Alerts.new +body = Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger.new # DetectsapiPostCombinedAlertsV1RequestSwagger | `after` - Token used to access the next page. The `after` token will be populated only when the service expects more results expected on the next page. Once you reach the last page (which usually has less than `limit` results), the `after` token will not be returned anymore. The best way to retrieve all the results is to paginate them till you get to the last page where the `after` token blank. This value is highly dependant on the `sort` parameter, so if you plan to change the sort order, you will have to re-start your search from the first page (without `after` parameter). `filter` - Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). `limit` - The maximum number of detections to return in this response (default: 100; max: 1000). Use this parameter together with the `after` parameter to manage pagination of the results. `sort` - Sort parameter takes the form of ``. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields for sorting are: timestamp, created_timestamp, updated_timestamp, status, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, tactic_id, tactic, technique, technique_id, pattern_id or product. By default all the results are sorted by the `created_timestamp` field in the descending order. **Important:** The pagination is done on live data in the order defined by the `sort` field parameter (default: `created_timestamp|desc`), so if you want to avoid inconsistent results where the same record might appear on multiple pages (or none), sort only on the fields that do not change over time (e.g. created_timestamp, composite_id, ...). + +begin + # Retrieves all Alerts that match a particular FQL filter. + result = api_instance.post_combined_alerts_v1(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling Alerts->post_combined_alerts_v1: #{e}" +end +``` + +#### Using the post_combined_alerts_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_combined_alerts_v1_with_http_info(body) + +```ruby +begin + # Retrieves all Alerts that match a particular FQL filter. + data, status_code, headers = api_instance.post_combined_alerts_v1_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling Alerts->post_combined_alerts_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**DetectsapiPostCombinedAlertsV1RequestSwagger**](DetectsapiPostCombinedAlertsV1RequestSwagger.md) | `after` - Token used to access the next page. The `after` token will be populated only when the service expects more results expected on the next page. Once you reach the last page (which usually has less than `limit` results), the `after` token will not be returned anymore. The best way to retrieve all the results is to paginate them till you get to the last page where the `after` token blank. This value is highly dependant on the `sort` parameter, so if you plan to change the sort order, you will have to re-start your search from the first page (without `after` parameter). `filter` - Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). `limit` - The maximum number of detections to return in this response (default: 100; max: 1000). Use this parameter together with the `after` parameter to manage pagination of the results. `sort` - Sort parameter takes the form of `<field|direction>`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields for sorting are: timestamp, created_timestamp, updated_timestamp, status, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, tactic_id, tactic, technique, technique_id, pattern_id or product. By default all the results are sorted by the `created_timestamp` field in the descending order. **Important:** The pagination is done on live data in the order defined by the `sort` field parameter (default: `created_timestamp|desc`), so if you want to avoid inconsistent results where the same record might appear on multiple pages (or none), sort only on the fields that do not change over time (e.g. created_timestamp, composite_id, ...). | | + +### Return type + +[**DetectsapiPostCombinedAlertsV1ResponseSwagger**](DetectsapiPostCombinedAlertsV1ResponseSwagger.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## post_entities_alerts_v1 > post_entities_alerts_v1(body) diff --git a/docs/ApiCreateRuleOperationV1.md b/docs/ApiCreateRuleOperationV1.md new file mode 100644 index 00000000..a257761b --- /dev/null +++ b/docs/ApiCreateRuleOperationV1.md @@ -0,0 +1,22 @@ +# Falcon::ApiCreateRuleOperationV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **schedule** | [**ApiRuleScheduleV1**](ApiRuleScheduleV1.md) | | | +| **start_on** | **Time** | | [optional] | +| **stop_on** | **Time** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiCreateRuleOperationV1.new( + schedule: null, + start_on: null, + stop_on: null +) +``` + diff --git a/docs/ApiGetEntitiesRulesResponseV1.md b/docs/ApiGetEntitiesRulesResponseV1.md new file mode 100644 index 00000000..8a54d89f --- /dev/null +++ b/docs/ApiGetEntitiesRulesResponseV1.md @@ -0,0 +1,22 @@ +# Falcon::ApiGetEntitiesRulesResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<ApiRuleV1>**](ApiRuleV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiGetEntitiesRulesResponseV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ApiPatchRuleOperationV1.md b/docs/ApiPatchRuleOperationV1.md new file mode 100644 index 00000000..9694e2dc --- /dev/null +++ b/docs/ApiPatchRuleOperationV1.md @@ -0,0 +1,22 @@ +# Falcon::ApiPatchRuleOperationV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **schedule** | [**ApiRuleScheduleV1Patch**](ApiRuleScheduleV1Patch.md) | | [optional] | +| **start_on** | **Time** | | [optional] | +| **stop_on** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiPatchRuleOperationV1.new( + schedule: null, + start_on: null, + stop_on: null +) +``` + diff --git a/docs/ApiPatchRuleSearchV1.md b/docs/ApiPatchRuleSearchV1.md new file mode 100644 index 00000000..f890ded8 --- /dev/null +++ b/docs/ApiPatchRuleSearchV1.md @@ -0,0 +1,24 @@ +# Falcon::ApiPatchRuleSearchV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | | [optional] | +| **lookback** | **String** | | [optional] | +| **outcome** | **String** | | [optional] | +| **trigger_mode** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiPatchRuleSearchV1.new( + filter: null, + lookback: null, + outcome: null, + trigger_mode: null +) +``` + diff --git a/docs/ApiRuleCreateRequestV1.md b/docs/ApiRuleCreateRequestV1.md new file mode 100644 index 00000000..8b479f69 --- /dev/null +++ b/docs/ApiRuleCreateRequestV1.md @@ -0,0 +1,38 @@ +# Falcon::ApiRuleCreateRequestV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **comment** | **String** | | [optional] | +| **customer_id** | **String** | | | +| **description** | **String** | | [optional] | +| **name** | **String** | | | +| **operation** | [**ApiCreateRuleOperationV1**](ApiCreateRuleOperationV1.md) | | | +| **search** | [**ApiRuleSearchV1**](ApiRuleSearchV1.md) | | | +| **severity** | **Integer** | | | +| **status** | **String** | | | +| **tactic** | **String** | | [optional] | +| **technique** | **String** | | [optional] | +| **trigger_on_create** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiRuleCreateRequestV1.new( + comment: null, + customer_id: null, + description: null, + name: null, + operation: null, + search: null, + severity: null, + status: null, + tactic: null, + technique: null, + trigger_on_create: null +) +``` + diff --git a/docs/ApiRuleOperationV1.md b/docs/ApiRuleOperationV1.md new file mode 100644 index 00000000..658d3ae5 --- /dev/null +++ b/docs/ApiRuleOperationV1.md @@ -0,0 +1,24 @@ +# Falcon::ApiRuleOperationV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **expiration_on** | **Time** | | [optional] | +| **schedule** | [**ApiRuleScheduleV1**](ApiRuleScheduleV1.md) | | | +| **start_on** | **Time** | | [optional] | +| **stop_on** | **Time** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiRuleOperationV1.new( + expiration_on: null, + schedule: null, + start_on: null, + stop_on: null +) +``` + diff --git a/docs/ApiRulePatchRequestV1.md b/docs/ApiRulePatchRequestV1.md new file mode 100644 index 00000000..a1f6bcb1 --- /dev/null +++ b/docs/ApiRulePatchRequestV1.md @@ -0,0 +1,34 @@ +# Falcon::ApiRulePatchRequestV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **id** | **String** | | | +| **name** | **String** | | [optional] | +| **operation** | [**ApiPatchRuleOperationV1**](ApiPatchRuleOperationV1.md) | | [optional] | +| **search** | [**ApiPatchRuleSearchV1**](ApiPatchRuleSearchV1.md) | | [optional] | +| **severity** | **Integer** | | [optional] | +| **status** | **String** | | [optional] | +| **tactic** | **String** | | [optional] | +| **technique** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiRulePatchRequestV1.new( + description: null, + id: null, + name: null, + operation: null, + search: null, + severity: null, + status: null, + tactic: null, + technique: null +) +``` + diff --git a/docs/ApiRuleScheduleV1.md b/docs/ApiRuleScheduleV1.md new file mode 100644 index 00000000..68cca72a --- /dev/null +++ b/docs/ApiRuleScheduleV1.md @@ -0,0 +1,18 @@ +# Falcon::ApiRuleScheduleV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **definition** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiRuleScheduleV1.new( + definition: null +) +``` + diff --git a/docs/ApiRuleScheduleV1Patch.md b/docs/ApiRuleScheduleV1Patch.md new file mode 100644 index 00000000..eb98d220 --- /dev/null +++ b/docs/ApiRuleScheduleV1Patch.md @@ -0,0 +1,18 @@ +# Falcon::ApiRuleScheduleV1Patch + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **definition** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiRuleScheduleV1Patch.new( + definition: null +) +``` + diff --git a/docs/ApiRuleSearchV1.md b/docs/ApiRuleSearchV1.md new file mode 100644 index 00000000..d99433b6 --- /dev/null +++ b/docs/ApiRuleSearchV1.md @@ -0,0 +1,24 @@ +# Falcon::ApiRuleSearchV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | | | +| **lookback** | **String** | | | +| **outcome** | **String** | | | +| **trigger_mode** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiRuleSearchV1.new( + filter: null, + lookback: null, + outcome: null, + trigger_mode: null +) +``` + diff --git a/docs/ApiRuleV1.md b/docs/ApiRuleV1.md index 9f1f976e..081191cd 100644 --- a/docs/ApiRuleV1.md +++ b/docs/ApiRuleV1.md @@ -4,29 +4,26 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **action_label** | **String** | | | -| **comment** | **String** | | | -| **committed_on** | **Time** | | | -| **created_by** | **String** | | | +| **api_client_id** | **String** | | | +| **comment** | **String** | | [optional] | | **created_on** | **Time** | | | | **customer_id** | **String** | | | -| **deleted** | **Boolean** | | | -| **description** | **String** | | | -| **disposition_id** | **Integer** | | | -| **enabled** | **Boolean** | | | -| **field_values** | [**Array<DomainFieldValue>**](DomainFieldValue.md) | | | -| **instance_id** | **String** | | | -| **instance_version** | **Integer** | | | -| **magic_cookie** | **Integer** | | | -| **modified_by** | **String** | | | -| **modified_on** | **Time** | | | +| **description** | **String** | | [optional] | +| **id** | **String** | | | +| **last_updated_on** | **Time** | | | | **name** | **String** | | | -| **pattern_id** | **String** | | | -| **pattern_severity** | **String** | | | -| **rulegroup_id** | **String** | | | -| **ruletype_id** | **String** | | | -| **ruletype_name** | **String** | | | -| **version_ids** | **Array<String>** | | | +| **operation** | [**ApiRuleOperationV1**](ApiRuleOperationV1.md) | | | +| **rule_id** | **String** | | [optional] | +| **search** | [**ApiRuleSearchV1**](ApiRuleSearchV1.md) | | | +| **severity** | **Integer** | | | +| **state** | **String** | | [optional] | +| **status** | **String** | | | +| **tactic** | **String** | | | +| **technique** | **String** | | | +| **template_id** | **String** | | | +| **user_id** | **String** | | | +| **user_uuid** | **String** | | | +| **version** | **Integer** | | [optional] | ## Example @@ -34,29 +31,26 @@ require 'crimson-falcon' instance = Falcon::ApiRuleV1.new( - action_label: null, + api_client_id: null, comment: null, - committed_on: null, - created_by: null, created_on: null, customer_id: null, - deleted: null, description: null, - disposition_id: null, - enabled: null, - field_values: null, - instance_id: null, - instance_version: null, - magic_cookie: null, - modified_by: null, - modified_on: null, + id: null, + last_updated_on: null, name: null, - pattern_id: null, - pattern_severity: null, - rulegroup_id: null, - ruletype_id: null, - ruletype_name: null, - version_ids: null + operation: null, + rule_id: null, + search: null, + severity: null, + state: null, + status: null, + tactic: null, + technique: null, + template_id: null, + user_id: null, + user_uuid: null, + version: null ) ``` diff --git a/docs/ApidomainSavedSearchExecuteRequestV1.md b/docs/ApidomainSavedSearchExecuteRequestV1.md index 3b148743..100c84c3 100644 --- a/docs/ApidomainSavedSearchExecuteRequestV1.md +++ b/docs/ApidomainSavedSearchExecuteRequestV1.md @@ -4,13 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **extra_rename** | **String** | | | -| **extra_search** | **String** | | | -| **extra_sort** | **String** | | | -| **extra_where** | **String** | | | -| **parameters** | **Hash<String, String>** | | | | **_end** | **String** | | [optional] | -| **fql_statements** | [**Hash<String, ClientFQLStatement>**](ClientFQLStatement.md) | | | | **id** | **String** | | [optional] | | **mode** | **String** | | [optional] | | **name** | **String** | | [optional] | @@ -27,13 +21,7 @@ require 'crimson-falcon' instance = Falcon::ApidomainSavedSearchExecuteRequestV1.new( - extra_rename: null, - extra_search: null, - extra_sort: null, - extra_where: null, - parameters: null, _end: null, - fql_statements: null, id: null, mode: null, name: null, diff --git a/docs/AssetsGetResourceIDsResponse.md b/docs/AssetsGetResourceIDsResponse.md new file mode 100644 index 00000000..8b108bbe --- /dev/null +++ b/docs/AssetsGetResourceIDsResponse.md @@ -0,0 +1,22 @@ +# Falcon::AssetsGetResourceIDsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**RestCursorAndLimitMetaInfo**](RestCursorAndLimitMetaInfo.md) | | [optional] | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::AssetsGetResourceIDsResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/AssetsGetResourcesResponse.md b/docs/AssetsGetResourcesResponse.md new file mode 100644 index 00000000..d75191ef --- /dev/null +++ b/docs/AssetsGetResourcesResponse.md @@ -0,0 +1,22 @@ +# Falcon::AssetsGetResourcesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**RestCursorMetaInfo**](RestCursorMetaInfo.md) | | | +| **resources** | [**Array<ResourcesCloudResource>**](ResourcesCloudResource.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::AssetsGetResourcesResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/BaseSetContentUpdatePolicyPrecedenceReqV1.md b/docs/BaseSetContentUpdatePolicyPrecedenceReqV1.md new file mode 100644 index 00000000..307e43fd --- /dev/null +++ b/docs/BaseSetContentUpdatePolicyPrecedenceReqV1.md @@ -0,0 +1,18 @@ +# Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | **Array<String>** | The ids of all current content-update policies for the platform specified. The precedence will be set in the order the ids are specified | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1.new( + ids: null +) +``` + diff --git a/docs/ClientFQLStatement.md b/docs/ClientFQLStatement.md deleted file mode 100644 index 61a6e3fd..00000000 --- a/docs/ClientFQLStatement.md +++ /dev/null @@ -1,22 +0,0 @@ -# Falcon::ClientFQLStatement - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **op** | **String** | | | -| **prop** | **String** | | | -| **value** | **Object** | | | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::ClientFQLStatement.new( - op: null, - prop: null, - value: null -) -``` - diff --git a/docs/Default.md b/docs/CloudAwsRegistration.md similarity index 80% rename from docs/Default.md rename to docs/CloudAwsRegistration.md index 9daaf413..e74746cc 100644 --- a/docs/Default.md +++ b/docs/CloudAwsRegistration.md @@ -1,15 +1,15 @@ -# Falcon::Default +# Falcon::CloudAwsRegistration All URIs are relative to *https://api.us-2.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**cloud_registration_aws_create_account**](Default.md#cloud_registration_aws_create_account) | **POST** /cloud-security-registration-aws/entities/account/v1 | Creates a new account in our system for a customer. | -| [**cloud_registration_aws_delete_account**](Default.md#cloud_registration_aws_delete_account) | **DELETE** /cloud-security-registration-aws/entities/account/v1 | Deletes an existing AWS account or organization in our system. | -| [**cloud_registration_aws_get_accounts**](Default.md#cloud_registration_aws_get_accounts) | **GET** /cloud-security-registration-aws/entities/account/v1 | Retrieve existing AWS accounts by account IDs | -| [**cloud_registration_aws_query_accounts**](Default.md#cloud_registration_aws_query_accounts) | **GET** /cloud-security-registration-aws/queries/account/v1 | Retrieve existing AWS accounts by account IDs | -| [**cloud_registration_aws_update_account**](Default.md#cloud_registration_aws_update_account) | **PATCH** /cloud-security-registration-aws/entities/account/v1 | Patches a existing account in our system for a customer. | -| [**cloud_registration_aws_validate_accounts**](Default.md#cloud_registration_aws_validate_accounts) | **POST** /cloud-security-registration-aws/entities/account/validate/v1 | Validates the AWS account in our system for a provided CID. For internal clients only. | +| [**cloud_registration_aws_create_account**](CloudAwsRegistration.md#cloud_registration_aws_create_account) | **POST** /cloud-security-registration-aws/entities/account/v1 | Creates a new account in our system for a customer. | +| [**cloud_registration_aws_delete_account**](CloudAwsRegistration.md#cloud_registration_aws_delete_account) | **DELETE** /cloud-security-registration-aws/entities/account/v1 | Deletes an existing AWS account or organization in our system. | +| [**cloud_registration_aws_get_accounts**](CloudAwsRegistration.md#cloud_registration_aws_get_accounts) | **GET** /cloud-security-registration-aws/entities/account/v1 | Retrieve existing AWS accounts by account IDs | +| [**cloud_registration_aws_query_accounts**](CloudAwsRegistration.md#cloud_registration_aws_query_accounts) | **GET** /cloud-security-registration-aws/queries/account/v1 | Retrieve existing AWS accounts by account IDs | +| [**cloud_registration_aws_update_account**](CloudAwsRegistration.md#cloud_registration_aws_update_account) | **PATCH** /cloud-security-registration-aws/entities/account/v1 | Patches a existing account in our system for a customer. | +| [**cloud_registration_aws_validate_accounts**](CloudAwsRegistration.md#cloud_registration_aws_validate_accounts) | **POST** /cloud-security-registration-aws/entities/account/validate/v1 | Validates the AWS account in our system for a provided CID. For internal clients only. | ## cloud_registration_aws_create_account @@ -31,7 +31,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::Default.new +api_instance = Falcon::CloudAwsRegistration.new body = Falcon::RestAWSAccountCreateRequestExtv1.new({resources: [Falcon::RestCloudAWSAccountCreateExtV1.new({organization_id: 'organization_id_example'})]}) # RestAWSAccountCreateRequestExtv1 | begin @@ -39,7 +39,7 @@ begin result = api_instance.cloud_registration_aws_create_account(body) p result rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_create_account: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_create_account: #{e}" end ``` @@ -57,7 +57,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_create_account_with_http_info: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_create_account_with_http_info: #{e}" end ``` @@ -100,7 +100,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::Default.new +api_instance = Falcon::CloudAwsRegistration.new opts = { ids: ['inner_example'], # Array | AWS account IDs to remove organization_ids: ['inner_example'] # Array | AWS organization IDs to remove @@ -111,7 +111,7 @@ begin result = api_instance.cloud_registration_aws_delete_account(opts) p result rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_delete_account: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_delete_account: #{e}" end ``` @@ -129,7 +129,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_delete_account_with_http_info: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_delete_account_with_http_info: #{e}" end ``` @@ -173,7 +173,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::Default.new +api_instance = Falcon::CloudAwsRegistration.new opts = { ids: ['inner_example'] # Array | AWS account IDs to filter } @@ -183,7 +183,7 @@ begin result = api_instance.cloud_registration_aws_get_accounts(opts) p result rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_get_accounts: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_get_accounts: #{e}" end ``` @@ -201,7 +201,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_get_accounts_with_http_info: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_get_accounts_with_http_info: #{e}" end ``` @@ -244,7 +244,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::Default.new +api_instance = Falcon::CloudAwsRegistration.new products = ['inner_example'] # Array | Products registered for an account features = ['inner_example'] # Array | Features registered for an account opts = { @@ -260,7 +260,7 @@ begin result = api_instance.cloud_registration_aws_query_accounts(products, features, opts) p result rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_query_accounts: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_query_accounts: #{e}" end ``` @@ -278,7 +278,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_query_accounts_with_http_info: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_query_accounts_with_http_info: #{e}" end ``` @@ -327,7 +327,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::Default.new +api_instance = Falcon::CloudAwsRegistration.new body = Falcon::RestAWSAccountCreateRequestExtv1.new({resources: [Falcon::RestCloudAWSAccountCreateExtV1.new({organization_id: 'organization_id_example'})]}) # RestAWSAccountCreateRequestExtv1 | begin @@ -335,7 +335,7 @@ begin result = api_instance.cloud_registration_aws_update_account(body) p result rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_update_account: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_update_account: #{e}" end ``` @@ -353,7 +353,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_update_account_with_http_info: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_update_account_with_http_info: #{e}" end ``` @@ -396,7 +396,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::Default.new +api_instance = Falcon::CloudAwsRegistration.new products = 'products_example' # String | Product registered for an account feature = ['inner_example'] # Array | Features registered for an account opts = { @@ -409,7 +409,7 @@ begin result = api_instance.cloud_registration_aws_validate_accounts(products, feature, opts) p result rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_validate_accounts: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_validate_accounts: #{e}" end ``` @@ -427,7 +427,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Default->cloud_registration_aws_validate_accounts_with_http_info: #{e}" + puts "Error when calling CloudAwsRegistration->cloud_registration_aws_validate_accounts_with_http_info: #{e}" end ``` diff --git a/docs/CloudAzureRegistration.md b/docs/CloudAzureRegistration.md new file mode 100644 index 00000000..ccb2be5c --- /dev/null +++ b/docs/CloudAzureRegistration.md @@ -0,0 +1,77 @@ +# Falcon::CloudAzureRegistration + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**cloud_registration_azure_download_script**](CloudAzureRegistration.md#cloud_registration_azure_download_script) | **POST** /cloud-security-registration-azure/entities/scripts/v1 | Retrieve script to create resources | + + +## cloud_registration_azure_download_script + +> cloud_registration_azure_download_script(body) + +Retrieve script to create resources + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CloudAzureRegistration.new +body = Falcon::RestAzureDownloadScriptRequestV1.new({resources: [Falcon::RestAzureDownloadScriptRequestData.new({tenant_id: 'tenant_id_example'})]}) # RestAzureDownloadScriptRequestV1 | + +begin + # Retrieve script to create resources + result = api_instance.cloud_registration_azure_download_script(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CloudAzureRegistration->cloud_registration_azure_download_script: #{e}" +end +``` + +#### Using the cloud_registration_azure_download_script_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> cloud_registration_azure_download_script_with_http_info(body) + +```ruby +begin + # Retrieve script to create resources + data, status_code, headers = api_instance.cloud_registration_azure_download_script_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CloudAzureRegistration->cloud_registration_azure_download_script_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RestAzureDownloadScriptRequestV1**](RestAzureDownloadScriptRequestV1.md) | | | + +### Return type + +[**RestAzureProvisionGetAccountScriptResponseV1**](RestAzureProvisionGetAccountScriptResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/CloudSecurityAssets.md b/docs/CloudSecurityAssets.md new file mode 100644 index 00000000..fc701c59 --- /dev/null +++ b/docs/CloudSecurityAssets.md @@ -0,0 +1,159 @@ +# Falcon::CloudSecurityAssets + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**cloud_security_assets_entities_get**](CloudSecurityAssets.md#cloud_security_assets_entities_get) | **GET** /cloud-security-assets/entities/resources/v1 | Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. | +| [**cloud_security_assets_queries**](CloudSecurityAssets.md#cloud_security_assets_queries) | **GET** /cloud-security-assets/queries/resources/v1 | Gets a list of resource IDs for the given parameters, filters and sort criteria | + + +## cloud_security_assets_entities_get + +> cloud_security_assets_entities_get(opts) + +Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CloudSecurityAssets.new +opts = { + ids: ['inner_example'] # Array | List of assets to return (maximum 100 IDs allowed). Use POST method with same path if more entities are required. +} + +begin + # Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. + result = api_instance.cloud_security_assets_entities_get(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CloudSecurityAssets->cloud_security_assets_entities_get: #{e}" +end +``` + +#### Using the cloud_security_assets_entities_get_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> cloud_security_assets_entities_get_with_http_info(opts) + +```ruby +begin + # Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. + data, status_code, headers = api_instance.cloud_security_assets_entities_get_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CloudSecurityAssets->cloud_security_assets_entities_get_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | List of assets to return (maximum 100 IDs allowed). Use POST method with same path if more entities are required. | [optional] | + +### Return type + +[**AssetsGetResourcesResponse**](AssetsGetResourcesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## cloud_security_assets_queries + +> cloud_security_assets_queries(opts) + +Gets a list of resource IDs for the given parameters, filters and sort criteria + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CloudSecurityAssets.new +opts = { + after: 'after_example', # String | token-based pagination. use for paginating through an entire result set. Use only one of 'offset' and 'after' parameters for paginating + filter: 'filter_example', # String | FQL string to filter on asset contents. Filterable fields include: - `account_id` - `account_name` - `active` - `business_impact` - `cloud_group` - `cloud_label` - `cloud_label_id` - `cloud_provider` - `cluster_id` - `cluster_name` - `compliant.benchmark_name` - `compliant.benchmark_version` - `compliant.framework` - `compliant.policy_id` - `compliant.requirement` - `compliant.rule` - `compliant.section` - `configuration.id` - `creation_time` - `cve_ids` - `data_classifications.found` - `data_classifications.label` - `data_classifications.label_id` - `data_classifications.scanned` - `data_classifications.tag` - `data_classifications.tag_id` - `environment` - `exprt_ratings` - `first_seen` - `highest_severity` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `legacy_resource_id` - `legacy_uuid` - `managed_by` - `non_compliant.benchmark_name` - `non_compliant.benchmark_version` - `non_compliant.framework` - `non_compliant.policy_id` - `non_compliant.requirement` - `non_compliant.rule` - `non_compliant.section` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `sensor_priority` - `service` - `severity` - `snapshot_detections` - `ssm_managed` - `status` - `tag_key` - `tag_value` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` + sort: 'sort_example', # String | The field to sort on. Sortable fields include: - `account_id` - `account_name` - `active` - `cloud_provider` - `cluster_id` - `cluster_name` - `creation_time` - `data_classifications.found` - `data_classifications.scanned` - `first_seen` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `managed_by` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `service` - `ssm_managed` - `status` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` Use `|asc` or `|desc` suffix to specify sort direction. + limit: 56, # Integer | The maximum number of items to return. When not specified or 0, 500 is used. When larger than 1000, 1000 is used. + offset: 56 # Integer | Offset returned assets. Use only one of 'offset' and 'after' parameter for paginating. 'offset' can only be used on offsets < 10,000. For paginating through the entire result set, use 'after' parameter +} + +begin + # Gets a list of resource IDs for the given parameters, filters and sort criteria + result = api_instance.cloud_security_assets_queries(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CloudSecurityAssets->cloud_security_assets_queries: #{e}" +end +``` + +#### Using the cloud_security_assets_queries_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> cloud_security_assets_queries_with_http_info(opts) + +```ruby +begin + # Gets a list of resource IDs for the given parameters, filters and sort criteria + data, status_code, headers = api_instance.cloud_security_assets_queries_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CloudSecurityAssets->cloud_security_assets_queries_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | **String** | token-based pagination. use for paginating through an entire result set. Use only one of 'offset' and 'after' parameters for paginating | [optional] | +| **filter** | **String** | FQL string to filter on asset contents. Filterable fields include: - `account_id` - `account_name` - `active` - `business_impact` - `cloud_group` - `cloud_label` - `cloud_label_id` - `cloud_provider` - `cluster_id` - `cluster_name` - `compliant.benchmark_name` - `compliant.benchmark_version` - `compliant.framework` - `compliant.policy_id` - `compliant.requirement` - `compliant.rule` - `compliant.section` - `configuration.id` - `creation_time` - `cve_ids` - `data_classifications.found` - `data_classifications.label` - `data_classifications.label_id` - `data_classifications.scanned` - `data_classifications.tag` - `data_classifications.tag_id` - `environment` - `exprt_ratings` - `first_seen` - `highest_severity` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `legacy_resource_id` - `legacy_uuid` - `managed_by` - `non_compliant.benchmark_name` - `non_compliant.benchmark_version` - `non_compliant.framework` - `non_compliant.policy_id` - `non_compliant.requirement` - `non_compliant.rule` - `non_compliant.section` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `sensor_priority` - `service` - `severity` - `snapshot_detections` - `ssm_managed` - `status` - `tag_key` - `tag_value` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` | [optional] | +| **sort** | **String** | The field to sort on. Sortable fields include: - `account_id` - `account_name` - `active` - `cloud_provider` - `cluster_id` - `cluster_name` - `creation_time` - `data_classifications.found` - `data_classifications.scanned` - `first_seen` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `managed_by` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `service` - `ssm_managed` - `status` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` Use `|asc` or `|desc` suffix to specify sort direction. | [optional] | +| **limit** | **Integer** | The maximum number of items to return. When not specified or 0, 500 is used. When larger than 1000, 1000 is used. | [optional][default to 500] | +| **offset** | **Integer** | Offset returned assets. Use only one of 'offset' and 'after' parameter for paginating. 'offset' can only be used on offsets < 10,000. For paginating through the entire result set, use 'after' parameter | [optional] | + +### Return type + +[**AssetsGetResourceIDsResponse**](AssetsGetResourceIDsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ContainerAlerts.md b/docs/ContainerAlerts.md index 6a506abc..893f453d 100644 --- a/docs/ContainerAlerts.md +++ b/docs/ContainerAlerts.md @@ -6,7 +6,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | ------ | ------------ | ----------- | | [**read_container_alerts_count**](ContainerAlerts.md#read_container_alerts_count) | **GET** /container-security/aggregates/container-alerts/count/v1 | Search Container Alerts by the provided search criteria | | [**read_container_alerts_count_by_severity**](ContainerAlerts.md#read_container_alerts_count_by_severity) | **GET** /container-security/aggregates/container-alerts/count-by-severity/v1 | Get Container Alerts counts by severity | -| [**search_and_read_container_alerts**](ContainerAlerts.md#search_and_read_container_alerts) | **GET** /container-security/combined/container-alerts/v1 | Search Container Alerts by the provided search criteria | +| [**search_and_read_container_alerts**](ContainerAlerts.md#search_and_read_container_alerts) | **GET** /container-security/combined/container-alerts/v1 | Maximum offset = 10000 - limit | ## read_container_alerts_count @@ -30,7 +30,7 @@ end api_instance = Falcon::ContainerAlerts.new opts = { - filter: 'filter_example' # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + filter: 'filter_example' # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` } begin @@ -64,7 +64,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen | [optional] | +| **filter** | **String** | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` | [optional] | ### Return type @@ -101,7 +101,7 @@ end api_instance = Falcon::ContainerAlerts.new opts = { - filter: 'filter_example' # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + filter: 'filter_example' # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` } begin @@ -135,7 +135,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen | [optional] | +| **filter** | **String** | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` | [optional] | ### Return type @@ -155,7 +155,7 @@ end > search_and_read_container_alerts(opts) -Search Container Alerts by the provided search criteria +Maximum offset = 10000 - limit ### Examples @@ -172,14 +172,14 @@ end api_instance = Falcon::ContainerAlerts.new opts = { - filter: 'filter_example', # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen,name,severity + filter: 'filter_example', # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` - `name` - `severity` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56, # Integer | The offset from where to begin. sort: 'sort_example' # String | The fields to sort the records on. } begin - # Search Container Alerts by the provided search criteria + # Maximum offset = 10000 - limit result = api_instance.search_and_read_container_alerts(opts) p result rescue Falcon::ApiError => e @@ -195,7 +195,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Search Container Alerts by the provided search criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.search_and_read_container_alerts_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -209,8 +209,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen,name,severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` - `name` - `severity` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | | **sort** | **String** | The fields to sort the records on. | [optional] | diff --git a/docs/ContainerDetections.md b/docs/ContainerDetections.md index 7ef69260..5011ce41 100644 --- a/docs/ContainerDetections.md +++ b/docs/ContainerDetections.md @@ -4,19 +4,19 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**read_combined_detections**](ContainerDetections.md#read_combined_detections) | **GET** /container-security/combined/detections/v1 | Retrieve image assessment detections identified by the provided filter criteria | -| [**read_detections**](ContainerDetections.md#read_detections) | **GET** /container-security/entities/detections/v1 | Retrieve image assessment detection entities identified by the provided filter criteria | +| [**read_combined_detections**](ContainerDetections.md#read_combined_detections) | **GET** /container-security/combined/detections/v1 | Maximum offset = 10000 - limit | +| [**read_detections**](ContainerDetections.md#read_detections) | **GET** /container-security/entities/detections/v1 | Maximum offset = 10000 - limit | | [**read_detections_count**](ContainerDetections.md#read_detections_count) | **GET** /container-security/aggregates/detections/count/v1 | Aggregate count of detections | | [**read_detections_count_by_severity**](ContainerDetections.md#read_detections_count_by_severity) | **GET** /container-security/aggregates/detections/count-by-severity/v1 | Aggregate counts of detections by severity | | [**read_detections_count_by_type**](ContainerDetections.md#read_detections_count_by_type) | **GET** /container-security/aggregates/detections/count-by-type/v1 | Aggregate counts of detections by detection type | -| [**search_detections**](ContainerDetections.md#search_detections) | **GET** /container-security/queries/detections/v1 | Retrieve image assessment detection entities identified by the provided filter criteria | +| [**search_detections**](ContainerDetections.md#search_detections) | **GET** /container-security/queries/detections/v1 | Maximum offset = 10000 - limit | ## read_combined_detections > read_combined_detections(opts) -Retrieve image assessment detections identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -33,14 +33,14 @@ end api_instance = Falcon::ContainerDetections.new opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + filter: 'filter_example', # String | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + sort: 'sort_example', # String | The fields to sort the records on. Supported columns: - `containers_impacted` - `detection_name` - `detection_severity` - `detection_type` - `images_impacted` - `last_detected` limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. Supported columns: [containers_impacted detection_name detection_severity detection_type images_impacted last_detected] + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve image assessment detections identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_combined_detections(opts) p result rescue Falcon::ApiError => e @@ -56,7 +56,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve image assessment detections identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_combined_detections_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -70,10 +70,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` | [optional] | +| **sort** | **String** | The fields to sort the records on. Supported columns: - `containers_impacted` - `detection_name` - `detection_severity` - `detection_type` - `images_impacted` - `last_detected` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The fields to sort the records on. Supported columns: [containers_impacted detection_name detection_severity detection_type images_impacted last_detected] | [optional] | ### Return type @@ -93,7 +93,7 @@ end > read_detections(opts) -Retrieve image assessment detection entities identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -110,13 +110,13 @@ end api_instance = Falcon::ContainerDetections.new opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,detection_type,image_registry,image_repository,image_tag + filter: 'filter_example', # String | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_detections(opts) p result rescue Falcon::ApiError => e @@ -132,7 +132,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_detections_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -146,8 +146,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,detection_type,image_registry,image_repository,image_tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -185,7 +185,7 @@ end api_instance = Falcon::ContainerDetections.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + filter: 'filter_example' # String | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` } begin @@ -219,7 +219,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity | [optional] | +| **filter** | **String** | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` | [optional] | ### Return type @@ -256,7 +256,7 @@ end api_instance = Falcon::ContainerDetections.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + filter: 'filter_example' # String | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` } begin @@ -290,7 +290,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity | [optional] | +| **filter** | **String** | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` | [optional] | ### Return type @@ -327,7 +327,7 @@ end api_instance = Falcon::ContainerDetections.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + filter: 'filter_example' # String | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` } begin @@ -361,7 +361,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity | [optional] | +| **filter** | **String** | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` | [optional] | ### Return type @@ -381,7 +381,7 @@ end > search_detections(opts) -Retrieve image assessment detection entities identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -398,13 +398,13 @@ end api_instance = Falcon::ContainerDetections.new opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + filter: 'filter_example', # String | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.search_detections(opts) p result rescue Falcon::ApiError => e @@ -420,7 +420,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.search_detections_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -434,8 +434,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type diff --git a/docs/ContainerImages.md b/docs/ContainerImages.md index 06da8ac8..63cecfbb 100644 --- a/docs/ContainerImages.md +++ b/docs/ContainerImages.md @@ -8,15 +8,15 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**aggregate_image_count**](ContainerImages.md#aggregate_image_count) | **GET** /container-security/aggregates/images/count/v1 | Aggregate count of images | | [**aggregate_image_count_by_base_os**](ContainerImages.md#aggregate_image_count_by_base_os) | **GET** /container-security/aggregates/images/count-by-os-distribution/v1 | Aggregate count of images grouped by Base OS distribution | | [**aggregate_image_count_by_state**](ContainerImages.md#aggregate_image_count_by_state) | **GET** /container-security/aggregates/images/count-by-state/v1 | Aggregate count of images grouped by state | -| [**combined_base_images**](ContainerImages.md#combined_base_images) | **GET** /container-security/combined/base-images/v1 | Retrieve base images for provided filter | +| [**combined_base_images**](ContainerImages.md#combined_base_images) | **GET** /container-security/combined/base-images/v1 | Retrieves a list of base images for the provided filter. Maximum page size: 100 | | [**combined_image_by_vulnerability_count**](ContainerImages.md#combined_image_by_vulnerability_count) | **GET** /container-security/combined/images/by-vulnerability-count/v1 | Retrieve top x images with the most vulnerabilities | -| [**combined_image_detail**](ContainerImages.md#combined_image_detail) | **GET** /container-security/combined/images/detail/v1 | Retrieve image entities identified by the provided filter criteria | +| [**combined_image_detail**](ContainerImages.md#combined_image_detail) | **GET** /container-security/combined/images/detail/v1 | Maximum offset = 10000 - limit | | [**combined_image_issues_summary**](ContainerImages.md#combined_image_issues_summary) | **GET** /container-security/combined/images/issues-summary/v1 | Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities | | [**combined_image_vulnerability_summary**](ContainerImages.md#combined_image_vulnerability_summary) | **GET** /container-security/combined/images/vulnerabilities-summary/v1 | aggregates information about vulnerabilities for an image | | [**create_base_images_entities**](ContainerImages.md#create_base_images_entities) | **POST** /container-security/entities/base-images/v1 | Creates base images using the provided details | | [**delete_base_images**](ContainerImages.md#delete_base_images) | **DELETE** /container-security/entities/base-images/v1 | Delete base images by base image uuid | -| [**get_combined_images**](ContainerImages.md#get_combined_images) | **GET** /container-security/combined/image-assessment/images/v1 | Get image assessment results by providing an FQL filter and paging details | -| [**read_combined_images_export**](ContainerImages.md#read_combined_images_export) | **GET** /container-security/combined/images/export/v1 | Retrieve images with an option to expand aggregated vulnerabilities/detections | +| [**get_combined_images**](ContainerImages.md#get_combined_images) | **GET** /container-security/combined/image-assessment/images/v1 | Maximum offset = 10000 - limit | +| [**read_combined_images_export**](ContainerImages.md#read_combined_images_export) | **GET** /container-security/combined/images/export/v1 | Maximum offset = 10000 - limit | ## aggregate_image_assessment_history @@ -40,7 +40,7 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example' # String | Filter using a query in Falcon Query Language (FQL). Supported filters: cid,registry,repository + filter: 'filter_example' # String | Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `registry` - `repository` } begin @@ -74,7 +74,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter using a query in Falcon Query Language (FQL). Supported filters: cid,registry,repository | [optional] | +| **filter** | **String** | Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `registry` - `repository` | [optional] | ### Return type @@ -111,7 +111,7 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity + filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` } begin @@ -145,7 +145,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity | [optional] | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` | [optional] | ### Return type @@ -182,7 +182,7 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` } begin @@ -216,7 +216,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag | [optional] | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` | [optional] | ### Return type @@ -253,7 +253,7 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen,registry,repository + filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` } begin @@ -287,7 +287,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen,registry,repository | [optional] | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` | [optional] | ### Return type @@ -307,7 +307,7 @@ end > combined_base_images(opts) -Retrieve base images for provided filter +Retrieves a list of base images for the provided filter. Maximum page size: 100 ### Examples @@ -324,11 +324,11 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example' # String | Search base images using a query in Falcon Query Language (FQL). Supported filters: image_digest,image_id,registry,repository,tag + filter: 'filter_example' # String | Search base images using a query in Falcon Query Language (FQL). Supported filter fields: - `image_digest` - `image_id` - `registry` - `repository` - `tag` } begin - # Retrieve base images for provided filter + # Retrieves a list of base images for the provided filter. Maximum page size: 100 result = api_instance.combined_base_images(opts) p result rescue Falcon::ApiError => e @@ -344,7 +344,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve base images for provided filter + # Retrieves a list of base images for the provided filter. Maximum page size: 100 data, status_code, headers = api_instance.combined_base_images_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -358,7 +358,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search base images using a query in Falcon Query Language (FQL). Supported filters: image_digest,image_id,registry,repository,tag | [optional] | +| **filter** | **String** | Search base images using a query in Falcon Query Language (FQL). Supported filter fields: - `image_digest` - `image_id` - `registry` - `repository` - `tag` | [optional] | ### Return type @@ -395,9 +395,9 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56 # Integer | This is not used in the backend but is added here for compatibility purposes as some clients expects this i.e UI widgets. + offset: 56 # Integer | The fields to sort the records on. **Not supported.** } begin @@ -431,9 +431,9 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag | [optional] | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` | [optional] | | **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | -| **offset** | **Integer** | This is not used in the backend but is added here for compatibility purposes as some clients expects this i.e UI widgets. | [optional] | +| **offset** | **Integer** | The fields to sort the records on. **Not supported.** | [optional] | ### Return type @@ -453,7 +453,7 @@ end > combined_image_detail(opts) -Retrieve image entities identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -470,15 +470,15 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: registry,repository,tag + filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` with_config: true, # Boolean | (true/false) include image config, default is false + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve image entities identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.combined_image_detail(opts) p result rescue Falcon::ApiError => e @@ -494,7 +494,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve image entities identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.combined_image_detail_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -508,11 +508,11 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: registry,repository,tag | [optional] | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` | [optional] | | **with_config** | **Boolean** | (true/false) include image config, default is false | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | -| **offset** | **Integer** | The offset from where to begin. | [optional] | | **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -548,12 +548,12 @@ Falcon.configure do |config| end api_instance = Falcon::ContainerImages.new -cid = 'cid_example' # String | CID -registry = 'registry_example' # String | registry name -repository = 'repository_example' # String | repository name -tag = 'tag_example' # String | tag name +cid = 'cid_example' # String | CS Customer ID +registry = 'registry_example' # String | Registry +repository = 'repository_example' # String | Repository name +tag = 'tag_example' # String | Tag name opts = { - include_base_image_vuln: true # Boolean | include base image vulnerabilities + include_base_image_vuln: true # Boolean | Include base image vulnerabilities. } begin @@ -587,11 +587,11 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **cid** | **String** | CID | | -| **registry** | **String** | registry name | | -| **repository** | **String** | repository name | | -| **tag** | **String** | tag name | | -| **include_base_image_vuln** | **Boolean** | include base image vulnerabilities | [optional] | +| **cid** | **String** | CS Customer ID | | +| **registry** | **String** | Registry | | +| **repository** | **String** | Repository name | | +| **tag** | **String** | Tag name | | +| **include_base_image_vuln** | **Boolean** | Include base image vulnerabilities. | [optional][default to false] | ### Return type @@ -627,12 +627,12 @@ Falcon.configure do |config| end api_instance = Falcon::ContainerImages.new -cid = 'cid_example' # String | CID -registry = 'registry_example' # String | registry name -repository = 'repository_example' # String | repository name -tag = 'tag_example' # String | tag name +cid = 'cid_example' # String | CS Customer ID +registry = 'registry_example' # String | Registry +repository = 'repository_example' # String | Repository name +tag = 'tag_example' # String | Tag name opts = { - include_base_image_vuln: true # Boolean | include base image vulnerabilities + include_base_image_vuln: true # Boolean | Include base image vulnerabilities. } begin @@ -666,11 +666,11 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **cid** | **String** | CID | | -| **registry** | **String** | registry name | | -| **repository** | **String** | repository name | | -| **tag** | **String** | tag name | | -| **include_base_image_vuln** | **Boolean** | include base image vulnerabilities | [optional] | +| **cid** | **String** | CS Customer ID | | +| **registry** | **String** | Registry | | +| **repository** | **String** | Repository name | | +| **tag** | **String** | Tag name | | +| **include_base_image_vuln** | **Boolean** | Include base image vulnerabilities. | [optional][default to false] | ### Return type @@ -828,7 +828,7 @@ end > get_combined_images(opts) -Get image assessment results by providing an FQL filter and paging details +Maximum offset = 10000 - limit ### Examples @@ -845,14 +845,14 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: container_id, container_running_status, cve_id, detection_name, detection_severity, first_seen, image_digest, image_id, registry, repository, tag, vulnerability_severity - limit: 56, # Integer | The upper-bound on the number of records to retrieve [1-100] - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. Supported columns: [first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id registry repository source tag] + filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `container_id` - `container_running_status` - `cve_id` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `registry` - `repository` - `tag` - `vulnerability_severity` + sort: 'sort_example', # String | The fields to sort the records on. Supported columns: - `first_seen` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `registry` - `repository` - `source` - `tag` + limit: 56, # Integer | The upper-bound on the number of records to retrieve. + offset: 56 # Integer | The offset from where to begin. } begin - # Get image assessment results by providing an FQL filter and paging details + # Maximum offset = 10000 - limit result = api_instance.get_combined_images(opts) p result rescue Falcon::ApiError => e @@ -868,7 +868,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Get image assessment results by providing an FQL filter and paging details + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.get_combined_images_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -882,10 +882,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: container_id, container_running_status, cve_id, detection_name, detection_severity, first_seen, image_digest, image_id, registry, repository, tag, vulnerability_severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve [1-100] | [optional] | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `container_id` - `container_running_status` - `cve_id` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `registry` - `repository` - `tag` - `vulnerability_severity` | [optional] | +| **sort** | **String** | The fields to sort the records on. Supported columns: - `first_seen` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `registry` - `repository` - `source` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The fields to sort the records on. Supported columns: [first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id registry repository source tag] | [optional] | ### Return type @@ -905,7 +905,7 @@ end > read_combined_images_export(opts) -Retrieve images with an option to expand aggregated vulnerabilities/detections +Maximum offset = 10000 - limit ### Examples @@ -922,16 +922,16 @@ end api_instance = Falcon::ContainerImages.new opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity - expand_vulnerabilities: true, # Boolean | expand vulnerabilities - expand_detections: true, # Boolean | expand detections + filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` + expand_vulnerabilities: true, # Boolean | Expand vulnerabilities details + expand_detections: true, # Boolean | Expand detections details limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. Supported columns: [base_os cid detections firstScanned first_seen highest_cps_current_rating highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository source tag vulnerabilities] + sort: 'sort_example' # String | The fields to sort the records on. Supported columns: - `base_os` - `cid` - `detections` - `firstScanned` - `first_seen` - `highest_cps_current_rating` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `last_seen` - `layers_with_vulnerabilities` - `packages` - `registry` - `repository` - `source` - `tag` - `vulnerabilities` } begin - # Retrieve images with an option to expand aggregated vulnerabilities/detections + # Maximum offset = 10000 - limit result = api_instance.read_combined_images_export(opts) p result rescue Falcon::ApiError => e @@ -947,7 +947,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve images with an option to expand aggregated vulnerabilities/detections + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_combined_images_export_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -961,12 +961,12 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity | [optional] | -| **expand_vulnerabilities** | **Boolean** | expand vulnerabilities | [optional] | -| **expand_detections** | **Boolean** | expand detections | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` | [optional] | +| **expand_vulnerabilities** | **Boolean** | Expand vulnerabilities details | [optional][default to false] | +| **expand_detections** | **Boolean** | Expand detections details | [optional][default to false] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The fields to sort the records on. Supported columns: [base_os cid detections firstScanned first_seen highest_cps_current_rating highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository source tag vulnerabilities] | [optional] | +| **sort** | **String** | The fields to sort the records on. Supported columns: - `base_os` - `cid` - `detections` - `firstScanned` - `first_seen` - `highest_cps_current_rating` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `last_seen` - `layers_with_vulnerabilities` - `packages` - `registry` - `repository` - `source` - `tag` - `vulnerabilities` | [optional] | ### Return type diff --git a/docs/ContainerPackages.md b/docs/ContainerPackages.md index ce94f968..b41117a8 100644 --- a/docs/ContainerPackages.md +++ b/docs/ContainerPackages.md @@ -4,10 +4,11 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**read_packages_by_fixable_vuln_count**](ContainerPackages.md#read_packages_by_fixable_vuln_count) | **GET** /container-security/combined/packages/app-by-fixable-vulnerability-count/v1 | Retrieve top x app packages with the most fixable vulnerabilities | -| [**read_packages_by_vuln_count**](ContainerPackages.md#read_packages_by_vuln_count) | **GET** /container-security/combined/packages/by-vulnerability-count/v1 | Retrieve top x packages with the most vulnerabilities | -| [**read_packages_combined**](ContainerPackages.md#read_packages_combined) | **GET** /container-security/combined/packages/v1 | Retrieve packages identified by the provided filter criteria | -| [**read_packages_combined_export**](ContainerPackages.md#read_packages_combined_export) | **GET** /container-security/combined/packages/export/v1 | Retrieve packages identified by the provided filter criteria for the purpose of export | +| [**read_packages_by_fixable_vuln_count**](ContainerPackages.md#read_packages_by_fixable_vuln_count) | **GET** /container-security/combined/packages/app-by-fixable-vulnerability-count/v1 | Maximum offset = 10000 - limit | +| [**read_packages_by_vuln_count**](ContainerPackages.md#read_packages_by_vuln_count) | **GET** /container-security/combined/packages/by-vulnerability-count/v1 | Maximum offset = 10000 - limit | +| [**read_packages_combined**](ContainerPackages.md#read_packages_combined) | **GET** /container-security/combined/packages/v1 | Maximum offset = 10000 - limit | +| [**read_packages_combined_export**](ContainerPackages.md#read_packages_combined_export) | **GET** /container-security/combined/packages/export/v1 | Maximum offset = 10000 - limit | +| [**read_packages_combined_v2**](ContainerPackages.md#read_packages_combined_v2) | **GET** /container-security/combined/packages/v2 | Maximum offset = 10000 - limit | | [**read_packages_count_by_zero_day**](ContainerPackages.md#read_packages_count_by_zero_day) | **GET** /container-security/aggregates/packages/count-by-zero-day/v1 | Retrieve packages count affected by zero day vulnerabilities | @@ -15,7 +16,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* > read_packages_by_fixable_vuln_count(opts) -Retrieve top x app packages with the most fixable vulnerabilities +Maximum offset = 10000 - limit ### Examples @@ -32,13 +33,13 @@ end api_instance = Falcon::ContainerPackages.new opts = { - filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count + filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve top x app packages with the most fixable vulnerabilities + # Maximum offset = 10000 - limit result = api_instance.read_packages_by_fixable_vuln_count(opts) p result rescue Falcon::ApiError => e @@ -54,7 +55,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve top x app packages with the most fixable vulnerabilities + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_packages_by_fixable_vuln_count_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -68,8 +69,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -90,7 +91,7 @@ end > read_packages_by_vuln_count(opts) -Retrieve top x packages with the most vulnerabilities +Maximum offset = 10000 - limit ### Examples @@ -107,13 +108,13 @@ end api_instance = Falcon::ContainerPackages.new opts = { - filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count + filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve top x packages with the most vulnerabilities + # Maximum offset = 10000 - limit result = api_instance.read_packages_by_vuln_count(opts) p result rescue Falcon::ApiError => e @@ -129,7 +130,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve top x packages with the most vulnerabilities + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_packages_by_vuln_count_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -143,8 +144,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -165,7 +166,7 @@ end > read_packages_combined(opts) -Retrieve packages identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -182,15 +183,15 @@ end api_instance = Falcon::ContainerPackages.new opts = { - filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - only_zero_day_affected: true, # Boolean | (true/false) load zero day affected packages, default is false + filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + only_zero_day_affected: true, # Boolean | (true/false) load zero day affected packages + sort: 'sort_example', # String | The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. Supported columns: [license package_name_version type] + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve packages identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_packages_combined(opts) p result rescue Falcon::ApiError => e @@ -206,7 +207,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve packages identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_packages_combined_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -220,11 +221,11 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count | [optional] | -| **only_zero_day_affected** | **Boolean** | (true/false) load zero day affected packages, default is false | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` | [optional] | +| **only_zero_day_affected** | **Boolean** | (true/false) load zero day affected packages | [optional][default to false] | +| **sort** | **String** | The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The fields to sort the records on. Supported columns: [license package_name_version type] | [optional] | ### Return type @@ -244,7 +245,7 @@ end > read_packages_combined_export(opts) -Retrieve packages identified by the provided filter criteria for the purpose of export +Maximum offset = 10000 - limit ### Examples @@ -261,15 +262,15 @@ end api_instance = Falcon::ContainerPackages.new opts = { - filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - only_zero_day_affected: true, # Boolean | (true/false) load zero day affected packages, default is false + filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + only_zero_day_affected: true, # Boolean | (true/false) load zero day affected packages + sort: 'sort_example', # String | The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. Supported columns: [license package_name_version type] + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve packages identified by the provided filter criteria for the purpose of export + # Maximum offset = 10000 - limit result = api_instance.read_packages_combined_export(opts) p result rescue Falcon::ApiError => e @@ -285,7 +286,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve packages identified by the provided filter criteria for the purpose of export + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_packages_combined_export_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -299,11 +300,11 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count | [optional] | -| **only_zero_day_affected** | **Boolean** | (true/false) load zero day affected packages, default is false | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` | [optional] | +| **only_zero_day_affected** | **Boolean** | (true/false) load zero day affected packages | [optional][default to false] | +| **sort** | **String** | The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The fields to sort the records on. Supported columns: [license package_name_version type] | [optional] | ### Return type @@ -319,6 +320,85 @@ end - **Accept**: application/json +## read_packages_combined_v2 + +> read_packages_combined_v2(opts) + +Maximum offset = 10000 - limit + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContainerPackages.new +opts = { + filter: 'filter_example', # String | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + only_zero_day_affected: true, # Boolean | (true/false) load zero day affected packages + sort: 'sort_example', # String | The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + limit: 56, # Integer | The upper-bound on the number of records to retrieve. + offset: 56 # Integer | The offset from where to begin. +} + +begin + # Maximum offset = 10000 - limit + result = api_instance.read_packages_combined_v2(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackages->read_packages_combined_v2: #{e}" +end +``` + +#### Using the read_packages_combined_v2_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_packages_combined_v2_with_http_info(opts) + +```ruby +begin + # Maximum offset = 10000 - limit + data, status_code, headers = api_instance.read_packages_combined_v2_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackages->read_packages_combined_v2_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` | [optional] | +| **only_zero_day_affected** | **Boolean** | (true/false) load zero day affected packages | [optional][default to false] | +| **sort** | **String** | The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**PackagesApiCombinedPackageV2**](PackagesApiCombinedPackageV2.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## read_packages_count_by_zero_day > read_packages_count_by_zero_day(opts) @@ -340,7 +420,7 @@ end api_instance = Falcon::ContainerPackages.new opts = { - filter: 'filter_example' # String | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid + filter: 'filter_example' # String | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` } begin @@ -374,7 +454,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid | [optional] | +| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` | [optional] | ### Return type diff --git a/docs/ContainerVulnerabilities.md b/docs/ContainerVulnerabilities.md index 00383257..518c2933 100644 --- a/docs/ContainerVulnerabilities.md +++ b/docs/ContainerVulnerabilities.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**read_combined_vulnerabilities**](ContainerVulnerabilities.md#read_combined_vulnerabilities) | **GET** /container-security/combined/vulnerabilities/v1 | Retrieve vulnerability and aggregate data filtered by the provided FQL | -| [**read_combined_vulnerabilities_details**](ContainerVulnerabilities.md#read_combined_vulnerabilities_details) | **GET** /container-security/combined/vulnerabilities/details/v1 | Retrieve vulnerability details related to an image | -| [**read_combined_vulnerabilities_info**](ContainerVulnerabilities.md#read_combined_vulnerabilities_info) | **GET** /container-security/combined/vulnerabilities/info/v1 | Retrieve vulnerability and package related info for this customer | -| [**read_vulnerabilities_by_image_count**](ContainerVulnerabilities.md#read_vulnerabilities_by_image_count) | **GET** /container-security/combined/vulnerabilities/by-image-count/v1 | Retrieve top x vulnerabilities with the most impacted images | -| [**read_vulnerabilities_publication_date**](ContainerVulnerabilities.md#read_vulnerabilities_publication_date) | **GET** /container-security/combined/vulnerabilities/by-published-date/v1 | Retrieve top x vulnerabilities with the most recent publication date | -| [**read_vulnerability_count**](ContainerVulnerabilities.md#read_vulnerability_count) | **GET** /container-security/aggregates/vulnerabilities/count/v1 | Aggregate count of vulnerabilities | -| [**read_vulnerability_count_by_actively_exploited**](ContainerVulnerabilities.md#read_vulnerability_count_by_actively_exploited) | **GET** /container-security/aggregates/vulnerabilities/count-by-actively-exploited/v1 | Aggregate count of vulnerabilities grouped by actively exploited | -| [**read_vulnerability_count_by_cps_rating**](ContainerVulnerabilities.md#read_vulnerability_count_by_cps_rating) | **GET** /container-security/aggregates/vulnerabilities/count-by-cps-rating/v1 | Aggregate count of vulnerabilities grouped by csp_rating | -| [**read_vulnerability_count_by_cvss_score**](ContainerVulnerabilities.md#read_vulnerability_count_by_cvss_score) | **GET** /container-security/aggregates/vulnerabilities/count-by-cvss-score/v1 | Aggregate count of vulnerabilities grouped by cvss score | -| [**read_vulnerability_count_by_severity**](ContainerVulnerabilities.md#read_vulnerability_count_by_severity) | **GET** /container-security/aggregates/vulnerabilities/count-by-severity/v1 | Aggregate count of vulnerabilities grouped by severity | +| [**read_combined_vulnerabilities**](ContainerVulnerabilities.md#read_combined_vulnerabilities) | **GET** /container-security/combined/vulnerabilities/v1 | Maximum offset = 10000 - limit | +| [**read_combined_vulnerabilities_details**](ContainerVulnerabilities.md#read_combined_vulnerabilities_details) | **GET** /container-security/combined/vulnerabilities/details/v1 | Maximum offset = 10000 - limit | +| [**read_combined_vulnerabilities_info**](ContainerVulnerabilities.md#read_combined_vulnerabilities_info) | **GET** /container-security/combined/vulnerabilities/info/v1 | Maximum offset = 10000 - limit | +| [**read_vulnerabilities_by_image_count**](ContainerVulnerabilities.md#read_vulnerabilities_by_image_count) | **GET** /container-security/combined/vulnerabilities/by-image-count/v1 | Maximum offset = 10000 - limit | +| [**read_vulnerabilities_publication_date**](ContainerVulnerabilities.md#read_vulnerabilities_publication_date) | **GET** /container-security/combined/vulnerabilities/by-published-date/v1 | Maximum offset = 10000 - limit | +| [**read_vulnerability_count**](ContainerVulnerabilities.md#read_vulnerability_count) | **GET** /container-security/aggregates/vulnerabilities/count/v1 | Maximum offset = 10000 - limit | +| [**read_vulnerability_count_by_actively_exploited**](ContainerVulnerabilities.md#read_vulnerability_count_by_actively_exploited) | **GET** /container-security/aggregates/vulnerabilities/count-by-actively-exploited/v1 | Maximum offset = 10000 - limit | +| [**read_vulnerability_count_by_cps_rating**](ContainerVulnerabilities.md#read_vulnerability_count_by_cps_rating) | **GET** /container-security/aggregates/vulnerabilities/count-by-cps-rating/v1 | Maximum offset = 10000 - limit | +| [**read_vulnerability_count_by_cvss_score**](ContainerVulnerabilities.md#read_vulnerability_count_by_cvss_score) | **GET** /container-security/aggregates/vulnerabilities/count-by-cvss-score/v1 | Maximum offset = 10000 - limit | +| [**read_vulnerability_count_by_severity**](ContainerVulnerabilities.md#read_vulnerability_count_by_severity) | **GET** /container-security/aggregates/vulnerabilities/count-by-severity/v1 | Maximum offset = 10000 - limit | ## read_combined_vulnerabilities > read_combined_vulnerabilities(opts) -Retrieve vulnerability and aggregate data filtered by the provided FQL +Maximum offset = 10000 - limit ### Examples @@ -37,14 +37,14 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. Supported columns: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity] + sort: 'sort_example' # String | The fields to sort the records on. Supported columns: - `cps_current_rating` - `cve_id` - `cvss_score` - `description` - `images_impacted` - `packages_impacted` - `severity` } begin - # Retrieve vulnerability and aggregate data filtered by the provided FQL + # Maximum offset = 10000 - limit result = api_instance.read_combined_vulnerabilities(opts) p result rescue Falcon::ApiError => e @@ -60,7 +60,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve vulnerability and aggregate data filtered by the provided FQL + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_combined_vulnerabilities_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -74,10 +74,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The fields to sort the records on. Supported columns: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity] | [optional] | +| **sort** | **String** | The fields to sort the records on. Supported columns: - `cps_current_rating` - `cve_id` - `cvss_score` - `description` - `images_impacted` - `packages_impacted` - `severity` | [optional] | ### Return type @@ -97,7 +97,7 @@ end > read_combined_vulnerabilities_details(id, opts) -Retrieve vulnerability details related to an image +Maximum offset = 10000 - limit ### Examples @@ -115,13 +115,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new id = 'id_example' # String | Image UUID opts = { - filter: 'filter_example', # String | Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filters: cid,cps_rating,cve_id,cvss_score,exploited_status,exploited_status_name,include_base_image_vuln,is_zero_day,remediation_available,severity + filter: 'filter_example', # String | Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filter fields: - `cid` - `cps_rating` - `cve_id` - `cvss_score` - `exploited_status_name` - `exploited_status` - `include_base_image_vuln` - `is_zero_day` - `remediation_available` - `severity` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve vulnerability details related to an image + # Maximum offset = 10000 - limit result = api_instance.read_combined_vulnerabilities_details(id, opts) p result rescue Falcon::ApiError => e @@ -137,7 +137,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve vulnerability details related to an image + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_combined_vulnerabilities_details_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } @@ -152,8 +152,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **String** | Image UUID | | -| **filter** | **String** | Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filters: cid,cps_rating,cve_id,cvss_score,exploited_status,exploited_status_name,include_base_image_vuln,is_zero_day,remediation_available,severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filter fields: - `cid` - `cps_rating` - `cve_id` - `cvss_score` - `exploited_status_name` - `exploited_status` - `include_base_image_vuln` - `is_zero_day` - `remediation_available` - `severity` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -174,7 +174,7 @@ end > read_combined_vulnerabilities_info(cve_id, opts) -Retrieve vulnerability and package related info for this customer +Maximum offset = 10000 - limit ### Examples @@ -197,7 +197,7 @@ opts = { } begin - # Retrieve vulnerability and package related info for this customer + # Maximum offset = 10000 - limit result = api_instance.read_combined_vulnerabilities_info(cve_id, opts) p result rescue Falcon::ApiError => e @@ -213,7 +213,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve vulnerability and package related info for this customer + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_combined_vulnerabilities_info_with_http_info(cve_id, opts) p status_code # => 2xx p headers # => { ... } @@ -228,7 +228,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **cve_id** | **String** | Vulnerability CVE ID | | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -249,7 +249,7 @@ end > read_vulnerabilities_by_image_count(opts) -Retrieve top x vulnerabilities with the most impacted images +Maximum offset = 10000 - limit ### Examples @@ -266,13 +266,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve top x vulnerabilities with the most impacted images + # Maximum offset = 10000 - limit result = api_instance.read_vulnerabilities_by_image_count(opts) p result rescue Falcon::ApiError => e @@ -288,7 +288,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve top x vulnerabilities with the most impacted images + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_vulnerabilities_by_image_count_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -302,8 +302,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -324,7 +324,7 @@ end > read_vulnerabilities_publication_date(opts) -Retrieve top x vulnerabilities with the most recent publication date +Maximum offset = 10000 - limit ### Examples @@ -341,13 +341,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve top x vulnerabilities with the most recent publication date + # Maximum offset = 10000 - limit result = api_instance.read_vulnerabilities_publication_date(opts) p result rescue Falcon::ApiError => e @@ -363,7 +363,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve top x vulnerabilities with the most recent publication date + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_vulnerabilities_publication_date_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -377,8 +377,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -399,7 +399,7 @@ end > read_vulnerability_count(opts) -Aggregate count of vulnerabilities +Maximum offset = 10000 - limit ### Examples @@ -416,13 +416,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Aggregate count of vulnerabilities + # Maximum offset = 10000 - limit result = api_instance.read_vulnerability_count(opts) p result rescue Falcon::ApiError => e @@ -438,7 +438,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Aggregate count of vulnerabilities + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_vulnerability_count_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -452,8 +452,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -474,7 +474,7 @@ end > read_vulnerability_count_by_actively_exploited(opts) -Aggregate count of vulnerabilities grouped by actively exploited +Maximum offset = 10000 - limit ### Examples @@ -491,13 +491,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Aggregate count of vulnerabilities grouped by actively exploited + # Maximum offset = 10000 - limit result = api_instance.read_vulnerability_count_by_actively_exploited(opts) p result rescue Falcon::ApiError => e @@ -513,7 +513,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Aggregate count of vulnerabilities grouped by actively exploited + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_vulnerability_count_by_actively_exploited_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -527,8 +527,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -549,7 +549,7 @@ end > read_vulnerability_count_by_cps_rating(opts) -Aggregate count of vulnerabilities grouped by csp_rating +Maximum offset = 10000 - limit ### Examples @@ -566,13 +566,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Aggregate count of vulnerabilities grouped by csp_rating + # Maximum offset = 10000 - limit result = api_instance.read_vulnerability_count_by_cps_rating(opts) p result rescue Falcon::ApiError => e @@ -588,7 +588,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Aggregate count of vulnerabilities grouped by csp_rating + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_vulnerability_count_by_cps_rating_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -602,8 +602,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -624,7 +624,7 @@ end > read_vulnerability_count_by_cvss_score(opts) -Aggregate count of vulnerabilities grouped by cvss score +Maximum offset = 10000 - limit ### Examples @@ -641,13 +641,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Aggregate count of vulnerabilities grouped by cvss score + # Maximum offset = 10000 - limit result = api_instance.read_vulnerability_count_by_cvss_score(opts) p result rescue Falcon::ApiError => e @@ -663,7 +663,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Aggregate count of vulnerabilities grouped by cvss score + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_vulnerability_count_by_cvss_score_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -677,8 +677,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -699,7 +699,7 @@ end > read_vulnerability_count_by_severity(opts) -Aggregate count of vulnerabilities grouped by severity +Maximum offset = 10000 - limit ### Examples @@ -716,13 +716,13 @@ end api_instance = Falcon::ContainerVulnerabilities.new opts = { - filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56 # Integer | The offset from where to begin. } begin - # Aggregate count of vulnerabilities grouped by severity + # Maximum offset = 10000 - limit result = api_instance.read_vulnerability_count_by_severity(opts) p result rescue Falcon::ApiError => e @@ -738,7 +738,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Aggregate count of vulnerabilities grouped by severity + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_vulnerability_count_by_severity_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -752,8 +752,8 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type diff --git a/docs/ContentUpdateCreatePoliciesReqV1.md b/docs/ContentUpdateCreatePoliciesReqV1.md new file mode 100644 index 00000000..f9b78453 --- /dev/null +++ b/docs/ContentUpdateCreatePoliciesReqV1.md @@ -0,0 +1,18 @@ +# Falcon::ContentUpdateCreatePoliciesReqV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ContentUpdateCreatePolicyReqV1>**](ContentUpdateCreatePolicyReqV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ContentUpdateCreatePoliciesReqV1.new( + resources: null +) +``` + diff --git a/docs/ContentUpdateCreatePolicyReqV1.md b/docs/ContentUpdateCreatePolicyReqV1.md new file mode 100644 index 00000000..5d247125 --- /dev/null +++ b/docs/ContentUpdateCreatePolicyReqV1.md @@ -0,0 +1,22 @@ +# Falcon::ContentUpdateCreatePolicyReqV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | The description to use when creating the policy | [optional] | +| **name** | **String** | The name to use when creating the policy | | +| **settings** | [**ContentUpdateSettingsV1**](ContentUpdateSettingsV1.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ContentUpdateCreatePolicyReqV1.new( + description: null, + name: null, + settings: null +) +``` + diff --git a/docs/ContentUpdatePolicies.md b/docs/ContentUpdatePolicies.md new file mode 100644 index 00000000..bdb78f79 --- /dev/null +++ b/docs/ContentUpdatePolicies.md @@ -0,0 +1,745 @@ +# Falcon::ContentUpdatePolicies + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_content_update_policies**](ContentUpdatePolicies.md#create_content_update_policies) | **POST** /policy/entities/content-update/v1 | Create Content Update Policies by specifying details about the policy to create | +| [**delete_content_update_policies**](ContentUpdatePolicies.md#delete_content_update_policies) | **DELETE** /policy/entities/content-update/v1 | Delete a set of Content Update Policies by specifying their IDs | +| [**get_content_update_policies**](ContentUpdatePolicies.md#get_content_update_policies) | **GET** /policy/entities/content-update/v1 | Retrieve a set of Content Update Policies by specifying their IDs | +| [**perform_content_update_policies_action**](ContentUpdatePolicies.md#perform_content_update_policies_action) | **POST** /policy/entities/content-update-actions/v1 | Perform the specified action on the Content Update Policies specified in the request | +| [**query_combined_content_update_policies**](ContentUpdatePolicies.md#query_combined_content_update_policies) | **GET** /policy/combined/content-update/v1 | Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria | +| [**query_combined_content_update_policy_members**](ContentUpdatePolicies.md#query_combined_content_update_policy_members) | **GET** /policy/combined/content-update-members/v1 | Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria | +| [**query_content_update_policies**](ContentUpdatePolicies.md#query_content_update_policies) | **GET** /policy/queries/content-update/v1 | Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria | +| [**query_content_update_policy_members**](ContentUpdatePolicies.md#query_content_update_policy_members) | **GET** /policy/queries/content-update-members/v1 | Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria | +| [**set_content_update_policies_precedence**](ContentUpdatePolicies.md#set_content_update_policies_precedence) | **POST** /policy/entities/content-update-precedence/v1 | Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence | +| [**update_content_update_policies**](ContentUpdatePolicies.md#update_content_update_policies) | **PATCH** /policy/entities/content-update/v1 | Update Content Update Policies by specifying the ID of the policy and details to update | + + +## create_content_update_policies + +> create_content_update_policies(body) + +Create Content Update Policies by specifying details about the policy to create + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +body = Falcon::ContentUpdateCreatePoliciesReqV1.new({resources: [Falcon::ContentUpdateCreatePolicyReqV1.new({name: 'name_example'})]}) # ContentUpdateCreatePoliciesReqV1 | + +begin + # Create Content Update Policies by specifying details about the policy to create + result = api_instance.create_content_update_policies(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->create_content_update_policies: #{e}" +end +``` + +#### Using the create_content_update_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_content_update_policies_with_http_info(body) + +```ruby +begin + # Create Content Update Policies by specifying details about the policy to create + data, status_code, headers = api_instance.create_content_update_policies_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->create_content_update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ContentUpdateCreatePoliciesReqV1**](ContentUpdateCreatePoliciesReqV1.md) | | | + +### Return type + +[**DomainContentUpdatePolicyRespV1**](DomainContentUpdatePolicyRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_content_update_policies + +> delete_content_update_policies(ids) + +Delete a set of Content Update Policies by specifying their IDs + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +ids = ['inner_example'] # Array | The IDs of the Content Update Policies to delete + +begin + # Delete a set of Content Update Policies by specifying their IDs + result = api_instance.delete_content_update_policies(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->delete_content_update_policies: #{e}" +end +``` + +#### Using the delete_content_update_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_content_update_policies_with_http_info(ids) + +```ruby +begin + # Delete a set of Content Update Policies by specifying their IDs + data, status_code, headers = api_instance.delete_content_update_policies_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->delete_content_update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | The IDs of the Content Update Policies to delete | | + +### Return type + +[**MsaQueryResponse**](MsaQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_content_update_policies + +> get_content_update_policies(ids) + +Retrieve a set of Content Update Policies by specifying their IDs + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +ids = ['inner_example'] # Array | The IDs of the Content Update Policies to return + +begin + # Retrieve a set of Content Update Policies by specifying their IDs + result = api_instance.get_content_update_policies(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->get_content_update_policies: #{e}" +end +``` + +#### Using the get_content_update_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_content_update_policies_with_http_info(ids) + +```ruby +begin + # Retrieve a set of Content Update Policies by specifying their IDs + data, status_code, headers = api_instance.get_content_update_policies_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->get_content_update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | The IDs of the Content Update Policies to return | | + +### Return type + +[**DomainContentUpdatePolicyRespV1**](DomainContentUpdatePolicyRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## perform_content_update_policies_action + +> perform_content_update_policies_action(action_name, body) + +Perform the specified action on the Content Update Policies specified in the request + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +action_name = 'add-host-group' # String | The action to perform +body = Falcon::MsaEntityActionRequestV2.new({ids: ['ids_example']}) # MsaEntityActionRequestV2 | + +begin + # Perform the specified action on the Content Update Policies specified in the request + result = api_instance.perform_content_update_policies_action(action_name, body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->perform_content_update_policies_action: #{e}" +end +``` + +#### Using the perform_content_update_policies_action_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> perform_content_update_policies_action_with_http_info(action_name, body) + +```ruby +begin + # Perform the specified action on the Content Update Policies specified in the request + data, status_code, headers = api_instance.perform_content_update_policies_action_with_http_info(action_name, body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->perform_content_update_policies_action_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action_name** | **String** | The action to perform | | +| **body** | [**MsaEntityActionRequestV2**](MsaEntityActionRequestV2.md) | | | + +### Return type + +[**DomainContentUpdatePolicyRespV1**](DomainContentUpdatePolicyRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## query_combined_content_update_policies + +> query_combined_content_update_policies(opts) + +Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +opts = { + filter: 'filter_example', # String | The filter expression that should be used to limit the results + offset: 56, # Integer | The offset to start retrieving records from + limit: 56, # Integer | The maximum records to return. [1-5000] + sort: 'created_by.asc' # String | The property to sort by +} + +begin + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria + result = api_instance.query_combined_content_update_policies(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_combined_content_update_policies: #{e}" +end +``` + +#### Using the query_combined_content_update_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_combined_content_update_policies_with_http_info(opts) + +```ruby +begin + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria + data, status_code, headers = api_instance.query_combined_content_update_policies_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_combined_content_update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | The filter expression that should be used to limit the results | [optional] | +| **offset** | **Integer** | The offset to start retrieving records from | [optional] | +| **limit** | **Integer** | The maximum records to return. [1-5000] | [optional] | +| **sort** | **String** | The property to sort by | [optional] | + +### Return type + +[**DomainContentUpdatePolicyRespV1**](DomainContentUpdatePolicyRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_combined_content_update_policy_members + +> query_combined_content_update_policy_members(opts) + +Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +opts = { + id: 'id_example', # String | The ID of the Content Update Policy to search for members of + filter: 'filter_example', # String | The filter expression that should be used to limit the results + offset: 56, # Integer | The offset to start retrieving records from + limit: 56, # Integer | The maximum records to return. [1-5000] + sort: 'sort_example' # String | The property to sort by +} + +begin + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria + result = api_instance.query_combined_content_update_policy_members(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_combined_content_update_policy_members: #{e}" +end +``` + +#### Using the query_combined_content_update_policy_members_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_combined_content_update_policy_members_with_http_info(opts) + +```ruby +begin + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria + data, status_code, headers = api_instance.query_combined_content_update_policy_members_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_combined_content_update_policy_members_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The ID of the Content Update Policy to search for members of | [optional] | +| **filter** | **String** | The filter expression that should be used to limit the results | [optional] | +| **offset** | **Integer** | The offset to start retrieving records from | [optional] | +| **limit** | **Integer** | The maximum records to return. [1-5000] | [optional] | +| **sort** | **String** | The property to sort by | [optional] | + +### Return type + +[**BasePolicyMembersRespV1**](BasePolicyMembersRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_content_update_policies + +> query_content_update_policies(opts) + +Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +opts = { + filter: 'filter_example', # String | The filter expression that should be used to limit the results + offset: 56, # Integer | The offset to start retrieving records from + limit: 56, # Integer | The maximum records to return. [1-5000] + sort: 'created_by.asc' # String | The property to sort by +} + +begin + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria + result = api_instance.query_content_update_policies(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_content_update_policies: #{e}" +end +``` + +#### Using the query_content_update_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_content_update_policies_with_http_info(opts) + +```ruby +begin + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria + data, status_code, headers = api_instance.query_content_update_policies_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_content_update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | The filter expression that should be used to limit the results | [optional] | +| **offset** | **Integer** | The offset to start retrieving records from | [optional] | +| **limit** | **Integer** | The maximum records to return. [1-5000] | [optional] | +| **sort** | **String** | The property to sort by | [optional] | + +### Return type + +[**MsaQueryResponse**](MsaQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_content_update_policy_members + +> query_content_update_policy_members(opts) + +Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +opts = { + id: 'id_example', # String | The ID of the Content Update Policy to search for members of + filter: 'filter_example', # String | The filter expression that should be used to limit the results + offset: 56, # Integer | The offset to start retrieving records from + limit: 56, # Integer | The maximum records to return. [1-5000] + sort: 'sort_example' # String | The property to sort by +} + +begin + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria + result = api_instance.query_content_update_policy_members(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_content_update_policy_members: #{e}" +end +``` + +#### Using the query_content_update_policy_members_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_content_update_policy_members_with_http_info(opts) + +```ruby +begin + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria + data, status_code, headers = api_instance.query_content_update_policy_members_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->query_content_update_policy_members_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | The ID of the Content Update Policy to search for members of | [optional] | +| **filter** | **String** | The filter expression that should be used to limit the results | [optional] | +| **offset** | **Integer** | The offset to start retrieving records from | [optional] | +| **limit** | **Integer** | The maximum records to return. [1-5000] | [optional] | +| **sort** | **String** | The property to sort by | [optional] | + +### Return type + +[**MsaQueryResponse**](MsaQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## set_content_update_policies_precedence + +> set_content_update_policies_precedence(body) + +Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +body = Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1.new({ids: ['ids_example']}) # BaseSetContentUpdatePolicyPrecedenceReqV1 | + +begin + # Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence + result = api_instance.set_content_update_policies_precedence(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->set_content_update_policies_precedence: #{e}" +end +``` + +#### Using the set_content_update_policies_precedence_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> set_content_update_policies_precedence_with_http_info(body) + +```ruby +begin + # Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence + data, status_code, headers = api_instance.set_content_update_policies_precedence_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->set_content_update_policies_precedence_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**BaseSetContentUpdatePolicyPrecedenceReqV1**](BaseSetContentUpdatePolicyPrecedenceReqV1.md) | | | + +### Return type + +[**MsaQueryResponse**](MsaQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_content_update_policies + +> update_content_update_policies(body) + +Update Content Update Policies by specifying the ID of the policy and details to update + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ContentUpdatePolicies.new +body = Falcon::ContentUpdateUpdatePoliciesReqV1.new({resources: [Falcon::ContentUpdateUpdatePolicyReqV1.new({id: 'id_example'})]}) # ContentUpdateUpdatePoliciesReqV1 | + +begin + # Update Content Update Policies by specifying the ID of the policy and details to update + result = api_instance.update_content_update_policies(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->update_content_update_policies: #{e}" +end +``` + +#### Using the update_content_update_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_content_update_policies_with_http_info(body) + +```ruby +begin + # Update Content Update Policies by specifying the ID of the policy and details to update + data, status_code, headers = api_instance.update_content_update_policies_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContentUpdatePolicies->update_content_update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ContentUpdateUpdatePoliciesReqV1**](ContentUpdateUpdatePoliciesReqV1.md) | | | + +### Return type + +[**DomainContentUpdatePolicyRespV1**](DomainContentUpdatePolicyRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/ContentUpdateRingAssignmentSettingsV1.md b/docs/ContentUpdateRingAssignmentSettingsV1.md new file mode 100644 index 00000000..6d242747 --- /dev/null +++ b/docs/ContentUpdateRingAssignmentSettingsV1.md @@ -0,0 +1,20 @@ +# Falcon::ContentUpdateRingAssignmentSettingsV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | | +| **ring_assignment** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ContentUpdateRingAssignmentSettingsV1.new( + id: null, + ring_assignment: null +) +``` + diff --git a/docs/ContentUpdateSettingsV1.md b/docs/ContentUpdateSettingsV1.md new file mode 100644 index 00000000..65ba49c5 --- /dev/null +++ b/docs/ContentUpdateSettingsV1.md @@ -0,0 +1,18 @@ +# Falcon::ContentUpdateSettingsV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ring_assignment_settings** | [**Array<ContentUpdateRingAssignmentSettingsV1>**](ContentUpdateRingAssignmentSettingsV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ContentUpdateSettingsV1.new( + ring_assignment_settings: null +) +``` + diff --git a/docs/ContentUpdateUpdatePoliciesReqV1.md b/docs/ContentUpdateUpdatePoliciesReqV1.md new file mode 100644 index 00000000..764775f3 --- /dev/null +++ b/docs/ContentUpdateUpdatePoliciesReqV1.md @@ -0,0 +1,18 @@ +# Falcon::ContentUpdateUpdatePoliciesReqV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ContentUpdateUpdatePolicyReqV1>**](ContentUpdateUpdatePolicyReqV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ContentUpdateUpdatePoliciesReqV1.new( + resources: null +) +``` + diff --git a/docs/ContentUpdateUpdatePolicyReqV1.md b/docs/ContentUpdateUpdatePolicyReqV1.md new file mode 100644 index 00000000..5f727c2b --- /dev/null +++ b/docs/ContentUpdateUpdatePolicyReqV1.md @@ -0,0 +1,24 @@ +# Falcon::ContentUpdateUpdatePolicyReqV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | The new description to assign to the policy | [optional] | +| **id** | **String** | The id of the policy to update | | +| **name** | **String** | The new name to assign to the policy | [optional] | +| **settings** | [**ContentUpdateSettingsV1**](ContentUpdateSettingsV1.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ContentUpdateUpdatePolicyReqV1.new( + description: null, + id: null, + name: null, + settings: null +) +``` + diff --git a/docs/CorrelationRules.md b/docs/CorrelationRules.md new file mode 100644 index 00000000..585b4384 --- /dev/null +++ b/docs/CorrelationRules.md @@ -0,0 +1,517 @@ +# Falcon::CorrelationRules + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**combined_rules_get_v1**](CorrelationRules.md#combined_rules_get_v1) | **GET** /correlation-rules/combined/rules/v1 | Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on | +| [**entities_rule_versions_delete_v1**](CorrelationRules.md#entities_rule_versions_delete_v1) | **DELETE** /correlation-rules/entities/rule-versions/v1 | Delete versions by IDs | +| [**entities_rules_delete_v1**](CorrelationRules.md#entities_rules_delete_v1) | **DELETE** /correlation-rules/entities/rules/v1 | Delete rules by IDs | +| [**entities_rules_get_v1**](CorrelationRules.md#entities_rules_get_v1) | **GET** /correlation-rules/entities/rules/v1 | Retrieve rules by IDs | +| [**entities_rules_patch_v1**](CorrelationRules.md#entities_rules_patch_v1) | **PATCH** /correlation-rules/entities/rules/v1 | Update rules | +| [**entities_rules_post_v1**](CorrelationRules.md#entities_rules_post_v1) | **POST** /correlation-rules/entities/rules/v1 | Create rule | +| [**queries_rules_get_v1**](CorrelationRules.md#queries_rules_get_v1) | **GET** /correlation-rules/queries/rules/v1 | Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on | + + +## combined_rules_get_v1 + +> combined_rules_get_v1(opts) + +Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CorrelationRules.new +opts = { + filter: 'filter_example', # String | FQL query specifying the filter parameters + q: 'q_example', # String | Match query criteria, which includes all the filter string fields + sort: 'created_on', # String | Rule property to sort on + offset: 56, # Integer | Starting index of overall result set from which to return IDs + limit: 56 # Integer | Number of IDs to return +} + +begin + # Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + result = api_instance.combined_rules_get_v1(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->combined_rules_get_v1: #{e}" +end +``` + +#### Using the combined_rules_get_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> combined_rules_get_v1_with_http_info(opts) + +```ruby +begin + # Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + data, status_code, headers = api_instance.combined_rules_get_v1_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->combined_rules_get_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | FQL query specifying the filter parameters | [optional] | +| **q** | **String** | Match query criteria, which includes all the filter string fields | [optional] | +| **sort** | **String** | Rule property to sort on | [optional][default to 'created_on'] | +| **offset** | **Integer** | Starting index of overall result set from which to return IDs | [optional][default to 0] | +| **limit** | **Integer** | Number of IDs to return | [optional][default to 100] | + +### Return type + +[**ApiGetEntitiesRulesResponseV1**](ApiGetEntitiesRulesResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## entities_rule_versions_delete_v1 + +> entities_rule_versions_delete_v1(ids) + +Delete versions by IDs + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CorrelationRules.new +ids = ['inner_example'] # Array | The IDs + +begin + # Delete versions by IDs + result = api_instance.entities_rule_versions_delete_v1(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rule_versions_delete_v1: #{e}" +end +``` + +#### Using the entities_rule_versions_delete_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> entities_rule_versions_delete_v1_with_http_info(ids) + +```ruby +begin + # Delete versions by IDs + data, status_code, headers = api_instance.entities_rule_versions_delete_v1_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rule_versions_delete_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | The IDs | | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## entities_rules_delete_v1 + +> entities_rules_delete_v1(ids) + +Delete rules by IDs + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CorrelationRules.new +ids = ['inner_example'] # Array | The IDs + +begin + # Delete rules by IDs + result = api_instance.entities_rules_delete_v1(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_delete_v1: #{e}" +end +``` + +#### Using the entities_rules_delete_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> entities_rules_delete_v1_with_http_info(ids) + +```ruby +begin + # Delete rules by IDs + data, status_code, headers = api_instance.entities_rules_delete_v1_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_delete_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | The IDs | | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## entities_rules_get_v1 + +> entities_rules_get_v1(ids) + +Retrieve rules by IDs + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CorrelationRules.new +ids = ['inner_example'] # Array | The IDs + +begin + # Retrieve rules by IDs + result = api_instance.entities_rules_get_v1(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_get_v1: #{e}" +end +``` + +#### Using the entities_rules_get_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> entities_rules_get_v1_with_http_info(ids) + +```ruby +begin + # Retrieve rules by IDs + data, status_code, headers = api_instance.entities_rules_get_v1_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_get_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | The IDs | | + +### Return type + +[**ApiGetEntitiesRulesResponseV1**](ApiGetEntitiesRulesResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## entities_rules_patch_v1 + +> entities_rules_patch_v1(body) + +Update rules + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CorrelationRules.new +body = [Falcon::ApiRulePatchRequestV1.new({id: 'id_example'})] # Array | + +begin + # Update rules + result = api_instance.entities_rules_patch_v1(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_patch_v1: #{e}" +end +``` + +#### Using the entities_rules_patch_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> entities_rules_patch_v1_with_http_info(body) + +```ruby +begin + # Update rules + data, status_code, headers = api_instance.entities_rules_patch_v1_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_patch_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**Array<ApiRulePatchRequestV1>**](ApiRulePatchRequestV1.md) | | | + +### Return type + +[**ApiGetEntitiesRulesResponseV1**](ApiGetEntitiesRulesResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## entities_rules_post_v1 + +> entities_rules_post_v1(body) + +Create rule + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CorrelationRules.new +body = Falcon::ApiRuleCreateRequestV1.new({customer_id: 'customer_id_example', name: 'name_example', operation: Falcon::ApiCreateRuleOperationV1.new({schedule: Falcon::ApiRuleScheduleV1.new({definition: 'definition_example'})}), search: Falcon::ApiRuleSearchV1.new({filter: 'filter_example', lookback: 'lookback_example', outcome: 'outcome_example'}), severity: 37, status: 'status_example'}) # ApiRuleCreateRequestV1 | + +begin + # Create rule + result = api_instance.entities_rules_post_v1(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_post_v1: #{e}" +end +``` + +#### Using the entities_rules_post_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> entities_rules_post_v1_with_http_info(body) + +```ruby +begin + # Create rule + data, status_code, headers = api_instance.entities_rules_post_v1_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->entities_rules_post_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ApiRuleCreateRequestV1**](ApiRuleCreateRequestV1.md) | | | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## queries_rules_get_v1 + +> queries_rules_get_v1(opts) + +Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CorrelationRules.new +opts = { + filter: 'filter_example', # String | FQL query specifying the filter parameters + q: 'q_example', # String | Match query criteria, which includes all the filter string fields + sort: 'created_on', # String | Rule property to sort on + offset: 56, # Integer | Starting index of overall result set from which to return IDs + limit: 56 # Integer | Number of IDs to return +} + +begin + # Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + result = api_instance.queries_rules_get_v1(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->queries_rules_get_v1: #{e}" +end +``` + +#### Using the queries_rules_get_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> queries_rules_get_v1_with_http_info(opts) + +```ruby +begin + # Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + data, status_code, headers = api_instance.queries_rules_get_v1_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CorrelationRules->queries_rules_get_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | FQL query specifying the filter parameters | [optional] | +| **q** | **String** | Match query criteria, which includes all the filter string fields | [optional] | +| **sort** | **String** | Rule property to sort on | [optional][default to 'created_on'] | +| **offset** | **Integer** | Starting index of overall result set from which to return IDs | [optional][default to 0] | +| **limit** | **Integer** | Number of IDs to return | [optional][default to 100] | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/CspmRegistration.md b/docs/CspmRegistration.md index 70a2913a..eb738d0f 100644 --- a/docs/CspmRegistration.md +++ b/docs/CspmRegistration.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**azure_download_certificate**](CspmRegistration.md#azure_download_certificate) | **GET** /cloud-connect-cspm-azure/entities/download-certificate/v1 | Returns JSON object(s) that contain the base64 encoded certificate for a service principal. | +| [**azure_refresh_certificate**](CspmRegistration.md#azure_refresh_certificate) | **POST** /cloud-connect-cspm-azure/entities/refresh-certificate/v1 | Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. | | [**connect_cspm_gcp_account**](CspmRegistration.md#connect_cspm_gcp_account) | **POST** /cloud-connect-cspm-gcp/entities/account/v2 | Creates a new GCP account with newly-uploaded service account or connects with existing service account with only the following fields: parent_id, parent_type and service_account_id | | [**create_cspm_aws_account**](CspmRegistration.md#create_cspm_aws_account) | **POST** /cloud-connect-cspm-aws/entities/account/v1 | Creates a new account in our system for a customer and generates a script for them to run in their AWS cloud environment to grant us access. | | [**create_cspm_azure_account**](CspmRegistration.md#create_cspm_azure_account) | **POST** /cloud-connect-cspm-azure/entities/account/v1 | Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access. | @@ -45,7 +46,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* ## azure_download_certificate -> azure_download_certificate(tenant_id, opts) +> azure_download_certificate(tenant_id) Returns JSON object(s) that contain the base64 encoded certificate for a service principal. @@ -64,14 +65,10 @@ end api_instance = Falcon::CspmRegistration.new tenant_id = ['inner_example'] # Array | Azure Tenant ID -opts = { - refresh: true, # Boolean | Setting to true will invalidate the current certificate and generate a new certificate - years_valid: 'years_valid_example' # String | Years the certificate should be valid (only used when refresh=true) -} begin # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - result = api_instance.azure_download_certificate(tenant_id, opts) + result = api_instance.azure_download_certificate(tenant_id) p result rescue Falcon::ApiError => e puts "Error when calling CspmRegistration->azure_download_certificate: #{e}" @@ -82,12 +79,12 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> azure_download_certificate_with_http_info(tenant_id, opts) +> , Integer, Hash)> azure_download_certificate_with_http_info(tenant_id) ```ruby begin # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - data, status_code, headers = api_instance.azure_download_certificate_with_http_info(tenant_id, opts) + data, status_code, headers = api_instance.azure_download_certificate_with_http_info(tenant_id) p status_code # => 2xx p headers # => { ... } p data # => @@ -101,8 +98,79 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **tenant_id** | [**Array<String>**](String.md) | Azure Tenant ID | | -| **refresh** | **Boolean** | Setting to true will invalidate the current certificate and generate a new certificate | [optional][default to false] | -| **years_valid** | **String** | Years the certificate should be valid (only used when refresh=true) | [optional] | + +### Return type + +[**RegistrationAzureDownloadCertificateResponseV1**](RegistrationAzureDownloadCertificateResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/octet-stream + + +## azure_refresh_certificate + +> azure_refresh_certificate(tenant_id, opts) + +Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::CspmRegistration.new +tenant_id = ['inner_example'] # Array | Azure Tenant ID +opts = { + years_valid: 'years_valid_example' # String | Years the certificate should be valid. Max 2 +} + +begin + # Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. + result = api_instance.azure_refresh_certificate(tenant_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistration->azure_refresh_certificate: #{e}" +end +``` + +#### Using the azure_refresh_certificate_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> azure_refresh_certificate_with_http_info(tenant_id, opts) + +```ruby +begin + # Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. + data, status_code, headers = api_instance.azure_refresh_certificate_with_http_info(tenant_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistration->azure_refresh_certificate_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | [**Array<String>**](String.md) | Azure Tenant ID | | +| **years_valid** | **String** | Years the certificate should be valid. Max 2 | [optional][default to '1'] | ### Return type @@ -465,7 +533,7 @@ end ## delete_cspm_aws_account -> delete_cspm_aws_account(opts) +> delete_cspm_aws_account(opts) Deletes an existing AWS account or organization in our system. @@ -501,7 +569,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_cspm_aws_account_with_http_info(opts) +> , Integer, Hash)> delete_cspm_aws_account_with_http_info(opts) ```ruby begin @@ -509,7 +577,7 @@ begin data, status_code, headers = api_instance.delete_cspm_aws_account_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling CspmRegistration->delete_cspm_aws_account_with_http_info: #{e}" end @@ -524,7 +592,7 @@ end ### Return type -[**MsaBaseEntitiesResponse**](MsaBaseEntitiesResponse.md) +[**MsaspecResponseFields**](MsaspecResponseFields.md) ### Authorization diff --git a/docs/CustomIoa.md b/docs/CustomIoa.md index ef34d08d..01084ba5 100644 --- a/docs/CustomIoa.md +++ b/docs/CustomIoa.md @@ -7,7 +7,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**create_rule**](CustomIoa.md#create_rule) | **POST** /ioarules/entities/rules/v1 | Create a rule within a rule group. Returns the rule. | | [**create_rule_group_mixin0**](CustomIoa.md#create_rule_group_mixin0) | **POST** /ioarules/entities/rule-groups/v1 | Create a rule group for a platform with a name and an optional description. Returns the rule group. | | [**delete_rule_groups_mixin0**](CustomIoa.md#delete_rule_groups_mixin0) | **DELETE** /ioarules/entities/rule-groups/v1 | Delete rule groups by ID. | -| [**delete_rules_0**](CustomIoa.md#delete_rules_0) | **DELETE** /ioarules/entities/rules/v1 | Delete rules from a rule group by ID. | +| [**delete_rules**](CustomIoa.md#delete_rules) | **DELETE** /ioarules/entities/rules/v1 | Delete rules from a rule group by ID. | | [**get_patterns**](CustomIoa.md#get_patterns) | **GET** /ioarules/entities/pattern-severities/v1 | Get pattern severities by ID. | | [**get_platforms_mixin0**](CustomIoa.md#get_platforms_mixin0) | **GET** /ioarules/entities/platforms/v1 | Get platforms by ID. | | [**get_rule_groups_mixin0**](CustomIoa.md#get_rule_groups_mixin0) | **GET** /ioarules/entities/rule-groups/v1 | Get rule groups by ID. | @@ -21,7 +21,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**query_rule_types**](CustomIoa.md#query_rule_types) | **GET** /ioarules/queries/rule-types/v1 | Get all rule type IDs. | | [**query_rules_mixin0**](CustomIoa.md#query_rules_mixin0) | **GET** /ioarules/queries/rules/v1 | Finds all rule IDs matching the query with optional filter. | | [**update_rule_group_mixin0**](CustomIoa.md#update_rule_group_mixin0) | **PATCH** /ioarules/entities/rule-groups/v1 | Update a rule group. The following properties can be modified: name, description, enabled. | -| [**update_rules_0**](CustomIoa.md#update_rules_0) | **PATCH** /ioarules/entities/rules/v1 | Update rules within a rule group. Return the updated rules. | +| [**update_rules**](CustomIoa.md#update_rules) | **PATCH** /ioarules/entities/rules/v1 | Update rules within a rule group. Return the updated rules. | | [**update_rules_v2**](CustomIoa.md#update_rules_v2) | **PATCH** /ioarules/entities/rules/v2 | Update name, description, enabled or field_values for individual rules within a rule group. The v1 flavor of this call requires the caller to specify the complete state for all the rules in the rule group, instead the v2 flavor will accept the subset of rules in the rule group and apply the attribute updates to the subset of rules in the rule group.Return the updated rules. | | [**validate**](CustomIoa.md#validate) | **POST** /ioarules/entities/rules/validate/v1 | Validates field values and checks for matches if a test string is provided. | @@ -237,9 +237,9 @@ end - **Accept**: application/json -## delete_rules_0 +## delete_rules -> delete_rules_0(rule_group_id, ids, opts) +> delete_rules(rule_group_id, ids, opts) Delete rules from a rule group by ID. @@ -265,28 +265,28 @@ opts = { begin # Delete rules from a rule group by ID. - result = api_instance.delete_rules_0(rule_group_id, ids, opts) + result = api_instance.delete_rules(rule_group_id, ids, opts) p result rescue Falcon::ApiError => e - puts "Error when calling CustomIoa->delete_rules_0: #{e}" + puts "Error when calling CustomIoa->delete_rules: #{e}" end ``` -#### Using the delete_rules_0_with_http_info variant +#### Using the delete_rules_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_rules_0_with_http_info(rule_group_id, ids, opts) +> , Integer, Hash)> delete_rules_with_http_info(rule_group_id, ids, opts) ```ruby begin # Delete rules from a rule group by ID. - data, status_code, headers = api_instance.delete_rules_0_with_http_info(rule_group_id, ids, opts) + data, status_code, headers = api_instance.delete_rules_with_http_info(rule_group_id, ids, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling CustomIoa->delete_rules_0_with_http_info: #{e}" + puts "Error when calling CustomIoa->delete_rules_with_http_info: #{e}" end ``` @@ -1251,9 +1251,9 @@ end - **Accept**: application/json -## update_rules_0 +## update_rules -> update_rules_0(body) +> update_rules(body) Update rules within a rule group. Return the updated rules. @@ -1275,28 +1275,28 @@ body = Falcon::ApiRuleUpdatesRequestV1.new({comment: 'comment_example', rule_upd begin # Update rules within a rule group. Return the updated rules. - result = api_instance.update_rules_0(body) + result = api_instance.update_rules(body) p result rescue Falcon::ApiError => e - puts "Error when calling CustomIoa->update_rules_0: #{e}" + puts "Error when calling CustomIoa->update_rules: #{e}" end ``` -#### Using the update_rules_0_with_http_info variant +#### Using the update_rules_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_rules_0_with_http_info(body) +> , Integer, Hash)> update_rules_with_http_info(body) ```ruby begin # Update rules within a rule group. Return the updated rules. - data, status_code, headers = api_instance.update_rules_0_with_http_info(body) + data, status_code, headers = api_instance.update_rules_with_http_info(body) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling CustomIoa->update_rules_0_with_http_info: #{e}" + puts "Error when calling CustomIoa->update_rules_with_http_info: #{e}" end ``` diff --git a/docs/D4cRegistration.md b/docs/D4cRegistration.md index 0a9ec14f..1517856b 100644 --- a/docs/D4cRegistration.md +++ b/docs/D4cRegistration.md @@ -10,7 +10,6 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**create_discover_cloud_azure_account**](D4cRegistration.md#create_discover_cloud_azure_account) | **POST** /cloud-connect-azure/entities/account/v1 | Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access. | | [**delete_d4_c_aws_account**](D4cRegistration.md#delete_d4_c_aws_account) | **DELETE** /cloud-connect-aws/entities/account/v2 | Deletes an existing AWS account or organization in our system. | | [**delete_d4_cgcp_account**](D4cRegistration.md#delete_d4_cgcp_account) | **DELETE** /cloud-connect-gcp/entities/account/v1 | Deletes a GCP account from the system. | -| [**discover_cloud_azure_download_certificate**](D4cRegistration.md#discover_cloud_azure_download_certificate) | **GET** /cloud-connect-azure/entities/download-certificate/v1 | Returns JSON object(s) that contain the base64 encoded certificate for a service principal. | | [**get_d4_c_aws_account**](D4cRegistration.md#get_d4_c_aws_account) | **GET** /cloud-connect-aws/entities/account/v2 | Returns information about the current status of an AWS account. | | [**get_d4_c_aws_console_setup_urls**](D4cRegistration.md#get_d4_c_aws_console_setup_urls) | **GET** /cloud-connect-aws/entities/console-setup-urls/v1 | Return a URL for customer to visit in their cloud environment to grant us access to their AWS environment. | | [**get_d4_c_gcp_account**](D4cRegistration.md#get_d4_c_gcp_account) | **GET** /cloud-connect-gcp/entities/account/v1 | Returns information about the current status of an GCP account. | @@ -305,7 +304,7 @@ end ## delete_d4_c_aws_account -> delete_d4_c_aws_account(opts) +> delete_d4_c_aws_account(opts) Deletes an existing AWS account or organization in our system. @@ -341,7 +340,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_d4_c_aws_account_with_http_info(opts) +> , Integer, Hash)> delete_d4_c_aws_account_with_http_info(opts) ```ruby begin @@ -349,7 +348,7 @@ begin data, status_code, headers = api_instance.delete_d4_c_aws_account_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling D4cRegistration->delete_d4_c_aws_account_with_http_info: #{e}" end @@ -364,7 +363,7 @@ end ### Return type -[**MsaBaseEntitiesResponse**](MsaBaseEntitiesResponse.md) +[**MsaspecResponseFields**](MsaspecResponseFields.md) ### Authorization @@ -447,81 +446,6 @@ end - **Accept**: application/json -## discover_cloud_azure_download_certificate - -> discover_cloud_azure_download_certificate(tenant_id, opts) - -Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - -### Examples - -```ruby -require 'time' -require 'crimson-falcon' - -# Setup authorization -Falcon.configure do |config| - config.client_id = "Your_Client_ID" - config.client_secret = "Your_Client_Secret" - config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" -end - -api_instance = Falcon::D4cRegistration.new -tenant_id = ['inner_example'] # Array | Azure Tenant ID -opts = { - refresh: true, # Boolean | Setting to true will invalidate the current certificate and generate a new certificate - years_valid: 'years_valid_example' # String | Years the certificate should be valid (only used when refresh=true) -} - -begin - # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - result = api_instance.discover_cloud_azure_download_certificate(tenant_id, opts) - p result -rescue Falcon::ApiError => e - puts "Error when calling D4cRegistration->discover_cloud_azure_download_certificate: #{e}" -end -``` - -#### Using the discover_cloud_azure_download_certificate_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> discover_cloud_azure_download_certificate_with_http_info(tenant_id, opts) - -```ruby -begin - # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - data, status_code, headers = api_instance.discover_cloud_azure_download_certificate_with_http_info(tenant_id, opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue Falcon::ApiError => e - puts "Error when calling D4cRegistration->discover_cloud_azure_download_certificate_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **tenant_id** | [**Array<String>**](String.md) | Azure Tenant ID | | -| **refresh** | **Boolean** | Setting to true will invalidate the current certificate and generate a new certificate | [optional][default to false] | -| **years_valid** | **String** | Years the certificate should be valid (only used when refresh=true) | [optional] | - -### Return type - -[**RegistrationAzureDownloadCertificateResponseV1**](RegistrationAzureDownloadCertificateResponseV1.md) - -### Authorization - -**oauth2** - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/octet-stream - - ## get_d4_c_aws_account > get_d4_c_aws_account(opts) diff --git a/docs/DataclassificationsLabel.md b/docs/DataclassificationsLabel.md new file mode 100644 index 00000000..e17d4ffa --- /dev/null +++ b/docs/DataclassificationsLabel.md @@ -0,0 +1,22 @@ +# Falcon::DataclassificationsLabel + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **label_id** | **String** | | | +| **label_name** | **String** | | | +| **last_seen** | **Time** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DataclassificationsLabel.new( + label_id: null, + label_name: null, + last_seen: null +) +``` + diff --git a/docs/DataclassificationsResponse.md b/docs/DataclassificationsResponse.md new file mode 100644 index 00000000..4f73f22d --- /dev/null +++ b/docs/DataclassificationsResponse.md @@ -0,0 +1,26 @@ +# Falcon::DataclassificationsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **found** | **Boolean** | | | +| **labels** | **Hash<String, String>** | | [optional] | +| **last_updated** | **Time** | | [optional] | +| **scanned** | **Boolean** | | | +| **tags** | [**Hash<String, DataclassificationsTag>**](DataclassificationsTag.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DataclassificationsResponse.new( + found: null, + labels: null, + last_updated: null, + scanned: null, + tags: null +) +``` + diff --git a/docs/DataclassificationsTag.md b/docs/DataclassificationsTag.md new file mode 100644 index 00000000..433e9dcd --- /dev/null +++ b/docs/DataclassificationsTag.md @@ -0,0 +1,24 @@ +# Falcon::DataclassificationsTag + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **labels** | [**Hash<String, DataclassificationsLabel>**](DataclassificationsLabel.md) | | | +| **last_seen** | **Time** | | | +| **tag_id** | **String** | | | +| **tag_name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DataclassificationsTag.new( + labels: null, + last_seen: null, + tag_id: null, + tag_name: null +) +``` + diff --git a/docs/Deployments.md b/docs/Deployments.md new file mode 100644 index 00000000..2ae9495f --- /dev/null +++ b/docs/Deployments.md @@ -0,0 +1,83 @@ +# Falcon::Deployments + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**get_deployments_external_v1**](Deployments.md#get_deployments_external_v1) | **GET** /deployment-coordinator/entities/deployments/external/v1 | Get deployment resources by ids | + + +## get_deployments_external_v1 + +> get_deployments_external_v1(authorization, ids, opts) + +Get deployment resources by ids + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::Deployments.new +authorization = 'authorization_example' # String | authorization header +ids = ['inner_example'] # Array | release version ids to retrieve deployment details +opts = { + x_cs_username: 'x_cs_username_example' # String | user name +} + +begin + # Get deployment resources by ids + result = api_instance.get_deployments_external_v1(authorization, ids, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling Deployments->get_deployments_external_v1: #{e}" +end +``` + +#### Using the get_deployments_external_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_deployments_external_v1_with_http_info(authorization, ids, opts) + +```ruby +begin + # Get deployment resources by ids + data, status_code, headers = api_instance.get_deployments_external_v1_with_http_info(authorization, ids, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling Deployments->get_deployments_external_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | authorization header | | +| **ids** | [**Array<String>**](String.md) | release version ids to retrieve deployment details | | +| **x_cs_username** | **String** | user name | [optional] | + +### Return type + +[**DeploymentsAPIDeploymentViewWrapper**](DeploymentsAPIDeploymentViewWrapper.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/DeploymentsAPIDeploymentRingView.md b/docs/DeploymentsAPIDeploymentRingView.md new file mode 100644 index 00000000..c04ebf7d --- /dev/null +++ b/docs/DeploymentsAPIDeploymentRingView.md @@ -0,0 +1,30 @@ +# Falcon::DeploymentsAPIDeploymentRingView + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **complete_timestamp** | **Time** | | [optional] | +| **gates** | **Array<Object>** | | [optional] | +| **id** | **String** | | | +| **name** | **String** | | | +| **ramping_schedule** | **Array<Integer>** | | [optional] | +| **start_timestamp** | **Time** | | [optional] | +| **threshold** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DeploymentsAPIDeploymentRingView.new( + complete_timestamp: null, + gates: null, + id: null, + name: null, + ramping_schedule: null, + start_timestamp: null, + threshold: null +) +``` + diff --git a/docs/DeploymentsAPIDeploymentView.md b/docs/DeploymentsAPIDeploymentView.md new file mode 100644 index 00000000..53a9e534 --- /dev/null +++ b/docs/DeploymentsAPIDeploymentView.md @@ -0,0 +1,32 @@ +# Falcon::DeploymentsAPIDeploymentView + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **complete_timestamp** | **Time** | | [optional] | +| **id** | **String** | | | +| **modified_by** | **String** | | [optional] | +| **modified_timestamp** | **Time** | | [optional] | +| **rings** | [**Array<DeploymentsAPIDeploymentRingView>**](DeploymentsAPIDeploymentRingView.md) | | [optional] | +| **start_timestamp** | **Time** | | [optional] | +| **status** | **String** | | | +| **template_id** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DeploymentsAPIDeploymentView.new( + complete_timestamp: null, + id: null, + modified_by: null, + modified_timestamp: null, + rings: null, + start_timestamp: null, + status: null, + template_id: null +) +``` + diff --git a/docs/DeploymentsAPIDeploymentViewWrapper.md b/docs/DeploymentsAPIDeploymentViewWrapper.md new file mode 100644 index 00000000..26bda289 --- /dev/null +++ b/docs/DeploymentsAPIDeploymentViewWrapper.md @@ -0,0 +1,22 @@ +# Falcon::DeploymentsAPIDeploymentViewWrapper + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<DeploymentsAPIDeploymentView>**](DeploymentsAPIDeploymentView.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DeploymentsAPIDeploymentViewWrapper.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DetectsapiPostCombinedAlertsV1Meta.md b/docs/DetectsapiPostCombinedAlertsV1Meta.md new file mode 100644 index 00000000..e49ce6d5 --- /dev/null +++ b/docs/DetectsapiPostCombinedAlertsV1Meta.md @@ -0,0 +1,24 @@ +# Falcon::DetectsapiPostCombinedAlertsV1Meta + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **pagination** | [**DetectsapiPostCombinedAlertsV1Paging**](DetectsapiPostCombinedAlertsV1Paging.md) | | [optional] | +| **powered_by** | **String** | | [optional] | +| **query_time** | **Float** | | | +| **trace_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiPostCombinedAlertsV1Meta.new( + pagination: null, + powered_by: null, + query_time: null, + trace_id: null +) +``` + diff --git a/docs/DetectsapiPostCombinedAlertsV1Paging.md b/docs/DetectsapiPostCombinedAlertsV1Paging.md new file mode 100644 index 00000000..c788c0e3 --- /dev/null +++ b/docs/DetectsapiPostCombinedAlertsV1Paging.md @@ -0,0 +1,22 @@ +# Falcon::DetectsapiPostCombinedAlertsV1Paging + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | **String** | | [optional] | +| **limit** | **Integer** | | | +| **total** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiPostCombinedAlertsV1Paging.new( + after: null, + limit: null, + total: null +) +``` + diff --git a/docs/DetectsapiPostCombinedAlertsV1RequestSwagger.md b/docs/DetectsapiPostCombinedAlertsV1RequestSwagger.md new file mode 100644 index 00000000..7a3ce0cc --- /dev/null +++ b/docs/DetectsapiPostCombinedAlertsV1RequestSwagger.md @@ -0,0 +1,24 @@ +# Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | **String** | | [optional] | +| **filter** | **String** | | [optional] | +| **limit** | **Integer** | | [optional] | +| **sort** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger.new( + after: null, + filter: null, + limit: null, + sort: null +) +``` + diff --git a/docs/DetectsapiPostCombinedAlertsV1ResponseSwagger.md b/docs/DetectsapiPostCombinedAlertsV1ResponseSwagger.md new file mode 100644 index 00000000..cea7ece9 --- /dev/null +++ b/docs/DetectsapiPostCombinedAlertsV1ResponseSwagger.md @@ -0,0 +1,22 @@ +# Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**DetectsapiPostCombinedAlertsV1Meta**](DetectsapiPostCombinedAlertsV1Meta.md) | | | +| **resources** | [**Array<DetectsExternalAlert>**](DetectsExternalAlert.md) | Resources represent the slice of Alerts that were retrieved | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DeviceContent.md b/docs/DeviceContent.md new file mode 100644 index 00000000..0a83ed26 --- /dev/null +++ b/docs/DeviceContent.md @@ -0,0 +1,155 @@ +# Falcon::DeviceContent + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**entities_states_v1**](DeviceContent.md#entities_states_v1) | **GET** /device-content/entities/states/v1 | Retrieve the host content state for a number of ids between 1 and 100. | +| [**queries_states_v1**](DeviceContent.md#queries_states_v1) | **GET** /device-content/queries/states/v1 | Query for the content state of the host. | + + +## entities_states_v1 + +> entities_states_v1(ids) + +Retrieve the host content state for a number of ids between 1 and 100. + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::DeviceContent.new +ids = ['inner_example'] # Array | The ids of the devices to fetch the content state of. + +begin + # Retrieve the host content state for a number of ids between 1 and 100. + result = api_instance.entities_states_v1(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling DeviceContent->entities_states_v1: #{e}" +end +``` + +#### Using the entities_states_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> entities_states_v1_with_http_info(ids) + +```ruby +begin + # Retrieve the host content state for a number of ids between 1 and 100. + data, status_code, headers = api_instance.entities_states_v1_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling DeviceContent->entities_states_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | The ids of the devices to fetch the content state of. | | + +### Return type + +[**DevicecontentapiEntitiesResponseV1**](DevicecontentapiEntitiesResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## queries_states_v1 + +> queries_states_v1(opts) + +Query for the content state of the host. + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::DeviceContent.new +opts = { + limit: 56, # Integer | The max number of resource ids to return. + sort: 'sort_example', # String | What field to sort the results on. + offset: 56, # Integer | The offset token returned from the previous query. If none was returned, there are no more pages to the result set. + filter: 'filter_example' # String | The FQL search filter +} + +begin + # Query for the content state of the host. + result = api_instance.queries_states_v1(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling DeviceContent->queries_states_v1: #{e}" +end +``` + +#### Using the queries_states_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> queries_states_v1_with_http_info(opts) + +```ruby +begin + # Query for the content state of the host. + data, status_code, headers = api_instance.queries_states_v1_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling DeviceContent->queries_states_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **limit** | **Integer** | The max number of resource ids to return. | [optional][default to 100] | +| **sort** | **String** | What field to sort the results on. | [optional][default to 'last_seen.desc'] | +| **offset** | **Integer** | The offset token returned from the previous query. If none was returned, there are no more pages to the result set. | [optional] | +| **filter** | **String** | The FQL search filter | [optional] | + +### Return type + +[**DevicecontentapiQueryResponseV1**](DevicecontentapiQueryResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/DeviceControlUSBClassExceptionsReqV1.md b/docs/DeviceControlUSBClassExceptionsReqV1.md index 30c54b55..852b3f67 100644 --- a/docs/DeviceControlUSBClassExceptionsReqV1.md +++ b/docs/DeviceControlUSBClassExceptionsReqV1.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **action** | **String** | Policy action | | +| **action** | **String** | Policy action. Note: BLOCK_EXECUTE is only valid for MASS_STORAGE devices. | | | **exceptions** | [**Array<DeviceControlExceptionReqV1>**](DeviceControlExceptionReqV1.md) | Exceptions to the rules of this policy setting | | | **id** | **String** | USB Class id | | diff --git a/docs/DeviceControlUSBClassExceptionsResponse.md b/docs/DeviceControlUSBClassExceptionsResponse.md index 6700e62c..298d7cd8 100644 --- a/docs/DeviceControlUSBClassExceptionsResponse.md +++ b/docs/DeviceControlUSBClassExceptionsResponse.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **action** | **String** | Policy action | | +| **action** | **String** | Policy action. Note: BLOCK_EXECUTE is only valid for MASS_STORAGE devices. | | | **exceptions** | [**Array<DeviceControlExceptionRespV1>**](DeviceControlExceptionRespV1.md) | Exceptions to the rules of this policy setting | | | **id** | **String** | USB Class id | | diff --git a/docs/DevicecontentContentCategory.md b/docs/DevicecontentContentCategory.md new file mode 100644 index 00000000..482565fc --- /dev/null +++ b/docs/DevicecontentContentCategory.md @@ -0,0 +1,18 @@ +# Falcon::DevicecontentContentCategory + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **last_update** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DevicecontentContentCategory.new( + last_update: null +) +``` + diff --git a/docs/DevicecontentState.md b/docs/DevicecontentState.md new file mode 100644 index 00000000..d89dc428 --- /dev/null +++ b/docs/DevicecontentState.md @@ -0,0 +1,40 @@ +# Falcon::DevicecontentState + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | | | +| **device_id** | **String** | | | +| **groups** | **Array<String>** | | [optional] | +| **hidden_status** | **String** | | [optional] | +| **hostname** | **String** | | [optional] | +| **last_seen** | **String** | | [optional] | +| **platform_name** | **String** | | [optional] | +| **rapid_response_content** | [**DevicecontentContentCategory**](DevicecontentContentCategory.md) | | [optional] | +| **reduced_functionality_mode** | **String** | | [optional] | +| **sensor_operations** | [**DevicecontentContentCategory**](DevicecontentContentCategory.md) | | [optional] | +| **system_critical** | [**DevicecontentContentCategory**](DevicecontentContentCategory.md) | | [optional] | +| **vulnerability_management** | [**DevicecontentContentCategory**](DevicecontentContentCategory.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DevicecontentState.new( + cid: null, + device_id: null, + groups: null, + hidden_status: null, + hostname: null, + last_seen: null, + platform_name: null, + rapid_response_content: null, + reduced_functionality_mode: null, + sensor_operations: null, + system_critical: null, + vulnerability_management: null +) +``` + diff --git a/docs/DevicecontentapiEntitiesResponseV1.md b/docs/DevicecontentapiEntitiesResponseV1.md new file mode 100644 index 00000000..1d31df93 --- /dev/null +++ b/docs/DevicecontentapiEntitiesResponseV1.md @@ -0,0 +1,22 @@ +# Falcon::DevicecontentapiEntitiesResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<DevicecontentState>**](DevicecontentState.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DevicecontentapiEntitiesResponseV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DevicecontentapiQueryResponseV1.md b/docs/DevicecontentapiQueryResponseV1.md new file mode 100644 index 00000000..b6b93c5b --- /dev/null +++ b/docs/DevicecontentapiQueryResponseV1.md @@ -0,0 +1,22 @@ +# Falcon::DevicecontentapiQueryResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DevicecontentapiQueryResponseV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/Discover.md b/docs/Discover.md index f7d600b3..a38c4d74 100644 --- a/docs/Discover.md +++ b/docs/Discover.md @@ -10,6 +10,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**get_applications**](Discover.md#get_applications) | **GET** /discover/entities/applications/v1 | Get details on applications by providing one or more IDs. | | [**get_hosts**](Discover.md#get_hosts) | **GET** /discover/entities/hosts/v1 | Get details on assets by providing one or more IDs. | | [**get_logins**](Discover.md#get_logins) | **GET** /discover/entities/logins/v1 | Get details on logins by providing one or more IDs. | +| [**post_external_assets_inventory_v1**](Discover.md#post_external_assets_inventory_v1) | **POST** /fem/entities/external-asset-inventory/v1 | Add external assets for external asset scanning. | | [**query_accounts**](Discover.md#query_accounts) | **GET** /discover/queries/accounts/v1 | Search for accounts in your environment by providing an FQL (Falcon Query Language) filter and paging details. Returns a set of account IDs which match the filter criteria. | | [**query_applications**](Discover.md#query_applications) | **GET** /discover/queries/applications/v1 | Search for applications in your environment by providing an FQL filter and paging details. returns a set of application IDs which match the filter criteria. | | [**query_hosts**](Discover.md#query_hosts) | **GET** /discover/queries/hosts/v1 | Search for assets in your environment by providing an FQL (Falcon Query Language) filter and paging details. Returns a set of asset IDs which match the filter criteria. | @@ -450,6 +451,75 @@ end - **Accept**: application/json +## post_external_assets_inventory_v1 + +> post_external_assets_inventory_v1(body) + +Add external assets for external asset scanning. + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::Discover.new +body = Falcon::InventoryapiUserExternalAssetCreateRequestV1.new({data: [Falcon::InventoryapiUserExternalAssetCreate.new({assets: [Falcon::InventoryapiUserExternalAsset.new({id: 'id_example', value: 'value_example'})], subsidiary_id: 'subsidiary_id_example'})]}) # InventoryapiUserExternalAssetCreateRequestV1 | Asset addition specification. + +begin + # Add external assets for external asset scanning. + result = api_instance.post_external_assets_inventory_v1(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling Discover->post_external_assets_inventory_v1: #{e}" +end +``` + +#### Using the post_external_assets_inventory_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_external_assets_inventory_v1_with_http_info(body) + +```ruby +begin + # Add external assets for external asset scanning. + data, status_code, headers = api_instance.post_external_assets_inventory_v1_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling Discover->post_external_assets_inventory_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**InventoryapiUserExternalAssetCreateRequestV1**](InventoryapiUserExternalAssetCreateRequestV1.md) | Asset addition specification. | | + +### Return type + +[**InventoryapiUserExternalAssetCreateResponseV1**](InventoryapiUserExternalAssetCreateResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## query_accounts > query_accounts(opts) diff --git a/docs/DomainAWSAccountResourceMetadata.md b/docs/DomainAWSAccountResourceMetadata.md index 26c6a647..e0338fba 100644 --- a/docs/DomainAWSAccountResourceMetadata.md +++ b/docs/DomainAWSAccountResourceMetadata.md @@ -4,9 +4,14 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **created_at** | **Time** | | | +| **deleted_at** | **Time** | | | +| **id** | **Integer** | | | +| **updated_at** | **Time** | | | | **aws_cloudtrail_bucket_name** | **String** | AWS CloudTrail bucket name to store logs. | [optional] | | **aws_cloudtrail_region** | **String** | AWS CloudTrail region. | [optional] | | **aws_eventbus_arn** | **String** | AWS Eventbus ARN. | [optional] | +| **cid** | **String** | | [optional] | | **eventbus_name** | **String** | | [optional] | | **external_id** | **String** | ID assigned for use with cross account IAM role access. | [optional] | | **iam_role_arn** | **String** | The full arn of the IAM role created in this account to control access. | [optional] | @@ -18,9 +23,14 @@ require 'crimson-falcon' instance = Falcon::DomainAWSAccountResourceMetadata.new( + created_at: null, + deleted_at: null, + id: null, + updated_at: null, aws_cloudtrail_bucket_name: null, aws_cloudtrail_region: null, aws_eventbus_arn: null, + cid: null, eventbus_name: null, external_id: null, iam_role_arn: null, diff --git a/docs/DomainBenchmark.md b/docs/DomainBenchmark.md index 8782a8b2..d2af9bab 100644 --- a/docs/DomainBenchmark.md +++ b/docs/DomainBenchmark.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **applicable_profiles** | **Array<String>** | | [optional] | | **benchmark_short** | **String** | | | | **id** | **Integer** | | | | **recommendation_number** | **String** | | | @@ -14,6 +15,7 @@ require 'crimson-falcon' instance = Falcon::DomainBenchmark.new( + applicable_profiles: null, benchmark_short: null, id: null, recommendation_number: null diff --git a/docs/DomainContentUpdatePolicyRespV1.md b/docs/DomainContentUpdatePolicyRespV1.md new file mode 100644 index 00000000..176857fc --- /dev/null +++ b/docs/DomainContentUpdatePolicyRespV1.md @@ -0,0 +1,52 @@ +# Falcon::DomainContentUpdatePolicyRespV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **assignment_rule** | **String** | | | +| **assignment_type** | **String** | | | +| **channel_version** | **Integer** | | | +| **cid** | **String** | | | +| **created_by** | **String** | | | +| **created_timestamp** | **Time** | | | +| **description** | **String** | | | +| **enabled** | **Boolean** | | | +| **groups** | **Array<String>** | | | +| **id** | **String** | | | +| **modified_by** | **String** | | | +| **modified_timestamp** | **Time** | | | +| **name** | **String** | | | +| **platform_id** | **String** | | | +| **platform_name** | **String** | | | +| **precedence** | **Integer** | | | +| **settings** | [**DomainContentUpdateSettingsV1**](DomainContentUpdateSettingsV1.md) | | | +| **settings_hash** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainContentUpdatePolicyRespV1.new( + assignment_rule: null, + assignment_type: null, + channel_version: null, + cid: null, + created_by: null, + created_timestamp: null, + description: null, + enabled: null, + groups: null, + id: null, + modified_by: null, + modified_timestamp: null, + name: null, + platform_id: null, + platform_name: null, + precedence: null, + settings: null, + settings_hash: null +) +``` + diff --git a/docs/DomainContentUpdateSettingsV1.md b/docs/DomainContentUpdateSettingsV1.md new file mode 100644 index 00000000..ae9f40cd --- /dev/null +++ b/docs/DomainContentUpdateSettingsV1.md @@ -0,0 +1,18 @@ +# Falcon::DomainContentUpdateSettingsV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ring_assignment_settings** | [**Array<DomainRingAssignmentSettingsV1>**](DomainRingAssignmentSettingsV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainContentUpdateSettingsV1.new( + ring_assignment_settings: null +) +``` + diff --git a/docs/DomainDiscoverAPIActiveDiscoveryHost.md b/docs/DomainDiscoverAPIActiveDiscoveryHost.md index 9b363da8..a71c303d 100644 --- a/docs/DomainDiscoverAPIActiveDiscoveryHost.md +++ b/docs/DomainDiscoverAPIActiveDiscoveryHost.md @@ -4,6 +4,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **last_seen_network_id** | **String** | The ID of the network where the host was last seen | [optional] | +| **last_seen_site_id** | **String** | The ID of the site where the host was last seen | [optional] | | **networks** | [**Array<DomainDiscoverAPIActiveDiscoveryNetwork>**](DomainDiscoverAPIActiveDiscoveryNetwork.md) | The open ports discovered on the asset. | [optional] | | **open_ports** | **Array<String>** | The open ports discovered on the asset. | [optional] | @@ -13,6 +15,8 @@ require 'crimson-falcon' instance = Falcon::DomainDiscoverAPIActiveDiscoveryHost.new( + last_seen_network_id: null, + last_seen_site_id: null, networks: null, open_ports: null ) diff --git a/docs/DomainDiscoverAPIApplicationHost.md b/docs/DomainDiscoverAPIApplicationHost.md index 1fbf8297..0571352b 100644 --- a/docs/DomainDiscoverAPIApplicationHost.md +++ b/docs/DomainDiscoverAPIApplicationHost.md @@ -18,6 +18,7 @@ | **machine_domain** | **String** | The domain name the asset is currently joined to. | [optional] | | **os_version** | **String** | The OS version of the asset. | [optional] | | **ou** | **String** | The organizational unit of the asset. | [optional] | +| **ous** | **Array<String>** | The organizational units of the asset. | [optional] | | **platform_name** | **String** | The platform name of the asset (Windows, Mac, Linux). | [optional] | | **product_type_desc** | **String** | The product type of the asset (Workstation, Domain Controller, Server). | [optional] | | **site_name** | **String** | The site name of the domain the asset is joined to (applies only to Windows hosts). | [optional] | @@ -44,6 +45,7 @@ instance = Falcon::DomainDiscoverAPIApplicationHost.new( machine_domain: null, os_version: null, ou: null, + ous: null, platform_name: null, product_type_desc: null, site_name: null, diff --git a/docs/DomainDiscoverAPIHost.md b/docs/DomainDiscoverAPIHost.md index 8d825fbe..952e3ab0 100644 --- a/docs/DomainDiscoverAPIHost.md +++ b/docs/DomainDiscoverAPIHost.md @@ -7,6 +7,7 @@ | **account_enabled** | **String** | Whether the asset is account-enabled in Active Directory (Yes or No). | [optional] | | **active_discovery** | [**DomainDiscoverAPIActiveDiscoveryHost**](DomainDiscoverAPIActiveDiscoveryHost.md) | | [optional] | | **ad_user_account_control** | **Integer** | The user account control properties in Active Directory. | [optional] | +| **ad_virtual_server** | **String** | Whether the asset is a virtual server or not (Yes, No) | [optional] | | **agent_version** | **String** | The version of the Falcon sensor that's installed on the asset. | [optional] | | **aid** | **String** | The agent ID of the Falcon sensor installed on the asset. | [optional] | | **asset_roles** | **Array<String>** | The asset role or roles currently assigned to the asset either automatically or by a user (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). | [optional] | @@ -31,6 +32,7 @@ | **cloud_region** | **String** | The cloud provider assigned identifier of the cloud region the instance is located in (e.g. “us-west-1”, “westeurope”, “asia-northeast1) | [optional] | | **cloud_registered** | **Boolean** | Whether or not the instance is located in a cloud account registered with cloud security posture. | [optional] | | **cloud_resource_id** | **String** | The cloud provider assigned identifier of the instance. | [optional] | +| **composite_internet_exposure** | **String** | The composite internet exposure of the asset | [optional] | | **computed_asset_roles** | **Array<String>** | The asset role or roles assigned to the asset automatically (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). | [optional] | | **computed_internet_exposure** | **String** | Whether the asset is exposed to the internet as determined automatically (Yes, No, or Pending). | [optional] | | **computed_internet_exposure_external_ip** | **String** | External IP exposed to the internet. | [optional] | @@ -117,6 +119,7 @@ | **ot_network_ids** | **Array<String>** | A list of network ids to which host belongs | [optional] | | **ot_serial_numbers** | **Array<String>** | A list of ot serial numbers that discovered with host | [optional] | | **ou** | **String** | The organizational unit of the asset. | [optional] | +| **ous** | **Array<String>** | The organizational units of the asset. | [optional] | | **override_asset_roles** | **Boolean** | Whether a user overrode automatically assigned asset roles to manually assign a role to the asset (true or false). | [optional] | | **override_criticality_rules** | **Boolean** | Whether a user overrode a criticality rule to manually assign a criticality level on the asset (true or false). | [optional] | | **override_internet_exposure** | **Boolean** | Whether a user overrode the automatically assigned internet exposure (True or False). | [optional] | @@ -164,6 +167,7 @@ instance = Falcon::DomainDiscoverAPIHost.new( account_enabled: null, active_discovery: null, ad_user_account_control: null, + ad_virtual_server: null, agent_version: null, aid: null, asset_roles: null, @@ -188,6 +192,7 @@ instance = Falcon::DomainDiscoverAPIHost.new( cloud_region: null, cloud_registered: null, cloud_resource_id: null, + composite_internet_exposure: null, computed_asset_roles: null, computed_internet_exposure: null, computed_internet_exposure_external_ip: null, @@ -274,6 +279,7 @@ instance = Falcon::DomainDiscoverAPIHost.new( ot_network_ids: null, ot_serial_numbers: null, ou: null, + ous: null, override_asset_roles: null, override_criticality_rules: null, override_internet_exposure: null, diff --git a/docs/DomainDiscoverAPIIoTHost.md b/docs/DomainDiscoverAPIIoTHost.md index 3b39a435..77750a2a 100644 --- a/docs/DomainDiscoverAPIIoTHost.md +++ b/docs/DomainDiscoverAPIIoTHost.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **account_enabled** | **String** | Whether the asset is account-enabled in Active Directory (Yes or No). | [optional] | | **ad_user_account_control** | **Integer** | The user account control properties in Active Directory. | [optional] | +| **ad_virtual_server** | **String** | Whether the asset is a virtual server or not (Yes, No) | [optional] | | **agent_version** | **String** | The version of the Falcon sensor that's installed on the asset. | [optional] | | **aid** | **String** | The agent ID of the Falcon sensor installed on the asset. | [optional] | | **asset_roles** | **Array<String>** | The asset role or roles currently assigned to the asset either automatically or by a user (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). | [optional] | @@ -24,6 +25,7 @@ | **city** | **String** | The name of the city where the asset is located. | [optional] | | **claroty_id** | **String** | The external ID of the IoT Device in 3rd Party System(Claroty). | [optional] | | **classification** | **String** | How the server is classified, such as production, development, disaster recovery, or user acceptance testing. | [optional] | +| **composite_internet_exposure** | **String** | The composite internet exposure of the asset | [optional] | | **computed_asset_roles** | **Array<String>** | The asset role or roles assigned to the asset automatically (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). | [optional] | | **computed_internet_exposure** | **String** | Whether the asset is exposed to the internet as determined automatically (Yes, No, or Pending). | [optional] | | **computed_internet_exposure_external_ip** | **String** | External IP exposed to the internet. | [optional] | @@ -109,6 +111,7 @@ | **ot_network_ids** | **Array<String>** | A list of network ids to which host belongs | [optional] | | **ot_serial_numbers** | **Array<String>** | A list of ot serial numbers that discovered with host | [optional] | | **ou** | **String** | The organizational unit of the asset. | [optional] | +| **ous** | **Array<String>** | The organizational units of the asset. | [optional] | | **override_asset_roles** | **Boolean** | Whether a user overrode automatically assigned asset roles to manually assign a role to the asset (true or false). | [optional] | | **override_criticality_rules** | **Boolean** | Whether a user overrode a criticality rule to manually assign a criticality level on the asset (true or false). | [optional] | | **override_internet_exposure** | **Boolean** | Whether a user overrode the automatically assigned internet exposure (True or False). | [optional] | @@ -152,6 +155,7 @@ require 'crimson-falcon' instance = Falcon::DomainDiscoverAPIIoTHost.new( account_enabled: null, ad_user_account_control: null, + ad_virtual_server: null, agent_version: null, aid: null, asset_roles: null, @@ -170,6 +174,7 @@ instance = Falcon::DomainDiscoverAPIIoTHost.new( city: null, claroty_id: null, classification: null, + composite_internet_exposure: null, computed_asset_roles: null, computed_internet_exposure: null, computed_internet_exposure_external_ip: null, @@ -255,6 +260,7 @@ instance = Falcon::DomainDiscoverAPIIoTHost.new( ot_network_ids: null, ot_serial_numbers: null, ou: null, + ous: null, override_asset_roles: null, override_criticality_rules: null, override_internet_exposure: null, diff --git a/docs/DomainKestrelParams.md b/docs/DomainKestrelParams.md new file mode 100644 index 00000000..7b96d052 --- /dev/null +++ b/docs/DomainKestrelParams.md @@ -0,0 +1,18 @@ +# Falcon::DomainKestrelParams + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **view_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainKestrelParams.new( + view_id: null +) +``` + diff --git a/docs/DomainLookupFile.md b/docs/DomainLookupFile.md new file mode 100644 index 00000000..427fc299 --- /dev/null +++ b/docs/DomainLookupFile.md @@ -0,0 +1,50 @@ +# Falcon::DomainLookupFile + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **String** | | [optional] | +| **cid** | **String** | | [optional] | +| **contents_hash** | **String** | | | +| **created_by** | [**DomainUser**](DomainUser.md) | | | +| **created_timestamp** | **Time** | | | +| **description** | **String** | | | +| **filename** | **String** | | | +| **format** | **String** | | | +| **id** | **String** | | | +| **last_modified_by** | [**DomainUser**](DomainUser.md) | | | +| **last_modified_timestamp** | **Time** | | | +| **name** | **String** | | | +| **repo** | **String** | | | +| **size** | **Integer** | | | +| **status** | **String** | | | +| **version** | **String** | | | +| **version_numeric** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainLookupFile.new( + app_id: null, + cid: null, + contents_hash: null, + created_by: null, + created_timestamp: null, + description: null, + filename: null, + format: null, + id: null, + last_modified_by: null, + last_modified_timestamp: null, + name: null, + repo: null, + size: null, + status: null, + version: null, + version_numeric: null +) +``` + diff --git a/docs/DomainLookupFileWrapper.md b/docs/DomainLookupFileWrapper.md new file mode 100644 index 00000000..d5afee91 --- /dev/null +++ b/docs/DomainLookupFileWrapper.md @@ -0,0 +1,22 @@ +# Falcon::DomainLookupFileWrapper + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<DomainLookupFile>**](DomainLookupFile.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainLookupFileWrapper.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DomainReportMetadata.md b/docs/DomainReportMetadata.md index d0c9e2c4..78597351 100644 --- a/docs/DomainReportMetadata.md +++ b/docs/DomainReportMetadata.md @@ -7,6 +7,7 @@ | **created_by_user_id** | **String** | | | | **created_by_uuid** | **String** | | | | **discover_params** | [**DomainDiscoverParams**](DomainDiscoverParams.md) | | [optional] | +| **kestrel_params** | [**DomainKestrelParams**](DomainKestrelParams.md) | | [optional] | | **last_scheduled_execution** | [**DomainLastScheduledExecution**](DomainLastScheduledExecution.md) | | [optional] | | **last_unscheduled_execution** | [**DomainLastUnscheduledExecution**](DomainLastUnscheduledExecution.md) | | | | **subtype** | **String** | | | @@ -21,6 +22,7 @@ instance = Falcon::DomainReportMetadata.new( created_by_user_id: null, created_by_uuid: null, discover_params: null, + kestrel_params: null, last_scheduled_execution: null, last_unscheduled_execution: null, subtype: null, diff --git a/docs/DomainRingAssignmentSettingsV1.md b/docs/DomainRingAssignmentSettingsV1.md new file mode 100644 index 00000000..e3eafdf3 --- /dev/null +++ b/docs/DomainRingAssignmentSettingsV1.md @@ -0,0 +1,22 @@ +# Falcon::DomainRingAssignmentSettingsV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | | +| **override** | **Integer** | | | +| **ring_assignment** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainRingAssignmentSettingsV1.new( + id: null, + override: null, + ring_assignment: null +) +``` + diff --git a/docs/DomainScheduledReportV1.md b/docs/DomainScheduledReportV1.md index 289ffd56..1ec1b9fb 100644 --- a/docs/DomainScheduledReportV1.md +++ b/docs/DomainScheduledReportV1.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **api_client_id** | **String** | | | | **can_write** | **Boolean** | | [optional] | | **created_on** | **Time** | | | | **customer_id** | **String** | | | @@ -35,6 +36,7 @@ require 'crimson-falcon' instance = Falcon::DomainScheduledReportV1.new( + api_client_id: null, can_write: null, created_on: null, customer_id: null, diff --git a/docs/DomainUpdateRuleRequestV1.md b/docs/DomainUpdateRuleRequestV1.md index c63c920b..7a338c26 100644 --- a/docs/DomainUpdateRuleRequestV1.md +++ b/docs/DomainUpdateRuleRequestV1.md @@ -8,6 +8,7 @@ | **breach_monitoring_enabled** | **Boolean** | Whether to monitor for breach data. Available only for `Company Domains` and `Email addresses` rule topics. When enabled, ownership of the monitored domains or emails is required | | | **filter** | **String** | The FQL filter to be used for searching | | | **id** | **String** | The rule ID to be updated | | +| **match_on_tsq_result_types** | **Array<String>** | Which result types to monitor for. Can be set to only monitor domains or subdomains, as well as both. Only available for the `Typosquatting` rule topic. | | | **name** | **String** | The name of a given rule | | | **permissions** | **String** | The permissions for a given rule which specifies the rule's access by other users. Possible values: [`public`, `private`] | | | **priority** | **String** | The priority for a given rule. Possible values: [`low`, `medium`, `high`] | | @@ -23,6 +24,7 @@ instance = Falcon::DomainUpdateRuleRequestV1.new( breach_monitoring_enabled: null, filter: null, id: null, + match_on_tsq_result_types: null, name: null, permissions: null, priority: null, diff --git a/docs/DriftIndicators.md b/docs/DriftIndicators.md index 32922b88..e57835b4 100644 --- a/docs/DriftIndicators.md +++ b/docs/DriftIndicators.md @@ -7,8 +7,8 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**get_drift_indicators_values_by_date**](DriftIndicators.md#get_drift_indicators_values_by_date) | **GET** /container-security/aggregates/drift-indicators/count-by-date/v1 | Returns the count of Drift Indicators by the date. by default it's for 7 days. | | [**read_drift_indicator_entities**](DriftIndicators.md#read_drift_indicator_entities) | **GET** /container-security/entities/drift-indicators/v1 | Retrieve Drift Indicator entities identified by the provided IDs | | [**read_drift_indicators_count**](DriftIndicators.md#read_drift_indicators_count) | **GET** /container-security/aggregates/drift-indicators/count/v1 | Returns the total count of Drift indicators over a time period | -| [**search_and_read_drift_indicator_entities**](DriftIndicators.md#search_and_read_drift_indicator_entities) | **GET** /container-security/combined/drift-indicators/v1 | Retrieve Drift Indicators by the provided search criteria | -| [**search_drift_indicators**](DriftIndicators.md#search_drift_indicators) | **GET** /container-security/queries/drift-indicators/v1 | Retrieve all drift indicators that match the given query | +| [**search_and_read_drift_indicator_entities**](DriftIndicators.md#search_and_read_drift_indicator_entities) | **GET** /container-security/combined/drift-indicators/v1 | Maximum offset = 10000 - limit | +| [**search_drift_indicators**](DriftIndicators.md#search_drift_indicators) | **GET** /container-security/queries/drift-indicators/v1 | Maximum offset = 10000 - limit | ## get_drift_indicators_values_by_date @@ -32,7 +32,7 @@ end api_instance = Falcon::DriftIndicators.new opts = { - filter: 'filter_example', # String | Filter drift indicators using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + filter: 'filter_example', # String | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` limit: 56 # Integer | The upper-bound on the number of records to retrieve. } @@ -67,7 +67,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter drift indicators using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name | [optional] | +| **filter** | **String** | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` | [optional] | | **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | ### Return type @@ -176,7 +176,7 @@ end api_instance = Falcon::DriftIndicators.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + filter: 'filter_example' # String | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` } begin @@ -210,7 +210,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name | [optional] | +| **filter** | **String** | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` | [optional] | ### Return type @@ -230,7 +230,7 @@ end > search_and_read_drift_indicator_entities(opts) -Retrieve Drift Indicators by the provided search criteria +Maximum offset = 10000 - limit ### Examples @@ -247,14 +247,14 @@ end api_instance = Falcon::DriftIndicators.new opts = { - filter: 'filter_example', # String | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name + filter: 'filter_example', # String | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve Drift Indicators by the provided search criteria + # Maximum offset = 10000 - limit result = api_instance.search_and_read_drift_indicator_entities(opts) p result rescue Falcon::ApiError => e @@ -270,7 +270,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve Drift Indicators by the provided search criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.search_and_read_drift_indicator_entities_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -284,10 +284,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | -| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **filter** | **String** | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` | [optional] | | **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -307,7 +307,7 @@ end > search_drift_indicators(opts) -Retrieve all drift indicators that match the given query +Maximum offset = 10000 - limit ### Examples @@ -324,14 +324,14 @@ end api_instance = Falcon::DriftIndicators.new opts = { - filter: 'filter_example', # String | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name + filter: 'filter_example', # String | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve all drift indicators that match the given query + # Maximum offset = 10000 - limit result = api_instance.search_drift_indicators(opts) p result rescue Falcon::ApiError => e @@ -347,7 +347,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve all drift indicators that match the given query + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.search_drift_indicators_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -361,10 +361,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | -| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **filter** | **String** | Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` | [optional] | | **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type diff --git a/docs/ExposureManagement.md b/docs/ExposureManagement.md index 6f47646b..b0361104 100644 --- a/docs/ExposureManagement.md +++ b/docs/ExposureManagement.md @@ -256,6 +256,7 @@ api_instance = Falcon::ExposureManagement.new opts = { offset: 56, # Integer | Starting index of result set from which to return subsidiaries limit: 56, # Integer | The maximum number of subsidiaries to return in the response. + filter: 'filter_example', # String | Filter ecosystem subsidiaries sort: 'sort_example', # String | The field by which to sort the list of subsidiaries. Possible values:
  • name
  • primary_domain

Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). version_id: 'version_id_example' # String | The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. } @@ -293,6 +294,7 @@ end | ---- | ---- | ----------- | ----- | | **offset** | **Integer** | Starting index of result set from which to return subsidiaries | [optional][default to 0] | | **limit** | **Integer** | The maximum number of subsidiaries to return in the response. | [optional][default to 100] | +| **filter** | **String** | Filter ecosystem subsidiaries | [optional] | | **sort** | **String** | The field by which to sort the list of subsidiaries. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). | [optional] | | **version_id** | **String** | The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. | [optional] | @@ -615,6 +617,7 @@ api_instance = Falcon::ExposureManagement.new opts = { offset: 56, # Integer | Starting index of result set from which to return subsidiaries limit: 56, # Integer | The maximum number of IDs to return in the response. + filter: 'filter_example', # String | Filter ecosystem subsidiaries sort: 'sort_example', # String | The field by which to sort the list of IDs. Possible values:
  • name
  • primary_domain

Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). version_id: 'version_id_example' # String | The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. } @@ -652,6 +655,7 @@ end | ---- | ---- | ----------- | ----- | | **offset** | **Integer** | Starting index of result set from which to return subsidiaries | [optional][default to 0] | | **limit** | **Integer** | The maximum number of IDs to return in the response. | [optional][default to 100] | +| **filter** | **String** | Filter ecosystem subsidiaries | [optional] | | **sort** | **String** | The field by which to sort the list of IDs. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). | [optional] | | **version_id** | **String** | The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. | [optional] | diff --git a/docs/FalconContainerImage.md b/docs/FalconContainerImage.md index 10b4033c..fbdd1744 100644 --- a/docs/FalconContainerImage.md +++ b/docs/FalconContainerImage.md @@ -10,8 +10,8 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**launch_export_job**](FalconContainerImage.md#launch_export_job) | **POST** /container-security/entities/exports/v1 | Launch an export job of a Container Security resource. Maximum of 1 job in progress per resource | | [**query_export_jobs**](FalconContainerImage.md#query_export_jobs) | **GET** /container-security/queries/exports/v1 | Query export jobs entities | | [**read_export_jobs**](FalconContainerImage.md#read_export_jobs) | **GET** /container-security/entities/exports/v1 | Read export jobs entities | -| [**read_registry_entities**](FalconContainerImage.md#read_registry_entities) | **GET** /container-security/queries/registries/v1 | Retrieve registry entities identified by the customer id | -| [**read_registry_entities_by_uuid**](FalconContainerImage.md#read_registry_entities_by_uuid) | **GET** /container-security/entities/registries/v1 | Retrieve the registry entity identified by the entity UUID | +| [**read_registry_entities**](FalconContainerImage.md#read_registry_entities) | **GET** /container-security/queries/registries/v1 | Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 | +| [**read_registry_entities_by_uuid**](FalconContainerImage.md#read_registry_entities_by_uuid) | **GET** /container-security/entities/registries/v1 | Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 | | [**update_registry_entities**](FalconContainerImage.md#update_registry_entities) | **PATCH** /container-security/entities/registries/v1 | Update the registry entity, as identified by the entity UUID, using the provided details | @@ -242,7 +242,7 @@ Falcon.configure do |config| end api_instance = Falcon::FalconContainerImage.new -body = Falcon::ExportsLaunchExportRequest.new({format: 'format_example', resource: 'resource_example', sort: 'sort_example'}) # ExportsLaunchExportRequest | Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` +body = Falcon::ExportsLaunchExportRequest.new({format: 'format_example', resource: 'resource_example', sort: 'sort_example'}) # ExportsLaunchExportRequest | Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-detections-expanded` - `images.images-assessment-expanded` - `images.images-assessment-vulnerabilities-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` begin # Launch an export job of a Container Security resource. Maximum of 1 job in progress per resource @@ -275,7 +275,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **body** | [**ExportsLaunchExportRequest**](ExportsLaunchExportRequest.md) | Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` | | +| **body** | [**ExportsLaunchExportRequest**](ExportsLaunchExportRequest.md) | Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-detections-expanded` - `images.images-assessment-expanded` - `images.images-assessment-vulnerabilities-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` | | ### Return type @@ -312,7 +312,7 @@ end api_instance = Falcon::FalconContainerImage.new opts = { - filter: 'filter_example' # String | FQL query specifying the filter parameters. Only the last 100 jobs are returned. Supported filters: - `resource`: (string) - `status`: (string) + filter: 'filter_example' # String | Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: - `resource` - `status` } begin @@ -346,7 +346,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | FQL query specifying the filter parameters. Only the last 100 jobs are returned. Supported filters: - `resource`: (string) - `status`: (string) | [optional] | +| **filter** | **String** | Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: - `resource` - `status` | [optional] | ### Return type @@ -435,7 +435,7 @@ end > read_registry_entities(opts) -Retrieve registry entities identified by the customer id +Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 ### Examples @@ -454,11 +454,11 @@ api_instance = Falcon::FalconContainerImage.new opts = { limit: 56, # Integer | The upper-bound on the number of records to retrieve. offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The field to sort on, e.g. id.desc or id.asc. + sort: 'sort_example' # String | The fields to sort the records on. } begin - # Retrieve registry entities identified by the customer id + # Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 result = api_instance.read_registry_entities(opts) p result rescue Falcon::ApiError => e @@ -474,7 +474,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve registry entities identified by the customer id + # Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 data, status_code, headers = api_instance.read_registry_entities_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -490,7 +490,7 @@ end | ---- | ---- | ----------- | ----- | | **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The field to sort on, e.g. id.desc or id.asc. | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | ### Return type @@ -510,7 +510,7 @@ end > read_registry_entities_by_uuid(ids) -Retrieve the registry entity identified by the entity UUID +Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 ### Examples @@ -529,7 +529,7 @@ api_instance = Falcon::FalconContainerImage.new ids = 'ids_example' # String | Registry entity UUID begin - # Retrieve the registry entity identified by the entity UUID + # Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 result = api_instance.read_registry_entities_by_uuid(ids) p result rescue Falcon::ApiError => e @@ -545,7 +545,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve the registry entity identified by the entity UUID + # Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 data, status_code, headers = api_instance.read_registry_entities_by_uuid_with_http_info(ids) p status_code # => 2xx p headers # => { ... } diff --git a/docs/FalconxSandbox.md b/docs/FalconxSandbox.md index be7615f2..c385755e 100644 --- a/docs/FalconxSandbox.md +++ b/docs/FalconxSandbox.md @@ -306,7 +306,7 @@ end ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/octet-stream +- **Accept**: application/octet-stream, application/json ## get_memory_dump_extracted_strings @@ -598,7 +598,7 @@ end ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/octet-stream +- **Accept**: application/octet-stream, application/json ## get_submissions diff --git a/docs/FigapiAdversary.md b/docs/FigapiAdversary.md new file mode 100644 index 00000000..bd6249d6 --- /dev/null +++ b/docs/FigapiAdversary.md @@ -0,0 +1,18 @@ +# Falcon::FigapiAdversary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | Name of the adversary | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiAdversary.new( + name: null +) +``` + diff --git a/docs/FigapiCountry.md b/docs/FigapiCountry.md new file mode 100644 index 00000000..e2b758ac --- /dev/null +++ b/docs/FigapiCountry.md @@ -0,0 +1,20 @@ +# Falcon::FigapiCountry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **country_code** | **String** | Two letters representation of the country name, e.g. `RO`, `US`, `RU`, etc. | [optional] | +| **name** | **String** | Full country name, e.g. `Romania`, `United States`, `Russian Federation` etc. | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiCountry.new( + country_code: null, + name: null +) +``` + diff --git a/docs/FigapiDomain.md b/docs/FigapiDomain.md new file mode 100644 index 00000000..49f46061 --- /dev/null +++ b/docs/FigapiDomain.md @@ -0,0 +1,40 @@ +# Falcon::FigapiDomain + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **creation_date** | **String** | | [optional] | +| **domain** | **String** | | [optional] | +| **domain_updated_date** | **String** | | [optional] | +| **email_addresses** | [**Array<FigapiEmailAddress>**](FigapiEmailAddress.md) | | [optional] | +| **expiration_date** | **String** | | [optional] | +| **ipv4_addresses** | [**Array<FigapiIPv4>**](FigapiIPv4.md) | | [optional] | +| **ipv6_addresses** | [**Array<FigapiIPv6>**](FigapiIPv6.md) | | [optional] | +| **mx_records** | [**Array<FigapiMXRecord>**](FigapiMXRecord.md) | | [optional] | +| **name_servers** | [**Array<FigapiNameServer>**](FigapiNameServer.md) | | [optional] | +| **registrar** | **String** | | [optional] | +| **registrar_status** | **Array<String>** | | [optional] | +| **who_is** | [**FigapiWhoIS**](FigapiWhoIS.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiDomain.new( + creation_date: null, + domain: null, + domain_updated_date: null, + email_addresses: null, + expiration_date: null, + ipv4_addresses: null, + ipv6_addresses: null, + mx_records: null, + name_servers: null, + registrar: null, + registrar_status: null, + who_is: null +) +``` + diff --git a/docs/FigapiEmailAddress.md b/docs/FigapiEmailAddress.md new file mode 100644 index 00000000..4da3a89a --- /dev/null +++ b/docs/FigapiEmailAddress.md @@ -0,0 +1,22 @@ +# Falcon::FigapiEmailAddress + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **address** | **String** | | [optional] | +| **contact_role** | **String** | | [optional] | +| **source** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiEmailAddress.new( + address: null, + contact_role: null, + source: null +) +``` + diff --git a/docs/FigapiFile.md b/docs/FigapiFile.md new file mode 100644 index 00000000..77348cf6 --- /dev/null +++ b/docs/FigapiFile.md @@ -0,0 +1,30 @@ +# Falcon::FigapiFile + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **file_properties** | **Array<String>** | This can be one of: `C2Config`, `Phishing`, `ProxyScript`, `RansomNote`, `Certificate`, `JA3`, `PEResource`, `PEOverlay`, `PESection` | [optional] | +| **file_size** | **Integer** | Size of the file | [optional] | +| **file_type** | **Array<String>** | Type of the file | [optional] | +| **md5** | **String** | MD5 hash of the file | [optional] | +| **magic_file_type** | **String** | libmagic (file command) output on the sample | [optional] | +| **sha1** | **String** | SHA1 hash of the file | [optional] | +| **sha256** | **String** | SHA256 hash of the file | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiFile.new( + file_properties: null, + file_size: null, + file_type: null, + md5: null, + magic_file_type: null, + sha1: null, + sha256: null +) +``` + diff --git a/docs/FigapiIPv4.md b/docs/FigapiIPv4.md new file mode 100644 index 00000000..9f90609a --- /dev/null +++ b/docs/FigapiIPv4.md @@ -0,0 +1,24 @@ +# Falcon::FigapiIPv4 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **asn** | **Array<Integer>** | Autonomous System Number | [optional] | +| **ip_properties** | **Array<String>** | This can be one of: `AdversaryControlled`, `CDN`, `PublicDNSResolver`, `CaptivePortal`, `DNSSinkhole`, `DNSRootServer`, `HoneypotHoneypot`, etc. | [optional] | +| **ipv4** | **String** | The IPv4 address as a string | [optional] | +| **isp** | **String** | Internet service provider | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiIPv4.new( + asn: null, + ip_properties: null, + ipv4: null, + isp: null +) +``` + diff --git a/docs/FigapiIPv6.md b/docs/FigapiIPv6.md new file mode 100644 index 00000000..93e130a6 --- /dev/null +++ b/docs/FigapiIPv6.md @@ -0,0 +1,24 @@ +# Falcon::FigapiIPv6 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **asn** | **Array<Integer>** | An array of Autonomous System Numbers (ASNs) | [optional] | +| **ip_properties** | **Array<String>** | This can be one of: `AdversaryControlled`, `CDN`, `PublicDNSResolver`, `CaptivePortal`, `DNSSinkhole`, `DNSRootServer`, `HoneypotHoneypot`, etc. | [optional] | +| **ipv6** | **String** | The IPv6 address as a string | [optional] | +| **isp** | **String** | Internet service provider | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiIPv6.new( + asn: null, + ip_properties: null, + ipv6: null, + isp: null +) +``` + diff --git a/docs/FigapiIndicator.md b/docs/FigapiIndicator.md new file mode 100644 index 00000000..33712801 --- /dev/null +++ b/docs/FigapiIndicator.md @@ -0,0 +1,62 @@ +# Falcon::FigapiIndicator + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **adversaries** | [**Array<FigapiAdversary>**](FigapiAdversary.md) | | [optional] | +| **certificates** | [**Array<FigapiX509Certificate>**](FigapiX509Certificate.md) | | [optional] | +| **countries** | [**Array<FigapiCountry>**](FigapiCountry.md) | | [optional] | +| **domain_details** | [**FigapiDomain**](FigapiDomain.md) | | [optional] | +| **file_details** | [**FigapiFile**](FigapiFile.md) | | [optional] | +| **first_seen** | **String** | Indicators first seen | [optional] | +| **id** | **String** | The indicator ID. Concatenation of type and indicator fields. Based on the CKB2 vertex ID. | [optional] | +| **ipv4_details** | [**FigapiIPv4**](FigapiIPv4.md) | | [optional] | +| **ipv6_details** | [**FigapiIPv6**](FigapiIPv6.md) | | [optional] | +| **kill_chain** | **Array<String>** | Multi field property describing indicators kill-chain, possible properties: `ActionOnObjectives`, `C2`, `Delivery`, `Exploitation`, `Installation`, `Reconnaissance`, `Weaponization` | [optional] | +| **last_seen** | **String** | Indicators last seen | [optional] | +| **last_updated** | **String** | | [optional] | +| **malicious_confidence** | **String** | Indicates a confidence level by which an indicator is considered to be malicious, this can be one of: `Low`, `Medium`, `High` | [optional] | +| **malicious_confidence_validated_time** | **String** | Indicates when was the confidence was last set | [optional] | +| **publish_date** | **String** | | [optional] | +| **reports** | [**Array<FigapiReport>**](FigapiReport.md) | | [optional] | +| **sectors** | [**Array<FigapiSector>**](FigapiSector.md) | | [optional] | +| **threat_types** | **Array<String>** | | [optional] | +| **threats** | [**Array<FigapiThreat>**](FigapiThreat.md) | | [optional] | +| **type** | **String** | Type of the indicator, this can be one of: `File`, `Domain`, `IPv4`, `IPv6`, `URL` | [optional] | +| **url_details** | [**FigapiURL**](FigapiURL.md) | | [optional] | +| **victimology** | **String** | TBD | [optional] | +| **vulnerabilities** | [**Array<FigapiVulnerability>**](FigapiVulnerability.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiIndicator.new( + adversaries: null, + certificates: null, + countries: null, + domain_details: null, + file_details: null, + first_seen: null, + id: null, + ipv4_details: null, + ipv6_details: null, + kill_chain: null, + last_seen: null, + last_updated: null, + malicious_confidence: null, + malicious_confidence_validated_time: null, + publish_date: null, + reports: null, + sectors: null, + threat_types: null, + threats: null, + type: null, + url_details: null, + victimology: null, + vulnerabilities: null +) +``` + diff --git a/docs/FigapiMXRecord.md b/docs/FigapiMXRecord.md new file mode 100644 index 00000000..2218df82 --- /dev/null +++ b/docs/FigapiMXRecord.md @@ -0,0 +1,26 @@ +# Falcon::FigapiMXRecord + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **domain** | **String** | | | +| **hostname** | **String** | | [optional] | +| **ipv4_addresses** | [**Array<FigapiIPv4>**](FigapiIPv4.md) | | [optional] | +| **ipv6_addresses** | [**Array<FigapiIPv6>**](FigapiIPv6.md) | | [optional] | +| **priority** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiMXRecord.new( + domain: null, + hostname: null, + ipv4_addresses: null, + ipv6_addresses: null, + priority: null +) +``` + diff --git a/docs/FigapiNameServer.md b/docs/FigapiNameServer.md new file mode 100644 index 00000000..e2e39795 --- /dev/null +++ b/docs/FigapiNameServer.md @@ -0,0 +1,22 @@ +# Falcon::FigapiNameServer + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **domain** | **String** | | [optional] | +| **hostname** | **String** | | [optional] | +| **ip_addresses** | [**Array<FigapiIPv4>**](FigapiIPv4.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiNameServer.new( + domain: null, + hostname: null, + ip_addresses: null +) +``` + diff --git a/docs/FigapiReport.md b/docs/FigapiReport.md new file mode 100644 index 00000000..85d34a90 --- /dev/null +++ b/docs/FigapiReport.md @@ -0,0 +1,18 @@ +# Falcon::FigapiReport + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | Title of the report | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiReport.new( + title: null +) +``` + diff --git a/docs/FigapiSector.md b/docs/FigapiSector.md new file mode 100644 index 00000000..c991de7e --- /dev/null +++ b/docs/FigapiSector.md @@ -0,0 +1,20 @@ +# Falcon::FigapiSector + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **definition** | **String** | Definition of sector | [optional] | +| **name** | **String** | Name of the sector, e.g. `Automotive`, `Travel`, `Logistics`, `Maritime`, etc. | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiSector.new( + definition: null, + name: null +) +``` + diff --git a/docs/FigapiThreat.md b/docs/FigapiThreat.md new file mode 100644 index 00000000..e2716af6 --- /dev/null +++ b/docs/FigapiThreat.md @@ -0,0 +1,18 @@ +# Falcon::FigapiThreat + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **family_name** | **String** | Indicates the malware/threat family the indicator has been associated with, name assigned internally by Crowdstrike | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiThreat.new( + family_name: null +) +``` + diff --git a/docs/FigapiURL.md b/docs/FigapiURL.md new file mode 100644 index 00000000..fedf6edd --- /dev/null +++ b/docs/FigapiURL.md @@ -0,0 +1,20 @@ +# Falcon::FigapiURL + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **url** | **String** | SHA256 hash of the file | [optional] | +| **url_properties** | **Array<String>** | This can be one of: `DeadDrop`, `PaymentAddress`, `ProxyScript`. | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiURL.new( + url: null, + url_properties: null +) +``` + diff --git a/docs/FigapiVulnerability.md b/docs/FigapiVulnerability.md new file mode 100644 index 00000000..78e54981 --- /dev/null +++ b/docs/FigapiVulnerability.md @@ -0,0 +1,48 @@ +# Falcon::FigapiVulnerability + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cpe_edition** | **String** | | [optional] | +| **cpe_language** | **String** | | [optional] | +| **cpe_other** | **String** | | [optional] | +| **cpe_part** | **String** | | [optional] | +| **cpe_product** | **String** | | [optional] | +| **cpe_software_edition** | **String** | | [optional] | +| **cpe_target_hardware** | **String** | | [optional] | +| **cpe_target_software** | **String** | | [optional] | +| **cpe_update** | **String** | | [optional] | +| **cpe_vendor** | **String** | | [optional] | +| **cpe_version** | **String** | | [optional] | +| **cve** | **String** | CVE(Common Vulnerabilities and Exposures) is a unique identifier assigned to publicly disclosed cyber security vulnerabilities | [optional] | +| **description** | **String** | Description of the vulnerability. | [optional] | +| **exploit_status** | **String** | This can be one of: `Unproven`, `Available`, `EasilyAccessible`, `ActivelyUsed`. | [optional] | +| **last_updated** | **String** | The date when the vulnerability was last updated | [optional] | +| **published_date** | **String** | The date when the vulnerability was published | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiVulnerability.new( + cpe_edition: null, + cpe_language: null, + cpe_other: null, + cpe_part: null, + cpe_product: null, + cpe_software_edition: null, + cpe_target_hardware: null, + cpe_target_software: null, + cpe_update: null, + cpe_vendor: null, + cpe_version: null, + cve: null, + description: null, + exploit_status: null, + last_updated: null, + published_date: null +) +``` + diff --git a/docs/FigapiWhoIS.md b/docs/FigapiWhoIS.md new file mode 100644 index 00000000..aba5a27d --- /dev/null +++ b/docs/FigapiWhoIS.md @@ -0,0 +1,24 @@ +# Falcon::FigapiWhoIS + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **admin_contact** | [**FigapiWhoisRecord**](FigapiWhoisRecord.md) | | [optional] | +| **billing_contact** | [**FigapiWhoisRecord**](FigapiWhoisRecord.md) | | [optional] | +| **registrant_contact** | [**FigapiWhoisRecord**](FigapiWhoisRecord.md) | | [optional] | +| **technical_contact** | [**FigapiWhoisRecord**](FigapiWhoisRecord.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiWhoIS.new( + admin_contact: null, + billing_contact: null, + registrant_contact: null, + technical_contact: null +) +``` + diff --git a/docs/FigapiWhoisRecord.md b/docs/FigapiWhoisRecord.md new file mode 100644 index 00000000..37dfbc45 --- /dev/null +++ b/docs/FigapiWhoisRecord.md @@ -0,0 +1,34 @@ +# Falcon::FigapiWhoisRecord + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **city** | **String** | | [optional] | +| **country** | **String** | | [optional] | +| **fax** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **org** | **String** | | [optional] | +| **phone** | **String** | | [optional] | +| **postal_code** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **street** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiWhoisRecord.new( + city: null, + country: null, + fax: null, + name: null, + org: null, + phone: null, + postal_code: null, + state: null, + street: null +) +``` + diff --git a/docs/FigapiX509Certificate.md b/docs/FigapiX509Certificate.md new file mode 100644 index 00000000..c955c156 --- /dev/null +++ b/docs/FigapiX509Certificate.md @@ -0,0 +1,32 @@ +# Falcon::FigapiX509Certificate + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **certificate_hash** | **String** | | [optional] | +| **common_name** | **String** | | [optional] | +| **email_address** | **String** | | [optional] | +| **issuer_common_name** | **String** | | [optional] | +| **organization** | **String** | | [optional] | +| **public_key_type** | **String** | | [optional] | +| **signature_algorithm** | **String** | | [optional] | +| **subject** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::FigapiX509Certificate.new( + certificate_hash: null, + common_name: null, + email_address: null, + issuer_common_name: null, + organization: null, + public_key_type: null, + signature_algorithm: null, + subject: null +) +``` + diff --git a/docs/Filevantage.md b/docs/Filevantage.md index cfbb4d58..dff361fb 100644 --- a/docs/Filevantage.md +++ b/docs/Filevantage.md @@ -4,7 +4,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**create_policies_0**](Filevantage.md#create_policies_0) | **POST** /filevantage/entities/policies/v1 | Creates a new policy of the specified type. New policies are always added at the end of the precedence list for the provided policy type. | +| [**create_policies**](Filevantage.md#create_policies) | **POST** /filevantage/entities/policies/v1 | Creates a new policy of the specified type. New policies are always added at the end of the precedence list for the provided policy type. | | [**create_rule_groups**](Filevantage.md#create_rule_groups) | **POST** /filevantage/entities/rule-groups/v1 | Creates a new rule group of the specified type. | | [**create_rules**](Filevantage.md#create_rules) | **POST** /filevantage/entities/rule-groups-rules/v1 | Creates a new rule configuration within the specified rule group. | | [**create_scheduled_exclusions**](Filevantage.md#create_scheduled_exclusions) | **POST** /filevantage/entities/policy-scheduled-exclusions/v1 | Creates a new scheduled exclusion configuration for the provided policy id. | @@ -27,9 +27,9 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**query_scheduled_exclusions**](Filevantage.md#query_scheduled_exclusions) | **GET** /filevantage/queries/policy-scheduled-exclusions/v1 | Retrieve the ids of all scheduled exclusions contained within the provided policy id. | | [**signal_changes_external**](Filevantage.md#signal_changes_external) | **POST** /filevantage/entities/workflow/v1 | Initiates workflows for the provided change ids | | [**start_actions**](Filevantage.md#start_actions) | **POST** /filevantage/entities/actions/v1 | Initiates the specified action on the provided change ids | -| [**update_policies_0**](Filevantage.md#update_policies_0) | **PATCH** /filevantage/entities/policies/v1 | Updates the general information of the provided policy. | +| [**update_policies**](Filevantage.md#update_policies) | **PATCH** /filevantage/entities/policies/v1 | Updates the general information of the provided policy. | | [**update_policy_host_groups**](Filevantage.md#update_policy_host_groups) | **PATCH** /filevantage/entities/policies-host-groups/v1 | Manage host groups assigned to a policy. | -| [**update_policy_precedence_0**](Filevantage.md#update_policy_precedence_0) | **PATCH** /filevantage/entities/policies-precedence/v1 | Updates the policy precedence for all policies of a specific type. | +| [**update_policy_precedence**](Filevantage.md#update_policy_precedence) | **PATCH** /filevantage/entities/policies-precedence/v1 | Updates the policy precedence for all policies of a specific type. | | [**update_policy_rule_groups**](Filevantage.md#update_policy_rule_groups) | **PATCH** /filevantage/entities/policies-rule-groups/v1 | Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. | | [**update_rule_group_precedence**](Filevantage.md#update_rule_group_precedence) | **PATCH** /filevantage/entities/rule-groups-rule-precedence/v1 | Updates the rule precedence for all rules in the identified rule group. | | [**update_rule_groups**](Filevantage.md#update_rule_groups) | **PATCH** /filevantage/entities/rule-groups/v1 | Updates the provided rule group. | @@ -37,9 +37,9 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**update_scheduled_exclusions**](Filevantage.md#update_scheduled_exclusions) | **PATCH** /filevantage/entities/policy-scheduled-exclusions/v1 | Updates the provided scheduled exclusion configuration within the provided policy. | -## create_policies_0 +## create_policies -> create_policies_0(body) +> create_policies(body) Creates a new policy of the specified type. New policies are always added at the end of the precedence list for the provided policy type. @@ -63,28 +63,28 @@ body = Falcon::PoliciesCreateRequest.new({name: 'name_example'}) # PoliciesCreat begin # Creates a new policy of the specified type. New policies are always added at the end of the precedence list for the provided policy type. - result = api_instance.create_policies_0(body) + result = api_instance.create_policies(body) p result rescue Falcon::ApiError => e - puts "Error when calling Filevantage->create_policies_0: #{e}" + puts "Error when calling Filevantage->create_policies: #{e}" end ``` -#### Using the create_policies_0_with_http_info variant +#### Using the create_policies_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> create_policies_0_with_http_info(body) +> , Integer, Hash)> create_policies_with_http_info(body) ```ruby begin # Creates a new policy of the specified type. New policies are always added at the end of the precedence list for the provided policy type. - data, status_code, headers = api_instance.create_policies_0_with_http_info(body) + data, status_code, headers = api_instance.create_policies_with_http_info(body) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Filevantage->create_policies_0_with_http_info: #{e}" + puts "Error when calling Filevantage->create_policies_with_http_info: #{e}" end ``` @@ -1722,9 +1722,9 @@ end - **Accept**: application/json -## update_policies_0 +## update_policies -> update_policies_0(body) +> update_policies(body) Updates the general information of the provided policy. @@ -1748,28 +1748,28 @@ body = Falcon::PoliciesUpdateRequest.new({id: 'id_example'}) # PoliciesUpdateReq begin # Updates the general information of the provided policy. - result = api_instance.update_policies_0(body) + result = api_instance.update_policies(body) p result rescue Falcon::ApiError => e - puts "Error when calling Filevantage->update_policies_0: #{e}" + puts "Error when calling Filevantage->update_policies: #{e}" end ``` -#### Using the update_policies_0_with_http_info variant +#### Using the update_policies_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_policies_0_with_http_info(body) +> , Integer, Hash)> update_policies_with_http_info(body) ```ruby begin # Updates the general information of the provided policy. - data, status_code, headers = api_instance.update_policies_0_with_http_info(body) + data, status_code, headers = api_instance.update_policies_with_http_info(body) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Filevantage->update_policies_0_with_http_info: #{e}" + puts "Error when calling Filevantage->update_policies_with_http_info: #{e}" end ``` @@ -1868,9 +1868,9 @@ end - **Accept**: application/json -## update_policy_precedence_0 +## update_policy_precedence -> update_policy_precedence_0(ids, type) +> update_policy_precedence(ids, type) Updates the policy precedence for all policies of a specific type. @@ -1895,28 +1895,28 @@ type = 'type_example' # String | The policy type for which to set the precedence begin # Updates the policy precedence for all policies of a specific type. - result = api_instance.update_policy_precedence_0(ids, type) + result = api_instance.update_policy_precedence(ids, type) p result rescue Falcon::ApiError => e - puts "Error when calling Filevantage->update_policy_precedence_0: #{e}" + puts "Error when calling Filevantage->update_policy_precedence: #{e}" end ``` -#### Using the update_policy_precedence_0_with_http_info variant +#### Using the update_policy_precedence_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> update_policy_precedence_0_with_http_info(ids, type) +> , Integer, Hash)> update_policy_precedence_with_http_info(ids, type) ```ruby begin # Updates the policy precedence for all policies of a specific type. - data, status_code, headers = api_instance.update_policy_precedence_0_with_http_info(ids, type) + data, status_code, headers = api_instance.update_policy_precedence_with_http_info(ids, type) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling Filevantage->update_policy_precedence_0_with_http_info: #{e}" + puts "Error when calling Filevantage->update_policy_precedence_with_http_info: #{e}" end ``` diff --git a/docs/FirewallManagement.md b/docs/FirewallManagement.md index 5355b425..fdaafe47 100644 --- a/docs/FirewallManagement.md +++ b/docs/FirewallManagement.md @@ -12,21 +12,21 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**create_rule_group**](FirewallManagement.md#create_rule_group) | **POST** /fwmgr/entities/rule-groups/v1 | Create new rule group on a platform for a customer with a name and description, and return the ID | | [**create_rule_group_validation**](FirewallManagement.md#create_rule_group_validation) | **POST** /fwmgr/entities/rule-groups/validation/v1 | Validates the request of creating a new rule group on a platform for a customer with a name and description | | [**delete_network_locations**](FirewallManagement.md#delete_network_locations) | **DELETE** /fwmgr/entities/network-locations/v1 | Delete network location entities by ID. | -| [**delete_rule_groups_0**](FirewallManagement.md#delete_rule_groups_0) | **DELETE** /fwmgr/entities/rule-groups/v1 | Delete rule group entities by ID | +| [**delete_rule_groups**](FirewallManagement.md#delete_rule_groups) | **DELETE** /fwmgr/entities/rule-groups/v1 | Delete rule group entities by ID | | [**get_events**](FirewallManagement.md#get_events) | **GET** /fwmgr/entities/events/v1 | Get events entities by ID and optionally version | | [**get_firewall_fields**](FirewallManagement.md#get_firewall_fields) | **GET** /fwmgr/entities/firewall-fields/v1 | Get the firewall field specifications by ID | | [**get_network_locations**](FirewallManagement.md#get_network_locations) | **GET** /fwmgr/entities/network-locations/v1 | Get a summary of network locations entities by ID | | [**get_network_locations_details**](FirewallManagement.md#get_network_locations_details) | **GET** /fwmgr/entities/network-locations-details/v1 | Get network locations entities by ID | | [**get_platforms**](FirewallManagement.md#get_platforms) | **GET** /fwmgr/entities/platforms/v1 | Get platforms by ID, e.g., windows or mac or droid | | [**get_policy_containers**](FirewallManagement.md#get_policy_containers) | **GET** /fwmgr/entities/policies/v1 | Get policy container entities by policy ID | -| [**get_rule_groups_0**](FirewallManagement.md#get_rule_groups_0) | **GET** /fwmgr/entities/rule-groups/v1 | Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. | -| [**get_rules_0**](FirewallManagement.md#get_rules_0) | **GET** /fwmgr/entities/rules/v1 | Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) | +| [**get_rule_groups**](FirewallManagement.md#get_rule_groups) | **GET** /fwmgr/entities/rule-groups/v1 | Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. | +| [**get_rules**](FirewallManagement.md#get_rules) | **GET** /fwmgr/entities/rules/v1 | Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) | | [**query_events**](FirewallManagement.md#query_events) | **GET** /fwmgr/queries/events/v1 | Find all event IDs matching the query with filter | | [**query_firewall_fields**](FirewallManagement.md#query_firewall_fields) | **GET** /fwmgr/queries/firewall-fields/v1 | Get the firewall field specification IDs for the provided platform | | [**query_network_locations**](FirewallManagement.md#query_network_locations) | **GET** /fwmgr/queries/network-locations/v1 | Get a list of network location IDs | | [**query_platforms**](FirewallManagement.md#query_platforms) | **GET** /fwmgr/queries/platforms/v1 | Get the list of platform names | | [**query_policy_rules**](FirewallManagement.md#query_policy_rules) | **GET** /fwmgr/queries/policy-rules/v1 | Find all firewall rule IDs matching the query with filter, and return them in precedence order | -| [**query_rule_groups_0**](FirewallManagement.md#query_rule_groups_0) | **GET** /fwmgr/queries/rule-groups/v1 | Find all rule group IDs matching the query with filter | +| [**query_rule_groups**](FirewallManagement.md#query_rule_groups) | **GET** /fwmgr/queries/rule-groups/v1 | Find all rule group IDs matching the query with filter | | [**query_rules**](FirewallManagement.md#query_rules) | **GET** /fwmgr/queries/rules/v1 | Find all rule IDs matching the query with filter | | [**update_network_locations**](FirewallManagement.md#update_network_locations) | **PATCH** /fwmgr/entities/network-locations/v1 | Updates the network locations provided, and return the ID. | | [**update_network_locations_metadata**](FirewallManagement.md#update_network_locations_metadata) | **POST** /fwmgr/entities/network-locations-metadata/v1 | Updates the network locations metadata such as polling_intervals for the cid | @@ -615,9 +615,9 @@ end - **Accept**: application/json -## delete_rule_groups_0 +## delete_rule_groups -> delete_rule_groups_0(ids, opts) +> delete_rule_groups(ids, opts) Delete rule group entities by ID @@ -642,28 +642,28 @@ opts = { begin # Delete rule group entities by ID - result = api_instance.delete_rule_groups_0(ids, opts) + result = api_instance.delete_rule_groups(ids, opts) p result rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->delete_rule_groups_0: #{e}" + puts "Error when calling FirewallManagement->delete_rule_groups: #{e}" end ``` -#### Using the delete_rule_groups_0_with_http_info variant +#### Using the delete_rule_groups_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> delete_rule_groups_0_with_http_info(ids, opts) +> , Integer, Hash)> delete_rule_groups_with_http_info(ids, opts) ```ruby begin # Delete rule group entities by ID - data, status_code, headers = api_instance.delete_rule_groups_0_with_http_info(ids, opts) + data, status_code, headers = api_instance.delete_rule_groups_with_http_info(ids, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->delete_rule_groups_0_with_http_info: #{e}" + puts "Error when calling FirewallManagement->delete_rule_groups_with_http_info: #{e}" end ``` @@ -1106,9 +1106,9 @@ end - **Accept**: application/json -## get_rule_groups_0 +## get_rule_groups -> get_rule_groups_0(ids) +> get_rule_groups(ids) Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. @@ -1130,28 +1130,28 @@ ids = ['inner_example'] # Array | The IDs of the rule groups to retrieve begin # Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. - result = api_instance.get_rule_groups_0(ids) + result = api_instance.get_rule_groups(ids) p result rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->get_rule_groups_0: #{e}" + puts "Error when calling FirewallManagement->get_rule_groups: #{e}" end ``` -#### Using the get_rule_groups_0_with_http_info variant +#### Using the get_rule_groups_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_rule_groups_0_with_http_info(ids) +> , Integer, Hash)> get_rule_groups_with_http_info(ids) ```ruby begin # Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. - data, status_code, headers = api_instance.get_rule_groups_0_with_http_info(ids) + data, status_code, headers = api_instance.get_rule_groups_with_http_info(ids) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->get_rule_groups_0_with_http_info: #{e}" + puts "Error when calling FirewallManagement->get_rule_groups_with_http_info: #{e}" end ``` @@ -1175,9 +1175,9 @@ end - **Accept**: application/json -## get_rules_0 +## get_rules -> get_rules_0(ids) +> get_rules(ids) Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) @@ -1199,28 +1199,28 @@ ids = ['inner_example'] # Array | The rules to retrieve, identified by I begin # Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) - result = api_instance.get_rules_0(ids) + result = api_instance.get_rules(ids) p result rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->get_rules_0: #{e}" + puts "Error when calling FirewallManagement->get_rules: #{e}" end ``` -#### Using the get_rules_0_with_http_info variant +#### Using the get_rules_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_rules_0_with_http_info(ids) +> , Integer, Hash)> get_rules_with_http_info(ids) ```ruby begin # Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) - data, status_code, headers = api_instance.get_rules_0_with_http_info(ids) + data, status_code, headers = api_instance.get_rules_with_http_info(ids) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->get_rules_0_with_http_info: #{e}" + puts "Error when calling FirewallManagement->get_rules_with_http_info: #{e}" end ``` @@ -1637,9 +1637,9 @@ end - **Accept**: application/json -## query_rule_groups_0 +## query_rule_groups -> query_rule_groups_0(opts) +> query_rule_groups(opts) Find all rule group IDs matching the query with filter @@ -1668,28 +1668,28 @@ opts = { begin # Find all rule group IDs matching the query with filter - result = api_instance.query_rule_groups_0(opts) + result = api_instance.query_rule_groups(opts) p result rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->query_rule_groups_0: #{e}" + puts "Error when calling FirewallManagement->query_rule_groups: #{e}" end ``` -#### Using the query_rule_groups_0_with_http_info variant +#### Using the query_rule_groups_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_rule_groups_0_with_http_info(opts) +> , Integer, Hash)> query_rule_groups_with_http_info(opts) ```ruby begin # Find all rule group IDs matching the query with filter - data, status_code, headers = api_instance.query_rule_groups_0_with_http_info(opts) + data, status_code, headers = api_instance.query_rule_groups_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling FirewallManagement->query_rule_groups_0_with_http_info: #{e}" + puts "Error when calling FirewallManagement->query_rule_groups_with_http_info: #{e}" end ``` diff --git a/docs/FoundryLogscale.md b/docs/FoundryLogscale.md index 9b5d5b91..a262ed4a 100644 --- a/docs/FoundryLogscale.md +++ b/docs/FoundryLogscale.md @@ -214,7 +214,7 @@ Falcon.configure do |config| end api_instance = Falcon::FoundryLogscale.new -body = Falcon::ApidomainSavedSearchExecuteRequestV1.new({extra_rename: 'extra_rename_example', extra_search: 'extra_search_example', extra_sort: 'extra_sort_example', extra_where: 'extra_where_example', parameters: { key: 'inner_example'}, fql_statements: { key: Falcon::ClientFQLStatement.new({op: 'op_example', prop: 'prop_example', value: 3.56})}}) # ApidomainSavedSearchExecuteRequestV1 | +body = Falcon::ApidomainSavedSearchExecuteRequestV1.new # ApidomainSavedSearchExecuteRequestV1 | opts = { app_id: 'app_id_example', # String | Application ID. detailed: true, # Boolean | Whether to include search field details @@ -299,7 +299,7 @@ Falcon.configure do |config| end api_instance = Falcon::FoundryLogscale.new -body = Falcon::ApidomainSavedSearchExecuteRequestV1.new({extra_rename: 'extra_rename_example', extra_search: 'extra_search_example', extra_sort: 'extra_sort_example', extra_where: 'extra_where_example', parameters: { key: 'inner_example'}, fql_statements: { key: Falcon::ClientFQLStatement.new({op: 'op_example', prop: 'prop_example', value: 3.56})}}) # ApidomainSavedSearchExecuteRequestV1 | +body = Falcon::ApidomainSavedSearchExecuteRequestV1.new # ApidomainSavedSearchExecuteRequestV1 | opts = { app_id: 'app_id_example', # String | Application ID. detailed: true, # Boolean | Whether to include search field details diff --git a/docs/GraphCondition.md b/docs/GraphCondition.md index 89d87ac7..3a48bd30 100644 --- a/docs/GraphCondition.md +++ b/docs/GraphCondition.md @@ -5,8 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **cel_expression** | **String** | CEL expression for the condition, should evaluate to a boolean. | [optional] | -| **display** | **Array<String>** | User friendly description of the FQL expression. This would be supplied by the UI/caller and is not set by the API. | [optional] | -| **evaluated** | **Boolean** | Indicates the boolean result of FQL expression when present. This field should be used only in the api response of a graph execution result | [optional] | +| **display** | **Array<String>** | User friendly description of the expression. This is generally supplied by the UI/caller. | [optional] | | **expression** | **String** | FQL expression for the condition on the sequence flow. | [optional] | ## Example @@ -17,7 +16,6 @@ require 'crimson-falcon' instance = Falcon::GraphCondition.new( cel_expression: null, display: null, - evaluated: null, expression: null ) ``` diff --git a/docs/Help.md b/docs/Help.md new file mode 100644 index 00000000..d30a0154 --- /dev/null +++ b/docs/Help.md @@ -0,0 +1,18 @@ +# Falcon::Help + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **text** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::Help.new( + text: null +) +``` + diff --git a/docs/HostMigration.md b/docs/HostMigration.md index f4798a9b..c8bbe4fd 100644 --- a/docs/HostMigration.md +++ b/docs/HostMigration.md @@ -113,8 +113,8 @@ id = 'id_example' # String | The migration job to query opts = { offset: 56, # Integer | The offset to start retrieving records from limit: 56, # Integer | The maximum records to return. [1-10000] - sort: 'migration_id|asc', # String | The property to sort by. - filter: 'filter_example' # String | The filter expression that should be used to limit the results. Valid fields: hostname, status, source_cid, id, created_time, groups, hostgroups, static_host_groups, target_cid, migration_id, host_migration_id + sort: 'groups|asc', # String | The property to sort by. + filter: 'filter_example' # String | The filter expression that should be used to limit the results. Valid fields: groups, static_host_groups, status, target_cid, migration_id, created_time, host_migration_id, hostgroups, hostname, source_cid, id } begin @@ -152,7 +152,7 @@ end | **offset** | **Integer** | The offset to start retrieving records from | [optional] | | **limit** | **Integer** | The maximum records to return. [1-10000] | [optional] | | **sort** | **String** | The property to sort by. | [optional] | -| **filter** | **String** | The filter expression that should be used to limit the results. Valid fields: hostname, status, source_cid, id, created_time, groups, hostgroups, static_host_groups, target_cid, migration_id, host_migration_id | [optional] | +| **filter** | **String** | The filter expression that should be used to limit the results. Valid fields: groups, static_host_groups, status, target_cid, migration_id, created_time, host_migration_id, hostgroups, hostname, source_cid, id | [optional] | ### Return type @@ -333,8 +333,8 @@ api_instance = Falcon::HostMigration.new opts = { offset: 56, # Integer | The offset to start retrieving records from limit: 56, # Integer | The maximum records to return. [1-10000] - sort: 'migration_id|asc', # String | The property to sort by. - filter: 'filter_example' # String | The filter expression that should be used to limit the results. Valid fields: status, migration_status, created_by, created_time, name, id, migration_id, target_cid + sort: 'name|asc', # String | The property to sort by. + filter: 'filter_example' # String | The filter expression that should be used to limit the results. Valid fields: target_cid, status, migration_status, created_by, created_time, name, id, migration_id } begin @@ -371,7 +371,7 @@ end | **offset** | **Integer** | The offset to start retrieving records from | [optional] | | **limit** | **Integer** | The maximum records to return. [1-10000] | [optional] | | **sort** | **String** | The property to sort by. | [optional] | -| **filter** | **String** | The filter expression that should be used to limit the results. Valid fields: status, migration_status, created_by, created_time, name, id, migration_id, target_cid | [optional] | +| **filter** | **String** | The filter expression that should be used to limit the results. Valid fields: target_cid, status, migration_status, created_by, created_time, name, id, migration_id | [optional] | ### Return type diff --git a/docs/IngestionCVEExploitReference.md b/docs/IngestionCVEExploitReference.md new file mode 100644 index 00000000..9ee85265 --- /dev/null +++ b/docs/IngestionCVEExploitReference.md @@ -0,0 +1,22 @@ +# Falcon::IngestionCVEExploitReference + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **kind** | **String** | | | +| **label** | **String** | | | +| **url** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::IngestionCVEExploitReference.new( + kind: null, + label: null, + url: null +) +``` + diff --git a/docs/IngestionCVEExploitSource.md b/docs/IngestionCVEExploitSource.md new file mode 100644 index 00000000..4ff1f792 --- /dev/null +++ b/docs/IngestionCVEExploitSource.md @@ -0,0 +1,24 @@ +# Falcon::IngestionCVEExploitSource + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **is_flat** | **Boolean** | | | +| **label** | **String** | | | +| **references** | [**Array<IngestionCVEExploitReference>**](IngestionCVEExploitReference.md) | | | +| **source** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::IngestionCVEExploitSource.new( + is_flat: null, + label: null, + references: null, + source: null +) +``` + diff --git a/docs/IngestionExPRTRatingFactors.md b/docs/IngestionExPRTRatingFactors.md new file mode 100644 index 00000000..ccb84bc4 --- /dev/null +++ b/docs/IngestionExPRTRatingFactors.md @@ -0,0 +1,24 @@ +# Falcon::IngestionExPRTRatingFactors + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **factor** | **String** | | | +| **impact** | **Integer** | | | +| **long_description** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::IngestionExPRTRatingFactors.new( + description: null, + factor: null, + impact: null, + long_description: null +) +``` + diff --git a/docs/IngestionReference.md b/docs/IngestionReference.md new file mode 100644 index 00000000..28596610 --- /dev/null +++ b/docs/IngestionReference.md @@ -0,0 +1,20 @@ +# Falcon::IngestionReference + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tags** | **Array<String>** | | | +| **url** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::IngestionReference.new( + tags: null, + url: null +) +``` + diff --git a/docs/IntelligenceIndicatorGraph.md b/docs/IntelligenceIndicatorGraph.md new file mode 100644 index 00000000..220c66bb --- /dev/null +++ b/docs/IntelligenceIndicatorGraph.md @@ -0,0 +1,85 @@ +# Falcon::IntelligenceIndicatorGraph + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**search_indicators**](IntelligenceIndicatorGraph.md#search_indicators) | **POST** /intelligence/combined/indicators/v1 | Search indicators based on FQL filter. | + + +## search_indicators + +> search_indicators(x_cs_useruuid, body, opts) + +Search indicators based on FQL filter. + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::IntelligenceIndicatorGraph.new +x_cs_useruuid = 'x_cs_useruuid_example' # String | User ID. +body = Falcon::RestapiIndicatorsQueryRequest.new({filter: 'filter_example', sort: [Falcon::RestapiIndicatorsQuerySortRequest.new({field: 'field_example', missing: 3.56, order: 'order_example'})]}) # RestapiIndicatorsQueryRequest | +opts = { + limit: 56, # Integer | Limit + offset: 'offset_example' # String | Offset +} + +begin + # Search indicators based on FQL filter. + result = api_instance.search_indicators(x_cs_useruuid, body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling IntelligenceIndicatorGraph->search_indicators: #{e}" +end +``` + +#### Using the search_indicators_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_indicators_with_http_info(x_cs_useruuid, body, opts) + +```ruby +begin + # Search indicators based on FQL filter. + data, status_code, headers = api_instance.search_indicators_with_http_info(x_cs_useruuid, body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling IntelligenceIndicatorGraph->search_indicators_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **x_cs_useruuid** | **String** | User ID. | | +| **body** | [**RestapiIndicatorsQueryRequest**](RestapiIndicatorsQueryRequest.md) | | | +| **limit** | **Integer** | Limit | [optional] | +| **offset** | **String** | Offset | [optional] | + +### Return type + +[**RestapiIndicatorResponse**](RestapiIndicatorResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/InventoryapiSurfaceError.md b/docs/InventoryapiSurfaceError.md new file mode 100644 index 00000000..b92940d5 --- /dev/null +++ b/docs/InventoryapiSurfaceError.md @@ -0,0 +1,22 @@ +# Falcon::InventoryapiSurfaceError + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | **Integer** | Error code | [optional] | +| **details** | **String** | Error details | [optional] | +| **message** | **String** | Error message | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::InventoryapiSurfaceError.new( + code: null, + details: null, + message: null +) +``` + diff --git a/docs/InventoryapiUserExternalAsset.md b/docs/InventoryapiUserExternalAsset.md new file mode 100644 index 00000000..fbaf223a --- /dev/null +++ b/docs/InventoryapiUserExternalAsset.md @@ -0,0 +1,20 @@ +# Falcon::InventoryapiUserExternalAsset + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier for the asset | | +| **value** | **String** | Value of the asset | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::InventoryapiUserExternalAsset.new( + id: null, + value: null +) +``` + diff --git a/docs/InventoryapiUserExternalAssetCreate.md b/docs/InventoryapiUserExternalAssetCreate.md new file mode 100644 index 00000000..1cbfaf49 --- /dev/null +++ b/docs/InventoryapiUserExternalAssetCreate.md @@ -0,0 +1,20 @@ +# Falcon::InventoryapiUserExternalAssetCreate + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **assets** | [**Array<InventoryapiUserExternalAsset>**](InventoryapiUserExternalAsset.md) | Assets to be added | | +| **subsidiary_id** | **String** | Subsidiary ID to which assets are to be added | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::InventoryapiUserExternalAssetCreate.new( + assets: null, + subsidiary_id: null +) +``` + diff --git a/docs/InventoryapiUserExternalAssetCreateRequestV1.md b/docs/InventoryapiUserExternalAssetCreateRequestV1.md new file mode 100644 index 00000000..60334452 --- /dev/null +++ b/docs/InventoryapiUserExternalAssetCreateRequestV1.md @@ -0,0 +1,18 @@ +# Falcon::InventoryapiUserExternalAssetCreateRequestV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data** | [**Array<InventoryapiUserExternalAssetCreate>**](InventoryapiUserExternalAssetCreate.md) | Data is the list of assets to be added | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::InventoryapiUserExternalAssetCreateRequestV1.new( + data: null +) +``` + diff --git a/docs/InventoryapiUserExternalAssetCreateResponseV1.md b/docs/InventoryapiUserExternalAssetCreateResponseV1.md new file mode 100644 index 00000000..b3129273 --- /dev/null +++ b/docs/InventoryapiUserExternalAssetCreateResponseV1.md @@ -0,0 +1,22 @@ +# Falcon::InventoryapiUserExternalAssetCreateResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<InventoryapiUserExternalAssetResult>**](InventoryapiUserExternalAssetResult.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::InventoryapiUserExternalAssetCreateResponseV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/InventoryapiUserExternalAssetResult.md b/docs/InventoryapiUserExternalAssetResult.md new file mode 100644 index 00000000..5478746f --- /dev/null +++ b/docs/InventoryapiUserExternalAssetResult.md @@ -0,0 +1,32 @@ +# Falcon::InventoryapiUserExternalAssetResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **asset_type** | **String** | Asset type | [optional] | +| **current_subsidiary** | [**InventoryapidomainSubsidiary**](InventoryapidomainSubsidiary.md) | | [optional] | +| **error** | [**InventoryapiSurfaceError**](InventoryapiSurfaceError.md) | | [optional] | +| **id** | **String** | The ID of the asset | | +| **index** | **Integer** | The index of the asset | | +| **raw_value** | **String** | Raw value of the asset to be created | | +| **subsidiary** | [**InventoryapidomainSubsidiary**](InventoryapidomainSubsidiary.md) | | | +| **value** | **String** | Asset | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::InventoryapiUserExternalAssetResult.new( + asset_type: null, + current_subsidiary: null, + error: null, + id: null, + index: null, + raw_value: null, + subsidiary: null, + value: null +) +``` + diff --git a/docs/InventoryapidomainSubsidiary.md b/docs/InventoryapidomainSubsidiary.md new file mode 100644 index 00000000..86154688 --- /dev/null +++ b/docs/InventoryapidomainSubsidiary.md @@ -0,0 +1,20 @@ +# Falcon::InventoryapidomainSubsidiary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier for the subsidiary | [optional] | +| **name** | **String** | Name of the subsidiary | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::InventoryapidomainSubsidiary.new( + id: null, + name: null +) +``` + diff --git a/docs/JsonschemaPivot.md b/docs/JsonschemaPivot.md index 22b60398..beabd961 100644 --- a/docs/JsonschemaPivot.md +++ b/docs/JsonschemaPivot.md @@ -6,8 +6,10 @@ | ---- | ---- | ----------- | ----- | | **case_sensitive** | **Boolean** | | [optional] | | **entity** | **String** | | [optional] | +| **entity_on_load** | **String** | | [optional] | | **entity_value** | **String** | | [optional] | | **query_string** | **String** | | [optional] | +| **query_string_on_load** | **String** | | [optional] | | **searchable** | **Boolean** | | [optional] | | **sort_by_display** | **Boolean** | | [optional] | | **sort_by_value** | **Boolean** | | [optional] | @@ -22,8 +24,10 @@ require 'crimson-falcon' instance = Falcon::JsonschemaPivot.new( case_sensitive: null, entity: null, + entity_on_load: null, entity_value: null, query_string: null, + query_string_on_load: null, searchable: null, sort_by_display: null, sort_by_value: null, diff --git a/docs/JsonschemaSignalsExtensions.md b/docs/JsonschemaSignalsExtensions.md index c08e1c3b..7ca4b57d 100644 --- a/docs/JsonschemaSignalsExtensions.md +++ b/docs/JsonschemaSignalsExtensions.md @@ -7,6 +7,8 @@ | **enum_wrapper** | **Boolean** | | [optional] | | **example_display_map** | **Hash<String, String>** | | [optional] | | **path_name** | **String** | | [optional] | +| **use_case** | **String** | | [optional] | +| **vendor** | **String** | | [optional] | ## Example @@ -16,7 +18,9 @@ require 'crimson-falcon' instance = Falcon::JsonschemaSignalsExtensions.new( enum_wrapper: null, example_display_map: null, - path_name: null + path_name: null, + use_case: null, + vendor: null ) ``` diff --git a/docs/JsonschemaUIExtensions.md b/docs/JsonschemaUIExtensions.md index a0f484fd..7da3773d 100644 --- a/docs/JsonschemaUIExtensions.md +++ b/docs/JsonschemaUIExtensions.md @@ -10,6 +10,9 @@ | **duration_options** | [**Array<JsonschemaDurationOption>**](JsonschemaDurationOption.md) | | [optional] | | **encoding** | **String** | supported encoding for file upload, eg. 'base64' | [optional] | | **helper_text** | **String** | | [optional] | +| **hide** | **Boolean** | generate a hidden card during mobiledoc generation | [optional] | +| **schema_reference** | **String** | local reference to look up the dynamic json schema and mobiledoc card configuration returned in the top-level of api response | [optional] | +| **skip** | **Boolean** | skip generating a card during mobiledoc generation | [optional] | ## Example @@ -22,7 +25,10 @@ instance = Falcon::JsonschemaUIExtensions.new( custom_group_name: null, duration_options: null, encoding: null, - helper_text: null + helper_text: null, + hide: null, + schema_reference: null, + skip: null ) ``` diff --git a/docs/KubernetesProtection.md b/docs/KubernetesProtection.md index dad89980..60dd8bc8 100644 --- a/docs/KubernetesProtection.md +++ b/docs/KubernetesProtection.md @@ -8,7 +8,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**create_azure_subscription**](KubernetesProtection.md#create_azure_subscription) | **POST** /kubernetes-protection/entities/accounts/azure/v1 | Creates a new Azure Subscription in our system | | [**delete_aws_accounts_mixin0**](KubernetesProtection.md#delete_aws_accounts_mixin0) | **DELETE** /kubernetes-protection/entities/accounts/aws/v1 | Delete AWS accounts. | | [**delete_azure_subscription**](KubernetesProtection.md#delete_azure_subscription) | **DELETE** /kubernetes-protection/entities/accounts/azure/v1 | Deletes a new Azure Subscription in our system | -| [**find_containers_by_container_run_time_version**](KubernetesProtection.md#find_containers_by_container_run_time_version) | **GET** /container-security/aggregates/containers/find-by-runtimeversion/v1 | Retrieve containers by container_runtime_version | +| [**find_containers_by_container_run_time_version**](KubernetesProtection.md#find_containers_by_container_run_time_version) | **GET** /container-security/aggregates/containers/find-by-runtimeversion/v1 | Maximum offset = 10000 - limit | | [**find_containers_count_affected_by_zero_day_vulnerabilities**](KubernetesProtection.md#find_containers_count_affected_by_zero_day_vulnerabilities) | **GET** /container-security/aggregates/containers/count-by-zero-day/v1 | Retrieve containers count affected by zero day vulnerabilities | | [**get_aws_accounts_mixin0**](KubernetesProtection.md#get_aws_accounts_mixin0) | **GET** /kubernetes-protection/entities/accounts/aws/v1 | Provides a list of AWS accounts. | | [**get_azure_install_script**](KubernetesProtection.md#get_azure_install_script) | **GET** /kubernetes-protection/entities/user-script/azure/v1 | Provides the script to run for a given tenant id and subscription IDs | @@ -22,15 +22,15 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**group_containers_by_managed**](KubernetesProtection.md#group_containers_by_managed) | **GET** /container-security/aggregates/containers/group-by-managed/v1 | Group the containers by Managed | | [**list_azure_accounts**](KubernetesProtection.md#list_azure_accounts) | **GET** /kubernetes-protection/entities/accounts/azure/v1 | Provides the azure subscriptions registered to Kubernetes Protection | | [**patch_azure_service_principal**](KubernetesProtection.md#patch_azure_service_principal) | **PATCH** /kubernetes-protection/entities/service-principal/azure/v1 | Adds the client ID for the given tenant ID to our system | -| [**read_cluster_combined**](KubernetesProtection.md#read_cluster_combined) | **GET** /container-security/combined/clusters/v1 | Retrieve kubernetes clusters identified by the provided filter criteria | +| [**read_cluster_combined**](KubernetesProtection.md#read_cluster_combined) | **GET** /container-security/combined/clusters/v1 | Maximum offset = 10000 - limit | | [**read_cluster_count**](KubernetesProtection.md#read_cluster_count) | **GET** /container-security/aggregates/clusters/count/v1 | Retrieve cluster counts | | [**read_cluster_enrichment**](KubernetesProtection.md#read_cluster_enrichment) | **GET** /container-security/aggregates/enrichment/clusters/entities/v1 | Retrieve cluster enrichment data | | [**read_clusters_by_date_range_count**](KubernetesProtection.md#read_clusters_by_date_range_count) | **GET** /container-security/aggregates/clusters/count-by-date/v1 | Retrieve clusters by date range counts | | [**read_clusters_by_kubernetes_version_count**](KubernetesProtection.md#read_clusters_by_kubernetes_version_count) | **GET** /container-security/aggregates/clusters/count-by-kubernetes-version/v1 | Bucket clusters by kubernetes version | | [**read_clusters_by_status_count**](KubernetesProtection.md#read_clusters_by_status_count) | **GET** /container-security/aggregates/clusters/count-by-status/v1 | Bucket clusters by status | -| [**read_container_combined**](KubernetesProtection.md#read_container_combined) | **GET** /container-security/combined/containers/v1 | Retrieve containers identified by the provided filter criteria | +| [**read_container_combined**](KubernetesProtection.md#read_container_combined) | **GET** /container-security/combined/containers/v1 | Maximum offset = 10000 - limit | | [**read_container_count**](KubernetesProtection.md#read_container_count) | **GET** /container-security/aggregates/containers/count/v1 | Retrieve container counts | -| [**read_container_count_by_registry**](KubernetesProtection.md#read_container_count_by_registry) | **GET** /container-security/aggregates/containers/count-by-registry/v1 | Retrieve top container image registries | +| [**read_container_count_by_registry**](KubernetesProtection.md#read_container_count_by_registry) | **GET** /container-security/aggregates/containers/count-by-registry/v1 | Retrieves a list with the top container image registries. Maximum page size: 200 | | [**read_container_enrichment**](KubernetesProtection.md#read_container_enrichment) | **GET** /container-security/aggregates/enrichment/containers/entities/v1 | Retrieve container enrichment data | | [**read_container_image_detections_count_by_date**](KubernetesProtection.md#read_container_image_detections_count_by_date) | **GET** /container-security/aggregates/containers/image-detections-count-by-date/v1 | Retrieve count of image assessment detections on running containers over a period of time | | [**read_container_images_by_most_used**](KubernetesProtection.md#read_container_images_by_most_used) | **GET** /container-security/aggregates/images/most-used/v1 | Bucket container by image-digest | @@ -38,7 +38,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**read_container_vulnerabilities_by_severity_count**](KubernetesProtection.md#read_container_vulnerabilities_by_severity_count) | **GET** /container-security/aggregates/containers/vulnerability-count-by-severity/v1 | Retrieve container vulnerabilities by severity counts | | [**read_containers_by_date_range_count**](KubernetesProtection.md#read_containers_by_date_range_count) | **GET** /container-security/aggregates/containers/count-by-date/v1 | Retrieve containers by date range counts | | [**read_containers_sensor_coverage**](KubernetesProtection.md#read_containers_sensor_coverage) | **GET** /container-security/aggregates/containers/sensor-coverage/v1 | Bucket containers by agent type and calculate sensor coverage | -| [**read_deployment_combined**](KubernetesProtection.md#read_deployment_combined) | **GET** /container-security/combined/deployments/v1 | Retrieve kubernetes deployments identified by the provided filter criteria | +| [**read_deployment_combined**](KubernetesProtection.md#read_deployment_combined) | **GET** /container-security/combined/deployments/v1 | Maximum offset = 10000 - limit | | [**read_deployment_count**](KubernetesProtection.md#read_deployment_count) | **GET** /container-security/aggregates/deployments/count/v1 | Retrieve deployment counts | | [**read_deployment_enrichment**](KubernetesProtection.md#read_deployment_enrichment) | **GET** /container-security/aggregates/enrichment/deployments/entities/v1 | Retrieve deployment enrichment data | | [**read_deployments_by_date_range_count**](KubernetesProtection.md#read_deployments_by_date_range_count) | **GET** /container-security/aggregates/deployments/count-by-date/v1 | Retrieve deployments by date range counts | @@ -48,21 +48,21 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | [**read_kubernetes_iom_entities**](KubernetesProtection.md#read_kubernetes_iom_entities) | **GET** /container-security/entities/kubernetes-ioms/v1 | Retrieve Kubernetes IOM entities identified by the provided IDs | | [**read_namespace_count**](KubernetesProtection.md#read_namespace_count) | **GET** /container-security/aggregates/namespaces/count/v1 | Retrieve namespace counts | | [**read_namespaces_by_date_range_count**](KubernetesProtection.md#read_namespaces_by_date_range_count) | **GET** /container-security/aggregates/namespaces/count-by-date/v1 | Retrieve namespaces by date range counts | -| [**read_node_combined**](KubernetesProtection.md#read_node_combined) | **GET** /container-security/combined/nodes/v1 | Retrieve kubernetes nodes identified by the provided filter criteria | +| [**read_node_combined**](KubernetesProtection.md#read_node_combined) | **GET** /container-security/combined/nodes/v1 | Maximum offset = 10000 - limit | | [**read_node_count**](KubernetesProtection.md#read_node_count) | **GET** /container-security/aggregates/nodes/count/v1 | Retrieve node counts | | [**read_node_enrichment**](KubernetesProtection.md#read_node_enrichment) | **GET** /container-security/aggregates/enrichment/nodes/entities/v1 | Retrieve node enrichment data | | [**read_nodes_by_cloud_count**](KubernetesProtection.md#read_nodes_by_cloud_count) | **GET** /container-security/aggregates/nodes/count-by-cloud/v1 | Bucket nodes by cloud providers | | [**read_nodes_by_container_engine_version_count**](KubernetesProtection.md#read_nodes_by_container_engine_version_count) | **GET** /container-security/aggregates/nodes/count-by-container-engine-version/v1 | Bucket nodes by their container engine version | | [**read_nodes_by_date_range_count**](KubernetesProtection.md#read_nodes_by_date_range_count) | **GET** /container-security/aggregates/nodes/count-by-date/v1 | Retrieve nodes by date range counts | -| [**read_pod_combined**](KubernetesProtection.md#read_pod_combined) | **GET** /container-security/combined/pods/v1 | Retrieve kubernetes pods identified by the provided filter criteria | +| [**read_pod_combined**](KubernetesProtection.md#read_pod_combined) | **GET** /container-security/combined/pods/v1 | Maximum offset = 10000 - limit | | [**read_pod_count**](KubernetesProtection.md#read_pod_count) | **GET** /container-security/aggregates/pods/count/v1 | Retrieve pod counts | | [**read_pod_enrichment**](KubernetesProtection.md#read_pod_enrichment) | **GET** /container-security/aggregates/enrichment/pods/entities/v1 | Retrieve pod enrichment data | | [**read_pods_by_date_range_count**](KubernetesProtection.md#read_pods_by_date_range_count) | **GET** /container-security/aggregates/pods/count-by-date/v1 | Retrieve pods by date range counts | -| [**read_running_container_images**](KubernetesProtection.md#read_running_container_images) | **GET** /container-security/combined/container-images/v1 | Retrieve images on running containers | +| [**read_running_container_images**](KubernetesProtection.md#read_running_container_images) | **GET** /container-security/combined/container-images/v1 | Maximum offset = 10000 - limit | | [**read_vulnerable_container_image_count**](KubernetesProtection.md#read_vulnerable_container_image_count) | **GET** /container-security/aggregates/containers/count-vulnerable-images/v1 | Retrieve count of vulnerable images running on containers | | [**regenerate_api_key**](KubernetesProtection.md#regenerate_api_key) | **POST** /kubernetes-protection/entities/integration/api-key/v1 | Regenerate API key for docker registry integrations | -| [**search_and_read_kubernetes_iom_entities**](KubernetesProtection.md#search_and_read_kubernetes_iom_entities) | **GET** /container-security/combined/kubernetes-ioms/v1 | Search Kubernetes IOM by the provided search criteria | -| [**search_kubernetes_ioms**](KubernetesProtection.md#search_kubernetes_ioms) | **GET** /container-security/queries/kubernetes-ioms/v1 | Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query | +| [**search_and_read_kubernetes_iom_entities**](KubernetesProtection.md#search_and_read_kubernetes_iom_entities) | **GET** /container-security/combined/kubernetes-ioms/v1 | Maximum offset = 10000 - limit | +| [**search_kubernetes_ioms**](KubernetesProtection.md#search_kubernetes_ioms) | **GET** /container-security/queries/kubernetes-ioms/v1 | Maximum offset = 10000 - limit | | [**trigger_scan**](KubernetesProtection.md#trigger_scan) | **POST** /kubernetes-protection/entities/scan/trigger/v1 | Triggers a dry run or a full scan of a customer's kubernetes footprint | | [**update_aws_account**](KubernetesProtection.md#update_aws_account) | **PATCH** /kubernetes-protection/entities/accounts/aws/v1 | Updates the AWS account per the query parameters provided | @@ -349,7 +349,7 @@ end > find_containers_by_container_run_time_version(opts) -Retrieve containers by container_runtime_version +Maximum offset = 10000 - limit ### Examples @@ -366,14 +366,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - limit: 56, # Integer | The upper-bound on the number of container records to retrieve. - offset: 56, # Integer | It is used to get the offset - sort: 'sort_example', # String | Field to sort results by - filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + limit: 56, # Integer | The upper-bound on the number of records to retrieve. + offset: 56, # Integer | The offset from where to begin. + sort: 'sort_example', # String | The fields to sort the records on. + filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin - # Retrieve containers by container_runtime_version + # Maximum offset = 10000 - limit result = api_instance.find_containers_by_container_run_time_version(opts) p result rescue Falcon::ApiError => e @@ -389,7 +389,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve containers by container_runtime_version + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.find_containers_by_container_run_time_version_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -403,10 +403,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **limit** | **Integer** | The upper-bound on the number of container records to retrieve. | [optional] | -| **offset** | **Integer** | It is used to get the offset | [optional] | -| **sort** | **String** | Field to sort results by | [optional] | -| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 200] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -1187,7 +1187,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -1221,7 +1221,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -1393,7 +1393,7 @@ end > read_cluster_combined(opts) -Retrieve kubernetes clusters identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -1410,14 +1410,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + filter: 'filter_example', # String | Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | Field to sort results by + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve kubernetes clusters identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_cluster_combined(opts) p result rescue Falcon::ApiError => e @@ -1433,7 +1433,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve kubernetes clusters identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_cluster_combined_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -1447,10 +1447,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 200] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | Field to sort results by | [optional] | ### Return type @@ -1487,7 +1487,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` } begin @@ -1521,7 +1521,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` | [optional] | ### Return type @@ -1559,7 +1559,7 @@ end api_instance = Falcon::KubernetesProtection.new cluster_id = ['inner_example'] # Array | One or more cluster ids for which to retrieve enrichment info opts = { - filter: 'filter_example' # String | Supported filters: last_seen + filter: 'filter_example' # String | Supported filter fields: - `last_seen` } begin @@ -1594,7 +1594,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **cluster_id** | [**Array<String>**](String.md) | One or more cluster ids for which to retrieve enrichment info | | -| **filter** | **String** | Supported filters: last_seen | [optional] | +| **filter** | **String** | Supported filter fields: - `last_seen` | [optional] | ### Return type @@ -1697,7 +1697,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` } begin @@ -1731,7 +1731,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` | [optional] | ### Return type @@ -1768,7 +1768,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` } begin @@ -1802,7 +1802,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` | [optional] | ### Return type @@ -1822,7 +1822,7 @@ end > read_container_combined(opts) -Retrieve containers identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -1839,14 +1839,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example', # String | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | Field to sort results by + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve containers identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_container_combined(opts) p result rescue Falcon::ApiError => e @@ -1862,7 +1862,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve containers identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_container_combined_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -1876,10 +1876,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 200] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | Field to sort results by | [optional] | ### Return type @@ -1916,7 +1916,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -1950,7 +1950,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -1970,7 +1970,7 @@ end > read_container_count_by_registry(opts) -Retrieve top container image registries +Retrieves a list with the top container image registries. Maximum page size: 200 ### Examples @@ -1987,12 +1987,12 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - under_assessment: true, # Boolean | (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered + under_assessment: true, # Boolean | (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered limit: 56 # Integer | The upper-bound on the number of records to retrieve. } begin - # Retrieve top container image registries + # Retrieves a list with the top container image registries. Maximum page size: 200 result = api_instance.read_container_count_by_registry(opts) p result rescue Falcon::ApiError => e @@ -2008,7 +2008,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve top container image registries + # Retrieves a list with the top container image registries. Maximum page size: 200 data, status_code, headers = api_instance.read_container_count_by_registry_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -2022,7 +2022,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **under_assessment** | **Boolean** | (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered | [optional] | +| **under_assessment** | **Boolean** | (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered | [optional][default to false] | | **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | ### Return type @@ -2061,7 +2061,7 @@ end api_instance = Falcon::KubernetesProtection.new container_id = ['inner_example'] # Array | One or more container ids for which to retrieve enrichment info opts = { - filter: 'filter_example' # String | Supported filters: last_seen + filter: 'filter_example' # String | Supported filter fields: - `last_seen` } begin @@ -2096,7 +2096,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **container_id** | [**Array<String>**](String.md) | One or more container ids for which to retrieve enrichment info | | -| **filter** | **String** | Supported filters: last_seen | [optional] | +| **filter** | **String** | Supported filter fields: - `last_seen` | [optional] | ### Return type @@ -2133,7 +2133,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -2167,7 +2167,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -2204,7 +2204,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -2238,7 +2238,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -2275,7 +2275,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Filter using a query in Falcon Query Language (FQL). Supported filters: cid + filter: 'filter_example' # String | Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` } begin @@ -2309,7 +2309,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter using a query in Falcon Query Language (FQL). Supported filters: cid | [optional] | +| **filter** | **String** | Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` | [optional] | ### Return type @@ -2346,7 +2346,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -2380,7 +2380,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -2417,7 +2417,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Get container counts using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Get container counts using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -2451,7 +2451,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Get container counts using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Get container counts using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -2488,7 +2488,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -2522,7 +2522,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -2542,7 +2542,7 @@ end > read_deployment_combined(opts) -Retrieve kubernetes deployments identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -2559,14 +2559,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status + filter: 'filter_example', # String | Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | Field to sort results by + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve kubernetes deployments identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_deployment_combined(opts) p result rescue Falcon::ApiError => e @@ -2582,7 +2582,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve kubernetes deployments identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_deployment_combined_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -2596,10 +2596,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 200] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | Field to sort results by | [optional] | ### Return type @@ -2636,7 +2636,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status + filter: 'filter_example' # String | Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` } begin @@ -2670,7 +2670,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` | [optional] | ### Return type @@ -2708,7 +2708,7 @@ end api_instance = Falcon::KubernetesProtection.new deployment_id = ['inner_example'] # Array | One or more deployment ids for which to retrieve enrichment info opts = { - filter: 'filter_example' # String | Supported filters: last_seen + filter: 'filter_example' # String | Supported filter fields: - `last_seen` } begin @@ -2743,7 +2743,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **deployment_id** | [**Array<String>**](String.md) | One or more deployment ids for which to retrieve enrichment info | | -| **filter** | **String** | Supported filters: last_seen | [optional] | +| **filter** | **String** | Supported filter fields: - `last_seen` | [optional] | ### Return type @@ -2846,7 +2846,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -2880,7 +2880,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -2917,7 +2917,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + filter: 'filter_example' # String | Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` } begin @@ -2951,7 +2951,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity | [optional] | +| **filter** | **String** | Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` | [optional] | ### Return type @@ -2988,7 +2988,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + filter: 'filter_example' # String | Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` } begin @@ -3022,7 +3022,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity | [optional] | +| **filter** | **String** | Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` | [optional] | ### Return type @@ -3130,7 +3130,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,first_seen,kac_agent_id,last_seen,namespace_id,namespace_name,resource_status + filter: 'filter_example' # String | Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace_id` - `namespace_name` - `resource_status` } begin @@ -3164,7 +3164,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,first_seen,kac_agent_id,last_seen,namespace_id,namespace_name,resource_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace_id` - `namespace_name` - `resource_status` | [optional] | ### Return type @@ -3250,7 +3250,7 @@ This endpoint does not need any parameter. > read_node_combined(opts) -Retrieve kubernetes nodes identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -3267,14 +3267,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + filter: 'filter_example', # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | Field to sort results by + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve kubernetes nodes identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_node_combined(opts) p result rescue Falcon::ApiError => e @@ -3290,7 +3290,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve kubernetes nodes identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_node_combined_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -3304,10 +3304,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 200] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | Field to sort results by | [optional] | ### Return type @@ -3344,7 +3344,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + filter: 'filter_example' # String | Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` } begin @@ -3378,7 +3378,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` | [optional] | ### Return type @@ -3416,7 +3416,7 @@ end api_instance = Falcon::KubernetesProtection.new node_name = ['inner_example'] # Array | One or more node names for which to retrieve enrichment info opts = { - filter: 'filter_example' # String | Supported filters: last_seen + filter: 'filter_example' # String | Supported filter fields: - `last_seen` } begin @@ -3451,7 +3451,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **node_name** | [**Array<String>**](String.md) | One or more node names for which to retrieve enrichment info | | -| **filter** | **String** | Supported filters: last_seen | [optional] | +| **filter** | **String** | Supported filter fields: - `last_seen` | [optional] | ### Return type @@ -3488,7 +3488,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` } begin @@ -3522,7 +3522,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status | [optional] | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` | [optional] | ### Return type @@ -3559,7 +3559,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` } begin @@ -3593,7 +3593,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status | [optional] | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` | [optional] | ### Return type @@ -3630,7 +3630,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` } begin @@ -3664,7 +3664,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status | [optional] | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` | [optional] | ### Return type @@ -3684,7 +3684,7 @@ end > read_pod_combined(opts) -Retrieve kubernetes pods identified by the provided filter criteria +Maximum offset = 10000 - limit ### Examples @@ -3701,14 +3701,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user + filter: 'filter_example', # String | Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | Field to sort results by + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve kubernetes pods identified by the provided filter criteria + # Maximum offset = 10000 - limit result = api_instance.read_pod_combined(opts) p result rescue Falcon::ApiError => e @@ -3724,7 +3724,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve kubernetes pods identified by the provided filter criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_pod_combined_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -3738,10 +3738,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 200] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | Field to sort results by | [optional] | ### Return type @@ -3778,7 +3778,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user + filter: 'filter_example' # String | Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` } begin @@ -3812,7 +3812,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` | [optional] | ### Return type @@ -3850,7 +3850,7 @@ end api_instance = Falcon::KubernetesProtection.new pod_id = ['inner_example'] # Array | One or more pod ids for which to retrieve enrichment info opts = { - filter: 'filter_example' # String | Supported filters: last_seen + filter: 'filter_example' # String | Supported filter fields: - `last_seen` } begin @@ -3885,7 +3885,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **pod_id** | [**Array<String>**](String.md) | One or more pod ids for which to retrieve enrichment info | | -| **filter** | **String** | Supported filters: last_seen | [optional] | +| **filter** | **String** | Supported filter fields: - `last_seen` | [optional] | ### Return type @@ -3971,7 +3971,7 @@ This endpoint does not need any parameter. > read_running_container_images(opts) -Retrieve images on running containers +Maximum offset = 10000 - limit ### Examples @@ -3988,14 +3988,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filters: cid,cluster_id,cluster_name,hosts,image_digest,image_has_been_assessed,image_id,image_name,image_registry,image_repository,image_tag,last_seen,running_status + filter: 'filter_example', # String | Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cluster_id` - `cluster_name` - `hosts` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_name` - `image_registry` - `image_repository` - `image_tag` - `last_seen` - `running_status` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | Field to sort results by + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve images on running containers + # Maximum offset = 10000 - limit result = api_instance.read_running_container_images(opts) p result rescue Falcon::ApiError => e @@ -4011,7 +4011,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve images on running containers + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.read_running_container_images_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -4025,10 +4025,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filters: cid,cluster_id,cluster_name,hosts,image_digest,image_has_been_assessed,image_id,image_name,image_registry,image_repository,image_tag,last_seen,running_status | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cluster_id` - `cluster_name` - `hosts` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_name` - `image_registry` - `image_repository` - `image_tag` - `last_seen` - `running_status` | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 200] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | Field to sort results by | [optional] | ### Return type @@ -4065,7 +4065,7 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + filter: 'filter_example' # String | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` } begin @@ -4099,7 +4099,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status | [optional] | +| **filter** | **String** | Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` | [optional] | ### Return type @@ -4185,7 +4185,7 @@ This endpoint does not need any parameter. > search_and_read_kubernetes_iom_entities(opts) -Search Kubernetes IOM by the provided search criteria +Maximum offset = 10000 - limit ### Examples @@ -4202,14 +4202,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity + filter: 'filter_example', # String | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. + offset: 56 # Integer | The offset from where to begin. } begin - # Search Kubernetes IOM by the provided search criteria + # Maximum offset = 10000 - limit result = api_instance.search_and_read_kubernetes_iom_entities(opts) p result rescue Falcon::ApiError => e @@ -4225,7 +4225,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Search Kubernetes IOM by the provided search criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.search_and_read_kubernetes_iom_entities_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -4239,10 +4239,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | -| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **filter** | **String** | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` | [optional] | | **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type @@ -4262,7 +4262,7 @@ end > search_kubernetes_ioms(opts) -Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query +Maximum offset = 10000 - limit ### Examples @@ -4279,14 +4279,14 @@ end api_instance = Falcon::KubernetesProtection.new opts = { - filter: 'filter_example', # String | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity + filter: 'filter_example', # String | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. + offset: 56 # Integer | The offset from where to begin. } begin - # Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + # Maximum offset = 10000 - limit result = api_instance.search_kubernetes_ioms(opts) p result rescue Falcon::ApiError => e @@ -4302,7 +4302,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.search_kubernetes_ioms_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -4316,10 +4316,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | -| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **filter** | **String** | Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` | [optional] | | **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type diff --git a/docs/LookupFiles.md b/docs/LookupFiles.md new file mode 100644 index 00000000..ad13df59 --- /dev/null +++ b/docs/LookupFiles.md @@ -0,0 +1,163 @@ +# Falcon::LookupFiles + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_file_v1**](LookupFiles.md#create_file_v1) | **POST** /loggingapi/entities/lookup-files/v1 | Creates a lookup file | +| [**update_file_v1**](LookupFiles.md#update_file_v1) | **PATCH** /loggingapi/entities/lookup-files/v1 | Updates a lookup file | + + +## create_file_v1 + +> create_file_v1(file, name, opts) + +Creates a lookup file + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::LookupFiles.new +file = File.new('/path/to/some/file') # File | File to be uploaded +name = 'name_example' # String | Name used to identify the file +opts = { + description: 'description_example', # String | File description + id: 'id_example', # String | Unique identifier of the file being updated. + repo: 'repo_example' # String | Name of repository or view to save the file +} + +begin + # Creates a lookup file + result = api_instance.create_file_v1(file, name, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling LookupFiles->create_file_v1: #{e}" +end +``` + +#### Using the create_file_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_file_v1_with_http_info(file, name, opts) + +```ruby +begin + # Creates a lookup file + data, status_code, headers = api_instance.create_file_v1_with_http_info(file, name, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling LookupFiles->create_file_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **file** | **File** | File to be uploaded | | +| **name** | **String** | Name used to identify the file | | +| **description** | **String** | File description | [optional] | +| **id** | **String** | Unique identifier of the file being updated. | [optional] | +| **repo** | **String** | Name of repository or view to save the file | [optional] | + +### Return type + +[**DomainLookupFileWrapper**](DomainLookupFileWrapper.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + +## update_file_v1 + +> update_file_v1(id, opts) + +Updates a lookup file + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::LookupFiles.new +id = 'id_example' # String | Unique identifier of the file being updated. +opts = { + description: 'description_example', # String | File description + file: File.new('/path/to/some/file') # File | File to be uploaded +} + +begin + # Updates a lookup file + result = api_instance.update_file_v1(id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling LookupFiles->update_file_v1: #{e}" +end +``` + +#### Using the update_file_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_file_v1_with_http_info(id, opts) + +```ruby +begin + # Updates a lookup file + data, status_code, headers = api_instance.update_file_v1_with_http_info(id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling LookupFiles->update_file_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier of the file being updated. | | +| **description** | **String** | File description | [optional] | +| **file** | **File** | File to be uploaded | [optional] | + +### Return type + +[**DomainLookupFileWrapper**](DomainLookupFileWrapper.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + diff --git a/docs/ModelsAPICustomerAndImage.md b/docs/ModelsAPICustomerAndImage.md index 139c6670..8fbb3acf 100644 --- a/docs/ModelsAPICustomerAndImage.md +++ b/docs/ModelsAPICustomerAndImage.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **ai_related** | **Boolean** | | | | **base_image_id** | **String** | | [optional] | | **base_os** | **String** | | | | **base_os_version** | **String** | | | @@ -33,6 +34,7 @@ require 'crimson-falcon' instance = Falcon::ModelsAPICustomerAndImage.new( + ai_related: null, base_image_id: null, base_os: null, base_os_version: null, diff --git a/docs/ModelsAPIImageCombinedExport.md b/docs/ModelsAPIImageCombinedExport.md index 216ee923..ded2c23d 100644 --- a/docs/ModelsAPIImageCombinedExport.md +++ b/docs/ModelsAPIImageCombinedExport.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **ai_related** | **Boolean** | | | | **architecture** | **String** | | | | **base_os** | **String** | | | | **cid** | **String** | | | @@ -13,6 +14,7 @@ | **detection_severity** | **String** | | | | **detection_type** | **String** | | | | **first_seen** | **String** | | | +| **groups** | **Array<String>** | | [optional] | | **image_digest** | **String** | | | | **image_id** | **String** | | | | **is_base_image** | **Boolean** | | | @@ -34,6 +36,7 @@ require 'crimson-falcon' instance = Falcon::ModelsAPIImageCombinedExport.new( + ai_related: null, architecture: null, base_os: null, cid: null, @@ -43,6 +46,7 @@ instance = Falcon::ModelsAPIImageCombinedExport.new( detection_severity: null, detection_type: null, first_seen: null, + groups: null, image_digest: null, image_id: null, is_base_image: null, diff --git a/docs/ModelsAPIPackageCombined.md b/docs/ModelsAPIPackageCombined.md index 22faa0c7..27d23024 100644 --- a/docs/ModelsAPIPackageCombined.md +++ b/docs/ModelsAPIPackageCombined.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **ai_related** | **Boolean** | | | | **all_images** | **Integer** | | | | **cid** | **String** | | | | **license** | **String** | | | @@ -19,6 +20,7 @@ require 'crimson-falcon' instance = Falcon::ModelsAPIPackageCombined.new( + ai_related: null, all_images: null, cid: null, license: null, diff --git a/docs/ModelsAPIPackageCombinedV2.md b/docs/ModelsAPIPackageCombinedV2.md new file mode 100644 index 00000000..57287e37 --- /dev/null +++ b/docs/ModelsAPIPackageCombinedV2.md @@ -0,0 +1,38 @@ +# Falcon::ModelsAPIPackageCombinedV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ai_related** | **Boolean** | | | +| **all_images** | **Integer** | | | +| **cid** | **String** | | | +| **cveid** | **String** | | | +| **fix_resolution** | **Array<String>** | | | +| **license** | **String** | | | +| **package_name_version** | **String** | | | +| **running_images** | **Integer** | | | +| **severity** | **String** | | | +| **type** | **String** | | | +| **vulnerability_description** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPackageCombinedV2.new( + ai_related: null, + all_images: null, + cid: null, + cveid: null, + fix_resolution: null, + license: null, + package_name_version: null, + running_images: null, + severity: null, + type: null, + vulnerability_description: null +) +``` + diff --git a/docs/ModelsAPIVulnerabilityCombined.md b/docs/ModelsAPIVulnerabilityCombined.md index 10224f1e..34bbabd9 100644 --- a/docs/ModelsAPIVulnerabilityCombined.md +++ b/docs/ModelsAPIVulnerabilityCombined.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **ai_related** | **Boolean** | | | | **containers_impacted** | **Integer** | | | | **cps_current_rating** | **String** | | | | **cve_id** | **String** | | | @@ -24,6 +25,7 @@ require 'crimson-falcon' instance = Falcon::ModelsAPIVulnerabilityCombined.new( + ai_related: null, containers_impacted: null, cps_current_rating: null, cve_id: null, diff --git a/docs/ModelsApplicationLibrary.md b/docs/ModelsApplicationLibrary.md index a830f2b1..35f1614a 100644 --- a/docs/ModelsApplicationLibrary.md +++ b/docs/ModelsApplicationLibrary.md @@ -11,6 +11,7 @@ | **name** | **String** | | [optional] | | **path** | **String** | | [optional] | | **version** | **String** | | [optional] | +| **ai_related** | **Boolean** | | [optional] | ## Example @@ -24,7 +25,8 @@ instance = Falcon::ModelsApplicationLibrary.new( license: null, name: null, path: null, - version: null + version: null, + ai_related: null ) ``` diff --git a/docs/ModelsContainer.md b/docs/ModelsContainer.md index 31ffceae..d4251587 100644 --- a/docs/ModelsContainer.md +++ b/docs/ModelsContainer.md @@ -8,6 +8,7 @@ | **allow_privilege_escalation** | **Boolean** | | | | **cid** | **String** | | | | **cloud_account_id** | **String** | | | +| **cloud_instance_id** | **String** | | | | **cloud_name** | **String** | | | | **cloud_region** | **String** | | | | **cloud_service** | **String** | | | @@ -63,6 +64,7 @@ instance = Falcon::ModelsContainer.new( allow_privilege_escalation: null, cid: null, cloud_account_id: null, + cloud_instance_id: null, cloud_name: null, cloud_region: null, cloud_service: null, diff --git a/docs/ModelsExtAPIImageCombined.md b/docs/ModelsExtAPIImageCombined.md index 61b16d2b..ae7e18b2 100644 --- a/docs/ModelsExtAPIImageCombined.md +++ b/docs/ModelsExtAPIImageCombined.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **ai_related** | **Boolean** | | | | **architecture** | **String** | | | | **base_os** | **String** | | | | **cid** | **String** | | | @@ -31,6 +32,7 @@ require 'crimson-falcon' instance = Falcon::ModelsExtAPIImageCombined.new( + ai_related: null, architecture: null, base_os: null, cid: null, diff --git a/docs/ModelsMessage.md b/docs/ModelsMessage.md new file mode 100644 index 00000000..bce3e479 --- /dev/null +++ b/docs/ModelsMessage.md @@ -0,0 +1,18 @@ +# Falcon::ModelsMessage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **text** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsMessage.new( + text: null +) +``` + diff --git a/docs/ModelsPartialFingerprints.md b/docs/ModelsPartialFingerprints.md new file mode 100644 index 00000000..8bfc5f8a --- /dev/null +++ b/docs/ModelsPartialFingerprints.md @@ -0,0 +1,18 @@ +# Falcon::ModelsPartialFingerprints + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identifier_v1** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPartialFingerprints.new( + identifier_v1: null +) +``` + diff --git a/docs/ModelsResult.md b/docs/ModelsResult.md new file mode 100644 index 00000000..0bca29ed --- /dev/null +++ b/docs/ModelsResult.md @@ -0,0 +1,32 @@ +# Falcon::ModelsResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **kind** | **String** | | | +| **level** | **String** | | | +| **locations** | [**Array<ModelsResultLocation>**](ModelsResultLocation.md) | | | +| **message** | [**ModelsMessage**](ModelsMessage.md) | | | +| **partial_fingerprints** | [**ModelsPartialFingerprints**](ModelsPartialFingerprints.md) | | | +| **properties** | [**ModelsResultProperties**](ModelsResultProperties.md) | | | +| **rule_id** | **String** | | | +| **rule_index** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsResult.new( + kind: null, + level: null, + locations: null, + message: null, + partial_fingerprints: null, + properties: null, + rule_id: null, + rule_index: null +) +``` + diff --git a/docs/ModelsResultLocation.md b/docs/ModelsResultLocation.md new file mode 100644 index 00000000..ce9d7fd9 --- /dev/null +++ b/docs/ModelsResultLocation.md @@ -0,0 +1,20 @@ +# Falcon::ModelsResultLocation + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **physical_location** | [**ModelsResultPhysicalLocation**](ModelsResultPhysicalLocation.md) | | | +| **properties** | [**ModelsResultLocationProperties**](ModelsResultLocationProperties.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsResultLocation.new( + physical_location: null, + properties: null +) +``` + diff --git a/docs/ModelsResultLocationProperties.md b/docs/ModelsResultLocationProperties.md new file mode 100644 index 00000000..52a0deaf --- /dev/null +++ b/docs/ModelsResultLocationProperties.md @@ -0,0 +1,20 @@ +# Falcon::ModelsResultLocationProperties + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **layer** | **String** | | | +| **path** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsResultLocationProperties.new( + layer: null, + path: null +) +``` + diff --git a/docs/ModelsResultPhysicalLocation.md b/docs/ModelsResultPhysicalLocation.md new file mode 100644 index 00000000..27ecc774 --- /dev/null +++ b/docs/ModelsResultPhysicalLocation.md @@ -0,0 +1,20 @@ +# Falcon::ModelsResultPhysicalLocation + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **artifact_location** | [**ModelsResultPhysicalLocationArtifactLocation**](ModelsResultPhysicalLocationArtifactLocation.md) | | | +| **region** | [**ModelsResultPhysicalLocationRegion**](ModelsResultPhysicalLocationRegion.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsResultPhysicalLocation.new( + artifact_location: null, + region: null +) +``` + diff --git a/docs/ModelsResultPhysicalLocationArtifactLocation.md b/docs/ModelsResultPhysicalLocationArtifactLocation.md new file mode 100644 index 00000000..bc27489d --- /dev/null +++ b/docs/ModelsResultPhysicalLocationArtifactLocation.md @@ -0,0 +1,18 @@ +# Falcon::ModelsResultPhysicalLocationArtifactLocation + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **uri** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsResultPhysicalLocationArtifactLocation.new( + uri: null +) +``` + diff --git a/docs/ModelsResultPhysicalLocationRegion.md b/docs/ModelsResultPhysicalLocationRegion.md new file mode 100644 index 00000000..d1031936 --- /dev/null +++ b/docs/ModelsResultPhysicalLocationRegion.md @@ -0,0 +1,18 @@ +# Falcon::ModelsResultPhysicalLocationRegion + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **start_line** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsResultPhysicalLocationRegion.new( + start_line: null +) +``` + diff --git a/docs/ModelsResultProperties.md b/docs/ModelsResultProperties.md new file mode 100644 index 00000000..b3c4c4de --- /dev/null +++ b/docs/ModelsResultProperties.md @@ -0,0 +1,36 @@ +# Falcon::ModelsResultProperties + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **asset_id** | **String** | | | +| **asset_name** | **String** | | | +| **asset_type** | **String** | | | +| **cid** | **String** | | | +| **cloud_account_id** | **String** | | | +| **cloud_account_name** | **String** | | | +| **cloud_provider** | **String** | | | +| **function_type** | **String** | | | +| **is_supported** | **Boolean** | | | +| **region** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsResultProperties.new( + asset_id: null, + asset_name: null, + asset_type: null, + cid: null, + cloud_account_id: null, + cloud_account_name: null, + cloud_provider: null, + function_type: null, + is_supported: null, + region: null +) +``` + diff --git a/docs/ModelsRule.md b/docs/ModelsRule.md new file mode 100644 index 00000000..49be5ef7 --- /dev/null +++ b/docs/ModelsRule.md @@ -0,0 +1,32 @@ +# Falcon::ModelsRule + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **default_configuration** | [**ModelsRuleDefaultConfiguration**](ModelsRuleDefaultConfiguration.md) | | | +| **full_description** | [**ModelsMessage**](ModelsMessage.md) | | | +| **help** | [**Help**](Help.md) | | | +| **help_uri** | **String** | | | +| **id** | **String** | | | +| **name** | **String** | | | +| **properties** | [**ModelsRuleProperties**](ModelsRuleProperties.md) | | | +| **short_description** | [**ModelsMessage**](ModelsMessage.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsRule.new( + default_configuration: null, + full_description: null, + help: null, + help_uri: null, + id: null, + name: null, + properties: null, + short_description: null +) +``` + diff --git a/docs/ModelsRuleDefaultConfiguration.md b/docs/ModelsRuleDefaultConfiguration.md new file mode 100644 index 00000000..47b27f14 --- /dev/null +++ b/docs/ModelsRuleDefaultConfiguration.md @@ -0,0 +1,18 @@ +# Falcon::ModelsRuleDefaultConfiguration + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **level** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsRuleDefaultConfiguration.new( + level: null +) +``` + diff --git a/docs/ModelsRuleProperties.md b/docs/ModelsRuleProperties.md new file mode 100644 index 00000000..a2a7ce9a --- /dev/null +++ b/docs/ModelsRuleProperties.md @@ -0,0 +1,78 @@ +# Falcon::ModelsRuleProperties + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cvss_attack_complexity** | **String** | | | +| **cvss_attack_vector** | **String** | | | +| **cvss_availability_impact** | **String** | | | +| **cvss_base_score** | **Float** | | | +| **cvss_confidentiality_impact** | **String** | | | +| **cvss_exploitability_score** | **Float** | | | +| **cvss_impact_score** | **Float** | | | +| **cvss_integrity_impact** | **String** | | | +| **cvss_privileges_required** | **String** | | | +| **cvss_scope** | **String** | | | +| **cvss_source** | **String** | | | +| **cvss_user_interaction** | **String** | | | +| **cvss_vector** | **String** | | | +| **description** | **String** | | | +| **exploit_date_recorded_timestamp** | **Integer** | | | +| **exploit_sources** | [**Array<IngestionCVEExploitSource>**](IngestionCVEExploitSource.md) | | | +| **exploit_status** | **String** | | | +| **exploit_updated_timestamp** | **Integer** | | | +| **exprt_rating** | **String** | | | +| **exprt_rating_date_recorded_timestamp** | **Integer** | | | +| **exprt_rating_highest** | **String** | | | +| **exprt_rating_highest_recorded_timestamp** | **Integer** | | | +| **first_seen_timestamp** | **Integer** | | | +| **references** | [**Array<IngestionReference>**](IngestionReference.md) | | | +| **remediation_count** | **Integer** | | | +| **remediation_sources** | **Array<String>** | | | +| **remediations** | **Array<String>** | | | +| **runtime** | **String** | | | +| **scanner_version** | **String** | | | +| **severity** | **String** | | | +| **top_exprt_rating_factors** | [**Array<IngestionExPRTRatingFactors>**](IngestionExPRTRatingFactors.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsRuleProperties.new( + cvss_attack_complexity: null, + cvss_attack_vector: null, + cvss_availability_impact: null, + cvss_base_score: null, + cvss_confidentiality_impact: null, + cvss_exploitability_score: null, + cvss_impact_score: null, + cvss_integrity_impact: null, + cvss_privileges_required: null, + cvss_scope: null, + cvss_source: null, + cvss_user_interaction: null, + cvss_vector: null, + description: null, + exploit_date_recorded_timestamp: null, + exploit_sources: null, + exploit_status: null, + exploit_updated_timestamp: null, + exprt_rating: null, + exprt_rating_date_recorded_timestamp: null, + exprt_rating_highest: null, + exprt_rating_highest_recorded_timestamp: null, + first_seen_timestamp: null, + references: null, + remediation_count: null, + remediation_sources: null, + remediations: null, + runtime: null, + scanner_version: null, + severity: null, + top_exprt_rating_factors: null +) +``` + diff --git a/docs/ModelsRun.md b/docs/ModelsRun.md new file mode 100644 index 00000000..4f6a2aa9 --- /dev/null +++ b/docs/ModelsRun.md @@ -0,0 +1,20 @@ +# Falcon::ModelsRun + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **results** | [**Array<ModelsResult>**](ModelsResult.md) | | | +| **tool** | [**ModelsRunTool**](ModelsRunTool.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsRun.new( + results: null, + tool: null +) +``` + diff --git a/docs/ModelsRunTool.md b/docs/ModelsRunTool.md new file mode 100644 index 00000000..1c7eb799 --- /dev/null +++ b/docs/ModelsRunTool.md @@ -0,0 +1,18 @@ +# Falcon::ModelsRunTool + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **driver** | [**ModelsRunToolDriver**](ModelsRunToolDriver.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsRunTool.new( + driver: null +) +``` + diff --git a/docs/ModelsRunToolDriver.md b/docs/ModelsRunToolDriver.md new file mode 100644 index 00000000..27087a62 --- /dev/null +++ b/docs/ModelsRunToolDriver.md @@ -0,0 +1,24 @@ +# Falcon::ModelsRunToolDriver + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **information_uri** | **String** | | | +| **name** | **String** | | | +| **rules** | [**Array<ModelsRule>**](ModelsRule.md) | | | +| **version** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsRunToolDriver.new( + information_uri: null, + name: null, + rules: null, + version: null +) +``` + diff --git a/docs/ModelsVulnerabilitySARIF.md b/docs/ModelsVulnerabilitySARIF.md new file mode 100644 index 00000000..1a0c52d4 --- /dev/null +++ b/docs/ModelsVulnerabilitySARIF.md @@ -0,0 +1,22 @@ +# Falcon::ModelsVulnerabilitySARIF + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **schema** | **String** | | | +| **runs** | [**Array<ModelsRun>**](ModelsRun.md) | | | +| **version** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsVulnerabilitySARIF.new( + schema: null, + runs: null, + version: null +) +``` + diff --git a/docs/PackagesApiCombinedPackageV2.md b/docs/PackagesApiCombinedPackageV2.md new file mode 100644 index 00000000..861e56f6 --- /dev/null +++ b/docs/PackagesApiCombinedPackageV2.md @@ -0,0 +1,22 @@ +# Falcon::PackagesApiCombinedPackageV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIPackageCombinedV2>**](ModelsAPIPackageCombinedV2.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PackagesApiCombinedPackageV2.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PolicyframeworkBenchmark.md b/docs/PolicyframeworkBenchmark.md new file mode 100644 index 00000000..5ab541e3 --- /dev/null +++ b/docs/PolicyframeworkBenchmark.md @@ -0,0 +1,20 @@ +# Falcon::PolicyframeworkBenchmark + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | | +| **version** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PolicyframeworkBenchmark.new( + name: null, + version: null +) +``` + diff --git a/docs/PolicyframeworkControl.md b/docs/PolicyframeworkControl.md new file mode 100644 index 00000000..90e98e40 --- /dev/null +++ b/docs/PolicyframeworkControl.md @@ -0,0 +1,30 @@ +# Falcon::PolicyframeworkControl + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **benchmarks** | [**Array<PolicyframeworkBenchmark>**](PolicyframeworkBenchmark.md) | | [optional] | +| **description** | **String** | | [optional] | +| **framework** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **uuid** | **String** | | [optional] | +| **version** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PolicyframeworkControl.new( + benchmarks: null, + description: null, + framework: null, + name: null, + type: null, + uuid: null, + version: null +) +``` + diff --git a/docs/QuickscanproQueryScanResultsResponse.md b/docs/QuickscanproQueryScanResultsResponse.md index 15e20689..64627c02 100644 --- a/docs/QuickscanproQueryScanResultsResponse.md +++ b/docs/QuickscanproQueryScanResultsResponse.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | | **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **quota** | [**QuickscanproQuotaResource**](QuickscanproQuotaResource.md) | | [optional] | | **resources** | **Array<String>** | scan IDs | | ## Example @@ -16,6 +17,7 @@ require 'crimson-falcon' instance = Falcon::QuickscanproQueryScanResultsResponse.new( errors: null, meta: null, + quota: null, resources: null ) ``` diff --git a/docs/Recon.md b/docs/Recon.md index 3813bdf0..9237c736 100644 --- a/docs/Recon.md +++ b/docs/Recon.md @@ -1827,7 +1827,7 @@ Falcon.configure do |config| end api_instance = Falcon::Recon.new -body = [Falcon::DomainUpdateRuleRequestV1.new({breach_monitor_only: false, breach_monitoring_enabled: false, filter: 'filter_example', id: 'id_example', name: 'name_example', permissions: 'permissions_example', priority: 'priority_example', substring_matching_enabled: false})] # Array | +body = [Falcon::DomainUpdateRuleRequestV1.new({breach_monitor_only: false, breach_monitoring_enabled: false, filter: 'filter_example', id: 'id_example', match_on_tsq_result_types: ['match_on_tsq_result_types_example'], name: 'name_example', permissions: 'permissions_example', priority: 'priority_example', substring_matching_enabled: false})] # Array | begin # Update monitoring rules. diff --git a/docs/RegistrationAWSAccountExtV2.md b/docs/RegistrationAWSAccountExtV2.md index de4de052..a04f5ed3 100644 --- a/docs/RegistrationAWSAccountExtV2.md +++ b/docs/RegistrationAWSAccountExtV2.md @@ -8,11 +8,13 @@ | **account_type** | **String** | | [optional] | | **behavior_assessment_enabled** | **Boolean** | | [optional] | | **cloudtrail_region** | **String** | | | +| **deployment_method** | **String** | | [optional] | | **dspm_enabled** | **Boolean** | | [optional] | | **dspm_role** | **String** | | [optional] | | **iam_role_arn** | **String** | | | | **is_master** | **Boolean** | | [optional] | | **organization_id** | **String** | | | +| **root_stack_id** | **String** | | [optional] | | **sensor_management_enabled** | **Boolean** | | [optional] | | **target_ous** | **Array<String>** | | [optional] | | **use_existing_cloudtrail** | **Boolean** | | [optional] | @@ -27,11 +29,13 @@ instance = Falcon::RegistrationAWSAccountExtV2.new( account_type: null, behavior_assessment_enabled: null, cloudtrail_region: null, + deployment_method: null, dspm_enabled: null, dspm_role: null, iam_role_arn: null, is_master: null, organization_id: null, + root_stack_id: null, sensor_management_enabled: null, target_ous: null, use_existing_cloudtrail: null diff --git a/docs/RegistrationAWSAccountPatch.md b/docs/RegistrationAWSAccountPatch.md index 97e0aab2..0ffd72c1 100644 --- a/docs/RegistrationAWSAccountPatch.md +++ b/docs/RegistrationAWSAccountPatch.md @@ -7,12 +7,14 @@ | **account_id** | **String** | | | | **behavior_assessment_enabled** | **Boolean** | | [optional] | | **cloudtrail_region** | **String** | | [optional] | +| **deployment_method** | **String** | | [optional] | | **dspm_enabled** | **Boolean** | | [optional] | | **dspm_role** | **String** | | [optional] | | **environment** | **String** | | [optional] | | **iam_role_arn** | **String** | | | | **remediation_region** | **String** | | [optional] | | **remediation_tou_accepted** | **Time** | | [optional] | +| **root_stack_id** | **String** | | [optional] | | **sensor_management_enabled** | **Boolean** | | [optional] | | **target_ous** | **Array<String>** | | [optional] | @@ -25,12 +27,14 @@ instance = Falcon::RegistrationAWSAccountPatch.new( account_id: null, behavior_assessment_enabled: null, cloudtrail_region: null, + deployment_method: null, dspm_enabled: null, dspm_role: null, environment: null, iam_role_arn: null, remediation_region: null, remediation_tou_accepted: null, + root_stack_id: null, sensor_management_enabled: null, target_ous: null ) diff --git a/docs/RegistrationAWSAccountResponseV2.md b/docs/RegistrationAWSAccountResponseV2.md index a1ca5474..02db825b 100644 --- a/docs/RegistrationAWSAccountResponseV2.md +++ b/docs/RegistrationAWSAccountResponseV2.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | | **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | | **resources** | [**Array<DomainAWSAccountV2>**](DomainAWSAccountV2.md) | | | diff --git a/docs/RegistrationAzureDownloadCertificateResponseV1.md b/docs/RegistrationAzureDownloadCertificateResponseV1.md index edf7293d..8ebcf4e5 100644 --- a/docs/RegistrationAzureDownloadCertificateResponseV1.md +++ b/docs/RegistrationAzureDownloadCertificateResponseV1.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | | **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | | **resources** | [**Array<RegistrationAzureKeyV1>**](RegistrationAzureKeyV1.md) | | | diff --git a/docs/RegistrationIOMEventV2.md b/docs/RegistrationIOMEventV2.md index 180b9ba1..802b1809 100644 --- a/docs/RegistrationIOMEventV2.md +++ b/docs/RegistrationIOMEventV2.md @@ -15,6 +15,7 @@ | **custom_policy_id** | **Integer** | | [optional] | | **finding** | **Object** | | | | **findings** | **Array<Object>** | | | +| **groups** | **Array<String>** | | [optional] | | **id** | **String** | | | | **is_managed** | **Boolean** | | [optional] | | **policy_id** | **Integer** | | [optional] | @@ -53,6 +54,7 @@ instance = Falcon::RegistrationIOMEventV2.new( custom_policy_id: null, finding: null, findings: null, + groups: null, id: null, is_managed: null, policy_id: null, diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md new file mode 100644 index 00000000..9a2ae643 --- /dev/null +++ b/docs/ReleaseNotes.md @@ -0,0 +1,247 @@ +# Falcon::ReleaseNotes + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**combined_release_notes_v1**](ReleaseNotes.md#combined_release_notes_v1) | **GET** /deployment-coordinator/combined/release-notes/v1 | Queries for release-notes resources and returns details | +| [**get_entity_ids_by_query_post**](ReleaseNotes.md#get_entity_ids_by_query_post) | **POST** /deployment-coordinator/entities/release-notes/GET/v1 | returns the IDs of all entities in the database for the given page | +| [**query_release_notes_v1**](ReleaseNotes.md#query_release_notes_v1) | **GET** /deployment-coordinator/queries/release-notes/v1 | Queries for release-notes resources and returns ids | + + +## combined_release_notes_v1 + +> combined_release_notes_v1(authorization, opts) + +Queries for release-notes resources and returns details + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ReleaseNotes.new +authorization = 'authorization_example' # String | authorization header +opts = { + x_cs_username: 'x_cs_username_example', # String | user name + filter: 'filter_example', # String | FQL query specifying filter parameters. + limit: 56, # Integer | Maximum number of records to return. + offset: 'offset_example', # String | Starting pagination offset of records to return. + sort: 'sort_example' # String | Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. +} + +begin + # Queries for release-notes resources and returns details + result = api_instance.combined_release_notes_v1(authorization, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ReleaseNotes->combined_release_notes_v1: #{e}" +end +``` + +#### Using the combined_release_notes_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> combined_release_notes_v1_with_http_info(authorization, opts) + +```ruby +begin + # Queries for release-notes resources and returns details + data, status_code, headers = api_instance.combined_release_notes_v1_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ReleaseNotes->combined_release_notes_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | authorization header | | +| **x_cs_username** | **String** | user name | [optional] | +| **filter** | **String** | FQL query specifying filter parameters. | [optional] | +| **limit** | **Integer** | Maximum number of records to return. | [optional] | +| **offset** | **String** | Starting pagination offset of records to return. | [optional] | +| **sort** | **String** | Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. | [optional] | + +### Return type + +[**ReleasenotesReleaseNoteWrapperV1**](ReleasenotesReleaseNoteWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_entity_ids_by_query_post + +> get_entity_ids_by_query_post(authorization, body, opts) + +returns the IDs of all entities in the database for the given page + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ReleaseNotes.new +authorization = 'authorization_example' # String | authorization header +body = Falcon::ReleasenotesEntitiesGetRequest.new({ids: ['ids_example']}) # ReleasenotesEntitiesGetRequest | +opts = { + x_cs_username: 'x_cs_username_example' # String | user name +} + +begin + # returns the IDs of all entities in the database for the given page + result = api_instance.get_entity_ids_by_query_post(authorization, body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ReleaseNotes->get_entity_ids_by_query_post: #{e}" +end +``` + +#### Using the get_entity_ids_by_query_post_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_entity_ids_by_query_post_with_http_info(authorization, body, opts) + +```ruby +begin + # returns the IDs of all entities in the database for the given page + data, status_code, headers = api_instance.get_entity_ids_by_query_post_with_http_info(authorization, body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ReleaseNotes->get_entity_ids_by_query_post_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | authorization header | | +| **body** | [**ReleasenotesEntitiesGetRequest**](ReleasenotesEntitiesGetRequest.md) | | | +| **x_cs_username** | **String** | user name | [optional] | + +### Return type + +[**ReleasenotesEntitiesGetResponseWrapper**](ReleasenotesEntitiesGetResponseWrapper.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## query_release_notes_v1 + +> query_release_notes_v1(authorization, opts) + +Queries for release-notes resources and returns ids + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::ReleaseNotes.new +authorization = 'authorization_example' # String | authorization header +opts = { + x_cs_username: 'x_cs_username_example', # String | user name + filter: 'filter_example', # String | FQL query specifying filter parameters. + limit: 56, # Integer | Maximum number of records to return. + offset: 'offset_example', # String | Starting pagination offset of records to return. + sort: 'sort_example' # String | Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. +} + +begin + # Queries for release-notes resources and returns ids + result = api_instance.query_release_notes_v1(authorization, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ReleaseNotes->query_release_notes_v1: #{e}" +end +``` + +#### Using the query_release_notes_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_release_notes_v1_with_http_info(authorization, opts) + +```ruby +begin + # Queries for release-notes resources and returns ids + data, status_code, headers = api_instance.query_release_notes_v1_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ReleaseNotes->query_release_notes_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | authorization header | | +| **x_cs_username** | **String** | user name | [optional] | +| **filter** | **String** | FQL query specifying filter parameters. | [optional] | +| **limit** | **Integer** | Maximum number of records to return. | [optional] | +| **offset** | **String** | Starting pagination offset of records to return. | [optional] | +| **sort** | **String** | Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. | [optional] | + +### Return type + +[**StringWrapper**](StringWrapper.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ReleasecontentsReleaseContent.md b/docs/ReleasecontentsReleaseContent.md new file mode 100644 index 00000000..7c38304f --- /dev/null +++ b/docs/ReleasecontentsReleaseContent.md @@ -0,0 +1,32 @@ +# Falcon::ReleasecontentsReleaseContent + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **content_category** | **String** | | | +| **content_group_id** | **String** | | | +| **content_type** | **String** | | | +| **content_version** | [**ReleasecontentsReleaseContentVersion**](ReleasecontentsReleaseContentVersion.md) | | | +| **description** | **String** | | [optional] | +| **id** | **String** | | | +| **jira_ticket** | **String** | | [optional] | +| **status** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasecontentsReleaseContent.new( + content_category: null, + content_group_id: null, + content_type: null, + content_version: null, + description: null, + id: null, + jira_ticket: null, + status: null +) +``` + diff --git a/docs/ReleasecontentsReleaseContentVersion.md b/docs/ReleasecontentsReleaseContentVersion.md new file mode 100644 index 00000000..54ec5eae --- /dev/null +++ b/docs/ReleasecontentsReleaseContentVersion.md @@ -0,0 +1,22 @@ +# Falcon::ReleasecontentsReleaseContentVersion + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **source_id** | **String** | | | +| **source_type** | **String** | | | +| **version** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasecontentsReleaseContentVersion.new( + source_id: null, + source_type: null, + version: null +) +``` + diff --git a/docs/ReleasenotesEntitiesGetRequest.md b/docs/ReleasenotesEntitiesGetRequest.md new file mode 100644 index 00000000..6a160154 --- /dev/null +++ b/docs/ReleasenotesEntitiesGetRequest.md @@ -0,0 +1,18 @@ +# Falcon::ReleasenotesEntitiesGetRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasenotesEntitiesGetRequest.new( + ids: null +) +``` + diff --git a/docs/ReleasenotesEntitiesGetResponseWrapper.md b/docs/ReleasenotesEntitiesGetResponseWrapper.md new file mode 100644 index 00000000..043bb4c5 --- /dev/null +++ b/docs/ReleasenotesEntitiesGetResponseWrapper.md @@ -0,0 +1,22 @@ +# Falcon::ReleasenotesEntitiesGetResponseWrapper + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**ReleasenotesReleaseNoteWrapperV1**](ReleasenotesReleaseNoteWrapperV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasenotesEntitiesGetResponseWrapper.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ReleasenotesNoteDetail.md b/docs/ReleasenotesNoteDetail.md new file mode 100644 index 00000000..d8049b71 --- /dev/null +++ b/docs/ReleasenotesNoteDetail.md @@ -0,0 +1,24 @@ +# Falcon::ReleasenotesNoteDetail + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **category** | **String** | | [optional] | +| **cloud** | **Array<String>** | | [optional] | +| **note_content** | **String** | | | +| **platforms** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasenotesNoteDetail.new( + category: null, + cloud: null, + note_content: null, + platforms: null +) +``` + diff --git a/docs/ReleasenotesReleaseNoteV1.md b/docs/ReleasenotesReleaseNoteV1.md new file mode 100644 index 00000000..3aadb18e --- /dev/null +++ b/docs/ReleasenotesReleaseNoteV1.md @@ -0,0 +1,28 @@ +# Falcon::ReleasenotesReleaseNoteV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **categories** | **Array<String>** | | | +| **early_access** | **String** | | [optional] | +| **general_availability** | **String** | | [optional] | +| **notes** | [**Array<ReleasenotesNoteDetail>**](ReleasenotesNoteDetail.md) | | | +| **timestamp** | **Time** | | | +| **version** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasenotesReleaseNoteV1.new( + categories: null, + early_access: null, + general_availability: null, + notes: null, + timestamp: null, + version: null +) +``` + diff --git a/docs/ReleasenotesReleaseNoteWrapperV1.md b/docs/ReleasenotesReleaseNoteWrapperV1.md new file mode 100644 index 00000000..ed633b07 --- /dev/null +++ b/docs/ReleasenotesReleaseNoteWrapperV1.md @@ -0,0 +1,22 @@ +# Falcon::ReleasenotesReleaseNoteWrapperV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<ReleasenotesReleaseNoteV1>**](ReleasenotesReleaseNoteV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasenotesReleaseNoteWrapperV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/Releases.md b/docs/Releases.md new file mode 100644 index 00000000..52b1645a --- /dev/null +++ b/docs/Releases.md @@ -0,0 +1,89 @@ +# Falcon::Releases + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**combined_releases_v1_mixin0**](Releases.md#combined_releases_v1_mixin0) | **GET** /deployment-coordinator/combined/releases/v1 | Queries for releases resources and returns details | + + +## combined_releases_v1_mixin0 + +> combined_releases_v1_mixin0(authorization, opts) + +Queries for releases resources and returns details + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::Releases.new +authorization = 'authorization_example' # String | authorization header +opts = { + x_cs_username: 'x_cs_username_example', # String | user name + filter: 'filter_example', # String | FQL query specifying filter parameters. + limit: 56, # Integer | Maximum number of records to return. + offset: 'offset_example', # String | Starting pagination offset of records to return. + sort: 'sort_example' # String | Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. +} + +begin + # Queries for releases resources and returns details + result = api_instance.combined_releases_v1_mixin0(authorization, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling Releases->combined_releases_v1_mixin0: #{e}" +end +``` + +#### Using the combined_releases_v1_mixin0_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> combined_releases_v1_mixin0_with_http_info(authorization, opts) + +```ruby +begin + # Queries for releases resources and returns details + data, status_code, headers = api_instance.combined_releases_v1_mixin0_with_http_info(authorization, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling Releases->combined_releases_v1_mixin0_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **authorization** | **String** | authorization header | | +| **x_cs_username** | **String** | user name | [optional] | +| **filter** | **String** | FQL query specifying filter parameters. | [optional] | +| **limit** | **Integer** | Maximum number of records to return. | [optional] | +| **offset** | **String** | Starting pagination offset of records to return. | [optional] | +| **sort** | **String** | Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. | [optional] | + +### Return type + +[**ReleasesReleaseWrapper**](ReleasesReleaseWrapper.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ReleasesRelease.md b/docs/ReleasesRelease.md new file mode 100644 index 00000000..3360049a --- /dev/null +++ b/docs/ReleasesRelease.md @@ -0,0 +1,34 @@ +# Falcon::ReleasesRelease + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_by** | **String** | | [optional] | +| **created_timestamp** | **Time** | | | +| **deployed_timestamp** | **Time** | | [optional] | +| **deployment_start_timestamp** | **Time** | | [optional] | +| **id** | **String** | | | +| **last_modified_by** | **String** | | [optional] | +| **last_modified_timestamp** | **Time** | | [optional] | +| **release_contents** | [**Array<ReleasecontentsReleaseContent>**](ReleasecontentsReleaseContent.md) | | | +| **status** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasesRelease.new( + created_by: null, + created_timestamp: null, + deployed_timestamp: null, + deployment_start_timestamp: null, + id: null, + last_modified_by: null, + last_modified_timestamp: null, + release_contents: null, + status: null +) +``` + diff --git a/docs/ReleasesReleaseWrapper.md b/docs/ReleasesReleaseWrapper.md new file mode 100644 index 00000000..8057de23 --- /dev/null +++ b/docs/ReleasesReleaseWrapper.md @@ -0,0 +1,22 @@ +# Falcon::ReleasesReleaseWrapper + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<ReleasesRelease>**](ReleasesRelease.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ReleasesReleaseWrapper.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ResourcesApp.md b/docs/ResourcesApp.md new file mode 100644 index 00000000..37a19d68 --- /dev/null +++ b/docs/ResourcesApp.md @@ -0,0 +1,20 @@ +# Falcon::ResourcesApp + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **version** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesApp.new( + name: null, + version: null +) +``` + diff --git a/docs/ResourcesAssetGraph.md b/docs/ResourcesAssetGraph.md new file mode 100644 index 00000000..746ab463 --- /dev/null +++ b/docs/ResourcesAssetGraph.md @@ -0,0 +1,20 @@ +# Falcon::ResourcesAssetGraph + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **res_id** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesAssetGraph.new( + id: null, + res_id: null +) +``` + diff --git a/docs/ResourcesCloudContext.md b/docs/ResourcesCloudContext.md new file mode 100644 index 00000000..74f290d0 --- /dev/null +++ b/docs/ResourcesCloudContext.md @@ -0,0 +1,50 @@ +# Falcon::ResourcesCloudContext + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_name** | **String** | | [optional] | +| **allows_public_access** | **Boolean** | | [optional] | +| **asset_graph** | [**ResourcesAssetGraph**](ResourcesAssetGraph.md) | | [optional] | +| **cspm_license** | **String** | | [optional] | +| **data_classifications** | [**DataclassificationsResponse**](DataclassificationsResponse.md) | | [optional] | +| **detections** | [**ResourcesDetections**](ResourcesDetections.md) | | [optional] | +| **has_falcon_sensor** | **Boolean** | | [optional] | +| **has_tags** | **Boolean** | | [optional] | +| **host** | [**ResourcesHost**](ResourcesHost.md) | | [optional] | +| **instance_id** | **String** | | [optional] | +| **instance_state** | **String** | | [optional] | +| **legacy_resource_id** | **String** | | [optional] | +| **legacy_type_id** | **Integer** | | [optional] | +| **legacy_uuid** | **String** | | [optional] | +| **managed_by** | **String** | | [optional] | +| **publicly_exposed** | **Boolean** | | [optional] | +| **scan_type** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesCloudContext.new( + account_name: null, + allows_public_access: null, + asset_graph: null, + cspm_license: null, + data_classifications: null, + detections: null, + has_falcon_sensor: null, + has_tags: null, + host: null, + instance_id: null, + instance_state: null, + legacy_resource_id: null, + legacy_type_id: null, + legacy_uuid: null, + managed_by: null, + publicly_exposed: null, + scan_type: null +) +``` + diff --git a/docs/ResourcesCloudResource.md b/docs/ResourcesCloudResource.md new file mode 100644 index 00000000..b73a1026 --- /dev/null +++ b/docs/ResourcesCloudResource.md @@ -0,0 +1,98 @@ +# Falcon::ResourcesCloudResource + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_id** | **String** | | [optional] | +| **account_name** | **String** | | [optional] | +| **active** | **Boolean** | | [optional] | +| **arn** | **String** | | [optional] | +| **category** | **String** | | [optional] | +| **cid** | **String** | | [optional] | +| **cloud_context** | [**ResourcesCloudContext**](ResourcesCloudContext.md) | | [optional] | +| **cloud_groups** | [**Array<DomainCloudScope>**](DomainCloudScope.md) | | [optional] | +| **cloud_labels** | [**Array<ClassificationLabel>**](ClassificationLabel.md) | | [optional] | +| **cloud_provider** | **String** | | [optional] | +| **cluster_id** | **String** | | [optional] | +| **cluster_name** | **String** | | [optional] | +| **configuration** | **Object** | | [optional] | +| **creation_time** | **Time** | | [optional] | +| **first_seen** | **Time** | | [optional] | +| **hash** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **location** | **String** | | [optional] | +| **organization_id** | **String** | | [optional] | +| **parent** | **String** | | [optional] | +| **project_id** | **String** | | [optional] | +| **project_number** | **String** | | [optional] | +| **region** | **String** | | [optional] | +| **relationships** | [**Array<ResourcesRelationship>**](ResourcesRelationship.md) | | [optional] | +| **resource_group** | **String** | | [optional] | +| **resource_id** | **String** | | [optional] | +| **resource_name** | **String** | | [optional] | +| **resource_number** | **String** | | [optional] | +| **resource_type** | **String** | | [optional] | +| **resource_type_name** | **String** | | [optional] | +| **resource_url** | **String** | | [optional] | +| **revision** | **Integer** | | [optional] | +| **service** | **String** | | [optional] | +| **status** | **String** | | [optional] | +| **subscription_id** | **String** | | [optional] | +| **supplementary_configuration** | **Object** | | [optional] | +| **tags** | **Hash<String, String>** | | [optional] | +| **tenant_id** | **String** | | [optional] | +| **updated_at** | **Time** | | [optional] | +| **zone** | **String** | | [optional] | +| **zones** | **Array<Object>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesCloudResource.new( + account_id: null, + account_name: null, + active: null, + arn: null, + category: null, + cid: null, + cloud_context: null, + cloud_groups: null, + cloud_labels: null, + cloud_provider: null, + cluster_id: null, + cluster_name: null, + configuration: null, + creation_time: null, + first_seen: null, + hash: null, + id: null, + location: null, + organization_id: null, + parent: null, + project_id: null, + project_number: null, + region: null, + relationships: null, + resource_group: null, + resource_id: null, + resource_name: null, + resource_number: null, + resource_type: null, + resource_type_name: null, + resource_url: null, + revision: null, + service: null, + status: null, + subscription_id: null, + supplementary_configuration: null, + tags: null, + tenant_id: null, + updated_at: null, + zone: null, + zones: null +) +``` + diff --git a/docs/ResourcesCompliance.md b/docs/ResourcesCompliance.md new file mode 100644 index 00000000..a46e45a1 --- /dev/null +++ b/docs/ResourcesCompliance.md @@ -0,0 +1,30 @@ +# Falcon::ResourcesCompliance + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **benchmark_names** | **Array<String>** | | [optional] | +| **benchmark_versions** | **Array<String>** | | | +| **controls** | [**Array<PolicyframeworkControl>**](PolicyframeworkControl.md) | | [optional] | +| **framework_versions** | **Array<String>** | | [optional] | +| **frameworks** | **Array<String>** | | [optional] | +| **legacy_policy_ids** | **Array<Integer>** | | [optional] | +| **rules** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesCompliance.new( + benchmark_names: null, + benchmark_versions: null, + controls: null, + framework_versions: null, + frameworks: null, + legacy_policy_ids: null, + rules: null +) +``` + diff --git a/docs/ResourcesDetections.md b/docs/ResourcesDetections.md new file mode 100644 index 00000000..a63cc050 --- /dev/null +++ b/docs/ResourcesDetections.md @@ -0,0 +1,28 @@ +# Falcon::ResourcesDetections + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **compliant** | [**ResourcesCompliance**](ResourcesCompliance.md) | | [optional] | +| **highest_severity** | **String** | | [optional] | +| **ioa_counts** | **Integer** | | | +| **iom_counts** | **Integer** | | | +| **non_compliant** | [**ResourcesCompliance**](ResourcesCompliance.md) | | [optional] | +| **severities** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesDetections.new( + compliant: null, + highest_severity: null, + ioa_counts: null, + iom_counts: null, + non_compliant: null, + severities: null +) +``` + diff --git a/docs/ResourcesHost.md b/docs/ResourcesHost.md new file mode 100644 index 00000000..4fa01889 --- /dev/null +++ b/docs/ResourcesHost.md @@ -0,0 +1,50 @@ +# Falcon::ResourcesHost + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **aid** | **String** | | [optional] | +| **apps** | **Array<String>** | | [optional] | +| **cve_ids** | **Array<String>** | | [optional] | +| **exprt_ratings** | **Array<String>** | | [optional] | +| **managed_by** | **String** | | [optional] | +| **os_build** | **String** | | [optional] | +| **os_version** | **String** | | [optional] | +| **platform_name** | **String** | | [optional] | +| **platform_os_name** | **String** | | [optional] | +| **platform_os_version** | **String** | | [optional] | +| **recommendations** | **Array<String>** | | [optional] | +| **sensor_priority** | **String** | | [optional] | +| **snapshot_detections** | **Array<String>** | | [optional] | +| **ssm_managed** | **Boolean** | | [optional] | +| **state** | **String** | | [optional] | +| **vulnerabilities** | [**Array<ResourcesVulnerability>**](ResourcesVulnerability.md) | | [optional] | +| **vulnerabilities_count** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesHost.new( + aid: null, + apps: null, + cve_ids: null, + exprt_ratings: null, + managed_by: null, + os_build: null, + os_version: null, + platform_name: null, + platform_os_name: null, + platform_os_version: null, + recommendations: null, + sensor_priority: null, + snapshot_detections: null, + ssm_managed: null, + state: null, + vulnerabilities: null, + vulnerabilities_count: null +) +``` + diff --git a/docs/ResourcesRelationship.md b/docs/ResourcesRelationship.md new file mode 100644 index 00000000..6ab8f0ff --- /dev/null +++ b/docs/ResourcesRelationship.md @@ -0,0 +1,24 @@ +# Falcon::ResourcesRelationship + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **crn** | **String** | | [optional] | +| **relationship_name** | **String** | | [optional] | +| **resource_id** | **String** | | [optional] | +| **resource_type** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesRelationship.new( + crn: null, + relationship_name: null, + resource_id: null, + resource_type: null +) +``` + diff --git a/docs/ResourcesVulnerability.md b/docs/ResourcesVulnerability.md new file mode 100644 index 00000000..96a37db2 --- /dev/null +++ b/docs/ResourcesVulnerability.md @@ -0,0 +1,22 @@ +# Falcon::ResourcesVulnerability + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app** | [**ResourcesApp**](ResourcesApp.md) | | [optional] | +| **cve_id** | **String** | | | +| **exprt_rating** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ResourcesVulnerability.new( + app: null, + cve_id: null, + exprt_rating: null +) +``` + diff --git a/docs/RestAzureDownloadScriptRequestData.md b/docs/RestAzureDownloadScriptRequestData.md new file mode 100644 index 00000000..b007bf6a --- /dev/null +++ b/docs/RestAzureDownloadScriptRequestData.md @@ -0,0 +1,18 @@ +# Falcon::RestAzureDownloadScriptRequestData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestAzureDownloadScriptRequestData.new( + tenant_id: null +) +``` + diff --git a/docs/RestAzureDownloadScriptRequestV1.md b/docs/RestAzureDownloadScriptRequestV1.md new file mode 100644 index 00000000..a0ecf457 --- /dev/null +++ b/docs/RestAzureDownloadScriptRequestV1.md @@ -0,0 +1,18 @@ +# Falcon::RestAzureDownloadScriptRequestV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<RestAzureDownloadScriptRequestData>**](RestAzureDownloadScriptRequestData.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestAzureDownloadScriptRequestV1.new( + resources: null +) +``` + diff --git a/docs/RestAzureProvisionGetAccountScriptResponseV1.md b/docs/RestAzureProvisionGetAccountScriptResponseV1.md new file mode 100644 index 00000000..6e5ad100 --- /dev/null +++ b/docs/RestAzureProvisionGetAccountScriptResponseV1.md @@ -0,0 +1,22 @@ +# Falcon::RestAzureProvisionGetAccountScriptResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<RestAzureScript>**](RestAzureScript.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestAzureProvisionGetAccountScriptResponseV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RestAzureScript.md b/docs/RestAzureScript.md new file mode 100644 index 00000000..677e10ba --- /dev/null +++ b/docs/RestAzureScript.md @@ -0,0 +1,24 @@ +# Falcon::RestAzureScript + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | | | +| **tenant_id** | **String** | | | +| **url** | **String** | | [optional] | +| **version** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestAzureScript.new( + cid: null, + tenant_id: null, + url: null, + version: null +) +``` + diff --git a/docs/RestCursorAndLimitMetaInfo.md b/docs/RestCursorAndLimitMetaInfo.md new file mode 100644 index 00000000..7a9fcbc3 --- /dev/null +++ b/docs/RestCursorAndLimitMetaInfo.md @@ -0,0 +1,28 @@ +# Falcon::RestCursorAndLimitMetaInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_next** | **String** | | [optional] | +| **pagination** | [**RestPaging**](RestPaging.md) | | [optional] | +| **powered_by** | **String** | | [optional] | +| **query_time** | **Float** | | | +| **trace_id** | **String** | | | +| **writes** | [**MsaspecWrites**](MsaspecWrites.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestCursorAndLimitMetaInfo.new( + _next: null, + pagination: null, + powered_by: null, + query_time: null, + trace_id: null, + writes: null +) +``` + diff --git a/docs/RestCursorMetaInfo.md b/docs/RestCursorMetaInfo.md new file mode 100644 index 00000000..2cd6b491 --- /dev/null +++ b/docs/RestCursorMetaInfo.md @@ -0,0 +1,26 @@ +# Falcon::RestCursorMetaInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_next** | **String** | | [optional] | +| **powered_by** | **String** | | [optional] | +| **query_time** | **Float** | | | +| **trace_id** | **String** | | | +| **writes** | [**MsaspecWrites**](MsaspecWrites.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestCursorMetaInfo.new( + _next: null, + powered_by: null, + query_time: null, + trace_id: null, + writes: null +) +``` + diff --git a/docs/RestCursorResponseFields.md b/docs/RestCursorResponseFields.md new file mode 100644 index 00000000..e3f8b9f8 --- /dev/null +++ b/docs/RestCursorResponseFields.md @@ -0,0 +1,20 @@ +# Falcon::RestCursorResponseFields + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**RestCursorMetaInfo**](RestCursorMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestCursorResponseFields.new( + errors: null, + meta: null +) +``` + diff --git a/docs/RestPaging.md b/docs/RestPaging.md new file mode 100644 index 00000000..1ba2e3c2 --- /dev/null +++ b/docs/RestPaging.md @@ -0,0 +1,22 @@ +# Falcon::RestPaging + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **limit** | **Integer** | | | +| **offset** | **Integer** | | [optional] | +| **total** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestPaging.new( + limit: null, + offset: null, + total: null +) +``` + diff --git a/docs/RestapiIndicatorResponse.md b/docs/RestapiIndicatorResponse.md new file mode 100644 index 00000000..51e1b190 --- /dev/null +++ b/docs/RestapiIndicatorResponse.md @@ -0,0 +1,22 @@ +# Falcon::RestapiIndicatorResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<FigapiIndicator>**](FigapiIndicator.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestapiIndicatorResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RestapiIndicatorsQueryRequest.md b/docs/RestapiIndicatorsQueryRequest.md new file mode 100644 index 00000000..3bd443ec --- /dev/null +++ b/docs/RestapiIndicatorsQueryRequest.md @@ -0,0 +1,20 @@ +# Falcon::RestapiIndicatorsQueryRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | | | +| **sort** | [**Array<RestapiIndicatorsQuerySortRequest>**](RestapiIndicatorsQuerySortRequest.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestapiIndicatorsQueryRequest.new( + filter: null, + sort: null +) +``` + diff --git a/docs/RestapiIndicatorsQuerySortRequest.md b/docs/RestapiIndicatorsQuerySortRequest.md new file mode 100644 index 00000000..53a4b56c --- /dev/null +++ b/docs/RestapiIndicatorsQuerySortRequest.md @@ -0,0 +1,22 @@ +# Falcon::RestapiIndicatorsQuerySortRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **field** | **String** | | | +| **missing** | **Object** | | | +| **order** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RestapiIndicatorsQuerySortRequest.new( + field: null, + missing: null, + order: null +) +``` + diff --git a/docs/RuntimeDetections.md b/docs/RuntimeDetections.md index cd4d4791..670541d2 100644 --- a/docs/RuntimeDetections.md +++ b/docs/RuntimeDetections.md @@ -4,14 +4,14 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**get_runtime_detections_combined_v2**](RuntimeDetections.md#get_runtime_detections_combined_v2) | **GET** /container-security/combined/runtime-detections/v2 | Retrieve container runtime detections by the provided search criteria | +| [**get_runtime_detections_combined_v2**](RuntimeDetections.md#get_runtime_detections_combined_v2) | **GET** /container-security/combined/runtime-detections/v2 | Maximum offset = 10000 - limit | ## get_runtime_detections_combined_v2 > get_runtime_detections_combined_v2(opts) -Retrieve container runtime detections by the provided search criteria +Maximum offset = 10000 - limit ### Examples @@ -28,14 +28,14 @@ end api_instance = Falcon::RuntimeDetections.new opts = { - filter: 'filter_example', # String | Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filters: action_taken,aid,cid,cloud,cluster_name,command_line,computer_name,container_id,detect_timestamp,detection_description,detection_id,file_name,file_path,host_id,host_type,image_id,name,namespace,pod_name,severity,tactic + filter: 'filter_example', # String | Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_type` - `aid` - `cid` - `cloud_name` - `cloud` - `cluster_name` - `computer_name` - `container_id` - `detect_timestamp` - `host_id` - `host_type` - `image_id` - `name` - `namespace` - `pod_name` - `severity` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The field to sort the records on. + offset: 56 # Integer | The offset from where to begin. } begin - # Retrieve container runtime detections by the provided search criteria + # Maximum offset = 10000 - limit result = api_instance.get_runtime_detections_combined_v2(opts) p result rescue Falcon::ApiError => e @@ -51,7 +51,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Retrieve container runtime detections by the provided search criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.get_runtime_detections_combined_v2_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -65,10 +65,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filters: action_taken,aid,cid,cloud,cluster_name,command_line,computer_name,container_id,detect_timestamp,detection_description,detection_id,file_name,file_path,host_id,host_type,image_id,name,namespace,pod_name,severity,tactic | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **filter** | **String** | Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_type` - `aid` - `cid` - `cloud_name` - `cloud` - `cluster_name` - `computer_name` - `container_id` - `detect_timestamp` - `host_id` - `host_type` - `image_id` - `name` - `namespace` - `pod_name` - `severity` | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | | **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The field to sort the records on. | [optional] | ### Return type diff --git a/docs/SadomainTyposquattingBaseDomain.md b/docs/SadomainTyposquattingBaseDomain.md index 90b2e081..3bc44271 100644 --- a/docs/SadomainTyposquattingBaseDomain.md +++ b/docs/SadomainTyposquattingBaseDomain.md @@ -8,6 +8,8 @@ | **id** | **String** | The ID of the domain | | | **is_registered** | **Boolean** | Whether the domain has a valid Whois record | | | **punycode_format** | **String** | The Punycode representation of the domain, i.e. starting with `xn--` | | +| **submit_for_blocking_info** | [**SadomainSubmissionInformation**](SadomainSubmissionInformation.md) | | [optional] | +| **submit_for_takedown_info** | [**SadomainSubmissionInformation**](SadomainSubmissionInformation.md) | | [optional] | | **unicode_format** | **String** | The Unicode representation of the domain | | | **whois** | [**SadomainWhoisRecord**](SadomainWhoisRecord.md) | | [optional] | @@ -21,6 +23,8 @@ instance = Falcon::SadomainTyposquattingBaseDomain.new( id: null, is_registered: null, punycode_format: null, + submit_for_blocking_info: null, + submit_for_takedown_info: null, unicode_format: null, whois: null ) diff --git a/docs/SadomainTyposquattingSubdomain.md b/docs/SadomainTyposquattingSubdomain.md index 47b8ba0a..31353486 100644 --- a/docs/SadomainTyposquattingSubdomain.md +++ b/docs/SadomainTyposquattingSubdomain.md @@ -6,7 +6,6 @@ | ---- | ---- | ----------- | ----- | | **first_seen** | **Time** | | [optional] | | **id** | **String** | | | -| **is_registered** | **Boolean** | | | | **last_seen** | **Time** | | [optional] | | **punycode_format** | **String** | | | | **unicode_format** | **String** | | | @@ -19,7 +18,6 @@ require 'crimson-falcon' instance = Falcon::SadomainTyposquattingSubdomain.new( first_seen: null, id: null, - is_registered: null, last_seen: null, punycode_format: null, unicode_format: null diff --git a/docs/SampleUploads.md b/docs/SampleUploads.md index 3a936cc6..fdc8886f 100644 --- a/docs/SampleUploads.md +++ b/docs/SampleUploads.md @@ -747,7 +747,7 @@ end ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/octet-stream +- **Accept**: application/octet-stream, application/json ## upload_sample_v3 diff --git a/docs/SpotlightVulnerabilities.md b/docs/SpotlightVulnerabilities.md index 6be2688b..95f4de56 100644 --- a/docs/SpotlightVulnerabilities.md +++ b/docs/SpotlightVulnerabilities.md @@ -6,8 +6,8 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | ------ | ------------ | ----------- | | [**combined_query_vulnerabilities**](SpotlightVulnerabilities.md#combined_query_vulnerabilities) | **GET** /spotlight/combined/vulnerabilities/v1 | Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability entities which match the filter criteria | | [**get_remediations_v2**](SpotlightVulnerabilities.md#get_remediations_v2) | **GET** /spotlight/entities/remediations/v2 | Get details on remediation by providing one or more IDs | -| [**get_vulnerabilities_0**](SpotlightVulnerabilities.md#get_vulnerabilities_0) | **GET** /spotlight/entities/vulnerabilities/v2 | Get details on vulnerabilities by providing one or more IDs | -| [**query_vulnerabilities_0**](SpotlightVulnerabilities.md#query_vulnerabilities_0) | **GET** /spotlight/queries/vulnerabilities/v1 | Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability IDs which match the filter criteria | +| [**get_vulnerabilities**](SpotlightVulnerabilities.md#get_vulnerabilities) | **GET** /spotlight/entities/vulnerabilities/v2 | Get details on vulnerabilities by providing one or more IDs | +| [**query_vulnerabilities**](SpotlightVulnerabilities.md#query_vulnerabilities) | **GET** /spotlight/queries/vulnerabilities/v1 | Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability IDs which match the filter criteria | ## combined_query_vulnerabilities @@ -158,9 +158,9 @@ end - **Accept**: application/json -## get_vulnerabilities_0 +## get_vulnerabilities -> get_vulnerabilities_0(ids) +> get_vulnerabilities(ids) Get details on vulnerabilities by providing one or more IDs @@ -182,28 +182,28 @@ ids = ['inner_example'] # Array | One or more vulnerability IDs (max: 40 begin # Get details on vulnerabilities by providing one or more IDs - result = api_instance.get_vulnerabilities_0(ids) + result = api_instance.get_vulnerabilities(ids) p result rescue Falcon::ApiError => e - puts "Error when calling SpotlightVulnerabilities->get_vulnerabilities_0: #{e}" + puts "Error when calling SpotlightVulnerabilities->get_vulnerabilities: #{e}" end ``` -#### Using the get_vulnerabilities_0_with_http_info variant +#### Using the get_vulnerabilities_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_vulnerabilities_0_with_http_info(ids) +> , Integer, Hash)> get_vulnerabilities_with_http_info(ids) ```ruby begin # Get details on vulnerabilities by providing one or more IDs - data, status_code, headers = api_instance.get_vulnerabilities_0_with_http_info(ids) + data, status_code, headers = api_instance.get_vulnerabilities_with_http_info(ids) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling SpotlightVulnerabilities->get_vulnerabilities_0_with_http_info: #{e}" + puts "Error when calling SpotlightVulnerabilities->get_vulnerabilities_with_http_info: #{e}" end ``` @@ -227,9 +227,9 @@ end - **Accept**: application/json -## query_vulnerabilities_0 +## query_vulnerabilities -> query_vulnerabilities_0(filter, opts) +> query_vulnerabilities(filter, opts) Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability IDs which match the filter criteria @@ -256,28 +256,28 @@ opts = { begin # Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability IDs which match the filter criteria - result = api_instance.query_vulnerabilities_0(filter, opts) + result = api_instance.query_vulnerabilities(filter, opts) p result rescue Falcon::ApiError => e - puts "Error when calling SpotlightVulnerabilities->query_vulnerabilities_0: #{e}" + puts "Error when calling SpotlightVulnerabilities->query_vulnerabilities: #{e}" end ``` -#### Using the query_vulnerabilities_0_with_http_info variant +#### Using the query_vulnerabilities_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_vulnerabilities_0_with_http_info(filter, opts) +> , Integer, Hash)> query_vulnerabilities_with_http_info(filter, opts) ```ruby begin # Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability IDs which match the filter criteria - data, status_code, headers = api_instance.query_vulnerabilities_0_with_http_info(filter, opts) + data, status_code, headers = api_instance.query_vulnerabilities_with_http_info(filter, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling SpotlightVulnerabilities->query_vulnerabilities_0_with_http_info: #{e}" + puts "Error when calling SpotlightVulnerabilities->query_vulnerabilities_with_http_info: #{e}" end ``` diff --git a/docs/StringWrapper.md b/docs/StringWrapper.md new file mode 100644 index 00000000..5ec63092 --- /dev/null +++ b/docs/StringWrapper.md @@ -0,0 +1,22 @@ +# Falcon::StringWrapper + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::StringWrapper.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/Threatgraph.md b/docs/Threatgraph.md index 567b0ee9..20a28055 100644 --- a/docs/Threatgraph.md +++ b/docs/Threatgraph.md @@ -33,12 +33,12 @@ end api_instance = Falcon::Threatgraph.new ids = 'ids_example' # String | Vertex ID to get details for. Only one value is supported -edge_type = 'accessed_ad_computer' # String | The type of edges that you would like to retrieve +edge_type = 'attributed_by_process' # String | The type of edges that you would like to retrieve opts = { limit: 56, # Integer | How many edges to return in a single request [1-100] offset: 'offset_example', # String | The offset to use to retrieve the next page of results direction: 'direction_example', # String | The direction of edges that you would like to retrieve. - scope: 'cspm', # String | Scope of the request + scope: 'device', # String | Scope of the request nano: true # Boolean | Return nano-precision entity timestamps } @@ -192,10 +192,10 @@ Falcon.configure do |config| end api_instance = Falcon::Threatgraph.new -vertex_type = 'accessories' # String | Type of vertex to get properties for +vertex_type = 'accessory' # String | Type of vertex to get properties for ids = ['inner_example'] # Array | Vertex ID to get details for opts = { - scope: 'cspm', # String | Scope of the request + scope: 'device', # String | Scope of the request nano: true # Boolean | Return nano-precision entity timestamps } @@ -268,10 +268,10 @@ Falcon.configure do |config| end api_instance = Falcon::Threatgraph.new -vertex_type = 'accessories' # String | Type of vertex to get properties for +vertex_type = 'accessory' # String | Type of vertex to get properties for ids = ['inner_example'] # Array | Vertex ID to get details for opts = { - scope: 'cspm', # String | Scope of the request + scope: 'device', # String | Scope of the request nano: true # Boolean | Return nano-precision entity timestamps } @@ -345,10 +345,10 @@ Falcon.configure do |config| end api_instance = Falcon::Threatgraph.new -vertex_type = 'accessories' # String | Type of vertex to get properties for +vertex_type = 'accessory' # String | Type of vertex to get properties for ids = ['inner_example'] # Array | Vertex ID to get details for opts = { - scope: 'cspm', # String | Scope of the request + scope: 'device', # String | Scope of the request nano: true # Boolean | Return nano-precision entity timestamps } diff --git a/docs/TypesGetExecutorNodesMetadataResponse.md b/docs/TypesGetExecutorNodesMetadataResponse.md new file mode 100644 index 00000000..10ab6fec --- /dev/null +++ b/docs/TypesGetExecutorNodesMetadataResponse.md @@ -0,0 +1,26 @@ +# Falcon::TypesGetExecutorNodesMetadataResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | [optional] | +| **executor_node_ids** | **Array<Integer>** | | [optional] | +| **executor_node_names** | **Array<String>** | | [optional] | +| **executor_node_states** | **Array<String>** | | [optional] | +| **executor_node_types** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::TypesGetExecutorNodesMetadataResponse.new( + count: null, + executor_node_ids: null, + executor_node_names: null, + executor_node_states: null, + executor_node_types: null +) +``` + diff --git a/docs/TypesGetIntegrationTasksMetadataResponse.md b/docs/TypesGetIntegrationTasksMetadataResponse.md new file mode 100644 index 00000000..10a98d8d --- /dev/null +++ b/docs/TypesGetIntegrationTasksMetadataResponse.md @@ -0,0 +1,24 @@ +# Falcon::TypesGetIntegrationTasksMetadataResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | [optional] | +| **ids** | **Array<Integer>** | | [optional] | +| **integration_task_types** | **Array<Integer>** | | [optional] | +| **names** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::TypesGetIntegrationTasksMetadataResponse.new( + count: null, + ids: null, + integration_task_types: null, + names: null +) +``` + diff --git a/docs/UnidentifiedContainers.md b/docs/UnidentifiedContainers.md index fc7fbbf9..db6bb663 100644 --- a/docs/UnidentifiedContainers.md +++ b/docs/UnidentifiedContainers.md @@ -6,7 +6,7 @@ All URIs are relative to *https://api.us-2.crowdstrike.com* | ------ | ------------ | ----------- | | [**read_unidentified_containers_by_date_range_count**](UnidentifiedContainers.md#read_unidentified_containers_by_date_range_count) | **GET** /container-security/aggregates/unidentified-containers/count-by-date/v1 | Returns the count of Unidentified Containers over the last 7 days | | [**read_unidentified_containers_count**](UnidentifiedContainers.md#read_unidentified_containers_count) | **GET** /container-security/aggregates/unidentified-containers/count/v1 | Returns the total count of Unidentified Containers over a time period | -| [**search_and_read_unidentified_containers**](UnidentifiedContainers.md#search_and_read_unidentified_containers) | **GET** /container-security/combined/unidentified-containers/v1 | Search Unidentified Containers by the provided search criteria | +| [**search_and_read_unidentified_containers**](UnidentifiedContainers.md#search_and_read_unidentified_containers) | **GET** /container-security/combined/unidentified-containers/v1 | Maximum offset = 10000 - limit | ## read_unidentified_containers_by_date_range_count @@ -30,7 +30,7 @@ end api_instance = Falcon::UnidentifiedContainers.new opts = { - filter: 'filter_example' # String | Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + filter: 'filter_example' # String | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` } begin @@ -64,7 +64,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s | [optional] | +| **filter** | **String** | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` | [optional] | ### Return type @@ -101,7 +101,7 @@ end api_instance = Falcon::UnidentifiedContainers.new opts = { - filter: 'filter_example' # String | Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + filter: 'filter_example' # String | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` } begin @@ -135,7 +135,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s | [optional] | +| **filter** | **String** | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` | [optional] | ### Return type @@ -155,7 +155,7 @@ end > search_and_read_unidentified_containers(opts) -Search Unidentified Containers by the provided search criteria +Maximum offset = 10000 - limit ### Examples @@ -172,14 +172,14 @@ end api_instance = Falcon::UnidentifiedContainers.new opts = { - filter: 'filter_example', # String | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + filter: 'filter_example', # String | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` + sort: 'sort_example', # String | The fields to sort the records on. limit: 56, # Integer | The upper-bound on the number of records to retrieve. - offset: 56, # Integer | The offset from where to begin. - sort: 'sort_example' # String | The fields to sort the records on. + offset: 56 # Integer | The offset from where to begin. } begin - # Search Unidentified Containers by the provided search criteria + # Maximum offset = 10000 - limit result = api_instance.search_and_read_unidentified_containers(opts) p result rescue Falcon::ApiError => e @@ -195,7 +195,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Search Unidentified Containers by the provided search criteria + # Maximum offset = 10000 - limit data, status_code, headers = api_instance.search_and_read_unidentified_containers_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -209,10 +209,10 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | -| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **filter** | **String** | Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` | [optional] | | **sort** | **String** | The fields to sort the records on. | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional][default to 100] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | ### Return type diff --git a/docs/V2ForLoop.md b/docs/V2ForLoop.md index e9451b9e..7adeb37a 100644 --- a/docs/V2ForLoop.md +++ b/docs/V2ForLoop.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **cel_condition** | **String** | | [optional] | | **condition** | **String** | | [optional] | | **condition_display** | **Array<String>** | | [optional] | | **continue_on_partial_execution** | **Boolean** | | | @@ -18,6 +19,7 @@ require 'crimson-falcon' instance = Falcon::V2ForLoop.new( + cel_condition: null, condition: null, condition_display: null, continue_on_partial_execution: null, diff --git a/docs/Vulnerabilities.md b/docs/Vulnerabilities.md new file mode 100644 index 00000000..348fdab9 --- /dev/null +++ b/docs/Vulnerabilities.md @@ -0,0 +1,85 @@ +# Falcon::Vulnerabilities + +All URIs are relative to *https://api.us-2.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**get_combined_vulnerabilities_sarif**](Vulnerabilities.md#get_combined_vulnerabilities_sarif) | **GET** /lambdas/combined/vulnerabilities/sarif/v1 | Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format | + + +## get_combined_vulnerabilities_sarif + +> get_combined_vulnerabilities_sarif(opts) + +Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format + +### Examples + +```ruby +require 'time' +require 'crimson-falcon' + +# Setup authorization +Falcon.configure do |config| + config.client_id = "Your_Client_ID" + config.client_secret = "Your_Client_Secret" + config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" +end + +api_instance = Falcon::Vulnerabilities.new +opts = { + filter: 'filter_example', # String | Filter lambda vulnerabilities using a query in Falcon Query Language (FQL).Supported filters: application_name,application_name_version,cid,cloud_account_id,cloud_account_name,cloud_provider,cve_id,cvss_base_score,exprt_rating,first_seen_timestamp,function_name,function_resource_id,is_supported,is_valid_asset_id,layer,region,runtime,severity,timestamp,type + limit: 56, # Integer | The upper-bound on the number of records to retrieve. + offset: 56, # Integer | The offset from where to begin. + sort: 'sort_example' # String | The fields to sort the records on. Supported columns: [application_name application_name_version cid cloud_account_id cloud_account_name cloud_provider cve_id cvss_base_score exprt_rating first_seen_timestamp function_resource_id is_supported layer region runtime severity timestamp type] +} + +begin + # Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format + result = api_instance.get_combined_vulnerabilities_sarif(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling Vulnerabilities->get_combined_vulnerabilities_sarif: #{e}" +end +``` + +#### Using the get_combined_vulnerabilities_sarif_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_combined_vulnerabilities_sarif_with_http_info(opts) + +```ruby +begin + # Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format + data, status_code, headers = api_instance.get_combined_vulnerabilities_sarif_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling Vulnerabilities->get_combined_vulnerabilities_sarif_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter lambda vulnerabilities using a query in Falcon Query Language (FQL).Supported filters: application_name,application_name_version,cid,cloud_account_id,cloud_account_name,cloud_provider,cve_id,cvss_base_score,exprt_rating,first_seen_timestamp,function_name,function_resource_id,is_supported,is_valid_asset_id,layer,region,runtime,severity,timestamp,type | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | The fields to sort the records on. Supported columns: [application_name application_name_version cid cloud_account_id cloud_account_name cloud_provider cve_id cvss_base_score exprt_rating first_seen_timestamp function_resource_id is_supported layer region runtime severity timestamp type] | [optional] | + +### Return type + +[**VulnerabilitiesVulnerabilityEntitySARIFResponse**](VulnerabilitiesVulnerabilityEntitySARIFResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/VulnerabilitiesVulnerabilityEntitySARIFResponse.md b/docs/VulnerabilitiesVulnerabilityEntitySARIFResponse.md new file mode 100644 index 00000000..96e63730 --- /dev/null +++ b/docs/VulnerabilitiesVulnerabilityEntitySARIFResponse.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaAPIError>**](MsaAPIError.md) | | [optional] | +| **meta** | [**MsaMetaInfo**](MsaMetaInfo.md) | | | +| **resources** | [**Array<ModelsVulnerabilitySARIF>**](ModelsVulnerabilitySARIF.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/lib/crimson-falcon.rb b/lib/crimson-falcon.rb index df3e63c5..7334638f 100644 --- a/lib/crimson-falcon.rb +++ b/lib/crimson-falcon.rb @@ -61,6 +61,7 @@ require 'crimson-falcon/models/api_certificates_response_v1' require 'crimson-falcon/models/api_create_migration_request_v1' require 'crimson-falcon/models/api_create_migration_response_v1' +require 'crimson-falcon/models/api_create_rule_operation_v1' require 'crimson-falcon/models/api_cred_payload' require 'crimson-falcon/models/api_customer_settings_patch_request_v1' require 'crimson-falcon/models/api_customer_settings_resource_v1' @@ -80,6 +81,7 @@ require 'crimson-falcon/models/api_exposed_data_record_financial_v1' require 'crimson-falcon/models/api_exposed_data_record_location_v1' require 'crimson-falcon/models/api_exposed_data_record_social_v1' +require 'crimson-falcon/models/api_get_entities_rules_response_v1' require 'crimson-falcon/models/api_get_host_migration_response_v1' require 'crimson-falcon/models/api_get_migration_destinations_request_body_v1' require 'crimson-falcon/models/api_get_migration_destinations_response_v1' @@ -110,6 +112,8 @@ require 'crimson-falcon/models/api_notification_exposed_data_record_entities_response_v1' require 'crimson-falcon/models/api_notification_exposed_data_record_v1' require 'crimson-falcon/models/api_object_metadata' +require 'crimson-falcon/models/api_patch_rule_operation_v1' +require 'crimson-falcon/models/api_patch_rule_search_v1' require 'crimson-falcon/models/api_pattern_v1' require 'crimson-falcon/models/api_patterns_response' require 'crimson-falcon/models/api_platforms_response' @@ -120,12 +124,18 @@ require 'crimson-falcon/models/api_resource_ids_response' require 'crimson-falcon/models/api_resp_certificates_v1' require 'crimson-falcon/models/api_response_pagination' +require 'crimson-falcon/models/api_rule_create_request_v1' require 'crimson-falcon/models/api_rule_create_v1' require 'crimson-falcon/models/api_rule_details_v1' require 'crimson-falcon/models/api_rule_group_create_request_v1' require 'crimson-falcon/models/api_rule_group_modify_request_v1' require 'crimson-falcon/models/api_rule_group_v1' require 'crimson-falcon/models/api_rule_groups_response' +require 'crimson-falcon/models/api_rule_operation_v1' +require 'crimson-falcon/models/api_rule_patch_request_v1' +require 'crimson-falcon/models/api_rule_schedule_v1' +require 'crimson-falcon/models/api_rule_schedule_v1_patch' +require 'crimson-falcon/models/api_rule_search_v1' require 'crimson-falcon/models/api_rule_type_v1' require 'crimson-falcon/models/api_rule_types_response' require 'crimson-falcon/models/api_rule_update_v1' @@ -155,7 +165,10 @@ require 'crimson-falcon/models/apidomain_repository_v1' require 'crimson-falcon/models/apidomain_saved_search_execute_request_v1' require 'crimson-falcon/models/apidomain_view_connection_v1' +require 'crimson-falcon/models/assets_get_resource_ids_response' +require 'crimson-falcon/models/assets_get_resources_response' require 'crimson-falcon/models/base_policy_members_resp_v1' +require 'crimson-falcon/models/base_set_content_update_policy_precedence_req_v1' require 'crimson-falcon/models/base_set_policy_precedence_req_v1' require 'crimson-falcon/models/binservapi_msa_put_file_response' require 'crimson-falcon/models/changes_acl' @@ -206,7 +219,6 @@ require 'crimson-falcon/models/client_extraction_file_result_v1' require 'crimson-falcon/models/client_extraction_list_files_response_v1' require 'crimson-falcon/models/client_extraction_with_files_v1' -require 'crimson-falcon/models/client_fql_statement' require 'crimson-falcon/models/client_field' require 'crimson-falcon/models/client_job_status' require 'crimson-falcon/models/client_query_response_schemas_v1' @@ -229,12 +241,21 @@ require 'crimson-falcon/models/common_generic_entity_response_string' require 'crimson-falcon/models/common_os_audit' require 'crimson-falcon/models/common_registry_credentials_response' +require 'crimson-falcon/models/content_update_create_policies_req_v1' +require 'crimson-falcon/models/content_update_create_policy_req_v1' +require 'crimson-falcon/models/content_update_ring_assignment_settings_v1' +require 'crimson-falcon/models/content_update_settings_v1' +require 'crimson-falcon/models/content_update_update_policies_req_v1' +require 'crimson-falcon/models/content_update_update_policy_req_v1' require 'crimson-falcon/models/contentchanges_change_contents_response' require 'crimson-falcon/models/contentchanges_content' require 'crimson-falcon/models/contentchanges_content_diff' require 'crimson-falcon/models/core_entities_response' require 'crimson-falcon/models/custom_storage_object_keys' require 'crimson-falcon/models/custom_storage_response' +require 'crimson-falcon/models/dataclassifications_label' +require 'crimson-falcon/models/dataclassifications_response' +require 'crimson-falcon/models/dataclassifications_tag' require 'crimson-falcon/models/definitions_definition_entities_response' require 'crimson-falcon/models/definitions_definition_ext' require 'crimson-falcon/models/definitions_definition_external_response' @@ -243,6 +264,9 @@ require 'crimson-falcon/models/definitions_flight_control_request' require 'crimson-falcon/models/definitions_parameter_property' require 'crimson-falcon/models/definitions_playbook_parameter' +require 'crimson-falcon/models/deployments_api_deployment_ring_view' +require 'crimson-falcon/models/deployments_api_deployment_view' +require 'crimson-falcon/models/deployments_api_deployment_view_wrapper' require 'crimson-falcon/models/deployments_entity_response' require 'crimson-falcon/models/destination' require 'crimson-falcon/models/destinations_migration_destination' @@ -270,6 +294,10 @@ require 'crimson-falcon/models/detectsapi_alert_query_response' require 'crimson-falcon/models/detectsapi_patch_entities_alerts_v2_request' require 'crimson-falcon/models/detectsapi_patch_entities_alerts_v3_request' +require 'crimson-falcon/models/detectsapi_post_combined_alerts_v1_meta' +require 'crimson-falcon/models/detectsapi_post_combined_alerts_v1_paging' +require 'crimson-falcon/models/detectsapi_post_combined_alerts_v1_request_swagger' +require 'crimson-falcon/models/detectsapi_post_combined_alerts_v1_response_swagger' require 'crimson-falcon/models/detectsapi_post_entities_alerts_v1_request' require 'crimson-falcon/models/detectsapi_post_entities_alerts_v1_response_swagger' require 'crimson-falcon/models/detectsapi_post_entities_alerts_v2_request' @@ -314,6 +342,10 @@ require 'crimson-falcon/models/deviceapi_update_device_details_response_v1' require 'crimson-falcon/models/deviceapi_update_device_tags_request_v1' require 'crimson-falcon/models/deviceapi_update_device_tags_swagger_v1' +require 'crimson-falcon/models/devicecontent_content_category' +require 'crimson-falcon/models/devicecontent_state' +require 'crimson-falcon/models/devicecontentapi_entities_response_v1' +require 'crimson-falcon/models/devicecontentapi_query_response_v1' require 'crimson-falcon/models/domain_api_combined_findings_response_v1' require 'crimson-falcon/models/domain_api_compliance_control_v1' require 'crimson-falcon/models/domain_api_compliance_mapping_v1' @@ -442,6 +474,8 @@ require 'crimson-falcon/models/domain_config_v1' require 'crimson-falcon/models/domain_configs_v1' require 'crimson-falcon/models/domain_content_package' +require 'crimson-falcon/models/domain_content_update_policy_resp_v1' +require 'crimson-falcon/models/domain_content_update_settings_v1' require 'crimson-falcon/models/domain_control' require 'crimson-falcon/models/domain_control_benchmark' require 'crimson-falcon/models/domain_create_action_request' @@ -568,6 +602,7 @@ require 'crimson-falcon/models/domain_init_response' require 'crimson-falcon/models/domain_init_response_wrapper' require 'crimson-falcon/models/domain_item_details_v1' +require 'crimson-falcon/models/domain_kestrel_params' require 'crimson-falcon/models/domain_kill_chain' require 'crimson-falcon/models/domain_last_scheduled_execution' require 'crimson-falcon/models/domain_last_unscheduled_execution' @@ -576,6 +611,8 @@ require 'crimson-falcon/models/domain_list_files_response_wrapper' require 'crimson-falcon/models/domain_list_files_v2_response_wrapper' require 'crimson-falcon/models/domain_list_sessions_response_msa' +require 'crimson-falcon/models/domain_lookup_file' +require 'crimson-falcon/models/domain_lookup_file_wrapper' require 'crimson-falcon/models/domain_mssp_role_request_v1' require 'crimson-falcon/models/domain_mssp_role_response_v1' require 'crimson-falcon/models/domain_mssp_roles' @@ -639,6 +676,7 @@ require 'crimson-falcon/models/domain_report_params' require 'crimson-falcon/models/domain_request' require 'crimson-falcon/models/domain_result_metadata' +require 'crimson-falcon/models/domain_ring_assignment_settings_v1' require 'crimson-falcon/models/domain_role' require 'crimson-falcon/models/domain_role_ids' require 'crimson-falcon/models/domain_rule' @@ -807,6 +845,24 @@ require 'crimson-falcon/models/falconx_version_info' require 'crimson-falcon/models/fielddata_field_source' require 'crimson-falcon/models/fielddata_field_source_option' +require 'crimson-falcon/models/figapi_adversary' +require 'crimson-falcon/models/figapi_country' +require 'crimson-falcon/models/figapi_domain' +require 'crimson-falcon/models/figapi_email_address' +require 'crimson-falcon/models/figapi_file' +require 'crimson-falcon/models/figapi_ipv4' +require 'crimson-falcon/models/figapi_ipv6' +require 'crimson-falcon/models/figapi_indicator' +require 'crimson-falcon/models/figapi_mx_record' +require 'crimson-falcon/models/figapi_name_server' +require 'crimson-falcon/models/figapi_report' +require 'crimson-falcon/models/figapi_sector' +require 'crimson-falcon/models/figapi_threat' +require 'crimson-falcon/models/figapi_url' +require 'crimson-falcon/models/figapi_vulnerability' +require 'crimson-falcon/models/figapi_who_is' +require 'crimson-falcon/models/figapi_whois_record' +require 'crimson-falcon/models/figapi_x509_certificate' require 'crimson-falcon/models/firewall_create_firewall_policies_req_v1' require 'crimson-falcon/models/firewall_create_firewall_policy_req_v1' require 'crimson-falcon/models/firewall_policy_v1' @@ -896,6 +952,7 @@ require 'crimson-falcon/models/graph_sub_model' require 'crimson-falcon/models/graph_timer_event_definition' require 'crimson-falcon/models/graph_validation_error' +require 'crimson-falcon/models/help' require 'crimson-falcon/models/host_groups_create_group_req_v1' require 'crimson-falcon/models/host_groups_create_groups_req_v1' require 'crimson-falcon/models/host_groups_host_group_v1' @@ -913,7 +970,18 @@ require 'crimson-falcon/models/images_api_image_issues_summary' require 'crimson-falcon/models/images_api_image_vulnerabilities_summary' require 'crimson-falcon/models/images_ext_combined_images_response' +require 'crimson-falcon/models/ingestion_cve_exploit_reference' +require 'crimson-falcon/models/ingestion_cve_exploit_source' +require 'crimson-falcon/models/ingestion_ex_prt_rating_factors' +require 'crimson-falcon/models/ingestion_reference' require 'crimson-falcon/models/internal_sensor_status' +require 'crimson-falcon/models/inventoryapi_surface_error' +require 'crimson-falcon/models/inventoryapi_user_external_asset' +require 'crimson-falcon/models/inventoryapi_user_external_asset_create' +require 'crimson-falcon/models/inventoryapi_user_external_asset_create_request_v1' +require 'crimson-falcon/models/inventoryapi_user_external_asset_create_response_v1' +require 'crimson-falcon/models/inventoryapi_user_external_asset_result' +require 'crimson-falcon/models/inventoryapidomain_subsidiary' require 'crimson-falcon/models/ioa_cloud_account_id' require 'crimson-falcon/models/ioa_enrichments' require 'crimson-falcon/models/ioa_event_aggregate' @@ -1052,6 +1120,7 @@ require 'crimson-falcon/models/models_api_image_vulnerabilities_summary' require 'crimson-falcon/models/models_api_kubernetes_iom' require 'crimson-falcon/models/models_api_package_combined' +require 'crimson-falcon/models/models_api_package_combined_v2' require 'crimson-falcon/models/models_api_package_vulnerability' require 'crimson-falcon/models/models_api_packages_by_vuln_count' require 'crimson-falcon/models/models_api_policy_count_by_action' @@ -1132,6 +1201,7 @@ require 'crimson-falcon/models/models_issues_summary_container_info' require 'crimson-falcon/models/models_job_meta_data' require 'crimson-falcon/models/models_light_weight_config' +require 'crimson-falcon/models/models_message' require 'crimson-falcon/models/models_mock_execution_create_request_v1' require 'crimson-falcon/models/models_modify_aws_customer_settings_v1' require 'crimson-falcon/models/models_node' @@ -1141,6 +1211,7 @@ require 'crimson-falcon/models/models_package_info_type' require 'crimson-falcon/models/models_package_name_version_type' require 'crimson-falcon/models/models_package_vulnerability_type' +require 'crimson-falcon/models/models_partial_fingerprints' require 'crimson-falcon/models/models_patch_image_group_request' require 'crimson-falcon/models/models_patch_policy_request' require 'crimson-falcon/models/models_pod' @@ -1150,10 +1221,23 @@ require 'crimson-falcon/models/models_policy_group_entity_response' require 'crimson-falcon/models/models_registry_credentials_response' require 'crimson-falcon/models/models_request_api_policy_data' +require 'crimson-falcon/models/models_result' +require 'crimson-falcon/models/models_result_location' +require 'crimson-falcon/models/models_result_location_properties' +require 'crimson-falcon/models/models_result_physical_location' +require 'crimson-falcon/models/models_result_physical_location_artifact_location' +require 'crimson-falcon/models/models_result_physical_location_region' +require 'crimson-falcon/models/models_result_properties' +require 'crimson-falcon/models/models_rule' +require 'crimson-falcon/models/models_rule_default_configuration' +require 'crimson-falcon/models/models_rule_properties' require 'crimson-falcon/models/models_rule_status' require 'crimson-falcon/models/models_rule_with_non_compliant_assets' require 'crimson-falcon/models/models_rules_failed_by_severity' require 'crimson-falcon/models/models_rules_with_non_compliant_assets' +require 'crimson-falcon/models/models_run' +require 'crimson-falcon/models/models_run_tool' +require 'crimson-falcon/models/models_run_tool_driver' require 'crimson-falcon/models/models_scan_report_type' require 'crimson-falcon/models/models_scan_results' require 'crimson-falcon/models/models_snapshot_account_status' @@ -1163,6 +1247,7 @@ require 'crimson-falcon/models/models_verify_access_response_v1' require 'crimson-falcon/models/models_vulnerabilities_type' require 'crimson-falcon/models/models_vulnerability_product' +require 'crimson-falcon/models/models_vulnerability_sarif' require 'crimson-falcon/models/models_vulnerability_type' require 'crimson-falcon/models/msa_api_error' require 'crimson-falcon/models/msa_affected_entity' @@ -1196,6 +1281,7 @@ require 'crimson-falcon/models/oauth2_access_token_request' require 'crimson-falcon/models/packages_api_combined_package' require 'crimson-falcon/models/packages_api_combined_package_export' +require 'crimson-falcon/models/packages_api_combined_package_v2' require 'crimson-falcon/models/packages_api_packages_by_vuln_count' require 'crimson-falcon/models/parameter_activity_config_parameter_value' require 'crimson-falcon/models/parameter_activity_config_provision_parameter' @@ -1219,6 +1305,8 @@ require 'crimson-falcon/models/policies_update_request' require 'crimson-falcon/models/policy_sensor_update_schedule' require 'crimson-falcon/models/policy_sensor_update_scheduler' +require 'crimson-falcon/models/policyframework_benchmark' +require 'crimson-falcon/models/policyframework_control' require 'crimson-falcon/models/prevention_category_resp_v1' require 'crimson-falcon/models/prevention_create_policies_req_v1' require 'crimson-falcon/models/prevention_create_policy_req_v1' @@ -1326,6 +1414,15 @@ require 'crimson-falcon/models/registryassessment_external_cred_payload' require 'crimson-falcon/models/registryassessment_external_registry_patch_payload' require 'crimson-falcon/models/registryassessment_external_registry_payload' +require 'crimson-falcon/models/releasecontents_release_content' +require 'crimson-falcon/models/releasecontents_release_content_version' +require 'crimson-falcon/models/releasenotes_entities_get_request' +require 'crimson-falcon/models/releasenotes_entities_get_response_wrapper' +require 'crimson-falcon/models/releasenotes_note_detail' +require 'crimson-falcon/models/releasenotes_release_note_v1' +require 'crimson-falcon/models/releasenotes_release_note_wrapper_v1' +require 'crimson-falcon/models/releases_release' +require 'crimson-falcon/models/releases_release_wrapper' require 'crimson-falcon/models/remote_response_create_policies_v1' require 'crimson-falcon/models/remote_response_create_policy_req_v1' require 'crimson-falcon/models/remote_response_policy_v1' @@ -1334,12 +1431,32 @@ require 'crimson-falcon/models/remote_response_update_policy_req_v1' require 'crimson-falcon/models/resource' require 'crimson-falcon/models/resources' +require 'crimson-falcon/models/resources_app' +require 'crimson-falcon/models/resources_asset_graph' +require 'crimson-falcon/models/resources_cloud_context' +require 'crimson-falcon/models/resources_cloud_resource' +require 'crimson-falcon/models/resources_compliance' +require 'crimson-falcon/models/resources_detections' +require 'crimson-falcon/models/resources_host' +require 'crimson-falcon/models/resources_relationship' +require 'crimson-falcon/models/resources_vulnerability' require 'crimson-falcon/models/rest_aws_account_create_request_extv1' require 'crimson-falcon/models/rest_aws_account_create_response_ext_v1' require 'crimson-falcon/models/rest_aws_account_validated' require 'crimson-falcon/models/rest_aws_account_validation_response' require 'crimson-falcon/models/rest_account_product_upsert_request_ext_v1' +require 'crimson-falcon/models/rest_azure_download_script_request_data' +require 'crimson-falcon/models/rest_azure_download_script_request_v1' +require 'crimson-falcon/models/rest_azure_provision_get_account_script_response_v1' +require 'crimson-falcon/models/rest_azure_script' require 'crimson-falcon/models/rest_cloud_aws_account_create_ext_v1' +require 'crimson-falcon/models/rest_cursor_and_limit_meta_info' +require 'crimson-falcon/models/rest_cursor_meta_info' +require 'crimson-falcon/models/rest_cursor_response_fields' +require 'crimson-falcon/models/rest_paging' +require 'crimson-falcon/models/restapi_indicator_response' +require 'crimson-falcon/models/restapi_indicators_query_request' +require 'crimson-falcon/models/restapi_indicators_query_sort_request' require 'crimson-falcon/models/rulegroups_assigned_rule' require 'crimson-falcon/models/rulegroups_create_request' require 'crimson-falcon/models/rulegroups_delete_response' @@ -1399,6 +1516,7 @@ require 'crimson-falcon/models/source_user' require 'crimson-falcon/models/state_online_state_resp_v1' require 'crimson-falcon/models/state_online_state_result_v1' +require 'crimson-falcon/models/string_wrapper' require 'crimson-falcon/models/sv_exclusions_create_req_v1' require 'crimson-falcon/models/sv_exclusions_resp_v1' require 'crimson-falcon/models/sv_exclusions_sv_exclusion_v1' @@ -1446,6 +1564,8 @@ require 'crimson-falcon/models/types_framework' require 'crimson-falcon/models/types_gcp_metadata' require 'crimson-falcon/models/types_generic_user_facing_request' +require 'crimson-falcon/models/types_get_executor_nodes_metadata_response' +require 'crimson-falcon/models/types_get_integration_tasks_metadata_response' require 'crimson-falcon/models/types_get_services_related_entity' require 'crimson-falcon/models/types_get_services_related_entity_filters' require 'crimson-falcon/models/types_get_services_related_entity_group_by_fields' @@ -1551,6 +1671,7 @@ require 'crimson-falcon/models/vulnerabilities_api_vuln_count_by_csp_rating' require 'crimson-falcon/models/vulnerabilities_api_vuln_count_by_cvss_score' require 'crimson-falcon/models/vulnerabilities_api_vuln_count_by_severity' +require 'crimson-falcon/models/vulnerabilities_vulnerability_entity_sarif_response' require 'crimson-falcon/models/workflow_request' require 'crimson-falcon/models/workflow_response' @@ -1559,7 +1680,10 @@ require 'crimson-falcon/api/alerts' require 'crimson-falcon/api/api_integrations' require 'crimson-falcon/api/certificate_based_exclusions' +require 'crimson-falcon/api/cloud_aws_registration' +require 'crimson-falcon/api/cloud_azure_registration' require 'crimson-falcon/api/cloud_connect_aws' +require 'crimson-falcon/api/cloud_security_assets' require 'crimson-falcon/api/cloud_snapshots' require 'crimson-falcon/api/compliance_assessments' require 'crimson-falcon/api/configuration_assessment' @@ -1569,15 +1693,18 @@ require 'crimson-falcon/api/container_images' require 'crimson-falcon/api/container_packages' require 'crimson-falcon/api/container_vulnerabilities' +require 'crimson-falcon/api/content_update_policies' +require 'crimson-falcon/api/correlation_rules' require 'crimson-falcon/api/cspg_iac' require 'crimson-falcon/api/cspm_registration' require 'crimson-falcon/api/custom_ioa' require 'crimson-falcon/api/custom_storage' require 'crimson-falcon/api/d4c_registration' require 'crimson-falcon/api/datascanner' -require 'crimson-falcon/api/default' require 'crimson-falcon/api/delivery_settings' +require 'crimson-falcon/api/deployments' require 'crimson-falcon/api/detects' +require 'crimson-falcon/api/device_content' require 'crimson-falcon/api/device_control_policies' require 'crimson-falcon/api/discover' require 'crimson-falcon/api/discover_iot' @@ -1609,10 +1736,12 @@ require 'crimson-falcon/api/installation_tokens' require 'crimson-falcon/api/installation_tokens_settings' require 'crimson-falcon/api/intel' +require 'crimson-falcon/api/intelligence_indicator_graph' require 'crimson-falcon/api/ioa_exclusions' require 'crimson-falcon/api/ioc' require 'crimson-falcon/api/iocs' require 'crimson-falcon/api/kubernetes_protection' +require 'crimson-falcon/api/lookup_files' require 'crimson-falcon/api/malquery' require 'crimson-falcon/api/message_center' require 'crimson-falcon/api/ml_exclusions' @@ -1629,6 +1758,8 @@ require 'crimson-falcon/api/real_time_response_admin' require 'crimson-falcon/api/real_time_response_audit' require 'crimson-falcon/api/recon' +require 'crimson-falcon/api/release_notes' +require 'crimson-falcon/api/releases' require 'crimson-falcon/api/report_executions' require 'crimson-falcon/api/response_policies' require 'crimson-falcon/api/runtime_detections' @@ -1643,6 +1774,7 @@ require 'crimson-falcon/api/threatgraph' require 'crimson-falcon/api/unidentified_containers' require 'crimson-falcon/api/user_management' +require 'crimson-falcon/api/vulnerabilities' require 'crimson-falcon/api/workflows' require 'crimson-falcon/api/zero_trust_assessment' diff --git a/lib/crimson-falcon/api/alerts.rb b/lib/crimson-falcon/api/alerts.rb index 4f2dca72..dc272811 100644 --- a/lib/crimson-falcon/api/alerts.rb +++ b/lib/crimson-falcon/api/alerts.rb @@ -39,7 +39,7 @@ def initialize(api_client = ApiClient.default) # Deprecated: please use version v2 of this endpoint. Retrieves all Alerts ids that match a given query. # @param [Hash] opts the optional parameters # @option opts [Integer] :offset The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. # @option opts [String] :sort Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering # @option opts [String] :filter Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). # @option opts [String] :q Search all alert metadata for the provided string @@ -52,7 +52,7 @@ def get_queries_alerts_v1(opts = {}) # Deprecated: please use version v2 of this endpoint. Retrieves all Alerts ids that match a given query. # @param [Hash] opts the optional parameters # @option opts [Integer] :offset The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. # @option opts [String] :sort Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering # @option opts [String] :filter Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). # @option opts [String] :q Search all alert metadata for the provided string @@ -118,7 +118,7 @@ def get_queries_alerts_v1_with_http_info(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) # @option opts [Integer] :offset The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. # @option opts [String] :sort Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering # @option opts [String] :filter Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). # @option opts [String] :q Search all alert metadata for the provided string @@ -132,7 +132,7 @@ def get_queries_alerts_v2(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) # @option opts [Integer] :offset The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. # @option opts [String] :sort Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering # @option opts [String] :filter Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). # @option opts [String] :q Search all alert metadata for the provided string @@ -465,6 +465,72 @@ def post_aggregates_alerts_v2_with_http_info(body, opts = {}) return data, status_code, headers end + # Retrieves all Alerts that match a particular FQL filter. + # @param body [DetectsapiPostCombinedAlertsV1RequestSwagger] `after` - Token used to access the next page. The `after` token will be populated only when the service expects more results expected on the next page. Once you reach the last page (which usually has less than `limit` results), the `after` token will not be returned anymore. The best way to retrieve all the results is to paginate them till you get to the last page where the `after` token blank. This value is highly dependant on the `sort` parameter, so if you plan to change the sort order, you will have to re-start your search from the first page (without `after` parameter). `filter` - Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). `limit` - The maximum number of detections to return in this response (default: 100; max: 1000). Use this parameter together with the `after` parameter to manage pagination of the results. `sort` - Sort parameter takes the form of `<field|direction>`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields for sorting are: timestamp, created_timestamp, updated_timestamp, status, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, tactic_id, tactic, technique, technique_id, pattern_id or product. By default all the results are sorted by the `created_timestamp` field in the descending order. **Important:** The pagination is done on live data in the order defined by the `sort` field parameter (default: `created_timestamp|desc`), so if you want to avoid inconsistent results where the same record might appear on multiple pages (or none), sort only on the fields that do not change over time (e.g. created_timestamp, composite_id, ...). + # @param [Hash] opts the optional parameters + # @return [DetectsapiPostCombinedAlertsV1ResponseSwagger] + def post_combined_alerts_v1(body, opts = {}) + data, _status_code, _headers = post_combined_alerts_v1_with_http_info(body, opts) + data + end + + # Retrieves all Alerts that match a particular FQL filter. + # @param body [DetectsapiPostCombinedAlertsV1RequestSwagger] `after` - Token used to access the next page. The `after` token will be populated only when the service expects more results expected on the next page. Once you reach the last page (which usually has less than `limit` results), the `after` token will not be returned anymore. The best way to retrieve all the results is to paginate them till you get to the last page where the `after` token blank. This value is highly dependant on the `sort` parameter, so if you plan to change the sort order, you will have to re-start your search from the first page (without `after` parameter). `filter` - Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). `limit` - The maximum number of detections to return in this response (default: 100; max: 1000). Use this parameter together with the `after` parameter to manage pagination of the results. `sort` - Sort parameter takes the form of `<field|direction>`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields for sorting are: timestamp, created_timestamp, updated_timestamp, status, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, tactic_id, tactic, technique, technique_id, pattern_id or product. By default all the results are sorted by the `created_timestamp` field in the descending order. **Important:** The pagination is done on live data in the order defined by the `sort` field parameter (default: `created_timestamp|desc`), so if you want to avoid inconsistent results where the same record might appear on multiple pages (or none), sort only on the fields that do not change over time (e.g. created_timestamp, composite_id, ...). + # @param [Hash] opts the optional parameters + # @return [Array<(DetectsapiPostCombinedAlertsV1ResponseSwagger, Integer, Hash)>] DetectsapiPostCombinedAlertsV1ResponseSwagger data, response status code and response headers + def post_combined_alerts_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Alerts.post_combined_alerts_v1 ...' + 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 Alerts.post_combined_alerts_v1" + end + # resource path + local_var_path = '/alerts/combined/alerts/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 + + # 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] || 'DetectsapiPostCombinedAlertsV1ResponseSwagger' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"Alerts.post_combined_alerts_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Alerts#post_combined_alerts_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Deprecated: please use version v2 of this endpoint. Retrieves all Alerts given their ids. # @param body [DetectsapiPostEntitiesAlertsV1Request] # @param [Hash] opts the optional parameters diff --git a/lib/crimson-falcon/api/aspm.rb b/lib/crimson-falcon/api/aspm.rb index ff79b092..19c532ca 100644 --- a/lib/crimson-falcon/api/aspm.rb +++ b/lib/crimson-falcon/api/aspm.rb @@ -568,6 +568,14 @@ def execute_query_with_http_info(body, opts = {}) # @param node_type [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :integration_type + # @option opts [Integer] :offset + # @option opts [Integer] :limit + # @option opts [String] :order_by + # @option opts [String] :direction + # @option opts [Array] :executor_node_ids executor node ids + # @option opts [Array] :executor_node_names executor node names + # @option opts [Array] :executor_node_states executor node states + # @option opts [Array] :executor_node_types executor node types # @return [TypesListExecutorNodesResponse] def get_executor_nodes(node_type, opts = {}) data, _status_code, _headers = get_executor_nodes_with_http_info(node_type, opts) @@ -578,6 +586,14 @@ def get_executor_nodes(node_type, opts = {}) # @param node_type [String] # @param [Hash] opts the optional parameters # @option opts [Integer] :integration_type + # @option opts [Integer] :offset + # @option opts [Integer] :limit + # @option opts [String] :order_by + # @option opts [String] :direction + # @option opts [Array] :executor_node_ids executor node ids + # @option opts [Array] :executor_node_names executor node names + # @option opts [Array] :executor_node_states executor node states + # @option opts [Array] :executor_node_types executor node types # @return [Array<(TypesListExecutorNodesResponse, Integer, Hash)>] TypesListExecutorNodesResponse data, response status code and response headers def get_executor_nodes_with_http_info(node_type, opts = {}) if @api_client.config.debugging @@ -587,6 +603,14 @@ def get_executor_nodes_with_http_info(node_type, opts = {}) if @api_client.config.client_side_validation && node_type.nil? fail ArgumentError, "Missing the required parameter 'node_type' when calling ASPM.get_executor_nodes" end + allowable_values = ["name", "id", "state", "type"] + if @api_client.config.client_side_validation && opts[:'order_by'] && !allowable_values.include?(opts[:'order_by']) + fail ArgumentError, "invalid value for \"order_by\", must be one of #{allowable_values}" + end + allowable_values = ["asc", "desc"] + if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction']) + fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}" + end # resource path local_var_path = '/aspm-api-gateway/api/v1/executor_nodes' @@ -594,6 +618,14 @@ def get_executor_nodes_with_http_info(node_type, opts = {}) query_params = opts[:query_params] || {} query_params[:'node_type'] = node_type query_params[:'integration_type'] = opts[:'integration_type'] if !opts[:'integration_type'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? + query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? + query_params[:'executor_node_ids'] = @api_client.build_collection_param(opts[:'executor_node_ids'], :csv) if !opts[:'executor_node_ids'].nil? + query_params[:'executor_node_names'] = @api_client.build_collection_param(opts[:'executor_node_names'], :csv) if !opts[:'executor_node_names'].nil? + query_params[:'executor_node_states'] = @api_client.build_collection_param(opts[:'executor_node_states'], :csv) if !opts[:'executor_node_states'].nil? + query_params[:'executor_node_types'] = @api_client.build_collection_param(opts[:'executor_node_types'], :csv) if !opts[:'executor_node_types'].nil? # header parameters header_params = opts[:header_params] || {} @@ -629,10 +661,84 @@ def get_executor_nodes_with_http_info(node_type, opts = {}) return data, status_code, headers end + # Get metadata about all executor nodes + # @param [Hash] opts the optional parameters + # @option opts [Array] :executor_node_ids executor node ids + # @option opts [Array] :executor_node_names executor node names + # @option opts [Array] :executor_node_states executor node states + # @option opts [Array] :executor_node_types executor node types + # @return [TypesGetExecutorNodesMetadataResponse] + def get_executor_nodes_metadata(opts = {}) + data, _status_code, _headers = get_executor_nodes_metadata_with_http_info(opts) + data + end + + # Get metadata about all executor nodes + # @param [Hash] opts the optional parameters + # @option opts [Array] :executor_node_ids executor node ids + # @option opts [Array] :executor_node_names executor node names + # @option opts [Array] :executor_node_states executor node states + # @option opts [Array] :executor_node_types executor node types + # @return [Array<(TypesGetExecutorNodesMetadataResponse, Integer, Hash)>] TypesGetExecutorNodesMetadataResponse data, response status code and response headers + def get_executor_nodes_metadata_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ASPM.get_executor_nodes_metadata ...' + end + # resource path + local_var_path = '/aspm-api-gateway/api/v1/executor_nodes/metadata' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'executor_node_ids'] = @api_client.build_collection_param(opts[:'executor_node_ids'], :csv) if !opts[:'executor_node_ids'].nil? + query_params[:'executor_node_names'] = @api_client.build_collection_param(opts[:'executor_node_names'], :csv) if !opts[:'executor_node_names'].nil? + query_params[:'executor_node_states'] = @api_client.build_collection_param(opts[:'executor_node_states'], :csv) if !opts[:'executor_node_states'].nil? + query_params[:'executor_node_types'] = @api_client.build_collection_param(opts[:'executor_node_types'], :csv) if !opts[:'executor_node_types'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TypesGetExecutorNodesMetadataResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ASPM.get_executor_nodes_metadata", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ASPM#get_executor_nodes_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get all the integration tasks # @param [Hash] opts the optional parameters # @option opts [Integer] :integration_task_type # @option opts [String] :category + # @option opts [Integer] :offset + # @option opts [Integer] :limit + # @option opts [String] :order_by + # @option opts [String] :direction + # @option opts [Integer] :integration_task_types + # @option opts [Integer] :ids + # @option opts [String] :names # @return [TypesListIntegrationTasksResponse] def get_integration_tasks(opts = {}) data, _status_code, _headers = get_integration_tasks_with_http_info(opts) @@ -643,11 +749,26 @@ def get_integration_tasks(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :integration_task_type # @option opts [String] :category + # @option opts [Integer] :offset + # @option opts [Integer] :limit + # @option opts [String] :order_by + # @option opts [String] :direction + # @option opts [Integer] :integration_task_types + # @option opts [Integer] :ids + # @option opts [String] :names # @return [Array<(TypesListIntegrationTasksResponse, Integer, Hash)>] TypesListIntegrationTasksResponse data, response status code and response headers def get_integration_tasks_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ASPM.get_integration_tasks ...' end + allowable_values = ["name", "id", "integrationTask"] + if @api_client.config.client_side_validation && opts[:'order_by'] && !allowable_values.include?(opts[:'order_by']) + fail ArgumentError, "invalid value for \"order_by\", must be one of #{allowable_values}" + end + allowable_values = ["asc", "desc"] + if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction']) + fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}" + end # resource path local_var_path = '/aspm-api-gateway/api/v1/integration_tasks' @@ -655,6 +776,13 @@ def get_integration_tasks_with_http_info(opts = {}) query_params = opts[:query_params] || {} query_params[:'integration_task_type'] = opts[:'integration_task_type'] if !opts[:'integration_task_type'].nil? query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil? + query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil? + query_params[:'integration_task_types'] = opts[:'integration_task_types'] if !opts[:'integration_task_types'].nil? + query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil? + query_params[:'names'] = opts[:'names'] if !opts[:'names'].nil? # header parameters header_params = opts[:header_params] || {} @@ -690,6 +818,77 @@ def get_integration_tasks_with_http_info(opts = {}) return data, status_code, headers end + # Get metadata about all integration tasks + # @param [Hash] opts the optional parameters + # @option opts [String] :category + # @option opts [Integer] :integration_task_types + # @option opts [Integer] :ids + # @option opts [String] :names + # @return [TypesGetIntegrationTasksMetadataResponse] + def get_integration_tasks_metadata(opts = {}) + data, _status_code, _headers = get_integration_tasks_metadata_with_http_info(opts) + data + end + + # Get metadata about all integration tasks + # @param [Hash] opts the optional parameters + # @option opts [String] :category + # @option opts [Integer] :integration_task_types + # @option opts [Integer] :ids + # @option opts [String] :names + # @return [Array<(TypesGetIntegrationTasksMetadataResponse, Integer, Hash)>] TypesGetIntegrationTasksMetadataResponse data, response status code and response headers + def get_integration_tasks_metadata_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ASPM.get_integration_tasks_metadata ...' + end + allowable_values = ["collecting", "exporting"] + if @api_client.config.client_side_validation && opts[:'category'] && !allowable_values.include?(opts[:'category']) + fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/aspm-api-gateway/api/v1/integration_tasks/metadata' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'category'] = opts[:'category'] if !opts[:'category'].nil? + query_params[:'integration_task_types'] = opts[:'integration_task_types'] if !opts[:'integration_task_types'].nil? + query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil? + query_params[:'names'] = opts[:'names'] if !opts[:'names'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TypesGetIntegrationTasksMetadataResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ASPM.get_integration_tasks_metadata", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ASPM#get_integration_tasks_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get all the integration types # @param [Hash] opts the optional parameters # @return [TypesListIntegrationTypesResponse] diff --git a/lib/crimson-falcon/api/default.rb b/lib/crimson-falcon/api/cloud_aws_registration.rb similarity index 85% rename from lib/crimson-falcon/api/default.rb rename to lib/crimson-falcon/api/cloud_aws_registration.rb index 08cadcc0..e87665d0 100644 --- a/lib/crimson-falcon/api/default.rb +++ b/lib/crimson-falcon/api/cloud_aws_registration.rb @@ -30,7 +30,7 @@ require 'cgi' module Falcon - class Default + class CloudAwsRegistration attr_accessor :api_client def initialize(api_client = ApiClient.default) @@ -51,11 +51,11 @@ def cloud_registration_aws_create_account(body, opts = {}) # @return [Array<(RestAWSAccountCreateResponseExtV1, Integer, Hash)>] RestAWSAccountCreateResponseExtV1 data, response status code and response headers def cloud_registration_aws_create_account_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Default.cloud_registration_aws_create_account ...' + @api_client.config.logger.debug 'Calling API: CloudAwsRegistration.cloud_registration_aws_create_account ...' 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 Default.cloud_registration_aws_create_account" + fail ArgumentError, "Missing the required parameter 'body' when calling CloudAwsRegistration.cloud_registration_aws_create_account" end # resource path local_var_path = '/cloud-security-registration-aws/entities/account/v1' @@ -86,7 +86,7 @@ def cloud_registration_aws_create_account_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Default.cloud_registration_aws_create_account", + :operation => :"CloudAwsRegistration.cloud_registration_aws_create_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -97,7 +97,7 @@ def cloud_registration_aws_create_account_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Default#cloud_registration_aws_create_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudAwsRegistration#cloud_registration_aws_create_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -119,7 +119,7 @@ def cloud_registration_aws_delete_account(opts = {}) # @return [Array<(MsaspecResponseFields, Integer, Hash)>] MsaspecResponseFields data, response status code and response headers def cloud_registration_aws_delete_account_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Default.cloud_registration_aws_delete_account ...' + @api_client.config.logger.debug 'Calling API: CloudAwsRegistration.cloud_registration_aws_delete_account ...' end # resource path local_var_path = '/cloud-security-registration-aws/entities/account/v1' @@ -147,7 +147,7 @@ def cloud_registration_aws_delete_account_with_http_info(opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Default.cloud_registration_aws_delete_account", + :operation => :"CloudAwsRegistration.cloud_registration_aws_delete_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -158,7 +158,7 @@ def cloud_registration_aws_delete_account_with_http_info(opts = {}) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Default#cloud_registration_aws_delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudAwsRegistration#cloud_registration_aws_delete_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -178,7 +178,7 @@ def cloud_registration_aws_get_accounts(opts = {}) # @return [Array<(RestAWSAccountCreateResponseExtV1, Integer, Hash)>] RestAWSAccountCreateResponseExtV1 data, response status code and response headers def cloud_registration_aws_get_accounts_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Default.cloud_registration_aws_get_accounts ...' + @api_client.config.logger.debug 'Calling API: CloudAwsRegistration.cloud_registration_aws_get_accounts ...' end # resource path local_var_path = '/cloud-security-registration-aws/entities/account/v1' @@ -205,7 +205,7 @@ def cloud_registration_aws_get_accounts_with_http_info(opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Default.cloud_registration_aws_get_accounts", + :operation => :"CloudAwsRegistration.cloud_registration_aws_get_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -216,7 +216,7 @@ def cloud_registration_aws_get_accounts_with_http_info(opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Default#cloud_registration_aws_get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudAwsRegistration#cloud_registration_aws_get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -248,26 +248,26 @@ def cloud_registration_aws_query_accounts(products, features, opts = {}) # @return [Array<(RestAWSAccountCreateResponseExtV1, Integer, Hash)>] RestAWSAccountCreateResponseExtV1 data, response status code and response headers def cloud_registration_aws_query_accounts_with_http_info(products, features, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Default.cloud_registration_aws_query_accounts ...' + @api_client.config.logger.debug 'Calling API: CloudAwsRegistration.cloud_registration_aws_query_accounts ...' end # verify the required parameter 'products' is set if @api_client.config.client_side_validation && products.nil? - fail ArgumentError, "Missing the required parameter 'products' when calling Default.cloud_registration_aws_query_accounts" + fail ArgumentError, "Missing the required parameter 'products' when calling CloudAwsRegistration.cloud_registration_aws_query_accounts" end # verify the required parameter 'features' is set if @api_client.config.client_side_validation && features.nil? - fail ArgumentError, "Missing the required parameter 'features' when calling Default.cloud_registration_aws_query_accounts" + fail ArgumentError, "Missing the required parameter 'features' when calling CloudAwsRegistration.cloud_registration_aws_query_accounts" end allowable_values = ["provisioned", "operational"] if @api_client.config.client_side_validation && opts[:'account_status'] && !allowable_values.include?(opts[:'account_status']) fail ArgumentError, "invalid value for \"account_status\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Default.cloud_registration_aws_query_accounts, must be smaller than or equal to 500.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CloudAwsRegistration.cloud_registration_aws_query_accounts, must be smaller than or equal to 500.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Default.cloud_registration_aws_query_accounts, must be greater than or equal to 0.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CloudAwsRegistration.cloud_registration_aws_query_accounts, must be greater than or equal to 0.' end allowable_values = ["organization"] @@ -305,7 +305,7 @@ def cloud_registration_aws_query_accounts_with_http_info(products, features, opt auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Default.cloud_registration_aws_query_accounts", + :operation => :"CloudAwsRegistration.cloud_registration_aws_query_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -316,7 +316,7 @@ def cloud_registration_aws_query_accounts_with_http_info(products, features, opt data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Default#cloud_registration_aws_query_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudAwsRegistration#cloud_registration_aws_query_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -336,11 +336,11 @@ def cloud_registration_aws_update_account(body, opts = {}) # @return [Array<(RestAWSAccountCreateResponseExtV1, Integer, Hash)>] RestAWSAccountCreateResponseExtV1 data, response status code and response headers def cloud_registration_aws_update_account_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Default.cloud_registration_aws_update_account ...' + @api_client.config.logger.debug 'Calling API: CloudAwsRegistration.cloud_registration_aws_update_account ...' 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 Default.cloud_registration_aws_update_account" + fail ArgumentError, "Missing the required parameter 'body' when calling CloudAwsRegistration.cloud_registration_aws_update_account" end # resource path local_var_path = '/cloud-security-registration-aws/entities/account/v1' @@ -371,7 +371,7 @@ def cloud_registration_aws_update_account_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Default.cloud_registration_aws_update_account", + :operation => :"CloudAwsRegistration.cloud_registration_aws_update_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -382,7 +382,7 @@ def cloud_registration_aws_update_account_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Default#cloud_registration_aws_update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudAwsRegistration#cloud_registration_aws_update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -408,24 +408,24 @@ def cloud_registration_aws_validate_accounts(products, feature, opts = {}) # @return [Array<(RestAWSAccountValidationResponse, Integer, Hash)>] RestAWSAccountValidationResponse data, response status code and response headers def cloud_registration_aws_validate_accounts_with_http_info(products, feature, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Default.cloud_registration_aws_validate_accounts ...' + @api_client.config.logger.debug 'Calling API: CloudAwsRegistration.cloud_registration_aws_validate_accounts ...' end # verify the required parameter 'products' is set if @api_client.config.client_side_validation && products.nil? - fail ArgumentError, "Missing the required parameter 'products' when calling Default.cloud_registration_aws_validate_accounts" + fail ArgumentError, "Missing the required parameter 'products' when calling CloudAwsRegistration.cloud_registration_aws_validate_accounts" end # verify the required parameter 'feature' is set if @api_client.config.client_side_validation && feature.nil? - fail ArgumentError, "Missing the required parameter 'feature' when calling Default.cloud_registration_aws_validate_accounts" + fail ArgumentError, "Missing the required parameter 'feature' when calling CloudAwsRegistration.cloud_registration_aws_validate_accounts" end pattern = Regexp.new(/^\d{12}$/) if @api_client.config.client_side_validation && !opts[:'account_id'].nil? && opts[:'account_id'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"account_id\"]' when calling Default.cloud_registration_aws_validate_accounts, must conform to the pattern #{pattern}." + fail ArgumentError, "invalid value for 'opts[:\"account_id\"]' when calling CloudAwsRegistration.cloud_registration_aws_validate_accounts, must conform to the pattern #{pattern}." end pattern = Regexp.new(/^arn:aws:iam::\d{12}:role\/.+/) if @api_client.config.client_side_validation && !opts[:'iam_role_arn'].nil? && opts[:'iam_role_arn'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"iam_role_arn\"]' when calling Default.cloud_registration_aws_validate_accounts, must conform to the pattern #{pattern}." + fail ArgumentError, "invalid value for 'opts[:\"iam_role_arn\"]' when calling CloudAwsRegistration.cloud_registration_aws_validate_accounts, must conform to the pattern #{pattern}." end # resource path @@ -456,7 +456,7 @@ def cloud_registration_aws_validate_accounts_with_http_info(products, feature, o auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Default.cloud_registration_aws_validate_accounts", + :operation => :"CloudAwsRegistration.cloud_registration_aws_validate_accounts", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -467,7 +467,7 @@ def cloud_registration_aws_validate_accounts_with_http_info(products, feature, o data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Default#cloud_registration_aws_validate_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudAwsRegistration#cloud_registration_aws_validate_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/cloud_azure_registration.rb b/lib/crimson-falcon/api/cloud_azure_registration.rb new file mode 100644 index 00000000..db286abb --- /dev/null +++ b/lib/crimson-falcon/api/cloud_azure_registration.rb @@ -0,0 +1,105 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class CloudAzureRegistration + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve script to create resources + # @param body [RestAzureDownloadScriptRequestV1] + # @param [Hash] opts the optional parameters + # @return [RestAzureProvisionGetAccountScriptResponseV1] + def cloud_registration_azure_download_script(body, opts = {}) + data, _status_code, _headers = cloud_registration_azure_download_script_with_http_info(body, opts) + data + end + + # Retrieve script to create resources + # @param body [RestAzureDownloadScriptRequestV1] + # @param [Hash] opts the optional parameters + # @return [Array<(RestAzureProvisionGetAccountScriptResponseV1, Integer, Hash)>] RestAzureProvisionGetAccountScriptResponseV1 data, response status code and response headers + def cloud_registration_azure_download_script_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_download_script ...' + 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 CloudAzureRegistration.cloud_registration_azure_download_script" + end + # resource path + local_var_path = '/cloud-security-registration-azure/entities/scripts/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 + + # 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] || 'RestAzureProvisionGetAccountScriptResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CloudAzureRegistration.cloud_registration_azure_download_script", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudAzureRegistration#cloud_registration_azure_download_script\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/cloud_security_assets.rb b/lib/crimson-falcon/api/cloud_security_assets.rb new file mode 100644 index 00000000..72a0979f --- /dev/null +++ b/lib/crimson-falcon/api/cloud_security_assets.rb @@ -0,0 +1,179 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class CloudSecurityAssets + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids List of assets to return (maximum 100 IDs allowed). Use POST method with same path if more entities are required. + # @return [AssetsGetResourcesResponse] + def cloud_security_assets_entities_get(opts = {}) + data, _status_code, _headers = cloud_security_assets_entities_get_with_http_info(opts) + data + end + + # Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids List of assets to return (maximum 100 IDs allowed). Use POST method with same path if more entities are required. + # @return [Array<(AssetsGetResourcesResponse, Integer, Hash)>] AssetsGetResourcesResponse data, response status code and response headers + def cloud_security_assets_entities_get_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSecurityAssets.cloud_security_assets_entities_get ...' + end + # resource path + local_var_path = '/cloud-security-assets/entities/resources/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AssetsGetResourcesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CloudSecurityAssets.cloud_security_assets_entities_get", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSecurityAssets#cloud_security_assets_entities_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Gets a list of resource IDs for the given parameters, filters and sort criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :after token-based pagination. use for paginating through an entire result set. Use only one of 'offset' and 'after' parameters for paginating + # @option opts [String] :filter FQL string to filter on asset contents. Filterable fields include: - `account_id` - `account_name` - `active` - `business_impact` - `cloud_group` - `cloud_label` - `cloud_label_id` - `cloud_provider` - `cluster_id` - `cluster_name` - `compliant.benchmark_name` - `compliant.benchmark_version` - `compliant.framework` - `compliant.policy_id` - `compliant.requirement` - `compliant.rule` - `compliant.section` - `configuration.id` - `creation_time` - `cve_ids` - `data_classifications.found` - `data_classifications.label` - `data_classifications.label_id` - `data_classifications.scanned` - `data_classifications.tag` - `data_classifications.tag_id` - `environment` - `exprt_ratings` - `first_seen` - `highest_severity` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `legacy_resource_id` - `legacy_uuid` - `managed_by` - `non_compliant.benchmark_name` - `non_compliant.benchmark_version` - `non_compliant.framework` - `non_compliant.policy_id` - `non_compliant.requirement` - `non_compliant.rule` - `non_compliant.section` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `sensor_priority` - `service` - `severity` - `snapshot_detections` - `ssm_managed` - `status` - `tag_key` - `tag_value` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` + # @option opts [String] :sort The field to sort on. Sortable fields include: - `account_id` - `account_name` - `active` - `cloud_provider` - `cluster_id` - `cluster_name` - `creation_time` - `data_classifications.found` - `data_classifications.scanned` - `first_seen` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `managed_by` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `service` - `ssm_managed` - `status` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` Use `|asc` or `|desc` suffix to specify sort direction. + # @option opts [Integer] :limit The maximum number of items to return. When not specified or 0, 500 is used. When larger than 1000, 1000 is used. (default to 500) + # @option opts [Integer] :offset Offset returned assets. Use only one of 'offset' and 'after' parameter for paginating. 'offset' can only be used on offsets < 10,000. For paginating through the entire result set, use 'after' parameter + # @return [AssetsGetResourceIDsResponse] + def cloud_security_assets_queries(opts = {}) + data, _status_code, _headers = cloud_security_assets_queries_with_http_info(opts) + data + end + + # Gets a list of resource IDs for the given parameters, filters and sort criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :after token-based pagination. use for paginating through an entire result set. Use only one of 'offset' and 'after' parameters for paginating + # @option opts [String] :filter FQL string to filter on asset contents. Filterable fields include: - `account_id` - `account_name` - `active` - `business_impact` - `cloud_group` - `cloud_label` - `cloud_label_id` - `cloud_provider` - `cluster_id` - `cluster_name` - `compliant.benchmark_name` - `compliant.benchmark_version` - `compliant.framework` - `compliant.policy_id` - `compliant.requirement` - `compliant.rule` - `compliant.section` - `configuration.id` - `creation_time` - `cve_ids` - `data_classifications.found` - `data_classifications.label` - `data_classifications.label_id` - `data_classifications.scanned` - `data_classifications.tag` - `data_classifications.tag_id` - `environment` - `exprt_ratings` - `first_seen` - `highest_severity` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `legacy_resource_id` - `legacy_uuid` - `managed_by` - `non_compliant.benchmark_name` - `non_compliant.benchmark_version` - `non_compliant.framework` - `non_compliant.policy_id` - `non_compliant.requirement` - `non_compliant.rule` - `non_compliant.section` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `sensor_priority` - `service` - `severity` - `snapshot_detections` - `ssm_managed` - `status` - `tag_key` - `tag_value` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` + # @option opts [String] :sort The field to sort on. Sortable fields include: - `account_id` - `account_name` - `active` - `cloud_provider` - `cluster_id` - `cluster_name` - `creation_time` - `data_classifications.found` - `data_classifications.scanned` - `first_seen` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `managed_by` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `service` - `ssm_managed` - `status` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` Use `|asc` or `|desc` suffix to specify sort direction. + # @option opts [Integer] :limit The maximum number of items to return. When not specified or 0, 500 is used. When larger than 1000, 1000 is used. (default to 500) + # @option opts [Integer] :offset Offset returned assets. Use only one of 'offset' and 'after' parameter for paginating. 'offset' can only be used on offsets < 10,000. For paginating through the entire result set, use 'after' parameter + # @return [Array<(AssetsGetResourceIDsResponse, Integer, Hash)>] AssetsGetResourceIDsResponse data, response status code and response headers + def cloud_security_assets_queries_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSecurityAssets.cloud_security_assets_queries ...' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CloudSecurityAssets.cloud_security_assets_queries, must be smaller than or equal to 1000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CloudSecurityAssets.cloud_security_assets_queries, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CloudSecurityAssets.cloud_security_assets_queries, must be greater than or equal to 0.' + end + + # resource path + local_var_path = '/cloud-security-assets/queries/resources/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'AssetsGetResourceIDsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CloudSecurityAssets.cloud_security_assets_queries", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSecurityAssets#cloud_security_assets_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/container_alerts.rb b/lib/crimson-falcon/api/container_alerts.rb index 82aaefe5..402da966 100644 --- a/lib/crimson-falcon/api/container_alerts.rb +++ b/lib/crimson-falcon/api/container_alerts.rb @@ -38,7 +38,7 @@ def initialize(api_client = ApiClient.default) end # Search Container Alerts by the provided search criteria # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` # @return [AlertsContainerAlertsCountValue] def read_container_alerts_count(opts = {}) data, _status_code, _headers = read_container_alerts_count_with_http_info(opts) @@ -47,7 +47,7 @@ def read_container_alerts_count(opts = {}) # Search Container Alerts by the provided search criteria # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` # @return [Array<(AlertsContainerAlertsCountValue, Integer, Hash)>] AlertsContainerAlertsCountValue data, response status code and response headers def read_container_alerts_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -96,7 +96,7 @@ def read_container_alerts_count_with_http_info(opts = {}) # Get Container Alerts counts by severity # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` # @return [AlertsContainerAlertsCountValue] def read_container_alerts_count_by_severity(opts = {}) data, _status_code, _headers = read_container_alerts_count_by_severity_with_http_info(opts) @@ -105,7 +105,7 @@ def read_container_alerts_count_by_severity(opts = {}) # Get Container Alerts counts by severity # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` # @return [Array<(AlertsContainerAlertsCountValue, Integer, Hash)>] AlertsContainerAlertsCountValue data, response status code and response headers def read_container_alerts_count_by_severity_with_http_info(opts = {}) if @api_client.config.debugging @@ -152,10 +152,10 @@ def read_container_alerts_count_by_severity_with_http_info(opts = {}) return data, status_code, headers end - # Search Container Alerts by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen,name,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` - `name` - `severity` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @option opts [String] :sort The fields to sort the records on. # @return [AlertsContainerAlertsEntityResponse] @@ -164,10 +164,10 @@ def search_and_read_container_alerts(opts = {}) data end - # Search Container Alerts by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen,name,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` - `name` - `severity` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @option opts [String] :sort The fields to sort the records on. # @return [Array<(AlertsContainerAlertsEntityResponse, Integer, Hash)>] AlertsContainerAlertsEntityResponse data, response status code and response headers diff --git a/lib/crimson-falcon/api/container_detections.rb b/lib/crimson-falcon/api/container_detections.rb index e410c58f..6363ae94 100644 --- a/lib/crimson-falcon/api/container_detections.rb +++ b/lib/crimson-falcon/api/container_detections.rb @@ -36,24 +36,24 @@ class ContainerDetections def initialize(api_client = ApiClient.default) @api_client = api_client end - # Retrieve image assessment detections identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `containers_impacted` - `detection_name` - `detection_severity` - `detection_type` - `images_impacted` - `last_detected` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [containers_impacted detection_name detection_severity detection_type images_impacted last_detected] # @return [DetectionsApiCombinedDetections] def read_combined_detections(opts = {}) data, _status_code, _headers = read_combined_detections_with_http_info(opts) data end - # Retrieve image assessment detections identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `containers_impacted` - `detection_name` - `detection_severity` - `detection_type` - `images_impacted` - `last_detected` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [containers_impacted detection_name detection_severity detection_type images_impacted last_detected] # @return [Array<(DetectionsApiCombinedDetections, Integer, Hash)>] DetectionsApiCombinedDetections data, response status code and response headers def read_combined_detections_with_http_info(opts = {}) if @api_client.config.debugging @@ -65,9 +65,9 @@ def read_combined_detections_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -103,10 +103,10 @@ def read_combined_detections_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,detection_type,image_registry,image_repository,image_tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [DetectionsApiAssessmentDetections] def read_detections(opts = {}) @@ -114,10 +114,10 @@ def read_detections(opts = {}) data end - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,detection_type,image_registry,image_repository,image_tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(DetectionsApiAssessmentDetections, Integer, Hash)>] DetectionsApiAssessmentDetections data, response status code and response headers def read_detections_with_http_info(opts = {}) @@ -169,7 +169,7 @@ def read_detections_with_http_info(opts = {}) # Aggregate count of detections # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [DetectionsApiDetectionsCount] def read_detections_count(opts = {}) data, _status_code, _headers = read_detections_count_with_http_info(opts) @@ -178,7 +178,7 @@ def read_detections_count(opts = {}) # Aggregate count of detections # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [Array<(DetectionsApiDetectionsCount, Integer, Hash)>] DetectionsApiDetectionsCount data, response status code and response headers def read_detections_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -227,7 +227,7 @@ def read_detections_count_with_http_info(opts = {}) # Aggregate counts of detections by severity # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [DetectionsApiDetectionsBySeverity] def read_detections_count_by_severity(opts = {}) data, _status_code, _headers = read_detections_count_by_severity_with_http_info(opts) @@ -236,7 +236,7 @@ def read_detections_count_by_severity(opts = {}) # Aggregate counts of detections by severity # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [Array<(DetectionsApiDetectionsBySeverity, Integer, Hash)>] DetectionsApiDetectionsBySeverity data, response status code and response headers def read_detections_count_by_severity_with_http_info(opts = {}) if @api_client.config.debugging @@ -285,7 +285,7 @@ def read_detections_count_by_severity_with_http_info(opts = {}) # Aggregate counts of detections by detection type # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [DetectionsApiDetectionsByType] def read_detections_count_by_type(opts = {}) data, _status_code, _headers = read_detections_count_by_type_with_http_info(opts) @@ -294,7 +294,7 @@ def read_detections_count_by_type(opts = {}) # Aggregate counts of detections by detection type # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [Array<(DetectionsApiDetectionsByType, Integer, Hash)>] DetectionsApiDetectionsByType data, response status code and response headers def read_detections_count_by_type_with_http_info(opts = {}) if @api_client.config.debugging @@ -341,10 +341,10 @@ def read_detections_count_by_type_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [CommonGenericEntityResponseString] def search_detections(opts = {}) @@ -352,10 +352,10 @@ def search_detections(opts = {}) data end - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(CommonGenericEntityResponseString, Integer, Hash)>] CommonGenericEntityResponseString data, response status code and response headers def search_detections_with_http_info(opts = {}) diff --git a/lib/crimson-falcon/api/container_images.rb b/lib/crimson-falcon/api/container_images.rb index 1f92a3c9..207bd1be 100644 --- a/lib/crimson-falcon/api/container_images.rb +++ b/lib/crimson-falcon/api/container_images.rb @@ -38,7 +38,7 @@ def initialize(api_client = ApiClient.default) end # Image assessment history # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filters: cid,registry,repository + # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `registry` - `repository` # @return [ImagesApiImageAssessmentHistory] def aggregate_image_assessment_history(opts = {}) data, _status_code, _headers = aggregate_image_assessment_history_with_http_info(opts) @@ -47,7 +47,7 @@ def aggregate_image_assessment_history(opts = {}) # Image assessment history # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filters: cid,registry,repository + # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `registry` - `repository` # @return [Array<(ImagesApiImageAssessmentHistory, Integer, Hash)>] ImagesApiImageAssessmentHistory data, response status code and response headers def aggregate_image_assessment_history_with_http_info(opts = {}) if @api_client.config.debugging @@ -96,7 +96,7 @@ def aggregate_image_assessment_history_with_http_info(opts = {}) # Aggregate count of images # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` # @return [ImagesApiImageCount] def aggregate_image_count(opts = {}) data, _status_code, _headers = aggregate_image_count_with_http_info(opts) @@ -105,7 +105,7 @@ def aggregate_image_count(opts = {}) # Aggregate count of images # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` # @return [Array<(ImagesApiImageCount, Integer, Hash)>] ImagesApiImageCount data, response status code and response headers def aggregate_image_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -154,7 +154,7 @@ def aggregate_image_count_with_http_info(opts = {}) # Aggregate count of images grouped by Base OS distribution # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @return [ImagesApiImageCountByBaseOS] def aggregate_image_count_by_base_os(opts = {}) data, _status_code, _headers = aggregate_image_count_by_base_os_with_http_info(opts) @@ -163,7 +163,7 @@ def aggregate_image_count_by_base_os(opts = {}) # Aggregate count of images grouped by Base OS distribution # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @return [Array<(ImagesApiImageCountByBaseOS, Integer, Hash)>] ImagesApiImageCountByBaseOS data, response status code and response headers def aggregate_image_count_by_base_os_with_http_info(opts = {}) if @api_client.config.debugging @@ -212,7 +212,7 @@ def aggregate_image_count_by_base_os_with_http_info(opts = {}) # Aggregate count of images grouped by state # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen,registry,repository + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @return [ImagesApiImageCountByState] def aggregate_image_count_by_state(opts = {}) data, _status_code, _headers = aggregate_image_count_by_state_with_http_info(opts) @@ -221,7 +221,7 @@ def aggregate_image_count_by_state(opts = {}) # Aggregate count of images grouped by state # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen,registry,repository + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @return [Array<(ImagesApiImageCountByState, Integer, Hash)>] ImagesApiImageCountByState data, response status code and response headers def aggregate_image_count_by_state_with_http_info(opts = {}) if @api_client.config.debugging @@ -268,18 +268,18 @@ def aggregate_image_count_by_state_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve base images for provided filter + # Retrieves a list of base images for the provided filter. Maximum page size: 100 # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search base images using a query in Falcon Query Language (FQL). Supported filters: image_digest,image_id,registry,repository,tag + # @option opts [String] :filter Search base images using a query in Falcon Query Language (FQL). Supported filter fields: - `image_digest` - `image_id` - `registry` - `repository` - `tag` # @return [CoreEntitiesResponse] def combined_base_images(opts = {}) data, _status_code, _headers = combined_base_images_with_http_info(opts) data end - # Retrieve base images for provided filter + # Retrieves a list of base images for the provided filter. Maximum page size: 100 # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search base images using a query in Falcon Query Language (FQL). Supported filters: image_digest,image_id,registry,repository,tag + # @option opts [String] :filter Search base images using a query in Falcon Query Language (FQL). Supported filter fields: - `image_digest` - `image_id` - `registry` - `repository` - `tag` # @return [Array<(CoreEntitiesResponse, Integer, Hash)>] CoreEntitiesResponse data, response status code and response headers def combined_base_images_with_http_info(opts = {}) if @api_client.config.debugging @@ -328,9 +328,9 @@ def combined_base_images_with_http_info(opts = {}) # Retrieve top x images with the most vulnerabilities # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset This is not used in the backend but is added here for compatibility purposes as some clients expects this i.e UI widgets. + # @option opts [Integer] :offset The fields to sort the records on. **Not supported.** # @return [ImagesApiImageByVulnerabilityCount] def combined_image_by_vulnerability_count(opts = {}) data, _status_code, _headers = combined_image_by_vulnerability_count_with_http_info(opts) @@ -339,9 +339,9 @@ def combined_image_by_vulnerability_count(opts = {}) # Retrieve top x images with the most vulnerabilities # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset This is not used in the backend but is added here for compatibility purposes as some clients expects this i.e UI widgets. + # @option opts [Integer] :offset The fields to sort the records on. **Not supported.** # @return [Array<(ImagesApiImageByVulnerabilityCount, Integer, Hash)>] ImagesApiImageByVulnerabilityCount data, response status code and response headers def combined_image_by_vulnerability_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -390,26 +390,26 @@ def combined_image_by_vulnerability_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve image entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @option opts [Boolean] :with_config (true/false) include image config, default is false - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [ImagesApiCustomerAndImage] def combined_image_detail(opts = {}) data, _status_code, _headers = combined_image_detail_with_http_info(opts) data end - # Retrieve image entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @option opts [Boolean] :with_config (true/false) include image config, default is false - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(ImagesApiCustomerAndImage, Integer, Hash)>] ImagesApiCustomerAndImage data, response status code and response headers def combined_image_detail_with_http_info(opts = {}) if @api_client.config.debugging @@ -422,9 +422,9 @@ def combined_image_detail_with_http_info(opts = {}) query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'with_config'] = opts[:'with_config'] if !opts[:'with_config'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -461,12 +461,12 @@ def combined_image_detail_with_http_info(opts = {}) end # Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities - # @param cid [String] CID - # @param registry [String] registry name - # @param repository [String] repository name - # @param tag [String] tag name + # @param cid [String] CS Customer ID + # @param registry [String] Registry + # @param repository [String] Repository name + # @param tag [String] Tag name # @param [Hash] opts the optional parameters - # @option opts [Boolean] :include_base_image_vuln include base image vulnerabilities + # @option opts [Boolean] :include_base_image_vuln Include base image vulnerabilities. (default to false) # @return [ImagesApiImageIssuesSummary] def combined_image_issues_summary(cid, registry, repository, tag, opts = {}) data, _status_code, _headers = combined_image_issues_summary_with_http_info(cid, registry, repository, tag, opts) @@ -474,12 +474,12 @@ def combined_image_issues_summary(cid, registry, repository, tag, opts = {}) end # Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities - # @param cid [String] CID - # @param registry [String] registry name - # @param repository [String] repository name - # @param tag [String] tag name + # @param cid [String] CS Customer ID + # @param registry [String] Registry + # @param repository [String] Repository name + # @param tag [String] Tag name # @param [Hash] opts the optional parameters - # @option opts [Boolean] :include_base_image_vuln include base image vulnerabilities + # @option opts [Boolean] :include_base_image_vuln Include base image vulnerabilities. (default to false) # @return [Array<(ImagesApiImageIssuesSummary, Integer, Hash)>] ImagesApiImageIssuesSummary data, response status code and response headers def combined_image_issues_summary_with_http_info(cid, registry, repository, tag, opts = {}) if @api_client.config.debugging @@ -547,12 +547,12 @@ def combined_image_issues_summary_with_http_info(cid, registry, repository, tag, end # aggregates information about vulnerabilities for an image - # @param cid [String] CID - # @param registry [String] registry name - # @param repository [String] repository name - # @param tag [String] tag name + # @param cid [String] CS Customer ID + # @param registry [String] Registry + # @param repository [String] Repository name + # @param tag [String] Tag name # @param [Hash] opts the optional parameters - # @option opts [Boolean] :include_base_image_vuln include base image vulnerabilities + # @option opts [Boolean] :include_base_image_vuln Include base image vulnerabilities. (default to false) # @return [ImagesApiImageVulnerabilitiesSummary] def combined_image_vulnerability_summary(cid, registry, repository, tag, opts = {}) data, _status_code, _headers = combined_image_vulnerability_summary_with_http_info(cid, registry, repository, tag, opts) @@ -560,12 +560,12 @@ def combined_image_vulnerability_summary(cid, registry, repository, tag, opts = end # aggregates information about vulnerabilities for an image - # @param cid [String] CID - # @param registry [String] registry name - # @param repository [String] repository name - # @param tag [String] tag name + # @param cid [String] CS Customer ID + # @param registry [String] Registry + # @param repository [String] Repository name + # @param tag [String] Tag name # @param [Hash] opts the optional parameters - # @option opts [Boolean] :include_base_image_vuln include base image vulnerabilities + # @option opts [Boolean] :include_base_image_vuln Include base image vulnerabilities. (default to false) # @return [Array<(ImagesApiImageVulnerabilitiesSummary, Integer, Hash)>] ImagesApiImageVulnerabilitiesSummary data, response status code and response headers def combined_image_vulnerability_summary_with_http_info(cid, registry, repository, tag, opts = {}) if @api_client.config.debugging @@ -760,24 +760,24 @@ def delete_base_images_with_http_info(ids, opts = {}) return data, status_code, headers end - # Get image assessment results by providing an FQL filter and paging details + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: container_id, container_running_status, cve_id, detection_name, detection_severity, first_seen, image_digest, image_id, registry, repository, tag, vulnerability_severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve [1-100] + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `container_id` - `container_running_status` - `cve_id` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `registry` - `repository` - `tag` - `vulnerability_severity` + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `first_seen` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `registry` - `repository` - `source` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id registry repository source tag] # @return [ImagesExtCombinedImagesResponse] def get_combined_images(opts = {}) data, _status_code, _headers = get_combined_images_with_http_info(opts) data end - # Get image assessment results by providing an FQL filter and paging details + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: container_id, container_running_status, cve_id, detection_name, detection_severity, first_seen, image_digest, image_id, registry, repository, tag, vulnerability_severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve [1-100] + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `container_id` - `container_running_status` - `cve_id` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `registry` - `repository` - `tag` - `vulnerability_severity` + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `first_seen` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `registry` - `repository` - `source` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id registry repository source tag] # @return [Array<(ImagesExtCombinedImagesResponse, Integer, Hash)>] ImagesExtCombinedImagesResponse data, response status code and response headers def get_combined_images_with_http_info(opts = {}) if @api_client.config.debugging @@ -789,9 +789,9 @@ def get_combined_images_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -827,28 +827,28 @@ def get_combined_images_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve images with an option to expand aggregated vulnerabilities/detections + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity - # @option opts [Boolean] :expand_vulnerabilities expand vulnerabilities - # @option opts [Boolean] :expand_detections expand detections - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` + # @option opts [Boolean] :expand_vulnerabilities Expand vulnerabilities details (default to false) + # @option opts [Boolean] :expand_detections Expand detections details (default to false) + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [base_os cid detections firstScanned first_seen highest_cps_current_rating highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository source tag vulnerabilities] + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `base_os` - `cid` - `detections` - `firstScanned` - `first_seen` - `highest_cps_current_rating` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `last_seen` - `layers_with_vulnerabilities` - `packages` - `registry` - `repository` - `source` - `tag` - `vulnerabilities` # @return [ImagesApiCombinedImageExport] def read_combined_images_export(opts = {}) data, _status_code, _headers = read_combined_images_export_with_http_info(opts) data end - # Retrieve images with an option to expand aggregated vulnerabilities/detections + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity - # @option opts [Boolean] :expand_vulnerabilities expand vulnerabilities - # @option opts [Boolean] :expand_detections expand detections - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` + # @option opts [Boolean] :expand_vulnerabilities Expand vulnerabilities details (default to false) + # @option opts [Boolean] :expand_detections Expand detections details (default to false) + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [base_os cid detections firstScanned first_seen highest_cps_current_rating highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository source tag vulnerabilities] + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `base_os` - `cid` - `detections` - `firstScanned` - `first_seen` - `highest_cps_current_rating` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `last_seen` - `layers_with_vulnerabilities` - `packages` - `registry` - `repository` - `source` - `tag` - `vulnerabilities` # @return [Array<(ImagesApiCombinedImageExport, Integer, Hash)>] ImagesApiCombinedImageExport data, response status code and response headers def read_combined_images_export_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/lib/crimson-falcon/api/container_packages.rb b/lib/crimson-falcon/api/container_packages.rb index ba172a7b..847175d1 100644 --- a/lib/crimson-falcon/api/container_packages.rb +++ b/lib/crimson-falcon/api/container_packages.rb @@ -36,10 +36,10 @@ class ContainerPackages def initialize(api_client = ApiClient.default) @api_client = api_client end - # Retrieve top x app packages with the most fixable vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [PackagesApiPackagesByVulnCount] def read_packages_by_fixable_vuln_count(opts = {}) @@ -47,10 +47,10 @@ def read_packages_by_fixable_vuln_count(opts = {}) data end - # Retrieve top x app packages with the most fixable vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(PackagesApiPackagesByVulnCount, Integer, Hash)>] PackagesApiPackagesByVulnCount data, response status code and response headers def read_packages_by_fixable_vuln_count_with_http_info(opts = {}) @@ -100,10 +100,10 @@ def read_packages_by_fixable_vuln_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve top x packages with the most vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [PackagesApiPackagesByVulnCount] def read_packages_by_vuln_count(opts = {}) @@ -111,10 +111,10 @@ def read_packages_by_vuln_count(opts = {}) data end - # Retrieve top x packages with the most vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(PackagesApiPackagesByVulnCount, Integer, Hash)>] PackagesApiPackagesByVulnCount data, response status code and response headers def read_packages_by_vuln_count_with_http_info(opts = {}) @@ -164,26 +164,26 @@ def read_packages_by_vuln_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve packages identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages, default is false - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages (default to false) + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [license package_name_version type] # @return [PackagesApiCombinedPackage] def read_packages_combined(opts = {}) data, _status_code, _headers = read_packages_combined_with_http_info(opts) data end - # Retrieve packages identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages, default is false - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages (default to false) + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [license package_name_version type] # @return [Array<(PackagesApiCombinedPackage, Integer, Hash)>] PackagesApiCombinedPackage data, response status code and response headers def read_packages_combined_with_http_info(opts = {}) if @api_client.config.debugging @@ -196,9 +196,9 @@ def read_packages_combined_with_http_info(opts = {}) query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'only_zero_day_affected'] = opts[:'only_zero_day_affected'] if !opts[:'only_zero_day_affected'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -234,26 +234,26 @@ def read_packages_combined_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve packages identified by the provided filter criteria for the purpose of export + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages, default is false - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages (default to false) + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [license package_name_version type] # @return [PackagesApiCombinedPackageExport] def read_packages_combined_export(opts = {}) data, _status_code, _headers = read_packages_combined_export_with_http_info(opts) data end - # Retrieve packages identified by the provided filter criteria for the purpose of export + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages, default is false - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages (default to false) + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [license package_name_version type] # @return [Array<(PackagesApiCombinedPackageExport, Integer, Hash)>] PackagesApiCombinedPackageExport data, response status code and response headers def read_packages_combined_export_with_http_info(opts = {}) if @api_client.config.debugging @@ -266,9 +266,9 @@ def read_packages_combined_export_with_http_info(opts = {}) query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'only_zero_day_affected'] = opts[:'only_zero_day_affected'] if !opts[:'only_zero_day_affected'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -304,9 +304,79 @@ def read_packages_combined_export_with_http_info(opts = {}) return data, status_code, headers end + # Maximum offset = 10000 - limit + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages (default to false) + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. + # @return [PackagesApiCombinedPackageV2] + def read_packages_combined_v2(opts = {}) + data, _status_code, _headers = read_packages_combined_v2_with_http_info(opts) + data + end + + # Maximum offset = 10000 - limit + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages (default to false) + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. + # @return [Array<(PackagesApiCombinedPackageV2, Integer, Hash)>] PackagesApiCombinedPackageV2 data, response status code and response headers + def read_packages_combined_v2_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerPackages.read_packages_combined_v2 ...' + end + # resource path + local_var_path = '/container-security/combined/packages/v2' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'only_zero_day_affected'] = opts[:'only_zero_day_affected'] if !opts[:'only_zero_day_affected'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'PackagesApiCombinedPackageV2' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerPackages.read_packages_combined_v2", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContainerPackages#read_packages_combined_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve packages count affected by zero day vulnerabilities # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` # @return [CommonCountResponse] def read_packages_count_by_zero_day(opts = {}) data, _status_code, _headers = read_packages_count_by_zero_day_with_http_info(opts) @@ -315,7 +385,7 @@ def read_packages_count_by_zero_day(opts = {}) # Retrieve packages count affected by zero day vulnerabilities # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers def read_packages_count_by_zero_day_with_http_info(opts = {}) if @api_client.config.debugging diff --git a/lib/crimson-falcon/api/container_vulnerabilities.rb b/lib/crimson-falcon/api/container_vulnerabilities.rb index ed1bb511..8a2a5f24 100644 --- a/lib/crimson-falcon/api/container_vulnerabilities.rb +++ b/lib/crimson-falcon/api/container_vulnerabilities.rb @@ -36,24 +36,24 @@ class ContainerVulnerabilities def initialize(api_client = ApiClient.default) @api_client = api_client end - # Retrieve vulnerability and aggregate data filtered by the provided FQL + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity] + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `cps_current_rating` - `cve_id` - `cvss_score` - `description` - `images_impacted` - `packages_impacted` - `severity` # @return [VulnerabilitiesApiCombinedVulnerability] def read_combined_vulnerabilities(opts = {}) data, _status_code, _headers = read_combined_vulnerabilities_with_http_info(opts) data end - # Retrieve vulnerability and aggregate data filtered by the provided FQL + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity] + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `cps_current_rating` - `cve_id` - `cvss_score` - `description` - `images_impacted` - `packages_impacted` - `severity` # @return [Array<(VulnerabilitiesApiCombinedVulnerability, Integer, Hash)>] VulnerabilitiesApiCombinedVulnerability data, response status code and response headers def read_combined_vulnerabilities_with_http_info(opts = {}) if @api_client.config.debugging @@ -103,11 +103,11 @@ def read_combined_vulnerabilities_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve vulnerability details related to an image + # Maximum offset = 10000 - limit # @param id [String] Image UUID # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filters: cid,cps_rating,cve_id,cvss_score,exploited_status,exploited_status_name,include_base_image_vuln,is_zero_day,remediation_available,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filter fields: - `cid` - `cps_rating` - `cve_id` - `cvss_score` - `exploited_status_name` - `exploited_status` - `include_base_image_vuln` - `is_zero_day` - `remediation_available` - `severity` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiCombinedVulnerabilityDetails] def read_combined_vulnerabilities_details(id, opts = {}) @@ -115,11 +115,11 @@ def read_combined_vulnerabilities_details(id, opts = {}) data end - # Retrieve vulnerability details related to an image + # Maximum offset = 10000 - limit # @param id [String] Image UUID # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filters: cid,cps_rating,cve_id,cvss_score,exploited_status,exploited_status_name,include_base_image_vuln,is_zero_day,remediation_available,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filter fields: - `cid` - `cps_rating` - `cve_id` - `cvss_score` - `exploited_status_name` - `exploited_status` - `include_base_image_vuln` - `is_zero_day` - `remediation_available` - `severity` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiCombinedVulnerabilityDetails, Integer, Hash)>] VulnerabilitiesApiCombinedVulnerabilityDetails data, response status code and response headers def read_combined_vulnerabilities_details_with_http_info(id, opts = {}) @@ -174,10 +174,10 @@ def read_combined_vulnerabilities_details_with_http_info(id, opts = {}) return data, status_code, headers end - # Retrieve vulnerability and package related info for this customer + # Maximum offset = 10000 - limit # @param cve_id [String] Vulnerability CVE ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiCombinedVulnerabilityInfo] def read_combined_vulnerabilities_info(cve_id, opts = {}) @@ -185,10 +185,10 @@ def read_combined_vulnerabilities_info(cve_id, opts = {}) data end - # Retrieve vulnerability and package related info for this customer + # Maximum offset = 10000 - limit # @param cve_id [String] Vulnerability CVE ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiCombinedVulnerabilityInfo, Integer, Hash)>] VulnerabilitiesApiCombinedVulnerabilityInfo data, response status code and response headers def read_combined_vulnerabilities_info_with_http_info(cve_id, opts = {}) @@ -242,10 +242,10 @@ def read_combined_vulnerabilities_info_with_http_info(cve_id, opts = {}) return data, status_code, headers end - # Retrieve top x vulnerabilities with the most impacted images + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnByImageCount] def read_vulnerabilities_by_image_count(opts = {}) @@ -253,10 +253,10 @@ def read_vulnerabilities_by_image_count(opts = {}) data end - # Retrieve top x vulnerabilities with the most impacted images + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiVulnByImageCount, Integer, Hash)>] VulnerabilitiesApiVulnByImageCount data, response status code and response headers def read_vulnerabilities_by_image_count_with_http_info(opts = {}) @@ -306,10 +306,10 @@ def read_vulnerabilities_by_image_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve top x vulnerabilities with the most recent publication date + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnByPublication] def read_vulnerabilities_publication_date(opts = {}) @@ -317,10 +317,10 @@ def read_vulnerabilities_publication_date(opts = {}) data end - # Retrieve top x vulnerabilities with the most recent publication date + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiVulnByPublication, Integer, Hash)>] VulnerabilitiesApiVulnByPublication data, response status code and response headers def read_vulnerabilities_publication_date_with_http_info(opts = {}) @@ -370,10 +370,10 @@ def read_vulnerabilities_publication_date_with_http_info(opts = {}) return data, status_code, headers end - # Aggregate count of vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCount] def read_vulnerability_count(opts = {}) @@ -381,10 +381,10 @@ def read_vulnerability_count(opts = {}) data end - # Aggregate count of vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiVulnCount, Integer, Hash)>] VulnerabilitiesApiVulnCount data, response status code and response headers def read_vulnerability_count_with_http_info(opts = {}) @@ -434,10 +434,10 @@ def read_vulnerability_count_with_http_info(opts = {}) return data, status_code, headers end - # Aggregate count of vulnerabilities grouped by actively exploited + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountByActivelyExploited] def read_vulnerability_count_by_actively_exploited(opts = {}) @@ -445,10 +445,10 @@ def read_vulnerability_count_by_actively_exploited(opts = {}) data end - # Aggregate count of vulnerabilities grouped by actively exploited + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiVulnCountByActivelyExploited, Integer, Hash)>] VulnerabilitiesApiVulnCountByActivelyExploited data, response status code and response headers def read_vulnerability_count_by_actively_exploited_with_http_info(opts = {}) @@ -498,10 +498,10 @@ def read_vulnerability_count_by_actively_exploited_with_http_info(opts = {}) return data, status_code, headers end - # Aggregate count of vulnerabilities grouped by csp_rating + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountByCSPRating] def read_vulnerability_count_by_cps_rating(opts = {}) @@ -509,10 +509,10 @@ def read_vulnerability_count_by_cps_rating(opts = {}) data end - # Aggregate count of vulnerabilities grouped by csp_rating + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiVulnCountByCSPRating, Integer, Hash)>] VulnerabilitiesApiVulnCountByCSPRating data, response status code and response headers def read_vulnerability_count_by_cps_rating_with_http_info(opts = {}) @@ -562,10 +562,10 @@ def read_vulnerability_count_by_cps_rating_with_http_info(opts = {}) return data, status_code, headers end - # Aggregate count of vulnerabilities grouped by cvss score + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountByCVSSScore] def read_vulnerability_count_by_cvss_score(opts = {}) @@ -573,10 +573,10 @@ def read_vulnerability_count_by_cvss_score(opts = {}) data end - # Aggregate count of vulnerabilities grouped by cvss score + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiVulnCountByCVSSScore, Integer, Hash)>] VulnerabilitiesApiVulnCountByCVSSScore data, response status code and response headers def read_vulnerability_count_by_cvss_score_with_http_info(opts = {}) @@ -626,10 +626,10 @@ def read_vulnerability_count_by_cvss_score_with_http_info(opts = {}) return data, status_code, headers end - # Aggregate count of vulnerabilities grouped by severity + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountBySeverity] def read_vulnerability_count_by_severity(opts = {}) @@ -637,10 +637,10 @@ def read_vulnerability_count_by_severity(opts = {}) data end - # Aggregate count of vulnerabilities grouped by severity + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(VulnerabilitiesApiVulnCountBySeverity, Integer, Hash)>] VulnerabilitiesApiVulnCountBySeverity data, response status code and response headers def read_vulnerability_count_by_severity_with_http_info(opts = {}) diff --git a/lib/crimson-falcon/api/content_update_policies.rb b/lib/crimson-falcon/api/content_update_policies.rb new file mode 100644 index 00000000..a04f7a08 --- /dev/null +++ b/lib/crimson-falcon/api/content_update_policies.rb @@ -0,0 +1,769 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class ContentUpdatePolicies + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create Content Update Policies by specifying details about the policy to create + # @param body [ContentUpdateCreatePoliciesReqV1] + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + def create_content_update_policies(body, opts = {}) + data, _status_code, _headers = create_content_update_policies_with_http_info(body, opts) + data + end + + # Create Content Update Policies by specifying details about the policy to create + # @param body [ContentUpdateCreatePoliciesReqV1] + # @param [Hash] opts the optional parameters + # @return [Array<(DomainContentUpdatePolicyRespV1, Integer, Hash)>] DomainContentUpdatePolicyRespV1 data, response status code and response headers + def create_content_update_policies_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.create_content_update_policies ...' + 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 ContentUpdatePolicies.create_content_update_policies" + end + # resource path + local_var_path = '/policy/entities/content-update/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 + + # 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] || 'DomainContentUpdatePolicyRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.create_content_update_policies", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#create_content_update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a set of Content Update Policies by specifying their IDs + # @param ids [Array] The IDs of the Content Update Policies to delete + # @param [Hash] opts the optional parameters + # @return [MsaQueryResponse] + def delete_content_update_policies(ids, opts = {}) + data, _status_code, _headers = delete_content_update_policies_with_http_info(ids, opts) + data + end + + # Delete a set of Content Update Policies by specifying their IDs + # @param ids [Array] The IDs of the Content Update Policies to delete + # @param [Hash] opts the optional parameters + # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + def delete_content_update_policies_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.delete_content_update_policies ...' + 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 ContentUpdatePolicies.delete_content_update_policies" + end + # resource path + local_var_path = '/policy/entities/content-update/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'MsaQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.delete_content_update_policies", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#delete_content_update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve a set of Content Update Policies by specifying their IDs + # @param ids [Array] The IDs of the Content Update Policies to return + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + def get_content_update_policies(ids, opts = {}) + data, _status_code, _headers = get_content_update_policies_with_http_info(ids, opts) + data + end + + # Retrieve a set of Content Update Policies by specifying their IDs + # @param ids [Array] The IDs of the Content Update Policies to return + # @param [Hash] opts the optional parameters + # @return [Array<(DomainContentUpdatePolicyRespV1, Integer, Hash)>] DomainContentUpdatePolicyRespV1 data, response status code and response headers + def get_content_update_policies_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.get_content_update_policies ...' + 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 ContentUpdatePolicies.get_content_update_policies" + end + # resource path + local_var_path = '/policy/entities/content-update/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DomainContentUpdatePolicyRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.get_content_update_policies", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#get_content_update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Perform the specified action on the Content Update Policies specified in the request + # @param action_name [String] The action to perform + # @param body [MsaEntityActionRequestV2] + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + def perform_content_update_policies_action(action_name, body, opts = {}) + data, _status_code, _headers = perform_content_update_policies_action_with_http_info(action_name, body, opts) + data + end + + # Perform the specified action on the Content Update Policies specified in the request + # @param action_name [String] The action to perform + # @param body [MsaEntityActionRequestV2] + # @param [Hash] opts the optional parameters + # @return [Array<(DomainContentUpdatePolicyRespV1, Integer, Hash)>] DomainContentUpdatePolicyRespV1 data, response status code and response headers + def perform_content_update_policies_action_with_http_info(action_name, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.perform_content_update_policies_action ...' + end + # verify the required parameter 'action_name' is set + if @api_client.config.client_side_validation && action_name.nil? + fail ArgumentError, "Missing the required parameter 'action_name' when calling ContentUpdatePolicies.perform_content_update_policies_action" + end + # verify enum value + allowable_values = ["add-host-group", "disable", "enable", "remove-host-group"] + if @api_client.config.client_side_validation && !allowable_values.include?(action_name) + fail ArgumentError, "invalid value for \"action_name\", must be one of #{allowable_values}" + 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 ContentUpdatePolicies.perform_content_update_policies_action" + end + # resource path + local_var_path = '/policy/entities/content-update-actions/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'action_name'] = action_name + + # 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 + + # 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] || 'DomainContentUpdatePolicyRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.perform_content_update_policies_action", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#perform_content_update_policies_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [DomainContentUpdatePolicyRespV1] + def query_combined_content_update_policies(opts = {}) + data, _status_code, _headers = query_combined_content_update_policies_with_http_info(opts) + data + end + + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [Array<(DomainContentUpdatePolicyRespV1, Integer, Hash)>] DomainContentUpdatePolicyRespV1 data, response status code and response headers + def query_combined_content_update_policies_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_combined_content_update_policies ...' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_combined_content_update_policies, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policies, must be smaller than or equal to 5000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policies, must be greater than or equal to 1.' + end + + allowable_values = ["created_by.asc", "created_by.desc", "created_timestamp.asc", "created_timestamp.desc", "enabled.asc", "enabled.desc", "modified_by.asc", "modified_by.desc", "modified_timestamp.asc", "modified_timestamp.desc", "name.asc", "name.desc", "platform_name.asc", "platform_name.desc", "precedence.asc", "precedence.desc"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/policy/combined/content-update/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + 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? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DomainContentUpdatePolicyRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.query_combined_content_update_policies", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#query_combined_content_update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :id The ID of the Content Update Policy to search for members of + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [BasePolicyMembersRespV1] + def query_combined_content_update_policy_members(opts = {}) + data, _status_code, _headers = query_combined_content_update_policy_members_with_http_info(opts) + data + end + + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :id The ID of the Content Update Policy to search for members of + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [Array<(BasePolicyMembersRespV1, Integer, Hash)>] BasePolicyMembersRespV1 data, response status code and response headers + def query_combined_content_update_policy_members_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_combined_content_update_policy_members ...' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_combined_content_update_policy_members, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policy_members, must be smaller than or equal to 5000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policy_members, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/policy/combined/content-update-members/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + 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? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'BasePolicyMembersRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.query_combined_content_update_policy_members", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#query_combined_content_update_policy_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [MsaQueryResponse] + def query_content_update_policies(opts = {}) + data, _status_code, _headers = query_content_update_policies_with_http_info(opts) + data + end + + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + def query_content_update_policies_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_content_update_policies ...' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_content_update_policies, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policies, must be smaller than or equal to 5000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policies, must be greater than or equal to 1.' + end + + allowable_values = ["created_by.asc", "created_by.desc", "created_timestamp.asc", "created_timestamp.desc", "enabled.asc", "enabled.desc", "modified_by.asc", "modified_by.desc", "modified_timestamp.asc", "modified_timestamp.desc", "name.asc", "name.desc", "platform_name.asc", "platform_name.desc", "precedence.asc", "precedence.desc"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/policy/queries/content-update/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + 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? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'MsaQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.query_content_update_policies", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#query_content_update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :id The ID of the Content Update Policy to search for members of + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [MsaQueryResponse] + def query_content_update_policy_members(opts = {}) + data, _status_code, _headers = query_content_update_policy_members_with_http_info(opts) + data + end + + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :id The ID of the Content Update Policy to search for members of + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + def query_content_update_policy_members_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_content_update_policy_members ...' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_content_update_policy_members, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policy_members, must be smaller than or equal to 5000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policy_members, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/policy/queries/content-update-members/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + 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? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'MsaQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.query_content_update_policy_members", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#query_content_update_policy_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence + # @param body [BaseSetContentUpdatePolicyPrecedenceReqV1] + # @param [Hash] opts the optional parameters + # @return [MsaQueryResponse] + def set_content_update_policies_precedence(body, opts = {}) + data, _status_code, _headers = set_content_update_policies_precedence_with_http_info(body, opts) + data + end + + # Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence + # @param body [BaseSetContentUpdatePolicyPrecedenceReqV1] + # @param [Hash] opts the optional parameters + # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + def set_content_update_policies_precedence_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.set_content_update_policies_precedence ...' + 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 ContentUpdatePolicies.set_content_update_policies_precedence" + end + # resource path + local_var_path = '/policy/entities/content-update-precedence/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 + + # 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] || 'MsaQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.set_content_update_policies_precedence", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#set_content_update_policies_precedence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Content Update Policies by specifying the ID of the policy and details to update + # @param body [ContentUpdateUpdatePoliciesReqV1] + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + def update_content_update_policies(body, opts = {}) + data, _status_code, _headers = update_content_update_policies_with_http_info(body, opts) + data + end + + # Update Content Update Policies by specifying the ID of the policy and details to update + # @param body [ContentUpdateUpdatePoliciesReqV1] + # @param [Hash] opts the optional parameters + # @return [Array<(DomainContentUpdatePolicyRespV1, Integer, Hash)>] DomainContentUpdatePolicyRespV1 data, response status code and response headers + def update_content_update_policies_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.update_content_update_policies ...' + 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 ContentUpdatePolicies.update_content_update_policies" + end + # resource path + local_var_path = '/policy/entities/content-update/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 + + # 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] || 'DomainContentUpdatePolicyRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContentUpdatePolicies.update_content_update_policies", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ContentUpdatePolicies#update_content_update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/correlation_rules.rb b/lib/crimson-falcon/api/correlation_rules.rb new file mode 100644 index 00000000..6ca10a9c --- /dev/null +++ b/lib/crimson-falcon/api/correlation_rules.rb @@ -0,0 +1,505 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class CorrelationRules + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying the filter parameters + # @option opts [String] :q Match query criteria, which includes all the filter string fields + # @option opts [String] :sort Rule property to sort on (default to 'created_on') + # @option opts [Integer] :offset Starting index of overall result set from which to return IDs (default to 0) + # @option opts [Integer] :limit Number of IDs to return (default to 100) + # @return [ApiGetEntitiesRulesResponseV1] + def combined_rules_get_v1(opts = {}) + data, _status_code, _headers = combined_rules_get_v1_with_http_info(opts) + data + end + + # Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying the filter parameters + # @option opts [String] :q Match query criteria, which includes all the filter string fields + # @option opts [String] :sort Rule property to sort on (default to 'created_on') + # @option opts [Integer] :offset Starting index of overall result set from which to return IDs (default to 0) + # @option opts [Integer] :limit Number of IDs to return (default to 100) + # @return [Array<(ApiGetEntitiesRulesResponseV1, Integer, Hash)>] ApiGetEntitiesRulesResponseV1 data, response status code and response headers + def combined_rules_get_v1_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CorrelationRules.combined_rules_get_v1 ...' + end + allowable_values = ["created_on", "created_on|desc", "last_updated_on", "last_updated_on|desc"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/correlation-rules/combined/rules/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ApiGetEntitiesRulesResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CorrelationRules.combined_rules_get_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CorrelationRules#combined_rules_get_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete versions by IDs + # @param ids [Array] The IDs + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + def entities_rule_versions_delete_v1(ids, opts = {}) + data, _status_code, _headers = entities_rule_versions_delete_v1_with_http_info(ids, opts) + data + end + + # Delete versions by IDs + # @param ids [Array] The IDs + # @param [Hash] opts the optional parameters + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def entities_rule_versions_delete_v1_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CorrelationRules.entities_rule_versions_delete_v1 ...' + 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 CorrelationRules.entities_rule_versions_delete_v1" + end + # resource path + local_var_path = '/correlation-rules/entities/rule-versions/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']) + + # 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'] + + new_options = opts.merge( + :operation => :"CorrelationRules.entities_rule_versions_delete_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CorrelationRules#entities_rule_versions_delete_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete rules by IDs + # @param ids [Array] The IDs + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + def entities_rules_delete_v1(ids, opts = {}) + data, _status_code, _headers = entities_rules_delete_v1_with_http_info(ids, opts) + data + end + + # Delete rules by IDs + # @param ids [Array] The IDs + # @param [Hash] opts the optional parameters + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def entities_rules_delete_v1_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CorrelationRules.entities_rules_delete_v1 ...' + 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 CorrelationRules.entities_rules_delete_v1" + end + # resource path + local_var_path = '/correlation-rules/entities/rules/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']) + + # 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'] + + new_options = opts.merge( + :operation => :"CorrelationRules.entities_rules_delete_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CorrelationRules#entities_rules_delete_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve rules by IDs + # @param ids [Array] The IDs + # @param [Hash] opts the optional parameters + # @return [ApiGetEntitiesRulesResponseV1] + def entities_rules_get_v1(ids, opts = {}) + data, _status_code, _headers = entities_rules_get_v1_with_http_info(ids, opts) + data + end + + # Retrieve rules by IDs + # @param ids [Array] The IDs + # @param [Hash] opts the optional parameters + # @return [Array<(ApiGetEntitiesRulesResponseV1, Integer, Hash)>] ApiGetEntitiesRulesResponseV1 data, response status code and response headers + def entities_rules_get_v1_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CorrelationRules.entities_rules_get_v1 ...' + 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 CorrelationRules.entities_rules_get_v1" + end + # resource path + local_var_path = '/correlation-rules/entities/rules/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ApiGetEntitiesRulesResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CorrelationRules.entities_rules_get_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CorrelationRules#entities_rules_get_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update rules + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [ApiGetEntitiesRulesResponseV1] + def entities_rules_patch_v1(body, opts = {}) + data, _status_code, _headers = entities_rules_patch_v1_with_http_info(body, opts) + data + end + + # Update rules + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(ApiGetEntitiesRulesResponseV1, Integer, Hash)>] ApiGetEntitiesRulesResponseV1 data, response status code and response headers + def entities_rules_patch_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CorrelationRules.entities_rules_patch_v1 ...' + 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 CorrelationRules.entities_rules_patch_v1" + end + # resource path + local_var_path = '/correlation-rules/entities/rules/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 + + # 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] || 'ApiGetEntitiesRulesResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CorrelationRules.entities_rules_patch_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CorrelationRules#entities_rules_patch_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create rule + # @param body [ApiRuleCreateRequestV1] + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + def entities_rules_post_v1(body, opts = {}) + data, _status_code, _headers = entities_rules_post_v1_with_http_info(body, opts) + data + end + + # Create rule + # @param body [ApiRuleCreateRequestV1] + # @param [Hash] opts the optional parameters + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def entities_rules_post_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CorrelationRules.entities_rules_post_v1 ...' + 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 CorrelationRules.entities_rules_post_v1" + end + # resource path + local_var_path = '/correlation-rules/entities/rules/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 + + # 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] || 'MsaspecQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CorrelationRules.entities_rules_post_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CorrelationRules#entities_rules_post_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying the filter parameters + # @option opts [String] :q Match query criteria, which includes all the filter string fields + # @option opts [String] :sort Rule property to sort on (default to 'created_on') + # @option opts [Integer] :offset Starting index of overall result set from which to return IDs (default to 0) + # @option opts [Integer] :limit Number of IDs to return (default to 100) + # @return [MsaspecQueryResponse] + def queries_rules_get_v1(opts = {}) + data, _status_code, _headers = queries_rules_get_v1_with_http_info(opts) + data + end + + # Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying the filter parameters + # @option opts [String] :q Match query criteria, which includes all the filter string fields + # @option opts [String] :sort Rule property to sort on (default to 'created_on') + # @option opts [Integer] :offset Starting index of overall result set from which to return IDs (default to 0) + # @option opts [Integer] :limit Number of IDs to return (default to 100) + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def queries_rules_get_v1_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CorrelationRules.queries_rules_get_v1 ...' + end + allowable_values = ["created_on", "created_on|desc", "last_updated_on", "last_updated_on|desc"] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/correlation-rules/queries/rules/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # 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'] + + new_options = opts.merge( + :operation => :"CorrelationRules.queries_rules_get_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CorrelationRules#queries_rules_get_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/cspm_registration.rb b/lib/crimson-falcon/api/cspm_registration.rb index cfa178ac..6fbed4ef 100644 --- a/lib/crimson-falcon/api/cspm_registration.rb +++ b/lib/crimson-falcon/api/cspm_registration.rb @@ -39,8 +39,6 @@ def initialize(api_client = ApiClient.default) # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. # @param tenant_id [Array] Azure Tenant ID # @param [Hash] opts the optional parameters - # @option opts [Boolean] :refresh Setting to true will invalidate the current certificate and generate a new certificate (default to false) - # @option opts [String] :years_valid Years the certificate should be valid (only used when refresh=true) # @return [RegistrationAzureDownloadCertificateResponseV1] def azure_download_certificate(tenant_id, opts = {}) data, _status_code, _headers = azure_download_certificate_with_http_info(tenant_id, opts) @@ -50,8 +48,6 @@ def azure_download_certificate(tenant_id, opts = {}) # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. # @param tenant_id [Array] Azure Tenant ID # @param [Hash] opts the optional parameters - # @option opts [Boolean] :refresh Setting to true will invalidate the current certificate and generate a new certificate (default to false) - # @option opts [String] :years_valid Years the certificate should be valid (only used when refresh=true) # @return [Array<(RegistrationAzureDownloadCertificateResponseV1, Integer, Hash)>] RegistrationAzureDownloadCertificateResponseV1 data, response status code and response headers def azure_download_certificate_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @@ -61,26 +57,89 @@ def azure_download_certificate_with_http_info(tenant_id, opts = {}) if @api_client.config.client_side_validation && tenant_id.nil? fail ArgumentError, "Missing the required parameter 'tenant_id' when calling CspmRegistration.azure_download_certificate" end + # resource path + local_var_path = '/cloud-connect-cspm-azure/entities/download-certificate/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'tenant_id'] = @api_client.build_collection_param(tenant_id, :multi) + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/octet-stream']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'RegistrationAzureDownloadCertificateResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistration.azure_download_certificate", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CspmRegistration#azure_download_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. + # @param tenant_id [Array] Azure Tenant ID + # @param [Hash] opts the optional parameters + # @option opts [String] :years_valid Years the certificate should be valid. Max 2 (default to '1') + # @return [RegistrationAzureDownloadCertificateResponseV1] + def azure_refresh_certificate(tenant_id, opts = {}) + data, _status_code, _headers = azure_refresh_certificate_with_http_info(tenant_id, opts) + data + end + + # Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. + # @param tenant_id [Array] Azure Tenant ID + # @param [Hash] opts the optional parameters + # @option opts [String] :years_valid Years the certificate should be valid. Max 2 (default to '1') + # @return [Array<(RegistrationAzureDownloadCertificateResponseV1, Integer, Hash)>] RegistrationAzureDownloadCertificateResponseV1 data, response status code and response headers + def azure_refresh_certificate_with_http_info(tenant_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistration.azure_refresh_certificate ...' + end + # verify the required parameter 'tenant_id' is set + if @api_client.config.client_side_validation && tenant_id.nil? + fail ArgumentError, "Missing the required parameter 'tenant_id' when calling CspmRegistration.azure_refresh_certificate" + end if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'].to_s.length > 2 - fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling CspmRegistration.azure_download_certificate, the character length must be smaller than or equal to 2.' + fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling CspmRegistration.azure_refresh_certificate, the character length must be smaller than or equal to 2.' end if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'].to_s.length < 1 - fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling CspmRegistration.azure_download_certificate, the character length must be great than or equal to 1.' + fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling CspmRegistration.azure_refresh_certificate, the character length must be great than or equal to 1.' end pattern = Regexp.new(/^[0-9]{1,2}$/) if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"years_valid\"]' when calling CspmRegistration.azure_download_certificate, must conform to the pattern #{pattern}." + fail ArgumentError, "invalid value for 'opts[:\"years_valid\"]' when calling CspmRegistration.azure_refresh_certificate, must conform to the pattern #{pattern}." end # resource path - local_var_path = '/cloud-connect-cspm-azure/entities/download-certificate/v1' + local_var_path = '/cloud-connect-cspm-azure/entities/refresh-certificate/v1' # query parameters query_params = opts[:query_params] || {} query_params[:'tenant_id'] = @api_client.build_collection_param(tenant_id, :multi) - query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil? query_params[:'years_valid'] = opts[:'years_valid'] if !opts[:'years_valid'].nil? # header parameters @@ -101,7 +160,7 @@ def azure_download_certificate_with_http_info(tenant_id, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"CspmRegistration.azure_download_certificate", + :operation => :"CspmRegistration.azure_refresh_certificate", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -110,9 +169,9 @@ def azure_download_certificate_with_http_info(tenant_id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CspmRegistration#azure_download_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CspmRegistration#azure_refresh_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -451,7 +510,7 @@ def create_cspm_gcp_account_with_http_info(body, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS account IDs to remove # @option opts [Array] :organization_ids AWS organization IDs to remove - # @return [MsaBaseEntitiesResponse] + # @return [MsaspecResponseFields] def delete_cspm_aws_account(opts = {}) data, _status_code, _headers = delete_cspm_aws_account_with_http_info(opts) data @@ -461,7 +520,7 @@ def delete_cspm_aws_account(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS account IDs to remove # @option opts [Array] :organization_ids AWS organization IDs to remove - # @return [Array<(MsaBaseEntitiesResponse, Integer, Hash)>] MsaBaseEntitiesResponse data, response status code and response headers + # @return [Array<(MsaspecResponseFields, Integer, Hash)>] MsaspecResponseFields data, response status code and response headers def delete_cspm_aws_account_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CspmRegistration.delete_cspm_aws_account ...' @@ -486,7 +545,7 @@ def delete_cspm_aws_account_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaBaseEntitiesResponse' + return_type = opts[:debug_return_type] || 'MsaspecResponseFields' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -1225,7 +1284,7 @@ def get_cspm_aws_account_scripts_attachment_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CspmRegistration.get_cspm_aws_account_scripts_attachment ...' end - allowable_values = ["aws-bash", "aws-terraform"] + allowable_values = ["aws-bash", "aws-terraform", "aws-native-terraform"] if @api_client.config.client_side_validation && opts[:'template'] && !allowable_values.include?(opts[:'template']) fail ArgumentError, "invalid value for \"template\", must be one of #{allowable_values}" end diff --git a/lib/crimson-falcon/api/custom_ioa.rb b/lib/crimson-falcon/api/custom_ioa.rb index c78f5b87..598a9203 100644 --- a/lib/crimson-falcon/api/custom_ioa.rb +++ b/lib/crimson-falcon/api/custom_ioa.rb @@ -239,8 +239,8 @@ def delete_rule_groups_mixin0_with_http_info(ids, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :comment Explains why the entity is being deleted # @return [MsaReplyMetaOnly] - def delete_rules_0(rule_group_id, ids, opts = {}) - data, _status_code, _headers = delete_rules_0_with_http_info(rule_group_id, ids, opts) + def delete_rules(rule_group_id, ids, opts = {}) + data, _status_code, _headers = delete_rules_with_http_info(rule_group_id, ids, opts) data end @@ -250,17 +250,17 @@ def delete_rules_0(rule_group_id, ids, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :comment Explains why the entity is being deleted # @return [Array<(MsaReplyMetaOnly, Integer, Hash)>] MsaReplyMetaOnly data, response status code and response headers - def delete_rules_0_with_http_info(rule_group_id, ids, opts = {}) + def delete_rules_with_http_info(rule_group_id, ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CustomIoa.delete_rules_0 ...' + @api_client.config.logger.debug 'Calling API: CustomIoa.delete_rules ...' end # verify the required parameter 'rule_group_id' is set if @api_client.config.client_side_validation && rule_group_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_group_id' when calling CustomIoa.delete_rules_0" + fail ArgumentError, "Missing the required parameter 'rule_group_id' when calling CustomIoa.delete_rules" 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 CustomIoa.delete_rules_0" + fail ArgumentError, "Missing the required parameter 'ids' when calling CustomIoa.delete_rules" end # resource path local_var_path = '/ioarules/entities/rules/v1' @@ -289,7 +289,7 @@ def delete_rules_0_with_http_info(rule_group_id, ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"CustomIoa.delete_rules_0", + :operation => :"CustomIoa.delete_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -300,7 +300,7 @@ def delete_rules_0_with_http_info(rule_group_id, ids, opts = {}) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CustomIoa#delete_rules_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CustomIoa#delete_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1156,8 +1156,8 @@ def update_rule_group_mixin0_with_http_info(body, opts = {}) # @param body [ApiRuleUpdatesRequestV1] # @param [Hash] opts the optional parameters # @return [ApiRulesResponse] - def update_rules_0(body, opts = {}) - data, _status_code, _headers = update_rules_0_with_http_info(body, opts) + def update_rules(body, opts = {}) + data, _status_code, _headers = update_rules_with_http_info(body, opts) data end @@ -1165,13 +1165,13 @@ def update_rules_0(body, opts = {}) # @param body [ApiRuleUpdatesRequestV1] # @param [Hash] opts the optional parameters # @return [Array<(ApiRulesResponse, Integer, Hash)>] ApiRulesResponse data, response status code and response headers - def update_rules_0_with_http_info(body, opts = {}) + def update_rules_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CustomIoa.update_rules_0 ...' + @api_client.config.logger.debug 'Calling API: CustomIoa.update_rules ...' 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 CustomIoa.update_rules_0" + fail ArgumentError, "Missing the required parameter 'body' when calling CustomIoa.update_rules" end # resource path local_var_path = '/ioarules/entities/rules/v1' @@ -1202,7 +1202,7 @@ def update_rules_0_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"CustomIoa.update_rules_0", + :operation => :"CustomIoa.update_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1213,7 +1213,7 @@ def update_rules_0_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CustomIoa#update_rules_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CustomIoa#update_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/d4c_registration.rb b/lib/crimson-falcon/api/d4c_registration.rb index 36aecf97..d2e57f35 100644 --- a/lib/crimson-falcon/api/d4c_registration.rb +++ b/lib/crimson-falcon/api/d4c_registration.rb @@ -304,7 +304,7 @@ def create_discover_cloud_azure_account_with_http_info(body, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS account IDs to remove # @option opts [Array] :organization_ids AWS organization IDs to remove - # @return [MsaBaseEntitiesResponse] + # @return [MsaspecResponseFields] def delete_d4_c_aws_account(opts = {}) data, _status_code, _headers = delete_d4_c_aws_account_with_http_info(opts) data @@ -314,7 +314,7 @@ def delete_d4_c_aws_account(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS account IDs to remove # @option opts [Array] :organization_ids AWS organization IDs to remove - # @return [Array<(MsaBaseEntitiesResponse, Integer, Hash)>] MsaBaseEntitiesResponse data, response status code and response headers + # @return [Array<(MsaspecResponseFields, Integer, Hash)>] MsaspecResponseFields data, response status code and response headers def delete_d4_c_aws_account_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: D4cRegistration.delete_d4_c_aws_account ...' @@ -339,7 +339,7 @@ def delete_d4_c_aws_account_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaBaseEntitiesResponse' + return_type = opts[:debug_return_type] || 'MsaspecResponseFields' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -419,87 +419,6 @@ def delete_d4_cgcp_account_with_http_info(opts = {}) return data, status_code, headers end - # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - # @param tenant_id [Array] Azure Tenant ID - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :refresh Setting to true will invalidate the current certificate and generate a new certificate (default to false) - # @option opts [String] :years_valid Years the certificate should be valid (only used when refresh=true) - # @return [RegistrationAzureDownloadCertificateResponseV1] - def discover_cloud_azure_download_certificate(tenant_id, opts = {}) - data, _status_code, _headers = discover_cloud_azure_download_certificate_with_http_info(tenant_id, opts) - data - end - - # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - # @param tenant_id [Array] Azure Tenant ID - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :refresh Setting to true will invalidate the current certificate and generate a new certificate (default to false) - # @option opts [String] :years_valid Years the certificate should be valid (only used when refresh=true) - # @return [Array<(RegistrationAzureDownloadCertificateResponseV1, Integer, Hash)>] RegistrationAzureDownloadCertificateResponseV1 data, response status code and response headers - def discover_cloud_azure_download_certificate_with_http_info(tenant_id, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: D4cRegistration.discover_cloud_azure_download_certificate ...' - end - # verify the required parameter 'tenant_id' is set - if @api_client.config.client_side_validation && tenant_id.nil? - fail ArgumentError, "Missing the required parameter 'tenant_id' when calling D4cRegistration.discover_cloud_azure_download_certificate" - end - if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'].to_s.length > 2 - fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling D4cRegistration.discover_cloud_azure_download_certificate, the character length must be smaller than or equal to 2.' - end - - if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'].to_s.length < 1 - fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling D4cRegistration.discover_cloud_azure_download_certificate, the character length must be great than or equal to 1.' - end - - pattern = Regexp.new(/^[0-9]{1,2}$/) - if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"years_valid\"]' when calling D4cRegistration.discover_cloud_azure_download_certificate, must conform to the pattern #{pattern}." - end - - # resource path - local_var_path = '/cloud-connect-azure/entities/download-certificate/v1' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'tenant_id'] = @api_client.build_collection_param(tenant_id, :multi) - query_params[:'refresh'] = opts[:'refresh'] if !opts[:'refresh'].nil? - query_params[:'years_valid'] = opts[:'years_valid'] if !opts[:'years_valid'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/octet-stream']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'RegistrationAzureDownloadCertificateResponseV1' - - # auth_names - auth_names = opts[:debug_auth_names] || ['oauth2'] - - new_options = opts.merge( - :operation => :"D4cRegistration.discover_cloud_azure_download_certificate", - :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, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: D4cRegistration#discover_cloud_azure_download_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Returns information about the current status of an AWS account. # @param [Hash] opts the optional parameters # @option opts [String] :scan_type Type of scan, dry or full, to perform on selected accounts diff --git a/lib/crimson-falcon/api/deployments.rb b/lib/crimson-falcon/api/deployments.rb new file mode 100644 index 00000000..820ee239 --- /dev/null +++ b/lib/crimson-falcon/api/deployments.rb @@ -0,0 +1,115 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class Deployments + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get deployment resources by ids + # @param authorization [String] authorization header + # @param ids [Array] release version ids to retrieve deployment details + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @return [DeploymentsAPIDeploymentViewWrapper] + def get_deployments_external_v1(authorization, ids, opts = {}) + data, _status_code, _headers = get_deployments_external_v1_with_http_info(authorization, ids, opts) + data + end + + # Get deployment resources by ids + # @param authorization [String] authorization header + # @param ids [Array] release version ids to retrieve deployment details + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @return [Array<(DeploymentsAPIDeploymentViewWrapper, Integer, Hash)>] DeploymentsAPIDeploymentViewWrapper data, response status code and response headers + def get_deployments_external_v1_with_http_info(authorization, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Deployments.get_deployments_external_v1 ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling Deployments.get_deployments_external_v1" + 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 Deployments.get_deployments_external_v1" + end + if @api_client.config.client_side_validation && ids.length < 1 + fail ArgumentError, 'invalid value for "ids" when calling Deployments.get_deployments_external_v1, number of items must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/deployment-coordinator/entities/deployments/external/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ids'] = @api_client.build_collection_param(ids, :csv) + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params[:'Authorization'] = authorization + header_params[:'X-CS-USERNAME'] = opts[:'x_cs_username'] if !opts[:'x_cs_username'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DeploymentsAPIDeploymentViewWrapper' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"Deployments.get_deployments_external_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Deployments#get_deployments_external_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/device_content.rb b/lib/crimson-falcon/api/device_content.rb new file mode 100644 index 00000000..d31ed97e --- /dev/null +++ b/lib/crimson-falcon/api/device_content.rb @@ -0,0 +1,176 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class DeviceContent + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve the host content state for a number of ids between 1 and 100. + # @param ids [Array] The ids of the devices to fetch the content state of. + # @param [Hash] opts the optional parameters + # @return [DevicecontentapiEntitiesResponseV1] + def entities_states_v1(ids, opts = {}) + data, _status_code, _headers = entities_states_v1_with_http_info(ids, opts) + data + end + + # Retrieve the host content state for a number of ids between 1 and 100. + # @param ids [Array] The ids of the devices to fetch the content state of. + # @param [Hash] opts the optional parameters + # @return [Array<(DevicecontentapiEntitiesResponseV1, Integer, Hash)>] DevicecontentapiEntitiesResponseV1 data, response status code and response headers + def entities_states_v1_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DeviceContent.entities_states_v1 ...' + 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 DeviceContent.entities_states_v1" + end + # resource path + local_var_path = '/device-content/entities/states/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DevicecontentapiEntitiesResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"DeviceContent.entities_states_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DeviceContent#entities_states_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Query for the content state of the host. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The max number of resource ids to return. (default to 100) + # @option opts [String] :sort What field to sort the results on. (default to 'last_seen.desc') + # @option opts [Integer] :offset The offset token returned from the previous query. If none was returned, there are no more pages to the result set. + # @option opts [String] :filter The FQL search filter + # @return [DevicecontentapiQueryResponseV1] + def queries_states_v1(opts = {}) + data, _status_code, _headers = queries_states_v1_with_http_info(opts) + data + end + + # Query for the content state of the host. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The max number of resource ids to return. (default to 100) + # @option opts [String] :sort What field to sort the results on. (default to 'last_seen.desc') + # @option opts [Integer] :offset The offset token returned from the previous query. If none was returned, there are no more pages to the result set. + # @option opts [String] :filter The FQL search filter + # @return [Array<(DevicecontentapiQueryResponseV1, Integer, Hash)>] DevicecontentapiQueryResponseV1 data, response status code and response headers + def queries_states_v1_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DeviceContent.queries_states_v1 ...' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DeviceContent.queries_states_v1, must be smaller than or equal to 10000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DeviceContent.queries_states_v1, must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/device-content/queries/states/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DevicecontentapiQueryResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"DeviceContent.queries_states_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DeviceContent#queries_states_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/discover.rb b/lib/crimson-falcon/api/discover.rb index c8d82760..b4b40b6f 100644 --- a/lib/crimson-falcon/api/discover.rb +++ b/lib/crimson-falcon/api/discover.rb @@ -448,6 +448,72 @@ def get_logins_with_http_info(ids, opts = {}) return data, status_code, headers end + # Add external assets for external asset scanning. + # @param body [InventoryapiUserExternalAssetCreateRequestV1] Asset addition specification. + # @param [Hash] opts the optional parameters + # @return [InventoryapiUserExternalAssetCreateResponseV1] + def post_external_assets_inventory_v1(body, opts = {}) + data, _status_code, _headers = post_external_assets_inventory_v1_with_http_info(body, opts) + data + end + + # Add external assets for external asset scanning. + # @param body [InventoryapiUserExternalAssetCreateRequestV1] Asset addition specification. + # @param [Hash] opts the optional parameters + # @return [Array<(InventoryapiUserExternalAssetCreateResponseV1, Integer, Hash)>] InventoryapiUserExternalAssetCreateResponseV1 data, response status code and response headers + def post_external_assets_inventory_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Discover.post_external_assets_inventory_v1 ...' + 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 Discover.post_external_assets_inventory_v1" + end + # resource path + local_var_path = '/fem/entities/external-asset-inventory/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 + + # 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] || 'InventoryapiUserExternalAssetCreateResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"Discover.post_external_assets_inventory_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Discover#post_external_assets_inventory_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Search for accounts in your environment by providing an FQL (Falcon Query Language) filter and paging details. Returns a set of account IDs which match the filter criteria. # @param [Hash] opts the optional parameters # @option opts [Integer] :offset An offset used with the `limit` parameter to manage pagination of results. On your first request, don’t provide an `offset`. On subsequent requests, add previous `offset` with the previous `limit` to continue from that place in the results. diff --git a/lib/crimson-falcon/api/drift_indicators.rb b/lib/crimson-falcon/api/drift_indicators.rb index 92ca2da0..89f6d323 100644 --- a/lib/crimson-falcon/api/drift_indicators.rb +++ b/lib/crimson-falcon/api/drift_indicators.rb @@ -38,7 +38,7 @@ def initialize(api_client = ApiClient.default) end # Returns the count of Drift Indicators by the date. by default it's for 7 days. # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter drift indicators using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @return [DriftindicatorsDriftIndicatorsFieldValue] def get_drift_indicators_values_by_date(opts = {}) @@ -48,7 +48,7 @@ def get_drift_indicators_values_by_date(opts = {}) # Returns the count of Drift Indicators by the date. by default it's for 7 days. # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter drift indicators using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @return [Array<(DriftindicatorsDriftIndicatorsFieldValue, Integer, Hash)>] DriftindicatorsDriftIndicatorsFieldValue data, response status code and response headers def get_drift_indicators_values_by_date_with_http_info(opts = {}) @@ -157,7 +157,7 @@ def read_drift_indicator_entities_with_http_info(opts = {}) # Returns the total count of Drift indicators over a time period # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @return [DriftindicatorsDriftIndicatorsCountValue] def read_drift_indicators_count(opts = {}) data, _status_code, _headers = read_drift_indicators_count_with_http_info(opts) @@ -166,7 +166,7 @@ def read_drift_indicators_count(opts = {}) # Returns the total count of Drift indicators over a time period # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @return [Array<(DriftindicatorsDriftIndicatorsCountValue, Integer, Hash)>] DriftindicatorsDriftIndicatorsCountValue data, response status code and response headers def read_drift_indicators_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -213,24 +213,24 @@ def read_drift_indicators_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve Drift Indicators by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [DriftindicatorsDriftEntityResponse] def search_and_read_drift_indicator_entities(opts = {}) data, _status_code, _headers = search_and_read_drift_indicator_entities_with_http_info(opts) data end - # Retrieve Drift Indicators by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(DriftindicatorsDriftEntityResponse, Integer, Hash)>] DriftindicatorsDriftEntityResponse data, response status code and response headers def search_and_read_drift_indicator_entities_with_http_info(opts = {}) if @api_client.config.debugging @@ -242,9 +242,9 @@ def search_and_read_drift_indicator_entities_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -280,24 +280,24 @@ def search_and_read_drift_indicator_entities_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve all drift indicators that match the given query + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [MsaspecQueryResponse] def search_drift_indicators(opts = {}) data, _status_code, _headers = search_drift_indicators_with_http_info(opts) data end - # Retrieve all drift indicators that match the given query + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def search_drift_indicators_with_http_info(opts = {}) if @api_client.config.debugging @@ -309,9 +309,9 @@ def search_drift_indicators_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/crimson-falcon/api/exposure_management.rb b/lib/crimson-falcon/api/exposure_management.rb index 89f3010a..d2fcd537 100644 --- a/lib/crimson-falcon/api/exposure_management.rb +++ b/lib/crimson-falcon/api/exposure_management.rb @@ -250,6 +250,7 @@ def blob_preview_external_assets_with_http_info(asset_id, hash, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :offset Starting index of result set from which to return subsidiaries (default to 0) # @option opts [Integer] :limit The maximum number of subsidiaries to return in the response. (default to 100) + # @option opts [String] :filter Filter ecosystem subsidiaries # @option opts [String] :sort The field by which to sort the list of subsidiaries. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). # @option opts [String] :version_id The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. # @return [DomainFemEcosystemSubsidiariesEntitiesResponse] @@ -262,6 +263,7 @@ def combined_ecosystem_subsidiaries(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :offset Starting index of result set from which to return subsidiaries (default to 0) # @option opts [Integer] :limit The maximum number of subsidiaries to return in the response. (default to 100) + # @option opts [String] :filter Filter ecosystem subsidiaries # @option opts [String] :sort The field by which to sort the list of subsidiaries. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). # @option opts [String] :version_id The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. # @return [Array<(DomainFemEcosystemSubsidiariesEntitiesResponse, Integer, Hash)>] DomainFemEcosystemSubsidiariesEntitiesResponse data, response status code and response headers @@ -276,6 +278,7 @@ def combined_ecosystem_subsidiaries_with_http_info(opts = {}) 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[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'version_id'] = opts[:'version_id'] if !opts[:'version_id'].nil? @@ -583,6 +586,7 @@ def patch_external_assets_with_http_info(body, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :offset Starting index of result set from which to return subsidiaries (default to 0) # @option opts [Integer] :limit The maximum number of IDs to return in the response. (default to 100) + # @option opts [String] :filter Filter ecosystem subsidiaries # @option opts [String] :sort The field by which to sort the list of IDs. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). # @option opts [String] :version_id The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. # @return [DomainFemEcosystemSubsidiariesQueryResponse] @@ -595,6 +599,7 @@ def query_ecosystem_subsidiaries(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Integer] :offset Starting index of result set from which to return subsidiaries (default to 0) # @option opts [Integer] :limit The maximum number of IDs to return in the response. (default to 100) + # @option opts [String] :filter Filter ecosystem subsidiaries # @option opts [String] :sort The field by which to sort the list of IDs. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). # @option opts [String] :version_id The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. # @return [Array<(DomainFemEcosystemSubsidiariesQueryResponse, Integer, Hash)>] DomainFemEcosystemSubsidiariesQueryResponse data, response status code and response headers @@ -609,6 +614,7 @@ def query_ecosystem_subsidiaries_with_http_info(opts = {}) 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[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'version_id'] = opts[:'version_id'] if !opts[:'version_id'].nil? diff --git a/lib/crimson-falcon/api/falcon_container_image.rb b/lib/crimson-falcon/api/falcon_container_image.rb index 357caf28..9491bde7 100644 --- a/lib/crimson-falcon/api/falcon_container_image.rb +++ b/lib/crimson-falcon/api/falcon_container_image.rb @@ -227,7 +227,7 @@ def download_export_file_with_http_info(id, opts = {}) end # Launch an export job of a Container Security resource. Maximum of 1 job in progress per resource - # @param body [ExportsLaunchExportRequest] Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` + # @param body [ExportsLaunchExportRequest] Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-detections-expanded` - `images.images-assessment-expanded` - `images.images-assessment-vulnerabilities-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` # @param [Hash] opts the optional parameters # @return [ExportsLaunchExportResponse] def launch_export_job(body, opts = {}) @@ -236,7 +236,7 @@ def launch_export_job(body, opts = {}) end # Launch an export job of a Container Security resource. Maximum of 1 job in progress per resource - # @param body [ExportsLaunchExportRequest] Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` + # @param body [ExportsLaunchExportRequest] Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-detections-expanded` - `images.images-assessment-expanded` - `images.images-assessment-vulnerabilities-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` # @param [Hash] opts the optional parameters # @return [Array<(ExportsLaunchExportResponse, Integer, Hash)>] ExportsLaunchExportResponse data, response status code and response headers def launch_export_job_with_http_info(body, opts = {}) @@ -294,7 +294,7 @@ def launch_export_job_with_http_info(body, opts = {}) # Query export jobs entities # @param [Hash] opts the optional parameters - # @option opts [String] :filter FQL query specifying the filter parameters. Only the last 100 jobs are returned. Supported filters: - `resource`: (string) - `status`: (string) + # @option opts [String] :filter Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: - `resource` - `status` # @return [MsaspecQueryResponse] def query_export_jobs(opts = {}) data, _status_code, _headers = query_export_jobs_with_http_info(opts) @@ -303,7 +303,7 @@ def query_export_jobs(opts = {}) # Query export jobs entities # @param [Hash] opts the optional parameters - # @option opts [String] :filter FQL query specifying the filter parameters. Only the last 100 jobs are returned. Supported filters: - `resource`: (string) - `status`: (string) + # @option opts [String] :filter Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: - `resource` - `status` # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_export_jobs_with_http_info(opts = {}) if @api_client.config.debugging @@ -412,22 +412,22 @@ def read_export_jobs_with_http_info(ids, opts = {}) return data, status_code, headers end - # Retrieve registry entities identified by the customer id + # Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The field to sort on, e.g. id.desc or id.asc. + # @option opts [String] :sort The fields to sort the records on. # @return [DomainExternalQueryResponse] def read_registry_entities(opts = {}) data, _status_code, _headers = read_registry_entities_with_http_info(opts) data end - # Retrieve registry entities identified by the customer id + # Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The field to sort on, e.g. id.desc or id.asc. + # @option opts [String] :sort The fields to sort the records on. # @return [Array<(DomainExternalQueryResponse, Integer, Hash)>] DomainExternalQueryResponse data, response status code and response headers def read_registry_entities_with_http_info(opts = {}) if @api_client.config.debugging @@ -476,7 +476,7 @@ def read_registry_entities_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve the registry entity identified by the entity UUID + # Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 # @param ids [String] Registry entity UUID # @param [Hash] opts the optional parameters # @return [DomainExternalRegistryListResponse] @@ -485,7 +485,7 @@ def read_registry_entities_by_uuid(ids, opts = {}) data end - # Retrieve the registry entity identified by the entity UUID + # Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 # @param ids [String] Registry entity UUID # @param [Hash] opts the optional parameters # @return [Array<(DomainExternalRegistryListResponse, Integer, Hash)>] DomainExternalRegistryListResponse data, response status code and response headers diff --git a/lib/crimson-falcon/api/falconx_sandbox.rb b/lib/crimson-falcon/api/falconx_sandbox.rb index fbc40f62..b0daf132 100644 --- a/lib/crimson-falcon/api/falconx_sandbox.rb +++ b/lib/crimson-falcon/api/falconx_sandbox.rb @@ -264,7 +264,7 @@ def get_memory_dump_with_http_info(id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) + header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) header_params[:'Accept-Encoding'] = opts[:'accept_encoding'] if !opts[:'accept_encoding'].nil? # form parameters @@ -528,7 +528,7 @@ def get_sample_v2_with_http_info(ids, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) + header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) # form parameters form_params = opts[:form_params] || {} diff --git a/lib/crimson-falcon/api/filevantage.rb b/lib/crimson-falcon/api/filevantage.rb index 96bc63c0..d31ab245 100644 --- a/lib/crimson-falcon/api/filevantage.rb +++ b/lib/crimson-falcon/api/filevantage.rb @@ -41,8 +41,8 @@ def initialize(api_client = ApiClient.default) # @param body [PoliciesCreateRequest] Create a new policy. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `platform` must be one of `Windows`, `Linux`, or `Mac` Rule and host group assignment and policy precedence setting is performed via their respective patch end-points. # @param [Hash] opts the optional parameters # @return [PoliciesResponse] - def create_policies_0(body, opts = {}) - data, _status_code, _headers = create_policies_0_with_http_info(body, opts) + def create_policies(body, opts = {}) + data, _status_code, _headers = create_policies_with_http_info(body, opts) data end @@ -51,13 +51,13 @@ def create_policies_0(body, opts = {}) # @param body [PoliciesCreateRequest] Create a new policy. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `platform` must be one of `Windows`, `Linux`, or `Mac` Rule and host group assignment and policy precedence setting is performed via their respective patch end-points. # @param [Hash] opts the optional parameters # @return [Array<(PoliciesResponse, Integer, Hash)>] PoliciesResponse data, response status code and response headers - def create_policies_0_with_http_info(body, opts = {}) + def create_policies_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Filevantage.create_policies_0 ...' + @api_client.config.logger.debug 'Calling API: Filevantage.create_policies ...' 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 Filevantage.create_policies_0" + fail ArgumentError, "Missing the required parameter 'body' when calling Filevantage.create_policies" end # resource path local_var_path = '/filevantage/entities/policies/v1' @@ -88,7 +88,7 @@ def create_policies_0_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Filevantage.create_policies_0", + :operation => :"Filevantage.create_policies", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -99,7 +99,7 @@ def create_policies_0_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Filevantage#create_policies_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: Filevantage#create_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1633,8 +1633,8 @@ def start_actions_with_http_info(body, opts = {}) # @param body [PoliciesUpdateRequest] Enables updates to the following fields for an existing policy. * `id` of the policy to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `platform` may not be modified after the policy is created. * `enabled` must be one of `true` or `false`. Rule and host group assignment and policy precedence setting is performed via their respective patch end-points. # @param [Hash] opts the optional parameters # @return [PoliciesResponse] - def update_policies_0(body, opts = {}) - data, _status_code, _headers = update_policies_0_with_http_info(body, opts) + def update_policies(body, opts = {}) + data, _status_code, _headers = update_policies_with_http_info(body, opts) data end @@ -1643,13 +1643,13 @@ def update_policies_0(body, opts = {}) # @param body [PoliciesUpdateRequest] Enables updates to the following fields for an existing policy. * `id` of the policy to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `platform` may not be modified after the policy is created. * `enabled` must be one of `true` or `false`. Rule and host group assignment and policy precedence setting is performed via their respective patch end-points. # @param [Hash] opts the optional parameters # @return [Array<(PoliciesResponse, Integer, Hash)>] PoliciesResponse data, response status code and response headers - def update_policies_0_with_http_info(body, opts = {}) + def update_policies_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Filevantage.update_policies_0 ...' + @api_client.config.logger.debug 'Calling API: Filevantage.update_policies ...' 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 Filevantage.update_policies_0" + fail ArgumentError, "Missing the required parameter 'body' when calling Filevantage.update_policies" end # resource path local_var_path = '/filevantage/entities/policies/v1' @@ -1680,7 +1680,7 @@ def update_policies_0_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Filevantage.update_policies_0", + :operation => :"Filevantage.update_policies", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1691,7 +1691,7 @@ def update_policies_0_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Filevantage#update_policies_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: Filevantage#update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1780,8 +1780,8 @@ def update_policy_host_groups_with_http_info(policy_id, action, ids, opts = {}) # @param type [String] The policy type for which to set the precedence order, must be one of `Windows`, `Linux` or `Mac`. # @param [Hash] opts the optional parameters # @return [PoliciesPrecedenceResponse] - def update_policy_precedence_0(ids, type, opts = {}) - data, _status_code, _headers = update_policy_precedence_0_with_http_info(ids, type, opts) + def update_policy_precedence(ids, type, opts = {}) + data, _status_code, _headers = update_policy_precedence_with_http_info(ids, type, opts) data end @@ -1791,17 +1791,17 @@ def update_policy_precedence_0(ids, type, opts = {}) # @param type [String] The policy type for which to set the precedence order, must be one of `Windows`, `Linux` or `Mac`. # @param [Hash] opts the optional parameters # @return [Array<(PoliciesPrecedenceResponse, Integer, Hash)>] PoliciesPrecedenceResponse data, response status code and response headers - def update_policy_precedence_0_with_http_info(ids, type, opts = {}) + def update_policy_precedence_with_http_info(ids, type, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: Filevantage.update_policy_precedence_0 ...' + @api_client.config.logger.debug 'Calling API: Filevantage.update_policy_precedence ...' 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 Filevantage.update_policy_precedence_0" + fail ArgumentError, "Missing the required parameter 'ids' when calling Filevantage.update_policy_precedence" end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? - fail ArgumentError, "Missing the required parameter 'type' when calling Filevantage.update_policy_precedence_0" + fail ArgumentError, "Missing the required parameter 'type' when calling Filevantage.update_policy_precedence" end # resource path local_var_path = '/filevantage/entities/policies-precedence/v1' @@ -1829,7 +1829,7 @@ def update_policy_precedence_0_with_http_info(ids, type, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"Filevantage.update_policy_precedence_0", + :operation => :"Filevantage.update_policy_precedence", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1840,7 +1840,7 @@ def update_policy_precedence_0_with_http_info(ids, type, opts = {}) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: Filevantage#update_policy_precedence_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: Filevantage#update_policy_precedence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/firewall_management.rb b/lib/crimson-falcon/api/firewall_management.rb index 0114d310..abb6edab 100644 --- a/lib/crimson-falcon/api/firewall_management.rb +++ b/lib/crimson-falcon/api/firewall_management.rb @@ -592,8 +592,8 @@ def delete_network_locations_with_http_info(ids, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :comment Audit log comment for this action # @return [FwmgrApiQueryResponse] - def delete_rule_groups_0(ids, opts = {}) - data, _status_code, _headers = delete_rule_groups_0_with_http_info(ids, opts) + def delete_rule_groups(ids, opts = {}) + data, _status_code, _headers = delete_rule_groups_with_http_info(ids, opts) data end @@ -602,13 +602,13 @@ def delete_rule_groups_0(ids, opts = {}) # @param [Hash] opts the optional parameters # @option opts [String] :comment Audit log comment for this action # @return [Array<(FwmgrApiQueryResponse, Integer, Hash)>] FwmgrApiQueryResponse data, response status code and response headers - def delete_rule_groups_0_with_http_info(ids, opts = {}) + def delete_rule_groups_with_http_info(ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FirewallManagement.delete_rule_groups_0 ...' + @api_client.config.logger.debug 'Calling API: FirewallManagement.delete_rule_groups ...' 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 FirewallManagement.delete_rule_groups_0" + fail ArgumentError, "Missing the required parameter 'ids' when calling FirewallManagement.delete_rule_groups" end # resource path local_var_path = '/fwmgr/entities/rule-groups/v1' @@ -636,7 +636,7 @@ def delete_rule_groups_0_with_http_info(ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"FirewallManagement.delete_rule_groups_0", + :operation => :"FirewallManagement.delete_rule_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -647,7 +647,7 @@ def delete_rule_groups_0_with_http_info(ids, opts = {}) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FirewallManagement#delete_rule_groups_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FirewallManagement#delete_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1032,8 +1032,8 @@ def get_policy_containers_with_http_info(ids, opts = {}) # @param ids [Array] The IDs of the rule groups to retrieve # @param [Hash] opts the optional parameters # @return [FwmgrApiRuleGroupsResponse] - def get_rule_groups_0(ids, opts = {}) - data, _status_code, _headers = get_rule_groups_0_with_http_info(ids, opts) + def get_rule_groups(ids, opts = {}) + data, _status_code, _headers = get_rule_groups_with_http_info(ids, opts) data end @@ -1041,13 +1041,13 @@ def get_rule_groups_0(ids, opts = {}) # @param ids [Array] The IDs of the rule groups to retrieve # @param [Hash] opts the optional parameters # @return [Array<(FwmgrApiRuleGroupsResponse, Integer, Hash)>] FwmgrApiRuleGroupsResponse data, response status code and response headers - def get_rule_groups_0_with_http_info(ids, opts = {}) + def get_rule_groups_with_http_info(ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FirewallManagement.get_rule_groups_0 ...' + @api_client.config.logger.debug 'Calling API: FirewallManagement.get_rule_groups ...' 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 FirewallManagement.get_rule_groups_0" + fail ArgumentError, "Missing the required parameter 'ids' when calling FirewallManagement.get_rule_groups" end # resource path local_var_path = '/fwmgr/entities/rule-groups/v1' @@ -1074,7 +1074,7 @@ def get_rule_groups_0_with_http_info(ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"FirewallManagement.get_rule_groups_0", + :operation => :"FirewallManagement.get_rule_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1085,7 +1085,7 @@ def get_rule_groups_0_with_http_info(ids, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FirewallManagement#get_rule_groups_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FirewallManagement#get_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1094,8 +1094,8 @@ def get_rule_groups_0_with_http_info(ids, opts = {}) # @param ids [Array] The rules to retrieve, identified by ID # @param [Hash] opts the optional parameters # @return [FwmgrApiRulesResponse] - def get_rules_0(ids, opts = {}) - data, _status_code, _headers = get_rules_0_with_http_info(ids, opts) + def get_rules(ids, opts = {}) + data, _status_code, _headers = get_rules_with_http_info(ids, opts) data end @@ -1103,13 +1103,13 @@ def get_rules_0(ids, opts = {}) # @param ids [Array] The rules to retrieve, identified by ID # @param [Hash] opts the optional parameters # @return [Array<(FwmgrApiRulesResponse, Integer, Hash)>] FwmgrApiRulesResponse data, response status code and response headers - def get_rules_0_with_http_info(ids, opts = {}) + def get_rules_with_http_info(ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FirewallManagement.get_rules_0 ...' + @api_client.config.logger.debug 'Calling API: FirewallManagement.get_rules ...' 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 FirewallManagement.get_rules_0" + fail ArgumentError, "Missing the required parameter 'ids' when calling FirewallManagement.get_rules" end # resource path local_var_path = '/fwmgr/entities/rules/v1' @@ -1136,7 +1136,7 @@ def get_rules_0_with_http_info(ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"FirewallManagement.get_rules_0", + :operation => :"FirewallManagement.get_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1147,7 +1147,7 @@ def get_rules_0_with_http_info(ids, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FirewallManagement#get_rules_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FirewallManagement#get_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -1507,8 +1507,8 @@ def query_policy_rules_with_http_info(opts = {}) # @option opts [String] :after A pagination token used with the `limit` parameter to manage pagination of results. On your first request, don't provide an `after` token. On subsequent requests, provide the `after` token from the previous response to continue from that place in the results. # @option opts [Integer] :limit Number of ids to return. # @return [FwmgrApiQueryResponse] - def query_rule_groups_0(opts = {}) - data, _status_code, _headers = query_rule_groups_0_with_http_info(opts) + def query_rule_groups(opts = {}) + data, _status_code, _headers = query_rule_groups_with_http_info(opts) data end @@ -1521,9 +1521,9 @@ def query_rule_groups_0(opts = {}) # @option opts [String] :after A pagination token used with the `limit` parameter to manage pagination of results. On your first request, don't provide an `after` token. On subsequent requests, provide the `after` token from the previous response to continue from that place in the results. # @option opts [Integer] :limit Number of ids to return. # @return [Array<(FwmgrApiQueryResponse, Integer, Hash)>] FwmgrApiQueryResponse data, response status code and response headers - def query_rule_groups_0_with_http_info(opts = {}) + def query_rule_groups_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FirewallManagement.query_rule_groups_0 ...' + @api_client.config.logger.debug 'Calling API: FirewallManagement.query_rule_groups ...' end # resource path local_var_path = '/fwmgr/queries/rule-groups/v1' @@ -1555,7 +1555,7 @@ def query_rule_groups_0_with_http_info(opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"FirewallManagement.query_rule_groups_0", + :operation => :"FirewallManagement.query_rule_groups", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1566,7 +1566,7 @@ def query_rule_groups_0_with_http_info(opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FirewallManagement#query_rule_groups_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FirewallManagement#query_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/foundry_logscale.rb b/lib/crimson-falcon/api/foundry_logscale.rb index 096a1fa2..805ee803 100644 --- a/lib/crimson-falcon/api/foundry_logscale.rb +++ b/lib/crimson-falcon/api/foundry_logscale.rb @@ -73,7 +73,7 @@ def create_saved_searches_dynamic_execute_alt_v1_with_http_info(body, opts = {}) if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FoundryLogscale.create_saved_searches_dynamic_execute_alt_v1" end - allowable_values = ["sync", "async"] + allowable_values = ["sync", "async", "async_offload"] if @api_client.config.client_side_validation && opts[:'mode'] && !allowable_values.include?(opts[:'mode']) fail ArgumentError, "invalid value for \"mode\", must be one of #{allowable_values}" end @@ -175,7 +175,7 @@ def create_saved_searches_dynamic_execute_v1_with_http_info(body, opts = {}) if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling FoundryLogscale.create_saved_searches_dynamic_execute_v1" end - allowable_values = ["sync", "async"] + allowable_values = ["sync", "async", "async_offload"] if @api_client.config.client_side_validation && opts[:'mode'] && !allowable_values.include?(opts[:'mode']) fail ArgumentError, "invalid value for \"mode\", must be one of #{allowable_values}" end diff --git a/lib/crimson-falcon/api/host_migration.rb b/lib/crimson-falcon/api/host_migration.rb index 9956a146..43cc73bf 100644 --- a/lib/crimson-falcon/api/host_migration.rb +++ b/lib/crimson-falcon/api/host_migration.rb @@ -111,7 +111,7 @@ def create_migration_v1_with_http_info(body, opts = {}) # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [Integer] :limit The maximum records to return. [1-10000] # @option opts [String] :sort The property to sort by. - # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: hostname, status, source_cid, id, created_time, groups, hostgroups, static_host_groups, target_cid, migration_id, host_migration_id + # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: groups, static_host_groups, status, target_cid, migration_id, created_time, host_migration_id, hostgroups, hostname, source_cid, id # @return [MsaspecQueryResponse] def get_host_migration_ids_v1(id, opts = {}) data, _status_code, _headers = get_host_migration_ids_v1_with_http_info(id, opts) @@ -125,7 +125,7 @@ def get_host_migration_ids_v1(id, opts = {}) # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [Integer] :limit The maximum records to return. [1-10000] # @option opts [String] :sort The property to sort by. - # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: hostname, status, source_cid, id, created_time, groups, hostgroups, static_host_groups, target_cid, migration_id, host_migration_id + # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: groups, static_host_groups, status, target_cid, migration_id, created_time, host_migration_id, hostgroups, hostname, source_cid, id # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def get_host_migration_ids_v1_with_http_info(id, opts = {}) if @api_client.config.debugging @@ -135,7 +135,7 @@ def get_host_migration_ids_v1_with_http_info(id, opts = {}) if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling HostMigration.get_host_migration_ids_v1" end - allowable_values = ["migration_id|asc", "migration_id|desc", "migration_id", "host_migration_id|asc", "host_migration_id|desc", "host_migration_id", "target_cid|asc", "target_cid|desc", "target_cid", "hostgroups|asc", "hostgroups|desc", "hostgroups", "static_host_groups|asc", "static_host_groups|desc", "static_host_groups", "hostname|asc", "hostname|desc", "hostname", "status|asc", "status|desc", "status", "source_cid|asc", "source_cid|desc", "source_cid", "id|asc", "id|desc", "id", "created_time|asc", "created_time|desc", "created_time", "groups|asc", "groups|desc", "groups"] + allowable_values = ["groups|asc", "groups|desc", "groups", "static_host_groups|asc", "static_host_groups|desc", "static_host_groups", "status|asc", "status|desc", "status", "target_cid|asc", "target_cid|desc", "target_cid", "migration_id|asc", "migration_id|desc", "migration_id", "created_time|asc", "created_time|desc", "created_time", "host_migration_id|asc", "host_migration_id|desc", "host_migration_id", "hostgroups|asc", "hostgroups|desc", "hostgroups", "hostname|asc", "hostname|desc", "hostname", "source_cid|asc", "source_cid|desc", "source_cid", "id|asc", "id|desc", "id"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end @@ -325,7 +325,7 @@ def get_migration_destinations_v1_with_http_info(body, opts = {}) # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [Integer] :limit The maximum records to return. [1-10000] # @option opts [String] :sort The property to sort by. - # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: status, migration_status, created_by, created_time, name, id, migration_id, target_cid + # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: target_cid, status, migration_status, created_by, created_time, name, id, migration_id # @return [MsaspecQueryResponse] def get_migration_ids_v1(opts = {}) data, _status_code, _headers = get_migration_ids_v1_with_http_info(opts) @@ -337,13 +337,13 @@ def get_migration_ids_v1(opts = {}) # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [Integer] :limit The maximum records to return. [1-10000] # @option opts [String] :sort The property to sort by. - # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: status, migration_status, created_by, created_time, name, id, migration_id, target_cid + # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: target_cid, status, migration_status, created_by, created_time, name, id, migration_id # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def get_migration_ids_v1_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: HostMigration.get_migration_ids_v1 ...' end - allowable_values = ["migration_id|asc", "migration_id|desc", "migration_id", "target_cid|asc", "target_cid|desc", "target_cid", "status|asc", "status|desc", "status", "migration_status|asc", "migration_status|desc", "migration_status", "created_by|asc", "created_by|desc", "created_by", "created_time|asc", "created_time|desc", "created_time", "name|asc", "name|desc", "name", "id|asc", "id|desc", "id"] + allowable_values = ["name|asc", "name|desc", "name", "id|asc", "id|desc", "id", "migration_id|asc", "migration_id|desc", "migration_id", "target_cid|asc", "target_cid|desc", "target_cid", "status|asc", "status|desc", "status", "migration_status|asc", "migration_status|desc", "migration_status", "created_by|asc", "created_by|desc", "created_by", "created_time|asc", "created_time|desc", "created_time"] if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" end diff --git a/lib/crimson-falcon/api/intelligence_indicator_graph.rb b/lib/crimson-falcon/api/intelligence_indicator_graph.rb new file mode 100644 index 00000000..88c37757 --- /dev/null +++ b/lib/crimson-falcon/api/intelligence_indicator_graph.rb @@ -0,0 +1,118 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class IntelligenceIndicatorGraph + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Search indicators based on FQL filter. + # @param x_cs_useruuid [String] User ID. + # @param body [RestapiIndicatorsQueryRequest] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Limit + # @option opts [String] :offset Offset + # @return [RestapiIndicatorResponse] + def search_indicators(x_cs_useruuid, body, opts = {}) + data, _status_code, _headers = search_indicators_with_http_info(x_cs_useruuid, body, opts) + data + end + + # Search indicators based on FQL filter. + # @param x_cs_useruuid [String] User ID. + # @param body [RestapiIndicatorsQueryRequest] + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Limit + # @option opts [String] :offset Offset + # @return [Array<(RestapiIndicatorResponse, Integer, Hash)>] RestapiIndicatorResponse data, response status code and response headers + def search_indicators_with_http_info(x_cs_useruuid, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IntelligenceIndicatorGraph.search_indicators ...' + end + # verify the required parameter 'x_cs_useruuid' is set + if @api_client.config.client_side_validation && x_cs_useruuid.nil? + fail ArgumentError, "Missing the required parameter 'x_cs_useruuid' when calling IntelligenceIndicatorGraph.search_indicators" + 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 IntelligenceIndicatorGraph.search_indicators" + end + # resource path + local_var_path = '/intelligence/combined/indicators/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + + # 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'] = x_cs_useruuid + + # 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] || 'RestapiIndicatorResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"IntelligenceIndicatorGraph.search_indicators", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IntelligenceIndicatorGraph#search_indicators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/kubernetes_protection.rb b/lib/crimson-falcon/api/kubernetes_protection.rb index 646497c0..85d6d261 100644 --- a/lib/crimson-falcon/api/kubernetes_protection.rb +++ b/lib/crimson-falcon/api/kubernetes_protection.rb @@ -288,24 +288,24 @@ def delete_azure_subscription_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve containers by container_runtime_version + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The upper-bound on the number of container records to retrieve. - # @option opts [Integer] :offset It is used to get the offset - # @option opts [String] :sort Field to sort results by - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) + # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsContainerRuntimePivotResponse] def find_containers_by_container_run_time_version(opts = {}) data, _status_code, _headers = find_containers_by_container_run_time_version_with_http_info(opts) data end - # Retrieve containers by container_runtime_version + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The upper-bound on the number of container records to retrieve. - # @option opts [Integer] :offset It is used to get the offset - # @option opts [String] :sort Field to sort results by - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) + # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsContainerRuntimePivotResponse, Integer, Hash)>] ModelsContainerRuntimePivotResponse data, response status code and response headers def find_containers_by_container_run_time_version_with_http_info(opts = {}) if @api_client.config.debugging @@ -1116,7 +1116,7 @@ def get_static_scripts_with_http_info(opts = {}) # Group the containers by Managed # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsContainerCoverageResponseEntity] def group_containers_by_managed(opts = {}) data, _status_code, _headers = group_containers_by_managed_with_http_info(opts) @@ -1125,7 +1125,7 @@ def group_containers_by_managed(opts = {}) # Group the containers by Managed # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsContainerCoverageResponseEntity, Integer, Hash)>] ModelsContainerCoverageResponseEntity data, response status code and response headers def group_containers_by_managed_with_http_info(opts = {}) if @api_client.config.debugging @@ -1370,24 +1370,24 @@ def patch_azure_service_principal_with_http_info(id, client_id, opts = {}) return data, status_code, headers end - # Retrieve kubernetes clusters identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsClusterEntityResponse] def read_cluster_combined(opts = {}) data, _status_code, _headers = read_cluster_combined_with_http_info(opts) data end - # Retrieve kubernetes clusters identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [Array<(ModelsClusterEntityResponse, Integer, Hash)>] ModelsClusterEntityResponse data, response status code and response headers def read_cluster_combined_with_http_info(opts = {}) if @api_client.config.debugging @@ -1399,9 +1399,9 @@ def read_cluster_combined_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1439,7 +1439,7 @@ def read_cluster_combined_with_http_info(opts = {}) # Retrieve cluster counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [CommonCountResponse] def read_cluster_count(opts = {}) data, _status_code, _headers = read_cluster_count_with_http_info(opts) @@ -1448,7 +1448,7 @@ def read_cluster_count(opts = {}) # Retrieve cluster counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers def read_cluster_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -1498,7 +1498,7 @@ def read_cluster_count_with_http_info(opts = {}) # Retrieve cluster enrichment data # @param cluster_id [Array] One or more cluster ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsClusterEnrichmentResponse] def read_cluster_enrichment(cluster_id, opts = {}) data, _status_code, _headers = read_cluster_enrichment_with_http_info(cluster_id, opts) @@ -1508,7 +1508,7 @@ def read_cluster_enrichment(cluster_id, opts = {}) # Retrieve cluster enrichment data # @param cluster_id [Array] One or more cluster ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [Array<(K8sassetsClusterEnrichmentResponse, Integer, Hash)>] K8sassetsClusterEnrichmentResponse data, response status code and response headers def read_cluster_enrichment_with_http_info(cluster_id, opts = {}) if @api_client.config.debugging @@ -1617,7 +1617,7 @@ def read_clusters_by_date_range_count_with_http_info(opts = {}) # Bucket clusters by kubernetes version # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [ModelsAggregateValuesByFieldResponse] def read_clusters_by_kubernetes_version_count(opts = {}) data, _status_code, _headers = read_clusters_by_kubernetes_version_count_with_http_info(opts) @@ -1626,7 +1626,7 @@ def read_clusters_by_kubernetes_version_count(opts = {}) # Bucket clusters by kubernetes version # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_clusters_by_kubernetes_version_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -1675,7 +1675,7 @@ def read_clusters_by_kubernetes_version_count_with_http_info(opts = {}) # Bucket clusters by status # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [ModelsAggregateValuesByFieldResponse] def read_clusters_by_status_count(opts = {}) data, _status_code, _headers = read_clusters_by_status_count_with_http_info(opts) @@ -1684,7 +1684,7 @@ def read_clusters_by_status_count(opts = {}) # Bucket clusters by status # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_clusters_by_status_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -1731,24 +1731,24 @@ def read_clusters_by_status_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve containers identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsContainerEntityResponse] def read_container_combined(opts = {}) data, _status_code, _headers = read_container_combined_with_http_info(opts) data end - # Retrieve containers identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [Array<(ModelsContainerEntityResponse, Integer, Hash)>] ModelsContainerEntityResponse data, response status code and response headers def read_container_combined_with_http_info(opts = {}) if @api_client.config.debugging @@ -1760,9 +1760,9 @@ def read_container_combined_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1800,7 +1800,7 @@ def read_container_combined_with_http_info(opts = {}) # Retrieve container counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [CommonCountResponse] def read_container_count(opts = {}) data, _status_code, _headers = read_container_count_with_http_info(opts) @@ -1809,7 +1809,7 @@ def read_container_count(opts = {}) # Retrieve container counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers def read_container_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -1856,9 +1856,9 @@ def read_container_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve top container image registries + # Retrieves a list with the top container image registries. Maximum page size: 200 # @param [Hash] opts the optional parameters - # @option opts [Boolean] :under_assessment (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered + # @option opts [Boolean] :under_assessment (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered (default to false) # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @return [ModelsAPIFilterResponse] def read_container_count_by_registry(opts = {}) @@ -1866,9 +1866,9 @@ def read_container_count_by_registry(opts = {}) data end - # Retrieve top container image registries + # Retrieves a list with the top container image registries. Maximum page size: 200 # @param [Hash] opts the optional parameters - # @option opts [Boolean] :under_assessment (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered + # @option opts [Boolean] :under_assessment (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered (default to false) # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @return [Array<(ModelsAPIFilterResponse, Integer, Hash)>] ModelsAPIFilterResponse data, response status code and response headers def read_container_count_by_registry_with_http_info(opts = {}) @@ -1920,7 +1920,7 @@ def read_container_count_by_registry_with_http_info(opts = {}) # Retrieve container enrichment data # @param container_id [Array] One or more container ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsContainerEnrichmentResponse] def read_container_enrichment(container_id, opts = {}) data, _status_code, _headers = read_container_enrichment_with_http_info(container_id, opts) @@ -1930,7 +1930,7 @@ def read_container_enrichment(container_id, opts = {}) # Retrieve container enrichment data # @param container_id [Array] One or more container ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [Array<(K8sassetsContainerEnrichmentResponse, Integer, Hash)>] K8sassetsContainerEnrichmentResponse data, response status code and response headers def read_container_enrichment_with_http_info(container_id, opts = {}) if @api_client.config.debugging @@ -1984,7 +1984,7 @@ def read_container_enrichment_with_http_info(container_id, opts = {}) # Retrieve count of image assessment detections on running containers over a period of time # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAPIFilterResponse] def read_container_image_detections_count_by_date(opts = {}) data, _status_code, _headers = read_container_image_detections_count_by_date_with_http_info(opts) @@ -1993,7 +1993,7 @@ def read_container_image_detections_count_by_date(opts = {}) # Retrieve count of image assessment detections on running containers over a period of time # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsAPIFilterResponse, Integer, Hash)>] ModelsAPIFilterResponse data, response status code and response headers def read_container_image_detections_count_by_date_with_http_info(opts = {}) if @api_client.config.debugging @@ -2042,7 +2042,7 @@ def read_container_image_detections_count_by_date_with_http_info(opts = {}) # Bucket container by image-digest # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] def read_container_images_by_most_used(opts = {}) data, _status_code, _headers = read_container_images_by_most_used_with_http_info(opts) @@ -2051,7 +2051,7 @@ def read_container_images_by_most_used(opts = {}) # Bucket container by image-digest # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_container_images_by_most_used_with_http_info(opts = {}) if @api_client.config.debugging @@ -2100,7 +2100,7 @@ def read_container_images_by_most_used_with_http_info(opts = {}) # Retrieve count of image states running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filters: cid + # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` # @return [ModelsAPIFilterResponse] def read_container_images_by_state(opts = {}) data, _status_code, _headers = read_container_images_by_state_with_http_info(opts) @@ -2109,7 +2109,7 @@ def read_container_images_by_state(opts = {}) # Retrieve count of image states running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filters: cid + # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` # @return [Array<(ModelsAPIFilterResponse, Integer, Hash)>] ModelsAPIFilterResponse data, response status code and response headers def read_container_images_by_state_with_http_info(opts = {}) if @api_client.config.debugging @@ -2158,7 +2158,7 @@ def read_container_images_by_state_with_http_info(opts = {}) # Retrieve container vulnerabilities by severity counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] def read_container_vulnerabilities_by_severity_count(opts = {}) data, _status_code, _headers = read_container_vulnerabilities_by_severity_count_with_http_info(opts) @@ -2167,7 +2167,7 @@ def read_container_vulnerabilities_by_severity_count(opts = {}) # Retrieve container vulnerabilities by severity counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_container_vulnerabilities_by_severity_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -2216,7 +2216,7 @@ def read_container_vulnerabilities_by_severity_count_with_http_info(opts = {}) # Retrieve containers by date range counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Get container counts using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Get container counts using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] def read_containers_by_date_range_count(opts = {}) data, _status_code, _headers = read_containers_by_date_range_count_with_http_info(opts) @@ -2225,7 +2225,7 @@ def read_containers_by_date_range_count(opts = {}) # Retrieve containers by date range counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Get container counts using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Get container counts using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_containers_by_date_range_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -2274,7 +2274,7 @@ def read_containers_by_date_range_count_with_http_info(opts = {}) # Bucket containers by agent type and calculate sensor coverage # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] def read_containers_sensor_coverage(opts = {}) data, _status_code, _headers = read_containers_sensor_coverage_with_http_info(opts) @@ -2283,7 +2283,7 @@ def read_containers_sensor_coverage(opts = {}) # Bucket containers by agent type and calculate sensor coverage # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_containers_sensor_coverage_with_http_info(opts = {}) if @api_client.config.debugging @@ -2330,24 +2330,24 @@ def read_containers_sensor_coverage_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve kubernetes deployments identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsDeploymentEntityResponse] def read_deployment_combined(opts = {}) data, _status_code, _headers = read_deployment_combined_with_http_info(opts) data end - # Retrieve kubernetes deployments identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [Array<(ModelsDeploymentEntityResponse, Integer, Hash)>] ModelsDeploymentEntityResponse data, response status code and response headers def read_deployment_combined_with_http_info(opts = {}) if @api_client.config.debugging @@ -2359,9 +2359,9 @@ def read_deployment_combined_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -2399,7 +2399,7 @@ def read_deployment_combined_with_http_info(opts = {}) # Retrieve deployment counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` # @return [CommonCountResponse] def read_deployment_count(opts = {}) data, _status_code, _headers = read_deployment_count_with_http_info(opts) @@ -2408,7 +2408,7 @@ def read_deployment_count(opts = {}) # Retrieve deployment counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers def read_deployment_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -2458,7 +2458,7 @@ def read_deployment_count_with_http_info(opts = {}) # Retrieve deployment enrichment data # @param deployment_id [Array] One or more deployment ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsDeploymentEnrichmentResponse] def read_deployment_enrichment(deployment_id, opts = {}) data, _status_code, _headers = read_deployment_enrichment_with_http_info(deployment_id, opts) @@ -2468,7 +2468,7 @@ def read_deployment_enrichment(deployment_id, opts = {}) # Retrieve deployment enrichment data # @param deployment_id [Array] One or more deployment ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [Array<(K8sassetsDeploymentEnrichmentResponse, Integer, Hash)>] K8sassetsDeploymentEnrichmentResponse data, response status code and response headers def read_deployment_enrichment_with_http_info(deployment_id, opts = {}) if @api_client.config.debugging @@ -2577,7 +2577,7 @@ def read_deployments_by_date_range_count_with_http_info(opts = {}) # Retrieve count of distinct images running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAPIFilterResponse] def read_distinct_container_image_count(opts = {}) data, _status_code, _headers = read_distinct_container_image_count_with_http_info(opts) @@ -2586,7 +2586,7 @@ def read_distinct_container_image_count(opts = {}) # Retrieve count of distinct images running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsAPIFilterResponse, Integer, Hash)>] ModelsAPIFilterResponse data, response status code and response headers def read_distinct_container_image_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -2635,7 +2635,7 @@ def read_distinct_container_image_count_with_http_info(opts = {}) # Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + # @option opts [String] :filter Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` # @return [K8siomsKubernetesIOMFieldValue] def read_kubernetes_iom_by_date_range(opts = {}) data, _status_code, _headers = read_kubernetes_iom_by_date_range_with_http_info(opts) @@ -2644,7 +2644,7 @@ def read_kubernetes_iom_by_date_range(opts = {}) # Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + # @option opts [String] :filter Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` # @return [Array<(K8siomsKubernetesIOMFieldValue, Integer, Hash)>] K8siomsKubernetesIOMFieldValue data, response status code and response headers def read_kubernetes_iom_by_date_range_with_http_info(opts = {}) if @api_client.config.debugging @@ -2693,7 +2693,7 @@ def read_kubernetes_iom_by_date_range_with_http_info(opts = {}) # Returns the total count of Kubernetes IOMs over the past seven days # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + # @option opts [String] :filter Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` # @return [K8siomsKubernetesIOMCountValue] def read_kubernetes_iom_count(opts = {}) data, _status_code, _headers = read_kubernetes_iom_count_with_http_info(opts) @@ -2702,7 +2702,7 @@ def read_kubernetes_iom_count(opts = {}) # Returns the total count of Kubernetes IOMs over the past seven days # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + # @option opts [String] :filter Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` # @return [Array<(K8siomsKubernetesIOMCountValue, Integer, Hash)>] K8siomsKubernetesIOMCountValue data, response status code and response headers def read_kubernetes_iom_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -2809,7 +2809,7 @@ def read_kubernetes_iom_entities_with_http_info(opts = {}) # Retrieve namespace counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,first_seen,kac_agent_id,last_seen,namespace_id,namespace_name,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace_id` - `namespace_name` - `resource_status` # @return [CommonCountResponse] def read_namespace_count(opts = {}) data, _status_code, _headers = read_namespace_count_with_http_info(opts) @@ -2818,7 +2818,7 @@ def read_namespace_count(opts = {}) # Retrieve namespace counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,first_seen,kac_agent_id,last_seen,namespace_id,namespace_name,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace_id` - `namespace_name` - `resource_status` # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers def read_namespace_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -2920,24 +2920,24 @@ def read_namespaces_by_date_range_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve kubernetes nodes identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsNodeEntityResponse] def read_node_combined(opts = {}) data, _status_code, _headers = read_node_combined_with_http_info(opts) data end - # Retrieve kubernetes nodes identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [Array<(ModelsNodeEntityResponse, Integer, Hash)>] ModelsNodeEntityResponse data, response status code and response headers def read_node_combined_with_http_info(opts = {}) if @api_client.config.debugging @@ -2949,9 +2949,9 @@ def read_node_combined_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -2989,7 +2989,7 @@ def read_node_combined_with_http_info(opts = {}) # Retrieve node counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [CommonCountResponse] def read_node_count(opts = {}) data, _status_code, _headers = read_node_count_with_http_info(opts) @@ -2998,7 +2998,7 @@ def read_node_count(opts = {}) # Retrieve node counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers def read_node_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -3048,7 +3048,7 @@ def read_node_count_with_http_info(opts = {}) # Retrieve node enrichment data # @param node_name [Array] One or more node names for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsNodeEnrichmentResponse] def read_node_enrichment(node_name, opts = {}) data, _status_code, _headers = read_node_enrichment_with_http_info(node_name, opts) @@ -3058,7 +3058,7 @@ def read_node_enrichment(node_name, opts = {}) # Retrieve node enrichment data # @param node_name [Array] One or more node names for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [Array<(K8sassetsNodeEnrichmentResponse, Integer, Hash)>] K8sassetsNodeEnrichmentResponse data, response status code and response headers def read_node_enrichment_with_http_info(node_name, opts = {}) if @api_client.config.debugging @@ -3112,7 +3112,7 @@ def read_node_enrichment_with_http_info(node_name, opts = {}) # Bucket nodes by cloud providers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [ModelsAggregateValuesByFieldResponse] def read_nodes_by_cloud_count(opts = {}) data, _status_code, _headers = read_nodes_by_cloud_count_with_http_info(opts) @@ -3121,7 +3121,7 @@ def read_nodes_by_cloud_count(opts = {}) # Bucket nodes by cloud providers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_nodes_by_cloud_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -3170,7 +3170,7 @@ def read_nodes_by_cloud_count_with_http_info(opts = {}) # Bucket nodes by their container engine version # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [ModelsAggregateValuesByFieldResponse] def read_nodes_by_container_engine_version_count(opts = {}) data, _status_code, _headers = read_nodes_by_container_engine_version_count_with_http_info(opts) @@ -3179,7 +3179,7 @@ def read_nodes_by_container_engine_version_count(opts = {}) # Bucket nodes by their container engine version # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_nodes_by_container_engine_version_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -3228,7 +3228,7 @@ def read_nodes_by_container_engine_version_count_with_http_info(opts = {}) # Retrieve nodes by date range counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [ModelsAggregateValuesByFieldResponse] def read_nodes_by_date_range_count(opts = {}) data, _status_code, _headers = read_nodes_by_date_range_count_with_http_info(opts) @@ -3237,7 +3237,7 @@ def read_nodes_by_date_range_count(opts = {}) # Retrieve nodes by date range counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_nodes_by_date_range_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -3284,24 +3284,24 @@ def read_nodes_by_date_range_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve kubernetes pods identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsPodEntityResponse] def read_pod_combined(opts = {}) data, _status_code, _headers = read_pod_combined_with_http_info(opts) data end - # Retrieve kubernetes pods identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [Array<(ModelsPodEntityResponse, Integer, Hash)>] ModelsPodEntityResponse data, response status code and response headers def read_pod_combined_with_http_info(opts = {}) if @api_client.config.debugging @@ -3313,9 +3313,9 @@ def read_pod_combined_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3353,7 +3353,7 @@ def read_pod_combined_with_http_info(opts = {}) # Retrieve pod counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user + # @option opts [String] :filter Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` # @return [CommonCountResponse] def read_pod_count(opts = {}) data, _status_code, _headers = read_pod_count_with_http_info(opts) @@ -3362,7 +3362,7 @@ def read_pod_count(opts = {}) # Retrieve pod counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user + # @option opts [String] :filter Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers def read_pod_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -3412,7 +3412,7 @@ def read_pod_count_with_http_info(opts = {}) # Retrieve pod enrichment data # @param pod_id [Array] One or more pod ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsPodEnrichmentResponse] def read_pod_enrichment(pod_id, opts = {}) data, _status_code, _headers = read_pod_enrichment_with_http_info(pod_id, opts) @@ -3422,7 +3422,7 @@ def read_pod_enrichment(pod_id, opts = {}) # Retrieve pod enrichment data # @param pod_id [Array] One or more pod ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [Array<(K8sassetsPodEnrichmentResponse, Integer, Hash)>] K8sassetsPodEnrichmentResponse data, response status code and response headers def read_pod_enrichment_with_http_info(pod_id, opts = {}) if @api_client.config.debugging @@ -3529,24 +3529,24 @@ def read_pods_by_date_range_count_with_http_info(opts = {}) return data, status_code, headers end - # Retrieve images on running containers + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filters: cid,cluster_id,cluster_name,hosts,image_digest,image_has_been_assessed,image_id,image_name,image_registry,image_repository,image_tag,last_seen,running_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cluster_id` - `cluster_name` - `hosts` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_name` - `image_registry` - `image_repository` - `image_tag` - `last_seen` - `running_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsContainerImage] def read_running_container_images(opts = {}) data, _status_code, _headers = read_running_container_images_with_http_info(opts) data end - # Retrieve images on running containers + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filters: cid,cluster_id,cluster_name,hosts,image_digest,image_has_been_assessed,image_id,image_name,image_registry,image_repository,image_tag,last_seen,running_status - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cluster_id` - `cluster_name` - `hosts` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_name` - `image_registry` - `image_repository` - `image_tag` - `last_seen` - `running_status` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 200) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [Array<(ModelsContainerImage, Integer, Hash)>] ModelsContainerImage data, response status code and response headers def read_running_container_images_with_http_info(opts = {}) if @api_client.config.debugging @@ -3558,9 +3558,9 @@ def read_running_container_images_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3598,7 +3598,7 @@ def read_running_container_images_with_http_info(opts = {}) # Retrieve count of vulnerable images running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAPIFilterResponse] def read_vulnerable_container_image_count(opts = {}) data, _status_code, _headers = read_vulnerable_container_image_count_with_http_info(opts) @@ -3607,7 +3607,7 @@ def read_vulnerable_container_image_count(opts = {}) # Retrieve count of vulnerable images running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [Array<(ModelsAPIFilterResponse, Integer, Hash)>] ModelsAPIFilterResponse data, response status code and response headers def read_vulnerable_container_image_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -3709,24 +3709,24 @@ def regenerate_api_key_with_http_info(opts = {}) return data, status_code, headers end - # Search Kubernetes IOM by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [K8siomsKubernetesIOMEntityResponse] def search_and_read_kubernetes_iom_entities(opts = {}) data, _status_code, _headers = search_and_read_kubernetes_iom_entities_with_http_info(opts) data end - # Search Kubernetes IOM by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(K8siomsKubernetesIOMEntityResponse, Integer, Hash)>] K8siomsKubernetesIOMEntityResponse data, response status code and response headers def search_and_read_kubernetes_iom_entities_with_http_info(opts = {}) if @api_client.config.debugging @@ -3738,9 +3738,9 @@ def search_and_read_kubernetes_iom_entities_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3776,24 +3776,24 @@ def search_and_read_kubernetes_iom_entities_with_http_info(opts = {}) return data, status_code, headers end - # Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [CommonGenericEntityResponseString] def search_kubernetes_ioms(opts = {}) data, _status_code, _headers = search_kubernetes_ioms_with_http_info(opts) data end - # Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(CommonGenericEntityResponseString, Integer, Hash)>] CommonGenericEntityResponseString data, response status code and response headers def search_kubernetes_ioms_with_http_info(opts = {}) if @api_client.config.debugging @@ -3805,9 +3805,9 @@ def search_kubernetes_ioms_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/crimson-falcon/api/lookup_files.rb b/lib/crimson-falcon/api/lookup_files.rb new file mode 100644 index 00000000..be38b444 --- /dev/null +++ b/lib/crimson-falcon/api/lookup_files.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class LookupFiles + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Creates a lookup file + # @param file [File] File to be uploaded + # @param name [String] Name used to identify the file + # @param [Hash] opts the optional parameters + # @option opts [String] :description File description + # @option opts [String] :id Unique identifier of the file being updated. + # @option opts [String] :repo Name of repository or view to save the file + # @return [DomainLookupFileWrapper] + def create_file_v1(file, name, opts = {}) + data, _status_code, _headers = create_file_v1_with_http_info(file, name, opts) + data + end + + # Creates a lookup file + # @param file [File] File to be uploaded + # @param name [String] Name used to identify the file + # @param [Hash] opts the optional parameters + # @option opts [String] :description File description + # @option opts [String] :id Unique identifier of the file being updated. + # @option opts [String] :repo Name of repository or view to save the file + # @return [Array<(DomainLookupFileWrapper, Integer, Hash)>] DomainLookupFileWrapper data, response status code and response headers + def create_file_v1_with_http_info(file, name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LookupFiles.create_file_v1 ...' + end + # verify the required parameter 'file' is set + if @api_client.config.client_side_validation && file.nil? + fail ArgumentError, "Missing the required parameter 'file' when calling LookupFiles.create_file_v1" + end + # verify the required parameter 'name' is set + if @api_client.config.client_side_validation && name.nil? + fail ArgumentError, "Missing the required parameter 'name' when calling LookupFiles.create_file_v1" + end + if @api_client.config.client_side_validation && name.to_s.length > 50 + fail ArgumentError, 'invalid value for "name" when calling LookupFiles.create_file_v1, the character length must be smaller than or equal to 50.' + end + + if @api_client.config.client_side_validation && name.to_s.length < 5 + fail ArgumentError, 'invalid value for "name" when calling LookupFiles.create_file_v1, the character length must be great than or equal to 5.' + end + + if @api_client.config.client_side_validation && !opts[:'description'].nil? && opts[:'description'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"description"]" when calling LookupFiles.create_file_v1, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'description'].nil? && opts[:'description'].to_s.length < 5 + fail ArgumentError, 'invalid value for "opts[:"description"]" when calling LookupFiles.create_file_v1, the character length must be great than or equal to 5.' + end + + if @api_client.config.client_side_validation && !opts[:'id'].nil? && opts[:'id'].to_s.length > 32 + fail ArgumentError, 'invalid value for "opts[:"id"]" when calling LookupFiles.create_file_v1, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'id'].nil? && opts[:'id'].to_s.length < 32 + fail ArgumentError, 'invalid value for "opts[:"id"]" when calling LookupFiles.create_file_v1, the character length must be great than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'repo'].nil? && opts[:'repo'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"repo"]" when calling LookupFiles.create_file_v1, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'repo'].nil? && opts[:'repo'].to_s.length < 5 + fail ArgumentError, 'invalid value for "opts[:"repo"]" when calling LookupFiles.create_file_v1, the character length must be great than or equal to 5.' + end + + # resource path + local_var_path = '/loggingapi/entities/lookup-files/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(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['file'] = file + form_params['name'] = name + form_params['description'] = opts[:'description'] if !opts[:'description'].nil? + form_params['id'] = opts[:'id'] if !opts[:'id'].nil? + form_params['repo'] = opts[:'repo'] if !opts[:'repo'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DomainLookupFileWrapper' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"LookupFiles.create_file_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LookupFiles#create_file_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates a lookup file + # @param id [String] Unique identifier of the file being updated. + # @param [Hash] opts the optional parameters + # @option opts [String] :description File description + # @option opts [File] :file File to be uploaded + # @return [DomainLookupFileWrapper] + def update_file_v1(id, opts = {}) + data, _status_code, _headers = update_file_v1_with_http_info(id, opts) + data + end + + # Updates a lookup file + # @param id [String] Unique identifier of the file being updated. + # @param [Hash] opts the optional parameters + # @option opts [String] :description File description + # @option opts [File] :file File to be uploaded + # @return [Array<(DomainLookupFileWrapper, Integer, Hash)>] DomainLookupFileWrapper data, response status code and response headers + def update_file_v1_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LookupFiles.update_file_v1 ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling LookupFiles.update_file_v1" + end + if @api_client.config.client_side_validation && id.to_s.length < 32 + fail ArgumentError, 'invalid value for "id" when calling LookupFiles.update_file_v1, the character length must be great than or equal to 32.' + end + + if @api_client.config.client_side_validation && !opts[:'description'].nil? && opts[:'description'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"description"]" when calling LookupFiles.update_file_v1, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'description'].nil? && opts[:'description'].to_s.length < 5 + fail ArgumentError, 'invalid value for "opts[:"description"]" when calling LookupFiles.update_file_v1, the character length must be great than or equal to 5.' + end + + # resource path + local_var_path = '/loggingapi/entities/lookup-files/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(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['id'] = id + form_params['description'] = opts[:'description'] if !opts[:'description'].nil? + form_params['file'] = opts[:'file'] if !opts[:'file'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DomainLookupFileWrapper' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"LookupFiles.update_file_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: LookupFiles#update_file_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/release_notes.rb b/lib/crimson-falcon/api/release_notes.rb new file mode 100644 index 00000000..b5250fa0 --- /dev/null +++ b/lib/crimson-falcon/api/release_notes.rb @@ -0,0 +1,287 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class ReleaseNotes + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Queries for release-notes resources and returns details + # @param authorization [String] authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [ReleasenotesReleaseNoteWrapperV1] + def combined_release_notes_v1(authorization, opts = {}) + data, _status_code, _headers = combined_release_notes_v1_with_http_info(authorization, opts) + data + end + + # Queries for release-notes resources and returns details + # @param authorization [String] authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [Array<(ReleasenotesReleaseNoteWrapperV1, Integer, Hash)>] ReleasenotesReleaseNoteWrapperV1 data, response status code and response headers + def combined_release_notes_v1_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseNotes.combined_release_notes_v1 ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling ReleaseNotes.combined_release_notes_v1" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ReleaseNotes.combined_release_notes_v1, must be smaller than or equal to 500.' + end + + pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/) + if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling ReleaseNotes.combined_release_notes_v1, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/deployment-coordinator/combined/release-notes/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:'Authorization'] = authorization + header_params[:'X-CS-USERNAME'] = opts[:'x_cs_username'] if !opts[:'x_cs_username'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ReleasenotesReleaseNoteWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ReleaseNotes.combined_release_notes_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseNotes#combined_release_notes_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # returns the IDs of all entities in the database for the given page + # @param authorization [String] authorization header + # @param body [ReleasenotesEntitiesGetRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @return [ReleasenotesEntitiesGetResponseWrapper] + def get_entity_ids_by_query_post(authorization, body, opts = {}) + data, _status_code, _headers = get_entity_ids_by_query_post_with_http_info(authorization, body, opts) + data + end + + # returns the IDs of all entities in the database for the given page + # @param authorization [String] authorization header + # @param body [ReleasenotesEntitiesGetRequest] + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @return [Array<(ReleasenotesEntitiesGetResponseWrapper, Integer, Hash)>] ReleasenotesEntitiesGetResponseWrapper data, response status code and response headers + def get_entity_ids_by_query_post_with_http_info(authorization, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseNotes.get_entity_ids_by_query_post ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling ReleaseNotes.get_entity_ids_by_query_post" + 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 ReleaseNotes.get_entity_ids_by_query_post" + end + # resource path + local_var_path = '/deployment-coordinator/entities/release-notes/GET/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[:'Authorization'] = authorization + header_params[:'X-CS-USERNAME'] = opts[:'x_cs_username'] if !opts[:'x_cs_username'].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] || 'ReleasenotesEntitiesGetResponseWrapper' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ReleaseNotes.get_entity_ids_by_query_post", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseNotes#get_entity_ids_by_query_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Queries for release-notes resources and returns ids + # @param authorization [String] authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [StringWrapper] + def query_release_notes_v1(authorization, opts = {}) + data, _status_code, _headers = query_release_notes_v1_with_http_info(authorization, opts) + data + end + + # Queries for release-notes resources and returns ids + # @param authorization [String] authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [Array<(StringWrapper, Integer, Hash)>] StringWrapper data, response status code and response headers + def query_release_notes_v1_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ReleaseNotes.query_release_notes_v1 ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling ReleaseNotes.query_release_notes_v1" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ReleaseNotes.query_release_notes_v1, must be smaller than or equal to 500.' + end + + pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/) + if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling ReleaseNotes.query_release_notes_v1, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/deployment-coordinator/queries/release-notes/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:'Authorization'] = authorization + header_params[:'X-CS-USERNAME'] = opts[:'x_cs_username'] if !opts[:'x_cs_username'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'StringWrapper' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ReleaseNotes.query_release_notes_v1", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ReleaseNotes#query_release_notes_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/releases.rb b/lib/crimson-falcon/api/releases.rb new file mode 100644 index 00000000..32981b7e --- /dev/null +++ b/lib/crimson-falcon/api/releases.rb @@ -0,0 +1,125 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class Releases + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Queries for releases resources and returns details + # @param authorization [String] authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [ReleasesReleaseWrapper] + def combined_releases_v1_mixin0(authorization, opts = {}) + data, _status_code, _headers = combined_releases_v1_mixin0_with_http_info(authorization, opts) + data + end + + # Queries for releases resources and returns details + # @param authorization [String] authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [Array<(ReleasesReleaseWrapper, Integer, Hash)>] ReleasesReleaseWrapper data, response status code and response headers + def combined_releases_v1_mixin0_with_http_info(authorization, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Releases.combined_releases_v1_mixin0 ...' + end + # verify the required parameter 'authorization' is set + if @api_client.config.client_side_validation && authorization.nil? + fail ArgumentError, "Missing the required parameter 'authorization' when calling Releases.combined_releases_v1_mixin0" + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Releases.combined_releases_v1_mixin0, must be smaller than or equal to 500.' + end + + pattern = Regexp.new(/^\w+(\.asc|\.desc)?(,\w+(\.asc|\.desc)?)*$/) + if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"sort\"]' when calling Releases.combined_releases_v1_mixin0, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/deployment-coordinator/combined/releases/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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[:'Authorization'] = authorization + header_params[:'X-CS-USERNAME'] = opts[:'x_cs_username'] if !opts[:'x_cs_username'].nil? + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ReleasesReleaseWrapper' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"Releases.combined_releases_v1_mixin0", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Releases#combined_releases_v1_mixin0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/api/runtime_detections.rb b/lib/crimson-falcon/api/runtime_detections.rb index 883bdcee..c4dad2ec 100644 --- a/lib/crimson-falcon/api/runtime_detections.rb +++ b/lib/crimson-falcon/api/runtime_detections.rb @@ -36,24 +36,24 @@ class RuntimeDetections def initialize(api_client = ApiClient.default) @api_client = api_client end - # Retrieve container runtime detections by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filters: action_taken,aid,cid,cloud,cluster_name,command_line,computer_name,container_id,detect_timestamp,detection_description,detection_id,file_name,file_path,host_id,host_type,image_id,name,namespace,pod_name,severity,tactic - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_type` - `aid` - `cid` - `cloud_name` - `cloud` - `cluster_name` - `computer_name` - `container_id` - `detect_timestamp` - `host_id` - `host_type` - `image_id` - `name` - `namespace` - `pod_name` - `severity` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The field to sort the records on. # @return [RuntimedetectionsDetectionsEntityResponse] def get_runtime_detections_combined_v2(opts = {}) data, _status_code, _headers = get_runtime_detections_combined_v2_with_http_info(opts) data end - # Retrieve container runtime detections by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filters: action_taken,aid,cid,cloud,cluster_name,command_line,computer_name,container_id,detect_timestamp,detection_description,detection_id,file_name,file_path,host_id,host_type,image_id,name,namespace,pod_name,severity,tactic - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [String] :filter Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_type` - `aid` - `cid` - `cloud_name` - `cloud` - `cluster_name` - `computer_name` - `container_id` - `detect_timestamp` - `host_id` - `host_type` - `image_id` - `name` - `namespace` - `pod_name` - `severity` + # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The field to sort the records on. # @return [Array<(RuntimedetectionsDetectionsEntityResponse, Integer, Hash)>] RuntimedetectionsDetectionsEntityResponse data, response status code and response headers def get_runtime_detections_combined_v2_with_http_info(opts = {}) if @api_client.config.debugging @@ -65,9 +65,9 @@ def get_runtime_detections_combined_v2_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/crimson-falcon/api/sample_uploads.rb b/lib/crimson-falcon/api/sample_uploads.rb index ddc2e50e..05ba64b6 100644 --- a/lib/crimson-falcon/api/sample_uploads.rb +++ b/lib/crimson-falcon/api/sample_uploads.rb @@ -691,7 +691,7 @@ def get_sample_v3_with_http_info(ids, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) + header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) # form parameters form_params = opts[:form_params] || {} diff --git a/lib/crimson-falcon/api/spotlight_vulnerabilities.rb b/lib/crimson-falcon/api/spotlight_vulnerabilities.rb index 43ae0e5f..fdff7440 100644 --- a/lib/crimson-falcon/api/spotlight_vulnerabilities.rb +++ b/lib/crimson-falcon/api/spotlight_vulnerabilities.rb @@ -184,8 +184,8 @@ def get_remediations_v2_with_http_info(ids, opts = {}) # @param ids [Array] One or more vulnerability IDs (max: 400). Find vulnerability IDs with GET /spotlight/queries/vulnerabilities/v1 # @param [Hash] opts the optional parameters # @return [DomainSPAPIVulnerabilitiesEntitiesResponseV2] - def get_vulnerabilities_0(ids, opts = {}) - data, _status_code, _headers = get_vulnerabilities_0_with_http_info(ids, opts) + def get_vulnerabilities(ids, opts = {}) + data, _status_code, _headers = get_vulnerabilities_with_http_info(ids, opts) data end @@ -193,13 +193,13 @@ def get_vulnerabilities_0(ids, opts = {}) # @param ids [Array] One or more vulnerability IDs (max: 400). Find vulnerability IDs with GET /spotlight/queries/vulnerabilities/v1 # @param [Hash] opts the optional parameters # @return [Array<(DomainSPAPIVulnerabilitiesEntitiesResponseV2, Integer, Hash)>] DomainSPAPIVulnerabilitiesEntitiesResponseV2 data, response status code and response headers - def get_vulnerabilities_0_with_http_info(ids, opts = {}) + def get_vulnerabilities_with_http_info(ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilities.get_vulnerabilities_0 ...' + @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilities.get_vulnerabilities ...' 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 SpotlightVulnerabilities.get_vulnerabilities_0" + fail ArgumentError, "Missing the required parameter 'ids' when calling SpotlightVulnerabilities.get_vulnerabilities" end # resource path local_var_path = '/spotlight/entities/vulnerabilities/v2' @@ -226,7 +226,7 @@ def get_vulnerabilities_0_with_http_info(ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"SpotlightVulnerabilities.get_vulnerabilities_0", + :operation => :"SpotlightVulnerabilities.get_vulnerabilities", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -237,7 +237,7 @@ def get_vulnerabilities_0_with_http_info(ids, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: SpotlightVulnerabilities#get_vulnerabilities_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightVulnerabilities#get_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -249,8 +249,8 @@ def get_vulnerabilities_0_with_http_info(ids, opts = {}) # @option opts [Integer] :limit The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. # @option opts [String] :sort Sort vulnerabilities by their properties. Available sort options: <ul><li>updated_timestamp|asc/desc</li><li>closed_timestamp|asc</li><li>updated_timestamp|asc/desc</li></ul>. Can be used in a format <field>|asc for ascending order or <field>|desc for descending order. # @return [DomainSPAPIQueryResponse] - def query_vulnerabilities_0(filter, opts = {}) - data, _status_code, _headers = query_vulnerabilities_0_with_http_info(filter, opts) + def query_vulnerabilities(filter, opts = {}) + data, _status_code, _headers = query_vulnerabilities_with_http_info(filter, opts) data end @@ -261,20 +261,20 @@ def query_vulnerabilities_0(filter, opts = {}) # @option opts [Integer] :limit The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. # @option opts [String] :sort Sort vulnerabilities by their properties. Available sort options: <ul><li>updated_timestamp|asc/desc</li><li>closed_timestamp|asc</li><li>updated_timestamp|asc/desc</li></ul>. Can be used in a format <field>|asc for ascending order or <field>|desc for descending order. # @return [Array<(DomainSPAPIQueryResponse, Integer, Hash)>] DomainSPAPIQueryResponse data, response status code and response headers - def query_vulnerabilities_0_with_http_info(filter, opts = {}) + def query_vulnerabilities_with_http_info(filter, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilities.query_vulnerabilities_0 ...' + @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilities.query_vulnerabilities ...' end # verify the required parameter 'filter' is set if @api_client.config.client_side_validation && filter.nil? - fail ArgumentError, "Missing the required parameter 'filter' when calling SpotlightVulnerabilities.query_vulnerabilities_0" + fail ArgumentError, "Missing the required parameter 'filter' when calling SpotlightVulnerabilities.query_vulnerabilities" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 400 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilities.query_vulnerabilities_0, must be smaller than or equal to 400.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilities.query_vulnerabilities, must be smaller than or equal to 400.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilities.query_vulnerabilities_0, must be greater than or equal to 1.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilities.query_vulnerabilities, must be greater than or equal to 1.' end # resource path @@ -305,7 +305,7 @@ def query_vulnerabilities_0_with_http_info(filter, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"SpotlightVulnerabilities.query_vulnerabilities_0", + :operation => :"SpotlightVulnerabilities.query_vulnerabilities", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -316,7 +316,7 @@ def query_vulnerabilities_0_with_http_info(filter, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: SpotlightVulnerabilities#query_vulnerabilities_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightVulnerabilities#query_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/threatgraph.rb b/lib/crimson-falcon/api/threatgraph.rb index f3bcb569..cba69061 100644 --- a/lib/crimson-falcon/api/threatgraph.rb +++ b/lib/crimson-falcon/api/threatgraph.rb @@ -74,7 +74,7 @@ def combined_edges_get_with_http_info(ids, edge_type, opts = {}) fail ArgumentError, "Missing the required parameter 'edge_type' when calling Threatgraph.combined_edges_get" end # verify enum value - allowable_values = ["accessed_ad_computer", "accessed_adfs_application", "accessed_azure_application", "accessed_by_kerberos_ticket", "accessed_by_session", "accessed_okta_application", "accessed_ping_fed_application", "accessed_service_account", "agent_to_self_diagnostic", "allowed_by_process", "allowed_firewall_rule", "app_uninstalled_from_host", "asep_file_change", "asep_key_update", "asep_value_update", "assigned_ipv4_address", "assigned_ipv6_address", "assigned_to_sensor", "associated_by_ad_computer", "associated_by_ad_group", "associated_by_ad_user", "associated_by_aggregate_indicator", "associated_by_app", "associated_by_azure_ad_user", "associated_by_azure_app", "associated_by_certificate", "associated_by_control_graph", "associated_by_domain", "associated_by_host", "associated_by_host_name", "associated_by_idp_session", "associated_by_incident", "associated_by_indicator", "associated_by_ip", "associated_by_ip4", "associated_by_ip6", "associated_by_okta_user", "associated_by_service_ticket", "associated_control_graph", "associated_firewall_rule", "associated_idp_indicator", "associated_incident", "associated_indicator", "associated_k8s_cluster", "associated_k8s_sensor", "associated_mobile_forensics_report", "associated_mobile_indicator", "associated_module", "associated_primary_module", "associated_quarantined_file", "associated_quarantined_module", "associated_root_process", "associated_to_ad_computer", "associated_to_sensor", "associated_user_session", "associated_with_process", "associated_with_sensor", "attributed_by_process", "attributed_from_domain", "attributed_from_module", "attributed_on", "attributed_on_domain", "attributed_on_module", "attributed_to", "attributed_to_actor", "authenticated_from_incident", "authenticated_host", "blocked_by_app", "blocked_by_process", "blocked_by_sensor", "blocked_dns", "blocked_ip4", "blocked_ip6", "blocked_module", "bundled_in_app", "bundles_module", "cert_is_presented_by", "cert_presented", "child_process", "closed_ip4_socket", "closed_ip6_socket", "command_history", "command_line_parent_process", "connected_from_app", "connected_from_host", "connected_from_process", "connected_ip4", "connected_ip6", "connected_on_customer", "connected_on_sensor", "connected_to_accessory", "connected_to_wifi_ap", "connection_killed_by_app", "connection_killed_by_process", "containerized_app", "containerized_by_sensor", "control_graph", "created_by_incident", "created_by_process", "created_by_user", "created_quarantined_file", "created_service", "critical_file_accessed", "critical_file_modified", "customer_agent_has_user", "customer_has_sensor", "customer_ioc", "customer_sensor_to_sensor", "customer_user_to_sensor_user", "deleted_by_process", "deleted_rule", "denied_by_firewall_rule", "denied_by_process", "denied_firewall_rule", "detected_module", "detection", "device", "disconnect_from_wifi_ap", "disconnected_from_accessory", "disconnected_from_host", "dns", "dns_request", "duplicated_by_app", "duplicates_app", "elf_file_written", "established_on_ad_computer", "established_on_host_name", "established_on_ip4", "established_on_ip6", "established_on_sensor", "established_session", "established_user_session", "executed_app", "executed_by_process", "executed_macro_script", "executed_script", "extracted_file", "failed_to_authenticate_ad_user", "failed_to_authenticate_to_ad_computer", "failed_to_authenticate_to_adfs_app", "failed_to_authenticate_to_azure_app", "failed_to_authenticate_to_okta_app", "failed_to_authenticate_to_ping_app", "failed_to_authenticate_to_service_account", "file_create_info", "file_open_info", "fs_post_create", "fs_post_open", "generated_by_renewing", "generated_by_session", "generated_dce_rpc_epm_request_against_dc", "generated_dce_rpc_request_against_dc", "generated_failed_authentication_to_ad_computer", "generated_failed_authentication_to_adfs_app", "generated_failed_authentication_to_azure_app", "generated_failed_authentication_to_okta_app", "generated_failed_authentication_to_ping_app", "generated_failed_authentication_to_service_account", "generated_ldap_search_against_dc", "generated_service_ticket", "had_code_injected_by_process", "has_app_installed", "has_attributed_process", "has_attribution", "has_firmware", "hunting_lead", "implicated_by_incident", "implicated_sensor", "included_by_hunting_lead", "includes_process", "indexed", "initiated_by_ad_computer", "initiated_by_azure_ad_user", "initiated_by_okta_user", "initiated_by_user", "initiated_session", "injected_code_into_process", "injected_thread", "injected_thread_from_process", "installed_app", "installed_by_app", "installed_on_host", "invalid_firewall_rule", "invalid_from_process", "invalidated_by_process", "invalidated_firewall_rule", "involved_ad_computer", "involved_service_account", "ip4_socket_closed_by_app", "ip4_socket_closed_by_process", "ip4_socket_opened_by_process", "ip6_socket_closed_by_app", "ip6_socket_closed_by_process", "ip6_socket_opened_by_process", "ipv4", "ipv4_close", "ipv4_listen", "ipv6", "ipv6_close", "ipv6_listen", "jar_file_written", "killed_ip4_connection", "killed_ip6_connection", "known_by_md5", "known_by_sha256", "linking_event", "loaded_by_process", "loaded_module", "macho_file_written", "macro_executed_by_process", "member_of_full_command_line", "module", "module_written", "mounted_on_host", "mounted_to_host", "network_close_ip4", "network_close_ip6", "network_connect_ip4", "network_connect_ip6", "network_listen_ip4", "network_listen_ip6", "new_executable_written", "new_script_written", "opened_ip4_socket", "opened_ip6_socket", "parent_of_command_line", "parent_process", "parented_by_process", "participating_process", "pe_file_written", "performed_psexec_against_dc", "presented_by_cloud", "primary_module", "primary_module_of_process", "protected_by_shield", "quarantined_file", "queried_by_process", "queried_by_sensor", "queried_dns", "queried_on_customer", "queried_on_sensor", "received_from_cloud", "registered_by_incident", "registered_scheduledtask", "renewed_to_generate", "reports_aggregate_indicator", "resolved_from_domain", "resolved_to_ip4", "resolved_to_ip6", "rooted_control_graph", "rule_set_by_process", "script", "self_diagnostic_to_agent", "set_by_process", "set_firewall_rule", "set_rule", "shell_io_redirect", "shield_activated_on_host", "suspicious_dns_request", "trigger_process", "triggered_by_control_graph", "triggered_by_process", "triggered_control_graph", "triggered_detection", "triggered_indicator", "triggered_mobile_indicator", "triggered_xdr", "triggering_domain", "triggering_network", "uncontainerized_app", "uncontainerized_by_sensor", "uninstalled_app", "unmounted_from_host", "unmounted_on_host", "user", "user_session", "witnessed_by_sensor", "witnessed_process", "wmicreated_by_incident", "wmicreated_process", "written_by_process", "wrote_module"] + allowable_values = ["attributed_by_process", "invalidated_by_process", "queried_on_customer", "connected_from_process", "triggering_domain", "has_attributed_process", "generated_failed_authentication_to_azure_app", "protected_by_shield", "associated_by_ip6", "macro_executed_by_process", "queried_on_sensor", "created_quarantined_file", "user", "generated_ldap_search_against_dc", "quarantined_file", "connected_to_accessory", "self_diagnostic_to_agent", "failed_to_authenticate_to_adfs_app", "network_close_ip4", "implicated_sensor", "ipv4_listen", "created_by_user", "failed_to_authenticate_to_azure_app", "wrote_module", "accessed_azure_application", "queried_dns", "connected_ip4", "trigger_process", "known_by_sha256", "attributed_on", "invalidated_firewall_rule", "associated_by_service_ticket", "closed_ip6_socket", "triggering_network", "attributed_from_module", "set_rule", "generated_failed_authentication_to_adfs_app", "involved_service_account", "disconnected_from_host", "set_firewall_rule", "reports_aggregate_indicator", "deleted_rule", "registered_by_incident", "triggered_indicator", "dns", "associated_vmware_sensor", "ipv6", "associated_module", "uninstalled_app", "network_listen_ip6", "accessed_ping_fed_application", "duplicates_app", "associated_idp_indicator", "generated_failed_authentication_to_service_account", "accessed_ad_computer", "generated_dce_rpc_request_against_dc", "opened_ip6_socket", "cert_is_presented_by", "renewed_to_generate", "associated_by_aggregate_indicator", "invalid_from_process", "installed_by_app", "device", "customer_user_to_sensor_user", "resolved_from_domain", "associated_by_certificate", "member_of_full_command_line", "connected_on_customer", "established_session", "established_on_ip4", "generated_by_renewing", "blocked_module", "wmicreated_process", "ipv6_listen", "initiated_by_azure_ad_user", "initiated_by_user", "connection_killed_by_app", "duplicated_by_app", "registered_scheduledtask", "associated_by_ip", "child_process", "parent_process", "attributed_to", "ip6_socket_closed_by_process", "invalid_firewall_rule", "created_by_process", "triggered_by_control_graph", "associated_by_azure_app", "generated_dce_rpc_epm_request_against_dc", "network_listen_ip4", "ip4_socket_closed_by_app", "killed_ip4_connection", "customer_agent_has_user", "connected_from_app", "assigned_to_sensor", "associated_k8s_sensor", "connection_killed_by_process", "injected_code_into_process", "generated_failed_authentication_to_okta_app", "extracted_file", "associated_quarantined_module", "witnessed_process", "blocked_by_sensor", "associated_by_incident", "unmounted_on_host", "executed_macro_script", "associated_by_app", "ipv4", "containerized_app", "connected_to_wifi_ap", "associated_with_sensor", "user_session", "loaded_module", "blocked_by_app", "denied_by_process", "failed_to_authenticate_ad_user", "presented_by_cloud", "denied_firewall_rule", "ipv6_close", "bundles_module", "established_on_sensor", "accessed_okta_application", "attributed_from_domain", "blocked_dns", "accessed_adfs_application", "customer_has_sensor", "assigned_ipv4_address", "dns_request", "primary_module_of_process", "initiated_by_okta_user", "allowed_firewall_rule", "established_on_ip6", "network_connect_ip4", "created_by_incident", "cert_presented", "associated_user_session", "resolved_to_ip6", "unmounted_from_host", "module_written", "customer_ioc", "authenticated_from_incident", "ip4_socket_opened_by_process", "control_graph", "accessed_service_account", "queried_by_process", "linking_event", "implicated_by_incident", "associated_to_ad_computer", "set_by_process", "primary_module", "associated_by_ad_group", "connected_from_host", "assigned_ipv6_address", "ip6_socket_opened_by_process", "associated_by_indicator", "ipv4_close", "denied_by_firewall_rule", "parent_of_command_line", "uncontainerized_by_sensor", "associated_by_control_graph", "associated_by_idp_session", "shield_activated_on_host", "failed_to_authenticate_to_service_account", "attributed_on_module", "script", "disconnected_from_accessory", "opened_ip4_socket", "attributed_on_domain", "rule_set_by_process", "customer_sensor_to_sensor", "allowed_by_process", "blocked_ip6", "mounted_on_host", "loaded_by_process", "associated_mobile_indicator", "generated_by_session", "network_close_ip6", "triggered_mobile_indicator", "authenticated_host", "module", "closed_ip4_socket", "initiated_by_ad_computer", "network_connect_ip6", "rooted_control_graph", "established_on_host_name", "associated_by_ad_computer", "connected_on_sensor", "established_on_ad_computer", "deleted_by_process", "associated_vmware_cluster", "accessed_by_session", "known_by_md5", "indexed", "executed_by_process", "associated_indicator", "failed_to_authenticate_to_ping_app", "command_line_parent_process", "created_service", "associated_firewall_rule", "associated_incident", "associated_by_azure_ad_user", "ip6_socket_closed_by_app", "associated_by_domain", "generated_failed_authentication_to_ping_app", "received_from_cloud", "associated_k8s_cluster", "generated_failed_authentication_to_ad_computer", "performed_psexec_against_dc", "accessed_by_kerberos_ticket", "detected_module", "wmicreated_by_incident", "associated_by_okta_user", "executed_script", "associated_root_process", "disconnect_from_wifi_ap", "associated_by_host", "killed_ip6_connection", "associated_mobile_forensics_report", "has_app_installed", "attributed_to_actor", "app_uninstalled_from_host", "failed_to_authenticate_to_ad_computer", "installed_on_host", "associated_primary_module", "parented_by_process", "associated_by_ad_user", "uncontainerized_app", "mounted_to_host", "has_attribution", "blocked_by_process", "triggered_xdr", "detection", "connected_ip6", "triggered_control_graph", "queried_by_sensor", "ip4_socket_closed_by_process", "executed_app", "has_firmware", "associated_by_ip4", "installed_app", "injected_thread", "containerized_by_sensor", "witnessed_by_sensor", "resolved_to_ip4", "associated_control_graph", "associated_quarantined_file", "blocked_ip4", "associated_by_host_name", "participating_process", "bundled_in_app", "had_code_injected_by_process", "established_user_session", "failed_to_authenticate_to_okta_app", "triggered_detection", "initiated_session", "injected_thread_from_process", "generated_service_ticket", "triggered_by_process", "associated_to_sensor", "written_by_process", "associated_with_process", "shell_io_redirect", "agent_to_self_diagnostic", "involved_ad_computer"] if @api_client.config.client_side_validation && !allowable_values.include?(edge_type) fail ArgumentError, "invalid value for \"edge_type\", must be one of #{allowable_values}" end @@ -82,7 +82,7 @@ def combined_edges_get_with_http_info(ids, edge_type, opts = {}) fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling Threatgraph.combined_edges_get, must be smaller than or equal to 100.' end - allowable_values = ["cspm", "customer", "cwpp", "device", "global"] + allowable_values = ["device", "customer"] if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope']) fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}" end @@ -248,7 +248,7 @@ def combined_summary_get_with_http_info(vertex_type, ids, opts = {}) fail ArgumentError, "Missing the required parameter 'vertex_type' when calling Threatgraph.combined_summary_get" end # verify enum value - allowable_values = ["accessories", "accessory", "actor", "ad-computers", "ad-groups", "ad_computer", "ad_group", "adfs-applications", "adfs_application", "aggregate-indicators", "aggregate_indicator", "any-vertex", "azure-ad-users", "azure-applications", "azure_ad_user", "azure_application", "certificate", "certificates", "command-lines", "command_line", "containerized-apps", "containerized_app", "control-graphs", "control_graph", "customer", "customers", "detection", "detection-indices", "detection_index", "detections", "devices", "direct", "directs", "domain", "domains", "extracted-files", "extracted_file", "firewall", "firewall_rule_match", "firewall_rule_matches", "firewalls", "firmware", "firmwares", "host-names", "host_name", "hunting-leads", "hunting_lead", "idp-indicators", "idp-sessions", "idp_indicator", "idp_session", "incident", "incidents", "indicator", "indicators", "ipv4", "ipv6", "k8s_cluster", "k8s_clusters", "kerberos-tickets", "kerberos_ticket", "legacy-detections", "legacy_detection", "macro_script", "macro_scripts", "mobile-apps", "mobile-fs-volumes", "mobile-indicators", "mobile_app", "mobile_fs_volume", "mobile_indicator", "mobile_os_forensics_report", "mobile_os_forensics_reports", "module", "modules", "okta-applications", "okta-users", "okta_application", "okta_user", "ping-fed-applications", "ping_fed_application", "process", "processes", "quarantined-files", "quarantined_file", "script", "scripts", "sensor", "sensor-self-diagnostics", "sensor_self_diagnostic", "shield", "shields", "tag", "tags", "user-sessions", "user_id", "user_session", "users", "wifi-access-points", "wifi_access_point", "xdr"] + allowable_values = ["accessory", "accessories", "actor", "ad_computer", "ad-computers", "adfs_application", "adfs-applications", "ad_group", "ad-groups", "aggregate_indicator", "aggregate-indicators", "sensor", "devices", "mobile_app", "mobile-apps", "azure_application", "azure-applications", "azure_ad_user", "azure-ad-users", "containerized_app", "containerized-apps", "certificate", "certificates", "command_line", "command-lines", "control_graph", "control-graphs", "detection", "detections", "domain", "domains", "extracted_file", "extracted-files", "firmware", "firmwares", "mobile_fs_volume", "mobile-fs-volumes", "firewall", "firewalls", "firewall_rule_match", "firewall_rule_matches", "host_name", "host-names", "detection_index", "detection-indices", "idp_indicator", "idp-indicators", "idp_session", "idp-sessions", "incident", "incidents", "indicator", "indicators", "ipv4", "ipv6", "k8s_cluster", "k8s_clusters", "legacy_detection", "legacy-detections", "mobile_os_forensics_report", "mobile_os_forensics_reports", "mobile_indicator", "mobile-indicators", "module", "modules", "macro_script", "macro_scripts", "okta_application", "okta-applications", "okta_user", "okta-users", "process", "processes", "ping_fed_application", "ping-fed-applications", "quarantined_file", "quarantined-files", "script", "scripts", "shield", "shields", "sensor_self_diagnostic", "sensor-self-diagnostics", "kerberos_ticket", "kerberos-tickets", "user_id", "users", "user_session", "user-sessions", "vmware_cluster", "vmware_clusters", "wifi_access_point", "wifi-access-points", "xdr", "any-vertex"] if @api_client.config.client_side_validation && !allowable_values.include?(vertex_type) fail ArgumentError, "invalid value for \"vertex_type\", must be one of #{allowable_values}" end @@ -260,7 +260,7 @@ def combined_summary_get_with_http_info(vertex_type, ids, opts = {}) fail ArgumentError, 'invalid value for "ids" when calling Threatgraph.combined_summary_get, number of items must be less than or equal to 100.' end - allowable_values = ["cspm", "customer", "cwpp", "device", "global"] + allowable_values = ["device", "customer"] if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope']) fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}" end @@ -335,7 +335,7 @@ def entities_vertices_get_with_http_info(vertex_type, ids, opts = {}) fail ArgumentError, "Missing the required parameter 'vertex_type' when calling Threatgraph.entities_vertices_get" end # verify enum value - allowable_values = ["accessories", "accessory", "actor", "ad-computers", "ad-groups", "ad_computer", "ad_group", "adfs-applications", "adfs_application", "aggregate-indicators", "aggregate_indicator", "any-vertex", "azure-ad-users", "azure-applications", "azure_ad_user", "azure_application", "certificate", "certificates", "command-lines", "command_line", "containerized-apps", "containerized_app", "control-graphs", "control_graph", "customer", "customers", "detection", "detection-indices", "detection_index", "detections", "devices", "direct", "directs", "domain", "domains", "extracted-files", "extracted_file", "firewall", "firewall_rule_match", "firewall_rule_matches", "firewalls", "firmware", "firmwares", "host-names", "host_name", "hunting-leads", "hunting_lead", "idp-indicators", "idp-sessions", "idp_indicator", "idp_session", "incident", "incidents", "indicator", "indicators", "ipv4", "ipv6", "k8s_cluster", "k8s_clusters", "kerberos-tickets", "kerberos_ticket", "legacy-detections", "legacy_detection", "macro_script", "macro_scripts", "mobile-apps", "mobile-fs-volumes", "mobile-indicators", "mobile_app", "mobile_fs_volume", "mobile_indicator", "mobile_os_forensics_report", "mobile_os_forensics_reports", "module", "modules", "okta-applications", "okta-users", "okta_application", "okta_user", "ping-fed-applications", "ping_fed_application", "process", "processes", "quarantined-files", "quarantined_file", "script", "scripts", "sensor", "sensor-self-diagnostics", "sensor_self_diagnostic", "shield", "shields", "tag", "tags", "user-sessions", "user_id", "user_session", "users", "wifi-access-points", "wifi_access_point", "xdr"] + allowable_values = ["accessory", "accessories", "actor", "ad_computer", "ad-computers", "adfs_application", "adfs-applications", "ad_group", "ad-groups", "aggregate_indicator", "aggregate-indicators", "sensor", "devices", "mobile_app", "mobile-apps", "azure_application", "azure-applications", "azure_ad_user", "azure-ad-users", "containerized_app", "containerized-apps", "certificate", "certificates", "command_line", "command-lines", "control_graph", "control-graphs", "detection", "detections", "domain", "domains", "extracted_file", "extracted-files", "firmware", "firmwares", "mobile_fs_volume", "mobile-fs-volumes", "firewall", "firewalls", "firewall_rule_match", "firewall_rule_matches", "host_name", "host-names", "detection_index", "detection-indices", "idp_indicator", "idp-indicators", "idp_session", "idp-sessions", "incident", "incidents", "indicator", "indicators", "ipv4", "ipv6", "k8s_cluster", "k8s_clusters", "legacy_detection", "legacy-detections", "mobile_os_forensics_report", "mobile_os_forensics_reports", "mobile_indicator", "mobile-indicators", "module", "modules", "macro_script", "macro_scripts", "okta_application", "okta-applications", "okta_user", "okta-users", "process", "processes", "ping_fed_application", "ping-fed-applications", "quarantined_file", "quarantined-files", "script", "scripts", "shield", "shields", "sensor_self_diagnostic", "sensor-self-diagnostics", "kerberos_ticket", "kerberos-tickets", "user_id", "users", "user_session", "user-sessions", "vmware_cluster", "vmware_clusters", "wifi_access_point", "wifi-access-points", "xdr", "any-vertex"] if @api_client.config.client_side_validation && !allowable_values.include?(vertex_type) fail ArgumentError, "invalid value for \"vertex_type\", must be one of #{allowable_values}" end @@ -347,7 +347,7 @@ def entities_vertices_get_with_http_info(vertex_type, ids, opts = {}) fail ArgumentError, 'invalid value for "ids" when calling Threatgraph.entities_vertices_get, number of items must be less than or equal to 100.' end - allowable_values = ["cspm", "customer", "cwpp", "device", "global"] + allowable_values = ["device", "customer"] if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope']) fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}" end @@ -422,7 +422,7 @@ def entities_vertices_getv2_with_http_info(vertex_type, ids, opts = {}) fail ArgumentError, "Missing the required parameter 'vertex_type' when calling Threatgraph.entities_vertices_getv2" end # verify enum value - allowable_values = ["accessories", "accessory", "actor", "ad-computers", "ad-groups", "ad_computer", "ad_group", "adfs-applications", "adfs_application", "aggregate-indicators", "aggregate_indicator", "any-vertex", "azure-ad-users", "azure-applications", "azure_ad_user", "azure_application", "certificate", "certificates", "command-lines", "command_line", "containerized-apps", "containerized_app", "control-graphs", "control_graph", "customer", "customers", "detection", "detection-indices", "detection_index", "detections", "devices", "direct", "directs", "domain", "domains", "extracted-files", "extracted_file", "firewall", "firewall_rule_match", "firewall_rule_matches", "firewalls", "firmware", "firmwares", "host-names", "host_name", "hunting-leads", "hunting_lead", "idp-indicators", "idp-sessions", "idp_indicator", "idp_session", "incident", "incidents", "indicator", "indicators", "ipv4", "ipv6", "k8s_cluster", "k8s_clusters", "kerberos-tickets", "kerberos_ticket", "legacy-detections", "legacy_detection", "macro_script", "macro_scripts", "mobile-apps", "mobile-fs-volumes", "mobile-indicators", "mobile_app", "mobile_fs_volume", "mobile_indicator", "mobile_os_forensics_report", "mobile_os_forensics_reports", "module", "modules", "okta-applications", "okta-users", "okta_application", "okta_user", "ping-fed-applications", "ping_fed_application", "process", "processes", "quarantined-files", "quarantined_file", "script", "scripts", "sensor", "sensor-self-diagnostics", "sensor_self_diagnostic", "shield", "shields", "tag", "tags", "user-sessions", "user_id", "user_session", "users", "wifi-access-points", "wifi_access_point", "xdr"] + allowable_values = ["accessory", "accessories", "actor", "ad_computer", "ad-computers", "adfs_application", "adfs-applications", "ad_group", "ad-groups", "aggregate_indicator", "aggregate-indicators", "sensor", "devices", "mobile_app", "mobile-apps", "azure_application", "azure-applications", "azure_ad_user", "azure-ad-users", "containerized_app", "containerized-apps", "certificate", "certificates", "command_line", "command-lines", "control_graph", "control-graphs", "detection", "detections", "domain", "domains", "extracted_file", "extracted-files", "firmware", "firmwares", "mobile_fs_volume", "mobile-fs-volumes", "firewall", "firewalls", "firewall_rule_match", "firewall_rule_matches", "host_name", "host-names", "detection_index", "detection-indices", "idp_indicator", "idp-indicators", "idp_session", "idp-sessions", "incident", "incidents", "indicator", "indicators", "ipv4", "ipv6", "k8s_cluster", "k8s_clusters", "legacy_detection", "legacy-detections", "mobile_os_forensics_report", "mobile_os_forensics_reports", "mobile_indicator", "mobile-indicators", "module", "modules", "macro_script", "macro_scripts", "okta_application", "okta-applications", "okta_user", "okta-users", "process", "processes", "ping_fed_application", "ping-fed-applications", "quarantined_file", "quarantined-files", "script", "scripts", "shield", "shields", "sensor_self_diagnostic", "sensor-self-diagnostics", "kerberos_ticket", "kerberos-tickets", "user_id", "users", "user_session", "user-sessions", "vmware_cluster", "vmware_clusters", "wifi_access_point", "wifi-access-points", "xdr", "any-vertex"] if @api_client.config.client_side_validation && !allowable_values.include?(vertex_type) fail ArgumentError, "invalid value for \"vertex_type\", must be one of #{allowable_values}" end @@ -434,7 +434,7 @@ def entities_vertices_getv2_with_http_info(vertex_type, ids, opts = {}) fail ArgumentError, 'invalid value for "ids" when calling Threatgraph.entities_vertices_getv2, number of items must be less than or equal to 100.' end - allowable_values = ["cspm", "customer", "cwpp", "device", "global"] + allowable_values = ["device", "customer"] if @api_client.config.client_side_validation && opts[:'scope'] && !allowable_values.include?(opts[:'scope']) fail ArgumentError, "invalid value for \"scope\", must be one of #{allowable_values}" end diff --git a/lib/crimson-falcon/api/unidentified_containers.rb b/lib/crimson-falcon/api/unidentified_containers.rb index 449208e6..3644be76 100644 --- a/lib/crimson-falcon/api/unidentified_containers.rb +++ b/lib/crimson-falcon/api/unidentified_containers.rb @@ -38,7 +38,7 @@ def initialize(api_client = ApiClient.default) end # Returns the count of Unidentified Containers over the last 7 days # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @return [ModelsAggregateValuesByFieldResponse] def read_unidentified_containers_by_date_range_count(opts = {}) data, _status_code, _headers = read_unidentified_containers_by_date_range_count_with_http_info(opts) @@ -47,7 +47,7 @@ def read_unidentified_containers_by_date_range_count(opts = {}) # Returns the count of Unidentified Containers over the last 7 days # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers def read_unidentified_containers_by_date_range_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -96,7 +96,7 @@ def read_unidentified_containers_by_date_range_count_with_http_info(opts = {}) # Returns the total count of Unidentified Containers over a time period # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @return [UnidentifiedcontainersUnidentifiedContainersCountValue] def read_unidentified_containers_count(opts = {}) data, _status_code, _headers = read_unidentified_containers_count_with_http_info(opts) @@ -105,7 +105,7 @@ def read_unidentified_containers_count(opts = {}) # Returns the total count of Unidentified Containers over a time period # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @return [Array<(UnidentifiedcontainersUnidentifiedContainersCountValue, Integer, Hash)>] UnidentifiedcontainersUnidentifiedContainersCountValue data, response status code and response headers def read_unidentified_containers_count_with_http_info(opts = {}) if @api_client.config.debugging @@ -152,24 +152,24 @@ def read_unidentified_containers_count_with_http_info(opts = {}) return data, status_code, headers end - # Search Unidentified Containers by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [UnidentifiedcontainersUnidentifiedContainerAPIResponse] def search_and_read_unidentified_containers(opts = {}) data, _status_code, _headers = search_and_read_unidentified_containers_with_http_info(opts) data end - # Search Unidentified Containers by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @option opts [String] :sort The fields to sort the records on. + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. (default to 100) + # @option opts [Integer] :offset The offset from where to begin. # @return [Array<(UnidentifiedcontainersUnidentifiedContainerAPIResponse, Integer, Hash)>] UnidentifiedcontainersUnidentifiedContainerAPIResponse data, response status code and response headers def search_and_read_unidentified_containers_with_http_info(opts = {}) if @api_client.config.debugging @@ -181,9 +181,9 @@ def search_and_read_unidentified_containers_with_http_info(opts = {}) # query parameters query_params = opts[:query_params] || {} query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/crimson-falcon/api/vulnerabilities.rb b/lib/crimson-falcon/api/vulnerabilities.rb new file mode 100644 index 00000000..541e4c63 --- /dev/null +++ b/lib/crimson-falcon/api/vulnerabilities.rb @@ -0,0 +1,106 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'cgi' + +module Falcon + class Vulnerabilities + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Filter lambda vulnerabilities using a query in Falcon Query Language (FQL).Supported filters: application_name,application_name_version,cid,cloud_account_id,cloud_account_name,cloud_provider,cve_id,cvss_base_score,exprt_rating,first_seen_timestamp,function_name,function_resource_id,is_supported,is_valid_asset_id,layer,region,runtime,severity,timestamp,type + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. Supported columns: [application_name application_name_version cid cloud_account_id cloud_account_name cloud_provider cve_id cvss_base_score exprt_rating first_seen_timestamp function_resource_id is_supported layer region runtime severity timestamp type] + # @return [VulnerabilitiesVulnerabilityEntitySARIFResponse] + def get_combined_vulnerabilities_sarif(opts = {}) + data, _status_code, _headers = get_combined_vulnerabilities_sarif_with_http_info(opts) + data + end + + # Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Filter lambda vulnerabilities using a query in Falcon Query Language (FQL).Supported filters: application_name,application_name_version,cid,cloud_account_id,cloud_account_name,cloud_provider,cve_id,cvss_base_score,exprt_rating,first_seen_timestamp,function_name,function_resource_id,is_supported,is_valid_asset_id,layer,region,runtime,severity,timestamp,type + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. Supported columns: [application_name application_name_version cid cloud_account_id cloud_account_name cloud_provider cve_id cvss_base_score exprt_rating first_seen_timestamp function_resource_id is_supported layer region runtime severity timestamp type] + # @return [Array<(VulnerabilitiesVulnerabilityEntitySARIFResponse, Integer, Hash)>] VulnerabilitiesVulnerabilityEntitySARIFResponse data, response status code and response headers + def get_combined_vulnerabilities_sarif_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: Vulnerabilities.get_combined_vulnerabilities_sarif ...' + end + # resource path + local_var_path = '/lambdas/combined/vulnerabilities/sarif/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'VulnerabilitiesVulnerabilityEntitySARIFResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"Vulnerabilities.get_combined_vulnerabilities_sarif", + :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, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: Vulnerabilities#get_combined_vulnerabilities_sarif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/crimson-falcon/models/api_create_rule_operation_v1.rb b/lib/crimson-falcon/models/api_create_rule_operation_v1.rb new file mode 100644 index 00000000..1311916f --- /dev/null +++ b/lib/crimson-falcon/models/api_create_rule_operation_v1.rb @@ -0,0 +1,257 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiCreateRuleOperationV1 + attr_accessor :schedule + + attr_accessor :start_on + + attr_accessor :stop_on + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'schedule' => :'schedule', + :'start_on' => :'start_on', + :'stop_on' => :'stop_on' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'schedule' => :'ApiRuleScheduleV1', + :'start_on' => :'Time', + :'stop_on' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiCreateRuleOperationV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiCreateRuleOperationV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'schedule') + self.schedule = attributes[:'schedule'] + end + + if attributes.key?(:'start_on') + self.start_on = attributes[:'start_on'] + end + + if attributes.key?(:'stop_on') + self.stop_on = attributes[:'stop_on'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @schedule.nil? + invalid_properties.push('invalid value for "schedule", schedule cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @schedule.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + schedule == o.schedule && + start_on == o.start_on && + stop_on == o.stop_on + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [schedule, start_on, stop_on].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_get_entities_rules_response_v1.rb b/lib/crimson-falcon/models/api_get_entities_rules_response_v1.rb new file mode 100644 index 00000000..07adfd14 --- /dev/null +++ b/lib/crimson-falcon/models/api_get_entities_rules_response_v1.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiGetEntitiesRulesResponseV1 + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiGetEntitiesRulesResponseV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiGetEntitiesRulesResponseV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_patch_rule_operation_v1.rb b/lib/crimson-falcon/models/api_patch_rule_operation_v1.rb new file mode 100644 index 00000000..64afe92a --- /dev/null +++ b/lib/crimson-falcon/models/api_patch_rule_operation_v1.rb @@ -0,0 +1,257 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiPatchRuleOperationV1 + attr_accessor :schedule + + attr_accessor :start_on + + attr_accessor :stop_on + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'schedule' => :'schedule', + :'start_on' => :'start_on', + :'stop_on' => :'stop_on' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'schedule' => :'ApiRuleScheduleV1Patch', + :'start_on' => :'Time', + :'stop_on' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiPatchRuleOperationV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiPatchRuleOperationV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'schedule') + self.schedule = attributes[:'schedule'] + end + + if attributes.key?(:'start_on') + self.start_on = attributes[:'start_on'] + end + + if attributes.key?(:'stop_on') + self.stop_on = attributes[:'stop_on'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @stop_on.nil? + invalid_properties.push('invalid value for "stop_on", stop_on cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @stop_on.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + schedule == o.schedule && + start_on == o.start_on && + stop_on == o.stop_on + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [schedule, start_on, stop_on].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_patch_rule_search_v1.rb b/lib/crimson-falcon/models/api_patch_rule_search_v1.rb new file mode 100644 index 00000000..2bc325ef --- /dev/null +++ b/lib/crimson-falcon/models/api_patch_rule_search_v1.rb @@ -0,0 +1,261 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiPatchRuleSearchV1 + attr_accessor :filter + + attr_accessor :lookback + + attr_accessor :outcome + + attr_accessor :trigger_mode + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filter' => :'filter', + :'lookback' => :'lookback', + :'outcome' => :'outcome', + :'trigger_mode' => :'trigger_mode' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'filter' => :'String', + :'lookback' => :'String', + :'outcome' => :'String', + :'trigger_mode' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiPatchRuleSearchV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiPatchRuleSearchV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'lookback') + self.lookback = attributes[:'lookback'] + end + + if attributes.key?(:'outcome') + self.outcome = attributes[:'outcome'] + end + + if attributes.key?(:'trigger_mode') + self.trigger_mode = attributes[:'trigger_mode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filter == o.filter && + lookback == o.lookback && + outcome == o.outcome && + trigger_mode == o.trigger_mode + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [filter, lookback, outcome, trigger_mode].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_rule_create_request_v1.rb b/lib/crimson-falcon/models/api_rule_create_request_v1.rb new file mode 100644 index 00000000..c1cfebe7 --- /dev/null +++ b/lib/crimson-falcon/models/api_rule_create_request_v1.rb @@ -0,0 +1,354 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiRuleCreateRequestV1 + attr_accessor :comment + + attr_accessor :customer_id + + attr_accessor :description + + attr_accessor :name + + attr_accessor :operation + + attr_accessor :search + + attr_accessor :severity + + attr_accessor :status + + attr_accessor :tactic + + attr_accessor :technique + + attr_accessor :trigger_on_create + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'comment' => :'comment', + :'customer_id' => :'customer_id', + :'description' => :'description', + :'name' => :'name', + :'operation' => :'operation', + :'search' => :'search', + :'severity' => :'severity', + :'status' => :'status', + :'tactic' => :'tactic', + :'technique' => :'technique', + :'trigger_on_create' => :'trigger_on_create' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'comment' => :'String', + :'customer_id' => :'String', + :'description' => :'String', + :'name' => :'String', + :'operation' => :'ApiCreateRuleOperationV1', + :'search' => :'ApiRuleSearchV1', + :'severity' => :'Integer', + :'status' => :'String', + :'tactic' => :'String', + :'technique' => :'String', + :'trigger_on_create' => :'Boolean' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiRuleCreateRequestV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiRuleCreateRequestV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'comment') + self.comment = attributes[:'comment'] + end + + if attributes.key?(:'customer_id') + self.customer_id = attributes[:'customer_id'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'operation') + self.operation = attributes[:'operation'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tactic') + self.tactic = attributes[:'tactic'] + end + + if attributes.key?(:'technique') + self.technique = attributes[:'technique'] + end + + if attributes.key?(:'trigger_on_create') + self.trigger_on_create = attributes[:'trigger_on_create'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @customer_id.nil? + invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @operation.nil? + invalid_properties.push('invalid value for "operation", operation cannot be nil.') + end + + if @search.nil? + invalid_properties.push('invalid value for "search", search cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @customer_id.nil? + return false if @name.nil? + return false if @operation.nil? + return false if @search.nil? + return false if @severity.nil? + return false if @status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comment == o.comment && + customer_id == o.customer_id && + description == o.description && + name == o.name && + operation == o.operation && + search == o.search && + severity == o.severity && + status == o.status && + tactic == o.tactic && + technique == o.technique && + trigger_on_create == o.trigger_on_create + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [comment, customer_id, description, name, operation, search, severity, status, tactic, technique, trigger_on_create].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_rule_operation_v1.rb b/lib/crimson-falcon/models/api_rule_operation_v1.rb new file mode 100644 index 00000000..264d5f6c --- /dev/null +++ b/lib/crimson-falcon/models/api_rule_operation_v1.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiRuleOperationV1 + attr_accessor :expiration_on + + attr_accessor :schedule + + attr_accessor :start_on + + attr_accessor :stop_on + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'expiration_on' => :'expiration_on', + :'schedule' => :'schedule', + :'start_on' => :'start_on', + :'stop_on' => :'stop_on' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'expiration_on' => :'Time', + :'schedule' => :'ApiRuleScheduleV1', + :'start_on' => :'Time', + :'stop_on' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiRuleOperationV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiRuleOperationV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'expiration_on') + self.expiration_on = attributes[:'expiration_on'] + end + + if attributes.key?(:'schedule') + self.schedule = attributes[:'schedule'] + end + + if attributes.key?(:'start_on') + self.start_on = attributes[:'start_on'] + end + + if attributes.key?(:'stop_on') + self.stop_on = attributes[:'stop_on'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @schedule.nil? + invalid_properties.push('invalid value for "schedule", schedule cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @schedule.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + expiration_on == o.expiration_on && + schedule == o.schedule && + start_on == o.start_on && + stop_on == o.stop_on + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [expiration_on, schedule, start_on, stop_on].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_rule_patch_request_v1.rb b/lib/crimson-falcon/models/api_rule_patch_request_v1.rb new file mode 100644 index 00000000..04062b78 --- /dev/null +++ b/lib/crimson-falcon/models/api_rule_patch_request_v1.rb @@ -0,0 +1,311 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiRulePatchRequestV1 + attr_accessor :description + + attr_accessor :id + + attr_accessor :name + + attr_accessor :operation + + attr_accessor :search + + attr_accessor :severity + + attr_accessor :status + + attr_accessor :tactic + + attr_accessor :technique + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'id' => :'id', + :'name' => :'name', + :'operation' => :'operation', + :'search' => :'search', + :'severity' => :'severity', + :'status' => :'status', + :'tactic' => :'tactic', + :'technique' => :'technique' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'String', + :'id' => :'String', + :'name' => :'String', + :'operation' => :'ApiPatchRuleOperationV1', + :'search' => :'ApiPatchRuleSearchV1', + :'severity' => :'Integer', + :'status' => :'String', + :'tactic' => :'String', + :'technique' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiRulePatchRequestV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiRulePatchRequestV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'operation') + self.operation = attributes[:'operation'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tactic') + self.tactic = attributes[:'tactic'] + end + + if attributes.key?(:'technique') + self.technique = attributes[:'technique'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + id == o.id && + name == o.name && + operation == o.operation && + search == o.search && + severity == o.severity && + status == o.status && + tactic == o.tactic && + technique == o.technique + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [description, id, name, operation, search, severity, status, tactic, technique].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_rule_schedule_v1.rb b/lib/crimson-falcon/models/api_rule_schedule_v1.rb new file mode 100644 index 00000000..ad50435d --- /dev/null +++ b/lib/crimson-falcon/models/api_rule_schedule_v1.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiRuleScheduleV1 + attr_accessor :definition + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'definition' => :'definition' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'definition' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiRuleScheduleV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiRuleScheduleV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'definition') + self.definition = attributes[:'definition'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @definition.nil? + invalid_properties.push('invalid value for "definition", definition cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @definition.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + definition == o.definition + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [definition].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_rule_schedule_v1_patch.rb b/lib/crimson-falcon/models/api_rule_schedule_v1_patch.rb new file mode 100644 index 00000000..30d287f4 --- /dev/null +++ b/lib/crimson-falcon/models/api_rule_schedule_v1_patch.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiRuleScheduleV1Patch + attr_accessor :definition + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'definition' => :'definition' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'definition' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiRuleScheduleV1Patch` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiRuleScheduleV1Patch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'definition') + self.definition = attributes[:'definition'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @definition.nil? + invalid_properties.push('invalid value for "definition", definition cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @definition.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + definition == o.definition + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [definition].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_rule_search_v1.rb b/lib/crimson-falcon/models/api_rule_search_v1.rb new file mode 100644 index 00000000..f36b4f57 --- /dev/null +++ b/lib/crimson-falcon/models/api_rule_search_v1.rb @@ -0,0 +1,276 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ApiRuleSearchV1 + attr_accessor :filter + + attr_accessor :lookback + + attr_accessor :outcome + + attr_accessor :trigger_mode + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filter' => :'filter', + :'lookback' => :'lookback', + :'outcome' => :'outcome', + :'trigger_mode' => :'trigger_mode' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'filter' => :'String', + :'lookback' => :'String', + :'outcome' => :'String', + :'trigger_mode' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiRuleSearchV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ApiRuleSearchV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'lookback') + self.lookback = attributes[:'lookback'] + end + + if attributes.key?(:'outcome') + self.outcome = attributes[:'outcome'] + end + + if attributes.key?(:'trigger_mode') + self.trigger_mode = attributes[:'trigger_mode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @filter.nil? + invalid_properties.push('invalid value for "filter", filter cannot be nil.') + end + + if @lookback.nil? + invalid_properties.push('invalid value for "lookback", lookback cannot be nil.') + end + + if @outcome.nil? + invalid_properties.push('invalid value for "outcome", outcome cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @filter.nil? + return false if @lookback.nil? + return false if @outcome.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filter == o.filter && + lookback == o.lookback && + outcome == o.outcome && + trigger_mode == o.trigger_mode + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [filter, lookback, outcome, trigger_mode].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/api_rule_v1.rb b/lib/crimson-falcon/models/api_rule_v1.rb index 000b0ce9..63def033 100644 --- a/lib/crimson-falcon/models/api_rule_v1.rb +++ b/lib/crimson-falcon/models/api_rule_v1.rb @@ -32,78 +32,69 @@ module Falcon class ApiRuleV1 - attr_accessor :action_label + attr_accessor :api_client_id attr_accessor :comment - attr_accessor :committed_on - - attr_accessor :created_by - attr_accessor :created_on attr_accessor :customer_id - attr_accessor :deleted - attr_accessor :description - attr_accessor :disposition_id + attr_accessor :id - attr_accessor :enabled + attr_accessor :last_updated_on - attr_accessor :field_values + attr_accessor :name - attr_accessor :instance_id + attr_accessor :operation - attr_accessor :instance_version + attr_accessor :rule_id - attr_accessor :magic_cookie + attr_accessor :search - attr_accessor :modified_by + attr_accessor :severity - attr_accessor :modified_on + attr_accessor :state - attr_accessor :name + attr_accessor :status - attr_accessor :pattern_id + attr_accessor :tactic - attr_accessor :pattern_severity + attr_accessor :technique - attr_accessor :rulegroup_id + attr_accessor :template_id - attr_accessor :ruletype_id + attr_accessor :user_id - attr_accessor :ruletype_name + attr_accessor :user_uuid - attr_accessor :version_ids + attr_accessor :version # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'action_label' => :'action_label', + :'api_client_id' => :'api_client_id', :'comment' => :'comment', - :'committed_on' => :'committed_on', - :'created_by' => :'created_by', :'created_on' => :'created_on', :'customer_id' => :'customer_id', - :'deleted' => :'deleted', :'description' => :'description', - :'disposition_id' => :'disposition_id', - :'enabled' => :'enabled', - :'field_values' => :'field_values', - :'instance_id' => :'instance_id', - :'instance_version' => :'instance_version', - :'magic_cookie' => :'magic_cookie', - :'modified_by' => :'modified_by', - :'modified_on' => :'modified_on', + :'id' => :'id', + :'last_updated_on' => :'last_updated_on', :'name' => :'name', - :'pattern_id' => :'pattern_id', - :'pattern_severity' => :'pattern_severity', - :'rulegroup_id' => :'rulegroup_id', - :'ruletype_id' => :'ruletype_id', - :'ruletype_name' => :'ruletype_name', - :'version_ids' => :'version_ids' + :'operation' => :'operation', + :'rule_id' => :'rule_id', + :'search' => :'search', + :'severity' => :'severity', + :'state' => :'state', + :'status' => :'status', + :'tactic' => :'tactic', + :'technique' => :'technique', + :'template_id' => :'template_id', + :'user_id' => :'user_id', + :'user_uuid' => :'user_uuid', + :'version' => :'version' } end @@ -115,29 +106,26 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'action_label' => :'String', + :'api_client_id' => :'String', :'comment' => :'String', - :'committed_on' => :'Time', - :'created_by' => :'String', :'created_on' => :'Time', :'customer_id' => :'String', - :'deleted' => :'Boolean', :'description' => :'String', - :'disposition_id' => :'Integer', - :'enabled' => :'Boolean', - :'field_values' => :'Array', - :'instance_id' => :'String', - :'instance_version' => :'Integer', - :'magic_cookie' => :'Integer', - :'modified_by' => :'String', - :'modified_on' => :'Time', + :'id' => :'String', + :'last_updated_on' => :'Time', :'name' => :'String', - :'pattern_id' => :'String', - :'pattern_severity' => :'String', - :'rulegroup_id' => :'String', - :'ruletype_id' => :'String', - :'ruletype_name' => :'String', - :'version_ids' => :'Array' + :'operation' => :'ApiRuleOperationV1', + :'rule_id' => :'String', + :'search' => :'ApiRuleSearchV1', + :'severity' => :'Integer', + :'state' => :'String', + :'status' => :'String', + :'tactic' => :'String', + :'technique' => :'String', + :'template_id' => :'String', + :'user_id' => :'String', + :'user_uuid' => :'String', + :'version' => :'Integer' } end @@ -162,22 +150,14 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'action_label') - self.action_label = attributes[:'action_label'] + if attributes.key?(:'api_client_id') + self.api_client_id = attributes[:'api_client_id'] end if attributes.key?(:'comment') self.comment = attributes[:'comment'] end - if attributes.key?(:'committed_on') - self.committed_on = attributes[:'committed_on'] - end - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - if attributes.key?(:'created_on') self.created_on = attributes[:'created_on'] end @@ -186,76 +166,68 @@ def initialize(attributes = {}) self.customer_id = attributes[:'customer_id'] end - if attributes.key?(:'deleted') - self.deleted = attributes[:'deleted'] - end - if attributes.key?(:'description') self.description = attributes[:'description'] end - if attributes.key?(:'disposition_id') - self.disposition_id = attributes[:'disposition_id'] + if attributes.key?(:'id') + self.id = attributes[:'id'] end - if attributes.key?(:'enabled') - self.enabled = attributes[:'enabled'] + if attributes.key?(:'last_updated_on') + self.last_updated_on = attributes[:'last_updated_on'] end - if attributes.key?(:'field_values') - if (value = attributes[:'field_values']).is_a?(Array) - self.field_values = value - end + if attributes.key?(:'name') + self.name = attributes[:'name'] end - if attributes.key?(:'instance_id') - self.instance_id = attributes[:'instance_id'] + if attributes.key?(:'operation') + self.operation = attributes[:'operation'] end - if attributes.key?(:'instance_version') - self.instance_version = attributes[:'instance_version'] + if attributes.key?(:'rule_id') + self.rule_id = attributes[:'rule_id'] end - if attributes.key?(:'magic_cookie') - self.magic_cookie = attributes[:'magic_cookie'] + if attributes.key?(:'search') + self.search = attributes[:'search'] end - if attributes.key?(:'modified_by') - self.modified_by = attributes[:'modified_by'] + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] end - if attributes.key?(:'modified_on') - self.modified_on = attributes[:'modified_on'] + if attributes.key?(:'state') + self.state = attributes[:'state'] end - if attributes.key?(:'name') - self.name = attributes[:'name'] + if attributes.key?(:'status') + self.status = attributes[:'status'] end - if attributes.key?(:'pattern_id') - self.pattern_id = attributes[:'pattern_id'] + if attributes.key?(:'tactic') + self.tactic = attributes[:'tactic'] end - if attributes.key?(:'pattern_severity') - self.pattern_severity = attributes[:'pattern_severity'] + if attributes.key?(:'technique') + self.technique = attributes[:'technique'] end - if attributes.key?(:'rulegroup_id') - self.rulegroup_id = attributes[:'rulegroup_id'] + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] end - if attributes.key?(:'ruletype_id') - self.ruletype_id = attributes[:'ruletype_id'] + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] end - if attributes.key?(:'ruletype_name') - self.ruletype_name = attributes[:'ruletype_name'] + if attributes.key?(:'user_uuid') + self.user_uuid = attributes[:'user_uuid'] end - if attributes.key?(:'version_ids') - if (value = attributes[:'version_ids']).is_a?(Array) - self.version_ids = value - end + if attributes.key?(:'version') + self.version = attributes[:'version'] end end @@ -263,20 +235,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @action_label.nil? - invalid_properties.push('invalid value for "action_label", action_label cannot be nil.') - end - - if @comment.nil? - invalid_properties.push('invalid value for "comment", comment cannot be nil.') - end - - if @committed_on.nil? - invalid_properties.push('invalid value for "committed_on", committed_on cannot be nil.') - end - - if @created_by.nil? - invalid_properties.push('invalid value for "created_by", created_by cannot be nil.') + if @api_client_id.nil? + invalid_properties.push('invalid value for "api_client_id", api_client_id cannot be nil.') end if @created_on.nil? @@ -287,72 +247,52 @@ def list_invalid_properties invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.') end - if @deleted.nil? - invalid_properties.push('invalid value for "deleted", deleted cannot be nil.') - end - - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') - end - - if @disposition_id.nil? - invalid_properties.push('invalid value for "disposition_id", disposition_id cannot be nil.') - end - - if @enabled.nil? - invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') - end - - if @field_values.nil? - invalid_properties.push('invalid value for "field_values", field_values cannot be nil.') - end - - if @instance_id.nil? - invalid_properties.push('invalid value for "instance_id", instance_id cannot be nil.') + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') end - if @instance_version.nil? - invalid_properties.push('invalid value for "instance_version", instance_version cannot be nil.') + if @last_updated_on.nil? + invalid_properties.push('invalid value for "last_updated_on", last_updated_on cannot be nil.') end - if @magic_cookie.nil? - invalid_properties.push('invalid value for "magic_cookie", magic_cookie cannot be nil.') + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') end - if @modified_by.nil? - invalid_properties.push('invalid value for "modified_by", modified_by cannot be nil.') + if @operation.nil? + invalid_properties.push('invalid value for "operation", operation cannot be nil.') end - if @modified_on.nil? - invalid_properties.push('invalid value for "modified_on", modified_on cannot be nil.') + if @search.nil? + invalid_properties.push('invalid value for "search", search cannot be nil.') end - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') end - if @pattern_id.nil? - invalid_properties.push('invalid value for "pattern_id", pattern_id cannot be nil.') + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') end - if @pattern_severity.nil? - invalid_properties.push('invalid value for "pattern_severity", pattern_severity cannot be nil.') + if @tactic.nil? + invalid_properties.push('invalid value for "tactic", tactic cannot be nil.') end - if @rulegroup_id.nil? - invalid_properties.push('invalid value for "rulegroup_id", rulegroup_id cannot be nil.') + if @technique.nil? + invalid_properties.push('invalid value for "technique", technique cannot be nil.') end - if @ruletype_id.nil? - invalid_properties.push('invalid value for "ruletype_id", ruletype_id cannot be nil.') + if @template_id.nil? + invalid_properties.push('invalid value for "template_id", template_id cannot be nil.') end - if @ruletype_name.nil? - invalid_properties.push('invalid value for "ruletype_name", ruletype_name cannot be nil.') + if @user_id.nil? + invalid_properties.push('invalid value for "user_id", user_id cannot be nil.') end - if @version_ids.nil? - invalid_properties.push('invalid value for "version_ids", version_ids cannot be nil.') + if @user_uuid.nil? + invalid_properties.push('invalid value for "user_uuid", user_uuid cannot be nil.') end invalid_properties @@ -361,29 +301,21 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @action_label.nil? - return false if @comment.nil? - return false if @committed_on.nil? - return false if @created_by.nil? + return false if @api_client_id.nil? return false if @created_on.nil? return false if @customer_id.nil? - return false if @deleted.nil? - return false if @description.nil? - return false if @disposition_id.nil? - return false if @enabled.nil? - return false if @field_values.nil? - return false if @instance_id.nil? - return false if @instance_version.nil? - return false if @magic_cookie.nil? - return false if @modified_by.nil? - return false if @modified_on.nil? + return false if @id.nil? + return false if @last_updated_on.nil? return false if @name.nil? - return false if @pattern_id.nil? - return false if @pattern_severity.nil? - return false if @rulegroup_id.nil? - return false if @ruletype_id.nil? - return false if @ruletype_name.nil? - return false if @version_ids.nil? + return false if @operation.nil? + return false if @search.nil? + return false if @severity.nil? + return false if @status.nil? + return false if @tactic.nil? + return false if @technique.nil? + return false if @template_id.nil? + return false if @user_id.nil? + return false if @user_uuid.nil? true end @@ -392,29 +324,26 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - action_label == o.action_label && + api_client_id == o.api_client_id && comment == o.comment && - committed_on == o.committed_on && - created_by == o.created_by && created_on == o.created_on && customer_id == o.customer_id && - deleted == o.deleted && description == o.description && - disposition_id == o.disposition_id && - enabled == o.enabled && - field_values == o.field_values && - instance_id == o.instance_id && - instance_version == o.instance_version && - magic_cookie == o.magic_cookie && - modified_by == o.modified_by && - modified_on == o.modified_on && + id == o.id && + last_updated_on == o.last_updated_on && name == o.name && - pattern_id == o.pattern_id && - pattern_severity == o.pattern_severity && - rulegroup_id == o.rulegroup_id && - ruletype_id == o.ruletype_id && - ruletype_name == o.ruletype_name && - version_ids == o.version_ids + operation == o.operation && + rule_id == o.rule_id && + search == o.search && + severity == o.severity && + state == o.state && + status == o.status && + tactic == o.tactic && + technique == o.technique && + template_id == o.template_id && + user_id == o.user_id && + user_uuid == o.user_uuid && + version == o.version end # @see the `==` method @@ -426,7 +355,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [action_label, comment, committed_on, created_by, created_on, customer_id, deleted, description, disposition_id, enabled, field_values, instance_id, instance_version, magic_cookie, modified_by, modified_on, name, pattern_id, pattern_severity, rulegroup_id, ruletype_id, ruletype_name, version_ids].hash + [api_client_id, comment, created_on, customer_id, description, id, last_updated_on, name, operation, rule_id, search, severity, state, status, tactic, technique, template_id, user_id, user_uuid, version].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/apidomain_saved_search_execute_request_v1.rb b/lib/crimson-falcon/models/apidomain_saved_search_execute_request_v1.rb index 9674871d..ac4202d2 100644 --- a/lib/crimson-falcon/models/apidomain_saved_search_execute_request_v1.rb +++ b/lib/crimson-falcon/models/apidomain_saved_search_execute_request_v1.rb @@ -32,20 +32,8 @@ module Falcon class ApidomainSavedSearchExecuteRequestV1 - attr_accessor :extra_rename - - attr_accessor :extra_search - - attr_accessor :extra_sort - - attr_accessor :extra_where - - attr_accessor :parameters - attr_accessor :_end - attr_accessor :fql_statements - attr_accessor :id attr_accessor :mode @@ -67,13 +55,7 @@ class ApidomainSavedSearchExecuteRequestV1 # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'extra_rename' => :'ExtraRename', - :'extra_search' => :'ExtraSearch', - :'extra_sort' => :'ExtraSort', - :'extra_where' => :'ExtraWhere', - :'parameters' => :'Parameters', :'_end' => :'end', - :'fql_statements' => :'fql_statements', :'id' => :'id', :'mode' => :'mode', :'name' => :'name', @@ -94,13 +76,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'extra_rename' => :'String', - :'extra_search' => :'String', - :'extra_sort' => :'String', - :'extra_where' => :'String', - :'parameters' => :'Hash', :'_end' => :'String', - :'fql_statements' => :'Hash', :'id' => :'String', :'mode' => :'String', :'name' => :'String', @@ -134,38 +110,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'extra_rename') - self.extra_rename = attributes[:'extra_rename'] - end - - if attributes.key?(:'extra_search') - self.extra_search = attributes[:'extra_search'] - end - - if attributes.key?(:'extra_sort') - self.extra_sort = attributes[:'extra_sort'] - end - - if attributes.key?(:'extra_where') - self.extra_where = attributes[:'extra_where'] - end - - if attributes.key?(:'parameters') - if (value = attributes[:'parameters']).is_a?(Hash) - self.parameters = value - end - end - if attributes.key?(:'_end') self._end = attributes[:'_end'] end - if attributes.key?(:'fql_statements') - if (value = attributes[:'fql_statements']).is_a?(Hash) - self.fql_statements = value - end - end - if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -209,42 +157,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @extra_rename.nil? - invalid_properties.push('invalid value for "extra_rename", extra_rename cannot be nil.') - end - - if @extra_search.nil? - invalid_properties.push('invalid value for "extra_search", extra_search cannot be nil.') - end - - if @extra_sort.nil? - invalid_properties.push('invalid value for "extra_sort", extra_sort cannot be nil.') - end - - if @extra_where.nil? - invalid_properties.push('invalid value for "extra_where", extra_where cannot be nil.') - end - - if @parameters.nil? - invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') - end - - if @fql_statements.nil? - invalid_properties.push('invalid value for "fql_statements", fql_statements cannot be nil.') - end - invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @extra_rename.nil? - return false if @extra_search.nil? - return false if @extra_sort.nil? - return false if @extra_where.nil? - return false if @parameters.nil? - return false if @fql_statements.nil? true end @@ -253,13 +171,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - extra_rename == o.extra_rename && - extra_search == o.extra_search && - extra_sort == o.extra_sort && - extra_where == o.extra_where && - parameters == o.parameters && _end == o._end && - fql_statements == o.fql_statements && id == o.id && mode == o.mode && name == o.name && @@ -280,7 +192,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [extra_rename, extra_search, extra_sort, extra_where, parameters, _end, fql_statements, id, mode, name, start, version, with_in, with_limit, with_renames, with_sort].hash + [_end, id, mode, name, start, version, with_in, with_limit, with_renames, with_sort].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/assets_get_resource_ids_response.rb b/lib/crimson-falcon/models/assets_get_resource_ids_response.rb new file mode 100644 index 00000000..c03803a3 --- /dev/null +++ b/lib/crimson-falcon/models/assets_get_resource_ids_response.rb @@ -0,0 +1,261 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class AssetsGetResourceIDsResponse + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'RestCursorAndLimitMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::AssetsGetResourceIDsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::AssetsGetResourceIDsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/assets_get_resources_response.rb b/lib/crimson-falcon/models/assets_get_resources_response.rb new file mode 100644 index 00000000..c85d97bc --- /dev/null +++ b/lib/crimson-falcon/models/assets_get_resources_response.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class AssetsGetResourcesResponse + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'RestCursorMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::AssetsGetResourcesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::AssetsGetResourcesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/base_set_content_update_policy_precedence_req_v1.rb b/lib/crimson-falcon/models/base_set_content_update_policy_precedence_req_v1.rb new file mode 100644 index 00000000..bf6261d1 --- /dev/null +++ b/lib/crimson-falcon/models/base_set_content_update_policy_precedence_req_v1.rb @@ -0,0 +1,242 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class BaseSetContentUpdatePolicyPrecedenceReqV1 + # The ids of all current content-update policies for the platform specified. The precedence will be set in the order the ids are specified + attr_accessor :ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids' => :'ids' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ids') + if (value = attributes[:'ids']).is_a?(Array) + self.ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @ids.nil? + invalid_properties.push('invalid value for "ids", ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ids == o.ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/content_update_create_policies_req_v1.rb b/lib/crimson-falcon/models/content_update_create_policies_req_v1.rb new file mode 100644 index 00000000..242cb047 --- /dev/null +++ b/lib/crimson-falcon/models/content_update_create_policies_req_v1.rb @@ -0,0 +1,241 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ContentUpdateCreatePoliciesReqV1 + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ContentUpdateCreatePoliciesReqV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ContentUpdateCreatePoliciesReqV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/content_update_create_policy_req_v1.rb b/lib/crimson-falcon/models/content_update_create_policy_req_v1.rb new file mode 100644 index 00000000..a97b1142 --- /dev/null +++ b/lib/crimson-falcon/models/content_update_create_policy_req_v1.rb @@ -0,0 +1,259 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ContentUpdateCreatePolicyReqV1 + # The description to use when creating the policy + attr_accessor :description + + # The name to use when creating the policy + attr_accessor :name + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'String', + :'name' => :'String', + :'settings' => :'ContentUpdateSettingsV1' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ContentUpdateCreatePolicyReqV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ContentUpdateCreatePolicyReqV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + name == o.name && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [description, name, settings].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/content_update_ring_assignment_settings_v1.rb b/lib/crimson-falcon/models/content_update_ring_assignment_settings_v1.rb new file mode 100644 index 00000000..b474e8eb --- /dev/null +++ b/lib/crimson-falcon/models/content_update_ring_assignment_settings_v1.rb @@ -0,0 +1,253 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ContentUpdateRingAssignmentSettingsV1 + attr_accessor :id + + attr_accessor :ring_assignment + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'ring_assignment' => :'ring_assignment' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'ring_assignment' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ContentUpdateRingAssignmentSettingsV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ContentUpdateRingAssignmentSettingsV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'ring_assignment') + self.ring_assignment = attributes[:'ring_assignment'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @ring_assignment.nil? + invalid_properties.push('invalid value for "ring_assignment", ring_assignment cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @ring_assignment.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + ring_assignment == o.ring_assignment + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, ring_assignment].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/content_update_settings_v1.rb b/lib/crimson-falcon/models/content_update_settings_v1.rb new file mode 100644 index 00000000..d05343be --- /dev/null +++ b/lib/crimson-falcon/models/content_update_settings_v1.rb @@ -0,0 +1,241 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ContentUpdateSettingsV1 + attr_accessor :ring_assignment_settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ring_assignment_settings' => :'ring_assignment_settings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ring_assignment_settings' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ContentUpdateSettingsV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ContentUpdateSettingsV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ring_assignment_settings') + if (value = attributes[:'ring_assignment_settings']).is_a?(Array) + self.ring_assignment_settings = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @ring_assignment_settings.nil? + invalid_properties.push('invalid value for "ring_assignment_settings", ring_assignment_settings cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @ring_assignment_settings.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ring_assignment_settings == o.ring_assignment_settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ring_assignment_settings].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/content_update_update_policies_req_v1.rb b/lib/crimson-falcon/models/content_update_update_policies_req_v1.rb new file mode 100644 index 00000000..c12cb7ae --- /dev/null +++ b/lib/crimson-falcon/models/content_update_update_policies_req_v1.rb @@ -0,0 +1,241 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ContentUpdateUpdatePoliciesReqV1 + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ContentUpdateUpdatePoliciesReqV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ContentUpdateUpdatePoliciesReqV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/content_update_update_policy_req_v1.rb b/lib/crimson-falcon/models/content_update_update_policy_req_v1.rb new file mode 100644 index 00000000..a65cb45b --- /dev/null +++ b/lib/crimson-falcon/models/content_update_update_policy_req_v1.rb @@ -0,0 +1,269 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ContentUpdateUpdatePolicyReqV1 + # The new description to assign to the policy + attr_accessor :description + + # The id of the policy to update + attr_accessor :id + + # The new name to assign to the policy + attr_accessor :name + + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'id' => :'id', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'String', + :'id' => :'String', + :'name' => :'String', + :'settings' => :'ContentUpdateSettingsV1' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ContentUpdateUpdatePolicyReqV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ContentUpdateUpdatePolicyReqV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + id == o.id && + name == o.name && + settings == o.settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [description, id, name, settings].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/dataclassifications_label.rb b/lib/crimson-falcon/models/dataclassifications_label.rb new file mode 100644 index 00000000..77216d76 --- /dev/null +++ b/lib/crimson-falcon/models/dataclassifications_label.rb @@ -0,0 +1,267 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DataclassificationsLabel + attr_accessor :label_id + + attr_accessor :label_name + + attr_accessor :last_seen + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'label_id' => :'label_id', + :'label_name' => :'label_name', + :'last_seen' => :'last_seen' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'label_id' => :'String', + :'label_name' => :'String', + :'last_seen' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DataclassificationsLabel` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DataclassificationsLabel`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'label_id') + self.label_id = attributes[:'label_id'] + end + + if attributes.key?(:'label_name') + self.label_name = attributes[:'label_name'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @label_id.nil? + invalid_properties.push('invalid value for "label_id", label_id cannot be nil.') + end + + if @label_name.nil? + invalid_properties.push('invalid value for "label_name", label_name cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @label_id.nil? + return false if @label_name.nil? + return false if @last_seen.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + label_id == o.label_id && + label_name == o.label_name && + last_seen == o.last_seen + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [label_id, label_name, last_seen].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/dataclassifications_response.rb b/lib/crimson-falcon/models/dataclassifications_response.rb new file mode 100644 index 00000000..5f8c7269 --- /dev/null +++ b/lib/crimson-falcon/models/dataclassifications_response.rb @@ -0,0 +1,284 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DataclassificationsResponse + attr_accessor :found + + attr_accessor :labels + + attr_accessor :last_updated + + attr_accessor :scanned + + attr_accessor :tags + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'found' => :'found', + :'labels' => :'labels', + :'last_updated' => :'last_updated', + :'scanned' => :'scanned', + :'tags' => :'tags' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'found' => :'Boolean', + :'labels' => :'Hash', + :'last_updated' => :'Time', + :'scanned' => :'Boolean', + :'tags' => :'Hash' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DataclassificationsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DataclassificationsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'found') + self.found = attributes[:'found'] + end + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Hash) + self.labels = value + end + end + + if attributes.key?(:'last_updated') + self.last_updated = attributes[:'last_updated'] + end + + if attributes.key?(:'scanned') + self.scanned = attributes[:'scanned'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Hash) + self.tags = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @found.nil? + invalid_properties.push('invalid value for "found", found cannot be nil.') + end + + if @scanned.nil? + invalid_properties.push('invalid value for "scanned", scanned cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @found.nil? + return false if @scanned.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + found == o.found && + labels == o.labels && + last_updated == o.last_updated && + scanned == o.scanned && + tags == o.tags + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [found, labels, last_updated, scanned, tags].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/dataclassifications_tag.rb b/lib/crimson-falcon/models/dataclassifications_tag.rb new file mode 100644 index 00000000..ed75001b --- /dev/null +++ b/lib/crimson-falcon/models/dataclassifications_tag.rb @@ -0,0 +1,283 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DataclassificationsTag + attr_accessor :labels + + attr_accessor :last_seen + + attr_accessor :tag_id + + attr_accessor :tag_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'labels' => :'labels', + :'last_seen' => :'last_seen', + :'tag_id' => :'tag_id', + :'tag_name' => :'tag_name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'labels' => :'Hash', + :'last_seen' => :'Time', + :'tag_id' => :'String', + :'tag_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DataclassificationsTag` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DataclassificationsTag`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Hash) + self.labels = value + end + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'tag_id') + self.tag_id = attributes[:'tag_id'] + end + + if attributes.key?(:'tag_name') + self.tag_name = attributes[:'tag_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @labels.nil? + invalid_properties.push('invalid value for "labels", labels cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @tag_id.nil? + invalid_properties.push('invalid value for "tag_id", tag_id cannot be nil.') + end + + if @tag_name.nil? + invalid_properties.push('invalid value for "tag_name", tag_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @labels.nil? + return false if @last_seen.nil? + return false if @tag_id.nil? + return false if @tag_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + labels == o.labels && + last_seen == o.last_seen && + tag_id == o.tag_id && + tag_name == o.tag_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [labels, last_seen, tag_id, tag_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/deployments_api_deployment_ring_view.rb b/lib/crimson-falcon/models/deployments_api_deployment_ring_view.rb new file mode 100644 index 00000000..56c9faa4 --- /dev/null +++ b/lib/crimson-falcon/models/deployments_api_deployment_ring_view.rb @@ -0,0 +1,302 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DeploymentsAPIDeploymentRingView + attr_accessor :complete_timestamp + + attr_accessor :gates + + attr_accessor :id + + attr_accessor :name + + attr_accessor :ramping_schedule + + attr_accessor :start_timestamp + + attr_accessor :threshold + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'complete_timestamp' => :'complete_timestamp', + :'gates' => :'gates', + :'id' => :'id', + :'name' => :'name', + :'ramping_schedule' => :'ramping_schedule', + :'start_timestamp' => :'start_timestamp', + :'threshold' => :'threshold' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'complete_timestamp' => :'Time', + :'gates' => :'Array', + :'id' => :'String', + :'name' => :'String', + :'ramping_schedule' => :'Array', + :'start_timestamp' => :'Time', + :'threshold' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DeploymentsAPIDeploymentRingView` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DeploymentsAPIDeploymentRingView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'complete_timestamp') + self.complete_timestamp = attributes[:'complete_timestamp'] + end + + if attributes.key?(:'gates') + if (value = attributes[:'gates']).is_a?(Array) + self.gates = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'ramping_schedule') + if (value = attributes[:'ramping_schedule']).is_a?(Array) + self.ramping_schedule = value + end + end + + if attributes.key?(:'start_timestamp') + self.start_timestamp = attributes[:'start_timestamp'] + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + complete_timestamp == o.complete_timestamp && + gates == o.gates && + id == o.id && + name == o.name && + ramping_schedule == o.ramping_schedule && + start_timestamp == o.start_timestamp && + threshold == o.threshold + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [complete_timestamp, gates, id, name, ramping_schedule, start_timestamp, threshold].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/deployments_api_deployment_view.rb b/lib/crimson-falcon/models/deployments_api_deployment_view.rb new file mode 100644 index 00000000..c11c9b78 --- /dev/null +++ b/lib/crimson-falcon/models/deployments_api_deployment_view.rb @@ -0,0 +1,309 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DeploymentsAPIDeploymentView + attr_accessor :complete_timestamp + + attr_accessor :id + + attr_accessor :modified_by + + attr_accessor :modified_timestamp + + attr_accessor :rings + + attr_accessor :start_timestamp + + attr_accessor :status + + attr_accessor :template_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'complete_timestamp' => :'complete_timestamp', + :'id' => :'id', + :'modified_by' => :'modified_by', + :'modified_timestamp' => :'modified_timestamp', + :'rings' => :'rings', + :'start_timestamp' => :'start_timestamp', + :'status' => :'status', + :'template_id' => :'template_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'complete_timestamp' => :'Time', + :'id' => :'String', + :'modified_by' => :'String', + :'modified_timestamp' => :'Time', + :'rings' => :'Array', + :'start_timestamp' => :'Time', + :'status' => :'String', + :'template_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DeploymentsAPIDeploymentView` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DeploymentsAPIDeploymentView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'complete_timestamp') + self.complete_timestamp = attributes[:'complete_timestamp'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'modified_timestamp') + self.modified_timestamp = attributes[:'modified_timestamp'] + end + + if attributes.key?(:'rings') + if (value = attributes[:'rings']).is_a?(Array) + self.rings = value + end + end + + if attributes.key?(:'start_timestamp') + self.start_timestamp = attributes[:'start_timestamp'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + complete_timestamp == o.complete_timestamp && + id == o.id && + modified_by == o.modified_by && + modified_timestamp == o.modified_timestamp && + rings == o.rings && + start_timestamp == o.start_timestamp && + status == o.status && + template_id == o.template_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [complete_timestamp, id, modified_by, modified_timestamp, rings, start_timestamp, status, template_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/deployments_api_deployment_view_wrapper.rb b/lib/crimson-falcon/models/deployments_api_deployment_view_wrapper.rb new file mode 100644 index 00000000..b1162438 --- /dev/null +++ b/lib/crimson-falcon/models/deployments_api_deployment_view_wrapper.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DeploymentsAPIDeploymentViewWrapper + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DeploymentsAPIDeploymentViewWrapper` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DeploymentsAPIDeploymentViewWrapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_meta.rb b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_meta.rb new file mode 100644 index 00000000..859a0b82 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_meta.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DetectsapiPostCombinedAlertsV1Meta + attr_accessor :pagination + + attr_accessor :powered_by + + attr_accessor :query_time + + attr_accessor :trace_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pagination' => :'pagination', + :'powered_by' => :'powered_by', + :'query_time' => :'query_time', + :'trace_id' => :'trace_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'pagination' => :'DetectsapiPostCombinedAlertsV1Paging', + :'powered_by' => :'String', + :'query_time' => :'Float', + :'trace_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DetectsapiPostCombinedAlertsV1Meta` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DetectsapiPostCombinedAlertsV1Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'pagination') + self.pagination = attributes[:'pagination'] + end + + if attributes.key?(:'powered_by') + self.powered_by = attributes[:'powered_by'] + end + + if attributes.key?(:'query_time') + self.query_time = attributes[:'query_time'] + end + + if attributes.key?(:'trace_id') + self.trace_id = attributes[:'trace_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @query_time.nil? + invalid_properties.push('invalid value for "query_time", query_time cannot be nil.') + end + + if @trace_id.nil? + invalid_properties.push('invalid value for "trace_id", trace_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @query_time.nil? + return false if @trace_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pagination == o.pagination && + powered_by == o.powered_by && + query_time == o.query_time && + trace_id == o.trace_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [pagination, powered_by, query_time, trace_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_paging.rb b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_paging.rb new file mode 100644 index 00000000..9f1e5c9f --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_paging.rb @@ -0,0 +1,262 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DetectsapiPostCombinedAlertsV1Paging + attr_accessor :after + + attr_accessor :limit + + attr_accessor :total + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'after' => :'after', + :'limit' => :'limit', + :'total' => :'total' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'after' => :'String', + :'limit' => :'Integer', + :'total' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DetectsapiPostCombinedAlertsV1Paging` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DetectsapiPostCombinedAlertsV1Paging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'after') + self.after = attributes[:'after'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @limit.nil? + invalid_properties.push('invalid value for "limit", limit cannot be nil.') + end + + if @total.nil? + invalid_properties.push('invalid value for "total", total cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @limit.nil? + return false if @total.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + after == o.after && + limit == o.limit && + total == o.total + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [after, limit, total].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_request_swagger.rb b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_request_swagger.rb new file mode 100644 index 00000000..3f7b6885 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_request_swagger.rb @@ -0,0 +1,261 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DetectsapiPostCombinedAlertsV1RequestSwagger + attr_accessor :after + + attr_accessor :filter + + attr_accessor :limit + + attr_accessor :sort + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'after' => :'after', + :'filter' => :'filter', + :'limit' => :'limit', + :'sort' => :'sort' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'after' => :'String', + :'filter' => :'String', + :'limit' => :'Integer', + :'sort' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'after') + self.after = attributes[:'after'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + after == o.after && + filter == o.filter && + limit == o.limit && + sort == o.sort + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [after, filter, limit, sort].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_response_swagger.rb b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_response_swagger.rb new file mode 100644 index 00000000..530793cc --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_post_combined_alerts_v1_response_swagger.rb @@ -0,0 +1,272 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DetectsapiPostCombinedAlertsV1ResponseSwagger + attr_accessor :errors + + attr_accessor :meta + + # Resources represent the slice of Alerts that were retrieved + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'DetectsapiPostCombinedAlertsV1Meta', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/device_control_usb_class_exceptions_req_v1.rb b/lib/crimson-falcon/models/device_control_usb_class_exceptions_req_v1.rb index 4f10803c..8cf63daf 100644 --- a/lib/crimson-falcon/models/device_control_usb_class_exceptions_req_v1.rb +++ b/lib/crimson-falcon/models/device_control_usb_class_exceptions_req_v1.rb @@ -32,7 +32,7 @@ module Falcon class DeviceControlUSBClassExceptionsReqV1 - # Policy action + # Policy action. Note: BLOCK_EXECUTE is only valid for MASS_STORAGE devices. attr_accessor :action # Exceptions to the rules of this policy setting @@ -145,7 +145,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @action.nil? - action_validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "READ_ONLY", "BLOCK_EXECUTE"]) + action_validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "BLOCK_EXECUTE", "READ_ONLY", "BLOCK_EXECUTE"]) return false unless action_validator.valid?(@action) return false if @exceptions.nil? return false if @id.nil? @@ -155,7 +155,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] action Object to be assigned def action=(action) - validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "READ_ONLY", "BLOCK_EXECUTE"]) + validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "BLOCK_EXECUTE", "READ_ONLY", "BLOCK_EXECUTE"]) unless validator.valid?(action) fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}." end diff --git a/lib/crimson-falcon/models/device_control_usb_class_exceptions_response.rb b/lib/crimson-falcon/models/device_control_usb_class_exceptions_response.rb index 9ab77371..a8f908ac 100644 --- a/lib/crimson-falcon/models/device_control_usb_class_exceptions_response.rb +++ b/lib/crimson-falcon/models/device_control_usb_class_exceptions_response.rb @@ -32,7 +32,7 @@ module Falcon class DeviceControlUSBClassExceptionsResponse - # Policy action + # Policy action. Note: BLOCK_EXECUTE is only valid for MASS_STORAGE devices. attr_accessor :action # Exceptions to the rules of this policy setting @@ -145,7 +145,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @action.nil? - action_validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "READ_ONLY", "BLOCK_EXECUTE"]) + action_validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "BLOCK_EXECUTE", "READ_ONLY", "BLOCK_EXECUTE"]) return false unless action_validator.valid?(@action) return false if @exceptions.nil? return false if @id.nil? @@ -155,7 +155,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] action Object to be assigned def action=(action) - validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "READ_ONLY", "BLOCK_EXECUTE"]) + validator = EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "BLOCK_EXECUTE", "READ_ONLY", "BLOCK_EXECUTE"]) unless validator.valid?(action) fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}." end diff --git a/lib/crimson-falcon/models/devicecontent_content_category.rb b/lib/crimson-falcon/models/devicecontent_content_category.rb new file mode 100644 index 00000000..912ae3b7 --- /dev/null +++ b/lib/crimson-falcon/models/devicecontent_content_category.rb @@ -0,0 +1,234 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DevicecontentContentCategory + attr_accessor :last_update + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'last_update' => :'last_update' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'last_update' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DevicecontentContentCategory` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DevicecontentContentCategory`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'last_update') + self.last_update = attributes[:'last_update'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + last_update == o.last_update + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [last_update].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/devicecontent_state.rb b/lib/crimson-falcon/models/devicecontent_state.rb new file mode 100644 index 00000000..fe7c7dc0 --- /dev/null +++ b/lib/crimson-falcon/models/devicecontent_state.rb @@ -0,0 +1,345 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DevicecontentState + attr_accessor :cid + + attr_accessor :device_id + + attr_accessor :groups + + attr_accessor :hidden_status + + attr_accessor :hostname + + attr_accessor :last_seen + + attr_accessor :platform_name + + attr_accessor :rapid_response_content + + attr_accessor :reduced_functionality_mode + + attr_accessor :sensor_operations + + attr_accessor :system_critical + + attr_accessor :vulnerability_management + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cid' => :'cid', + :'device_id' => :'device_id', + :'groups' => :'groups', + :'hidden_status' => :'hidden_status', + :'hostname' => :'hostname', + :'last_seen' => :'last_seen', + :'platform_name' => :'platform_name', + :'rapid_response_content' => :'rapid_response_content', + :'reduced_functionality_mode' => :'reduced_functionality_mode', + :'sensor_operations' => :'sensor_operations', + :'system_critical' => :'system_critical', + :'vulnerability_management' => :'vulnerability_management' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cid' => :'String', + :'device_id' => :'String', + :'groups' => :'Array', + :'hidden_status' => :'String', + :'hostname' => :'String', + :'last_seen' => :'String', + :'platform_name' => :'String', + :'rapid_response_content' => :'DevicecontentContentCategory', + :'reduced_functionality_mode' => :'String', + :'sensor_operations' => :'DevicecontentContentCategory', + :'system_critical' => :'DevicecontentContentCategory', + :'vulnerability_management' => :'DevicecontentContentCategory' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DevicecontentState` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DevicecontentState`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'device_id') + self.device_id = attributes[:'device_id'] + end + + if attributes.key?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = value + end + end + + if attributes.key?(:'hidden_status') + self.hidden_status = attributes[:'hidden_status'] + end + + if attributes.key?(:'hostname') + self.hostname = attributes[:'hostname'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'platform_name') + self.platform_name = attributes[:'platform_name'] + end + + if attributes.key?(:'rapid_response_content') + self.rapid_response_content = attributes[:'rapid_response_content'] + end + + if attributes.key?(:'reduced_functionality_mode') + self.reduced_functionality_mode = attributes[:'reduced_functionality_mode'] + end + + if attributes.key?(:'sensor_operations') + self.sensor_operations = attributes[:'sensor_operations'] + end + + if attributes.key?(:'system_critical') + self.system_critical = attributes[:'system_critical'] + end + + if attributes.key?(:'vulnerability_management') + self.vulnerability_management = attributes[:'vulnerability_management'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @device_id.nil? + invalid_properties.push('invalid value for "device_id", device_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @cid.nil? + return false if @device_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cid == o.cid && + device_id == o.device_id && + groups == o.groups && + hidden_status == o.hidden_status && + hostname == o.hostname && + last_seen == o.last_seen && + platform_name == o.platform_name && + rapid_response_content == o.rapid_response_content && + reduced_functionality_mode == o.reduced_functionality_mode && + sensor_operations == o.sensor_operations && + system_critical == o.system_critical && + vulnerability_management == o.vulnerability_management + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cid, device_id, groups, hidden_status, hostname, last_seen, platform_name, rapid_response_content, reduced_functionality_mode, sensor_operations, system_critical, vulnerability_management].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/devicecontentapi_entities_response_v1.rb b/lib/crimson-falcon/models/devicecontentapi_entities_response_v1.rb new file mode 100644 index 00000000..48aae919 --- /dev/null +++ b/lib/crimson-falcon/models/devicecontentapi_entities_response_v1.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DevicecontentapiEntitiesResponseV1 + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DevicecontentapiEntitiesResponseV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DevicecontentapiEntitiesResponseV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/devicecontentapi_query_response_v1.rb b/lib/crimson-falcon/models/devicecontentapi_query_response_v1.rb new file mode 100644 index 00000000..de8e145a --- /dev/null +++ b/lib/crimson-falcon/models/devicecontentapi_query_response_v1.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DevicecontentapiQueryResponseV1 + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DevicecontentapiQueryResponseV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DevicecontentapiQueryResponseV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/domain_aws_account_resource_metadata.rb b/lib/crimson-falcon/models/domain_aws_account_resource_metadata.rb index 70748f38..1892bf22 100644 --- a/lib/crimson-falcon/models/domain_aws_account_resource_metadata.rb +++ b/lib/crimson-falcon/models/domain_aws_account_resource_metadata.rb @@ -32,6 +32,14 @@ module Falcon class DomainAWSAccountResourceMetadata + attr_accessor :created_at + + attr_accessor :deleted_at + + attr_accessor :id + + attr_accessor :updated_at + # AWS CloudTrail bucket name to store logs. attr_accessor :aws_cloudtrail_bucket_name @@ -41,6 +49,8 @@ class DomainAWSAccountResourceMetadata # AWS Eventbus ARN. attr_accessor :aws_eventbus_arn + attr_accessor :cid + attr_accessor :eventbus_name # ID assigned for use with cross account IAM role access. @@ -54,9 +64,14 @@ class DomainAWSAccountResourceMetadata # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'created_at' => :'CreatedAt', + :'deleted_at' => :'DeletedAt', + :'id' => :'ID', + :'updated_at' => :'UpdatedAt', :'aws_cloudtrail_bucket_name' => :'aws_cloudtrail_bucket_name', :'aws_cloudtrail_region' => :'aws_cloudtrail_region', :'aws_eventbus_arn' => :'aws_eventbus_arn', + :'cid' => :'cid', :'eventbus_name' => :'eventbus_name', :'external_id' => :'external_id', :'iam_role_arn' => :'iam_role_arn', @@ -72,9 +87,14 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'created_at' => :'Time', + :'deleted_at' => :'Time', + :'id' => :'Integer', + :'updated_at' => :'Time', :'aws_cloudtrail_bucket_name' => :'String', :'aws_cloudtrail_region' => :'String', :'aws_eventbus_arn' => :'String', + :'cid' => :'String', :'eventbus_name' => :'String', :'external_id' => :'String', :'iam_role_arn' => :'String', @@ -103,6 +123,22 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + if attributes.key?(:'aws_cloudtrail_bucket_name') self.aws_cloudtrail_bucket_name = attributes[:'aws_cloudtrail_bucket_name'] end @@ -115,6 +151,10 @@ def initialize(attributes = {}) self.aws_eventbus_arn = attributes[:'aws_eventbus_arn'] end + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + if attributes.key?(:'eventbus_name') self.eventbus_name = attributes[:'eventbus_name'] end @@ -136,12 +176,32 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @deleted_at.nil? + invalid_properties.push('invalid value for "deleted_at", deleted_at cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + invalid_properties end # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @created_at.nil? + return false if @deleted_at.nil? + return false if @id.nil? + return false if @updated_at.nil? true end @@ -150,9 +210,14 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + created_at == o.created_at && + deleted_at == o.deleted_at && + id == o.id && + updated_at == o.updated_at && aws_cloudtrail_bucket_name == o.aws_cloudtrail_bucket_name && aws_cloudtrail_region == o.aws_cloudtrail_region && aws_eventbus_arn == o.aws_eventbus_arn && + cid == o.cid && eventbus_name == o.eventbus_name && external_id == o.external_id && iam_role_arn == o.iam_role_arn && @@ -168,7 +233,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [aws_cloudtrail_bucket_name, aws_cloudtrail_region, aws_eventbus_arn, eventbus_name, external_id, iam_role_arn, intermediate_role_arn].hash + [created_at, deleted_at, id, updated_at, aws_cloudtrail_bucket_name, aws_cloudtrail_region, aws_eventbus_arn, cid, eventbus_name, external_id, iam_role_arn, intermediate_role_arn].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_benchmark.rb b/lib/crimson-falcon/models/domain_benchmark.rb index 5ac61e49..b6593775 100644 --- a/lib/crimson-falcon/models/domain_benchmark.rb +++ b/lib/crimson-falcon/models/domain_benchmark.rb @@ -32,6 +32,8 @@ module Falcon class DomainBenchmark + attr_accessor :applicable_profiles + attr_accessor :benchmark_short attr_accessor :id @@ -41,6 +43,7 @@ class DomainBenchmark # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'applicable_profiles' => :'applicable_profiles', :'benchmark_short' => :'benchmark_short', :'id' => :'id', :'recommendation_number' => :'recommendation_number' @@ -55,6 +58,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'applicable_profiles' => :'Array', :'benchmark_short' => :'String', :'id' => :'Integer', :'recommendation_number' => :'String' @@ -82,6 +86,12 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'applicable_profiles') + if (value = attributes[:'applicable_profiles']).is_a?(Array) + self.applicable_profiles = value + end + end + if attributes.key?(:'benchmark_short') self.benchmark_short = attributes[:'benchmark_short'] end @@ -128,6 +138,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + applicable_profiles == o.applicable_profiles && benchmark_short == o.benchmark_short && id == o.id && recommendation_number == o.recommendation_number @@ -142,7 +153,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [benchmark_short, id, recommendation_number].hash + [applicable_profiles, benchmark_short, id, recommendation_number].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_content_update_policy_resp_v1.rb b/lib/crimson-falcon/models/domain_content_update_policy_resp_v1.rb new file mode 100644 index 00000000..9b105f0b --- /dev/null +++ b/lib/crimson-falcon/models/domain_content_update_policy_resp_v1.rb @@ -0,0 +1,474 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DomainContentUpdatePolicyRespV1 + attr_accessor :assignment_rule + + attr_accessor :assignment_type + + attr_accessor :channel_version + + attr_accessor :cid + + attr_accessor :created_by + + attr_accessor :created_timestamp + + attr_accessor :description + + attr_accessor :enabled + + attr_accessor :groups + + attr_accessor :id + + attr_accessor :modified_by + + attr_accessor :modified_timestamp + + attr_accessor :name + + attr_accessor :platform_id + + attr_accessor :platform_name + + attr_accessor :precedence + + attr_accessor :settings + + attr_accessor :settings_hash + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assignment_rule' => :'assignment_rule', + :'assignment_type' => :'assignment_type', + :'channel_version' => :'channel_version', + :'cid' => :'cid', + :'created_by' => :'created_by', + :'created_timestamp' => :'created_timestamp', + :'description' => :'description', + :'enabled' => :'enabled', + :'groups' => :'groups', + :'id' => :'id', + :'modified_by' => :'modified_by', + :'modified_timestamp' => :'modified_timestamp', + :'name' => :'name', + :'platform_id' => :'platform_id', + :'platform_name' => :'platform_name', + :'precedence' => :'precedence', + :'settings' => :'settings', + :'settings_hash' => :'settings_hash' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'assignment_rule' => :'String', + :'assignment_type' => :'String', + :'channel_version' => :'Integer', + :'cid' => :'String', + :'created_by' => :'String', + :'created_timestamp' => :'Time', + :'description' => :'String', + :'enabled' => :'Boolean', + :'groups' => :'Array', + :'id' => :'String', + :'modified_by' => :'String', + :'modified_timestamp' => :'Time', + :'name' => :'String', + :'platform_id' => :'String', + :'platform_name' => :'String', + :'precedence' => :'Integer', + :'settings' => :'DomainContentUpdateSettingsV1', + :'settings_hash' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainContentUpdatePolicyRespV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainContentUpdatePolicyRespV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'assignment_rule') + self.assignment_rule = attributes[:'assignment_rule'] + end + + if attributes.key?(:'assignment_type') + self.assignment_type = attributes[:'assignment_type'] + end + + if attributes.key?(:'channel_version') + self.channel_version = attributes[:'channel_version'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'created_timestamp') + self.created_timestamp = attributes[:'created_timestamp'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'modified_by') + self.modified_by = attributes[:'modified_by'] + end + + if attributes.key?(:'modified_timestamp') + self.modified_timestamp = attributes[:'modified_timestamp'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'platform_id') + self.platform_id = attributes[:'platform_id'] + end + + if attributes.key?(:'platform_name') + self.platform_name = attributes[:'platform_name'] + end + + if attributes.key?(:'precedence') + self.precedence = attributes[:'precedence'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + + if attributes.key?(:'settings_hash') + self.settings_hash = attributes[:'settings_hash'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @assignment_rule.nil? + invalid_properties.push('invalid value for "assignment_rule", assignment_rule cannot be nil.') + end + + if @assignment_type.nil? + invalid_properties.push('invalid value for "assignment_type", assignment_type cannot be nil.') + end + + if @channel_version.nil? + invalid_properties.push('invalid value for "channel_version", channel_version cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @created_by.nil? + invalid_properties.push('invalid value for "created_by", created_by cannot be nil.') + end + + if @created_timestamp.nil? + invalid_properties.push('invalid value for "created_timestamp", created_timestamp cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + if @groups.nil? + invalid_properties.push('invalid value for "groups", groups cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @modified_by.nil? + invalid_properties.push('invalid value for "modified_by", modified_by cannot be nil.') + end + + if @modified_timestamp.nil? + invalid_properties.push('invalid value for "modified_timestamp", modified_timestamp cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @platform_id.nil? + invalid_properties.push('invalid value for "platform_id", platform_id cannot be nil.') + end + + if @platform_name.nil? + invalid_properties.push('invalid value for "platform_name", platform_name cannot be nil.') + end + + if @precedence.nil? + invalid_properties.push('invalid value for "precedence", precedence cannot be nil.') + end + + if @settings.nil? + invalid_properties.push('invalid value for "settings", settings cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @assignment_rule.nil? + return false if @assignment_type.nil? + return false if @channel_version.nil? + return false if @cid.nil? + return false if @created_by.nil? + return false if @created_timestamp.nil? + return false if @description.nil? + return false if @enabled.nil? + return false if @groups.nil? + return false if @id.nil? + return false if @modified_by.nil? + return false if @modified_timestamp.nil? + return false if @name.nil? + return false if @platform_id.nil? + return false if @platform_name.nil? + return false if @precedence.nil? + return false if @settings.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assignment_rule == o.assignment_rule && + assignment_type == o.assignment_type && + channel_version == o.channel_version && + cid == o.cid && + created_by == o.created_by && + created_timestamp == o.created_timestamp && + description == o.description && + enabled == o.enabled && + groups == o.groups && + id == o.id && + modified_by == o.modified_by && + modified_timestamp == o.modified_timestamp && + name == o.name && + platform_id == o.platform_id && + platform_name == o.platform_name && + precedence == o.precedence && + settings == o.settings && + settings_hash == o.settings_hash + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [assignment_rule, assignment_type, channel_version, cid, created_by, created_timestamp, description, enabled, groups, id, modified_by, modified_timestamp, name, platform_id, platform_name, precedence, settings, settings_hash].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/domain_content_update_settings_v1.rb b/lib/crimson-falcon/models/domain_content_update_settings_v1.rb new file mode 100644 index 00000000..2f74d2a9 --- /dev/null +++ b/lib/crimson-falcon/models/domain_content_update_settings_v1.rb @@ -0,0 +1,241 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DomainContentUpdateSettingsV1 + attr_accessor :ring_assignment_settings + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ring_assignment_settings' => :'ring_assignment_settings' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ring_assignment_settings' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainContentUpdateSettingsV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainContentUpdateSettingsV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ring_assignment_settings') + if (value = attributes[:'ring_assignment_settings']).is_a?(Array) + self.ring_assignment_settings = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @ring_assignment_settings.nil? + invalid_properties.push('invalid value for "ring_assignment_settings", ring_assignment_settings cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @ring_assignment_settings.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ring_assignment_settings == o.ring_assignment_settings + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ring_assignment_settings].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/domain_discover_api_active_discovery_host.rb b/lib/crimson-falcon/models/domain_discover_api_active_discovery_host.rb index ac240d23..70bf9abb 100644 --- a/lib/crimson-falcon/models/domain_discover_api_active_discovery_host.rb +++ b/lib/crimson-falcon/models/domain_discover_api_active_discovery_host.rb @@ -33,6 +33,12 @@ module Falcon # Information obtained from active discovery. class DomainDiscoverAPIActiveDiscoveryHost + # The ID of the network where the host was last seen + attr_accessor :last_seen_network_id + + # The ID of the site where the host was last seen + attr_accessor :last_seen_site_id + # The open ports discovered on the asset. attr_accessor :networks @@ -42,6 +48,8 @@ class DomainDiscoverAPIActiveDiscoveryHost # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'last_seen_network_id' => :'last_seen_network_id', + :'last_seen_site_id' => :'last_seen_site_id', :'networks' => :'networks', :'open_ports' => :'open_ports' } @@ -55,6 +63,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'last_seen_network_id' => :'String', + :'last_seen_site_id' => :'String', :'networks' => :'Array', :'open_ports' => :'Array' } @@ -81,6 +91,14 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'last_seen_network_id') + self.last_seen_network_id = attributes[:'last_seen_network_id'] + end + + if attributes.key?(:'last_seen_site_id') + self.last_seen_site_id = attributes[:'last_seen_site_id'] + end + if attributes.key?(:'networks') if (value = attributes[:'networks']).is_a?(Array) self.networks = value @@ -112,6 +130,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + last_seen_network_id == o.last_seen_network_id && + last_seen_site_id == o.last_seen_site_id && networks == o.networks && open_ports == o.open_ports end @@ -125,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [networks, open_ports].hash + [last_seen_network_id, last_seen_site_id, networks, open_ports].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_discover_api_application_host.rb b/lib/crimson-falcon/models/domain_discover_api_application_host.rb index 06d33409..ac7cf935 100644 --- a/lib/crimson-falcon/models/domain_discover_api_application_host.rb +++ b/lib/crimson-falcon/models/domain_discover_api_application_host.rb @@ -75,6 +75,9 @@ class DomainDiscoverAPIApplicationHost # The organizational unit of the asset. attr_accessor :ou + # The organizational units of the asset. + attr_accessor :ous + # The platform name of the asset (Windows, Mac, Linux). attr_accessor :platform_name @@ -107,6 +110,7 @@ def self.attribute_map :'machine_domain' => :'machine_domain', :'os_version' => :'os_version', :'ou' => :'ou', + :'ous' => :'ous', :'platform_name' => :'platform_name', :'product_type_desc' => :'product_type_desc', :'site_name' => :'site_name', @@ -137,6 +141,7 @@ def self.openapi_types :'machine_domain' => :'String', :'os_version' => :'String', :'ou' => :'String', + :'ous' => :'Array', :'platform_name' => :'String', :'product_type_desc' => :'String', :'site_name' => :'String', @@ -224,6 +229,12 @@ def initialize(attributes = {}) self.ou = attributes[:'ou'] end + if attributes.key?(:'ous') + if (value = attributes[:'ous']).is_a?(Array) + self.ous = value + end + end + if attributes.key?(:'platform_name') self.platform_name = attributes[:'platform_name'] end @@ -284,6 +295,7 @@ def ==(o) machine_domain == o.machine_domain && os_version == o.os_version && ou == o.ou && + ous == o.ous && platform_name == o.platform_name && product_type_desc == o.product_type_desc && site_name == o.site_name && @@ -300,7 +312,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_version, aid, country, current_mac_address, current_network_prefix, external_ip, groups, hostname, id, internet_exposure, kernel_version, machine_domain, os_version, ou, platform_name, product_type_desc, site_name, system_manufacturer, tags].hash + [agent_version, aid, country, current_mac_address, current_network_prefix, external_ip, groups, hostname, id, internet_exposure, kernel_version, machine_domain, os_version, ou, ous, platform_name, product_type_desc, site_name, system_manufacturer, tags].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_discover_api_host.rb b/lib/crimson-falcon/models/domain_discover_api_host.rb index 47ec2d0b..7cbce234 100644 --- a/lib/crimson-falcon/models/domain_discover_api_host.rb +++ b/lib/crimson-falcon/models/domain_discover_api_host.rb @@ -40,6 +40,9 @@ class DomainDiscoverAPIHost # The user account control properties in Active Directory. attr_accessor :ad_user_account_control + # Whether the asset is a virtual server or not (Yes, No) + attr_accessor :ad_virtual_server + # The version of the Falcon sensor that's installed on the asset. attr_accessor :agent_version @@ -112,6 +115,9 @@ class DomainDiscoverAPIHost # The cloud provider assigned identifier of the instance. attr_accessor :cloud_resource_id + # The composite internet exposure of the asset + attr_accessor :composite_internet_exposure + # The asset role or roles assigned to the asset automatically (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). attr_accessor :computed_asset_roles @@ -369,6 +375,9 @@ class DomainDiscoverAPIHost # The organizational unit of the asset. attr_accessor :ou + # The organizational units of the asset. + attr_accessor :ous + # Whether a user overrode automatically assigned asset roles to manually assign a role to the asset (true or false). attr_accessor :override_asset_roles @@ -485,6 +494,7 @@ def self.attribute_map :'account_enabled' => :'account_enabled', :'active_discovery' => :'active_discovery', :'ad_user_account_control' => :'ad_user_account_control', + :'ad_virtual_server' => :'ad_virtual_server', :'agent_version' => :'agent_version', :'aid' => :'aid', :'asset_roles' => :'asset_roles', @@ -509,6 +519,7 @@ def self.attribute_map :'cloud_region' => :'cloud_region', :'cloud_registered' => :'cloud_registered', :'cloud_resource_id' => :'cloud_resource_id', + :'composite_internet_exposure' => :'composite_internet_exposure', :'computed_asset_roles' => :'computed_asset_roles', :'computed_internet_exposure' => :'computed_internet_exposure', :'computed_internet_exposure_external_ip' => :'computed_internet_exposure_external_ip', @@ -595,6 +606,7 @@ def self.attribute_map :'ot_network_ids' => :'ot_network_ids', :'ot_serial_numbers' => :'ot_serial_numbers', :'ou' => :'ou', + :'ous' => :'ous', :'override_asset_roles' => :'override_asset_roles', :'override_criticality_rules' => :'override_criticality_rules', :'override_internet_exposure' => :'override_internet_exposure', @@ -646,6 +658,7 @@ def self.openapi_types :'account_enabled' => :'String', :'active_discovery' => :'DomainDiscoverAPIActiveDiscoveryHost', :'ad_user_account_control' => :'Integer', + :'ad_virtual_server' => :'String', :'agent_version' => :'String', :'aid' => :'String', :'asset_roles' => :'Array', @@ -670,6 +683,7 @@ def self.openapi_types :'cloud_region' => :'String', :'cloud_registered' => :'Boolean', :'cloud_resource_id' => :'String', + :'composite_internet_exposure' => :'String', :'computed_asset_roles' => :'Array', :'computed_internet_exposure' => :'String', :'computed_internet_exposure_external_ip' => :'String', @@ -756,6 +770,7 @@ def self.openapi_types :'ot_network_ids' => :'Array', :'ot_serial_numbers' => :'Array', :'ou' => :'String', + :'ous' => :'Array', :'override_asset_roles' => :'Boolean', :'override_criticality_rules' => :'Boolean', :'override_internet_exposure' => :'Boolean', @@ -829,6 +844,10 @@ def initialize(attributes = {}) self.ad_user_account_control = attributes[:'ad_user_account_control'] end + if attributes.key?(:'ad_virtual_server') + self.ad_virtual_server = attributes[:'ad_virtual_server'] + end + if attributes.key?(:'agent_version') self.agent_version = attributes[:'agent_version'] end @@ -929,6 +948,10 @@ def initialize(attributes = {}) self.cloud_resource_id = attributes[:'cloud_resource_id'] end + if attributes.key?(:'composite_internet_exposure') + self.composite_internet_exposure = attributes[:'composite_internet_exposure'] + end + if attributes.key?(:'computed_asset_roles') if (value = attributes[:'computed_asset_roles']).is_a?(Array) self.computed_asset_roles = value @@ -1321,6 +1344,12 @@ def initialize(attributes = {}) self.ou = attributes[:'ou'] end + if attributes.key?(:'ous') + if (value = attributes[:'ous']).is_a?(Array) + self.ous = value + end + end + if attributes.key?(:'override_asset_roles') self.override_asset_roles = attributes[:'override_asset_roles'] end @@ -1511,6 +1540,7 @@ def ==(o) account_enabled == o.account_enabled && active_discovery == o.active_discovery && ad_user_account_control == o.ad_user_account_control && + ad_virtual_server == o.ad_virtual_server && agent_version == o.agent_version && aid == o.aid && asset_roles == o.asset_roles && @@ -1535,6 +1565,7 @@ def ==(o) cloud_region == o.cloud_region && cloud_registered == o.cloud_registered && cloud_resource_id == o.cloud_resource_id && + composite_internet_exposure == o.composite_internet_exposure && computed_asset_roles == o.computed_asset_roles && computed_internet_exposure == o.computed_internet_exposure && computed_internet_exposure_external_ip == o.computed_internet_exposure_external_ip && @@ -1621,6 +1652,7 @@ def ==(o) ot_network_ids == o.ot_network_ids && ot_serial_numbers == o.ot_serial_numbers && ou == o.ou && + ous == o.ous && override_asset_roles == o.override_asset_roles && override_criticality_rules == o.override_criticality_rules && override_internet_exposure == o.override_internet_exposure && @@ -1669,7 +1701,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_enabled, active_discovery, ad_user_account_control, agent_version, aid, asset_roles, assigned_to, available_disk_space, available_disk_space_pct, average_memory_usage, average_memory_usage_pct, average_processor_usage, bios_hashes_data, bios_id, bios_manufacturer, bios_version, business_criticality, cid, city, claroty_id, classification, cloud_account_id, cloud_instance_id, cloud_provider, cloud_region, cloud_registered, cloud_resource_id, computed_asset_roles, computed_internet_exposure, computed_internet_exposure_external_ip, computed_internet_exposure_last_seen, confidence, country, cpu_manufacturer, cpu_processor_name, creation_timestamp, criticality, criticality_description, criticality_rule_id, criticality_timestamp, criticality_username, current_local_ip, current_network_prefix, data_providers, data_providers_count, department, descriptions, device_class, device_family, device_mode, device_slots, device_type, discoverer_aids, discoverer_count, discoverer_criticalities, discoverer_hostnames, discoverer_ics_collector_ids, discoverer_platform_names, discoverer_product_type_descs, discoverer_tags, discovering_by, disk_sizes, dragos_id, email, encrypted_drives, encrypted_drives_count, encryption_status, entity_type, external_ip, field_metadata, first_discoverer_aid, first_seen_timestamp, form_factor, fqdn, groups, hostname, ics_id, id, internet_exposure, internet_exposure_description, internet_exposure_timestamp, internet_exposure_username, kernel_version, last_discoverer_aid, last_discoverer_hostname, last_discoverer_ics_collector_id, last_seen_timestamp, local_ip_addresses, local_ips_count, location, logical_core_count, mac_addresses, machine_domain, managed_by, max_memory_usage, max_memory_usage_pct, max_processor_usage, memory_total, mount_storage_info, network_id, network_interfaces, network_scanned_ids, number_of_disk_drives, object_guid, object_sid, os_is_eol, os_security, os_service_pack, os_version, ot_information_sources, ot_network_ids, ot_serial_numbers, ou, override_asset_roles, override_criticality_rules, override_internet_exposure, owned_by, physical_core_count, platform_name, processor_package_count, product_type, product_type_desc, protocols, purdue_level, qualys_id, qualys_network_id, reduced_functionality_mode, servicenow_id, site_name, state, subnet, system_manufacturer, system_product_name, system_serial_number, tags, tenableio_id, total_bios_files, total_disk_space, total_memory, triage, unencrypted_drives, unencrypted_drives_count, used_disk_space, used_disk_space_pct, used_for, user_asset_roles, user_internet_exposure, virtual_zone, vlan, xdome_id].hash + [account_enabled, active_discovery, ad_user_account_control, ad_virtual_server, agent_version, aid, asset_roles, assigned_to, available_disk_space, available_disk_space_pct, average_memory_usage, average_memory_usage_pct, average_processor_usage, bios_hashes_data, bios_id, bios_manufacturer, bios_version, business_criticality, cid, city, claroty_id, classification, cloud_account_id, cloud_instance_id, cloud_provider, cloud_region, cloud_registered, cloud_resource_id, composite_internet_exposure, computed_asset_roles, computed_internet_exposure, computed_internet_exposure_external_ip, computed_internet_exposure_last_seen, confidence, country, cpu_manufacturer, cpu_processor_name, creation_timestamp, criticality, criticality_description, criticality_rule_id, criticality_timestamp, criticality_username, current_local_ip, current_network_prefix, data_providers, data_providers_count, department, descriptions, device_class, device_family, device_mode, device_slots, device_type, discoverer_aids, discoverer_count, discoverer_criticalities, discoverer_hostnames, discoverer_ics_collector_ids, discoverer_platform_names, discoverer_product_type_descs, discoverer_tags, discovering_by, disk_sizes, dragos_id, email, encrypted_drives, encrypted_drives_count, encryption_status, entity_type, external_ip, field_metadata, first_discoverer_aid, first_seen_timestamp, form_factor, fqdn, groups, hostname, ics_id, id, internet_exposure, internet_exposure_description, internet_exposure_timestamp, internet_exposure_username, kernel_version, last_discoverer_aid, last_discoverer_hostname, last_discoverer_ics_collector_id, last_seen_timestamp, local_ip_addresses, local_ips_count, location, logical_core_count, mac_addresses, machine_domain, managed_by, max_memory_usage, max_memory_usage_pct, max_processor_usage, memory_total, mount_storage_info, network_id, network_interfaces, network_scanned_ids, number_of_disk_drives, object_guid, object_sid, os_is_eol, os_security, os_service_pack, os_version, ot_information_sources, ot_network_ids, ot_serial_numbers, ou, ous, override_asset_roles, override_criticality_rules, override_internet_exposure, owned_by, physical_core_count, platform_name, processor_package_count, product_type, product_type_desc, protocols, purdue_level, qualys_id, qualys_network_id, reduced_functionality_mode, servicenow_id, site_name, state, subnet, system_manufacturer, system_product_name, system_serial_number, tags, tenableio_id, total_bios_files, total_disk_space, total_memory, triage, unencrypted_drives, unencrypted_drives_count, used_disk_space, used_disk_space_pct, used_for, user_asset_roles, user_internet_exposure, virtual_zone, vlan, xdome_id].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_discover_apiio_t_host.rb b/lib/crimson-falcon/models/domain_discover_apiio_t_host.rb index c63a8cf2..f62fc8f6 100644 --- a/lib/crimson-falcon/models/domain_discover_apiio_t_host.rb +++ b/lib/crimson-falcon/models/domain_discover_apiio_t_host.rb @@ -38,6 +38,9 @@ class DomainDiscoverAPIIoTHost # The user account control properties in Active Directory. attr_accessor :ad_user_account_control + # Whether the asset is a virtual server or not (Yes, No) + attr_accessor :ad_virtual_server + # The version of the Falcon sensor that's installed on the asset. attr_accessor :agent_version @@ -92,6 +95,9 @@ class DomainDiscoverAPIIoTHost # How the server is classified, such as production, development, disaster recovery, or user acceptance testing. attr_accessor :classification + # The composite internet exposure of the asset + attr_accessor :composite_internet_exposure + # The asset role or roles assigned to the asset automatically (Jump host, Highly connected, Highly active, Server by behavior, DHCP server, DNS server, FTP server, SSH server, or Web server). attr_accessor :computed_asset_roles @@ -346,6 +352,9 @@ class DomainDiscoverAPIIoTHost # The organizational unit of the asset. attr_accessor :ou + # The organizational units of the asset. + attr_accessor :ous + # Whether a user overrode automatically assigned asset roles to manually assign a role to the asset (true or false). attr_accessor :override_asset_roles @@ -452,6 +461,7 @@ def self.attribute_map { :'account_enabled' => :'account_enabled', :'ad_user_account_control' => :'ad_user_account_control', + :'ad_virtual_server' => :'ad_virtual_server', :'agent_version' => :'agent_version', :'aid' => :'aid', :'asset_roles' => :'asset_roles', @@ -470,6 +480,7 @@ def self.attribute_map :'city' => :'city', :'claroty_id' => :'claroty_id', :'classification' => :'classification', + :'composite_internet_exposure' => :'composite_internet_exposure', :'computed_asset_roles' => :'computed_asset_roles', :'computed_internet_exposure' => :'computed_internet_exposure', :'computed_internet_exposure_external_ip' => :'computed_internet_exposure_external_ip', @@ -555,6 +566,7 @@ def self.attribute_map :'ot_network_ids' => :'ot_network_ids', :'ot_serial_numbers' => :'ot_serial_numbers', :'ou' => :'ou', + :'ous' => :'ous', :'override_asset_roles' => :'override_asset_roles', :'override_criticality_rules' => :'override_criticality_rules', :'override_internet_exposure' => :'override_internet_exposure', @@ -602,6 +614,7 @@ def self.openapi_types { :'account_enabled' => :'String', :'ad_user_account_control' => :'Integer', + :'ad_virtual_server' => :'String', :'agent_version' => :'String', :'aid' => :'String', :'asset_roles' => :'Array', @@ -620,6 +633,7 @@ def self.openapi_types :'city' => :'String', :'claroty_id' => :'String', :'classification' => :'String', + :'composite_internet_exposure' => :'String', :'computed_asset_roles' => :'Array', :'computed_internet_exposure' => :'String', :'computed_internet_exposure_external_ip' => :'String', @@ -705,6 +719,7 @@ def self.openapi_types :'ot_network_ids' => :'Array', :'ot_serial_numbers' => :'Array', :'ou' => :'String', + :'ous' => :'Array', :'override_asset_roles' => :'Boolean', :'override_criticality_rules' => :'Boolean', :'override_internet_exposure' => :'Boolean', @@ -771,6 +786,10 @@ def initialize(attributes = {}) self.ad_user_account_control = attributes[:'ad_user_account_control'] end + if attributes.key?(:'ad_virtual_server') + self.ad_virtual_server = attributes[:'ad_virtual_server'] + end + if attributes.key?(:'agent_version') self.agent_version = attributes[:'agent_version'] end @@ -847,6 +866,10 @@ def initialize(attributes = {}) self.classification = attributes[:'classification'] end + if attributes.key?(:'composite_internet_exposure') + self.composite_internet_exposure = attributes[:'composite_internet_exposure'] + end + if attributes.key?(:'computed_asset_roles') if (value = attributes[:'computed_asset_roles']).is_a?(Array) self.computed_asset_roles = value @@ -1233,6 +1256,12 @@ def initialize(attributes = {}) self.ou = attributes[:'ou'] end + if attributes.key?(:'ous') + if (value = attributes[:'ous']).is_a?(Array) + self.ous = value + end + end + if attributes.key?(:'override_asset_roles') self.override_asset_roles = attributes[:'override_asset_roles'] end @@ -1410,6 +1439,7 @@ def ==(o) self.class == o.class && account_enabled == o.account_enabled && ad_user_account_control == o.ad_user_account_control && + ad_virtual_server == o.ad_virtual_server && agent_version == o.agent_version && aid == o.aid && asset_roles == o.asset_roles && @@ -1428,6 +1458,7 @@ def ==(o) city == o.city && claroty_id == o.claroty_id && classification == o.classification && + composite_internet_exposure == o.composite_internet_exposure && computed_asset_roles == o.computed_asset_roles && computed_internet_exposure == o.computed_internet_exposure && computed_internet_exposure_external_ip == o.computed_internet_exposure_external_ip && @@ -1513,6 +1544,7 @@ def ==(o) ot_network_ids == o.ot_network_ids && ot_serial_numbers == o.ot_serial_numbers && ou == o.ou && + ous == o.ous && override_asset_roles == o.override_asset_roles && override_criticality_rules == o.override_criticality_rules && override_internet_exposure == o.override_internet_exposure && @@ -1558,7 +1590,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_enabled, ad_user_account_control, agent_version, aid, asset_roles, assigned_to, available_disk_space, available_disk_space_pct, average_memory_usage, average_memory_usage_pct, average_processor_usage, bios_hashes_data, bios_id, bios_manufacturer, bios_version, business_criticality, cid, city, claroty_id, classification, computed_asset_roles, computed_internet_exposure, computed_internet_exposure_external_ip, computed_internet_exposure_last_seen, confidence, country, cpu_manufacturer, cpu_processor_name, creation_timestamp, criticality, criticality_description, criticality_rule_id, criticality_timestamp, criticality_username, current_local_ip, current_network_prefix, data_providers, data_providers_count, department, descriptions, device_class, device_family, device_mode, device_slots, device_type, discoverer_aids, discoverer_count, discoverer_criticalities, discoverer_hostnames, discoverer_ics_collector_ids, discoverer_platform_names, discoverer_product_type_descs, discoverer_tags, discovering_by, disk_sizes, dragos_id, email, encrypted_drives, encrypted_drives_count, encryption_status, entity_type, external_ip, field_metadata, first_discoverer_aid, first_seen_timestamp, form_factor, fqdn, groups, hostname, ics_id, id, internet_exposure, internet_exposure_description, internet_exposure_timestamp, internet_exposure_username, kernel_version, last_discoverer_aid, last_discoverer_hostname, last_discoverer_ics_collector_id, last_seen_timestamp, local_ip_addresses, local_ips_count, location, logical_core_count, mac_addresses, machine_domain, managed_by, max_memory_usage, max_memory_usage_pct, max_processor_usage, memory_total, mount_storage_info, network_id, network_interfaces, number_of_disk_drives, object_guid, object_sid, os_is_eol, os_security, os_service_pack, os_version, ot_information_sources, ot_network_ids, ot_serial_numbers, ou, override_asset_roles, override_criticality_rules, override_internet_exposure, owned_by, physical_core_count, platform_name, processor_package_count, product_type, product_type_desc, protocols, purdue_level, reduced_functionality_mode, servicenow_id, site_name, state, subnet, system_manufacturer, system_product_name, system_serial_number, tags, total_bios_files, total_disk_space, total_memory, triage, unencrypted_drives, unencrypted_drives_count, used_disk_space, used_disk_space_pct, used_for, user_asset_roles, user_internet_exposure, virtual_zone, vlan, xdome_id].hash + [account_enabled, ad_user_account_control, ad_virtual_server, agent_version, aid, asset_roles, assigned_to, available_disk_space, available_disk_space_pct, average_memory_usage, average_memory_usage_pct, average_processor_usage, bios_hashes_data, bios_id, bios_manufacturer, bios_version, business_criticality, cid, city, claroty_id, classification, composite_internet_exposure, computed_asset_roles, computed_internet_exposure, computed_internet_exposure_external_ip, computed_internet_exposure_last_seen, confidence, country, cpu_manufacturer, cpu_processor_name, creation_timestamp, criticality, criticality_description, criticality_rule_id, criticality_timestamp, criticality_username, current_local_ip, current_network_prefix, data_providers, data_providers_count, department, descriptions, device_class, device_family, device_mode, device_slots, device_type, discoverer_aids, discoverer_count, discoverer_criticalities, discoverer_hostnames, discoverer_ics_collector_ids, discoverer_platform_names, discoverer_product_type_descs, discoverer_tags, discovering_by, disk_sizes, dragos_id, email, encrypted_drives, encrypted_drives_count, encryption_status, entity_type, external_ip, field_metadata, first_discoverer_aid, first_seen_timestamp, form_factor, fqdn, groups, hostname, ics_id, id, internet_exposure, internet_exposure_description, internet_exposure_timestamp, internet_exposure_username, kernel_version, last_discoverer_aid, last_discoverer_hostname, last_discoverer_ics_collector_id, last_seen_timestamp, local_ip_addresses, local_ips_count, location, logical_core_count, mac_addresses, machine_domain, managed_by, max_memory_usage, max_memory_usage_pct, max_processor_usage, memory_total, mount_storage_info, network_id, network_interfaces, number_of_disk_drives, object_guid, object_sid, os_is_eol, os_security, os_service_pack, os_version, ot_information_sources, ot_network_ids, ot_serial_numbers, ou, ous, override_asset_roles, override_criticality_rules, override_internet_exposure, owned_by, physical_core_count, platform_name, processor_package_count, product_type, product_type_desc, protocols, purdue_level, reduced_functionality_mode, servicenow_id, site_name, state, subnet, system_manufacturer, system_product_name, system_serial_number, tags, total_bios_files, total_disk_space, total_memory, triage, unencrypted_drives, unencrypted_drives_count, used_disk_space, used_disk_space_pct, used_for, user_asset_roles, user_internet_exposure, virtual_zone, vlan, xdome_id].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_kestrel_params.rb b/lib/crimson-falcon/models/domain_kestrel_params.rb new file mode 100644 index 00000000..4ae18778 --- /dev/null +++ b/lib/crimson-falcon/models/domain_kestrel_params.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DomainKestrelParams + attr_accessor :view_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'view_id' => :'view_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'view_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainKestrelParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainKestrelParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'view_id') + self.view_id = attributes[:'view_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @view_id.nil? + invalid_properties.push('invalid value for "view_id", view_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @view_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + view_id == o.view_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [view_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/domain_lookup_file.rb b/lib/crimson-falcon/models/domain_lookup_file.rb new file mode 100644 index 00000000..d597e5eb --- /dev/null +++ b/lib/crimson-falcon/models/domain_lookup_file.rb @@ -0,0 +1,453 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DomainLookupFile + attr_accessor :app_id + + attr_accessor :cid + + attr_accessor :contents_hash + + attr_accessor :created_by + + attr_accessor :created_timestamp + + attr_accessor :description + + attr_accessor :filename + + attr_accessor :format + + attr_accessor :id + + attr_accessor :last_modified_by + + attr_accessor :last_modified_timestamp + + attr_accessor :name + + attr_accessor :repo + + attr_accessor :size + + attr_accessor :status + + attr_accessor :version + + attr_accessor :version_numeric + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'app_id', + :'cid' => :'cid', + :'contents_hash' => :'contents_hash', + :'created_by' => :'created_by', + :'created_timestamp' => :'created_timestamp', + :'description' => :'description', + :'filename' => :'filename', + :'format' => :'format', + :'id' => :'id', + :'last_modified_by' => :'last_modified_by', + :'last_modified_timestamp' => :'last_modified_timestamp', + :'name' => :'name', + :'repo' => :'repo', + :'size' => :'size', + :'status' => :'status', + :'version' => :'version', + :'version_numeric' => :'version_numeric' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'String', + :'cid' => :'String', + :'contents_hash' => :'String', + :'created_by' => :'DomainUser', + :'created_timestamp' => :'Time', + :'description' => :'String', + :'filename' => :'String', + :'format' => :'String', + :'id' => :'String', + :'last_modified_by' => :'DomainUser', + :'last_modified_timestamp' => :'Time', + :'name' => :'String', + :'repo' => :'String', + :'size' => :'Integer', + :'status' => :'String', + :'version' => :'String', + :'version_numeric' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainLookupFile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainLookupFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'contents_hash') + self.contents_hash = attributes[:'contents_hash'] + end + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'created_timestamp') + self.created_timestamp = attributes[:'created_timestamp'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'filename') + self.filename = attributes[:'filename'] + end + + if attributes.key?(:'format') + self.format = attributes[:'format'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'last_modified_by') + self.last_modified_by = attributes[:'last_modified_by'] + end + + if attributes.key?(:'last_modified_timestamp') + self.last_modified_timestamp = attributes[:'last_modified_timestamp'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'repo') + self.repo = attributes[:'repo'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'version_numeric') + self.version_numeric = attributes[:'version_numeric'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @contents_hash.nil? + invalid_properties.push('invalid value for "contents_hash", contents_hash cannot be nil.') + end + + if @created_by.nil? + invalid_properties.push('invalid value for "created_by", created_by cannot be nil.') + end + + if @created_timestamp.nil? + invalid_properties.push('invalid value for "created_timestamp", created_timestamp cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @filename.nil? + invalid_properties.push('invalid value for "filename", filename cannot be nil.') + end + + if @format.nil? + invalid_properties.push('invalid value for "format", format cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @last_modified_by.nil? + invalid_properties.push('invalid value for "last_modified_by", last_modified_by cannot be nil.') + end + + if @last_modified_timestamp.nil? + invalid_properties.push('invalid value for "last_modified_timestamp", last_modified_timestamp cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @repo.nil? + invalid_properties.push('invalid value for "repo", repo cannot be nil.') + end + + if @size.nil? + invalid_properties.push('invalid value for "size", size cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + if @version_numeric.nil? + invalid_properties.push('invalid value for "version_numeric", version_numeric cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @contents_hash.nil? + return false if @created_by.nil? + return false if @created_timestamp.nil? + return false if @description.nil? + return false if @filename.nil? + return false if @format.nil? + return false if @id.nil? + return false if @last_modified_by.nil? + return false if @last_modified_timestamp.nil? + return false if @name.nil? + return false if @repo.nil? + return false if @size.nil? + return false if @status.nil? + return false if @version.nil? + return false if @version_numeric.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id && + cid == o.cid && + contents_hash == o.contents_hash && + created_by == o.created_by && + created_timestamp == o.created_timestamp && + description == o.description && + filename == o.filename && + format == o.format && + id == o.id && + last_modified_by == o.last_modified_by && + last_modified_timestamp == o.last_modified_timestamp && + name == o.name && + repo == o.repo && + size == o.size && + status == o.status && + version == o.version && + version_numeric == o.version_numeric + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id, cid, contents_hash, created_by, created_timestamp, description, filename, format, id, last_modified_by, last_modified_timestamp, name, repo, size, status, version, version_numeric].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/domain_lookup_file_wrapper.rb b/lib/crimson-falcon/models/domain_lookup_file_wrapper.rb new file mode 100644 index 00000000..c43db510 --- /dev/null +++ b/lib/crimson-falcon/models/domain_lookup_file_wrapper.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DomainLookupFileWrapper + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainLookupFileWrapper` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainLookupFileWrapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/domain_report_metadata.rb b/lib/crimson-falcon/models/domain_report_metadata.rb index 46f95cd8..dd88fc0d 100644 --- a/lib/crimson-falcon/models/domain_report_metadata.rb +++ b/lib/crimson-falcon/models/domain_report_metadata.rb @@ -38,6 +38,8 @@ class DomainReportMetadata attr_accessor :discover_params + attr_accessor :kestrel_params + attr_accessor :last_scheduled_execution attr_accessor :last_unscheduled_execution @@ -52,6 +54,7 @@ def self.attribute_map :'created_by_user_id' => :'created_by_user_id', :'created_by_uuid' => :'created_by_uuid', :'discover_params' => :'discover_params', + :'kestrel_params' => :'kestrel_params', :'last_scheduled_execution' => :'last_scheduled_execution', :'last_unscheduled_execution' => :'last_unscheduled_execution', :'subtype' => :'subtype', @@ -70,6 +73,7 @@ def self.openapi_types :'created_by_user_id' => :'String', :'created_by_uuid' => :'String', :'discover_params' => :'DomainDiscoverParams', + :'kestrel_params' => :'DomainKestrelParams', :'last_scheduled_execution' => :'DomainLastScheduledExecution', :'last_unscheduled_execution' => :'DomainLastUnscheduledExecution', :'subtype' => :'String', @@ -110,6 +114,10 @@ def initialize(attributes = {}) self.discover_params = attributes[:'discover_params'] end + if attributes.key?(:'kestrel_params') + self.kestrel_params = attributes[:'kestrel_params'] + end + if attributes.key?(:'last_scheduled_execution') self.last_scheduled_execution = attributes[:'last_scheduled_execution'] end @@ -168,6 +176,7 @@ def ==(o) created_by_user_id == o.created_by_user_id && created_by_uuid == o.created_by_uuid && discover_params == o.discover_params && + kestrel_params == o.kestrel_params && last_scheduled_execution == o.last_scheduled_execution && last_unscheduled_execution == o.last_unscheduled_execution && subtype == o.subtype && @@ -183,7 +192,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_by_user_id, created_by_uuid, discover_params, last_scheduled_execution, last_unscheduled_execution, subtype, xdr_params].hash + [created_by_user_id, created_by_uuid, discover_params, kestrel_params, last_scheduled_execution, last_unscheduled_execution, subtype, xdr_params].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_ring_assignment_settings_v1.rb b/lib/crimson-falcon/models/domain_ring_assignment_settings_v1.rb new file mode 100644 index 00000000..55e370e0 --- /dev/null +++ b/lib/crimson-falcon/models/domain_ring_assignment_settings_v1.rb @@ -0,0 +1,267 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class DomainRingAssignmentSettingsV1 + attr_accessor :id + + attr_accessor :override + + attr_accessor :ring_assignment + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'override' => :'override', + :'ring_assignment' => :'ring_assignment' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'override' => :'Integer', + :'ring_assignment' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainRingAssignmentSettingsV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainRingAssignmentSettingsV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'override') + self.override = attributes[:'override'] + end + + if attributes.key?(:'ring_assignment') + self.ring_assignment = attributes[:'ring_assignment'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @override.nil? + invalid_properties.push('invalid value for "override", override cannot be nil.') + end + + if @ring_assignment.nil? + invalid_properties.push('invalid value for "ring_assignment", ring_assignment cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @override.nil? + return false if @ring_assignment.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + override == o.override && + ring_assignment == o.ring_assignment + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, override, ring_assignment].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/domain_scheduled_report_v1.rb b/lib/crimson-falcon/models/domain_scheduled_report_v1.rb index 825a57c9..6f7aa904 100644 --- a/lib/crimson-falcon/models/domain_scheduled_report_v1.rb +++ b/lib/crimson-falcon/models/domain_scheduled_report_v1.rb @@ -32,6 +32,8 @@ module Falcon class DomainScheduledReportV1 + attr_accessor :api_client_id + attr_accessor :can_write attr_accessor :created_on @@ -83,6 +85,7 @@ class DomainScheduledReportV1 # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'api_client_id' => :'api_client_id', :'can_write' => :'can_write', :'created_on' => :'created_on', :'customer_id' => :'customer_id', @@ -118,6 +121,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'api_client_id' => :'String', :'can_write' => :'Boolean', :'created_on' => :'Time', :'customer_id' => :'String', @@ -166,6 +170,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'api_client_id') + self.api_client_id = attributes[:'api_client_id'] + end + if attributes.key?(:'can_write') self.can_write = attributes[:'can_write'] end @@ -271,6 +279,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @api_client_id.nil? + invalid_properties.push('invalid value for "api_client_id", api_client_id cannot be nil.') + end + if @created_on.nil? invalid_properties.push('invalid value for "created_on", created_on cannot be nil.') end @@ -333,6 +345,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @api_client_id.nil? return false if @created_on.nil? return false if @customer_id.nil? return false if @description.nil? @@ -355,6 +368,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + api_client_id == o.api_client_id && can_write == o.can_write && created_on == o.created_on && customer_id == o.customer_id && @@ -390,7 +404,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [can_write, created_on, customer_id, description, expiration_on, id, last_execution, last_updated_on, name, next_execution_on, notifications, owned_by_cs, report_metadata, report_params, schedule, shared_with, start_on, status, stop_on, tracking, trigger_reference, type, user_id, user_uuid].hash + [api_client_id, can_write, created_on, customer_id, description, expiration_on, id, last_execution, last_updated_on, name, next_execution_on, notifications, owned_by_cs, report_metadata, report_params, schedule, shared_with, start_on, status, stop_on, tracking, trigger_reference, type, user_id, user_uuid].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_update_rule_request_v1.rb b/lib/crimson-falcon/models/domain_update_rule_request_v1.rb index fb015b7c..395e2c3f 100644 --- a/lib/crimson-falcon/models/domain_update_rule_request_v1.rb +++ b/lib/crimson-falcon/models/domain_update_rule_request_v1.rb @@ -44,6 +44,9 @@ class DomainUpdateRuleRequestV1 # The rule ID to be updated attr_accessor :id + # Which result types to monitor for. Can be set to only monitor domains or subdomains, as well as both. Only available for the `Typosquatting` rule topic. + attr_accessor :match_on_tsq_result_types + # The name of a given rule attr_accessor :name @@ -63,6 +66,7 @@ def self.attribute_map :'breach_monitoring_enabled' => :'breach_monitoring_enabled', :'filter' => :'filter', :'id' => :'id', + :'match_on_tsq_result_types' => :'match_on_tsq_result_types', :'name' => :'name', :'permissions' => :'permissions', :'priority' => :'priority', @@ -82,6 +86,7 @@ def self.openapi_types :'breach_monitoring_enabled' => :'Boolean', :'filter' => :'String', :'id' => :'String', + :'match_on_tsq_result_types' => :'Array', :'name' => :'String', :'permissions' => :'String', :'priority' => :'String', @@ -126,6 +131,12 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'match_on_tsq_result_types') + if (value = attributes[:'match_on_tsq_result_types']).is_a?(Array) + self.match_on_tsq_result_types = value + end + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -163,6 +174,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "id", id cannot be nil.') end + if @match_on_tsq_result_types.nil? + invalid_properties.push('invalid value for "match_on_tsq_result_types", match_on_tsq_result_types cannot be nil.') + end + if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end @@ -189,6 +204,7 @@ def valid? return false if @breach_monitoring_enabled.nil? return false if @filter.nil? return false if @id.nil? + return false if @match_on_tsq_result_types.nil? return false if @name.nil? return false if @permissions.nil? return false if @priority.nil? @@ -205,6 +221,7 @@ def ==(o) breach_monitoring_enabled == o.breach_monitoring_enabled && filter == o.filter && id == o.id && + match_on_tsq_result_types == o.match_on_tsq_result_types && name == o.name && permissions == o.permissions && priority == o.priority && @@ -220,7 +237,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [breach_monitor_only, breach_monitoring_enabled, filter, id, name, permissions, priority, substring_matching_enabled].hash + [breach_monitor_only, breach_monitoring_enabled, filter, id, match_on_tsq_result_types, name, permissions, priority, substring_matching_enabled].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/figapi_adversary.rb b/lib/crimson-falcon/models/figapi_adversary.rb new file mode 100644 index 00000000..7c1c2efd --- /dev/null +++ b/lib/crimson-falcon/models/figapi_adversary.rb @@ -0,0 +1,235 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiAdversary + # Name of the adversary + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'Name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiAdversary` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiAdversary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_country.rb b/lib/crimson-falcon/models/figapi_country.rb new file mode 100644 index 00000000..39482ad9 --- /dev/null +++ b/lib/crimson-falcon/models/figapi_country.rb @@ -0,0 +1,245 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiCountry + # Two letters representation of the country name, e.g. `RO`, `US`, `RU`, etc. + attr_accessor :country_code + + # Full country name, e.g. `Romania`, `United States`, `Russian Federation` etc. + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'country_code' => :'CountryCode', + :'name' => :'Name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'country_code' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiCountry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiCountry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + country_code == o.country_code && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [country_code, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_domain.rb b/lib/crimson-falcon/models/figapi_domain.rb new file mode 100644 index 00000000..35d96011 --- /dev/null +++ b/lib/crimson-falcon/models/figapi_domain.rb @@ -0,0 +1,345 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiDomain + attr_accessor :creation_date + + attr_accessor :domain + + attr_accessor :domain_updated_date + + attr_accessor :email_addresses + + attr_accessor :expiration_date + + attr_accessor :ipv4_addresses + + attr_accessor :ipv6_addresses + + attr_accessor :mx_records + + attr_accessor :name_servers + + attr_accessor :registrar + + attr_accessor :registrar_status + + attr_accessor :who_is + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'creation_date' => :'CreationDate', + :'domain' => :'Domain', + :'domain_updated_date' => :'DomainUpdatedDate', + :'email_addresses' => :'EmailAddresses', + :'expiration_date' => :'ExpirationDate', + :'ipv4_addresses' => :'IPv4Addresses', + :'ipv6_addresses' => :'IPv6Addresses', + :'mx_records' => :'MXRecords', + :'name_servers' => :'NameServers', + :'registrar' => :'Registrar', + :'registrar_status' => :'RegistrarStatus', + :'who_is' => :'WhoIS' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'creation_date' => :'String', + :'domain' => :'String', + :'domain_updated_date' => :'String', + :'email_addresses' => :'Array', + :'expiration_date' => :'String', + :'ipv4_addresses' => :'Array', + :'ipv6_addresses' => :'Array', + :'mx_records' => :'Array', + :'name_servers' => :'Array', + :'registrar' => :'String', + :'registrar_status' => :'Array', + :'who_is' => :'FigapiWhoIS' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiDomain` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiDomain`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'creation_date') + self.creation_date = attributes[:'creation_date'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'domain_updated_date') + self.domain_updated_date = attributes[:'domain_updated_date'] + end + + if attributes.key?(:'email_addresses') + if (value = attributes[:'email_addresses']).is_a?(Array) + self.email_addresses = value + end + end + + if attributes.key?(:'expiration_date') + self.expiration_date = attributes[:'expiration_date'] + end + + if attributes.key?(:'ipv4_addresses') + if (value = attributes[:'ipv4_addresses']).is_a?(Array) + self.ipv4_addresses = value + end + end + + if attributes.key?(:'ipv6_addresses') + if (value = attributes[:'ipv6_addresses']).is_a?(Array) + self.ipv6_addresses = value + end + end + + if attributes.key?(:'mx_records') + if (value = attributes[:'mx_records']).is_a?(Array) + self.mx_records = value + end + end + + if attributes.key?(:'name_servers') + if (value = attributes[:'name_servers']).is_a?(Array) + self.name_servers = value + end + end + + if attributes.key?(:'registrar') + self.registrar = attributes[:'registrar'] + end + + if attributes.key?(:'registrar_status') + if (value = attributes[:'registrar_status']).is_a?(Array) + self.registrar_status = value + end + end + + if attributes.key?(:'who_is') + self.who_is = attributes[:'who_is'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + creation_date == o.creation_date && + domain == o.domain && + domain_updated_date == o.domain_updated_date && + email_addresses == o.email_addresses && + expiration_date == o.expiration_date && + ipv4_addresses == o.ipv4_addresses && + ipv6_addresses == o.ipv6_addresses && + mx_records == o.mx_records && + name_servers == o.name_servers && + registrar == o.registrar && + registrar_status == o.registrar_status && + who_is == o.who_is + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [creation_date, domain, domain_updated_date, email_addresses, expiration_date, ipv4_addresses, ipv6_addresses, mx_records, name_servers, registrar, registrar_status, who_is].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_email_address.rb b/lib/crimson-falcon/models/figapi_email_address.rb new file mode 100644 index 00000000..3112f1f2 --- /dev/null +++ b/lib/crimson-falcon/models/figapi_email_address.rb @@ -0,0 +1,252 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiEmailAddress + attr_accessor :address + + attr_accessor :contact_role + + attr_accessor :source + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'address' => :'Address', + :'contact_role' => :'ContactRole', + :'source' => :'Source' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'address' => :'String', + :'contact_role' => :'String', + :'source' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiEmailAddress` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiEmailAddress`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'contact_role') + self.contact_role = attributes[:'contact_role'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + address == o.address && + contact_role == o.contact_role && + source == o.source + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [address, contact_role, source].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_file.rb b/lib/crimson-falcon/models/figapi_file.rb new file mode 100644 index 00000000..8c91234c --- /dev/null +++ b/lib/crimson-falcon/models/figapi_file.rb @@ -0,0 +1,299 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiFile + # This can be one of: `C2Config`, `Phishing`, `ProxyScript`, `RansomNote`, `Certificate`, `JA3`, `PEResource`, `PEOverlay`, `PESection` + attr_accessor :file_properties + + # Size of the file + attr_accessor :file_size + + # Type of the file + attr_accessor :file_type + + # MD5 hash of the file + attr_accessor :md5 + + # libmagic (file command) output on the sample + attr_accessor :magic_file_type + + # SHA1 hash of the file + attr_accessor :sha1 + + # SHA256 hash of the file + attr_accessor :sha256 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'file_properties' => :'FileProperties', + :'file_size' => :'FileSize', + :'file_type' => :'FileType', + :'md5' => :'MD5', + :'magic_file_type' => :'MagicFileType', + :'sha1' => :'SHA1', + :'sha256' => :'SHA256' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'file_properties' => :'Array', + :'file_size' => :'Integer', + :'file_type' => :'Array', + :'md5' => :'String', + :'magic_file_type' => :'String', + :'sha1' => :'String', + :'sha256' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiFile` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiFile`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'file_properties') + if (value = attributes[:'file_properties']).is_a?(Array) + self.file_properties = value + end + end + + if attributes.key?(:'file_size') + self.file_size = attributes[:'file_size'] + end + + if attributes.key?(:'file_type') + if (value = attributes[:'file_type']).is_a?(Array) + self.file_type = value + end + end + + if attributes.key?(:'md5') + self.md5 = attributes[:'md5'] + end + + if attributes.key?(:'magic_file_type') + self.magic_file_type = attributes[:'magic_file_type'] + end + + if attributes.key?(:'sha1') + self.sha1 = attributes[:'sha1'] + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + file_properties == o.file_properties && + file_size == o.file_size && + file_type == o.file_type && + md5 == o.md5 && + magic_file_type == o.magic_file_type && + sha1 == o.sha1 && + sha256 == o.sha256 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [file_properties, file_size, file_type, md5, magic_file_type, sha1, sha256].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_indicator.rb b/lib/crimson-falcon/models/figapi_indicator.rb new file mode 100644 index 00000000..0ab53718 --- /dev/null +++ b/lib/crimson-falcon/models/figapi_indicator.rb @@ -0,0 +1,458 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiIndicator + attr_accessor :adversaries + + attr_accessor :certificates + + attr_accessor :countries + + attr_accessor :domain_details + + attr_accessor :file_details + + # Indicators first seen + attr_accessor :first_seen + + # The indicator ID. Concatenation of type and indicator fields. Based on the CKB2 vertex ID. + attr_accessor :id + + attr_accessor :ipv4_details + + attr_accessor :ipv6_details + + # Multi field property describing indicators kill-chain, possible properties: `ActionOnObjectives`, `C2`, `Delivery`, `Exploitation`, `Installation`, `Reconnaissance`, `Weaponization` + attr_accessor :kill_chain + + # Indicators last seen + attr_accessor :last_seen + + attr_accessor :last_updated + + # Indicates a confidence level by which an indicator is considered to be malicious, this can be one of: `Low`, `Medium`, `High` + attr_accessor :malicious_confidence + + # Indicates when was the confidence was last set + attr_accessor :malicious_confidence_validated_time + + attr_accessor :publish_date + + attr_accessor :reports + + attr_accessor :sectors + + attr_accessor :threat_types + + attr_accessor :threats + + # Type of the indicator, this can be one of: `File`, `Domain`, `IPv4`, `IPv6`, `URL` + attr_accessor :type + + attr_accessor :url_details + + # TBD + attr_accessor :victimology + + attr_accessor :vulnerabilities + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'adversaries' => :'Adversaries', + :'certificates' => :'Certificates', + :'countries' => :'Countries', + :'domain_details' => :'DomainDetails', + :'file_details' => :'FileDetails', + :'first_seen' => :'FirstSeen', + :'id' => :'ID', + :'ipv4_details' => :'IPv4Details', + :'ipv6_details' => :'IPv6Details', + :'kill_chain' => :'KillChain', + :'last_seen' => :'LastSeen', + :'last_updated' => :'LastUpdated', + :'malicious_confidence' => :'MaliciousConfidence', + :'malicious_confidence_validated_time' => :'MaliciousConfidenceValidatedTime', + :'publish_date' => :'PublishDate', + :'reports' => :'Reports', + :'sectors' => :'Sectors', + :'threat_types' => :'ThreatTypes', + :'threats' => :'Threats', + :'type' => :'Type', + :'url_details' => :'URLDetails', + :'victimology' => :'Victimology', + :'vulnerabilities' => :'Vulnerabilities' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'adversaries' => :'Array', + :'certificates' => :'Array', + :'countries' => :'Array', + :'domain_details' => :'FigapiDomain', + :'file_details' => :'FigapiFile', + :'first_seen' => :'String', + :'id' => :'String', + :'ipv4_details' => :'FigapiIPv4', + :'ipv6_details' => :'FigapiIPv6', + :'kill_chain' => :'Array', + :'last_seen' => :'String', + :'last_updated' => :'String', + :'malicious_confidence' => :'String', + :'malicious_confidence_validated_time' => :'String', + :'publish_date' => :'String', + :'reports' => :'Array', + :'sectors' => :'Array', + :'threat_types' => :'Array', + :'threats' => :'Array', + :'type' => :'String', + :'url_details' => :'FigapiURL', + :'victimology' => :'String', + :'vulnerabilities' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiIndicator` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiIndicator`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'adversaries') + if (value = attributes[:'adversaries']).is_a?(Array) + self.adversaries = value + end + end + + if attributes.key?(:'certificates') + if (value = attributes[:'certificates']).is_a?(Array) + self.certificates = value + end + end + + if attributes.key?(:'countries') + if (value = attributes[:'countries']).is_a?(Array) + self.countries = value + end + end + + if attributes.key?(:'domain_details') + self.domain_details = attributes[:'domain_details'] + end + + if attributes.key?(:'file_details') + self.file_details = attributes[:'file_details'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'ipv4_details') + self.ipv4_details = attributes[:'ipv4_details'] + end + + if attributes.key?(:'ipv6_details') + self.ipv6_details = attributes[:'ipv6_details'] + end + + if attributes.key?(:'kill_chain') + if (value = attributes[:'kill_chain']).is_a?(Array) + self.kill_chain = value + end + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'last_updated') + self.last_updated = attributes[:'last_updated'] + end + + if attributes.key?(:'malicious_confidence') + self.malicious_confidence = attributes[:'malicious_confidence'] + end + + if attributes.key?(:'malicious_confidence_validated_time') + self.malicious_confidence_validated_time = attributes[:'malicious_confidence_validated_time'] + end + + if attributes.key?(:'publish_date') + self.publish_date = attributes[:'publish_date'] + end + + if attributes.key?(:'reports') + if (value = attributes[:'reports']).is_a?(Array) + self.reports = value + end + end + + if attributes.key?(:'sectors') + if (value = attributes[:'sectors']).is_a?(Array) + self.sectors = value + end + end + + if attributes.key?(:'threat_types') + if (value = attributes[:'threat_types']).is_a?(Array) + self.threat_types = value + end + end + + if attributes.key?(:'threats') + if (value = attributes[:'threats']).is_a?(Array) + self.threats = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'url_details') + self.url_details = attributes[:'url_details'] + end + + if attributes.key?(:'victimology') + self.victimology = attributes[:'victimology'] + end + + if attributes.key?(:'vulnerabilities') + if (value = attributes[:'vulnerabilities']).is_a?(Array) + self.vulnerabilities = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + adversaries == o.adversaries && + certificates == o.certificates && + countries == o.countries && + domain_details == o.domain_details && + file_details == o.file_details && + first_seen == o.first_seen && + id == o.id && + ipv4_details == o.ipv4_details && + ipv6_details == o.ipv6_details && + kill_chain == o.kill_chain && + last_seen == o.last_seen && + last_updated == o.last_updated && + malicious_confidence == o.malicious_confidence && + malicious_confidence_validated_time == o.malicious_confidence_validated_time && + publish_date == o.publish_date && + reports == o.reports && + sectors == o.sectors && + threat_types == o.threat_types && + threats == o.threats && + type == o.type && + url_details == o.url_details && + victimology == o.victimology && + vulnerabilities == o.vulnerabilities + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [adversaries, certificates, countries, domain_details, file_details, first_seen, id, ipv4_details, ipv6_details, kill_chain, last_seen, last_updated, malicious_confidence, malicious_confidence_validated_time, publish_date, reports, sectors, threat_types, threats, type, url_details, victimology, vulnerabilities].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_ipv4.rb b/lib/crimson-falcon/models/figapi_ipv4.rb new file mode 100644 index 00000000..b3084efd --- /dev/null +++ b/lib/crimson-falcon/models/figapi_ipv4.rb @@ -0,0 +1,269 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiIPv4 + # Autonomous System Number + attr_accessor :asn + + # This can be one of: `AdversaryControlled`, `CDN`, `PublicDNSResolver`, `CaptivePortal`, `DNSSinkhole`, `DNSRootServer`, `HoneypotHoneypot`, etc. + attr_accessor :ip_properties + + # The IPv4 address as a string + attr_accessor :ipv4 + + # Internet service provider + attr_accessor :isp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asn' => :'ASN', + :'ip_properties' => :'IPProperties', + :'ipv4' => :'IPv4', + :'isp' => :'ISP' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asn' => :'Array', + :'ip_properties' => :'Array', + :'ipv4' => :'String', + :'isp' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiIPv4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiIPv4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asn') + if (value = attributes[:'asn']).is_a?(Array) + self.asn = value + end + end + + if attributes.key?(:'ip_properties') + if (value = attributes[:'ip_properties']).is_a?(Array) + self.ip_properties = value + end + end + + if attributes.key?(:'ipv4') + self.ipv4 = attributes[:'ipv4'] + end + + if attributes.key?(:'isp') + self.isp = attributes[:'isp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asn == o.asn && + ip_properties == o.ip_properties && + ipv4 == o.ipv4 && + isp == o.isp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asn, ip_properties, ipv4, isp].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_ipv6.rb b/lib/crimson-falcon/models/figapi_ipv6.rb new file mode 100644 index 00000000..87d645bb --- /dev/null +++ b/lib/crimson-falcon/models/figapi_ipv6.rb @@ -0,0 +1,269 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiIPv6 + # An array of Autonomous System Numbers (ASNs) + attr_accessor :asn + + # This can be one of: `AdversaryControlled`, `CDN`, `PublicDNSResolver`, `CaptivePortal`, `DNSSinkhole`, `DNSRootServer`, `HoneypotHoneypot`, etc. + attr_accessor :ip_properties + + # The IPv6 address as a string + attr_accessor :ipv6 + + # Internet service provider + attr_accessor :isp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asn' => :'ASN', + :'ip_properties' => :'IPProperties', + :'ipv6' => :'IPv6', + :'isp' => :'ISP' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asn' => :'Array', + :'ip_properties' => :'Array', + :'ipv6' => :'String', + :'isp' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiIPv6` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiIPv6`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asn') + if (value = attributes[:'asn']).is_a?(Array) + self.asn = value + end + end + + if attributes.key?(:'ip_properties') + if (value = attributes[:'ip_properties']).is_a?(Array) + self.ip_properties = value + end + end + + if attributes.key?(:'ipv6') + self.ipv6 = attributes[:'ipv6'] + end + + if attributes.key?(:'isp') + self.isp = attributes[:'isp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asn == o.asn && + ip_properties == o.ip_properties && + ipv6 == o.ipv6 && + isp == o.isp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asn, ip_properties, ipv6, isp].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_mx_record.rb b/lib/crimson-falcon/models/figapi_mx_record.rb new file mode 100644 index 00000000..4e1e71ca --- /dev/null +++ b/lib/crimson-falcon/models/figapi_mx_record.rb @@ -0,0 +1,284 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiMXRecord + attr_accessor :domain + + attr_accessor :hostname + + attr_accessor :ipv4_addresses + + attr_accessor :ipv6_addresses + + attr_accessor :priority + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'Domain', + :'hostname' => :'Hostname', + :'ipv4_addresses' => :'IPv4Addresses', + :'ipv6_addresses' => :'IPv6Addresses', + :'priority' => :'Priority' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String', + :'hostname' => :'String', + :'ipv4_addresses' => :'Array', + :'ipv6_addresses' => :'Array', + :'priority' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiMXRecord` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiMXRecord`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'hostname') + self.hostname = attributes[:'hostname'] + end + + if attributes.key?(:'ipv4_addresses') + if (value = attributes[:'ipv4_addresses']).is_a?(Array) + self.ipv4_addresses = value + end + end + + if attributes.key?(:'ipv6_addresses') + if (value = attributes[:'ipv6_addresses']).is_a?(Array) + self.ipv6_addresses = value + end + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @domain.nil? + invalid_properties.push('invalid value for "domain", domain cannot be nil.') + end + + if @priority.nil? + invalid_properties.push('invalid value for "priority", priority cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @domain.nil? + return false if @priority.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + hostname == o.hostname && + ipv4_addresses == o.ipv4_addresses && + ipv6_addresses == o.ipv6_addresses && + priority == o.priority + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain, hostname, ipv4_addresses, ipv6_addresses, priority].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_name_server.rb b/lib/crimson-falcon/models/figapi_name_server.rb new file mode 100644 index 00000000..d003abf6 --- /dev/null +++ b/lib/crimson-falcon/models/figapi_name_server.rb @@ -0,0 +1,254 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiNameServer + attr_accessor :domain + + attr_accessor :hostname + + attr_accessor :ip_addresses + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'domain' => :'Domain', + :'hostname' => :'Hostname', + :'ip_addresses' => :'IPAddresses' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'domain' => :'String', + :'hostname' => :'String', + :'ip_addresses' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiNameServer` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiNameServer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'hostname') + self.hostname = attributes[:'hostname'] + end + + if attributes.key?(:'ip_addresses') + if (value = attributes[:'ip_addresses']).is_a?(Array) + self.ip_addresses = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + domain == o.domain && + hostname == o.hostname && + ip_addresses == o.ip_addresses + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [domain, hostname, ip_addresses].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_report.rb b/lib/crimson-falcon/models/figapi_report.rb new file mode 100644 index 00000000..66b8cbe3 --- /dev/null +++ b/lib/crimson-falcon/models/figapi_report.rb @@ -0,0 +1,235 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiReport + # Title of the report + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'Title' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'title' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiReport` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiReport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + title == o.title + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [title].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_sector.rb b/lib/crimson-falcon/models/figapi_sector.rb new file mode 100644 index 00000000..5ad3557f --- /dev/null +++ b/lib/crimson-falcon/models/figapi_sector.rb @@ -0,0 +1,245 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiSector + # Definition of sector + attr_accessor :definition + + # Name of the sector, e.g. `Automotive`, `Travel`, `Logistics`, `Maritime`, etc. + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'definition' => :'Definition', + :'name' => :'Name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'definition' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiSector` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiSector`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'definition') + self.definition = attributes[:'definition'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + definition == o.definition && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [definition, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_threat.rb b/lib/crimson-falcon/models/figapi_threat.rb new file mode 100644 index 00000000..eaba306c --- /dev/null +++ b/lib/crimson-falcon/models/figapi_threat.rb @@ -0,0 +1,235 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiThreat + # Indicates the malware/threat family the indicator has been associated with, name assigned internally by Crowdstrike + attr_accessor :family_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'family_name' => :'FamilyName' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'family_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiThreat` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiThreat`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'family_name') + self.family_name = attributes[:'family_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + family_name == o.family_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [family_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_url.rb b/lib/crimson-falcon/models/figapi_url.rb new file mode 100644 index 00000000..32c313ab --- /dev/null +++ b/lib/crimson-falcon/models/figapi_url.rb @@ -0,0 +1,247 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiURL + # SHA256 hash of the file + attr_accessor :url + + # This can be one of: `DeadDrop`, `PaymentAddress`, `ProxyScript`. + attr_accessor :url_properties + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'url' => :'URL', + :'url_properties' => :'URLProperties' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'url' => :'String', + :'url_properties' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiURL` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiURL`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'url_properties') + if (value = attributes[:'url_properties']).is_a?(Array) + self.url_properties = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + url == o.url && + url_properties == o.url_properties + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [url, url_properties].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_vulnerability.rb b/lib/crimson-falcon/models/figapi_vulnerability.rb new file mode 100644 index 00000000..8eae410f --- /dev/null +++ b/lib/crimson-falcon/models/figapi_vulnerability.rb @@ -0,0 +1,374 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiVulnerability + attr_accessor :cpe_edition + + attr_accessor :cpe_language + + attr_accessor :cpe_other + + attr_accessor :cpe_part + + attr_accessor :cpe_product + + attr_accessor :cpe_software_edition + + attr_accessor :cpe_target_hardware + + attr_accessor :cpe_target_software + + attr_accessor :cpe_update + + attr_accessor :cpe_vendor + + attr_accessor :cpe_version + + # CVE(Common Vulnerabilities and Exposures) is a unique identifier assigned to publicly disclosed cyber security vulnerabilities + attr_accessor :cve + + # Description of the vulnerability. + attr_accessor :description + + # This can be one of: `Unproven`, `Available`, `EasilyAccessible`, `ActivelyUsed`. + attr_accessor :exploit_status + + # The date when the vulnerability was last updated + attr_accessor :last_updated + + # The date when the vulnerability was published + attr_accessor :published_date + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cpe_edition' => :'CPEEdition', + :'cpe_language' => :'CPELanguage', + :'cpe_other' => :'CPEOther', + :'cpe_part' => :'CPEPart', + :'cpe_product' => :'CPEProduct', + :'cpe_software_edition' => :'CPESoftwareEdition', + :'cpe_target_hardware' => :'CPETargetHardware', + :'cpe_target_software' => :'CPETargetSoftware', + :'cpe_update' => :'CPEUpdate', + :'cpe_vendor' => :'CPEVendor', + :'cpe_version' => :'CPEVersion', + :'cve' => :'CVE', + :'description' => :'Description', + :'exploit_status' => :'ExploitStatus', + :'last_updated' => :'LastUpdated', + :'published_date' => :'PublishedDate' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cpe_edition' => :'String', + :'cpe_language' => :'String', + :'cpe_other' => :'String', + :'cpe_part' => :'String', + :'cpe_product' => :'String', + :'cpe_software_edition' => :'String', + :'cpe_target_hardware' => :'String', + :'cpe_target_software' => :'String', + :'cpe_update' => :'String', + :'cpe_vendor' => :'String', + :'cpe_version' => :'String', + :'cve' => :'String', + :'description' => :'String', + :'exploit_status' => :'String', + :'last_updated' => :'String', + :'published_date' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiVulnerability` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiVulnerability`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cpe_edition') + self.cpe_edition = attributes[:'cpe_edition'] + end + + if attributes.key?(:'cpe_language') + self.cpe_language = attributes[:'cpe_language'] + end + + if attributes.key?(:'cpe_other') + self.cpe_other = attributes[:'cpe_other'] + end + + if attributes.key?(:'cpe_part') + self.cpe_part = attributes[:'cpe_part'] + end + + if attributes.key?(:'cpe_product') + self.cpe_product = attributes[:'cpe_product'] + end + + if attributes.key?(:'cpe_software_edition') + self.cpe_software_edition = attributes[:'cpe_software_edition'] + end + + if attributes.key?(:'cpe_target_hardware') + self.cpe_target_hardware = attributes[:'cpe_target_hardware'] + end + + if attributes.key?(:'cpe_target_software') + self.cpe_target_software = attributes[:'cpe_target_software'] + end + + if attributes.key?(:'cpe_update') + self.cpe_update = attributes[:'cpe_update'] + end + + if attributes.key?(:'cpe_vendor') + self.cpe_vendor = attributes[:'cpe_vendor'] + end + + if attributes.key?(:'cpe_version') + self.cpe_version = attributes[:'cpe_version'] + end + + if attributes.key?(:'cve') + self.cve = attributes[:'cve'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'exploit_status') + self.exploit_status = attributes[:'exploit_status'] + end + + if attributes.key?(:'last_updated') + self.last_updated = attributes[:'last_updated'] + end + + if attributes.key?(:'published_date') + self.published_date = attributes[:'published_date'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cpe_edition == o.cpe_edition && + cpe_language == o.cpe_language && + cpe_other == o.cpe_other && + cpe_part == o.cpe_part && + cpe_product == o.cpe_product && + cpe_software_edition == o.cpe_software_edition && + cpe_target_hardware == o.cpe_target_hardware && + cpe_target_software == o.cpe_target_software && + cpe_update == o.cpe_update && + cpe_vendor == o.cpe_vendor && + cpe_version == o.cpe_version && + cve == o.cve && + description == o.description && + exploit_status == o.exploit_status && + last_updated == o.last_updated && + published_date == o.published_date + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cpe_edition, cpe_language, cpe_other, cpe_part, cpe_product, cpe_software_edition, cpe_target_hardware, cpe_target_software, cpe_update, cpe_vendor, cpe_version, cve, description, exploit_status, last_updated, published_date].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_who_is.rb b/lib/crimson-falcon/models/figapi_who_is.rb new file mode 100644 index 00000000..d5616f7f --- /dev/null +++ b/lib/crimson-falcon/models/figapi_who_is.rb @@ -0,0 +1,261 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiWhoIS + attr_accessor :admin_contact + + attr_accessor :billing_contact + + attr_accessor :registrant_contact + + attr_accessor :technical_contact + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'admin_contact' => :'AdminContact', + :'billing_contact' => :'BillingContact', + :'registrant_contact' => :'RegistrantContact', + :'technical_contact' => :'TechnicalContact' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'admin_contact' => :'FigapiWhoisRecord', + :'billing_contact' => :'FigapiWhoisRecord', + :'registrant_contact' => :'FigapiWhoisRecord', + :'technical_contact' => :'FigapiWhoisRecord' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiWhoIS` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiWhoIS`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'admin_contact') + self.admin_contact = attributes[:'admin_contact'] + end + + if attributes.key?(:'billing_contact') + self.billing_contact = attributes[:'billing_contact'] + end + + if attributes.key?(:'registrant_contact') + self.registrant_contact = attributes[:'registrant_contact'] + end + + if attributes.key?(:'technical_contact') + self.technical_contact = attributes[:'technical_contact'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + admin_contact == o.admin_contact && + billing_contact == o.billing_contact && + registrant_contact == o.registrant_contact && + technical_contact == o.technical_contact + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [admin_contact, billing_contact, registrant_contact, technical_contact].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_whois_record.rb b/lib/crimson-falcon/models/figapi_whois_record.rb new file mode 100644 index 00000000..2143535a --- /dev/null +++ b/lib/crimson-falcon/models/figapi_whois_record.rb @@ -0,0 +1,306 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiWhoisRecord + attr_accessor :city + + attr_accessor :country + + attr_accessor :fax + + attr_accessor :name + + attr_accessor :org + + attr_accessor :phone + + attr_accessor :postal_code + + attr_accessor :state + + attr_accessor :street + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'city' => :'City', + :'country' => :'Country', + :'fax' => :'Fax', + :'name' => :'Name', + :'org' => :'Org', + :'phone' => :'Phone', + :'postal_code' => :'PostalCode', + :'state' => :'State', + :'street' => :'Street' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'city' => :'String', + :'country' => :'String', + :'fax' => :'String', + :'name' => :'String', + :'org' => :'String', + :'phone' => :'String', + :'postal_code' => :'String', + :'state' => :'String', + :'street' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiWhoisRecord` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiWhoisRecord`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'country') + self.country = attributes[:'country'] + end + + if attributes.key?(:'fax') + self.fax = attributes[:'fax'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'org') + self.org = attributes[:'org'] + end + + if attributes.key?(:'phone') + self.phone = attributes[:'phone'] + end + + if attributes.key?(:'postal_code') + self.postal_code = attributes[:'postal_code'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'street') + self.street = attributes[:'street'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + city == o.city && + country == o.country && + fax == o.fax && + name == o.name && + org == o.org && + phone == o.phone && + postal_code == o.postal_code && + state == o.state && + street == o.street + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [city, country, fax, name, org, phone, postal_code, state, street].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/figapi_x509_certificate.rb b/lib/crimson-falcon/models/figapi_x509_certificate.rb new file mode 100644 index 00000000..4421146b --- /dev/null +++ b/lib/crimson-falcon/models/figapi_x509_certificate.rb @@ -0,0 +1,297 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class FigapiX509Certificate + attr_accessor :certificate_hash + + attr_accessor :common_name + + attr_accessor :email_address + + attr_accessor :issuer_common_name + + attr_accessor :organization + + attr_accessor :public_key_type + + attr_accessor :signature_algorithm + + attr_accessor :subject + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'certificate_hash' => :'CertificateHash', + :'common_name' => :'CommonName', + :'email_address' => :'EmailAddress', + :'issuer_common_name' => :'IssuerCommonName', + :'organization' => :'Organization', + :'public_key_type' => :'PublicKeyType', + :'signature_algorithm' => :'SignatureAlgorithm', + :'subject' => :'Subject' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'certificate_hash' => :'String', + :'common_name' => :'String', + :'email_address' => :'String', + :'issuer_common_name' => :'String', + :'organization' => :'String', + :'public_key_type' => :'String', + :'signature_algorithm' => :'String', + :'subject' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::FigapiX509Certificate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::FigapiX509Certificate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'certificate_hash') + self.certificate_hash = attributes[:'certificate_hash'] + end + + if attributes.key?(:'common_name') + self.common_name = attributes[:'common_name'] + end + + if attributes.key?(:'email_address') + self.email_address = attributes[:'email_address'] + end + + if attributes.key?(:'issuer_common_name') + self.issuer_common_name = attributes[:'issuer_common_name'] + end + + if attributes.key?(:'organization') + self.organization = attributes[:'organization'] + end + + if attributes.key?(:'public_key_type') + self.public_key_type = attributes[:'public_key_type'] + end + + if attributes.key?(:'signature_algorithm') + self.signature_algorithm = attributes[:'signature_algorithm'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + certificate_hash == o.certificate_hash && + common_name == o.common_name && + email_address == o.email_address && + issuer_common_name == o.issuer_common_name && + organization == o.organization && + public_key_type == o.public_key_type && + signature_algorithm == o.signature_algorithm && + subject == o.subject + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [certificate_hash, common_name, email_address, issuer_common_name, organization, public_key_type, signature_algorithm, subject].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/graph_condition.rb b/lib/crimson-falcon/models/graph_condition.rb index ae587f35..c528c131 100644 --- a/lib/crimson-falcon/models/graph_condition.rb +++ b/lib/crimson-falcon/models/graph_condition.rb @@ -35,12 +35,9 @@ class GraphCondition # CEL expression for the condition, should evaluate to a boolean. attr_accessor :cel_expression - # User friendly description of the FQL expression. This would be supplied by the UI/caller and is not set by the API. + # User friendly description of the expression. This is generally supplied by the UI/caller. attr_accessor :display - # Indicates the boolean result of FQL expression when present. This field should be used only in the api response of a graph execution result - attr_accessor :evaluated - # FQL expression for the condition on the sequence flow. attr_accessor :expression @@ -49,7 +46,6 @@ def self.attribute_map { :'cel_expression' => :'cel_expression', :'display' => :'display', - :'evaluated' => :'evaluated', :'expression' => :'expression' } end @@ -64,7 +60,6 @@ def self.openapi_types { :'cel_expression' => :'String', :'display' => :'Array', - :'evaluated' => :'Boolean', :'expression' => :'String' } end @@ -100,10 +95,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:'evaluated') - self.evaluated = attributes[:'evaluated'] - end - if attributes.key?(:'expression') self.expression = attributes[:'expression'] end @@ -129,7 +120,6 @@ def ==(o) self.class == o.class && cel_expression == o.cel_expression && display == o.display && - evaluated == o.evaluated && expression == o.expression end @@ -142,7 +132,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [cel_expression, display, evaluated, expression].hash + [cel_expression, display, expression].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/help.rb b/lib/crimson-falcon/models/help.rb new file mode 100644 index 00000000..0fa84cad --- /dev/null +++ b/lib/crimson-falcon/models/help.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class Help + attr_accessor :text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'text' => :'text' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'text' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::Help` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::Help`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'text') + self.text = attributes[:'text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @text.nil? + invalid_properties.push('invalid value for "text", text cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @text.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + text == o.text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/ingestion_cve_exploit_reference.rb b/lib/crimson-falcon/models/ingestion_cve_exploit_reference.rb new file mode 100644 index 00000000..9e1915e0 --- /dev/null +++ b/lib/crimson-falcon/models/ingestion_cve_exploit_reference.rb @@ -0,0 +1,267 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class IngestionCVEExploitReference + attr_accessor :kind + + attr_accessor :label + + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'kind' => :'kind', + :'label' => :'label', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'kind' => :'String', + :'label' => :'String', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::IngestionCVEExploitReference` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::IngestionCVEExploitReference`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @label.nil? + invalid_properties.push('invalid value for "label", label cannot be nil.') + end + + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @kind.nil? + return false if @label.nil? + return false if @url.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + kind == o.kind && + label == o.label && + url == o.url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [kind, label, url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/ingestion_cve_exploit_source.rb b/lib/crimson-falcon/models/ingestion_cve_exploit_source.rb new file mode 100644 index 00000000..f33c018a --- /dev/null +++ b/lib/crimson-falcon/models/ingestion_cve_exploit_source.rb @@ -0,0 +1,283 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class IngestionCVEExploitSource + attr_accessor :is_flat + + attr_accessor :label + + attr_accessor :references + + attr_accessor :source + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'is_flat' => :'is_flat', + :'label' => :'label', + :'references' => :'references', + :'source' => :'source' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'is_flat' => :'Boolean', + :'label' => :'String', + :'references' => :'Array', + :'source' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::IngestionCVEExploitSource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::IngestionCVEExploitSource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'is_flat') + self.is_flat = attributes[:'is_flat'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'references') + if (value = attributes[:'references']).is_a?(Array) + self.references = value + end + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @is_flat.nil? + invalid_properties.push('invalid value for "is_flat", is_flat cannot be nil.') + end + + if @label.nil? + invalid_properties.push('invalid value for "label", label cannot be nil.') + end + + if @references.nil? + invalid_properties.push('invalid value for "references", references cannot be nil.') + end + + if @source.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @is_flat.nil? + return false if @label.nil? + return false if @references.nil? + return false if @source.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_flat == o.is_flat && + label == o.label && + references == o.references && + source == o.source + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [is_flat, label, references, source].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/ingestion_ex_prt_rating_factors.rb b/lib/crimson-falcon/models/ingestion_ex_prt_rating_factors.rb new file mode 100644 index 00000000..860a9181 --- /dev/null +++ b/lib/crimson-falcon/models/ingestion_ex_prt_rating_factors.rb @@ -0,0 +1,281 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class IngestionExPRTRatingFactors + attr_accessor :description + + attr_accessor :factor + + attr_accessor :impact + + attr_accessor :long_description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'factor' => :'factor', + :'impact' => :'impact', + :'long_description' => :'long_description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'description' => :'String', + :'factor' => :'String', + :'impact' => :'Integer', + :'long_description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::IngestionExPRTRatingFactors` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::IngestionExPRTRatingFactors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'factor') + self.factor = attributes[:'factor'] + end + + if attributes.key?(:'impact') + self.impact = attributes[:'impact'] + end + + if attributes.key?(:'long_description') + self.long_description = attributes[:'long_description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @factor.nil? + invalid_properties.push('invalid value for "factor", factor cannot be nil.') + end + + if @impact.nil? + invalid_properties.push('invalid value for "impact", impact cannot be nil.') + end + + if @long_description.nil? + invalid_properties.push('invalid value for "long_description", long_description cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @description.nil? + return false if @factor.nil? + return false if @impact.nil? + return false if @long_description.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + factor == o.factor && + impact == o.impact && + long_description == o.long_description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [description, factor, impact, long_description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/ingestion_reference.rb b/lib/crimson-falcon/models/ingestion_reference.rb new file mode 100644 index 00000000..0458f4e2 --- /dev/null +++ b/lib/crimson-falcon/models/ingestion_reference.rb @@ -0,0 +1,255 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class IngestionReference + attr_accessor :tags + + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tags' => :'tags', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'tags' => :'Array', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::IngestionReference` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::IngestionReference`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @tags.nil? + invalid_properties.push('invalid value for "tags", tags cannot be nil.') + end + + if @url.nil? + invalid_properties.push('invalid value for "url", url cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @tags.nil? + return false if @url.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tags == o.tags && + url == o.url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tags, url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/inventoryapi_surface_error.rb b/lib/crimson-falcon/models/inventoryapi_surface_error.rb new file mode 100644 index 00000000..b061d6c6 --- /dev/null +++ b/lib/crimson-falcon/models/inventoryapi_surface_error.rb @@ -0,0 +1,260 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class InventoryapiSurfaceError + # Error code + attr_accessor :code + + # Error details + attr_accessor :details + + # Error message + attr_accessor :message + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'details' => :'details', + :'message' => :'message' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'Integer', + :'details' => :'String', + :'message' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::InventoryapiSurfaceError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::InventoryapiSurfaceError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @message.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + details == o.details && + message == o.message + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, details, message].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/client_fql_statement.rb b/lib/crimson-falcon/models/inventoryapi_user_external_asset.rb similarity index 88% rename from lib/crimson-falcon/models/client_fql_statement.rb rename to lib/crimson-falcon/models/inventoryapi_user_external_asset.rb index 086b99c3..44e6b8db 100644 --- a/lib/crimson-falcon/models/client_fql_statement.rb +++ b/lib/crimson-falcon/models/inventoryapi_user_external_asset.rb @@ -31,18 +31,17 @@ require 'time' module Falcon - class ClientFQLStatement - attr_accessor :op - - attr_accessor :prop + class InventoryapiUserExternalAsset + # Unique identifier for the asset + attr_accessor :id + # Value of the asset attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'op' => :'op', - :'prop' => :'prop', + :'id' => :'id', :'value' => :'value' } end @@ -55,9 +54,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'op' => :'String', - :'prop' => :'String', - :'value' => :'Object' + :'id' => :'String', + :'value' => :'String' } end @@ -71,23 +69,19 @@ def self.openapi_nullable # @param [Hash] attributes Model attributes in the form of hash def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ClientFQLStatement` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::InventoryapiUserExternalAsset` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ClientFQLStatement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::InventoryapiUserExternalAsset`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } - if attributes.key?(:'op') - self.op = attributes[:'op'] - end - - if attributes.key?(:'prop') - self.prop = attributes[:'prop'] + if attributes.key?(:'id') + self.id = attributes[:'id'] end if attributes.key?(:'value') @@ -99,12 +93,8 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @op.nil? - invalid_properties.push('invalid value for "op", op cannot be nil.') - end - - if @prop.nil? - invalid_properties.push('invalid value for "prop", prop cannot be nil.') + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') end if @value.nil? @@ -117,8 +107,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @op.nil? - return false if @prop.nil? + return false if @id.nil? return false if @value.nil? true end @@ -128,8 +117,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - op == o.op && - prop == o.prop && + id == o.id && value == o.value end @@ -142,7 +130,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [op, prop, value].hash + [id, value].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/inventoryapi_user_external_asset_create.rb b/lib/crimson-falcon/models/inventoryapi_user_external_asset_create.rb new file mode 100644 index 00000000..1746e713 --- /dev/null +++ b/lib/crimson-falcon/models/inventoryapi_user_external_asset_create.rb @@ -0,0 +1,257 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class InventoryapiUserExternalAssetCreate + # Assets to be added + attr_accessor :assets + + # Subsidiary ID to which assets are to be added + attr_accessor :subsidiary_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assets' => :'assets', + :'subsidiary_id' => :'subsidiary_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'assets' => :'Array', + :'subsidiary_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::InventoryapiUserExternalAssetCreate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::InventoryapiUserExternalAssetCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'assets') + if (value = attributes[:'assets']).is_a?(Array) + self.assets = value + end + end + + if attributes.key?(:'subsidiary_id') + self.subsidiary_id = attributes[:'subsidiary_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @assets.nil? + invalid_properties.push('invalid value for "assets", assets cannot be nil.') + end + + if @subsidiary_id.nil? + invalid_properties.push('invalid value for "subsidiary_id", subsidiary_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @assets.nil? + return false if @subsidiary_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assets == o.assets && + subsidiary_id == o.subsidiary_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [assets, subsidiary_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/inventoryapi_user_external_asset_create_request_v1.rb b/lib/crimson-falcon/models/inventoryapi_user_external_asset_create_request_v1.rb new file mode 100644 index 00000000..dbd9a011 --- /dev/null +++ b/lib/crimson-falcon/models/inventoryapi_user_external_asset_create_request_v1.rb @@ -0,0 +1,242 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class InventoryapiUserExternalAssetCreateRequestV1 + # Data is the list of assets to be added + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::InventoryapiUserExternalAssetCreateRequestV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::InventoryapiUserExternalAssetCreateRequestV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @data.nil? + invalid_properties.push('invalid value for "data", data cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @data.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/inventoryapi_user_external_asset_create_response_v1.rb b/lib/crimson-falcon/models/inventoryapi_user_external_asset_create_response_v1.rb new file mode 100644 index 00000000..aadae566 --- /dev/null +++ b/lib/crimson-falcon/models/inventoryapi_user_external_asset_create_response_v1.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class InventoryapiUserExternalAssetCreateResponseV1 + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::InventoryapiUserExternalAssetCreateResponseV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::InventoryapiUserExternalAssetCreateResponseV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/inventoryapi_user_external_asset_result.rb b/lib/crimson-falcon/models/inventoryapi_user_external_asset_result.rb new file mode 100644 index 00000000..2c4d26e7 --- /dev/null +++ b/lib/crimson-falcon/models/inventoryapi_user_external_asset_result.rb @@ -0,0 +1,322 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class InventoryapiUserExternalAssetResult + # Asset type + attr_accessor :asset_type + + attr_accessor :current_subsidiary + + attr_accessor :error + + # The ID of the asset + attr_accessor :id + + # The index of the asset + attr_accessor :index + + # Raw value of the asset to be created + attr_accessor :raw_value + + attr_accessor :subsidiary + + # Asset + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_type' => :'asset_type', + :'current_subsidiary' => :'current_subsidiary', + :'error' => :'error', + :'id' => :'id', + :'index' => :'index', + :'raw_value' => :'raw_value', + :'subsidiary' => :'subsidiary', + :'value' => :'value' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_type' => :'String', + :'current_subsidiary' => :'InventoryapidomainSubsidiary', + :'error' => :'InventoryapiSurfaceError', + :'id' => :'String', + :'index' => :'Integer', + :'raw_value' => :'String', + :'subsidiary' => :'InventoryapidomainSubsidiary', + :'value' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::InventoryapiUserExternalAssetResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::InventoryapiUserExternalAssetResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_type') + self.asset_type = attributes[:'asset_type'] + end + + if attributes.key?(:'current_subsidiary') + self.current_subsidiary = attributes[:'current_subsidiary'] + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'index') + self.index = attributes[:'index'] + end + + if attributes.key?(:'raw_value') + self.raw_value = attributes[:'raw_value'] + end + + if attributes.key?(:'subsidiary') + self.subsidiary = attributes[:'subsidiary'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @index.nil? + invalid_properties.push('invalid value for "index", index cannot be nil.') + end + + if @raw_value.nil? + invalid_properties.push('invalid value for "raw_value", raw_value cannot be nil.') + end + + if @subsidiary.nil? + invalid_properties.push('invalid value for "subsidiary", subsidiary cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + return false if @index.nil? + return false if @raw_value.nil? + return false if @subsidiary.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_type == o.asset_type && + current_subsidiary == o.current_subsidiary && + error == o.error && + id == o.id && + index == o.index && + raw_value == o.raw_value && + subsidiary == o.subsidiary && + value == o.value + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_type, current_subsidiary, error, id, index, raw_value, subsidiary, value].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/inventoryapidomain_subsidiary.rb b/lib/crimson-falcon/models/inventoryapidomain_subsidiary.rb new file mode 100644 index 00000000..4c6893c0 --- /dev/null +++ b/lib/crimson-falcon/models/inventoryapidomain_subsidiary.rb @@ -0,0 +1,245 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class InventoryapidomainSubsidiary + # Unique identifier for the subsidiary + attr_accessor :id + + # Name of the subsidiary + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::InventoryapidomainSubsidiary` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::InventoryapidomainSubsidiary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/jsonschema_pivot.rb b/lib/crimson-falcon/models/jsonschema_pivot.rb index 815a54e8..db67a370 100644 --- a/lib/crimson-falcon/models/jsonschema_pivot.rb +++ b/lib/crimson-falcon/models/jsonschema_pivot.rb @@ -36,10 +36,14 @@ class JsonschemaPivot attr_accessor :entity + attr_accessor :entity_on_load + attr_accessor :entity_value attr_accessor :query_string + attr_accessor :query_string_on_load + attr_accessor :searchable attr_accessor :sort_by_display @@ -55,8 +59,10 @@ def self.attribute_map { :'case_sensitive' => :'caseSensitive', :'entity' => :'entity', + :'entity_on_load' => :'entityOnLoad', :'entity_value' => :'entityValue', :'query_string' => :'queryString', + :'query_string_on_load' => :'queryStringOnLoad', :'searchable' => :'searchable', :'sort_by_display' => :'sortByDisplay', :'sort_by_value' => :'sortByValue', @@ -75,8 +81,10 @@ def self.openapi_types { :'case_sensitive' => :'Boolean', :'entity' => :'String', + :'entity_on_load' => :'String', :'entity_value' => :'String', :'query_string' => :'String', + :'query_string_on_load' => :'String', :'searchable' => :'Boolean', :'sort_by_display' => :'Boolean', :'sort_by_value' => :'Boolean', @@ -114,6 +122,10 @@ def initialize(attributes = {}) self.entity = attributes[:'entity'] end + if attributes.key?(:'entity_on_load') + self.entity_on_load = attributes[:'entity_on_load'] + end + if attributes.key?(:'entity_value') self.entity_value = attributes[:'entity_value'] end @@ -122,6 +134,10 @@ def initialize(attributes = {}) self.query_string = attributes[:'query_string'] end + if attributes.key?(:'query_string_on_load') + self.query_string_on_load = attributes[:'query_string_on_load'] + end + if attributes.key?(:'searchable') self.searchable = attributes[:'searchable'] end @@ -163,8 +179,10 @@ def ==(o) self.class == o.class && case_sensitive == o.case_sensitive && entity == o.entity && + entity_on_load == o.entity_on_load && entity_value == o.entity_value && query_string == o.query_string && + query_string_on_load == o.query_string_on_load && searchable == o.searchable && sort_by_display == o.sort_by_display && sort_by_value == o.sort_by_value && @@ -181,7 +199,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [case_sensitive, entity, entity_value, query_string, searchable, sort_by_display, sort_by_value, sort_desc, strict].hash + [case_sensitive, entity, entity_on_load, entity_value, query_string, query_string_on_load, searchable, sort_by_display, sort_by_value, sort_desc, strict].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/jsonschema_signals_extensions.rb b/lib/crimson-falcon/models/jsonschema_signals_extensions.rb index fffeb3ab..628cea7e 100644 --- a/lib/crimson-falcon/models/jsonschema_signals_extensions.rb +++ b/lib/crimson-falcon/models/jsonschema_signals_extensions.rb @@ -38,12 +38,18 @@ class JsonschemaSignalsExtensions attr_accessor :path_name + attr_accessor :use_case + + attr_accessor :vendor + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'enum_wrapper' => :'enum_wrapper', :'example_display_map' => :'example_display_map', - :'path_name' => :'path_name' + :'path_name' => :'path_name', + :'use_case' => :'use_case', + :'vendor' => :'vendor' } end @@ -57,7 +63,9 @@ def self.openapi_types { :'enum_wrapper' => :'Boolean', :'example_display_map' => :'Hash', - :'path_name' => :'String' + :'path_name' => :'String', + :'use_case' => :'String', + :'vendor' => :'String' } end @@ -95,6 +103,14 @@ def initialize(attributes = {}) if attributes.key?(:'path_name') self.path_name = attributes[:'path_name'] end + + if attributes.key?(:'use_case') + self.use_case = attributes[:'use_case'] + end + + if attributes.key?(:'vendor') + self.vendor = attributes[:'vendor'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -117,7 +133,9 @@ def ==(o) self.class == o.class && enum_wrapper == o.enum_wrapper && example_display_map == o.example_display_map && - path_name == o.path_name + path_name == o.path_name && + use_case == o.use_case && + vendor == o.vendor end # @see the `==` method @@ -129,7 +147,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [enum_wrapper, example_display_map, path_name].hash + [enum_wrapper, example_display_map, path_name, use_case, vendor].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/jsonschema_ui_extensions.rb b/lib/crimson-falcon/models/jsonschema_ui_extensions.rb index 9a6d13f3..17c514df 100644 --- a/lib/crimson-falcon/models/jsonschema_ui_extensions.rb +++ b/lib/crimson-falcon/models/jsonschema_ui_extensions.rb @@ -46,6 +46,15 @@ class JsonschemaUIExtensions attr_accessor :helper_text + # generate a hidden card during mobiledoc generation + attr_accessor :hide + + # local reference to look up the dynamic json schema and mobiledoc card configuration returned in the top-level of api response + attr_accessor :schema_reference + + # skip generating a card during mobiledoc generation + attr_accessor :skip + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -54,7 +63,10 @@ def self.attribute_map :'custom_group_name' => :'customGroupName', :'duration_options' => :'durationOptions', :'encoding' => :'encoding', - :'helper_text' => :'helperText' + :'helper_text' => :'helperText', + :'hide' => :'hide', + :'schema_reference' => :'schema_reference', + :'skip' => :'skip' } end @@ -71,7 +83,10 @@ def self.openapi_types :'custom_group_name' => :'String', :'duration_options' => :'Array', :'encoding' => :'String', - :'helper_text' => :'String' + :'helper_text' => :'String', + :'hide' => :'Boolean', + :'schema_reference' => :'String', + :'skip' => :'Boolean' } end @@ -123,6 +138,18 @@ def initialize(attributes = {}) if attributes.key?(:'helper_text') self.helper_text = attributes[:'helper_text'] end + + if attributes.key?(:'hide') + self.hide = attributes[:'hide'] + end + + if attributes.key?(:'schema_reference') + self.schema_reference = attributes[:'schema_reference'] + end + + if attributes.key?(:'skip') + self.skip = attributes[:'skip'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -148,7 +175,10 @@ def ==(o) custom_group_name == o.custom_group_name && duration_options == o.duration_options && encoding == o.encoding && - helper_text == o.helper_text + helper_text == o.helper_text && + hide == o.hide && + schema_reference == o.schema_reference && + skip == o.skip end # @see the `==` method @@ -160,7 +190,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [accept, component, custom_group_name, duration_options, encoding, helper_text].hash + [accept, component, custom_group_name, duration_options, encoding, helper_text, hide, schema_reference, skip].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_api_customer_and_image.rb b/lib/crimson-falcon/models/models_api_customer_and_image.rb index 9bb31466..befdeabf 100644 --- a/lib/crimson-falcon/models/models_api_customer_and_image.rb +++ b/lib/crimson-falcon/models/models_api_customer_and_image.rb @@ -32,6 +32,8 @@ module Falcon class ModelsAPICustomerAndImage + attr_accessor :ai_related + attr_accessor :base_image_id attr_accessor :base_os @@ -79,6 +81,7 @@ class ModelsAPICustomerAndImage # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'ai_related' => :'ai_related', :'base_image_id' => :'base_image_id', :'base_os' => :'base_os', :'base_os_version' => :'base_os_version', @@ -112,6 +115,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'ai_related' => :'Boolean', :'base_image_id' => :'String', :'base_os' => :'String', :'base_os_version' => :'String', @@ -158,6 +162,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'ai_related') + self.ai_related = attributes[:'ai_related'] + end + if attributes.key?(:'base_image_id') self.base_image_id = attributes[:'base_image_id'] end @@ -251,6 +259,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @ai_related.nil? + invalid_properties.push('invalid value for "ai_related", ai_related cannot be nil.') + end + if @base_os.nil? invalid_properties.push('invalid value for "base_os", base_os cannot be nil.') end @@ -337,6 +349,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @ai_related.nil? return false if @base_os.nil? return false if @base_os_version.nil? return false if @cid.nil? @@ -365,6 +378,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + ai_related == o.ai_related && base_image_id == o.base_image_id && base_os == o.base_os && base_os_version == o.base_os_version && @@ -398,7 +412,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [base_image_id, base_os, base_os_version, cid, config, created_at, crowdstrike_user, digest, eol_date, first_scanned, image_id, image_scanning_active, image_size, is_base_image, registry, repository, source, source_base_image, tag, updated_at, uuid, warning].hash + [ai_related, base_image_id, base_os, base_os_version, cid, config, created_at, crowdstrike_user, digest, eol_date, first_scanned, image_id, image_scanning_active, image_size, is_base_image, registry, repository, source, source_base_image, tag, updated_at, uuid, warning].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_api_image_combined_export.rb b/lib/crimson-falcon/models/models_api_image_combined_export.rb index 4f72b0da..65b814ce 100644 --- a/lib/crimson-falcon/models/models_api_image_combined_export.rb +++ b/lib/crimson-falcon/models/models_api_image_combined_export.rb @@ -32,6 +32,8 @@ module Falcon class ModelsAPIImageCombinedExport + attr_accessor :ai_related + attr_accessor :architecture attr_accessor :base_os @@ -50,6 +52,8 @@ class ModelsAPIImageCombinedExport attr_accessor :first_seen + attr_accessor :groups + attr_accessor :image_digest attr_accessor :image_id @@ -81,6 +85,7 @@ class ModelsAPIImageCombinedExport # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'ai_related' => :'ai_related', :'architecture' => :'architecture', :'base_os' => :'base_os', :'cid' => :'cid', @@ -90,6 +95,7 @@ def self.attribute_map :'detection_severity' => :'detection_severity', :'detection_type' => :'detection_type', :'first_seen' => :'first_seen', + :'groups' => :'groups', :'image_digest' => :'image_digest', :'image_id' => :'image_id', :'is_base_image' => :'is_base_image', @@ -115,6 +121,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'ai_related' => :'Boolean', :'architecture' => :'String', :'base_os' => :'String', :'cid' => :'String', @@ -124,6 +131,7 @@ def self.openapi_types :'detection_severity' => :'String', :'detection_type' => :'String', :'first_seen' => :'String', + :'groups' => :'Array', :'image_digest' => :'String', :'image_id' => :'String', :'is_base_image' => :'Boolean', @@ -162,6 +170,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'ai_related') + self.ai_related = attributes[:'ai_related'] + end + if attributes.key?(:'architecture') self.architecture = attributes[:'architecture'] end @@ -198,6 +210,12 @@ def initialize(attributes = {}) self.first_seen = attributes[:'first_seen'] end + if attributes.key?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = value + end + end + if attributes.key?(:'image_digest') self.image_digest = attributes[:'image_digest'] end @@ -259,6 +277,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @ai_related.nil? + invalid_properties.push('invalid value for "ai_related", ai_related cannot be nil.') + end + if @architecture.nil? invalid_properties.push('invalid value for "architecture", architecture cannot be nil.') end @@ -357,6 +379,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @ai_related.nil? return false if @architecture.nil? return false if @base_os.nil? return false if @cid.nil? @@ -388,6 +411,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + ai_related == o.ai_related && architecture == o.architecture && base_os == o.base_os && cid == o.cid && @@ -397,6 +421,7 @@ def ==(o) detection_severity == o.detection_severity && detection_type == o.detection_type && first_seen == o.first_seen && + groups == o.groups && image_digest == o.image_digest && image_id == o.image_id && is_base_image == o.is_base_image && @@ -422,7 +447,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [architecture, base_os, cid, cve_id, cvss_score, detection_name, detection_severity, detection_type, first_seen, image_digest, image_id, is_base_image, last_seen, packages_impacted, registry, repository, source, started_containers, stopped_containers, tag, vulnerability_cps_rating, vulnerability_description, vulnerability_severity].hash + [ai_related, architecture, base_os, cid, cve_id, cvss_score, detection_name, detection_severity, detection_type, first_seen, groups, image_digest, image_id, is_base_image, last_seen, packages_impacted, registry, repository, source, started_containers, stopped_containers, tag, vulnerability_cps_rating, vulnerability_description, vulnerability_severity].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_api_package_combined.rb b/lib/crimson-falcon/models/models_api_package_combined.rb index 8992547d..501b7139 100644 --- a/lib/crimson-falcon/models/models_api_package_combined.rb +++ b/lib/crimson-falcon/models/models_api_package_combined.rb @@ -32,6 +32,8 @@ module Falcon class ModelsAPIPackageCombined + attr_accessor :ai_related + attr_accessor :all_images attr_accessor :cid @@ -51,6 +53,7 @@ class ModelsAPIPackageCombined # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'ai_related' => :'ai_related', :'all_images' => :'all_images', :'cid' => :'cid', :'license' => :'license', @@ -70,6 +73,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'ai_related' => :'Boolean', :'all_images' => :'Integer', :'cid' => :'String', :'license' => :'String', @@ -102,6 +106,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'ai_related') + self.ai_related = attributes[:'ai_related'] + end + if attributes.key?(:'all_images') self.all_images = attributes[:'all_images'] end @@ -141,6 +149,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @ai_related.nil? + invalid_properties.push('invalid value for "ai_related", ai_related cannot be nil.') + end + if @all_images.nil? invalid_properties.push('invalid value for "all_images", all_images cannot be nil.') end @@ -179,6 +191,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @ai_related.nil? return false if @all_images.nil? return false if @cid.nil? return false if @license.nil? @@ -195,6 +208,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + ai_related == o.ai_related && all_images == o.all_images && cid == o.cid && license == o.license && @@ -214,7 +228,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [all_images, cid, license, package_name_version, running_images, type, vulnerabilities, vulnerability_count].hash + [ai_related, all_images, cid, license, package_name_version, running_images, type, vulnerabilities, vulnerability_count].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_api_package_combined_v2.rb b/lib/crimson-falcon/models/models_api_package_combined_v2.rb new file mode 100644 index 00000000..5b925594 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_package_combined_v2.rb @@ -0,0 +1,381 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsAPIPackageCombinedV2 + attr_accessor :ai_related + + attr_accessor :all_images + + attr_accessor :cid + + attr_accessor :cveid + + attr_accessor :fix_resolution + + attr_accessor :license + + attr_accessor :package_name_version + + attr_accessor :running_images + + attr_accessor :severity + + attr_accessor :type + + attr_accessor :vulnerability_description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ai_related' => :'ai_related', + :'all_images' => :'all_images', + :'cid' => :'cid', + :'cveid' => :'cveid', + :'fix_resolution' => :'fix_resolution', + :'license' => :'license', + :'package_name_version' => :'package_name_version', + :'running_images' => :'running_images', + :'severity' => :'severity', + :'type' => :'type', + :'vulnerability_description' => :'vulnerability_description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ai_related' => :'Boolean', + :'all_images' => :'Integer', + :'cid' => :'String', + :'cveid' => :'String', + :'fix_resolution' => :'Array', + :'license' => :'String', + :'package_name_version' => :'String', + :'running_images' => :'Integer', + :'severity' => :'String', + :'type' => :'String', + :'vulnerability_description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsAPIPackageCombinedV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsAPIPackageCombinedV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ai_related') + self.ai_related = attributes[:'ai_related'] + end + + if attributes.key?(:'all_images') + self.all_images = attributes[:'all_images'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cveid') + self.cveid = attributes[:'cveid'] + end + + if attributes.key?(:'fix_resolution') + if (value = attributes[:'fix_resolution']).is_a?(Array) + self.fix_resolution = value + end + end + + if attributes.key?(:'license') + self.license = attributes[:'license'] + end + + if attributes.key?(:'package_name_version') + self.package_name_version = attributes[:'package_name_version'] + end + + if attributes.key?(:'running_images') + self.running_images = attributes[:'running_images'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'vulnerability_description') + self.vulnerability_description = attributes[:'vulnerability_description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @ai_related.nil? + invalid_properties.push('invalid value for "ai_related", ai_related cannot be nil.') + end + + if @all_images.nil? + invalid_properties.push('invalid value for "all_images", all_images cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cveid.nil? + invalid_properties.push('invalid value for "cveid", cveid cannot be nil.') + end + + if @fix_resolution.nil? + invalid_properties.push('invalid value for "fix_resolution", fix_resolution cannot be nil.') + end + + if @license.nil? + invalid_properties.push('invalid value for "license", license cannot be nil.') + end + + if @package_name_version.nil? + invalid_properties.push('invalid value for "package_name_version", package_name_version cannot be nil.') + end + + if @running_images.nil? + invalid_properties.push('invalid value for "running_images", running_images cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @vulnerability_description.nil? + invalid_properties.push('invalid value for "vulnerability_description", vulnerability_description cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @ai_related.nil? + return false if @all_images.nil? + return false if @cid.nil? + return false if @cveid.nil? + return false if @fix_resolution.nil? + return false if @license.nil? + return false if @package_name_version.nil? + return false if @running_images.nil? + return false if @severity.nil? + return false if @type.nil? + return false if @vulnerability_description.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ai_related == o.ai_related && + all_images == o.all_images && + cid == o.cid && + cveid == o.cveid && + fix_resolution == o.fix_resolution && + license == o.license && + package_name_version == o.package_name_version && + running_images == o.running_images && + severity == o.severity && + type == o.type && + vulnerability_description == o.vulnerability_description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ai_related, all_images, cid, cveid, fix_resolution, license, package_name_version, running_images, severity, type, vulnerability_description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_api_vulnerability_combined.rb b/lib/crimson-falcon/models/models_api_vulnerability_combined.rb index 8acfa142..4f525c4b 100644 --- a/lib/crimson-falcon/models/models_api_vulnerability_combined.rb +++ b/lib/crimson-falcon/models/models_api_vulnerability_combined.rb @@ -32,6 +32,8 @@ module Falcon class ModelsAPIVulnerabilityCombined + attr_accessor :ai_related + attr_accessor :containers_impacted attr_accessor :cps_current_rating @@ -61,6 +63,7 @@ class ModelsAPIVulnerabilityCombined # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'ai_related' => :'ai_related', :'containers_impacted' => :'containers_impacted', :'cps_current_rating' => :'cps_current_rating', :'cve_id' => :'cve_id', @@ -85,6 +88,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'ai_related' => :'Boolean', :'containers_impacted' => :'Integer', :'cps_current_rating' => :'String', :'cve_id' => :'String', @@ -122,6 +126,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'ai_related') + self.ai_related = attributes[:'ai_related'] + end + if attributes.key?(:'containers_impacted') self.containers_impacted = attributes[:'containers_impacted'] end @@ -179,6 +187,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @ai_related.nil? + invalid_properties.push('invalid value for "ai_related", ai_related cannot be nil.') + end + if @containers_impacted.nil? invalid_properties.push('invalid value for "containers_impacted", containers_impacted cannot be nil.') end @@ -237,6 +249,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @ai_related.nil? return false if @containers_impacted.nil? return false if @cps_current_rating.nil? return false if @cve_id.nil? @@ -258,6 +271,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + ai_related == o.ai_related && containers_impacted == o.containers_impacted && cps_current_rating == o.cps_current_rating && cve_id == o.cve_id && @@ -282,7 +296,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [containers_impacted, cps_current_rating, cve_id, cvss_score, description, exploit_found, exploited_status, exploited_status_string, images_impacted, packages_impacted, published_date, remediation_available, severity].hash + [ai_related, containers_impacted, cps_current_rating, cve_id, cvss_score, description, exploit_found, exploited_status, exploited_status_string, images_impacted, packages_impacted, published_date, remediation_available, severity].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_application_library.rb b/lib/crimson-falcon/models/models_application_library.rb index 344a7c6b..e39621cb 100644 --- a/lib/crimson-falcon/models/models_application_library.rb +++ b/lib/crimson-falcon/models/models_application_library.rb @@ -46,6 +46,8 @@ class ModelsApplicationLibrary attr_accessor :version + attr_accessor :ai_related + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -55,7 +57,8 @@ def self.attribute_map :'license' => :'License', :'name' => :'Name', :'path' => :'Path', - :'version' => :'Version' + :'version' => :'Version', + :'ai_related' => :'ai_related' } end @@ -73,7 +76,8 @@ def self.openapi_types :'license' => :'String', :'name' => :'String', :'path' => :'String', - :'version' => :'String' + :'version' => :'String', + :'ai_related' => :'Boolean' } end @@ -125,6 +129,10 @@ def initialize(attributes = {}) if attributes.key?(:'version') self.version = attributes[:'version'] end + + if attributes.key?(:'ai_related') + self.ai_related = attributes[:'ai_related'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -151,7 +159,8 @@ def ==(o) license == o.license && name == o.name && path == o.path && - version == o.version + version == o.version && + ai_related == o.ai_related end # @see the `==` method @@ -163,7 +172,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [hash, layer_hash, layer_index, license, name, path, version].hash + [hash, layer_hash, layer_index, license, name, path, version, ai_related].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_container.rb b/lib/crimson-falcon/models/models_container.rb index 8c210174..8fa4c020 100644 --- a/lib/crimson-falcon/models/models_container.rb +++ b/lib/crimson-falcon/models/models_container.rb @@ -40,6 +40,8 @@ class ModelsContainer attr_accessor :cloud_account_id + attr_accessor :cloud_instance_id + attr_accessor :cloud_name attr_accessor :cloud_region @@ -135,6 +137,7 @@ def self.attribute_map :'allow_privilege_escalation' => :'allow_privilege_escalation', :'cid' => :'cid', :'cloud_account_id' => :'cloud_account_id', + :'cloud_instance_id' => :'cloud_instance_id', :'cloud_name' => :'cloud_name', :'cloud_region' => :'cloud_region', :'cloud_service' => :'cloud_service', @@ -194,6 +197,7 @@ def self.openapi_types :'allow_privilege_escalation' => :'Boolean', :'cid' => :'String', :'cloud_account_id' => :'String', + :'cloud_instance_id' => :'String', :'cloud_name' => :'String', :'cloud_region' => :'String', :'cloud_service' => :'String', @@ -280,6 +284,10 @@ def initialize(attributes = {}) self.cloud_account_id = attributes[:'cloud_account_id'] end + if attributes.key?(:'cloud_instance_id') + self.cloud_instance_id = attributes[:'cloud_instance_id'] + end + if attributes.key?(:'cloud_name') self.cloud_name = attributes[:'cloud_name'] end @@ -483,6 +491,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "cloud_account_id", cloud_account_id cannot be nil.') end + if @cloud_instance_id.nil? + invalid_properties.push('invalid value for "cloud_instance_id", cloud_instance_id cannot be nil.') + end + if @cloud_name.nil? invalid_properties.push('invalid value for "cloud_name", cloud_name cannot be nil.') end @@ -669,6 +681,7 @@ def valid? return false if @allow_privilege_escalation.nil? return false if @cid.nil? return false if @cloud_account_id.nil? + return false if @cloud_instance_id.nil? return false if @cloud_name.nil? return false if @cloud_region.nil? return false if @cloud_service.nil? @@ -725,6 +738,7 @@ def ==(o) allow_privilege_escalation == o.allow_privilege_escalation && cid == o.cid && cloud_account_id == o.cloud_account_id && + cloud_instance_id == o.cloud_instance_id && cloud_name == o.cloud_name && cloud_region == o.cloud_region && cloud_service == o.cloud_service && @@ -780,7 +794,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agents, allow_privilege_escalation, cid, cloud_account_id, cloud_name, cloud_region, cloud_service, cluster_id, cluster_name, config_labels, container_id, container_name, created_at, first_seen, image_application_package_count, image_assessed_at, image_detection_count, image_digest, image_has_been_assessed, image_highest_severity_vulnerability, image_id, image_package_count, image_registry, image_repository, image_tag, image_vulnerability_count, insecure_mount_source, insecure_mount_type, insecure_propagation_mode, interactive_mode, ipv4, ipv6, kac_agent_id, labels, labels_list, last_seen, namespace, node_name, node_uid, pod_id, pod_name, ports, privileged, root_write_access, run_as_root_group, run_as_root_user, running_status, volume_mounts].hash + [agents, allow_privilege_escalation, cid, cloud_account_id, cloud_instance_id, cloud_name, cloud_region, cloud_service, cluster_id, cluster_name, config_labels, container_id, container_name, created_at, first_seen, image_application_package_count, image_assessed_at, image_detection_count, image_digest, image_has_been_assessed, image_highest_severity_vulnerability, image_id, image_package_count, image_registry, image_repository, image_tag, image_vulnerability_count, insecure_mount_source, insecure_mount_type, insecure_propagation_mode, interactive_mode, ipv4, ipv6, kac_agent_id, labels, labels_list, last_seen, namespace, node_name, node_uid, pod_id, pod_name, ports, privileged, root_write_access, run_as_root_group, run_as_root_user, running_status, volume_mounts].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_ext_api_image_combined.rb b/lib/crimson-falcon/models/models_ext_api_image_combined.rb index 980800db..814171d2 100644 --- a/lib/crimson-falcon/models/models_ext_api_image_combined.rb +++ b/lib/crimson-falcon/models/models_ext_api_image_combined.rb @@ -32,6 +32,8 @@ module Falcon class ModelsExtAPIImageCombined + attr_accessor :ai_related + attr_accessor :architecture attr_accessor :base_os @@ -75,6 +77,7 @@ class ModelsExtAPIImageCombined # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'ai_related' => :'ai_related', :'architecture' => :'architecture', :'base_os' => :'base_os', :'cid' => :'cid', @@ -106,6 +109,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'ai_related' => :'Boolean', :'architecture' => :'String', :'base_os' => :'String', :'cid' => :'String', @@ -150,6 +154,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'ai_related') + self.ai_related = attributes[:'ai_related'] + end + if attributes.key?(:'architecture') self.architecture = attributes[:'architecture'] end @@ -235,6 +243,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @ai_related.nil? + invalid_properties.push('invalid value for "ai_related", ai_related cannot be nil.') + end + if @architecture.nil? invalid_properties.push('invalid value for "architecture", architecture cannot be nil.') end @@ -321,6 +333,7 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? + return false if @ai_related.nil? return false if @architecture.nil? return false if @base_os.nil? return false if @cid.nil? @@ -349,6 +362,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + ai_related == o.ai_related && architecture == o.architecture && base_os == o.base_os && cid == o.cid && @@ -380,7 +394,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [architecture, base_os, cid, containers, detections, first_seen, highest_detection_severity, highest_vulnerability_severity, image_digest, image_id, last_seen, layers_with_vulnerabilities, packages, registry, report_url_by_id_and_digest, report_url_by_repo_and_tag, repository, tag, vulnerabilities, warning].hash + [ai_related, architecture, base_os, cid, containers, detections, first_seen, highest_detection_severity, highest_vulnerability_severity, image_digest, image_id, last_seen, layers_with_vulnerabilities, packages, registry, report_url_by_id_and_digest, report_url_by_repo_and_tag, repository, tag, vulnerabilities, warning].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_message.rb b/lib/crimson-falcon/models/models_message.rb new file mode 100644 index 00000000..46ede37c --- /dev/null +++ b/lib/crimson-falcon/models/models_message.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsMessage + attr_accessor :text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'text' => :'text' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'text' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsMessage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'text') + self.text = attributes[:'text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @text.nil? + invalid_properties.push('invalid value for "text", text cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @text.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + text == o.text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_partial_fingerprints.rb b/lib/crimson-falcon/models/models_partial_fingerprints.rb new file mode 100644 index 00000000..bae172bb --- /dev/null +++ b/lib/crimson-falcon/models/models_partial_fingerprints.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsPartialFingerprints + attr_accessor :identifier_v1 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identifier_v1' => :'identifier/v1' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identifier_v1' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsPartialFingerprints` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsPartialFingerprints`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'identifier_v1') + self.identifier_v1 = attributes[:'identifier_v1'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @identifier_v1.nil? + invalid_properties.push('invalid value for "identifier_v1", identifier_v1 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @identifier_v1.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + identifier_v1 == o.identifier_v1 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [identifier_v1].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_result.rb b/lib/crimson-falcon/models/models_result.rb new file mode 100644 index 00000000..4704d4c8 --- /dev/null +++ b/lib/crimson-falcon/models/models_result.rb @@ -0,0 +1,339 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsResult + attr_accessor :kind + + attr_accessor :level + + attr_accessor :locations + + attr_accessor :message + + attr_accessor :partial_fingerprints + + attr_accessor :properties + + attr_accessor :rule_id + + attr_accessor :rule_index + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'kind' => :'kind', + :'level' => :'level', + :'locations' => :'locations', + :'message' => :'message', + :'partial_fingerprints' => :'partialFingerprints', + :'properties' => :'properties', + :'rule_id' => :'ruleId', + :'rule_index' => :'ruleIndex' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'kind' => :'String', + :'level' => :'String', + :'locations' => :'Array', + :'message' => :'ModelsMessage', + :'partial_fingerprints' => :'ModelsPartialFingerprints', + :'properties' => :'ModelsResultProperties', + :'rule_id' => :'String', + :'rule_index' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'kind') + self.kind = attributes[:'kind'] + end + + if attributes.key?(:'level') + self.level = attributes[:'level'] + end + + if attributes.key?(:'locations') + if (value = attributes[:'locations']).is_a?(Array) + self.locations = value + end + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'partial_fingerprints') + self.partial_fingerprints = attributes[:'partial_fingerprints'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'rule_id') + self.rule_id = attributes[:'rule_id'] + end + + if attributes.key?(:'rule_index') + self.rule_index = attributes[:'rule_index'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @kind.nil? + invalid_properties.push('invalid value for "kind", kind cannot be nil.') + end + + if @level.nil? + invalid_properties.push('invalid value for "level", level cannot be nil.') + end + + if @locations.nil? + invalid_properties.push('invalid value for "locations", locations cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + if @partial_fingerprints.nil? + invalid_properties.push('invalid value for "partial_fingerprints", partial_fingerprints cannot be nil.') + end + + if @properties.nil? + invalid_properties.push('invalid value for "properties", properties cannot be nil.') + end + + if @rule_id.nil? + invalid_properties.push('invalid value for "rule_id", rule_id cannot be nil.') + end + + if @rule_index.nil? + invalid_properties.push('invalid value for "rule_index", rule_index cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @kind.nil? + return false if @level.nil? + return false if @locations.nil? + return false if @message.nil? + return false if @partial_fingerprints.nil? + return false if @properties.nil? + return false if @rule_id.nil? + return false if @rule_index.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + kind == o.kind && + level == o.level && + locations == o.locations && + message == o.message && + partial_fingerprints == o.partial_fingerprints && + properties == o.properties && + rule_id == o.rule_id && + rule_index == o.rule_index + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [kind, level, locations, message, partial_fingerprints, properties, rule_id, rule_index].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_result_location.rb b/lib/crimson-falcon/models/models_result_location.rb new file mode 100644 index 00000000..6b8b3fb8 --- /dev/null +++ b/lib/crimson-falcon/models/models_result_location.rb @@ -0,0 +1,253 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsResultLocation + attr_accessor :physical_location + + attr_accessor :properties + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'physical_location' => :'physicalLocation', + :'properties' => :'properties' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'physical_location' => :'ModelsResultPhysicalLocation', + :'properties' => :'ModelsResultLocationProperties' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsResultLocation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsResultLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'physical_location') + self.physical_location = attributes[:'physical_location'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @physical_location.nil? + invalid_properties.push('invalid value for "physical_location", physical_location cannot be nil.') + end + + if @properties.nil? + invalid_properties.push('invalid value for "properties", properties cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @physical_location.nil? + return false if @properties.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + physical_location == o.physical_location && + properties == o.properties + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [physical_location, properties].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_result_location_properties.rb b/lib/crimson-falcon/models/models_result_location_properties.rb new file mode 100644 index 00000000..40719e89 --- /dev/null +++ b/lib/crimson-falcon/models/models_result_location_properties.rb @@ -0,0 +1,253 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsResultLocationProperties + attr_accessor :layer + + attr_accessor :path + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'layer' => :'layer', + :'path' => :'path' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'layer' => :'String', + :'path' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsResultLocationProperties` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsResultLocationProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'layer') + self.layer = attributes[:'layer'] + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @layer.nil? + invalid_properties.push('invalid value for "layer", layer cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @layer.nil? + return false if @path.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + layer == o.layer && + path == o.path + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [layer, path].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_result_physical_location.rb b/lib/crimson-falcon/models/models_result_physical_location.rb new file mode 100644 index 00000000..f21d0f57 --- /dev/null +++ b/lib/crimson-falcon/models/models_result_physical_location.rb @@ -0,0 +1,253 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsResultPhysicalLocation + attr_accessor :artifact_location + + attr_accessor :region + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'artifact_location' => :'artifactLocation', + :'region' => :'region' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'artifact_location' => :'ModelsResultPhysicalLocationArtifactLocation', + :'region' => :'ModelsResultPhysicalLocationRegion' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsResultPhysicalLocation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsResultPhysicalLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'artifact_location') + self.artifact_location = attributes[:'artifact_location'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @artifact_location.nil? + invalid_properties.push('invalid value for "artifact_location", artifact_location cannot be nil.') + end + + if @region.nil? + invalid_properties.push('invalid value for "region", region cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @artifact_location.nil? + return false if @region.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + artifact_location == o.artifact_location && + region == o.region + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [artifact_location, region].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_result_physical_location_artifact_location.rb b/lib/crimson-falcon/models/models_result_physical_location_artifact_location.rb new file mode 100644 index 00000000..43fa6dec --- /dev/null +++ b/lib/crimson-falcon/models/models_result_physical_location_artifact_location.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsResultPhysicalLocationArtifactLocation + attr_accessor :uri + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'uri' => :'uri' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'uri' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsResultPhysicalLocationArtifactLocation` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsResultPhysicalLocationArtifactLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'uri') + self.uri = attributes[:'uri'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @uri.nil? + invalid_properties.push('invalid value for "uri", uri cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @uri.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + uri == o.uri + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [uri].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_result_physical_location_region.rb b/lib/crimson-falcon/models/models_result_physical_location_region.rb new file mode 100644 index 00000000..45b8e640 --- /dev/null +++ b/lib/crimson-falcon/models/models_result_physical_location_region.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsResultPhysicalLocationRegion + attr_accessor :start_line + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'start_line' => :'startLine' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'start_line' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsResultPhysicalLocationRegion` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsResultPhysicalLocationRegion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'start_line') + self.start_line = attributes[:'start_line'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @start_line.nil? + invalid_properties.push('invalid value for "start_line", start_line cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @start_line.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + start_line == o.start_line + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [start_line].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_result_properties.rb b/lib/crimson-falcon/models/models_result_properties.rb new file mode 100644 index 00000000..d5b4f7f9 --- /dev/null +++ b/lib/crimson-falcon/models/models_result_properties.rb @@ -0,0 +1,365 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsResultProperties + attr_accessor :asset_id + + attr_accessor :asset_name + + attr_accessor :asset_type + + attr_accessor :cid + + attr_accessor :cloud_account_id + + attr_accessor :cloud_account_name + + attr_accessor :cloud_provider + + attr_accessor :function_type + + attr_accessor :is_supported + + attr_accessor :region + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'asset_id' => :'assetID', + :'asset_name' => :'assetName', + :'asset_type' => :'assetType', + :'cid' => :'cid', + :'cloud_account_id' => :'cloudAccountID', + :'cloud_account_name' => :'cloudAccountName', + :'cloud_provider' => :'cloudProvider', + :'function_type' => :'functionType', + :'is_supported' => :'isSupported', + :'region' => :'region' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'asset_id' => :'String', + :'asset_name' => :'String', + :'asset_type' => :'String', + :'cid' => :'String', + :'cloud_account_id' => :'String', + :'cloud_account_name' => :'String', + :'cloud_provider' => :'String', + :'function_type' => :'String', + :'is_supported' => :'Boolean', + :'region' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsResultProperties` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsResultProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'asset_id') + self.asset_id = attributes[:'asset_id'] + end + + if attributes.key?(:'asset_name') + self.asset_name = attributes[:'asset_name'] + end + + if attributes.key?(:'asset_type') + self.asset_type = attributes[:'asset_type'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cloud_account_id') + self.cloud_account_id = attributes[:'cloud_account_id'] + end + + if attributes.key?(:'cloud_account_name') + self.cloud_account_name = attributes[:'cloud_account_name'] + end + + if attributes.key?(:'cloud_provider') + self.cloud_provider = attributes[:'cloud_provider'] + end + + if attributes.key?(:'function_type') + self.function_type = attributes[:'function_type'] + end + + if attributes.key?(:'is_supported') + self.is_supported = attributes[:'is_supported'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @asset_id.nil? + invalid_properties.push('invalid value for "asset_id", asset_id cannot be nil.') + end + + if @asset_name.nil? + invalid_properties.push('invalid value for "asset_name", asset_name cannot be nil.') + end + + if @asset_type.nil? + invalid_properties.push('invalid value for "asset_type", asset_type cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cloud_account_id.nil? + invalid_properties.push('invalid value for "cloud_account_id", cloud_account_id cannot be nil.') + end + + if @cloud_account_name.nil? + invalid_properties.push('invalid value for "cloud_account_name", cloud_account_name cannot be nil.') + end + + if @cloud_provider.nil? + invalid_properties.push('invalid value for "cloud_provider", cloud_provider cannot be nil.') + end + + if @function_type.nil? + invalid_properties.push('invalid value for "function_type", function_type cannot be nil.') + end + + if @is_supported.nil? + invalid_properties.push('invalid value for "is_supported", is_supported cannot be nil.') + end + + if @region.nil? + invalid_properties.push('invalid value for "region", region cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @asset_id.nil? + return false if @asset_name.nil? + return false if @asset_type.nil? + return false if @cid.nil? + return false if @cloud_account_id.nil? + return false if @cloud_account_name.nil? + return false if @cloud_provider.nil? + return false if @function_type.nil? + return false if @is_supported.nil? + return false if @region.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + asset_id == o.asset_id && + asset_name == o.asset_name && + asset_type == o.asset_type && + cid == o.cid && + cloud_account_id == o.cloud_account_id && + cloud_account_name == o.cloud_account_name && + cloud_provider == o.cloud_provider && + function_type == o.function_type && + is_supported == o.is_supported && + region == o.region + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [asset_id, asset_name, asset_type, cid, cloud_account_id, cloud_account_name, cloud_provider, function_type, is_supported, region].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_rule.rb b/lib/crimson-falcon/models/models_rule.rb new file mode 100644 index 00000000..24b13017 --- /dev/null +++ b/lib/crimson-falcon/models/models_rule.rb @@ -0,0 +1,337 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsRule + attr_accessor :default_configuration + + attr_accessor :full_description + + attr_accessor :help + + attr_accessor :help_uri + + attr_accessor :id + + attr_accessor :name + + attr_accessor :properties + + attr_accessor :short_description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'default_configuration' => :'defaultConfiguration', + :'full_description' => :'fullDescription', + :'help' => :'help', + :'help_uri' => :'helpUri', + :'id' => :'id', + :'name' => :'name', + :'properties' => :'properties', + :'short_description' => :'shortDescription' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'default_configuration' => :'ModelsRuleDefaultConfiguration', + :'full_description' => :'ModelsMessage', + :'help' => :'Help', + :'help_uri' => :'String', + :'id' => :'String', + :'name' => :'String', + :'properties' => :'ModelsRuleProperties', + :'short_description' => :'ModelsMessage' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsRule` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsRule`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'default_configuration') + self.default_configuration = attributes[:'default_configuration'] + end + + if attributes.key?(:'full_description') + self.full_description = attributes[:'full_description'] + end + + if attributes.key?(:'help') + self.help = attributes[:'help'] + end + + if attributes.key?(:'help_uri') + self.help_uri = attributes[:'help_uri'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'short_description') + self.short_description = attributes[:'short_description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @default_configuration.nil? + invalid_properties.push('invalid value for "default_configuration", default_configuration cannot be nil.') + end + + if @full_description.nil? + invalid_properties.push('invalid value for "full_description", full_description cannot be nil.') + end + + if @help.nil? + invalid_properties.push('invalid value for "help", help cannot be nil.') + end + + if @help_uri.nil? + invalid_properties.push('invalid value for "help_uri", help_uri cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @properties.nil? + invalid_properties.push('invalid value for "properties", properties cannot be nil.') + end + + if @short_description.nil? + invalid_properties.push('invalid value for "short_description", short_description cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @default_configuration.nil? + return false if @full_description.nil? + return false if @help.nil? + return false if @help_uri.nil? + return false if @id.nil? + return false if @name.nil? + return false if @properties.nil? + return false if @short_description.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + default_configuration == o.default_configuration && + full_description == o.full_description && + help == o.help && + help_uri == o.help_uri && + id == o.id && + name == o.name && + properties == o.properties && + short_description == o.short_description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [default_configuration, full_description, help, help_uri, id, name, properties, short_description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_rule_default_configuration.rb b/lib/crimson-falcon/models/models_rule_default_configuration.rb new file mode 100644 index 00000000..01b8d184 --- /dev/null +++ b/lib/crimson-falcon/models/models_rule_default_configuration.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsRuleDefaultConfiguration + attr_accessor :level + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'level' => :'level' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'level' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsRuleDefaultConfiguration` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsRuleDefaultConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'level') + self.level = attributes[:'level'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @level.nil? + invalid_properties.push('invalid value for "level", level cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @level.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + level == o.level + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [level].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_rule_properties.rb b/lib/crimson-falcon/models/models_rule_properties.rb new file mode 100644 index 00000000..35b6ad9b --- /dev/null +++ b/lib/crimson-falcon/models/models_rule_properties.rb @@ -0,0 +1,669 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsRuleProperties + attr_accessor :cvss_attack_complexity + + attr_accessor :cvss_attack_vector + + attr_accessor :cvss_availability_impact + + attr_accessor :cvss_base_score + + attr_accessor :cvss_confidentiality_impact + + attr_accessor :cvss_exploitability_score + + attr_accessor :cvss_impact_score + + attr_accessor :cvss_integrity_impact + + attr_accessor :cvss_privileges_required + + attr_accessor :cvss_scope + + attr_accessor :cvss_source + + attr_accessor :cvss_user_interaction + + attr_accessor :cvss_vector + + attr_accessor :description + + attr_accessor :exploit_date_recorded_timestamp + + attr_accessor :exploit_sources + + attr_accessor :exploit_status + + attr_accessor :exploit_updated_timestamp + + attr_accessor :exprt_rating + + attr_accessor :exprt_rating_date_recorded_timestamp + + attr_accessor :exprt_rating_highest + + attr_accessor :exprt_rating_highest_recorded_timestamp + + attr_accessor :first_seen_timestamp + + attr_accessor :references + + attr_accessor :remediation_count + + attr_accessor :remediation_sources + + attr_accessor :remediations + + attr_accessor :runtime + + attr_accessor :scanner_version + + attr_accessor :severity + + attr_accessor :top_exprt_rating_factors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cvss_attack_complexity' => :'cvssAttackComplexity', + :'cvss_attack_vector' => :'cvssAttackVector', + :'cvss_availability_impact' => :'cvssAvailabilityImpact', + :'cvss_base_score' => :'cvssBaseScore', + :'cvss_confidentiality_impact' => :'cvssConfidentialityImpact', + :'cvss_exploitability_score' => :'cvssExploitabilityScore', + :'cvss_impact_score' => :'cvssImpactScore', + :'cvss_integrity_impact' => :'cvssIntegrityImpact', + :'cvss_privileges_required' => :'cvssPrivilegesRequired', + :'cvss_scope' => :'cvssScope', + :'cvss_source' => :'cvssSource', + :'cvss_user_interaction' => :'cvssUserInteraction', + :'cvss_vector' => :'cvssVector', + :'description' => :'description', + :'exploit_date_recorded_timestamp' => :'exploitDateRecordedTimestamp', + :'exploit_sources' => :'exploitSources', + :'exploit_status' => :'exploitStatus', + :'exploit_updated_timestamp' => :'exploitUpdatedTimestamp', + :'exprt_rating' => :'exprtRating', + :'exprt_rating_date_recorded_timestamp' => :'exprtRatingDateRecordedTimestamp', + :'exprt_rating_highest' => :'exprtRatingHighest', + :'exprt_rating_highest_recorded_timestamp' => :'exprtRatingHighestRecordedTimestamp', + :'first_seen_timestamp' => :'firstSeenTimestamp', + :'references' => :'references', + :'remediation_count' => :'remediationCount', + :'remediation_sources' => :'remediationSources', + :'remediations' => :'remediations', + :'runtime' => :'runtime', + :'scanner_version' => :'scannerVersion', + :'severity' => :'severity', + :'top_exprt_rating_factors' => :'topExprtRatingFactors' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cvss_attack_complexity' => :'String', + :'cvss_attack_vector' => :'String', + :'cvss_availability_impact' => :'String', + :'cvss_base_score' => :'Float', + :'cvss_confidentiality_impact' => :'String', + :'cvss_exploitability_score' => :'Float', + :'cvss_impact_score' => :'Float', + :'cvss_integrity_impact' => :'String', + :'cvss_privileges_required' => :'String', + :'cvss_scope' => :'String', + :'cvss_source' => :'String', + :'cvss_user_interaction' => :'String', + :'cvss_vector' => :'String', + :'description' => :'String', + :'exploit_date_recorded_timestamp' => :'Integer', + :'exploit_sources' => :'Array', + :'exploit_status' => :'String', + :'exploit_updated_timestamp' => :'Integer', + :'exprt_rating' => :'String', + :'exprt_rating_date_recorded_timestamp' => :'Integer', + :'exprt_rating_highest' => :'String', + :'exprt_rating_highest_recorded_timestamp' => :'Integer', + :'first_seen_timestamp' => :'Integer', + :'references' => :'Array', + :'remediation_count' => :'Integer', + :'remediation_sources' => :'Array', + :'remediations' => :'Array', + :'runtime' => :'String', + :'scanner_version' => :'String', + :'severity' => :'String', + :'top_exprt_rating_factors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsRuleProperties` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsRuleProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cvss_attack_complexity') + self.cvss_attack_complexity = attributes[:'cvss_attack_complexity'] + end + + if attributes.key?(:'cvss_attack_vector') + self.cvss_attack_vector = attributes[:'cvss_attack_vector'] + end + + if attributes.key?(:'cvss_availability_impact') + self.cvss_availability_impact = attributes[:'cvss_availability_impact'] + end + + if attributes.key?(:'cvss_base_score') + self.cvss_base_score = attributes[:'cvss_base_score'] + end + + if attributes.key?(:'cvss_confidentiality_impact') + self.cvss_confidentiality_impact = attributes[:'cvss_confidentiality_impact'] + end + + if attributes.key?(:'cvss_exploitability_score') + self.cvss_exploitability_score = attributes[:'cvss_exploitability_score'] + end + + if attributes.key?(:'cvss_impact_score') + self.cvss_impact_score = attributes[:'cvss_impact_score'] + end + + if attributes.key?(:'cvss_integrity_impact') + self.cvss_integrity_impact = attributes[:'cvss_integrity_impact'] + end + + if attributes.key?(:'cvss_privileges_required') + self.cvss_privileges_required = attributes[:'cvss_privileges_required'] + end + + if attributes.key?(:'cvss_scope') + self.cvss_scope = attributes[:'cvss_scope'] + end + + if attributes.key?(:'cvss_source') + self.cvss_source = attributes[:'cvss_source'] + end + + if attributes.key?(:'cvss_user_interaction') + self.cvss_user_interaction = attributes[:'cvss_user_interaction'] + end + + if attributes.key?(:'cvss_vector') + self.cvss_vector = attributes[:'cvss_vector'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'exploit_date_recorded_timestamp') + self.exploit_date_recorded_timestamp = attributes[:'exploit_date_recorded_timestamp'] + end + + if attributes.key?(:'exploit_sources') + if (value = attributes[:'exploit_sources']).is_a?(Array) + self.exploit_sources = value + end + end + + if attributes.key?(:'exploit_status') + self.exploit_status = attributes[:'exploit_status'] + end + + if attributes.key?(:'exploit_updated_timestamp') + self.exploit_updated_timestamp = attributes[:'exploit_updated_timestamp'] + end + + if attributes.key?(:'exprt_rating') + self.exprt_rating = attributes[:'exprt_rating'] + end + + if attributes.key?(:'exprt_rating_date_recorded_timestamp') + self.exprt_rating_date_recorded_timestamp = attributes[:'exprt_rating_date_recorded_timestamp'] + end + + if attributes.key?(:'exprt_rating_highest') + self.exprt_rating_highest = attributes[:'exprt_rating_highest'] + end + + if attributes.key?(:'exprt_rating_highest_recorded_timestamp') + self.exprt_rating_highest_recorded_timestamp = attributes[:'exprt_rating_highest_recorded_timestamp'] + end + + if attributes.key?(:'first_seen_timestamp') + self.first_seen_timestamp = attributes[:'first_seen_timestamp'] + end + + if attributes.key?(:'references') + if (value = attributes[:'references']).is_a?(Array) + self.references = value + end + end + + if attributes.key?(:'remediation_count') + self.remediation_count = attributes[:'remediation_count'] + end + + if attributes.key?(:'remediation_sources') + if (value = attributes[:'remediation_sources']).is_a?(Array) + self.remediation_sources = value + end + end + + if attributes.key?(:'remediations') + if (value = attributes[:'remediations']).is_a?(Array) + self.remediations = value + end + end + + if attributes.key?(:'runtime') + self.runtime = attributes[:'runtime'] + end + + if attributes.key?(:'scanner_version') + self.scanner_version = attributes[:'scanner_version'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'top_exprt_rating_factors') + if (value = attributes[:'top_exprt_rating_factors']).is_a?(Array) + self.top_exprt_rating_factors = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @cvss_attack_complexity.nil? + invalid_properties.push('invalid value for "cvss_attack_complexity", cvss_attack_complexity cannot be nil.') + end + + if @cvss_attack_vector.nil? + invalid_properties.push('invalid value for "cvss_attack_vector", cvss_attack_vector cannot be nil.') + end + + if @cvss_availability_impact.nil? + invalid_properties.push('invalid value for "cvss_availability_impact", cvss_availability_impact cannot be nil.') + end + + if @cvss_base_score.nil? + invalid_properties.push('invalid value for "cvss_base_score", cvss_base_score cannot be nil.') + end + + if @cvss_confidentiality_impact.nil? + invalid_properties.push('invalid value for "cvss_confidentiality_impact", cvss_confidentiality_impact cannot be nil.') + end + + if @cvss_exploitability_score.nil? + invalid_properties.push('invalid value for "cvss_exploitability_score", cvss_exploitability_score cannot be nil.') + end + + if @cvss_impact_score.nil? + invalid_properties.push('invalid value for "cvss_impact_score", cvss_impact_score cannot be nil.') + end + + if @cvss_integrity_impact.nil? + invalid_properties.push('invalid value for "cvss_integrity_impact", cvss_integrity_impact cannot be nil.') + end + + if @cvss_privileges_required.nil? + invalid_properties.push('invalid value for "cvss_privileges_required", cvss_privileges_required cannot be nil.') + end + + if @cvss_scope.nil? + invalid_properties.push('invalid value for "cvss_scope", cvss_scope cannot be nil.') + end + + if @cvss_source.nil? + invalid_properties.push('invalid value for "cvss_source", cvss_source cannot be nil.') + end + + if @cvss_user_interaction.nil? + invalid_properties.push('invalid value for "cvss_user_interaction", cvss_user_interaction cannot be nil.') + end + + if @cvss_vector.nil? + invalid_properties.push('invalid value for "cvss_vector", cvss_vector cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @exploit_date_recorded_timestamp.nil? + invalid_properties.push('invalid value for "exploit_date_recorded_timestamp", exploit_date_recorded_timestamp cannot be nil.') + end + + if @exploit_sources.nil? + invalid_properties.push('invalid value for "exploit_sources", exploit_sources cannot be nil.') + end + + if @exploit_status.nil? + invalid_properties.push('invalid value for "exploit_status", exploit_status cannot be nil.') + end + + if @exploit_updated_timestamp.nil? + invalid_properties.push('invalid value for "exploit_updated_timestamp", exploit_updated_timestamp cannot be nil.') + end + + if @exprt_rating.nil? + invalid_properties.push('invalid value for "exprt_rating", exprt_rating cannot be nil.') + end + + if @exprt_rating_date_recorded_timestamp.nil? + invalid_properties.push('invalid value for "exprt_rating_date_recorded_timestamp", exprt_rating_date_recorded_timestamp cannot be nil.') + end + + if @exprt_rating_highest.nil? + invalid_properties.push('invalid value for "exprt_rating_highest", exprt_rating_highest cannot be nil.') + end + + if @exprt_rating_highest_recorded_timestamp.nil? + invalid_properties.push('invalid value for "exprt_rating_highest_recorded_timestamp", exprt_rating_highest_recorded_timestamp cannot be nil.') + end + + if @first_seen_timestamp.nil? + invalid_properties.push('invalid value for "first_seen_timestamp", first_seen_timestamp cannot be nil.') + end + + if @references.nil? + invalid_properties.push('invalid value for "references", references cannot be nil.') + end + + if @remediation_count.nil? + invalid_properties.push('invalid value for "remediation_count", remediation_count cannot be nil.') + end + + if @remediation_sources.nil? + invalid_properties.push('invalid value for "remediation_sources", remediation_sources cannot be nil.') + end + + if @remediations.nil? + invalid_properties.push('invalid value for "remediations", remediations cannot be nil.') + end + + if @runtime.nil? + invalid_properties.push('invalid value for "runtime", runtime cannot be nil.') + end + + if @scanner_version.nil? + invalid_properties.push('invalid value for "scanner_version", scanner_version cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @top_exprt_rating_factors.nil? + invalid_properties.push('invalid value for "top_exprt_rating_factors", top_exprt_rating_factors cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @cvss_attack_complexity.nil? + return false if @cvss_attack_vector.nil? + return false if @cvss_availability_impact.nil? + return false if @cvss_base_score.nil? + return false if @cvss_confidentiality_impact.nil? + return false if @cvss_exploitability_score.nil? + return false if @cvss_impact_score.nil? + return false if @cvss_integrity_impact.nil? + return false if @cvss_privileges_required.nil? + return false if @cvss_scope.nil? + return false if @cvss_source.nil? + return false if @cvss_user_interaction.nil? + return false if @cvss_vector.nil? + return false if @description.nil? + return false if @exploit_date_recorded_timestamp.nil? + return false if @exploit_sources.nil? + return false if @exploit_status.nil? + return false if @exploit_updated_timestamp.nil? + return false if @exprt_rating.nil? + return false if @exprt_rating_date_recorded_timestamp.nil? + return false if @exprt_rating_highest.nil? + return false if @exprt_rating_highest_recorded_timestamp.nil? + return false if @first_seen_timestamp.nil? + return false if @references.nil? + return false if @remediation_count.nil? + return false if @remediation_sources.nil? + return false if @remediations.nil? + return false if @runtime.nil? + return false if @scanner_version.nil? + return false if @severity.nil? + return false if @top_exprt_rating_factors.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cvss_attack_complexity == o.cvss_attack_complexity && + cvss_attack_vector == o.cvss_attack_vector && + cvss_availability_impact == o.cvss_availability_impact && + cvss_base_score == o.cvss_base_score && + cvss_confidentiality_impact == o.cvss_confidentiality_impact && + cvss_exploitability_score == o.cvss_exploitability_score && + cvss_impact_score == o.cvss_impact_score && + cvss_integrity_impact == o.cvss_integrity_impact && + cvss_privileges_required == o.cvss_privileges_required && + cvss_scope == o.cvss_scope && + cvss_source == o.cvss_source && + cvss_user_interaction == o.cvss_user_interaction && + cvss_vector == o.cvss_vector && + description == o.description && + exploit_date_recorded_timestamp == o.exploit_date_recorded_timestamp && + exploit_sources == o.exploit_sources && + exploit_status == o.exploit_status && + exploit_updated_timestamp == o.exploit_updated_timestamp && + exprt_rating == o.exprt_rating && + exprt_rating_date_recorded_timestamp == o.exprt_rating_date_recorded_timestamp && + exprt_rating_highest == o.exprt_rating_highest && + exprt_rating_highest_recorded_timestamp == o.exprt_rating_highest_recorded_timestamp && + first_seen_timestamp == o.first_seen_timestamp && + references == o.references && + remediation_count == o.remediation_count && + remediation_sources == o.remediation_sources && + remediations == o.remediations && + runtime == o.runtime && + scanner_version == o.scanner_version && + severity == o.severity && + top_exprt_rating_factors == o.top_exprt_rating_factors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cvss_attack_complexity, cvss_attack_vector, cvss_availability_impact, cvss_base_score, cvss_confidentiality_impact, cvss_exploitability_score, cvss_impact_score, cvss_integrity_impact, cvss_privileges_required, cvss_scope, cvss_source, cvss_user_interaction, cvss_vector, description, exploit_date_recorded_timestamp, exploit_sources, exploit_status, exploit_updated_timestamp, exprt_rating, exprt_rating_date_recorded_timestamp, exprt_rating_highest, exprt_rating_highest_recorded_timestamp, first_seen_timestamp, references, remediation_count, remediation_sources, remediations, runtime, scanner_version, severity, top_exprt_rating_factors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_run.rb b/lib/crimson-falcon/models/models_run.rb new file mode 100644 index 00000000..9ed00125 --- /dev/null +++ b/lib/crimson-falcon/models/models_run.rb @@ -0,0 +1,255 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsRun + attr_accessor :results + + attr_accessor :tool + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'results' => :'results', + :'tool' => :'tool' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'results' => :'Array', + :'tool' => :'ModelsRunTool' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsRun` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsRun`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'results') + if (value = attributes[:'results']).is_a?(Array) + self.results = value + end + end + + if attributes.key?(:'tool') + self.tool = attributes[:'tool'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @results.nil? + invalid_properties.push('invalid value for "results", results cannot be nil.') + end + + if @tool.nil? + invalid_properties.push('invalid value for "tool", tool cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @results.nil? + return false if @tool.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + results == o.results && + tool == o.tool + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [results, tool].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_run_tool.rb b/lib/crimson-falcon/models/models_run_tool.rb new file mode 100644 index 00000000..e3f9d5e7 --- /dev/null +++ b/lib/crimson-falcon/models/models_run_tool.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsRunTool + attr_accessor :driver + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'driver' => :'driver' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'driver' => :'ModelsRunToolDriver' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsRunTool` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsRunTool`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'driver') + self.driver = attributes[:'driver'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @driver.nil? + invalid_properties.push('invalid value for "driver", driver cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @driver.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + driver == o.driver + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [driver].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_run_tool_driver.rb b/lib/crimson-falcon/models/models_run_tool_driver.rb new file mode 100644 index 00000000..713da5db --- /dev/null +++ b/lib/crimson-falcon/models/models_run_tool_driver.rb @@ -0,0 +1,283 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsRunToolDriver + attr_accessor :information_uri + + attr_accessor :name + + attr_accessor :rules + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'information_uri' => :'informationUri', + :'name' => :'name', + :'rules' => :'rules', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'information_uri' => :'String', + :'name' => :'String', + :'rules' => :'Array', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsRunToolDriver` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsRunToolDriver`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'information_uri') + self.information_uri = attributes[:'information_uri'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @information_uri.nil? + invalid_properties.push('invalid value for "information_uri", information_uri cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @rules.nil? + invalid_properties.push('invalid value for "rules", rules cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @information_uri.nil? + return false if @name.nil? + return false if @rules.nil? + return false if @version.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + information_uri == o.information_uri && + name == o.name && + rules == o.rules && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [information_uri, name, rules, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/models_vulnerability_sarif.rb b/lib/crimson-falcon/models/models_vulnerability_sarif.rb new file mode 100644 index 00000000..c1e2a3fa --- /dev/null +++ b/lib/crimson-falcon/models/models_vulnerability_sarif.rb @@ -0,0 +1,269 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ModelsVulnerabilitySARIF + attr_accessor :schema + + attr_accessor :runs + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'schema' => :'$schema', + :'runs' => :'runs', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'schema' => :'String', + :'runs' => :'Array', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsVulnerabilitySARIF` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsVulnerabilitySARIF`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'schema') + self.schema = attributes[:'schema'] + end + + if attributes.key?(:'runs') + if (value = attributes[:'runs']).is_a?(Array) + self.runs = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @schema.nil? + invalid_properties.push('invalid value for "schema", schema cannot be nil.') + end + + if @runs.nil? + invalid_properties.push('invalid value for "runs", runs cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @schema.nil? + return false if @runs.nil? + return false if @version.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + schema == o.schema && + runs == o.runs && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [schema, runs, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/packages_api_combined_package_v2.rb b/lib/crimson-falcon/models/packages_api_combined_package_v2.rb new file mode 100644 index 00000000..f18ec272 --- /dev/null +++ b/lib/crimson-falcon/models/packages_api_combined_package_v2.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class PackagesApiCombinedPackageV2 + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::PackagesApiCombinedPackageV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::PackagesApiCombinedPackageV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/policyframework_benchmark.rb b/lib/crimson-falcon/models/policyframework_benchmark.rb new file mode 100644 index 00000000..090e2ff5 --- /dev/null +++ b/lib/crimson-falcon/models/policyframework_benchmark.rb @@ -0,0 +1,253 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class PolicyframeworkBenchmark + attr_accessor :name + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::PolicyframeworkBenchmark` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::PolicyframeworkBenchmark`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @version.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/policyframework_control.rb b/lib/crimson-falcon/models/policyframework_control.rb new file mode 100644 index 00000000..90f486fb --- /dev/null +++ b/lib/crimson-falcon/models/policyframework_control.rb @@ -0,0 +1,290 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class PolicyframeworkControl + attr_accessor :benchmarks + + attr_accessor :description + + attr_accessor :framework + + attr_accessor :name + + attr_accessor :type + + attr_accessor :uuid + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'benchmarks' => :'benchmarks', + :'description' => :'description', + :'framework' => :'framework', + :'name' => :'name', + :'type' => :'type', + :'uuid' => :'uuid', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'benchmarks' => :'Array', + :'description' => :'String', + :'framework' => :'String', + :'name' => :'String', + :'type' => :'String', + :'uuid' => :'String', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::PolicyframeworkControl` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::PolicyframeworkControl`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'benchmarks') + if (value = attributes[:'benchmarks']).is_a?(Array) + self.benchmarks = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'framework') + self.framework = attributes[:'framework'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + benchmarks == o.benchmarks && + description == o.description && + framework == o.framework && + name == o.name && + type == o.type && + uuid == o.uuid && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [benchmarks, description, framework, name, type, uuid, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/quickscanpro_query_scan_results_response.rb b/lib/crimson-falcon/models/quickscanpro_query_scan_results_response.rb index b0547dd9..b3b0db90 100644 --- a/lib/crimson-falcon/models/quickscanpro_query_scan_results_response.rb +++ b/lib/crimson-falcon/models/quickscanpro_query_scan_results_response.rb @@ -36,6 +36,8 @@ class QuickscanproQueryScanResultsResponse attr_accessor :meta + attr_accessor :quota + # scan IDs attr_accessor :resources @@ -44,6 +46,7 @@ def self.attribute_map { :'errors' => :'errors', :'meta' => :'meta', + :'quota' => :'quota', :'resources' => :'resources' } end @@ -58,6 +61,7 @@ def self.openapi_types { :'errors' => :'Array', :'meta' => :'MsaMetaInfo', + :'quota' => :'QuickscanproQuotaResource', :'resources' => :'Array' } end @@ -93,6 +97,10 @@ def initialize(attributes = {}) self.meta = attributes[:'meta'] end + if attributes.key?(:'quota') + self.quota = attributes[:'quota'] + end + if attributes.key?(:'resources') if (value = attributes[:'resources']).is_a?(Array) self.resources = value @@ -130,6 +138,7 @@ def ==(o) self.class == o.class && errors == o.errors && meta == o.meta && + quota == o.quota && resources == o.resources end @@ -142,7 +151,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [errors, meta, resources].hash + [errors, meta, quota, resources].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/registration_aws_account_ext_v2.rb b/lib/crimson-falcon/models/registration_aws_account_ext_v2.rb index 209f4307..1e8779ed 100644 --- a/lib/crimson-falcon/models/registration_aws_account_ext_v2.rb +++ b/lib/crimson-falcon/models/registration_aws_account_ext_v2.rb @@ -40,6 +40,8 @@ class RegistrationAWSAccountExtV2 attr_accessor :cloudtrail_region + attr_accessor :deployment_method + attr_accessor :dspm_enabled attr_accessor :dspm_role @@ -50,6 +52,8 @@ class RegistrationAWSAccountExtV2 attr_accessor :organization_id + attr_accessor :root_stack_id + attr_accessor :sensor_management_enabled attr_accessor :target_ous @@ -63,11 +67,13 @@ def self.attribute_map :'account_type' => :'account_type', :'behavior_assessment_enabled' => :'behavior_assessment_enabled', :'cloudtrail_region' => :'cloudtrail_region', + :'deployment_method' => :'deployment_method', :'dspm_enabled' => :'dspm_enabled', :'dspm_role' => :'dspm_role', :'iam_role_arn' => :'iam_role_arn', :'is_master' => :'is_master', :'organization_id' => :'organization_id', + :'root_stack_id' => :'root_stack_id', :'sensor_management_enabled' => :'sensor_management_enabled', :'target_ous' => :'target_ous', :'use_existing_cloudtrail' => :'use_existing_cloudtrail' @@ -86,11 +92,13 @@ def self.openapi_types :'account_type' => :'String', :'behavior_assessment_enabled' => :'Boolean', :'cloudtrail_region' => :'String', + :'deployment_method' => :'String', :'dspm_enabled' => :'Boolean', :'dspm_role' => :'String', :'iam_role_arn' => :'String', :'is_master' => :'Boolean', :'organization_id' => :'String', + :'root_stack_id' => :'String', :'sensor_management_enabled' => :'Boolean', :'target_ous' => :'Array', :'use_existing_cloudtrail' => :'Boolean' @@ -134,6 +142,10 @@ def initialize(attributes = {}) self.cloudtrail_region = attributes[:'cloudtrail_region'] end + if attributes.key?(:'deployment_method') + self.deployment_method = attributes[:'deployment_method'] + end + if attributes.key?(:'dspm_enabled') self.dspm_enabled = attributes[:'dspm_enabled'] end @@ -154,6 +166,10 @@ def initialize(attributes = {}) self.organization_id = attributes[:'organization_id'] end + if attributes.key?(:'root_stack_id') + self.root_stack_id = attributes[:'root_stack_id'] + end + if attributes.key?(:'sensor_management_enabled') self.sensor_management_enabled = attributes[:'sensor_management_enabled'] end @@ -211,11 +227,13 @@ def ==(o) account_type == o.account_type && behavior_assessment_enabled == o.behavior_assessment_enabled && cloudtrail_region == o.cloudtrail_region && + deployment_method == o.deployment_method && dspm_enabled == o.dspm_enabled && dspm_role == o.dspm_role && iam_role_arn == o.iam_role_arn && is_master == o.is_master && organization_id == o.organization_id && + root_stack_id == o.root_stack_id && sensor_management_enabled == o.sensor_management_enabled && target_ous == o.target_ous && use_existing_cloudtrail == o.use_existing_cloudtrail @@ -230,7 +248,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_id, account_type, behavior_assessment_enabled, cloudtrail_region, dspm_enabled, dspm_role, iam_role_arn, is_master, organization_id, sensor_management_enabled, target_ous, use_existing_cloudtrail].hash + [account_id, account_type, behavior_assessment_enabled, cloudtrail_region, deployment_method, dspm_enabled, dspm_role, iam_role_arn, is_master, organization_id, root_stack_id, sensor_management_enabled, target_ous, use_existing_cloudtrail].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/registration_aws_account_patch.rb b/lib/crimson-falcon/models/registration_aws_account_patch.rb index 2c61f71c..39eb785c 100644 --- a/lib/crimson-falcon/models/registration_aws_account_patch.rb +++ b/lib/crimson-falcon/models/registration_aws_account_patch.rb @@ -38,6 +38,8 @@ class RegistrationAWSAccountPatch attr_accessor :cloudtrail_region + attr_accessor :deployment_method + attr_accessor :dspm_enabled attr_accessor :dspm_role @@ -50,6 +52,8 @@ class RegistrationAWSAccountPatch attr_accessor :remediation_tou_accepted + attr_accessor :root_stack_id + attr_accessor :sensor_management_enabled attr_accessor :target_ous @@ -60,12 +64,14 @@ def self.attribute_map :'account_id' => :'account_id', :'behavior_assessment_enabled' => :'behavior_assessment_enabled', :'cloudtrail_region' => :'cloudtrail_region', + :'deployment_method' => :'deployment_method', :'dspm_enabled' => :'dspm_enabled', :'dspm_role' => :'dspm_role', :'environment' => :'environment', :'iam_role_arn' => :'iam_role_arn', :'remediation_region' => :'remediation_region', :'remediation_tou_accepted' => :'remediation_tou_accepted', + :'root_stack_id' => :'root_stack_id', :'sensor_management_enabled' => :'sensor_management_enabled', :'target_ous' => :'target_ous' } @@ -82,12 +88,14 @@ def self.openapi_types :'account_id' => :'String', :'behavior_assessment_enabled' => :'Boolean', :'cloudtrail_region' => :'String', + :'deployment_method' => :'String', :'dspm_enabled' => :'Boolean', :'dspm_role' => :'String', :'environment' => :'String', :'iam_role_arn' => :'String', :'remediation_region' => :'String', :'remediation_tou_accepted' => :'Time', + :'root_stack_id' => :'String', :'sensor_management_enabled' => :'Boolean', :'target_ous' => :'Array' } @@ -126,6 +134,10 @@ def initialize(attributes = {}) self.cloudtrail_region = attributes[:'cloudtrail_region'] end + if attributes.key?(:'deployment_method') + self.deployment_method = attributes[:'deployment_method'] + end + if attributes.key?(:'dspm_enabled') self.dspm_enabled = attributes[:'dspm_enabled'] end @@ -150,6 +162,10 @@ def initialize(attributes = {}) self.remediation_tou_accepted = attributes[:'remediation_tou_accepted'] end + if attributes.key?(:'root_stack_id') + self.root_stack_id = attributes[:'root_stack_id'] + end + if attributes.key?(:'sensor_management_enabled') self.sensor_management_enabled = attributes[:'sensor_management_enabled'] end @@ -192,12 +208,14 @@ def ==(o) account_id == o.account_id && behavior_assessment_enabled == o.behavior_assessment_enabled && cloudtrail_region == o.cloudtrail_region && + deployment_method == o.deployment_method && dspm_enabled == o.dspm_enabled && dspm_role == o.dspm_role && environment == o.environment && iam_role_arn == o.iam_role_arn && remediation_region == o.remediation_region && remediation_tou_accepted == o.remediation_tou_accepted && + root_stack_id == o.root_stack_id && sensor_management_enabled == o.sensor_management_enabled && target_ous == o.target_ous end @@ -211,7 +229,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_id, behavior_assessment_enabled, cloudtrail_region, dspm_enabled, dspm_role, environment, iam_role_arn, remediation_region, remediation_tou_accepted, sensor_management_enabled, target_ous].hash + [account_id, behavior_assessment_enabled, cloudtrail_region, deployment_method, dspm_enabled, dspm_role, environment, iam_role_arn, remediation_region, remediation_tou_accepted, root_stack_id, sensor_management_enabled, target_ous].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/registration_aws_account_response_v2.rb b/lib/crimson-falcon/models/registration_aws_account_response_v2.rb index 70cfd363..b6edc387 100644 --- a/lib/crimson-falcon/models/registration_aws_account_response_v2.rb +++ b/lib/crimson-falcon/models/registration_aws_account_response_v2.rb @@ -103,10 +103,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @errors.nil? - invalid_properties.push('invalid value for "errors", errors cannot be nil.') - end - if @meta.nil? invalid_properties.push('invalid value for "meta", meta cannot be nil.') end @@ -121,7 +117,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @errors.nil? return false if @meta.nil? return false if @resources.nil? true diff --git a/lib/crimson-falcon/models/registration_azure_download_certificate_response_v1.rb b/lib/crimson-falcon/models/registration_azure_download_certificate_response_v1.rb index ec2015f8..ff14341a 100644 --- a/lib/crimson-falcon/models/registration_azure_download_certificate_response_v1.rb +++ b/lib/crimson-falcon/models/registration_azure_download_certificate_response_v1.rb @@ -103,10 +103,6 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @errors.nil? - invalid_properties.push('invalid value for "errors", errors cannot be nil.') - end - if @meta.nil? invalid_properties.push('invalid value for "meta", meta cannot be nil.') end @@ -121,7 +117,6 @@ def list_invalid_properties # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? - return false if @errors.nil? return false if @meta.nil? return false if @resources.nil? true diff --git a/lib/crimson-falcon/models/registration_iom_event_v2.rb b/lib/crimson-falcon/models/registration_iom_event_v2.rb index 82050c01..b87210cf 100644 --- a/lib/crimson-falcon/models/registration_iom_event_v2.rb +++ b/lib/crimson-falcon/models/registration_iom_event_v2.rb @@ -54,6 +54,8 @@ class RegistrationIOMEventV2 attr_accessor :findings + attr_accessor :groups + attr_accessor :id attr_accessor :is_managed @@ -108,6 +110,7 @@ def self.attribute_map :'custom_policy_id' => :'custom_policy_id', :'finding' => :'finding', :'findings' => :'findings', + :'groups' => :'groups', :'id' => :'id', :'is_managed' => :'is_managed', :'policy_id' => :'policy_id', @@ -150,6 +153,7 @@ def self.openapi_types :'custom_policy_id' => :'Integer', :'finding' => :'Object', :'findings' => :'Array', + :'groups' => :'Array', :'id' => :'String', :'is_managed' => :'Boolean', :'policy_id' => :'Integer', @@ -244,6 +248,12 @@ def initialize(attributes = {}) end end + if attributes.key?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = value + end + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -461,6 +471,7 @@ def ==(o) custom_policy_id == o.custom_policy_id && finding == o.finding && findings == o.findings && + groups == o.groups && id == o.id && is_managed == o.is_managed && policy_id == o.policy_id && @@ -492,7 +503,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_id, account_name, agent_id, azure_tenant_id, cid, cloud_labels, cloud_provider, cloud_scopes, custom_policy_id, finding, findings, id, is_managed, policy_id, policy_statement, policy_type, region, report_date_time, resource_attributes, resource_create_time, resource_id, resource_id_type, resource_url, resource_uuid, scan_id, scan_time, service, severity, status, tags, vm_id].hash + [account_id, account_name, agent_id, azure_tenant_id, cid, cloud_labels, cloud_provider, cloud_scopes, custom_policy_id, finding, findings, groups, id, is_managed, policy_id, policy_statement, policy_type, region, report_date_time, resource_attributes, resource_create_time, resource_id, resource_id_type, resource_url, resource_uuid, scan_id, scan_time, service, severity, status, tags, vm_id].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/releasecontents_release_content.rb b/lib/crimson-falcon/models/releasecontents_release_content.rb new file mode 100644 index 00000000..4c650ac5 --- /dev/null +++ b/lib/crimson-falcon/models/releasecontents_release_content.rb @@ -0,0 +1,327 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasecontentsReleaseContent + attr_accessor :content_category + + attr_accessor :content_group_id + + attr_accessor :content_type + + attr_accessor :content_version + + attr_accessor :description + + attr_accessor :id + + attr_accessor :jira_ticket + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'content_category' => :'content_category', + :'content_group_id' => :'content_group_id', + :'content_type' => :'content_type', + :'content_version' => :'content_version', + :'description' => :'description', + :'id' => :'id', + :'jira_ticket' => :'jira_ticket', + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'content_category' => :'String', + :'content_group_id' => :'String', + :'content_type' => :'String', + :'content_version' => :'ReleasecontentsReleaseContentVersion', + :'description' => :'String', + :'id' => :'String', + :'jira_ticket' => :'String', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasecontentsReleaseContent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasecontentsReleaseContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'content_category') + self.content_category = attributes[:'content_category'] + end + + if attributes.key?(:'content_group_id') + self.content_group_id = attributes[:'content_group_id'] + end + + if attributes.key?(:'content_type') + self.content_type = attributes[:'content_type'] + end + + if attributes.key?(:'content_version') + self.content_version = attributes[:'content_version'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'jira_ticket') + self.jira_ticket = attributes[:'jira_ticket'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @content_category.nil? + invalid_properties.push('invalid value for "content_category", content_category cannot be nil.') + end + + if @content_group_id.nil? + invalid_properties.push('invalid value for "content_group_id", content_group_id cannot be nil.') + end + + if @content_type.nil? + invalid_properties.push('invalid value for "content_type", content_type cannot be nil.') + end + + if @content_version.nil? + invalid_properties.push('invalid value for "content_version", content_version cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @content_category.nil? + return false if @content_group_id.nil? + return false if @content_type.nil? + return false if @content_version.nil? + return false if @id.nil? + return false if @status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + content_category == o.content_category && + content_group_id == o.content_group_id && + content_type == o.content_type && + content_version == o.content_version && + description == o.description && + id == o.id && + jira_ticket == o.jira_ticket && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [content_category, content_group_id, content_type, content_version, description, id, jira_ticket, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releasecontents_release_content_version.rb b/lib/crimson-falcon/models/releasecontents_release_content_version.rb new file mode 100644 index 00000000..83236d21 --- /dev/null +++ b/lib/crimson-falcon/models/releasecontents_release_content_version.rb @@ -0,0 +1,267 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasecontentsReleaseContentVersion + attr_accessor :source_id + + attr_accessor :source_type + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'source_id' => :'source_id', + :'source_type' => :'source_type', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'source_id' => :'String', + :'source_type' => :'String', + :'version' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasecontentsReleaseContentVersion` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasecontentsReleaseContentVersion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'source_id') + self.source_id = attributes[:'source_id'] + end + + if attributes.key?(:'source_type') + self.source_type = attributes[:'source_type'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @source_id.nil? + invalid_properties.push('invalid value for "source_id", source_id cannot be nil.') + end + + if @source_type.nil? + invalid_properties.push('invalid value for "source_type", source_type cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @source_id.nil? + return false if @source_type.nil? + return false if @version.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + source_id == o.source_id && + source_type == o.source_type && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [source_id, source_type, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releasenotes_entities_get_request.rb b/lib/crimson-falcon/models/releasenotes_entities_get_request.rb new file mode 100644 index 00000000..cb61cc50 --- /dev/null +++ b/lib/crimson-falcon/models/releasenotes_entities_get_request.rb @@ -0,0 +1,241 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasenotesEntitiesGetRequest + attr_accessor :ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ids' => :'IDs' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'ids' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasenotesEntitiesGetRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasenotesEntitiesGetRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ids') + if (value = attributes[:'ids']).is_a?(Array) + self.ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @ids.nil? + invalid_properties.push('invalid value for "ids", ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ids == o.ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releasenotes_entities_get_response_wrapper.rb b/lib/crimson-falcon/models/releasenotes_entities_get_response_wrapper.rb new file mode 100644 index 00000000..2c3edc98 --- /dev/null +++ b/lib/crimson-falcon/models/releasenotes_entities_get_response_wrapper.rb @@ -0,0 +1,269 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasenotesEntitiesGetResponseWrapper + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'ReleasenotesReleaseNoteWrapperV1' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasenotesEntitiesGetResponseWrapper` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasenotesEntitiesGetResponseWrapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + self.resources = attributes[:'resources'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releasenotes_note_detail.rb b/lib/crimson-falcon/models/releasenotes_note_detail.rb new file mode 100644 index 00000000..808f58dc --- /dev/null +++ b/lib/crimson-falcon/models/releasenotes_note_detail.rb @@ -0,0 +1,270 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasenotesNoteDetail + attr_accessor :category + + attr_accessor :cloud + + attr_accessor :note_content + + attr_accessor :platforms + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'category' => :'category', + :'cloud' => :'cloud', + :'note_content' => :'note_content', + :'platforms' => :'platforms' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'category' => :'String', + :'cloud' => :'Array', + :'note_content' => :'String', + :'platforms' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasenotesNoteDetail` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasenotesNoteDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'cloud') + if (value = attributes[:'cloud']).is_a?(Array) + self.cloud = value + end + end + + if attributes.key?(:'note_content') + self.note_content = attributes[:'note_content'] + end + + if attributes.key?(:'platforms') + if (value = attributes[:'platforms']).is_a?(Array) + self.platforms = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @note_content.nil? + invalid_properties.push('invalid value for "note_content", note_content cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @note_content.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + category == o.category && + cloud == o.cloud && + note_content == o.note_content && + platforms == o.platforms + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [category, cloud, note_content, platforms].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releasenotes_release_note_v1.rb b/lib/crimson-falcon/models/releasenotes_release_note_v1.rb new file mode 100644 index 00000000..68c886af --- /dev/null +++ b/lib/crimson-falcon/models/releasenotes_release_note_v1.rb @@ -0,0 +1,303 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasenotesReleaseNoteV1 + attr_accessor :categories + + attr_accessor :early_access + + attr_accessor :general_availability + + attr_accessor :notes + + attr_accessor :timestamp + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'categories' => :'categories', + :'early_access' => :'early_access', + :'general_availability' => :'general_availability', + :'notes' => :'notes', + :'timestamp' => :'timestamp', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'categories' => :'Array', + :'early_access' => :'String', + :'general_availability' => :'String', + :'notes' => :'Array', + :'timestamp' => :'Time', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasenotesReleaseNoteV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasenotesReleaseNoteV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'categories') + if (value = attributes[:'categories']).is_a?(Array) + self.categories = value + end + end + + if attributes.key?(:'early_access') + self.early_access = attributes[:'early_access'] + end + + if attributes.key?(:'general_availability') + self.general_availability = attributes[:'general_availability'] + end + + if attributes.key?(:'notes') + if (value = attributes[:'notes']).is_a?(Array) + self.notes = value + end + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @categories.nil? + invalid_properties.push('invalid value for "categories", categories cannot be nil.') + end + + if @notes.nil? + invalid_properties.push('invalid value for "notes", notes cannot be nil.') + end + + if @timestamp.nil? + invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @categories.nil? + return false if @notes.nil? + return false if @timestamp.nil? + return false if @version.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + categories == o.categories && + early_access == o.early_access && + general_availability == o.general_availability && + notes == o.notes && + timestamp == o.timestamp && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [categories, early_access, general_availability, notes, timestamp, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releasenotes_release_note_wrapper_v1.rb b/lib/crimson-falcon/models/releasenotes_release_note_wrapper_v1.rb new file mode 100644 index 00000000..edba6d2c --- /dev/null +++ b/lib/crimson-falcon/models/releasenotes_release_note_wrapper_v1.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasenotesReleaseNoteWrapperV1 + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasenotesReleaseNoteWrapperV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasenotesReleaseNoteWrapperV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releases_release.rb b/lib/crimson-falcon/models/releases_release.rb new file mode 100644 index 00000000..fcb141dd --- /dev/null +++ b/lib/crimson-falcon/models/releases_release.rb @@ -0,0 +1,328 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasesRelease + attr_accessor :created_by + + attr_accessor :created_timestamp + + attr_accessor :deployed_timestamp + + attr_accessor :deployment_start_timestamp + + attr_accessor :id + + attr_accessor :last_modified_by + + attr_accessor :last_modified_timestamp + + attr_accessor :release_contents + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_by' => :'created_by', + :'created_timestamp' => :'created_timestamp', + :'deployed_timestamp' => :'deployed_timestamp', + :'deployment_start_timestamp' => :'deployment_start_timestamp', + :'id' => :'id', + :'last_modified_by' => :'last_modified_by', + :'last_modified_timestamp' => :'last_modified_timestamp', + :'release_contents' => :'release_contents', + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'created_by' => :'String', + :'created_timestamp' => :'Time', + :'deployed_timestamp' => :'Time', + :'deployment_start_timestamp' => :'Time', + :'id' => :'String', + :'last_modified_by' => :'String', + :'last_modified_timestamp' => :'Time', + :'release_contents' => :'Array', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasesRelease` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasesRelease`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'created_by') + self.created_by = attributes[:'created_by'] + end + + if attributes.key?(:'created_timestamp') + self.created_timestamp = attributes[:'created_timestamp'] + end + + if attributes.key?(:'deployed_timestamp') + self.deployed_timestamp = attributes[:'deployed_timestamp'] + end + + if attributes.key?(:'deployment_start_timestamp') + self.deployment_start_timestamp = attributes[:'deployment_start_timestamp'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'last_modified_by') + self.last_modified_by = attributes[:'last_modified_by'] + end + + if attributes.key?(:'last_modified_timestamp') + self.last_modified_timestamp = attributes[:'last_modified_timestamp'] + end + + if attributes.key?(:'release_contents') + if (value = attributes[:'release_contents']).is_a?(Array) + self.release_contents = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @created_timestamp.nil? + invalid_properties.push('invalid value for "created_timestamp", created_timestamp cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @release_contents.nil? + invalid_properties.push('invalid value for "release_contents", release_contents cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @created_timestamp.nil? + return false if @id.nil? + return false if @release_contents.nil? + return false if @status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_by == o.created_by && + created_timestamp == o.created_timestamp && + deployed_timestamp == o.deployed_timestamp && + deployment_start_timestamp == o.deployment_start_timestamp && + id == o.id && + last_modified_by == o.last_modified_by && + last_modified_timestamp == o.last_modified_timestamp && + release_contents == o.release_contents && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [created_by, created_timestamp, deployed_timestamp, deployment_start_timestamp, id, last_modified_by, last_modified_timestamp, release_contents, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/releases_release_wrapper.rb b/lib/crimson-falcon/models/releases_release_wrapper.rb new file mode 100644 index 00000000..563b5722 --- /dev/null +++ b/lib/crimson-falcon/models/releases_release_wrapper.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ReleasesReleaseWrapper + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ReleasesReleaseWrapper` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ReleasesReleaseWrapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_app.rb b/lib/crimson-falcon/models/resources_app.rb new file mode 100644 index 00000000..e24a2ddc --- /dev/null +++ b/lib/crimson-falcon/models/resources_app.rb @@ -0,0 +1,243 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesApp + attr_accessor :name + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesApp` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesApp`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_asset_graph.rb b/lib/crimson-falcon/models/resources_asset_graph.rb new file mode 100644 index 00000000..77961d95 --- /dev/null +++ b/lib/crimson-falcon/models/resources_asset_graph.rb @@ -0,0 +1,243 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesAssetGraph + attr_accessor :id + + attr_accessor :res_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'res_id' => :'res_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'res_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesAssetGraph` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesAssetGraph`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'res_id') + self.res_id = attributes[:'res_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + res_id == o.res_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, res_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_cloud_context.rb b/lib/crimson-falcon/models/resources_cloud_context.rb new file mode 100644 index 00000000..5d4c1b33 --- /dev/null +++ b/lib/crimson-falcon/models/resources_cloud_context.rb @@ -0,0 +1,378 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesCloudContext + attr_accessor :account_name + + attr_accessor :allows_public_access + + attr_accessor :asset_graph + + attr_accessor :cspm_license + + attr_accessor :data_classifications + + attr_accessor :detections + + attr_accessor :has_falcon_sensor + + attr_accessor :has_tags + + attr_accessor :host + + attr_accessor :instance_id + + attr_accessor :instance_state + + attr_accessor :legacy_resource_id + + attr_accessor :legacy_type_id + + attr_accessor :legacy_uuid + + attr_accessor :managed_by + + attr_accessor :publicly_exposed + + attr_accessor :scan_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_name' => :'account_name', + :'allows_public_access' => :'allows_public_access', + :'asset_graph' => :'asset_graph', + :'cspm_license' => :'cspm_license', + :'data_classifications' => :'data_classifications', + :'detections' => :'detections', + :'has_falcon_sensor' => :'has_falcon_sensor', + :'has_tags' => :'has_tags', + :'host' => :'host', + :'instance_id' => :'instance_id', + :'instance_state' => :'instance_state', + :'legacy_resource_id' => :'legacy_resource_id', + :'legacy_type_id' => :'legacy_type_id', + :'legacy_uuid' => :'legacy_uuid', + :'managed_by' => :'managed_by', + :'publicly_exposed' => :'publicly_exposed', + :'scan_type' => :'scan_type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_name' => :'String', + :'allows_public_access' => :'Boolean', + :'asset_graph' => :'ResourcesAssetGraph', + :'cspm_license' => :'String', + :'data_classifications' => :'DataclassificationsResponse', + :'detections' => :'ResourcesDetections', + :'has_falcon_sensor' => :'Boolean', + :'has_tags' => :'Boolean', + :'host' => :'ResourcesHost', + :'instance_id' => :'String', + :'instance_state' => :'String', + :'legacy_resource_id' => :'String', + :'legacy_type_id' => :'Integer', + :'legacy_uuid' => :'String', + :'managed_by' => :'String', + :'publicly_exposed' => :'Boolean', + :'scan_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesCloudContext` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesCloudContext`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_name') + self.account_name = attributes[:'account_name'] + end + + if attributes.key?(:'allows_public_access') + self.allows_public_access = attributes[:'allows_public_access'] + end + + if attributes.key?(:'asset_graph') + self.asset_graph = attributes[:'asset_graph'] + end + + if attributes.key?(:'cspm_license') + self.cspm_license = attributes[:'cspm_license'] + end + + if attributes.key?(:'data_classifications') + self.data_classifications = attributes[:'data_classifications'] + end + + if attributes.key?(:'detections') + self.detections = attributes[:'detections'] + end + + if attributes.key?(:'has_falcon_sensor') + self.has_falcon_sensor = attributes[:'has_falcon_sensor'] + end + + if attributes.key?(:'has_tags') + self.has_tags = attributes[:'has_tags'] + end + + if attributes.key?(:'host') + self.host = attributes[:'host'] + end + + if attributes.key?(:'instance_id') + self.instance_id = attributes[:'instance_id'] + end + + if attributes.key?(:'instance_state') + self.instance_state = attributes[:'instance_state'] + end + + if attributes.key?(:'legacy_resource_id') + self.legacy_resource_id = attributes[:'legacy_resource_id'] + end + + if attributes.key?(:'legacy_type_id') + self.legacy_type_id = attributes[:'legacy_type_id'] + end + + if attributes.key?(:'legacy_uuid') + self.legacy_uuid = attributes[:'legacy_uuid'] + end + + if attributes.key?(:'managed_by') + self.managed_by = attributes[:'managed_by'] + end + + if attributes.key?(:'publicly_exposed') + self.publicly_exposed = attributes[:'publicly_exposed'] + end + + if attributes.key?(:'scan_type') + self.scan_type = attributes[:'scan_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_name == o.account_name && + allows_public_access == o.allows_public_access && + asset_graph == o.asset_graph && + cspm_license == o.cspm_license && + data_classifications == o.data_classifications && + detections == o.detections && + has_falcon_sensor == o.has_falcon_sensor && + has_tags == o.has_tags && + host == o.host && + instance_id == o.instance_id && + instance_state == o.instance_state && + legacy_resource_id == o.legacy_resource_id && + legacy_type_id == o.legacy_type_id && + legacy_uuid == o.legacy_uuid && + managed_by == o.managed_by && + publicly_exposed == o.publicly_exposed && + scan_type == o.scan_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_name, allows_public_access, asset_graph, cspm_license, data_classifications, detections, has_falcon_sensor, has_tags, host, instance_id, instance_state, legacy_resource_id, legacy_type_id, legacy_uuid, managed_by, publicly_exposed, scan_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_cloud_resource.rb b/lib/crimson-falcon/models/resources_cloud_resource.rb new file mode 100644 index 00000000..14335571 --- /dev/null +++ b/lib/crimson-falcon/models/resources_cloud_resource.rb @@ -0,0 +1,604 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesCloudResource + attr_accessor :account_id + + attr_accessor :account_name + + attr_accessor :active + + attr_accessor :arn + + attr_accessor :category + + attr_accessor :cid + + attr_accessor :cloud_context + + attr_accessor :cloud_groups + + attr_accessor :cloud_labels + + attr_accessor :cloud_provider + + attr_accessor :cluster_id + + attr_accessor :cluster_name + + attr_accessor :configuration + + attr_accessor :creation_time + + attr_accessor :first_seen + + attr_accessor :hash + + attr_accessor :id + + attr_accessor :location + + attr_accessor :organization_id + + attr_accessor :parent + + attr_accessor :project_id + + attr_accessor :project_number + + attr_accessor :region + + attr_accessor :relationships + + attr_accessor :resource_group + + attr_accessor :resource_id + + attr_accessor :resource_name + + attr_accessor :resource_number + + attr_accessor :resource_type + + attr_accessor :resource_type_name + + attr_accessor :resource_url + + attr_accessor :revision + + attr_accessor :service + + attr_accessor :status + + attr_accessor :subscription_id + + attr_accessor :supplementary_configuration + + attr_accessor :tags + + attr_accessor :tenant_id + + attr_accessor :updated_at + + attr_accessor :zone + + attr_accessor :zones + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_id' => :'account_id', + :'account_name' => :'account_name', + :'active' => :'active', + :'arn' => :'arn', + :'category' => :'category', + :'cid' => :'cid', + :'cloud_context' => :'cloud_context', + :'cloud_groups' => :'cloud_groups', + :'cloud_labels' => :'cloud_labels', + :'cloud_provider' => :'cloud_provider', + :'cluster_id' => :'cluster_id', + :'cluster_name' => :'cluster_name', + :'configuration' => :'configuration', + :'creation_time' => :'creation_time', + :'first_seen' => :'first_seen', + :'hash' => :'hash', + :'id' => :'id', + :'location' => :'location', + :'organization_id' => :'organization_id', + :'parent' => :'parent', + :'project_id' => :'project_id', + :'project_number' => :'project_number', + :'region' => :'region', + :'relationships' => :'relationships', + :'resource_group' => :'resource_group', + :'resource_id' => :'resource_id', + :'resource_name' => :'resource_name', + :'resource_number' => :'resource_number', + :'resource_type' => :'resource_type', + :'resource_type_name' => :'resource_type_name', + :'resource_url' => :'resource_url', + :'revision' => :'revision', + :'service' => :'service', + :'status' => :'status', + :'subscription_id' => :'subscription_id', + :'supplementary_configuration' => :'supplementary_configuration', + :'tags' => :'tags', + :'tenant_id' => :'tenant_id', + :'updated_at' => :'updated_at', + :'zone' => :'zone', + :'zones' => :'zones' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'account_id' => :'String', + :'account_name' => :'String', + :'active' => :'Boolean', + :'arn' => :'String', + :'category' => :'String', + :'cid' => :'String', + :'cloud_context' => :'ResourcesCloudContext', + :'cloud_groups' => :'Array', + :'cloud_labels' => :'Array', + :'cloud_provider' => :'String', + :'cluster_id' => :'String', + :'cluster_name' => :'String', + :'configuration' => :'Object', + :'creation_time' => :'Time', + :'first_seen' => :'Time', + :'hash' => :'String', + :'id' => :'String', + :'location' => :'String', + :'organization_id' => :'String', + :'parent' => :'String', + :'project_id' => :'String', + :'project_number' => :'String', + :'region' => :'String', + :'relationships' => :'Array', + :'resource_group' => :'String', + :'resource_id' => :'String', + :'resource_name' => :'String', + :'resource_number' => :'String', + :'resource_type' => :'String', + :'resource_type_name' => :'String', + :'resource_url' => :'String', + :'revision' => :'Integer', + :'service' => :'String', + :'status' => :'String', + :'subscription_id' => :'String', + :'supplementary_configuration' => :'Object', + :'tags' => :'Hash', + :'tenant_id' => :'String', + :'updated_at' => :'Time', + :'zone' => :'String', + :'zones' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesCloudResource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesCloudResource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'account_name') + self.account_name = attributes[:'account_name'] + end + + if attributes.key?(:'active') + self.active = attributes[:'active'] + end + + if attributes.key?(:'arn') + self.arn = attributes[:'arn'] + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cloud_context') + self.cloud_context = attributes[:'cloud_context'] + end + + if attributes.key?(:'cloud_groups') + if (value = attributes[:'cloud_groups']).is_a?(Array) + self.cloud_groups = value + end + end + + if attributes.key?(:'cloud_labels') + if (value = attributes[:'cloud_labels']).is_a?(Array) + self.cloud_labels = value + end + end + + if attributes.key?(:'cloud_provider') + self.cloud_provider = attributes[:'cloud_provider'] + end + + if attributes.key?(:'cluster_id') + self.cluster_id = attributes[:'cluster_id'] + end + + if attributes.key?(:'cluster_name') + self.cluster_name = attributes[:'cluster_name'] + end + + if attributes.key?(:'configuration') + self.configuration = attributes[:'configuration'] + end + + if attributes.key?(:'creation_time') + self.creation_time = attributes[:'creation_time'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'hash') + self.hash = attributes[:'hash'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parent') + self.parent = attributes[:'parent'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'project_number') + self.project_number = attributes[:'project_number'] + end + + if attributes.key?(:'region') + self.region = attributes[:'region'] + end + + if attributes.key?(:'relationships') + if (value = attributes[:'relationships']).is_a?(Array) + self.relationships = value + end + end + + if attributes.key?(:'resource_group') + self.resource_group = attributes[:'resource_group'] + end + + if attributes.key?(:'resource_id') + self.resource_id = attributes[:'resource_id'] + end + + if attributes.key?(:'resource_name') + self.resource_name = attributes[:'resource_name'] + end + + if attributes.key?(:'resource_number') + self.resource_number = attributes[:'resource_number'] + end + + if attributes.key?(:'resource_type') + self.resource_type = attributes[:'resource_type'] + end + + if attributes.key?(:'resource_type_name') + self.resource_type_name = attributes[:'resource_type_name'] + end + + if attributes.key?(:'resource_url') + self.resource_url = attributes[:'resource_url'] + end + + if attributes.key?(:'revision') + self.revision = attributes[:'revision'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'subscription_id') + self.subscription_id = attributes[:'subscription_id'] + end + + if attributes.key?(:'supplementary_configuration') + self.supplementary_configuration = attributes[:'supplementary_configuration'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Hash) + self.tags = value + end + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'zone') + self.zone = attributes[:'zone'] + end + + if attributes.key?(:'zones') + if (value = attributes[:'zones']).is_a?(Array) + self.zones = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + account_name == o.account_name && + active == o.active && + arn == o.arn && + category == o.category && + cid == o.cid && + cloud_context == o.cloud_context && + cloud_groups == o.cloud_groups && + cloud_labels == o.cloud_labels && + cloud_provider == o.cloud_provider && + cluster_id == o.cluster_id && + cluster_name == o.cluster_name && + configuration == o.configuration && + creation_time == o.creation_time && + first_seen == o.first_seen && + hash == o.hash && + id == o.id && + location == o.location && + organization_id == o.organization_id && + parent == o.parent && + project_id == o.project_id && + project_number == o.project_number && + region == o.region && + relationships == o.relationships && + resource_group == o.resource_group && + resource_id == o.resource_id && + resource_name == o.resource_name && + resource_number == o.resource_number && + resource_type == o.resource_type && + resource_type_name == o.resource_type_name && + resource_url == o.resource_url && + revision == o.revision && + service == o.service && + status == o.status && + subscription_id == o.subscription_id && + supplementary_configuration == o.supplementary_configuration && + tags == o.tags && + tenant_id == o.tenant_id && + updated_at == o.updated_at && + zone == o.zone && + zones == o.zones + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [account_id, account_name, active, arn, category, cid, cloud_context, cloud_groups, cloud_labels, cloud_provider, cluster_id, cluster_name, configuration, creation_time, first_seen, hash, id, location, organization_id, parent, project_id, project_number, region, relationships, resource_group, resource_id, resource_name, resource_number, resource_type, resource_type_name, resource_url, revision, service, status, subscription_id, supplementary_configuration, tags, tenant_id, updated_at, zone, zones].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_compliance.rb b/lib/crimson-falcon/models/resources_compliance.rb new file mode 100644 index 00000000..52965c96 --- /dev/null +++ b/lib/crimson-falcon/models/resources_compliance.rb @@ -0,0 +1,307 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesCompliance + attr_accessor :benchmark_names + + attr_accessor :benchmark_versions + + attr_accessor :controls + + attr_accessor :framework_versions + + attr_accessor :frameworks + + attr_accessor :legacy_policy_ids + + attr_accessor :rules + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'benchmark_names' => :'benchmarkNames', + :'benchmark_versions' => :'benchmarkVersions', + :'controls' => :'controls', + :'framework_versions' => :'frameworkVersions', + :'frameworks' => :'frameworks', + :'legacy_policy_ids' => :'legacy_policy_ids', + :'rules' => :'rules' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'benchmark_names' => :'Array', + :'benchmark_versions' => :'Array', + :'controls' => :'Array', + :'framework_versions' => :'Array', + :'frameworks' => :'Array', + :'legacy_policy_ids' => :'Array', + :'rules' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesCompliance` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesCompliance`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'benchmark_names') + if (value = attributes[:'benchmark_names']).is_a?(Array) + self.benchmark_names = value + end + end + + if attributes.key?(:'benchmark_versions') + if (value = attributes[:'benchmark_versions']).is_a?(Array) + self.benchmark_versions = value + end + end + + if attributes.key?(:'controls') + if (value = attributes[:'controls']).is_a?(Array) + self.controls = value + end + end + + if attributes.key?(:'framework_versions') + if (value = attributes[:'framework_versions']).is_a?(Array) + self.framework_versions = value + end + end + + if attributes.key?(:'frameworks') + if (value = attributes[:'frameworks']).is_a?(Array) + self.frameworks = value + end + end + + if attributes.key?(:'legacy_policy_ids') + if (value = attributes[:'legacy_policy_ids']).is_a?(Array) + self.legacy_policy_ids = value + end + end + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @benchmark_versions.nil? + invalid_properties.push('invalid value for "benchmark_versions", benchmark_versions cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @benchmark_versions.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + benchmark_names == o.benchmark_names && + benchmark_versions == o.benchmark_versions && + controls == o.controls && + framework_versions == o.framework_versions && + frameworks == o.frameworks && + legacy_policy_ids == o.legacy_policy_ids && + rules == o.rules + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [benchmark_names, benchmark_versions, controls, framework_versions, frameworks, legacy_policy_ids, rules].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_detections.rb b/lib/crimson-falcon/models/resources_detections.rb new file mode 100644 index 00000000..d45dc9ff --- /dev/null +++ b/lib/crimson-falcon/models/resources_detections.rb @@ -0,0 +1,291 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesDetections + attr_accessor :compliant + + attr_accessor :highest_severity + + attr_accessor :ioa_counts + + attr_accessor :iom_counts + + attr_accessor :non_compliant + + attr_accessor :severities + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'compliant' => :'compliant', + :'highest_severity' => :'highest_severity', + :'ioa_counts' => :'ioa_counts', + :'iom_counts' => :'iom_counts', + :'non_compliant' => :'non_compliant', + :'severities' => :'severities' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'compliant' => :'ResourcesCompliance', + :'highest_severity' => :'String', + :'ioa_counts' => :'Integer', + :'iom_counts' => :'Integer', + :'non_compliant' => :'ResourcesCompliance', + :'severities' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesDetections` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesDetections`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'compliant') + self.compliant = attributes[:'compliant'] + end + + if attributes.key?(:'highest_severity') + self.highest_severity = attributes[:'highest_severity'] + end + + if attributes.key?(:'ioa_counts') + self.ioa_counts = attributes[:'ioa_counts'] + end + + if attributes.key?(:'iom_counts') + self.iom_counts = attributes[:'iom_counts'] + end + + if attributes.key?(:'non_compliant') + self.non_compliant = attributes[:'non_compliant'] + end + + if attributes.key?(:'severities') + if (value = attributes[:'severities']).is_a?(Array) + self.severities = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @ioa_counts.nil? + invalid_properties.push('invalid value for "ioa_counts", ioa_counts cannot be nil.') + end + + if @iom_counts.nil? + invalid_properties.push('invalid value for "iom_counts", iom_counts cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @ioa_counts.nil? + return false if @iom_counts.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + compliant == o.compliant && + highest_severity == o.highest_severity && + ioa_counts == o.ioa_counts && + iom_counts == o.iom_counts && + non_compliant == o.non_compliant && + severities == o.severities + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [compliant, highest_severity, ioa_counts, iom_counts, non_compliant, severities].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_host.rb b/lib/crimson-falcon/models/resources_host.rb new file mode 100644 index 00000000..a4a99f33 --- /dev/null +++ b/lib/crimson-falcon/models/resources_host.rb @@ -0,0 +1,390 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesHost + attr_accessor :aid + + attr_accessor :apps + + attr_accessor :cve_ids + + attr_accessor :exprt_ratings + + attr_accessor :managed_by + + attr_accessor :os_build + + attr_accessor :os_version + + attr_accessor :platform_name + + attr_accessor :platform_os_name + + attr_accessor :platform_os_version + + attr_accessor :recommendations + + attr_accessor :sensor_priority + + attr_accessor :snapshot_detections + + attr_accessor :ssm_managed + + attr_accessor :state + + attr_accessor :vulnerabilities + + attr_accessor :vulnerabilities_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'aid' => :'aid', + :'apps' => :'apps', + :'cve_ids' => :'cve_ids', + :'exprt_ratings' => :'exprt_ratings', + :'managed_by' => :'managed_by', + :'os_build' => :'os_build', + :'os_version' => :'os_version', + :'platform_name' => :'platform_name', + :'platform_os_name' => :'platform_os_name', + :'platform_os_version' => :'platform_os_version', + :'recommendations' => :'recommendations', + :'sensor_priority' => :'sensor_priority', + :'snapshot_detections' => :'snapshot_detections', + :'ssm_managed' => :'ssm_managed', + :'state' => :'state', + :'vulnerabilities' => :'vulnerabilities', + :'vulnerabilities_count' => :'vulnerabilities_count' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'aid' => :'String', + :'apps' => :'Array', + :'cve_ids' => :'Array', + :'exprt_ratings' => :'Array', + :'managed_by' => :'String', + :'os_build' => :'String', + :'os_version' => :'String', + :'platform_name' => :'String', + :'platform_os_name' => :'String', + :'platform_os_version' => :'String', + :'recommendations' => :'Array', + :'sensor_priority' => :'String', + :'snapshot_detections' => :'Array', + :'ssm_managed' => :'Boolean', + :'state' => :'String', + :'vulnerabilities' => :'Array', + :'vulnerabilities_count' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesHost` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesHost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'aid') + self.aid = attributes[:'aid'] + end + + if attributes.key?(:'apps') + if (value = attributes[:'apps']).is_a?(Array) + self.apps = value + end + end + + if attributes.key?(:'cve_ids') + if (value = attributes[:'cve_ids']).is_a?(Array) + self.cve_ids = value + end + end + + if attributes.key?(:'exprt_ratings') + if (value = attributes[:'exprt_ratings']).is_a?(Array) + self.exprt_ratings = value + end + end + + if attributes.key?(:'managed_by') + self.managed_by = attributes[:'managed_by'] + end + + if attributes.key?(:'os_build') + self.os_build = attributes[:'os_build'] + end + + if attributes.key?(:'os_version') + self.os_version = attributes[:'os_version'] + end + + if attributes.key?(:'platform_name') + self.platform_name = attributes[:'platform_name'] + end + + if attributes.key?(:'platform_os_name') + self.platform_os_name = attributes[:'platform_os_name'] + end + + if attributes.key?(:'platform_os_version') + self.platform_os_version = attributes[:'platform_os_version'] + end + + if attributes.key?(:'recommendations') + if (value = attributes[:'recommendations']).is_a?(Array) + self.recommendations = value + end + end + + if attributes.key?(:'sensor_priority') + self.sensor_priority = attributes[:'sensor_priority'] + end + + if attributes.key?(:'snapshot_detections') + if (value = attributes[:'snapshot_detections']).is_a?(Array) + self.snapshot_detections = value + end + end + + if attributes.key?(:'ssm_managed') + self.ssm_managed = attributes[:'ssm_managed'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'vulnerabilities') + if (value = attributes[:'vulnerabilities']).is_a?(Array) + self.vulnerabilities = value + end + end + + if attributes.key?(:'vulnerabilities_count') + self.vulnerabilities_count = attributes[:'vulnerabilities_count'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + aid == o.aid && + apps == o.apps && + cve_ids == o.cve_ids && + exprt_ratings == o.exprt_ratings && + managed_by == o.managed_by && + os_build == o.os_build && + os_version == o.os_version && + platform_name == o.platform_name && + platform_os_name == o.platform_os_name && + platform_os_version == o.platform_os_version && + recommendations == o.recommendations && + sensor_priority == o.sensor_priority && + snapshot_detections == o.snapshot_detections && + ssm_managed == o.ssm_managed && + state == o.state && + vulnerabilities == o.vulnerabilities && + vulnerabilities_count == o.vulnerabilities_count + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [aid, apps, cve_ids, exprt_ratings, managed_by, os_build, os_version, platform_name, platform_os_name, platform_os_version, recommendations, sensor_priority, snapshot_detections, ssm_managed, state, vulnerabilities, vulnerabilities_count].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_relationship.rb b/lib/crimson-falcon/models/resources_relationship.rb new file mode 100644 index 00000000..efdb3606 --- /dev/null +++ b/lib/crimson-falcon/models/resources_relationship.rb @@ -0,0 +1,261 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesRelationship + attr_accessor :crn + + attr_accessor :relationship_name + + attr_accessor :resource_id + + attr_accessor :resource_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'crn' => :'crn', + :'relationship_name' => :'relationship_name', + :'resource_id' => :'resource_id', + :'resource_type' => :'resource_type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'crn' => :'String', + :'relationship_name' => :'String', + :'resource_id' => :'String', + :'resource_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesRelationship` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesRelationship`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'crn') + self.crn = attributes[:'crn'] + end + + if attributes.key?(:'relationship_name') + self.relationship_name = attributes[:'relationship_name'] + end + + if attributes.key?(:'resource_id') + self.resource_id = attributes[:'resource_id'] + end + + if attributes.key?(:'resource_type') + self.resource_type = attributes[:'resource_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + crn == o.crn && + relationship_name == o.relationship_name && + resource_id == o.resource_id && + resource_type == o.resource_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [crn, relationship_name, resource_id, resource_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/resources_vulnerability.rb b/lib/crimson-falcon/models/resources_vulnerability.rb new file mode 100644 index 00000000..e472335b --- /dev/null +++ b/lib/crimson-falcon/models/resources_vulnerability.rb @@ -0,0 +1,262 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class ResourcesVulnerability + attr_accessor :app + + attr_accessor :cve_id + + attr_accessor :exprt_rating + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app' => :'app', + :'cve_id' => :'cve_id', + :'exprt_rating' => :'exprt_rating' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'app' => :'ResourcesApp', + :'cve_id' => :'String', + :'exprt_rating' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ResourcesVulnerability` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ResourcesVulnerability`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app') + self.app = attributes[:'app'] + end + + if attributes.key?(:'cve_id') + self.cve_id = attributes[:'cve_id'] + end + + if attributes.key?(:'exprt_rating') + self.exprt_rating = attributes[:'exprt_rating'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @cve_id.nil? + invalid_properties.push('invalid value for "cve_id", cve_id cannot be nil.') + end + + if @exprt_rating.nil? + invalid_properties.push('invalid value for "exprt_rating", exprt_rating cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @cve_id.nil? + return false if @exprt_rating.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app == o.app && + cve_id == o.cve_id && + exprt_rating == o.exprt_rating + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app, cve_id, exprt_rating].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_azure_download_script_request_data.rb b/lib/crimson-falcon/models/rest_azure_download_script_request_data.rb new file mode 100644 index 00000000..4a605385 --- /dev/null +++ b/lib/crimson-falcon/models/rest_azure_download_script_request_data.rb @@ -0,0 +1,239 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestAzureDownloadScriptRequestData + attr_accessor :tenant_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tenant_id' => :'tenantId' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'tenant_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestAzureDownloadScriptRequestData` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestAzureDownloadScriptRequestData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @tenant_id.nil? + invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @tenant_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tenant_id == o.tenant_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tenant_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_azure_download_script_request_v1.rb b/lib/crimson-falcon/models/rest_azure_download_script_request_v1.rb new file mode 100644 index 00000000..d491a84f --- /dev/null +++ b/lib/crimson-falcon/models/rest_azure_download_script_request_v1.rb @@ -0,0 +1,241 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestAzureDownloadScriptRequestV1 + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestAzureDownloadScriptRequestV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestAzureDownloadScriptRequestV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_azure_provision_get_account_script_response_v1.rb b/lib/crimson-falcon/models/rest_azure_provision_get_account_script_response_v1.rb new file mode 100644 index 00000000..3cabdbf1 --- /dev/null +++ b/lib/crimson-falcon/models/rest_azure_provision_get_account_script_response_v1.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestAzureProvisionGetAccountScriptResponseV1 + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestAzureProvisionGetAccountScriptResponseV1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestAzureProvisionGetAccountScriptResponseV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_azure_script.rb b/lib/crimson-falcon/models/rest_azure_script.rb new file mode 100644 index 00000000..6ad3a3c7 --- /dev/null +++ b/lib/crimson-falcon/models/rest_azure_script.rb @@ -0,0 +1,276 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestAzureScript + attr_accessor :cid + + attr_accessor :tenant_id + + attr_accessor :url + + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cid' => :'cid', + :'tenant_id' => :'tenantId', + :'url' => :'url', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cid' => :'String', + :'tenant_id' => :'String', + :'url' => :'String', + :'version' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestAzureScript` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestAzureScript`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @tenant_id.nil? + invalid_properties.push('invalid value for "tenant_id", tenant_id cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @cid.nil? + return false if @tenant_id.nil? + return false if @version.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cid == o.cid && + tenant_id == o.tenant_id && + url == o.url && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cid, tenant_id, url, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_cursor_and_limit_meta_info.rb b/lib/crimson-falcon/models/rest_cursor_and_limit_meta_info.rb new file mode 100644 index 00000000..44e9dec5 --- /dev/null +++ b/lib/crimson-falcon/models/rest_cursor_and_limit_meta_info.rb @@ -0,0 +1,289 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestCursorAndLimitMetaInfo + attr_accessor :_next + + attr_accessor :pagination + + attr_accessor :powered_by + + attr_accessor :query_time + + attr_accessor :trace_id + + attr_accessor :writes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_next' => :'next', + :'pagination' => :'pagination', + :'powered_by' => :'powered_by', + :'query_time' => :'query_time', + :'trace_id' => :'trace_id', + :'writes' => :'writes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_next' => :'String', + :'pagination' => :'RestPaging', + :'powered_by' => :'String', + :'query_time' => :'Float', + :'trace_id' => :'String', + :'writes' => :'MsaspecWrites' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestCursorAndLimitMetaInfo` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestCursorAndLimitMetaInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_next') + self._next = attributes[:'_next'] + end + + if attributes.key?(:'pagination') + self.pagination = attributes[:'pagination'] + end + + if attributes.key?(:'powered_by') + self.powered_by = attributes[:'powered_by'] + end + + if attributes.key?(:'query_time') + self.query_time = attributes[:'query_time'] + end + + if attributes.key?(:'trace_id') + self.trace_id = attributes[:'trace_id'] + end + + if attributes.key?(:'writes') + self.writes = attributes[:'writes'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @query_time.nil? + invalid_properties.push('invalid value for "query_time", query_time cannot be nil.') + end + + if @trace_id.nil? + invalid_properties.push('invalid value for "trace_id", trace_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @query_time.nil? + return false if @trace_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _next == o._next && + pagination == o.pagination && + powered_by == o.powered_by && + query_time == o.query_time && + trace_id == o.trace_id && + writes == o.writes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_next, pagination, powered_by, query_time, trace_id, writes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_cursor_meta_info.rb b/lib/crimson-falcon/models/rest_cursor_meta_info.rb new file mode 100644 index 00000000..1534c0ed --- /dev/null +++ b/lib/crimson-falcon/models/rest_cursor_meta_info.rb @@ -0,0 +1,280 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestCursorMetaInfo + attr_accessor :_next + + attr_accessor :powered_by + + attr_accessor :query_time + + attr_accessor :trace_id + + attr_accessor :writes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_next' => :'next', + :'powered_by' => :'powered_by', + :'query_time' => :'query_time', + :'trace_id' => :'trace_id', + :'writes' => :'writes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_next' => :'String', + :'powered_by' => :'String', + :'query_time' => :'Float', + :'trace_id' => :'String', + :'writes' => :'MsaspecWrites' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestCursorMetaInfo` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestCursorMetaInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'_next') + self._next = attributes[:'_next'] + end + + if attributes.key?(:'powered_by') + self.powered_by = attributes[:'powered_by'] + end + + if attributes.key?(:'query_time') + self.query_time = attributes[:'query_time'] + end + + if attributes.key?(:'trace_id') + self.trace_id = attributes[:'trace_id'] + end + + if attributes.key?(:'writes') + self.writes = attributes[:'writes'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @query_time.nil? + invalid_properties.push('invalid value for "query_time", query_time cannot be nil.') + end + + if @trace_id.nil? + invalid_properties.push('invalid value for "trace_id", trace_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @query_time.nil? + return false if @trace_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _next == o._next && + powered_by == o.powered_by && + query_time == o.query_time && + trace_id == o.trace_id && + writes == o.writes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_next, powered_by, query_time, trace_id, writes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_cursor_response_fields.rb b/lib/crimson-falcon/models/rest_cursor_response_fields.rb new file mode 100644 index 00000000..9aaabb63 --- /dev/null +++ b/lib/crimson-falcon/models/rest_cursor_response_fields.rb @@ -0,0 +1,250 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestCursorResponseFields + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'RestCursorMetaInfo' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestCursorResponseFields` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestCursorResponseFields`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/rest_paging.rb b/lib/crimson-falcon/models/rest_paging.rb new file mode 100644 index 00000000..a6b906d6 --- /dev/null +++ b/lib/crimson-falcon/models/rest_paging.rb @@ -0,0 +1,262 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestPaging + attr_accessor :limit + + attr_accessor :offset + + attr_accessor :total + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'limit' => :'limit', + :'offset' => :'offset', + :'total' => :'total' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'limit' => :'Integer', + :'offset' => :'Integer', + :'total' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestPaging` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestPaging`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'offset') + self.offset = attributes[:'offset'] + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @limit.nil? + invalid_properties.push('invalid value for "limit", limit cannot be nil.') + end + + if @total.nil? + invalid_properties.push('invalid value for "total", total cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @limit.nil? + return false if @total.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + limit == o.limit && + offset == o.offset && + total == o.total + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [limit, offset, total].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/restapi_indicator_response.rb b/lib/crimson-falcon/models/restapi_indicator_response.rb new file mode 100644 index 00000000..c67f04fe --- /dev/null +++ b/lib/crimson-falcon/models/restapi_indicator_response.rb @@ -0,0 +1,271 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestapiIndicatorResponse + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestapiIndicatorResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestapiIndicatorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @errors.nil? + invalid_properties.push('invalid value for "errors", errors cannot be nil.') + end + + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @errors.nil? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/restapi_indicators_query_request.rb b/lib/crimson-falcon/models/restapi_indicators_query_request.rb new file mode 100644 index 00000000..ae8bd238 --- /dev/null +++ b/lib/crimson-falcon/models/restapi_indicators_query_request.rb @@ -0,0 +1,255 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestapiIndicatorsQueryRequest + attr_accessor :filter + + attr_accessor :sort + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filter' => :'filter', + :'sort' => :'sort' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'filter' => :'String', + :'sort' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestapiIndicatorsQueryRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestapiIndicatorsQueryRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'sort') + if (value = attributes[:'sort']).is_a?(Array) + self.sort = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @filter.nil? + invalid_properties.push('invalid value for "filter", filter cannot be nil.') + end + + if @sort.nil? + invalid_properties.push('invalid value for "sort", sort cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @filter.nil? + return false if @sort.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filter == o.filter && + sort == o.sort + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [filter, sort].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/restapi_indicators_query_sort_request.rb b/lib/crimson-falcon/models/restapi_indicators_query_sort_request.rb new file mode 100644 index 00000000..6fe9fff1 --- /dev/null +++ b/lib/crimson-falcon/models/restapi_indicators_query_sort_request.rb @@ -0,0 +1,267 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class RestapiIndicatorsQuerySortRequest + attr_accessor :field + + attr_accessor :missing + + attr_accessor :order + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'missing' => :'missing', + :'order' => :'order' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'field' => :'String', + :'missing' => :'Object', + :'order' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RestapiIndicatorsQuerySortRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::RestapiIndicatorsQuerySortRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'missing') + self.missing = attributes[:'missing'] + end + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @field.nil? + invalid_properties.push('invalid value for "field", field cannot be nil.') + end + + if @missing.nil? + invalid_properties.push('invalid value for "missing", missing cannot be nil.') + end + + if @order.nil? + invalid_properties.push('invalid value for "order", order cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @field.nil? + return false if @missing.nil? + return false if @order.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + missing == o.missing && + order == o.order + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [field, missing, order].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/sadomain_typosquatting_base_domain.rb b/lib/crimson-falcon/models/sadomain_typosquatting_base_domain.rb index c5aec328..6a6e2cdb 100644 --- a/lib/crimson-falcon/models/sadomain_typosquatting_base_domain.rb +++ b/lib/crimson-falcon/models/sadomain_typosquatting_base_domain.rb @@ -44,6 +44,10 @@ class SadomainTyposquattingBaseDomain # The Punycode representation of the domain, i.e. starting with `xn--` attr_accessor :punycode_format + attr_accessor :submit_for_blocking_info + + attr_accessor :submit_for_takedown_info + # The Unicode representation of the domain attr_accessor :unicode_format @@ -56,6 +60,8 @@ def self.attribute_map :'id' => :'id', :'is_registered' => :'is_registered', :'punycode_format' => :'punycode_format', + :'submit_for_blocking_info' => :'submit_for_blocking_info', + :'submit_for_takedown_info' => :'submit_for_takedown_info', :'unicode_format' => :'unicode_format', :'whois' => :'whois' } @@ -73,6 +79,8 @@ def self.openapi_types :'id' => :'String', :'is_registered' => :'Boolean', :'punycode_format' => :'String', + :'submit_for_blocking_info' => :'SadomainSubmissionInformation', + :'submit_for_takedown_info' => :'SadomainSubmissionInformation', :'unicode_format' => :'String', :'whois' => :'SadomainWhoisRecord' } @@ -115,6 +123,14 @@ def initialize(attributes = {}) self.punycode_format = attributes[:'punycode_format'] end + if attributes.key?(:'submit_for_blocking_info') + self.submit_for_blocking_info = attributes[:'submit_for_blocking_info'] + end + + if attributes.key?(:'submit_for_takedown_info') + self.submit_for_takedown_info = attributes[:'submit_for_takedown_info'] + end + if attributes.key?(:'unicode_format') self.unicode_format = attributes[:'unicode_format'] end @@ -166,6 +182,8 @@ def ==(o) id == o.id && is_registered == o.is_registered && punycode_format == o.punycode_format && + submit_for_blocking_info == o.submit_for_blocking_info && + submit_for_takedown_info == o.submit_for_takedown_info && unicode_format == o.unicode_format && whois == o.whois end @@ -179,7 +197,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_date, id, is_registered, punycode_format, unicode_format, whois].hash + [created_date, id, is_registered, punycode_format, submit_for_blocking_info, submit_for_takedown_info, unicode_format, whois].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/sadomain_typosquatting_subdomain.rb b/lib/crimson-falcon/models/sadomain_typosquatting_subdomain.rb index fee39c19..7d679f2d 100644 --- a/lib/crimson-falcon/models/sadomain_typosquatting_subdomain.rb +++ b/lib/crimson-falcon/models/sadomain_typosquatting_subdomain.rb @@ -36,8 +36,6 @@ class SadomainTyposquattingSubdomain attr_accessor :id - attr_accessor :is_registered - attr_accessor :last_seen attr_accessor :punycode_format @@ -49,7 +47,6 @@ def self.attribute_map { :'first_seen' => :'first_seen', :'id' => :'id', - :'is_registered' => :'is_registered', :'last_seen' => :'last_seen', :'punycode_format' => :'punycode_format', :'unicode_format' => :'unicode_format' @@ -66,7 +63,6 @@ def self.openapi_types { :'first_seen' => :'Time', :'id' => :'String', - :'is_registered' => :'Boolean', :'last_seen' => :'Time', :'punycode_format' => :'String', :'unicode_format' => :'String' @@ -102,10 +98,6 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end - if attributes.key?(:'is_registered') - self.is_registered = attributes[:'is_registered'] - end - if attributes.key?(:'last_seen') self.last_seen = attributes[:'last_seen'] end @@ -127,10 +119,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "id", id cannot be nil.') end - if @is_registered.nil? - invalid_properties.push('invalid value for "is_registered", is_registered cannot be nil.') - end - if @punycode_format.nil? invalid_properties.push('invalid value for "punycode_format", punycode_format cannot be nil.') end @@ -146,7 +134,6 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @id.nil? - return false if @is_registered.nil? return false if @punycode_format.nil? return false if @unicode_format.nil? true @@ -159,7 +146,6 @@ def ==(o) self.class == o.class && first_seen == o.first_seen && id == o.id && - is_registered == o.is_registered && last_seen == o.last_seen && punycode_format == o.punycode_format && unicode_format == o.unicode_format @@ -174,7 +160,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [first_seen, id, is_registered, last_seen, punycode_format, unicode_format].hash + [first_seen, id, last_seen, punycode_format, unicode_format].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/string_wrapper.rb b/lib/crimson-falcon/models/string_wrapper.rb new file mode 100644 index 00000000..9be3e57c --- /dev/null +++ b/lib/crimson-falcon/models/string_wrapper.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class StringWrapper + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::StringWrapper` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::StringWrapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/types_get_executor_nodes_metadata_response.rb b/lib/crimson-falcon/models/types_get_executor_nodes_metadata_response.rb new file mode 100644 index 00000000..f327211a --- /dev/null +++ b/lib/crimson-falcon/models/types_get_executor_nodes_metadata_response.rb @@ -0,0 +1,278 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class TypesGetExecutorNodesMetadataResponse + attr_accessor :count + + attr_accessor :executor_node_ids + + attr_accessor :executor_node_names + + attr_accessor :executor_node_states + + attr_accessor :executor_node_types + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'executor_node_ids' => :'executorNodeIds', + :'executor_node_names' => :'executorNodeNames', + :'executor_node_states' => :'executorNodeStates', + :'executor_node_types' => :'executorNodeTypes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'count' => :'Integer', + :'executor_node_ids' => :'Array', + :'executor_node_names' => :'Array', + :'executor_node_states' => :'Array', + :'executor_node_types' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::TypesGetExecutorNodesMetadataResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::TypesGetExecutorNodesMetadataResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.key?(:'executor_node_ids') + if (value = attributes[:'executor_node_ids']).is_a?(Array) + self.executor_node_ids = value + end + end + + if attributes.key?(:'executor_node_names') + if (value = attributes[:'executor_node_names']).is_a?(Array) + self.executor_node_names = value + end + end + + if attributes.key?(:'executor_node_states') + if (value = attributes[:'executor_node_states']).is_a?(Array) + self.executor_node_states = value + end + end + + if attributes.key?(:'executor_node_types') + if (value = attributes[:'executor_node_types']).is_a?(Array) + self.executor_node_types = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + count == o.count && + executor_node_ids == o.executor_node_ids && + executor_node_names == o.executor_node_names && + executor_node_states == o.executor_node_states && + executor_node_types == o.executor_node_types + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [count, executor_node_ids, executor_node_names, executor_node_states, executor_node_types].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/types_get_integration_tasks_metadata_response.rb b/lib/crimson-falcon/models/types_get_integration_tasks_metadata_response.rb new file mode 100644 index 00000000..741ffff4 --- /dev/null +++ b/lib/crimson-falcon/models/types_get_integration_tasks_metadata_response.rb @@ -0,0 +1,267 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class TypesGetIntegrationTasksMetadataResponse + attr_accessor :count + + attr_accessor :ids + + attr_accessor :integration_task_types + + attr_accessor :names + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'ids' => :'ids', + :'integration_task_types' => :'integration_task_types', + :'names' => :'names' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'count' => :'Integer', + :'ids' => :'Array', + :'integration_task_types' => :'Array', + :'names' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::TypesGetIntegrationTasksMetadataResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::TypesGetIntegrationTasksMetadataResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.key?(:'ids') + if (value = attributes[:'ids']).is_a?(Array) + self.ids = value + end + end + + if attributes.key?(:'integration_task_types') + if (value = attributes[:'integration_task_types']).is_a?(Array) + self.integration_task_types = value + end + end + + if attributes.key?(:'names') + if (value = attributes[:'names']).is_a?(Array) + self.names = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + count == o.count && + ids == o.ids && + integration_task_types == o.integration_task_types && + names == o.names + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [count, ids, integration_task_types, names].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/models/v2_for_loop.rb b/lib/crimson-falcon/models/v2_for_loop.rb index 627f55b1..6134a972 100644 --- a/lib/crimson-falcon/models/v2_for_loop.rb +++ b/lib/crimson-falcon/models/v2_for_loop.rb @@ -32,6 +32,8 @@ module Falcon class V2ForLoop + attr_accessor :cel_condition + attr_accessor :condition attr_accessor :condition_display @@ -49,6 +51,7 @@ class V2ForLoop # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'cel_condition' => :'cel_condition', :'condition' => :'condition', :'condition_display' => :'condition_display', :'continue_on_partial_execution' => :'continue_on_partial_execution', @@ -67,6 +70,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'cel_condition' => :'String', :'condition' => :'String', :'condition_display' => :'Array', :'continue_on_partial_execution' => :'Boolean', @@ -98,6 +102,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'cel_condition') + self.cel_condition = attributes[:'cel_condition'] + end + if attributes.key?(:'condition') self.condition = attributes[:'condition'] end @@ -157,6 +165,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + cel_condition == o.cel_condition && condition == o.condition && condition_display == o.condition_display && continue_on_partial_execution == o.continue_on_partial_execution && @@ -175,7 +184,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [condition, condition_display, continue_on_partial_execution, input, max_execution_seconds, max_iteration_count, sequential].hash + [cel_condition, condition, condition_display, continue_on_partial_execution, input, max_execution_seconds, max_iteration_count, sequential].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/vulnerabilities_vulnerability_entity_sarif_response.rb b/lib/crimson-falcon/models/vulnerabilities_vulnerability_entity_sarif_response.rb new file mode 100644 index 00000000..696e0005 --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_vulnerability_entity_sarif_response.rb @@ -0,0 +1,266 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'date' +require 'time' + +module Falcon + class VulnerabilitiesVulnerabilityEntitySARIFResponse + attr_accessor :errors + + attr_accessor :meta + + attr_accessor :resources + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'errors' => :'errors', + :'meta' => :'meta', + :'resources' => :'resources' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'errors' => :'Array', + :'meta' => :'MsaMetaInfo', + :'resources' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'resources') + if (value = attributes[:'resources']).is_a?(Array) + self.resources = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @meta.nil? + invalid_properties.push('invalid value for "meta", meta cannot be nil.') + end + + if @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @meta.nil? + return false if @resources.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + errors == o.errors && + meta == o.meta && + resources == o.resources + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [errors, meta, resources].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + attributes = attributes.transform_keys(&:to_sym) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = Falcon.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/lib/crimson-falcon/version.rb b/lib/crimson-falcon/version.rb index 76fbb759..35135864 100644 --- a/lib/crimson-falcon/version.rb +++ b/lib/crimson-falcon/version.rb @@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -CrowdStrike Swagger API Version: 2024-11-15T00:00:02Z +CrowdStrike Swagger API Version: 2025-01-27T00:00:02Z =end module Falcon diff --git a/spec/api/alerts_spec.rb b/spec/api/alerts_spec.rb index 3421908a..4d6da0f0 100644 --- a/spec/api/alerts_spec.rb +++ b/spec/api/alerts_spec.rb @@ -53,7 +53,7 @@ # Deprecated: please use version v2 of this endpoint. Retrieves all Alerts ids that match a given query. # @param [Hash] opts the optional parameters # @option opts [Integer] :offset The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. # @option opts [String] :sort Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering # @option opts [String] :filter Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). # @option opts [String] :q Search all alert metadata for the provided string @@ -69,7 +69,7 @@ # @param [Hash] opts the optional parameters # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved # @option opts [Integer] :offset The first detection to return, where `0` is the latest detection. Use with the `offset` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use with the `offset` parameter to manage pagination of results. + # @option opts [Integer] :limit The maximum number of detections to return in this response (default: 100; max: 10000). Use this parameter together with the `offset` parameter to manage pagination of the results. # @option opts [String] :sort Sort parameter takes the form <field|direction>. Direction can be either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields are status, cid, aggregate_id, timestamp, created_timestamp, updated_timestamp, assigned_to_name, assigned_to_uid, assigned_to_uuid, show_in_ui, tactic_id, tactic, technique, technique_id, pattern_id, product, comment, tags If the fields are missing from the Alerts, the service will fallback to its default ordering # @option opts [String] :filter Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). # @option opts [String] :q Search all alert metadata for the provided string @@ -126,6 +126,17 @@ end end + # unit tests for post_combined_alerts_v1 + # Retrieves all Alerts that match a particular FQL filter. + # @param body `after` - Token used to access the next page. The `after` token will be populated only when the service expects more results expected on the next page. Once you reach the last page (which usually has less than `limit` results), the `after` token will not be returned anymore. The best way to retrieve all the results is to paginate them till you get to the last page where the `after` token blank. This value is highly dependant on the `sort` parameter, so if you plan to change the sort order, you will have to re-start your search from the first page (without `after` parameter). `filter` - Filter Alerts using a query in Falcon Query Language (FQL).Filter fields can be any keyword field that is part of #domain.Alert An asterisk wildcard `*` includes all results. Empty value means to not filter on anything. Most commonly used filter fields that supports exact match: cid, id, aggregate_id, product, type, pattern_id, platform ... Most commonly used filter fields that supports wildcard (*): assigned_to_name, assigned_to_uuid, tactic_id, technique ... Most commonly filter fields that supports range comparisons (>, <, >=, <=): severity, created_timestamp, timestamp, updated_timestamp... All filter fields and operations support negation (!). The full list of valid filter options is extensive. Review it in our [documentation inside the Falcon console](https://falcon.crowdstrike.com/documentation/45/falcon-query-language-fql). `limit` - The maximum number of detections to return in this response (default: 100; max: 1000). Use this parameter together with the `after` parameter to manage pagination of the results. `sort` - Sort parameter takes the form of `<field|direction>`. The sorting fields can be any keyword field that is part of #domain.Alert except for the text based fields. Most commonly used fields for sorting are: timestamp, created_timestamp, updated_timestamp, status, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, tactic_id, tactic, technique, technique_id, pattern_id or product. By default all the results are sorted by the `created_timestamp` field in the descending order. **Important:** The pagination is done on live data in the order defined by the `sort` field parameter (default: `created_timestamp|desc`), so if you want to avoid inconsistent results where the same record might appear on multiple pages (or none), sort only on the fields that do not change over time (e.g. created_timestamp, composite_id, ...). + # @param [Hash] opts the optional parameters + # @return [DetectsapiPostCombinedAlertsV1ResponseSwagger] + describe 'post_combined_alerts_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for post_entities_alerts_v1 # Deprecated: please use version v2 of this endpoint. Retrieves all Alerts given their ids. # @param body diff --git a/spec/api/aspm_spec.rb b/spec/api/aspm_spec.rb index 8dbc7391..1d272073 100644 --- a/spec/api/aspm_spec.rb +++ b/spec/api/aspm_spec.rb @@ -142,6 +142,14 @@ # @param node_type # @param [Hash] opts the optional parameters # @option opts [Integer] :integration_type + # @option opts [Integer] :offset + # @option opts [Integer] :limit + # @option opts [String] :order_by + # @option opts [String] :direction + # @option opts [Array] :executor_node_ids executor node ids + # @option opts [Array] :executor_node_names executor node names + # @option opts [Array] :executor_node_states executor node states + # @option opts [Array] :executor_node_types executor node types # @return [TypesListExecutorNodesResponse] describe 'get_executor_nodes test' do it 'should work' do @@ -149,11 +157,32 @@ end end + # unit tests for get_executor_nodes_metadata + # Get metadata about all executor nodes + # @param [Hash] opts the optional parameters + # @option opts [Array] :executor_node_ids executor node ids + # @option opts [Array] :executor_node_names executor node names + # @option opts [Array] :executor_node_states executor node states + # @option opts [Array] :executor_node_types executor node types + # @return [TypesGetExecutorNodesMetadataResponse] + describe 'get_executor_nodes_metadata test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for get_integration_tasks # Get all the integration tasks # @param [Hash] opts the optional parameters # @option opts [Integer] :integration_task_type # @option opts [String] :category + # @option opts [Integer] :offset + # @option opts [Integer] :limit + # @option opts [String] :order_by + # @option opts [String] :direction + # @option opts [Integer] :integration_task_types + # @option opts [Integer] :ids + # @option opts [String] :names # @return [TypesListIntegrationTasksResponse] describe 'get_integration_tasks test' do it 'should work' do @@ -161,6 +190,20 @@ end end + # unit tests for get_integration_tasks_metadata + # Get metadata about all integration tasks + # @param [Hash] opts the optional parameters + # @option opts [String] :category + # @option opts [Integer] :integration_task_types + # @option opts [Integer] :ids + # @option opts [String] :names + # @return [TypesGetIntegrationTasksMetadataResponse] + describe 'get_integration_tasks_metadata test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for get_integration_types # Get all the integration types # @param [Hash] opts the optional parameters diff --git a/spec/api/default_spec.rb b/spec/api/cloud_aws_registration_spec.rb similarity index 93% rename from spec/api/default_spec.rb rename to spec/api/cloud_aws_registration_spec.rb index d8987df0..d2524ba6 100644 --- a/spec/api/default_spec.rb +++ b/spec/api/cloud_aws_registration_spec.rb @@ -30,22 +30,22 @@ require 'spec_helper' require 'json' -# Unit tests for Falcon::Default +# Unit tests for Falcon::CloudAwsRegistration # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe 'Default' do +describe 'CloudAwsRegistration' do before(:all) do # run before each test - @api_instance = Falcon::Default.new + @api_instance = Falcon::CloudAwsRegistration.new end after(:all) do # run after each test end - describe 'test an instance of Default' do - it 'should create an instance of Default' do - expect(@api_instance).to be_instance_of(Falcon::Default) + describe 'test an instance of CloudAwsRegistration' do + it 'should create an instance of CloudAwsRegistration' do + expect(@api_instance).to be_instance_of(Falcon::CloudAwsRegistration) end end diff --git a/spec/api/cloud_azure_registration_spec.rb b/spec/api/cloud_azure_registration_spec.rb new file mode 100644 index 00000000..de2f64cf --- /dev/null +++ b/spec/api/cloud_azure_registration_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::CloudAzureRegistration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CloudAzureRegistration' do + before(:all) do + # run before each test + @api_instance = Falcon::CloudAzureRegistration.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of CloudAzureRegistration' do + it 'should create an instance of CloudAzureRegistration' do + expect(@api_instance).to be_instance_of(Falcon::CloudAzureRegistration) + end + end + + # unit tests for cloud_registration_azure_download_script + # Retrieve script to create resources + # @param body + # @param [Hash] opts the optional parameters + # @return [RestAzureProvisionGetAccountScriptResponseV1] + describe 'cloud_registration_azure_download_script test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/cloud_security_assets_spec.rb b/spec/api/cloud_security_assets_spec.rb new file mode 100644 index 00000000..e2f9a7f1 --- /dev/null +++ b/spec/api/cloud_security_assets_spec.rb @@ -0,0 +1,78 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::CloudSecurityAssets +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CloudSecurityAssets' do + before(:all) do + # run before each test + @api_instance = Falcon::CloudSecurityAssets.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of CloudSecurityAssets' do + it 'should create an instance of CloudSecurityAssets' do + expect(@api_instance).to be_instance_of(Falcon::CloudSecurityAssets) + end + end + + # unit tests for cloud_security_assets_entities_get + # Gets raw resources based on the provided IDs param. Maximum of 100 resources can be requested with this method. Use POST method with same path if more are required. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids List of assets to return (maximum 100 IDs allowed). Use POST method with same path if more entities are required. + # @return [AssetsGetResourcesResponse] + describe 'cloud_security_assets_entities_get test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for cloud_security_assets_queries + # Gets a list of resource IDs for the given parameters, filters and sort criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :after token-based pagination. use for paginating through an entire result set. Use only one of 'offset' and 'after' parameters for paginating + # @option opts [String] :filter FQL string to filter on asset contents. Filterable fields include: - `account_id` - `account_name` - `active` - `business_impact` - `cloud_group` - `cloud_label` - `cloud_label_id` - `cloud_provider` - `cluster_id` - `cluster_name` - `compliant.benchmark_name` - `compliant.benchmark_version` - `compliant.framework` - `compliant.policy_id` - `compliant.requirement` - `compliant.rule` - `compliant.section` - `configuration.id` - `creation_time` - `cve_ids` - `data_classifications.found` - `data_classifications.label` - `data_classifications.label_id` - `data_classifications.scanned` - `data_classifications.tag` - `data_classifications.tag_id` - `environment` - `exprt_ratings` - `first_seen` - `highest_severity` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `legacy_resource_id` - `legacy_uuid` - `managed_by` - `non_compliant.benchmark_name` - `non_compliant.benchmark_version` - `non_compliant.framework` - `non_compliant.policy_id` - `non_compliant.requirement` - `non_compliant.rule` - `non_compliant.section` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `sensor_priority` - `service` - `severity` - `snapshot_detections` - `ssm_managed` - `status` - `tag_key` - `tag_value` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` + # @option opts [String] :sort The field to sort on. Sortable fields include: - `account_id` - `account_name` - `active` - `cloud_provider` - `cluster_id` - `cluster_name` - `creation_time` - `data_classifications.found` - `data_classifications.scanned` - `first_seen` - `id` - `instance_id` - `instance_state` - `ioa_count` - `iom_count` - `managed_by` - `organization_Id` - `os_version` - `platform_name` - `publicly_exposed` - `region` - `resource_id` - `resource_name` - `resource_type` - `resource_type_name` - `service` - `ssm_managed` - `status` - `tenant_id` - `updated_at` - `vmware.guest_os_id` - `vmware.guest_os_version` - `vmware.host_system_name` - `vmware.host_type` - `vmware.instance_uuid` - `vmware.vm_host_name` - `vmware.vm_tools_status` - `zone` Use `|asc` or `|desc` suffix to specify sort direction. + # @option opts [Integer] :limit The maximum number of items to return. When not specified or 0, 500 is used. When larger than 1000, 1000 is used. + # @option opts [Integer] :offset Offset returned assets. Use only one of 'offset' and 'after' parameter for paginating. 'offset' can only be used on offsets < 10,000. For paginating through the entire result set, use 'after' parameter + # @return [AssetsGetResourceIDsResponse] + describe 'cloud_security_assets_queries test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/container_alerts_spec.rb b/spec/api/container_alerts_spec.rb index 59f13aca..a854404c 100644 --- a/spec/api/container_alerts_spec.rb +++ b/spec/api/container_alerts_spec.rb @@ -52,7 +52,7 @@ # unit tests for read_container_alerts_count # Search Container Alerts by the provided search criteria # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` # @return [AlertsContainerAlertsCountValue] describe 'read_container_alerts_count test' do it 'should work' do @@ -63,7 +63,7 @@ # unit tests for read_container_alerts_count_by_severity # Get Container Alerts counts by severity # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` # @return [AlertsContainerAlertsCountValue] describe 'read_container_alerts_count_by_severity test' do it 'should work' do @@ -72,9 +72,9 @@ end # unit tests for search_and_read_container_alerts - # Search Container Alerts by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen,name,severity + # @option opts [String] :filter Search Container Alerts using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `container_id` - `last_seen` - `name` - `severity` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @option opts [String] :sort The fields to sort the records on. diff --git a/spec/api/container_detections_spec.rb b/spec/api/container_detections_spec.rb index bf04aa99..334c3807 100644 --- a/spec/api/container_detections_spec.rb +++ b/spec/api/container_detections_spec.rb @@ -50,12 +50,12 @@ end # unit tests for read_combined_detections - # Retrieve image assessment detections identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `containers_impacted` - `detection_name` - `detection_severity` - `detection_type` - `images_impacted` - `last_detected` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [containers_impacted detection_name detection_severity detection_type images_impacted last_detected] # @return [DetectionsApiCombinedDetections] describe 'read_combined_detections test' do it 'should work' do @@ -64,9 +64,9 @@ end # unit tests for read_detections - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,detection_type,image_registry,image_repository,image_tag + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [DetectionsApiAssessmentDetections] @@ -79,7 +79,7 @@ # unit tests for read_detections_count # Aggregate count of detections # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [DetectionsApiDetectionsCount] describe 'read_detections_count test' do it 'should work' do @@ -90,7 +90,7 @@ # unit tests for read_detections_count_by_severity # Aggregate counts of detections by severity # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [DetectionsApiDetectionsBySeverity] describe 'read_detections_count_by_severity test' do it 'should work' do @@ -101,7 +101,7 @@ # unit tests for read_detections_count_by_type # Aggregate counts of detections by detection type # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @return [DetectionsApiDetectionsByType] describe 'read_detections_count_by_type test' do it 'should work' do @@ -110,9 +110,9 @@ end # unit tests for search_detections - # Retrieve image assessment detection entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,detection_type,id,image_digest,image_id,image_registry,image_repository,image_tag,name,severity + # @option opts [String] :filter Filter images detections using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `detection_type` - `image_registry` - `image_repository` - `image_tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [CommonGenericEntityResponseString] diff --git a/spec/api/container_images_spec.rb b/spec/api/container_images_spec.rb index 6ce39626..fc871fdb 100644 --- a/spec/api/container_images_spec.rb +++ b/spec/api/container_images_spec.rb @@ -52,7 +52,7 @@ # unit tests for aggregate_image_assessment_history # Image assessment history # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filters: cid,registry,repository + # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `registry` - `repository` # @return [ImagesApiImageAssessmentHistory] describe 'aggregate_image_assessment_history test' do it 'should work' do @@ -63,7 +63,7 @@ # unit tests for aggregate_image_count # Aggregate count of images # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` # @return [ImagesApiImageCount] describe 'aggregate_image_count test' do it 'should work' do @@ -74,7 +74,7 @@ # unit tests for aggregate_image_count_by_base_os # Aggregate count of images grouped by Base OS distribution # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @return [ImagesApiImageCountByBaseOS] describe 'aggregate_image_count_by_base_os test' do it 'should work' do @@ -85,7 +85,7 @@ # unit tests for aggregate_image_count_by_state # Aggregate count of images grouped by state # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen,registry,repository + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @return [ImagesApiImageCountByState] describe 'aggregate_image_count_by_state test' do it 'should work' do @@ -94,9 +94,9 @@ end # unit tests for combined_base_images - # Retrieve base images for provided filter + # Retrieves a list of base images for the provided filter. Maximum page size: 100 # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search base images using a query in Falcon Query Language (FQL). Supported filters: image_digest,image_id,registry,repository,tag + # @option opts [String] :filter Search base images using a query in Falcon Query Language (FQL). Supported filter fields: - `image_digest` - `image_id` - `registry` - `repository` - `tag` # @return [CoreEntitiesResponse] describe 'combined_base_images test' do it 'should work' do @@ -107,9 +107,9 @@ # unit tests for combined_image_by_vulnerability_count # Retrieve top x images with the most vulnerabilities # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. - # @option opts [Integer] :offset This is not used in the backend but is added here for compatibility purposes as some clients expects this i.e UI widgets. + # @option opts [Integer] :offset The fields to sort the records on. **Not supported.** # @return [ImagesApiImageByVulnerabilityCount] describe 'combined_image_by_vulnerability_count test' do it 'should work' do @@ -118,13 +118,13 @@ end # unit tests for combined_image_detail - # Retrieve image entities identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: registry,repository,tag + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `registry` - `repository` - `tag` # @option opts [Boolean] :with_config (true/false) include image config, default is false + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. # @return [ImagesApiCustomerAndImage] describe 'combined_image_detail test' do it 'should work' do @@ -134,12 +134,12 @@ # unit tests for combined_image_issues_summary # Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities - # @param cid CID - # @param registry registry name - # @param repository repository name - # @param tag tag name + # @param cid CS Customer ID + # @param registry Registry + # @param repository Repository name + # @param tag Tag name # @param [Hash] opts the optional parameters - # @option opts [Boolean] :include_base_image_vuln include base image vulnerabilities + # @option opts [Boolean] :include_base_image_vuln Include base image vulnerabilities. # @return [ImagesApiImageIssuesSummary] describe 'combined_image_issues_summary test' do it 'should work' do @@ -149,12 +149,12 @@ # unit tests for combined_image_vulnerability_summary # aggregates information about vulnerabilities for an image - # @param cid CID - # @param registry registry name - # @param repository repository name - # @param tag tag name + # @param cid CS Customer ID + # @param registry Registry + # @param repository Repository name + # @param tag Tag name # @param [Hash] opts the optional parameters - # @option opts [Boolean] :include_base_image_vuln include base image vulnerabilities + # @option opts [Boolean] :include_base_image_vuln Include base image vulnerabilities. # @return [ImagesApiImageVulnerabilitiesSummary] describe 'combined_image_vulnerability_summary test' do it 'should work' do @@ -185,12 +185,12 @@ end # unit tests for get_combined_images - # Get image assessment results by providing an FQL filter and paging details + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: container_id, container_running_status, cve_id, detection_name, detection_severity, first_seen, image_digest, image_id, registry, repository, tag, vulnerability_severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve [1-100] + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `container_id` - `container_running_status` - `cve_id` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `registry` - `repository` - `tag` - `vulnerability_severity` + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `first_seen` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `registry` - `repository` - `source` - `tag` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id registry repository source tag] # @return [ImagesExtCombinedImagesResponse] describe 'get_combined_images test' do it 'should work' do @@ -199,14 +199,14 @@ end # unit tests for read_combined_images_export - # Retrieve images with an option to expand aggregated vulnerabilities/detections + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: arch,base_os,cid,container_id,container_running_status,cps_rating,crowdstrike_user,cve_id,detection_count,detection_name,detection_severity,first_seen,image_digest,image_id,include_base_image_vuln,layer_digest,package_name_version,registry,repository,source,tag,vulnerability_count,vulnerability_severity - # @option opts [Boolean] :expand_vulnerabilities expand vulnerabilities - # @option opts [Boolean] :expand_detections expand detections + # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `arch` - `base_os` - `cid` - `container_id` - `container_running_status` - `cps_rating` - `crowdstrike_user` - `cve_id` - `detection_count` - `detection_name` - `detection_severity` - `first_seen` - `image_digest` - `image_id` - `include_base_image_vuln` - `layer_digest` - `package_name_version` - `registry` - `repository` - `source` - `tag` - `vulnerability_count` - `vulnerability_severity` + # @option opts [Boolean] :expand_vulnerabilities Expand vulnerabilities details + # @option opts [Boolean] :expand_detections Expand detections details # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [base_os cid detections firstScanned first_seen highest_cps_current_rating highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository source tag vulnerabilities] + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `base_os` - `cid` - `detections` - `firstScanned` - `first_seen` - `highest_cps_current_rating` - `highest_detection_severity` - `highest_vulnerability_severity` - `image_digest` - `image_id` - `last_seen` - `layers_with_vulnerabilities` - `packages` - `registry` - `repository` - `source` - `tag` - `vulnerabilities` # @return [ImagesApiCombinedImageExport] describe 'read_combined_images_export test' do it 'should work' do diff --git a/spec/api/container_packages_spec.rb b/spec/api/container_packages_spec.rb index 56c74f91..4b2d1ecc 100644 --- a/spec/api/container_packages_spec.rb +++ b/spec/api/container_packages_spec.rb @@ -50,9 +50,9 @@ end # unit tests for read_packages_by_fixable_vuln_count - # Retrieve top x app packages with the most fixable vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [PackagesApiPackagesByVulnCount] @@ -63,9 +63,9 @@ end # unit tests for read_packages_by_vuln_count - # Retrieve top x packages with the most vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [PackagesApiPackagesByVulnCount] @@ -76,13 +76,13 @@ end # unit tests for read_packages_combined - # Retrieve packages identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages, default is false + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [license package_name_version type] # @return [PackagesApiCombinedPackage] describe 'read_packages_combined test' do it 'should work' do @@ -91,13 +91,13 @@ end # unit tests for read_packages_combined_export - # Retrieve packages identified by the provided filter criteria for the purpose of export + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count - # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages, default is false + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [license package_name_version type] # @return [PackagesApiCombinedPackageExport] describe 'read_packages_combined_export test' do it 'should work' do @@ -105,10 +105,25 @@ end end + # unit tests for read_packages_combined_v2 + # Maximum offset = 10000 - limit + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `cid` - `container_id` - `cveid` - `fix_status` - `image_digest` - `license` - `package_name_version` - `severity` - `type` - `vulnerability_count` + # @option opts [Boolean] :only_zero_day_affected (true/false) load zero day affected packages + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `license` - `package_name_version` - `type` + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [Integer] :offset The offset from where to begin. + # @return [PackagesApiCombinedPackageV2] + describe 'read_packages_combined_v2 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for read_packages_count_by_zero_day # Retrieve packages count affected by zero day vulnerabilities # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid + # @option opts [String] :filter Filter packages using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` # @return [CommonCountResponse] describe 'read_packages_count_by_zero_day test' do it 'should work' do diff --git a/spec/api/container_vulnerabilities_spec.rb b/spec/api/container_vulnerabilities_spec.rb index f1d92ec7..483dd22b 100644 --- a/spec/api/container_vulnerabilities_spec.rb +++ b/spec/api/container_vulnerabilities_spec.rb @@ -50,12 +50,12 @@ end # unit tests for read_combined_vulnerabilities - # Retrieve vulnerability and aggregate data filtered by the provided FQL + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. Supported columns: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity] + # @option opts [String] :sort The fields to sort the records on. Supported columns: - `cps_current_rating` - `cve_id` - `cvss_score` - `description` - `images_impacted` - `packages_impacted` - `severity` # @return [VulnerabilitiesApiCombinedVulnerability] describe 'read_combined_vulnerabilities test' do it 'should work' do @@ -64,10 +64,10 @@ end # unit tests for read_combined_vulnerabilities_details - # Retrieve vulnerability details related to an image + # Maximum offset = 10000 - limit # @param id Image UUID # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filters: cid,cps_rating,cve_id,cvss_score,exploited_status,exploited_status_name,include_base_image_vuln,is_zero_day,remediation_available,severity + # @option opts [String] :filter Filter the vulnerabilities using a query in Falcon Query Language (FQL). Supported vulnerability filter fields: - `cid` - `cps_rating` - `cve_id` - `cvss_score` - `exploited_status_name` - `exploited_status` - `include_base_image_vuln` - `is_zero_day` - `remediation_available` - `severity` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiCombinedVulnerabilityDetails] @@ -78,7 +78,7 @@ end # unit tests for read_combined_vulnerabilities_info - # Retrieve vulnerability and package related info for this customer + # Maximum offset = 10000 - limit # @param cve_id Vulnerability CVE ID # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. @@ -91,9 +91,9 @@ end # unit tests for read_vulnerabilities_by_image_count - # Retrieve top x vulnerabilities with the most impacted images + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnByImageCount] @@ -104,9 +104,9 @@ end # unit tests for read_vulnerabilities_publication_date - # Retrieve top x vulnerabilities with the most recent publication date + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: cid,cve_id,registry,repository,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cve_id` - `registry` - `repository` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnByPublication] @@ -117,9 +117,9 @@ end # unit tests for read_vulnerability_count - # Aggregate count of vulnerabilities + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCount] @@ -130,9 +130,9 @@ end # unit tests for read_vulnerability_count_by_actively_exploited - # Aggregate count of vulnerabilities grouped by actively exploited + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountByActivelyExploited] @@ -143,9 +143,9 @@ end # unit tests for read_vulnerability_count_by_cps_rating - # Aggregate count of vulnerabilities grouped by csp_rating + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountByCSPRating] @@ -156,9 +156,9 @@ end # unit tests for read_vulnerability_count_by_cvss_score - # Aggregate count of vulnerabilities grouped by cvss score + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountByCVSSScore] @@ -169,9 +169,9 @@ end # unit tests for read_vulnerability_count_by_severity - # Aggregate count of vulnerabilities grouped by severity + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: base_os,cid,container_id,container_running_status,containers_impacted_range,cps_rating,cve_id,cvss_score,description,exploited_status,exploited_status_name,fix_status,image_digest,image_id,images_impacted_range,include_base_image_vuln,package_name_version,registry,repository,severity,tag + # @option opts [String] :filter Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filter fields: - `ai_related` - `base_os` - `cid` - `container_id` - `container_running_status` - `containers_impacted_range` - `cps_rating` - `cve_id` - `cvss_score` - `description` - `exploited_status_name` - `exploited_status` - `fix_status` - `image_digest` - `image_id` - `images_impacted_range` - `include_base_image_vuln` - `package_name_version` - `registry` - `repository` - `severity` - `tag` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. # @return [VulnerabilitiesApiVulnCountBySeverity] diff --git a/spec/api/content_update_policies_spec.rb b/spec/api/content_update_policies_spec.rb new file mode 100644 index 00000000..843cfad7 --- /dev/null +++ b/spec/api/content_update_policies_spec.rb @@ -0,0 +1,177 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::ContentUpdatePolicies +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ContentUpdatePolicies' do + before(:all) do + # run before each test + @api_instance = Falcon::ContentUpdatePolicies.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of ContentUpdatePolicies' do + it 'should create an instance of ContentUpdatePolicies' do + expect(@api_instance).to be_instance_of(Falcon::ContentUpdatePolicies) + end + end + + # unit tests for create_content_update_policies + # Create Content Update Policies by specifying details about the policy to create + # @param body + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + describe 'create_content_update_policies test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for delete_content_update_policies + # Delete a set of Content Update Policies by specifying their IDs + # @param ids The IDs of the Content Update Policies to delete + # @param [Hash] opts the optional parameters + # @return [MsaQueryResponse] + describe 'delete_content_update_policies test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_content_update_policies + # Retrieve a set of Content Update Policies by specifying their IDs + # @param ids The IDs of the Content Update Policies to return + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + describe 'get_content_update_policies test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for perform_content_update_policies_action + # Perform the specified action on the Content Update Policies specified in the request + # @param action_name The action to perform + # @param body + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + describe 'perform_content_update_policies_action test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for query_combined_content_update_policies + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [DomainContentUpdatePolicyRespV1] + describe 'query_combined_content_update_policies test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for query_combined_content_update_policy_members + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :id The ID of the Content Update Policy to search for members of + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [BasePolicyMembersRespV1] + describe 'query_combined_content_update_policy_members test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for query_content_update_policies + # Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [MsaQueryResponse] + describe 'query_content_update_policies test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for query_content_update_policy_members + # Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :id The ID of the Content Update Policy to search for members of + # @option opts [String] :filter The filter expression that should be used to limit the results + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [Integer] :limit The maximum records to return. [1-5000] + # @option opts [String] :sort The property to sort by + # @return [MsaQueryResponse] + describe 'query_content_update_policy_members test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for set_content_update_policies_precedence + # Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence + # @param body + # @param [Hash] opts the optional parameters + # @return [MsaQueryResponse] + describe 'set_content_update_policies_precedence test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for update_content_update_policies + # Update Content Update Policies by specifying the ID of the policy and details to update + # @param body + # @param [Hash] opts the optional parameters + # @return [DomainContentUpdatePolicyRespV1] + describe 'update_content_update_policies test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/correlation_rules_spec.rb b/spec/api/correlation_rules_spec.rb new file mode 100644 index 00000000..47ef0d22 --- /dev/null +++ b/spec/api/correlation_rules_spec.rb @@ -0,0 +1,137 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::CorrelationRules +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CorrelationRules' do + before(:all) do + # run before each test + @api_instance = Falcon::CorrelationRules.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of CorrelationRules' do + it 'should create an instance of CorrelationRules' do + expect(@api_instance).to be_instance_of(Falcon::CorrelationRules) + end + end + + # unit tests for combined_rules_get_v1 + # Find all rules matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying the filter parameters + # @option opts [String] :q Match query criteria, which includes all the filter string fields + # @option opts [String] :sort Rule property to sort on + # @option opts [Integer] :offset Starting index of overall result set from which to return IDs + # @option opts [Integer] :limit Number of IDs to return + # @return [ApiGetEntitiesRulesResponseV1] + describe 'combined_rules_get_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for entities_rule_versions_delete_v1 + # Delete versions by IDs + # @param ids The IDs + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + describe 'entities_rule_versions_delete_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for entities_rules_delete_v1 + # Delete rules by IDs + # @param ids The IDs + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + describe 'entities_rules_delete_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for entities_rules_get_v1 + # Retrieve rules by IDs + # @param ids The IDs + # @param [Hash] opts the optional parameters + # @return [ApiGetEntitiesRulesResponseV1] + describe 'entities_rules_get_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for entities_rules_patch_v1 + # Update rules + # @param body + # @param [Hash] opts the optional parameters + # @return [ApiGetEntitiesRulesResponseV1] + describe 'entities_rules_patch_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for entities_rules_post_v1 + # Create rule + # @param body + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + describe 'entities_rules_post_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for queries_rules_get_v1 + # Find all rule IDs matching the query and filter. Supported filters: customer_id,user_id,user_uuid,status,name,created_on,last_updated_on Supported range filters: created_on,last_updated_on + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying the filter parameters + # @option opts [String] :q Match query criteria, which includes all the filter string fields + # @option opts [String] :sort Rule property to sort on + # @option opts [Integer] :offset Starting index of overall result set from which to return IDs + # @option opts [Integer] :limit Number of IDs to return + # @return [MsaspecQueryResponse] + describe 'queries_rules_get_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/cspm_registration_spec.rb b/spec/api/cspm_registration_spec.rb index 339e267e..83a352b0 100644 --- a/spec/api/cspm_registration_spec.rb +++ b/spec/api/cspm_registration_spec.rb @@ -53,8 +53,6 @@ # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. # @param tenant_id Azure Tenant ID # @param [Hash] opts the optional parameters - # @option opts [Boolean] :refresh Setting to true will invalidate the current certificate and generate a new certificate - # @option opts [String] :years_valid Years the certificate should be valid (only used when refresh=true) # @return [RegistrationAzureDownloadCertificateResponseV1] describe 'azure_download_certificate test' do it 'should work' do @@ -62,6 +60,18 @@ end end + # unit tests for azure_refresh_certificate + # Refresh certificate and returns JSON object(s) that contain the base64 encoded certificate for a service principal. + # @param tenant_id Azure Tenant ID + # @param [Hash] opts the optional parameters + # @option opts [String] :years_valid Years the certificate should be valid. Max 2 + # @return [RegistrationAzureDownloadCertificateResponseV1] + describe 'azure_refresh_certificate test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for connect_cspm_gcp_account # Creates a new GCP account with newly-uploaded service account or connects with existing service account with only the following fields: parent_id, parent_type and service_account_id # @param body @@ -122,7 +132,7 @@ # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS account IDs to remove # @option opts [Array] :organization_ids AWS organization IDs to remove - # @return [MsaBaseEntitiesResponse] + # @return [MsaspecResponseFields] describe 'delete_cspm_aws_account test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/api/custom_ioa_spec.rb b/spec/api/custom_ioa_spec.rb index 8c321e87..f0ea5c53 100644 --- a/spec/api/custom_ioa_spec.rb +++ b/spec/api/custom_ioa_spec.rb @@ -83,14 +83,14 @@ end end - # unit tests for delete_rules_0 + # unit tests for delete_rules # Delete rules from a rule group by ID. # @param rule_group_id The parent rule group # @param ids The IDs of the entities # @param [Hash] opts the optional parameters # @option opts [String] :comment Explains why the entity is being deleted # @return [MsaReplyMetaOnly] - describe 'delete_rules_0 test' do + describe 'delete_rules test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end @@ -254,12 +254,12 @@ end end - # unit tests for update_rules_0 + # unit tests for update_rules # Update rules within a rule group. Return the updated rules. # @param body # @param [Hash] opts the optional parameters # @return [ApiRulesResponse] - describe 'update_rules_0 test' do + describe 'update_rules test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/api/d4c_registration_spec.rb b/spec/api/d4c_registration_spec.rb index f3628e3a..41a4020a 100644 --- a/spec/api/d4c_registration_spec.rb +++ b/spec/api/d4c_registration_spec.rb @@ -98,7 +98,7 @@ # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS account IDs to remove # @option opts [Array] :organization_ids AWS organization IDs to remove - # @return [MsaBaseEntitiesResponse] + # @return [MsaspecResponseFields] describe 'delete_d4_c_aws_account test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -116,19 +116,6 @@ end end - # unit tests for discover_cloud_azure_download_certificate - # Returns JSON object(s) that contain the base64 encoded certificate for a service principal. - # @param tenant_id Azure Tenant ID - # @param [Hash] opts the optional parameters - # @option opts [Boolean] :refresh Setting to true will invalidate the current certificate and generate a new certificate - # @option opts [String] :years_valid Years the certificate should be valid (only used when refresh=true) - # @return [RegistrationAzureDownloadCertificateResponseV1] - describe 'discover_cloud_azure_download_certificate test' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - # unit tests for get_d4_c_aws_account # Returns information about the current status of an AWS account. # @param [Hash] opts the optional parameters diff --git a/spec/api/deployments_spec.rb b/spec/api/deployments_spec.rb new file mode 100644 index 00000000..6d4e793a --- /dev/null +++ b/spec/api/deployments_spec.rb @@ -0,0 +1,65 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::Deployments +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'Deployments' do + before(:all) do + # run before each test + @api_instance = Falcon::Deployments.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of Deployments' do + it 'should create an instance of Deployments' do + expect(@api_instance).to be_instance_of(Falcon::Deployments) + end + end + + # unit tests for get_deployments_external_v1 + # Get deployment resources by ids + # @param authorization authorization header + # @param ids release version ids to retrieve deployment details + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @return [DeploymentsAPIDeploymentViewWrapper] + describe 'get_deployments_external_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/device_content_spec.rb b/spec/api/device_content_spec.rb new file mode 100644 index 00000000..25ab0d8b --- /dev/null +++ b/spec/api/device_content_spec.rb @@ -0,0 +1,77 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::DeviceContent +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'DeviceContent' do + before(:all) do + # run before each test + @api_instance = Falcon::DeviceContent.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of DeviceContent' do + it 'should create an instance of DeviceContent' do + expect(@api_instance).to be_instance_of(Falcon::DeviceContent) + end + end + + # unit tests for entities_states_v1 + # Retrieve the host content state for a number of ids between 1 and 100. + # @param ids The ids of the devices to fetch the content state of. + # @param [Hash] opts the optional parameters + # @return [DevicecontentapiEntitiesResponseV1] + describe 'entities_states_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for queries_states_v1 + # Query for the content state of the host. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The max number of resource ids to return. + # @option opts [String] :sort What field to sort the results on. + # @option opts [Integer] :offset The offset token returned from the previous query. If none was returned, there are no more pages to the result set. + # @option opts [String] :filter The FQL search filter + # @return [DevicecontentapiQueryResponseV1] + describe 'queries_states_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/discover_spec.rb b/spec/api/discover_spec.rb index 875c1f38..1fa37c91 100644 --- a/spec/api/discover_spec.rb +++ b/spec/api/discover_spec.rb @@ -123,6 +123,17 @@ end end + # unit tests for post_external_assets_inventory_v1 + # Add external assets for external asset scanning. + # @param body Asset addition specification. + # @param [Hash] opts the optional parameters + # @return [InventoryapiUserExternalAssetCreateResponseV1] + describe 'post_external_assets_inventory_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for query_accounts # Search for accounts in your environment by providing an FQL (Falcon Query Language) filter and paging details. Returns a set of account IDs which match the filter criteria. # @param [Hash] opts the optional parameters diff --git a/spec/api/drift_indicators_spec.rb b/spec/api/drift_indicators_spec.rb index 5375b1f3..b1ed3fc6 100644 --- a/spec/api/drift_indicators_spec.rb +++ b/spec/api/drift_indicators_spec.rb @@ -52,7 +52,7 @@ # unit tests for get_drift_indicators_values_by_date # Returns the count of Drift Indicators by the date. by default it's for 7 days. # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter drift indicators using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @return [DriftindicatorsDriftIndicatorsFieldValue] describe 'get_drift_indicators_values_by_date test' do @@ -75,7 +75,7 @@ # unit tests for read_drift_indicators_count # Returns the total count of Drift indicators over a time period # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` # @return [DriftindicatorsDriftIndicatorsCountValue] describe 'read_drift_indicators_count test' do it 'should work' do @@ -84,12 +84,12 @@ end # unit tests for search_and_read_drift_indicator_entities - # Retrieve Drift Indicators by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. # @return [DriftindicatorsDriftEntityResponse] describe 'search_and_read_drift_indicator_entities test' do it 'should work' do @@ -98,12 +98,12 @@ end # unit tests for search_drift_indicators - # Retrieve all drift indicators that match the given query + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name + # @option opts [String] :filter Filter Drift Indicators using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cloud_name` - `command_line` - `container_id` - `file_name` - `file_sha256` - `host_id` - `indicator_process_id` - `namespace` - `occurred_at` - `parent_process_id` - `pod_name` - `prevented` - `scheduler_name` - `severity` - `worker_node_name` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. # @return [MsaspecQueryResponse] describe 'search_drift_indicators test' do it 'should work' do diff --git a/spec/api/exposure_management_spec.rb b/spec/api/exposure_management_spec.rb index 2fb0525e..d0d9e938 100644 --- a/spec/api/exposure_management_spec.rb +++ b/spec/api/exposure_management_spec.rb @@ -92,6 +92,7 @@ # @param [Hash] opts the optional parameters # @option opts [Integer] :offset Starting index of result set from which to return subsidiaries # @option opts [Integer] :limit The maximum number of subsidiaries to return in the response. + # @option opts [String] :filter Filter ecosystem subsidiaries # @option opts [String] :sort The field by which to sort the list of subsidiaries. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). # @option opts [String] :version_id The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. # @return [DomainFemEcosystemSubsidiariesEntitiesResponse] @@ -152,6 +153,7 @@ # @param [Hash] opts the optional parameters # @option opts [Integer] :offset Starting index of result set from which to return subsidiaries # @option opts [Integer] :limit The maximum number of IDs to return in the response. + # @option opts [String] :filter Filter ecosystem subsidiaries # @option opts [String] :sort The field by which to sort the list of IDs. Possible values:<ul><li>name</li><li>primary_domain</li></ul></br>Sort order can be specified by appending \"asc\" or \"desc\" to the field name (e.g. \"name|asc\" or \"primary_domain|desc\"). # @option opts [String] :version_id The version ID of the ecosystem subsidiaries data, represented as a hash string. This parameter is required to ensure data consistency and prevent stale data. If a new version of the ecosystem subsidiaries data is written, the version ID will be updated. By including this parameter in the request, the client can ensure that the response will be invalidated if a new version is written. # @return [DomainFemEcosystemSubsidiariesQueryResponse] diff --git a/spec/api/falcon_container_image_spec.rb b/spec/api/falcon_container_image_spec.rb index 0104b039..afe77dda 100644 --- a/spec/api/falcon_container_image_spec.rb +++ b/spec/api/falcon_container_image_spec.rb @@ -84,7 +84,7 @@ # unit tests for launch_export_job # Launch an export job of a Container Security resource. Maximum of 1 job in progress per resource - # @param body Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` + # @param body Supported resources: - `assets.clusters` - `assets.containers` - `assets.deployments` - `assets.images` - `assets.namespaces` - `assets.nodes` - `assets.pods` - `images.images-assessment-detections-expanded` - `images.images-assessment-expanded` - `images.images-assessment-vulnerabilities-expanded` - `images.images-assessment` - `images.images-detections` - `images.packages` - `images.vulnerabilities` - `investigate.container-alerts` - `investigate.drift-indicators` - `investigate.kubernetes-ioms` - `investigate.runtime-detections` - `investigate.unidentified-containers` - `network.events` - `policies.exclusions` # @param [Hash] opts the optional parameters # @return [ExportsLaunchExportResponse] describe 'launch_export_job test' do @@ -96,7 +96,7 @@ # unit tests for query_export_jobs # Query export jobs entities # @param [Hash] opts the optional parameters - # @option opts [String] :filter FQL query specifying the filter parameters. Only the last 100 jobs are returned. Supported filters: - `resource`: (string) - `status`: (string) + # @option opts [String] :filter Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: - `resource` - `status` # @return [MsaspecQueryResponse] describe 'query_export_jobs test' do it 'should work' do @@ -116,11 +116,11 @@ end # unit tests for read_registry_entities - # Retrieve registry entities identified by the customer id + # Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000 # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The field to sort on, e.g. id.desc or id.asc. + # @option opts [String] :sort The fields to sort the records on. # @return [DomainExternalQueryResponse] describe 'read_registry_entities test' do it 'should work' do @@ -129,7 +129,7 @@ end # unit tests for read_registry_entities_by_uuid - # Retrieve the registry entity identified by the entity UUID + # Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100 # @param ids Registry entity UUID # @param [Hash] opts the optional parameters # @return [DomainExternalRegistryListResponse] diff --git a/spec/api/filevantage_spec.rb b/spec/api/filevantage_spec.rb index 22e1fe73..62f809de 100644 --- a/spec/api/filevantage_spec.rb +++ b/spec/api/filevantage_spec.rb @@ -49,13 +49,13 @@ end end - # unit tests for create_policies_0 + # unit tests for create_policies # Creates a new policy of the specified type. New policies are always added at the end of the precedence list for the provided policy type. # After they are created, host and rule groups can be assigned, scheduled exclusions can be defined, and policy precedence can be set. # @param body Create a new policy. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `platform` must be one of `Windows`, `Linux`, or `Mac` Rule and host group assignment and policy precedence setting is performed via their respective patch end-points. # @param [Hash] opts the optional parameters # @return [PoliciesResponse] - describe 'create_policies_0 test' do + describe 'create_policies test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end @@ -345,13 +345,13 @@ end end - # unit tests for update_policies_0 + # unit tests for update_policies # Updates the general information of the provided policy. # Only name, description, and enabled status of the policy is allowed to be update. Rule and host group assignment is performed via their respective patch end points. # @param body Enables updates to the following fields for an existing policy. * `id` of the policy to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `platform` may not be modified after the policy is created. * `enabled` must be one of `true` or `false`. Rule and host group assignment and policy precedence setting is performed via their respective patch end-points. # @param [Hash] opts the optional parameters # @return [PoliciesResponse] - describe 'update_policies_0 test' do + describe 'update_policies test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end @@ -371,14 +371,14 @@ end end - # unit tests for update_policy_precedence_0 + # unit tests for update_policy_precedence # Updates the policy precedence for all policies of a specific type. # Requests that do not represent all ids of the provided policy type will not be processed. # @param ids Precedence of the policies for the provided type in the form of `ids=ID1&ids=ID2` # @param type The policy type for which to set the precedence order, must be one of `Windows`, `Linux` or `Mac`. # @param [Hash] opts the optional parameters # @return [PoliciesPrecedenceResponse] - describe 'update_policy_precedence_0 test' do + describe 'update_policy_precedence test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/api/firewall_management_spec.rb b/spec/api/firewall_management_spec.rb index e7131dbb..6a5b0e38 100644 --- a/spec/api/firewall_management_spec.rb +++ b/spec/api/firewall_management_spec.rb @@ -146,13 +146,13 @@ end end - # unit tests for delete_rule_groups_0 + # unit tests for delete_rule_groups # Delete rule group entities by ID # @param ids The IDs of the rule groups to be deleted # @param [Hash] opts the optional parameters # @option opts [String] :comment Audit log comment for this action # @return [FwmgrApiQueryResponse] - describe 'delete_rule_groups_0 test' do + describe 'delete_rule_groups test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end @@ -226,23 +226,23 @@ end end - # unit tests for get_rule_groups_0 + # unit tests for get_rule_groups # Get rule group entities by ID. These groups do not contain their rule entites, just the rule IDs in precedence order. # @param ids The IDs of the rule groups to retrieve # @param [Hash] opts the optional parameters # @return [FwmgrApiRuleGroupsResponse] - describe 'get_rule_groups_0 test' do + describe 'get_rule_groups test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - # unit tests for get_rules_0 + # unit tests for get_rules # Get rule entities by ID (64-bit unsigned int as decimal string) or Family ID (32-character hexadecimal string) # @param ids The rules to retrieve, identified by ID # @param [Hash] opts the optional parameters # @return [FwmgrApiRulesResponse] - describe 'get_rules_0 test' do + describe 'get_rules test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end @@ -322,7 +322,7 @@ end end - # unit tests for query_rule_groups_0 + # unit tests for query_rule_groups # Find all rule group IDs matching the query with filter # @param [Hash] opts the optional parameters # @option opts [String] :sort Possible order by fields: @@ -332,7 +332,7 @@ # @option opts [String] :after A pagination token used with the `limit` parameter to manage pagination of results. On your first request, don't provide an `after` token. On subsequent requests, provide the `after` token from the previous response to continue from that place in the results. # @option opts [Integer] :limit Number of ids to return. # @return [FwmgrApiQueryResponse] - describe 'query_rule_groups_0 test' do + describe 'query_rule_groups test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/api/host_migration_spec.rb b/spec/api/host_migration_spec.rb index 6afc4f0f..2899a0c2 100644 --- a/spec/api/host_migration_spec.rb +++ b/spec/api/host_migration_spec.rb @@ -69,7 +69,7 @@ # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [Integer] :limit The maximum records to return. [1-10000] # @option opts [String] :sort The property to sort by. - # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: hostname, status, source_cid, id, created_time, groups, hostgroups, static_host_groups, target_cid, migration_id, host_migration_id + # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: groups, static_host_groups, status, target_cid, migration_id, created_time, host_migration_id, hostgroups, hostname, source_cid, id # @return [MsaspecQueryResponse] describe 'get_host_migration_ids_v1 test' do it 'should work' do @@ -107,7 +107,7 @@ # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [Integer] :limit The maximum records to return. [1-10000] # @option opts [String] :sort The property to sort by. - # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: status, migration_status, created_by, created_time, name, id, migration_id, target_cid + # @option opts [String] :filter The filter expression that should be used to limit the results. Valid fields: target_cid, status, migration_status, created_by, created_time, name, id, migration_id # @return [MsaspecQueryResponse] describe 'get_migration_ids_v1 test' do it 'should work' do diff --git a/spec/api/intelligence_indicator_graph_spec.rb b/spec/api/intelligence_indicator_graph_spec.rb new file mode 100644 index 00000000..4919540c --- /dev/null +++ b/spec/api/intelligence_indicator_graph_spec.rb @@ -0,0 +1,66 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::IntelligenceIndicatorGraph +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'IntelligenceIndicatorGraph' do + before(:all) do + # run before each test + @api_instance = Falcon::IntelligenceIndicatorGraph.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of IntelligenceIndicatorGraph' do + it 'should create an instance of IntelligenceIndicatorGraph' do + expect(@api_instance).to be_instance_of(Falcon::IntelligenceIndicatorGraph) + end + end + + # unit tests for search_indicators + # Search indicators based on FQL filter. + # @param x_cs_useruuid User ID. + # @param body + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit Limit + # @option opts [String] :offset Offset + # @return [RestapiIndicatorResponse] + describe 'search_indicators test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/kubernetes_protection_spec.rb b/spec/api/kubernetes_protection_spec.rb index 8036db46..031bf4f1 100644 --- a/spec/api/kubernetes_protection_spec.rb +++ b/spec/api/kubernetes_protection_spec.rb @@ -94,12 +94,12 @@ end # unit tests for find_containers_by_container_run_time_version - # Retrieve containers by container_runtime_version + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [Integer] :limit The upper-bound on the number of container records to retrieve. - # @option opts [Integer] :offset It is used to get the offset - # @option opts [String] :sort Field to sort results by - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsContainerRuntimePivotResponse] describe 'find_containers_by_container_run_time_version test' do it 'should work' do @@ -240,7 +240,7 @@ # unit tests for group_containers_by_managed # Group the containers by Managed # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsContainerCoverageResponseEntity] describe 'group_containers_by_managed test' do it 'should work' do @@ -277,12 +277,12 @@ end # unit tests for read_cluster_combined - # Retrieve kubernetes clusters identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsClusterEntityResponse] describe 'read_cluster_combined test' do it 'should work' do @@ -293,7 +293,7 @@ # unit tests for read_cluster_count # Retrieve cluster counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [CommonCountResponse] describe 'read_cluster_count test' do it 'should work' do @@ -305,7 +305,7 @@ # Retrieve cluster enrichment data # @param cluster_id One or more cluster ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsClusterEnrichmentResponse] describe 'read_cluster_enrichment test' do it 'should work' do @@ -326,7 +326,7 @@ # unit tests for read_clusters_by_kubernetes_version_count # Bucket clusters by kubernetes version # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_clusters_by_kubernetes_version_count test' do it 'should work' do @@ -337,7 +337,7 @@ # unit tests for read_clusters_by_status_count # Bucket clusters by status # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_id,agent_status,agent_type,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,cluster_status,container_count,iar_coverage,kac_agent_id,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @option opts [String] :filter Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filter fields: - `access` - `agent_id` - `agent_status` - `agent_type` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `cluster_status` - `container_count` - `iar_coverage` - `kac_agent_id` - `kubernetes_version` - `last_seen` - `management_status` - `node_count` - `pod_count` - `tags` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_clusters_by_status_count test' do it 'should work' do @@ -346,12 +346,12 @@ end # unit tests for read_container_combined - # Retrieve containers identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsContainerEntityResponse] describe 'read_container_combined test' do it 'should work' do @@ -362,7 +362,7 @@ # unit tests for read_container_count # Retrieve container counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [CommonCountResponse] describe 'read_container_count test' do it 'should work' do @@ -371,9 +371,9 @@ end # unit tests for read_container_count_by_registry - # Retrieve top container image registries + # Retrieves a list with the top container image registries. Maximum page size: 200 # @param [Hash] opts the optional parameters - # @option opts [Boolean] :under_assessment (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered + # @option opts [Boolean] :under_assessment (true/false) whether to return registries under assessment or not under assessment. If not provided all registries are considered # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @return [ModelsAPIFilterResponse] describe 'read_container_count_by_registry test' do @@ -386,7 +386,7 @@ # Retrieve container enrichment data # @param container_id One or more container ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsContainerEnrichmentResponse] describe 'read_container_enrichment test' do it 'should work' do @@ -397,7 +397,7 @@ # unit tests for read_container_image_detections_count_by_date # Retrieve count of image assessment detections on running containers over a period of time # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAPIFilterResponse] describe 'read_container_image_detections_count_by_date test' do it 'should work' do @@ -408,7 +408,7 @@ # unit tests for read_container_images_by_most_used # Bucket container by image-digest # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_container_images_by_most_used test' do it 'should work' do @@ -419,7 +419,7 @@ # unit tests for read_container_images_by_state # Retrieve count of image states running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filters: cid + # @option opts [String] :filter Filter using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` # @return [ModelsAPIFilterResponse] describe 'read_container_images_by_state test' do it 'should work' do @@ -430,7 +430,7 @@ # unit tests for read_container_vulnerabilities_by_severity_count # Retrieve container vulnerabilities by severity counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Get vulnerabilities count by severity for container using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_container_vulnerabilities_by_severity_count test' do it 'should work' do @@ -441,7 +441,7 @@ # unit tests for read_containers_by_date_range_count # Retrieve containers by date range counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Get container counts using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Get container counts using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_containers_by_date_range_count test' do it 'should work' do @@ -452,7 +452,7 @@ # unit tests for read_containers_sensor_coverage # Bucket containers by agent type and calculate sensor coverage # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_containers_sensor_coverage test' do it 'should work' do @@ -461,12 +461,12 @@ end # unit tests for read_deployment_combined - # Retrieve kubernetes deployments identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsDeploymentEntityResponse] describe 'read_deployment_combined test' do it 'should work' do @@ -477,7 +477,7 @@ # unit tests for read_deployment_count # Retrieve deployment counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,deployment_id,deployment_name,deployment_status,first_seen,kac_agent_id,last_seen,namespace,pod_count,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `deployment_id` - `deployment_name` - `deployment_status` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace` - `pod_count` - `resource_status` # @return [CommonCountResponse] describe 'read_deployment_count test' do it 'should work' do @@ -489,7 +489,7 @@ # Retrieve deployment enrichment data # @param deployment_id One or more deployment ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsDeploymentEnrichmentResponse] describe 'read_deployment_enrichment test' do it 'should work' do @@ -510,7 +510,7 @@ # unit tests for read_distinct_container_image_count # Retrieve count of distinct images running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Search Kubernetes containers using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAPIFilterResponse] describe 'read_distinct_container_image_count test' do it 'should work' do @@ -521,7 +521,7 @@ # unit tests for read_kubernetes_iom_by_date_range # Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + # @option opts [String] :filter Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` # @return [K8siomsKubernetesIOMFieldValue] describe 'read_kubernetes_iom_by_date_range test' do it 'should work' do @@ -532,7 +532,7 @@ # unit tests for read_kubernetes_iom_count # Returns the total count of Kubernetes IOMs over the past seven days # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,prevented,severity + # @option opts [String] :filter Filter Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `created_timestamp` - `detect_timestamp` - `prevented` - `severity` # @return [K8siomsKubernetesIOMCountValue] describe 'read_kubernetes_iom_count test' do it 'should work' do @@ -554,7 +554,7 @@ # unit tests for read_namespace_count # Retrieve namespace counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,first_seen,kac_agent_id,last_seen,namespace_id,namespace_name,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes namespaces that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `first_seen` - `kac_agent_id` - `last_seen` - `namespace_id` - `namespace_name` - `resource_status` # @return [CommonCountResponse] describe 'read_namespace_count test' do it 'should work' do @@ -573,12 +573,12 @@ end # unit tests for read_node_combined - # Retrieve kubernetes nodes identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsNodeEntityResponse] describe 'read_node_combined test' do it 'should work' do @@ -589,7 +589,7 @@ # unit tests for read_node_count # Retrieve node counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [CommonCountResponse] describe 'read_node_count test' do it 'should work' do @@ -601,7 +601,7 @@ # Retrieve node enrichment data # @param node_name One or more node names for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsNodeEnrichmentResponse] describe 'read_node_enrichment test' do it 'should work' do @@ -612,7 +612,7 @@ # unit tests for read_nodes_by_cloud_count # Bucket nodes by cloud providers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_nodes_by_cloud_count test' do it 'should work' do @@ -623,7 +623,7 @@ # unit tests for read_nodes_by_container_engine_version_count # Bucket nodes by their container engine version # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_nodes_by_container_engine_version_count test' do it 'should work' do @@ -634,7 +634,7 @@ # unit tests for read_nodes_by_date_range_count # Retrieve nodes by date range counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,kac_agent_id,last_seen,linux_sensor_coverage,node_name,pod_count,resource_status + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `container_runtime_version` - `first_seen` - `image_digest` - `ipv4` - `kac_agent_id` - `last_seen` - `linux_sensor_coverage` - `node_name` - `pod_count` - `resource_status` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_nodes_by_date_range_count test' do it 'should work' do @@ -643,12 +643,12 @@ end # unit tests for read_pod_combined - # Retrieve kubernetes pods identified by the provided filter criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user + # @option opts [String] :filter Search Kubernetes pods using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsPodEntityResponse] describe 'read_pod_combined test' do it 'should work' do @@ -659,7 +659,7 @@ # unit tests for read_pod_count # Retrieve pod counts # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_count,first_seen,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,resource_status,root_write_access,run_as_root_group,run_as_root_user + # @option opts [String] :filter Retrieve count of Kubernetes pods that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `annotations_list` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_count` - `first_seen` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `owner_id` - `owner_type` - `pod_external_id` - `pod_id` - `pod_name` - `port` - `privileged` - `resource_status` - `root_write_access` - `run_as_root_group` - `run_as_root_user` # @return [CommonCountResponse] describe 'read_pod_count test' do it 'should work' do @@ -671,7 +671,7 @@ # Retrieve pod enrichment data # @param pod_id One or more pod ids for which to retrieve enrichment info # @param [Hash] opts the optional parameters - # @option opts [String] :filter Supported filters: last_seen + # @option opts [String] :filter Supported filter fields: - `last_seen` # @return [K8sassetsPodEnrichmentResponse] describe 'read_pod_enrichment test' do it 'should work' do @@ -690,12 +690,12 @@ end # unit tests for read_running_container_images - # Retrieve images on running containers + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filters: cid,cluster_id,cluster_name,hosts,image_digest,image_has_been_assessed,image_id,image_name,image_registry,image_repository,image_tag,last_seen,running_status + # @option opts [String] :filter Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cluster_id` - `cluster_name` - `hosts` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_name` - `image_registry` - `image_repository` - `image_tag` - `last_seen` - `running_status` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort Field to sort results by # @return [ModelsContainerImage] describe 'read_running_container_images test' do it 'should work' do @@ -706,7 +706,7 @@ # unit tests for read_vulnerable_container_image_count # Retrieve count of vulnerable images running on containers # @param [Hash] opts the optional parameters - # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filters: agent_id,agent_type,allow_privilege_escalation,cid,cloud_account_id,cloud_name,cloud_region,cloud_service,cluster_id,cluster_name,container_id,container_image_id,container_name,cve_id,detection_name,first_seen,image_detection_count,image_digest,image_has_been_assessed,image_id,image_registry,image_repository,image_tag,image_vulnerability_count,insecure_mount_source,insecure_mount_type,insecure_propagation_mode,interactive_mode,ipv4,ipv6,kac_agent_id,labels,last_seen,namespace,node_name,node_uid,package_name_version,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user,running_status + # @option opts [String] :filter Retrieve count of Kubernetes containers that match a query in Falcon Query Language (FQL). Supported filter fields: - `agent_id` - `agent_type` - `allow_privilege_escalation` - `cid` - `cloud_account_id` - `cloud_instance_id` - `cloud_name` - `cloud_region` - `cloud_service` - `cluster_id` - `cluster_name` - `container_id` - `container_image_id` - `container_name` - `cve_id` - `detection_name` - `first_seen` - `image_detection_count` - `image_digest` - `image_has_been_assessed` - `image_id` - `image_registry` - `image_repository` - `image_tag` - `image_vulnerability_count` - `insecure_mount_source` - `insecure_mount_type` - `insecure_propagation_mode` - `interactive_mode` - `ipv4` - `ipv6` - `kac_agent_id` - `labels` - `last_seen` - `namespace` - `node_name` - `node_uid` - `package_name_version` - `pod_id` - `pod_name` - `port` - `privileged` - `root_write_access` - `run_as_root_group` - `run_as_root_user` - `running_status` # @return [ModelsAPIFilterResponse] describe 'read_vulnerable_container_image_count test' do it 'should work' do @@ -725,12 +725,12 @@ end # unit tests for search_and_read_kubernetes_iom_entities - # Search Kubernetes IOM by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity + # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. # @return [K8siomsKubernetesIOMEntityResponse] describe 'search_and_read_kubernetes_iom_entities test' do it 'should work' do @@ -739,12 +739,12 @@ end # unit tests for search_kubernetes_ioms - # Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filters: cid,cis_id,cluster_id,cluster_name,containers_impacted_count,containers_impacted_ids,detection_type,name,namespace,prevented,resource_id,resource_name,resource_type,severity + # @option opts [String] :filter Search Kubernetes IOMs using a query in Falcon Query Language (FQL). Supported filter fields: - `cid` - `cis_id` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `containers_impacted_ids` - `detection_type` - `name` - `namespace` - `prevented` - `resource_id` - `resource_name` - `resource_type` - `severity` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. # @return [CommonGenericEntityResponseString] describe 'search_kubernetes_ioms test' do it 'should work' do diff --git a/spec/api/lookup_files_spec.rb b/spec/api/lookup_files_spec.rb new file mode 100644 index 00000000..38c2b98b --- /dev/null +++ b/spec/api/lookup_files_spec.rb @@ -0,0 +1,80 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::LookupFiles +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'LookupFiles' do + before(:all) do + # run before each test + @api_instance = Falcon::LookupFiles.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of LookupFiles' do + it 'should create an instance of LookupFiles' do + expect(@api_instance).to be_instance_of(Falcon::LookupFiles) + end + end + + # unit tests for create_file_v1 + # Creates a lookup file + # @param file File to be uploaded + # @param name Name used to identify the file + # @param [Hash] opts the optional parameters + # @option opts [String] :description File description + # @option opts [String] :id Unique identifier of the file being updated. + # @option opts [String] :repo Name of repository or view to save the file + # @return [DomainLookupFileWrapper] + describe 'create_file_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for update_file_v1 + # Updates a lookup file + # @param id Unique identifier of the file being updated. + # @param [Hash] opts the optional parameters + # @option opts [String] :description File description + # @option opts [File] :file File to be uploaded + # @return [DomainLookupFileWrapper] + describe 'update_file_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/release_notes_spec.rb b/spec/api/release_notes_spec.rb new file mode 100644 index 00000000..55d8d665 --- /dev/null +++ b/spec/api/release_notes_spec.rb @@ -0,0 +1,97 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::ReleaseNotes +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ReleaseNotes' do + before(:all) do + # run before each test + @api_instance = Falcon::ReleaseNotes.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of ReleaseNotes' do + it 'should create an instance of ReleaseNotes' do + expect(@api_instance).to be_instance_of(Falcon::ReleaseNotes) + end + end + + # unit tests for combined_release_notes_v1 + # Queries for release-notes resources and returns details + # @param authorization authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [ReleasenotesReleaseNoteWrapperV1] + describe 'combined_release_notes_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for get_entity_ids_by_query_post + # returns the IDs of all entities in the database for the given page + # @param authorization authorization header + # @param body + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @return [ReleasenotesEntitiesGetResponseWrapper] + describe 'get_entity_ids_by_query_post test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for query_release_notes_v1 + # Queries for release-notes resources and returns ids + # @param authorization authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [StringWrapper] + describe 'query_release_notes_v1 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/releases_spec.rb b/spec/api/releases_spec.rb new file mode 100644 index 00000000..881750ed --- /dev/null +++ b/spec/api/releases_spec.rb @@ -0,0 +1,68 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::Releases +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'Releases' do + before(:all) do + # run before each test + @api_instance = Falcon::Releases.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of Releases' do + it 'should create an instance of Releases' do + expect(@api_instance).to be_instance_of(Falcon::Releases) + end + end + + # unit tests for combined_releases_v1_mixin0 + # Queries for releases resources and returns details + # @param authorization authorization header + # @param [Hash] opts the optional parameters + # @option opts [String] :x_cs_username user name + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [Integer] :limit Maximum number of records to return. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [String] :sort Sort items by providing a comma separated list of property and direction (eg name.desc,time.asc). If direction is omitted, defaults to descending. + # @return [ReleasesReleaseWrapper] + describe 'combined_releases_v1_mixin0 test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/runtime_detections_spec.rb b/spec/api/runtime_detections_spec.rb index 67c8a5f7..ab9fccdb 100644 --- a/spec/api/runtime_detections_spec.rb +++ b/spec/api/runtime_detections_spec.rb @@ -50,12 +50,12 @@ end # unit tests for get_runtime_detections_combined_v2 - # Retrieve container runtime detections by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filters: action_taken,aid,cid,cloud,cluster_name,command_line,computer_name,container_id,detect_timestamp,detection_description,detection_id,file_name,file_path,host_id,host_type,image_id,name,namespace,pod_name,severity,tactic + # @option opts [String] :filter Filter Container Runtime Detections using a query in Falcon Query Language (FQL). Supported filter fields: - `agent_type` - `aid` - `cid` - `cloud_name` - `cloud` - `cluster_name` - `computer_name` - `container_id` - `detect_timestamp` - `host_id` - `host_type` - `image_id` - `name` - `namespace` - `pod_name` - `severity` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The field to sort the records on. # @return [RuntimedetectionsDetectionsEntityResponse] describe 'get_runtime_detections_combined_v2 test' do it 'should work' do diff --git a/spec/api/spotlight_vulnerabilities_spec.rb b/spec/api/spotlight_vulnerabilities_spec.rb index 314d1fe5..5fb0502b 100644 --- a/spec/api/spotlight_vulnerabilities_spec.rb +++ b/spec/api/spotlight_vulnerabilities_spec.rb @@ -75,18 +75,18 @@ end end - # unit tests for get_vulnerabilities_0 + # unit tests for get_vulnerabilities # Get details on vulnerabilities by providing one or more IDs # @param ids One or more vulnerability IDs (max: 400). Find vulnerability IDs with GET /spotlight/queries/vulnerabilities/v1 # @param [Hash] opts the optional parameters # @return [DomainSPAPIVulnerabilitiesEntitiesResponseV2] - describe 'get_vulnerabilities_0 test' do + describe 'get_vulnerabilities test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - # unit tests for query_vulnerabilities_0 + # unit tests for query_vulnerabilities # Search for Vulnerabilities in your environment by providing an FQL filter and paging details. Returns a set of Vulnerability IDs which match the filter criteria # @param filter Filter items using a query in Falcon Query Language (FQL). Wildcards * and empty filter values are unsupported. Available filter fields that supports match (~): N/A Available filter fields that supports exact match: aid, cid, last_seen_within, status, cve.id, cve.is_cisa_kev, cve.remediation_level, cve.cps_rating, cve.exprt_rating, cve.exploit_status_to_include, cve.severity, cve.types, host_info.asset_criticality, host_info.asset_roles, host_info.internet_exposure, host_info.tags, host_info.groups, host_info.product_type_desc, host_info.platform_name, suppression_info.is_suppressed, suppression_info.reason Available filter fields that supports wildcard (*): N/A Available filter fields that supports range comparisons (>, <, >=, <=): created_timestamp, closed_timestamp, updated_timestamp # @param [Hash] opts the optional parameters @@ -94,7 +94,7 @@ # @option opts [Integer] :limit The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. # @option opts [String] :sort Sort vulnerabilities by their properties. Available sort options: <ul><li>updated_timestamp|asc/desc</li><li>closed_timestamp|asc</li><li>updated_timestamp|asc/desc</li></ul>. Can be used in a format <field>|asc for ascending order or <field>|desc for descending order. # @return [DomainSPAPIQueryResponse] - describe 'query_vulnerabilities_0 test' do + describe 'query_vulnerabilities test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/api/unidentified_containers_spec.rb b/spec/api/unidentified_containers_spec.rb index 08acbf36..65457e2e 100644 --- a/spec/api/unidentified_containers_spec.rb +++ b/spec/api/unidentified_containers_spec.rb @@ -52,7 +52,7 @@ # unit tests for read_unidentified_containers_by_date_range_count # Returns the count of Unidentified Containers over the last 7 days # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @return [ModelsAggregateValuesByFieldResponse] describe 'read_unidentified_containers_by_date_range_count test' do it 'should work' do @@ -63,7 +63,7 @@ # unit tests for read_unidentified_containers_count # Returns the total count of Unidentified Containers over a time period # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` # @return [UnidentifiedcontainersUnidentifiedContainersCountValue] describe 'read_unidentified_containers_count test' do it 'should work' do @@ -72,12 +72,12 @@ end # unit tests for search_and_read_unidentified_containers - # Search Unidentified Containers by the provided search criteria + # Maximum offset = 10000 - limit # @param [Hash] opts the optional parameters - # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s + # @option opts [String] :filter Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s` + # @option opts [String] :sort The fields to sort the records on. # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. # @option opts [Integer] :offset The offset from where to begin. - # @option opts [String] :sort The fields to sort the records on. # @return [UnidentifiedcontainersUnidentifiedContainerAPIResponse] describe 'search_and_read_unidentified_containers test' do it 'should work' do diff --git a/spec/api/vulnerabilities_spec.rb b/spec/api/vulnerabilities_spec.rb new file mode 100644 index 00000000..dab904ff --- /dev/null +++ b/spec/api/vulnerabilities_spec.rb @@ -0,0 +1,66 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' + +# Unit tests for Falcon::Vulnerabilities +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'Vulnerabilities' do + before(:all) do + # run before each test + @api_instance = Falcon::Vulnerabilities.new + end + + after(:all) do + # run after each test + end + + describe 'test an instance of Vulnerabilities' do + it 'should create an instance of Vulnerabilities' do + expect(@api_instance).to be_instance_of(Falcon::Vulnerabilities) + end + end + + # unit tests for get_combined_vulnerabilities_sarif + # Retrieve all lambda vulnerabilities that match the given query and return in the SARIF format + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Filter lambda vulnerabilities using a query in Falcon Query Language (FQL).Supported filters: application_name,application_name_version,cid,cloud_account_id,cloud_account_name,cloud_provider,cve_id,cvss_base_score,exprt_rating,first_seen_timestamp,function_name,function_resource_id,is_supported,is_valid_asset_id,layer,region,runtime,severity,timestamp,type + # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. + # @option opts [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. Supported columns: [application_name application_name_version cid cloud_account_id cloud_account_name cloud_provider cve_id cvss_base_score exprt_rating first_seen_timestamp function_resource_id is_supported layer region runtime severity timestamp type] + # @return [VulnerabilitiesVulnerabilityEntitySARIFResponse] + describe 'get_combined_vulnerabilities_sarif test' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_create_rule_operation_v1_spec.rb b/spec/models/api_create_rule_operation_v1_spec.rb new file mode 100644 index 00000000..4bd707ce --- /dev/null +++ b/spec/models/api_create_rule_operation_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiCreateRuleOperationV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiCreateRuleOperationV1 do + let(:instance) { Falcon::ApiCreateRuleOperationV1.new } + + describe 'test an instance of ApiCreateRuleOperationV1' do + it 'should create an instance of ApiCreateRuleOperationV1' do + expect(instance).to be_instance_of(Falcon::ApiCreateRuleOperationV1) + end + end + describe 'test attribute "schedule"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "start_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "stop_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_get_entities_rules_response_v1_spec.rb b/spec/models/api_get_entities_rules_response_v1_spec.rb new file mode 100644 index 00000000..a319fb78 --- /dev/null +++ b/spec/models/api_get_entities_rules_response_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiGetEntitiesRulesResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiGetEntitiesRulesResponseV1 do + let(:instance) { Falcon::ApiGetEntitiesRulesResponseV1.new } + + describe 'test an instance of ApiGetEntitiesRulesResponseV1' do + it 'should create an instance of ApiGetEntitiesRulesResponseV1' do + expect(instance).to be_instance_of(Falcon::ApiGetEntitiesRulesResponseV1) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_patch_rule_operation_v1_spec.rb b/spec/models/api_patch_rule_operation_v1_spec.rb new file mode 100644 index 00000000..0cf0f99f --- /dev/null +++ b/spec/models/api_patch_rule_operation_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiPatchRuleOperationV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiPatchRuleOperationV1 do + let(:instance) { Falcon::ApiPatchRuleOperationV1.new } + + describe 'test an instance of ApiPatchRuleOperationV1' do + it 'should create an instance of ApiPatchRuleOperationV1' do + expect(instance).to be_instance_of(Falcon::ApiPatchRuleOperationV1) + end + end + describe 'test attribute "schedule"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "start_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "stop_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_patch_rule_search_v1_spec.rb b/spec/models/api_patch_rule_search_v1_spec.rb new file mode 100644 index 00000000..f2f9d4f4 --- /dev/null +++ b/spec/models/api_patch_rule_search_v1_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiPatchRuleSearchV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiPatchRuleSearchV1 do + let(:instance) { Falcon::ApiPatchRuleSearchV1.new } + + describe 'test an instance of ApiPatchRuleSearchV1' do + it 'should create an instance of ApiPatchRuleSearchV1' do + expect(instance).to be_instance_of(Falcon::ApiPatchRuleSearchV1) + end + end + describe 'test attribute "filter"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "lookback"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "outcome"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "trigger_mode"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_rule_create_request_v1_spec.rb b/spec/models/api_rule_create_request_v1_spec.rb new file mode 100644 index 00000000..4a5df7a4 --- /dev/null +++ b/spec/models/api_rule_create_request_v1_spec.rb @@ -0,0 +1,111 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiRuleCreateRequestV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiRuleCreateRequestV1 do + let(:instance) { Falcon::ApiRuleCreateRequestV1.new } + + describe 'test an instance of ApiRuleCreateRequestV1' do + it 'should create an instance of ApiRuleCreateRequestV1' do + expect(instance).to be_instance_of(Falcon::ApiRuleCreateRequestV1) + end + end + describe 'test attribute "comment"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "customer_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "operation"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "search"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "severity"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tactic"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "technique"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "trigger_on_create"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_rule_operation_v1_spec.rb b/spec/models/api_rule_operation_v1_spec.rb new file mode 100644 index 00000000..99baae22 --- /dev/null +++ b/spec/models/api_rule_operation_v1_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiRuleOperationV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiRuleOperationV1 do + let(:instance) { Falcon::ApiRuleOperationV1.new } + + describe 'test an instance of ApiRuleOperationV1' do + it 'should create an instance of ApiRuleOperationV1' do + expect(instance).to be_instance_of(Falcon::ApiRuleOperationV1) + end + end + describe 'test attribute "expiration_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "schedule"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "start_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "stop_on"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_rule_patch_request_v1_spec.rb b/spec/models/api_rule_patch_request_v1_spec.rb new file mode 100644 index 00000000..1c06d9ea --- /dev/null +++ b/spec/models/api_rule_patch_request_v1_spec.rb @@ -0,0 +1,99 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiRulePatchRequestV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiRulePatchRequestV1 do + let(:instance) { Falcon::ApiRulePatchRequestV1.new } + + describe 'test an instance of ApiRulePatchRequestV1' do + it 'should create an instance of ApiRulePatchRequestV1' do + expect(instance).to be_instance_of(Falcon::ApiRulePatchRequestV1) + end + end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "operation"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "search"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "severity"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tactic"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "technique"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_rule_schedule_v1_patch_spec.rb b/spec/models/api_rule_schedule_v1_patch_spec.rb new file mode 100644 index 00000000..677df891 --- /dev/null +++ b/spec/models/api_rule_schedule_v1_patch_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiRuleScheduleV1Patch +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiRuleScheduleV1Patch do + let(:instance) { Falcon::ApiRuleScheduleV1Patch.new } + + describe 'test an instance of ApiRuleScheduleV1Patch' do + it 'should create an instance of ApiRuleScheduleV1Patch' do + expect(instance).to be_instance_of(Falcon::ApiRuleScheduleV1Patch) + end + end + describe 'test attribute "definition"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_rule_schedule_v1_spec.rb b/spec/models/api_rule_schedule_v1_spec.rb new file mode 100644 index 00000000..f5a8cedc --- /dev/null +++ b/spec/models/api_rule_schedule_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiRuleScheduleV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiRuleScheduleV1 do + let(:instance) { Falcon::ApiRuleScheduleV1.new } + + describe 'test an instance of ApiRuleScheduleV1' do + it 'should create an instance of ApiRuleScheduleV1' do + expect(instance).to be_instance_of(Falcon::ApiRuleScheduleV1) + end + end + describe 'test attribute "definition"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_rule_search_v1_spec.rb b/spec/models/api_rule_search_v1_spec.rb new file mode 100644 index 00000000..affb4d86 --- /dev/null +++ b/spec/models/api_rule_search_v1_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ApiRuleSearchV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiRuleSearchV1 do + let(:instance) { Falcon::ApiRuleSearchV1.new } + + describe 'test an instance of ApiRuleSearchV1' do + it 'should create an instance of ApiRuleSearchV1' do + expect(instance).to be_instance_of(Falcon::ApiRuleSearchV1) + end + end + describe 'test attribute "filter"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "lookback"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "outcome"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "trigger_mode"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/api_rule_v1_spec.rb b/spec/models/api_rule_v1_spec.rb index 6cfd6391..4af5bc04 100644 --- a/spec/models/api_rule_v1_spec.rb +++ b/spec/models/api_rule_v1_spec.rb @@ -42,7 +42,7 @@ expect(instance).to be_instance_of(Falcon::ApiRuleV1) end end - describe 'test attribute "action_label"' do + describe 'test attribute "api_client_id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end @@ -54,18 +54,6 @@ end end - describe 'test attribute "committed_on"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "created_by"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - describe 'test attribute "created_on"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -78,103 +66,97 @@ end end - describe 'test attribute "deleted"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - describe 'test attribute "description"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "disposition_id"' do + describe 'test attribute "id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "enabled"' do + describe 'test attribute "last_updated_on"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "field_values"' do + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "instance_id"' do + describe 'test attribute "operation"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "instance_version"' do + describe 'test attribute "rule_id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "magic_cookie"' do + describe 'test attribute "search"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "modified_by"' do + describe 'test attribute "severity"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "modified_on"' do + describe 'test attribute "state"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "name"' do + describe 'test attribute "status"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "pattern_id"' do + describe 'test attribute "tactic"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "pattern_severity"' do + describe 'test attribute "technique"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "rulegroup_id"' do + describe 'test attribute "template_id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "ruletype_id"' do + describe 'test attribute "user_id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "ruletype_name"' do + describe 'test attribute "user_uuid"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "version_ids"' do + describe 'test attribute "version"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/models/apidomain_saved_search_execute_request_v1_spec.rb b/spec/models/apidomain_saved_search_execute_request_v1_spec.rb index 11e98df1..55207299 100644 --- a/spec/models/apidomain_saved_search_execute_request_v1_spec.rb +++ b/spec/models/apidomain_saved_search_execute_request_v1_spec.rb @@ -42,48 +42,12 @@ expect(instance).to be_instance_of(Falcon::ApidomainSavedSearchExecuteRequestV1) end end - describe 'test attribute "extra_rename"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "extra_search"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "extra_sort"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "extra_where"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - - describe 'test attribute "parameters"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - describe 'test attribute "_end"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "fql_statements"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - describe 'test attribute "id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/assets_get_resource_ids_response_spec.rb b/spec/models/assets_get_resource_ids_response_spec.rb new file mode 100644 index 00000000..db942999 --- /dev/null +++ b/spec/models/assets_get_resource_ids_response_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::AssetsGetResourceIDsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::AssetsGetResourceIDsResponse do + let(:instance) { Falcon::AssetsGetResourceIDsResponse.new } + + describe 'test an instance of AssetsGetResourceIDsResponse' do + it 'should create an instance of AssetsGetResourceIDsResponse' do + expect(instance).to be_instance_of(Falcon::AssetsGetResourceIDsResponse) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/assets_get_resources_response_spec.rb b/spec/models/assets_get_resources_response_spec.rb new file mode 100644 index 00000000..0f0a73c8 --- /dev/null +++ b/spec/models/assets_get_resources_response_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::AssetsGetResourcesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::AssetsGetResourcesResponse do + let(:instance) { Falcon::AssetsGetResourcesResponse.new } + + describe 'test an instance of AssetsGetResourcesResponse' do + it 'should create an instance of AssetsGetResourcesResponse' do + expect(instance).to be_instance_of(Falcon::AssetsGetResourcesResponse) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/base_set_content_update_policy_precedence_req_v1_spec.rb b/spec/models/base_set_content_update_policy_precedence_req_v1_spec.rb new file mode 100644 index 00000000..59073c32 --- /dev/null +++ b/spec/models/base_set_content_update_policy_precedence_req_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1 do + let(:instance) { Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1.new } + + describe 'test an instance of BaseSetContentUpdatePolicyPrecedenceReqV1' do + it 'should create an instance of BaseSetContentUpdatePolicyPrecedenceReqV1' do + expect(instance).to be_instance_of(Falcon::BaseSetContentUpdatePolicyPrecedenceReqV1) + end + end + describe 'test attribute "ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/content_update_create_policies_req_v1_spec.rb b/spec/models/content_update_create_policies_req_v1_spec.rb new file mode 100644 index 00000000..39ad92ca --- /dev/null +++ b/spec/models/content_update_create_policies_req_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ContentUpdateCreatePoliciesReqV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ContentUpdateCreatePoliciesReqV1 do + let(:instance) { Falcon::ContentUpdateCreatePoliciesReqV1.new } + + describe 'test an instance of ContentUpdateCreatePoliciesReqV1' do + it 'should create an instance of ContentUpdateCreatePoliciesReqV1' do + expect(instance).to be_instance_of(Falcon::ContentUpdateCreatePoliciesReqV1) + end + end + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/content_update_create_policy_req_v1_spec.rb b/spec/models/content_update_create_policy_req_v1_spec.rb new file mode 100644 index 00000000..05227adc --- /dev/null +++ b/spec/models/content_update_create_policy_req_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ContentUpdateCreatePolicyReqV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ContentUpdateCreatePolicyReqV1 do + let(:instance) { Falcon::ContentUpdateCreatePolicyReqV1.new } + + describe 'test an instance of ContentUpdateCreatePolicyReqV1' do + it 'should create an instance of ContentUpdateCreatePolicyReqV1' do + expect(instance).to be_instance_of(Falcon::ContentUpdateCreatePolicyReqV1) + end + end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "settings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/content_update_ring_assignment_settings_v1_spec.rb b/spec/models/content_update_ring_assignment_settings_v1_spec.rb new file mode 100644 index 00000000..d817338e --- /dev/null +++ b/spec/models/content_update_ring_assignment_settings_v1_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ContentUpdateRingAssignmentSettingsV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ContentUpdateRingAssignmentSettingsV1 do + let(:instance) { Falcon::ContentUpdateRingAssignmentSettingsV1.new } + + describe 'test an instance of ContentUpdateRingAssignmentSettingsV1' do + it 'should create an instance of ContentUpdateRingAssignmentSettingsV1' do + expect(instance).to be_instance_of(Falcon::ContentUpdateRingAssignmentSettingsV1) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ring_assignment"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/content_update_settings_v1_spec.rb b/spec/models/content_update_settings_v1_spec.rb new file mode 100644 index 00000000..628f6744 --- /dev/null +++ b/spec/models/content_update_settings_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ContentUpdateSettingsV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ContentUpdateSettingsV1 do + let(:instance) { Falcon::ContentUpdateSettingsV1.new } + + describe 'test an instance of ContentUpdateSettingsV1' do + it 'should create an instance of ContentUpdateSettingsV1' do + expect(instance).to be_instance_of(Falcon::ContentUpdateSettingsV1) + end + end + describe 'test attribute "ring_assignment_settings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/content_update_update_policies_req_v1_spec.rb b/spec/models/content_update_update_policies_req_v1_spec.rb new file mode 100644 index 00000000..13c5d8c8 --- /dev/null +++ b/spec/models/content_update_update_policies_req_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ContentUpdateUpdatePoliciesReqV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ContentUpdateUpdatePoliciesReqV1 do + let(:instance) { Falcon::ContentUpdateUpdatePoliciesReqV1.new } + + describe 'test an instance of ContentUpdateUpdatePoliciesReqV1' do + it 'should create an instance of ContentUpdateUpdatePoliciesReqV1' do + expect(instance).to be_instance_of(Falcon::ContentUpdateUpdatePoliciesReqV1) + end + end + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/content_update_update_policy_req_v1_spec.rb b/spec/models/content_update_update_policy_req_v1_spec.rb new file mode 100644 index 00000000..aacd384c --- /dev/null +++ b/spec/models/content_update_update_policy_req_v1_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ContentUpdateUpdatePolicyReqV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ContentUpdateUpdatePolicyReqV1 do + let(:instance) { Falcon::ContentUpdateUpdatePolicyReqV1.new } + + describe 'test an instance of ContentUpdateUpdatePolicyReqV1' do + it 'should create an instance of ContentUpdateUpdatePolicyReqV1' do + expect(instance).to be_instance_of(Falcon::ContentUpdateUpdatePolicyReqV1) + end + end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "settings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/dataclassifications_label_spec.rb b/spec/models/dataclassifications_label_spec.rb new file mode 100644 index 00000000..81ac9997 --- /dev/null +++ b/spec/models/dataclassifications_label_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DataclassificationsLabel +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DataclassificationsLabel do + let(:instance) { Falcon::DataclassificationsLabel.new } + + describe 'test an instance of DataclassificationsLabel' do + it 'should create an instance of DataclassificationsLabel' do + expect(instance).to be_instance_of(Falcon::DataclassificationsLabel) + end + end + describe 'test attribute "label_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "label_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_seen"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/dataclassifications_response_spec.rb b/spec/models/dataclassifications_response_spec.rb new file mode 100644 index 00000000..577b7430 --- /dev/null +++ b/spec/models/dataclassifications_response_spec.rb @@ -0,0 +1,75 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DataclassificationsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DataclassificationsResponse do + let(:instance) { Falcon::DataclassificationsResponse.new } + + describe 'test an instance of DataclassificationsResponse' do + it 'should create an instance of DataclassificationsResponse' do + expect(instance).to be_instance_of(Falcon::DataclassificationsResponse) + end + end + describe 'test attribute "found"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "labels"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_updated"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "scanned"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/dataclassifications_tag_spec.rb b/spec/models/dataclassifications_tag_spec.rb new file mode 100644 index 00000000..dd30b51b --- /dev/null +++ b/spec/models/dataclassifications_tag_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DataclassificationsTag +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DataclassificationsTag do + let(:instance) { Falcon::DataclassificationsTag.new } + + describe 'test an instance of DataclassificationsTag' do + it 'should create an instance of DataclassificationsTag' do + expect(instance).to be_instance_of(Falcon::DataclassificationsTag) + end + end + describe 'test attribute "labels"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_seen"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tag_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tag_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/deployments_api_deployment_ring_view_spec.rb b/spec/models/deployments_api_deployment_ring_view_spec.rb new file mode 100644 index 00000000..0aaa96ef --- /dev/null +++ b/spec/models/deployments_api_deployment_ring_view_spec.rb @@ -0,0 +1,87 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DeploymentsAPIDeploymentRingView +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DeploymentsAPIDeploymentRingView do + let(:instance) { Falcon::DeploymentsAPIDeploymentRingView.new } + + describe 'test an instance of DeploymentsAPIDeploymentRingView' do + it 'should create an instance of DeploymentsAPIDeploymentRingView' do + expect(instance).to be_instance_of(Falcon::DeploymentsAPIDeploymentRingView) + end + end + describe 'test attribute "complete_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "gates"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ramping_schedule"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "start_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "threshold"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/deployments_api_deployment_view_spec.rb b/spec/models/deployments_api_deployment_view_spec.rb new file mode 100644 index 00000000..223c2568 --- /dev/null +++ b/spec/models/deployments_api_deployment_view_spec.rb @@ -0,0 +1,93 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DeploymentsAPIDeploymentView +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DeploymentsAPIDeploymentView do + let(:instance) { Falcon::DeploymentsAPIDeploymentView.new } + + describe 'test an instance of DeploymentsAPIDeploymentView' do + it 'should create an instance of DeploymentsAPIDeploymentView' do + expect(instance).to be_instance_of(Falcon::DeploymentsAPIDeploymentView) + end + end + describe 'test attribute "complete_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "modified_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "modified_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "rings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "start_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "template_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/deployments_api_deployment_view_wrapper_spec.rb b/spec/models/deployments_api_deployment_view_wrapper_spec.rb new file mode 100644 index 00000000..635026ee --- /dev/null +++ b/spec/models/deployments_api_deployment_view_wrapper_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DeploymentsAPIDeploymentViewWrapper +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DeploymentsAPIDeploymentViewWrapper do + let(:instance) { Falcon::DeploymentsAPIDeploymentViewWrapper.new } + + describe 'test an instance of DeploymentsAPIDeploymentViewWrapper' do + it 'should create an instance of DeploymentsAPIDeploymentViewWrapper' do + expect(instance).to be_instance_of(Falcon::DeploymentsAPIDeploymentViewWrapper) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/detectsapi_post_combined_alerts_v1_meta_spec.rb b/spec/models/detectsapi_post_combined_alerts_v1_meta_spec.rb new file mode 100644 index 00000000..1c0606d3 --- /dev/null +++ b/spec/models/detectsapi_post_combined_alerts_v1_meta_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DetectsapiPostCombinedAlertsV1Meta +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiPostCombinedAlertsV1Meta do + let(:instance) { Falcon::DetectsapiPostCombinedAlertsV1Meta.new } + + describe 'test an instance of DetectsapiPostCombinedAlertsV1Meta' do + it 'should create an instance of DetectsapiPostCombinedAlertsV1Meta' do + expect(instance).to be_instance_of(Falcon::DetectsapiPostCombinedAlertsV1Meta) + end + end + describe 'test attribute "pagination"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "powered_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "query_time"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "trace_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/detectsapi_post_combined_alerts_v1_paging_spec.rb b/spec/models/detectsapi_post_combined_alerts_v1_paging_spec.rb new file mode 100644 index 00000000..2861a04d --- /dev/null +++ b/spec/models/detectsapi_post_combined_alerts_v1_paging_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DetectsapiPostCombinedAlertsV1Paging +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiPostCombinedAlertsV1Paging do + let(:instance) { Falcon::DetectsapiPostCombinedAlertsV1Paging.new } + + describe 'test an instance of DetectsapiPostCombinedAlertsV1Paging' do + it 'should create an instance of DetectsapiPostCombinedAlertsV1Paging' do + expect(instance).to be_instance_of(Falcon::DetectsapiPostCombinedAlertsV1Paging) + end + end + describe 'test attribute "after"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "limit"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "total"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/detectsapi_post_combined_alerts_v1_request_swagger_spec.rb b/spec/models/detectsapi_post_combined_alerts_v1_request_swagger_spec.rb new file mode 100644 index 00000000..04ee9a87 --- /dev/null +++ b/spec/models/detectsapi_post_combined_alerts_v1_request_swagger_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger do + let(:instance) { Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger.new } + + describe 'test an instance of DetectsapiPostCombinedAlertsV1RequestSwagger' do + it 'should create an instance of DetectsapiPostCombinedAlertsV1RequestSwagger' do + expect(instance).to be_instance_of(Falcon::DetectsapiPostCombinedAlertsV1RequestSwagger) + end + end + describe 'test attribute "after"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "filter"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "limit"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sort"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/detectsapi_post_combined_alerts_v1_response_swagger_spec.rb b/spec/models/detectsapi_post_combined_alerts_v1_response_swagger_spec.rb new file mode 100644 index 00000000..99534b7b --- /dev/null +++ b/spec/models/detectsapi_post_combined_alerts_v1_response_swagger_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger do + let(:instance) { Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger.new } + + describe 'test an instance of DetectsapiPostCombinedAlertsV1ResponseSwagger' do + it 'should create an instance of DetectsapiPostCombinedAlertsV1ResponseSwagger' do + expect(instance).to be_instance_of(Falcon::DetectsapiPostCombinedAlertsV1ResponseSwagger) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/device_control_usb_class_exceptions_req_v1_spec.rb b/spec/models/device_control_usb_class_exceptions_req_v1_spec.rb index 71beb5c1..9c0372b2 100644 --- a/spec/models/device_control_usb_class_exceptions_req_v1_spec.rb +++ b/spec/models/device_control_usb_class_exceptions_req_v1_spec.rb @@ -45,7 +45,7 @@ describe 'test attribute "action"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "READ_ONLY", "BLOCK_EXECUTE"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "BLOCK_EXECUTE", "READ_ONLY", "BLOCK_EXECUTE"]) # validator.allowable_values.each do |value| # expect { instance.action = value }.not_to raise_error # end diff --git a/spec/models/device_control_usb_class_exceptions_response_spec.rb b/spec/models/device_control_usb_class_exceptions_response_spec.rb index 0b6e8e58..324329e9 100644 --- a/spec/models/device_control_usb_class_exceptions_response_spec.rb +++ b/spec/models/device_control_usb_class_exceptions_response_spec.rb @@ -45,7 +45,7 @@ describe 'test attribute "action"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "READ_ONLY", "BLOCK_EXECUTE"]) + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["FULL_ACCESS", "FULL_BLOCK", "BLOCK_EXECUTE", "READ_ONLY", "BLOCK_EXECUTE"]) # validator.allowable_values.each do |value| # expect { instance.action = value }.not_to raise_error # end diff --git a/spec/models/devicecontent_content_category_spec.rb b/spec/models/devicecontent_content_category_spec.rb new file mode 100644 index 00000000..be4f85e4 --- /dev/null +++ b/spec/models/devicecontent_content_category_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DevicecontentContentCategory +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DevicecontentContentCategory do + let(:instance) { Falcon::DevicecontentContentCategory.new } + + describe 'test an instance of DevicecontentContentCategory' do + it 'should create an instance of DevicecontentContentCategory' do + expect(instance).to be_instance_of(Falcon::DevicecontentContentCategory) + end + end + describe 'test attribute "last_update"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/devicecontent_state_spec.rb b/spec/models/devicecontent_state_spec.rb new file mode 100644 index 00000000..97ee60e2 --- /dev/null +++ b/spec/models/devicecontent_state_spec.rb @@ -0,0 +1,117 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DevicecontentState +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DevicecontentState do + let(:instance) { Falcon::DevicecontentState.new } + + describe 'test an instance of DevicecontentState' do + it 'should create an instance of DevicecontentState' do + expect(instance).to be_instance_of(Falcon::DevicecontentState) + end + end + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "device_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "groups"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hidden_status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hostname"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_seen"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "platform_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "rapid_response_content"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reduced_functionality_mode"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sensor_operations"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "system_critical"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "vulnerability_management"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/devicecontentapi_entities_response_v1_spec.rb b/spec/models/devicecontentapi_entities_response_v1_spec.rb new file mode 100644 index 00000000..b0328b09 --- /dev/null +++ b/spec/models/devicecontentapi_entities_response_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DevicecontentapiEntitiesResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DevicecontentapiEntitiesResponseV1 do + let(:instance) { Falcon::DevicecontentapiEntitiesResponseV1.new } + + describe 'test an instance of DevicecontentapiEntitiesResponseV1' do + it 'should create an instance of DevicecontentapiEntitiesResponseV1' do + expect(instance).to be_instance_of(Falcon::DevicecontentapiEntitiesResponseV1) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/devicecontentapi_query_response_v1_spec.rb b/spec/models/devicecontentapi_query_response_v1_spec.rb new file mode 100644 index 00000000..4b90ca07 --- /dev/null +++ b/spec/models/devicecontentapi_query_response_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DevicecontentapiQueryResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DevicecontentapiQueryResponseV1 do + let(:instance) { Falcon::DevicecontentapiQueryResponseV1.new } + + describe 'test an instance of DevicecontentapiQueryResponseV1' do + it 'should create an instance of DevicecontentapiQueryResponseV1' do + expect(instance).to be_instance_of(Falcon::DevicecontentapiQueryResponseV1) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/domain_aws_account_resource_metadata_spec.rb b/spec/models/domain_aws_account_resource_metadata_spec.rb index 65961794..e66fb65a 100644 --- a/spec/models/domain_aws_account_resource_metadata_spec.rb +++ b/spec/models/domain_aws_account_resource_metadata_spec.rb @@ -42,6 +42,30 @@ expect(instance).to be_instance_of(Falcon::DomainAWSAccountResourceMetadata) end end + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "deleted_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "aws_cloudtrail_bucket_name"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -60,6 +84,12 @@ end end + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "eventbus_name"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_benchmark_spec.rb b/spec/models/domain_benchmark_spec.rb index 00018a30..7fe4778e 100644 --- a/spec/models/domain_benchmark_spec.rb +++ b/spec/models/domain_benchmark_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::DomainBenchmark) end end + describe 'test attribute "applicable_profiles"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "benchmark_short"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_content_update_policy_resp_v1_spec.rb b/spec/models/domain_content_update_policy_resp_v1_spec.rb new file mode 100644 index 00000000..3a91dc46 --- /dev/null +++ b/spec/models/domain_content_update_policy_resp_v1_spec.rb @@ -0,0 +1,153 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DomainContentUpdatePolicyRespV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainContentUpdatePolicyRespV1 do + let(:instance) { Falcon::DomainContentUpdatePolicyRespV1.new } + + describe 'test an instance of DomainContentUpdatePolicyRespV1' do + it 'should create an instance of DomainContentUpdatePolicyRespV1' do + expect(instance).to be_instance_of(Falcon::DomainContentUpdatePolicyRespV1) + end + end + describe 'test attribute "assignment_rule"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "assignment_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "channel_version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "enabled"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "groups"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "modified_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "modified_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "platform_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "platform_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "precedence"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "settings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "settings_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/domain_content_update_settings_v1_spec.rb b/spec/models/domain_content_update_settings_v1_spec.rb new file mode 100644 index 00000000..464d20ca --- /dev/null +++ b/spec/models/domain_content_update_settings_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DomainContentUpdateSettingsV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainContentUpdateSettingsV1 do + let(:instance) { Falcon::DomainContentUpdateSettingsV1.new } + + describe 'test an instance of DomainContentUpdateSettingsV1' do + it 'should create an instance of DomainContentUpdateSettingsV1' do + expect(instance).to be_instance_of(Falcon::DomainContentUpdateSettingsV1) + end + end + describe 'test attribute "ring_assignment_settings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/domain_discover_api_active_discovery_host_spec.rb b/spec/models/domain_discover_api_active_discovery_host_spec.rb index d2323c98..fdf245fd 100644 --- a/spec/models/domain_discover_api_active_discovery_host_spec.rb +++ b/spec/models/domain_discover_api_active_discovery_host_spec.rb @@ -42,6 +42,18 @@ expect(instance).to be_instance_of(Falcon::DomainDiscoverAPIActiveDiscoveryHost) end end + describe 'test attribute "last_seen_network_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_seen_site_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "networks"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_discover_api_application_host_spec.rb b/spec/models/domain_discover_api_application_host_spec.rb index 2c211d23..a71abe14 100644 --- a/spec/models/domain_discover_api_application_host_spec.rb +++ b/spec/models/domain_discover_api_application_host_spec.rb @@ -126,6 +126,12 @@ end end + describe 'test attribute "ous"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "platform_name"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_discover_api_host_spec.rb b/spec/models/domain_discover_api_host_spec.rb index 7eccb729..0284efa8 100644 --- a/spec/models/domain_discover_api_host_spec.rb +++ b/spec/models/domain_discover_api_host_spec.rb @@ -60,6 +60,12 @@ end end + describe 'test attribute "ad_virtual_server"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "agent_version"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -204,6 +210,12 @@ end end + describe 'test attribute "composite_internet_exposure"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "computed_asset_roles"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -720,6 +732,12 @@ end end + describe 'test attribute "ous"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "override_asset_roles"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_discover_apiio_t_host_spec.rb b/spec/models/domain_discover_apiio_t_host_spec.rb index caccc6e0..7e457879 100644 --- a/spec/models/domain_discover_apiio_t_host_spec.rb +++ b/spec/models/domain_discover_apiio_t_host_spec.rb @@ -54,6 +54,12 @@ end end + describe 'test attribute "ad_virtual_server"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "agent_version"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -162,6 +168,12 @@ end end + describe 'test attribute "composite_internet_exposure"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "computed_asset_roles"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -672,6 +684,12 @@ end end + describe 'test attribute "ous"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "override_asset_roles"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_kestrel_params_spec.rb b/spec/models/domain_kestrel_params_spec.rb new file mode 100644 index 00000000..237646bf --- /dev/null +++ b/spec/models/domain_kestrel_params_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DomainKestrelParams +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainKestrelParams do + let(:instance) { Falcon::DomainKestrelParams.new } + + describe 'test an instance of DomainKestrelParams' do + it 'should create an instance of DomainKestrelParams' do + expect(instance).to be_instance_of(Falcon::DomainKestrelParams) + end + end + describe 'test attribute "view_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/domain_lookup_file_spec.rb b/spec/models/domain_lookup_file_spec.rb new file mode 100644 index 00000000..9f4185c1 --- /dev/null +++ b/spec/models/domain_lookup_file_spec.rb @@ -0,0 +1,147 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DomainLookupFile +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainLookupFile do + let(:instance) { Falcon::DomainLookupFile.new } + + describe 'test an instance of DomainLookupFile' do + it 'should create an instance of DomainLookupFile' do + expect(instance).to be_instance_of(Falcon::DomainLookupFile) + end + end + describe 'test attribute "app_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "contents_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "filename"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "format"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_modified_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_modified_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "repo"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "size"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version_numeric"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/domain_lookup_file_wrapper_spec.rb b/spec/models/domain_lookup_file_wrapper_spec.rb new file mode 100644 index 00000000..41e4382f --- /dev/null +++ b/spec/models/domain_lookup_file_wrapper_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DomainLookupFileWrapper +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainLookupFileWrapper do + let(:instance) { Falcon::DomainLookupFileWrapper.new } + + describe 'test an instance of DomainLookupFileWrapper' do + it 'should create an instance of DomainLookupFileWrapper' do + expect(instance).to be_instance_of(Falcon::DomainLookupFileWrapper) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/domain_report_metadata_spec.rb b/spec/models/domain_report_metadata_spec.rb index 002c558e..b21b3e25 100644 --- a/spec/models/domain_report_metadata_spec.rb +++ b/spec/models/domain_report_metadata_spec.rb @@ -60,6 +60,12 @@ end end + describe 'test attribute "kestrel_params"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "last_scheduled_execution"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_ring_assignment_settings_v1_spec.rb b/spec/models/domain_ring_assignment_settings_v1_spec.rb new file mode 100644 index 00000000..2247b2b1 --- /dev/null +++ b/spec/models/domain_ring_assignment_settings_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DomainRingAssignmentSettingsV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainRingAssignmentSettingsV1 do + let(:instance) { Falcon::DomainRingAssignmentSettingsV1.new } + + describe 'test an instance of DomainRingAssignmentSettingsV1' do + it 'should create an instance of DomainRingAssignmentSettingsV1' do + expect(instance).to be_instance_of(Falcon::DomainRingAssignmentSettingsV1) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "override"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ring_assignment"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/domain_scheduled_report_v1_spec.rb b/spec/models/domain_scheduled_report_v1_spec.rb index 77ac2f5c..2a138aa6 100644 --- a/spec/models/domain_scheduled_report_v1_spec.rb +++ b/spec/models/domain_scheduled_report_v1_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::DomainScheduledReportV1) end end + describe 'test attribute "api_client_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "can_write"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/domain_update_rule_request_v1_spec.rb b/spec/models/domain_update_rule_request_v1_spec.rb index 7a34b49d..d9e5dacb 100644 --- a/spec/models/domain_update_rule_request_v1_spec.rb +++ b/spec/models/domain_update_rule_request_v1_spec.rb @@ -66,6 +66,12 @@ end end + describe 'test attribute "match_on_tsq_result_types"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "name"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/figapi_adversary_spec.rb b/spec/models/figapi_adversary_spec.rb new file mode 100644 index 00000000..27465a89 --- /dev/null +++ b/spec/models/figapi_adversary_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiAdversary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiAdversary do + let(:instance) { Falcon::FigapiAdversary.new } + + describe 'test an instance of FigapiAdversary' do + it 'should create an instance of FigapiAdversary' do + expect(instance).to be_instance_of(Falcon::FigapiAdversary) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_country_spec.rb b/spec/models/figapi_country_spec.rb new file mode 100644 index 00000000..252c5a85 --- /dev/null +++ b/spec/models/figapi_country_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiCountry +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiCountry do + let(:instance) { Falcon::FigapiCountry.new } + + describe 'test an instance of FigapiCountry' do + it 'should create an instance of FigapiCountry' do + expect(instance).to be_instance_of(Falcon::FigapiCountry) + end + end + describe 'test attribute "country_code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_domain_spec.rb b/spec/models/figapi_domain_spec.rb new file mode 100644 index 00000000..d9067d57 --- /dev/null +++ b/spec/models/figapi_domain_spec.rb @@ -0,0 +1,117 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiDomain +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiDomain do + let(:instance) { Falcon::FigapiDomain.new } + + describe 'test an instance of FigapiDomain' do + it 'should create an instance of FigapiDomain' do + expect(instance).to be_instance_of(Falcon::FigapiDomain) + end + end + describe 'test attribute "creation_date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "domain"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "domain_updated_date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email_addresses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "expiration_date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv4_addresses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv6_addresses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "mx_records"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name_servers"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "registrar"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "registrar_status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "who_is"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_email_address_spec.rb b/spec/models/figapi_email_address_spec.rb new file mode 100644 index 00000000..763ed30d --- /dev/null +++ b/spec/models/figapi_email_address_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiEmailAddress +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiEmailAddress do + let(:instance) { Falcon::FigapiEmailAddress.new } + + describe 'test an instance of FigapiEmailAddress' do + it 'should create an instance of FigapiEmailAddress' do + expect(instance).to be_instance_of(Falcon::FigapiEmailAddress) + end + end + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "contact_role"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_file_spec.rb b/spec/models/figapi_file_spec.rb new file mode 100644 index 00000000..acd4779e --- /dev/null +++ b/spec/models/figapi_file_spec.rb @@ -0,0 +1,87 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiFile +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiFile do + let(:instance) { Falcon::FigapiFile.new } + + describe 'test an instance of FigapiFile' do + it 'should create an instance of FigapiFile' do + expect(instance).to be_instance_of(Falcon::FigapiFile) + end + end + describe 'test attribute "file_properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "file_size"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "file_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "md5"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "magic_file_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sha1"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sha256"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_indicator_spec.rb b/spec/models/figapi_indicator_spec.rb new file mode 100644 index 00000000..c8e03679 --- /dev/null +++ b/spec/models/figapi_indicator_spec.rb @@ -0,0 +1,183 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiIndicator +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiIndicator do + let(:instance) { Falcon::FigapiIndicator.new } + + describe 'test an instance of FigapiIndicator' do + it 'should create an instance of FigapiIndicator' do + expect(instance).to be_instance_of(Falcon::FigapiIndicator) + end + end + describe 'test attribute "adversaries"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "certificates"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "countries"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "domain_details"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "file_details"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "first_seen"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv4_details"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv6_details"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "kill_chain"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_seen"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_updated"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "malicious_confidence"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "malicious_confidence_validated_time"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "publish_date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reports"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sectors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "threat_types"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "threats"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url_details"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "victimology"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "vulnerabilities"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_ipv4_spec.rb b/spec/models/figapi_ipv4_spec.rb new file mode 100644 index 00000000..23db502b --- /dev/null +++ b/spec/models/figapi_ipv4_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiIPv4 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiIPv4 do + let(:instance) { Falcon::FigapiIPv4.new } + + describe 'test an instance of FigapiIPv4' do + it 'should create an instance of FigapiIPv4' do + expect(instance).to be_instance_of(Falcon::FigapiIPv4) + end + end + describe 'test attribute "asn"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv4"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "isp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_ipv6_spec.rb b/spec/models/figapi_ipv6_spec.rb new file mode 100644 index 00000000..a3312d11 --- /dev/null +++ b/spec/models/figapi_ipv6_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiIPv6 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiIPv6 do + let(:instance) { Falcon::FigapiIPv6.new } + + describe 'test an instance of FigapiIPv6' do + it 'should create an instance of FigapiIPv6' do + expect(instance).to be_instance_of(Falcon::FigapiIPv6) + end + end + describe 'test attribute "asn"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv6"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "isp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_mx_record_spec.rb b/spec/models/figapi_mx_record_spec.rb new file mode 100644 index 00000000..8bd145a0 --- /dev/null +++ b/spec/models/figapi_mx_record_spec.rb @@ -0,0 +1,75 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiMXRecord +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiMXRecord do + let(:instance) { Falcon::FigapiMXRecord.new } + + describe 'test an instance of FigapiMXRecord' do + it 'should create an instance of FigapiMXRecord' do + expect(instance).to be_instance_of(Falcon::FigapiMXRecord) + end + end + describe 'test attribute "domain"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hostname"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv4_addresses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ipv6_addresses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "priority"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_name_server_spec.rb b/spec/models/figapi_name_server_spec.rb new file mode 100644 index 00000000..746f6a8c --- /dev/null +++ b/spec/models/figapi_name_server_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiNameServer +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiNameServer do + let(:instance) { Falcon::FigapiNameServer.new } + + describe 'test an instance of FigapiNameServer' do + it 'should create an instance of FigapiNameServer' do + expect(instance).to be_instance_of(Falcon::FigapiNameServer) + end + end + describe 'test attribute "domain"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hostname"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ip_addresses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_report_spec.rb b/spec/models/figapi_report_spec.rb new file mode 100644 index 00000000..4ee9eca0 --- /dev/null +++ b/spec/models/figapi_report_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiReport +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiReport do + let(:instance) { Falcon::FigapiReport.new } + + describe 'test an instance of FigapiReport' do + it 'should create an instance of FigapiReport' do + expect(instance).to be_instance_of(Falcon::FigapiReport) + end + end + describe 'test attribute "title"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_sector_spec.rb b/spec/models/figapi_sector_spec.rb new file mode 100644 index 00000000..57fd767a --- /dev/null +++ b/spec/models/figapi_sector_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiSector +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiSector do + let(:instance) { Falcon::FigapiSector.new } + + describe 'test an instance of FigapiSector' do + it 'should create an instance of FigapiSector' do + expect(instance).to be_instance_of(Falcon::FigapiSector) + end + end + describe 'test attribute "definition"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_threat_spec.rb b/spec/models/figapi_threat_spec.rb new file mode 100644 index 00000000..e5c90ae6 --- /dev/null +++ b/spec/models/figapi_threat_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiThreat +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiThreat do + let(:instance) { Falcon::FigapiThreat.new } + + describe 'test an instance of FigapiThreat' do + it 'should create an instance of FigapiThreat' do + expect(instance).to be_instance_of(Falcon::FigapiThreat) + end + end + describe 'test attribute "family_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_url_spec.rb b/spec/models/figapi_url_spec.rb new file mode 100644 index 00000000..89c9d741 --- /dev/null +++ b/spec/models/figapi_url_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiURL +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiURL do + let(:instance) { Falcon::FigapiURL.new } + + describe 'test an instance of FigapiURL' do + it 'should create an instance of FigapiURL' do + expect(instance).to be_instance_of(Falcon::FigapiURL) + end + end + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url_properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_vulnerability_spec.rb b/spec/models/figapi_vulnerability_spec.rb new file mode 100644 index 00000000..e4b5aa5b --- /dev/null +++ b/spec/models/figapi_vulnerability_spec.rb @@ -0,0 +1,141 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiVulnerability +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiVulnerability do + let(:instance) { Falcon::FigapiVulnerability.new } + + describe 'test an instance of FigapiVulnerability' do + it 'should create an instance of FigapiVulnerability' do + expect(instance).to be_instance_of(Falcon::FigapiVulnerability) + end + end + describe 'test attribute "cpe_edition"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_language"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_other"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_part"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_product"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_software_edition"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_target_hardware"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_target_software"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_update"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_vendor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cpe_version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cve"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exploit_status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_updated"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "published_date"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_who_is_spec.rb b/spec/models/figapi_who_is_spec.rb new file mode 100644 index 00000000..48c50a44 --- /dev/null +++ b/spec/models/figapi_who_is_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiWhoIS +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiWhoIS do + let(:instance) { Falcon::FigapiWhoIS.new } + + describe 'test an instance of FigapiWhoIS' do + it 'should create an instance of FigapiWhoIS' do + expect(instance).to be_instance_of(Falcon::FigapiWhoIS) + end + end + describe 'test attribute "admin_contact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "billing_contact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "registrant_contact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "technical_contact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_whois_record_spec.rb b/spec/models/figapi_whois_record_spec.rb new file mode 100644 index 00000000..97ee5313 --- /dev/null +++ b/spec/models/figapi_whois_record_spec.rb @@ -0,0 +1,99 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiWhoisRecord +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiWhoisRecord do + let(:instance) { Falcon::FigapiWhoisRecord.new } + + describe 'test an instance of FigapiWhoisRecord' do + it 'should create an instance of FigapiWhoisRecord' do + expect(instance).to be_instance_of(Falcon::FigapiWhoisRecord) + end + end + describe 'test attribute "city"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "country"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "fax"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "org"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "phone"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "postal_code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "state"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "street"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/figapi_x509_certificate_spec.rb b/spec/models/figapi_x509_certificate_spec.rb new file mode 100644 index 00000000..0b1070ed --- /dev/null +++ b/spec/models/figapi_x509_certificate_spec.rb @@ -0,0 +1,93 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::FigapiX509Certificate +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::FigapiX509Certificate do + let(:instance) { Falcon::FigapiX509Certificate.new } + + describe 'test an instance of FigapiX509Certificate' do + it 'should create an instance of FigapiX509Certificate' do + expect(instance).to be_instance_of(Falcon::FigapiX509Certificate) + end + end + describe 'test attribute "certificate_hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "common_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "email_address"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "issuer_common_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "organization"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "public_key_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "signature_algorithm"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "subject"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/graph_condition_spec.rb b/spec/models/graph_condition_spec.rb index fd305fa2..50e0382b 100644 --- a/spec/models/graph_condition_spec.rb +++ b/spec/models/graph_condition_spec.rb @@ -54,12 +54,6 @@ end end - describe 'test attribute "evaluated"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - describe 'test attribute "expression"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/help_spec.rb b/spec/models/help_spec.rb new file mode 100644 index 00000000..9cbb9dd5 --- /dev/null +++ b/spec/models/help_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::Help +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::Help do + let(:instance) { Falcon::Help.new } + + describe 'test an instance of Help' do + it 'should create an instance of Help' do + expect(instance).to be_instance_of(Falcon::Help) + end + end + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/ingestion_cve_exploit_reference_spec.rb b/spec/models/ingestion_cve_exploit_reference_spec.rb new file mode 100644 index 00000000..139209ef --- /dev/null +++ b/spec/models/ingestion_cve_exploit_reference_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::IngestionCVEExploitReference +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::IngestionCVEExploitReference do + let(:instance) { Falcon::IngestionCVEExploitReference.new } + + describe 'test an instance of IngestionCVEExploitReference' do + it 'should create an instance of IngestionCVEExploitReference' do + expect(instance).to be_instance_of(Falcon::IngestionCVEExploitReference) + end + end + describe 'test attribute "kind"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "label"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/ingestion_cve_exploit_source_spec.rb b/spec/models/ingestion_cve_exploit_source_spec.rb new file mode 100644 index 00000000..0d44b280 --- /dev/null +++ b/spec/models/ingestion_cve_exploit_source_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::IngestionCVEExploitSource +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::IngestionCVEExploitSource do + let(:instance) { Falcon::IngestionCVEExploitSource.new } + + describe 'test an instance of IngestionCVEExploitSource' do + it 'should create an instance of IngestionCVEExploitSource' do + expect(instance).to be_instance_of(Falcon::IngestionCVEExploitSource) + end + end + describe 'test attribute "is_flat"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "label"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "references"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/ingestion_ex_prt_rating_factors_spec.rb b/spec/models/ingestion_ex_prt_rating_factors_spec.rb new file mode 100644 index 00000000..5d489177 --- /dev/null +++ b/spec/models/ingestion_ex_prt_rating_factors_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::IngestionExPRTRatingFactors +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::IngestionExPRTRatingFactors do + let(:instance) { Falcon::IngestionExPRTRatingFactors.new } + + describe 'test an instance of IngestionExPRTRatingFactors' do + it 'should create an instance of IngestionExPRTRatingFactors' do + expect(instance).to be_instance_of(Falcon::IngestionExPRTRatingFactors) + end + end + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "factor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "impact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "long_description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/ingestion_reference_spec.rb b/spec/models/ingestion_reference_spec.rb new file mode 100644 index 00000000..0c082c71 --- /dev/null +++ b/spec/models/ingestion_reference_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::IngestionReference +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::IngestionReference do + let(:instance) { Falcon::IngestionReference.new } + + describe 'test an instance of IngestionReference' do + it 'should create an instance of IngestionReference' do + expect(instance).to be_instance_of(Falcon::IngestionReference) + end + end + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/inventoryapi_surface_error_spec.rb b/spec/models/inventoryapi_surface_error_spec.rb new file mode 100644 index 00000000..6975f511 --- /dev/null +++ b/spec/models/inventoryapi_surface_error_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::InventoryapiSurfaceError +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::InventoryapiSurfaceError do + let(:instance) { Falcon::InventoryapiSurfaceError.new } + + describe 'test an instance of InventoryapiSurfaceError' do + it 'should create an instance of InventoryapiSurfaceError' do + expect(instance).to be_instance_of(Falcon::InventoryapiSurfaceError) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "details"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/inventoryapi_user_external_asset_create_request_v1_spec.rb b/spec/models/inventoryapi_user_external_asset_create_request_v1_spec.rb new file mode 100644 index 00000000..571cf0ad --- /dev/null +++ b/spec/models/inventoryapi_user_external_asset_create_request_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::InventoryapiUserExternalAssetCreateRequestV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::InventoryapiUserExternalAssetCreateRequestV1 do + let(:instance) { Falcon::InventoryapiUserExternalAssetCreateRequestV1.new } + + describe 'test an instance of InventoryapiUserExternalAssetCreateRequestV1' do + it 'should create an instance of InventoryapiUserExternalAssetCreateRequestV1' do + expect(instance).to be_instance_of(Falcon::InventoryapiUserExternalAssetCreateRequestV1) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/inventoryapi_user_external_asset_create_response_v1_spec.rb b/spec/models/inventoryapi_user_external_asset_create_response_v1_spec.rb new file mode 100644 index 00000000..25d49543 --- /dev/null +++ b/spec/models/inventoryapi_user_external_asset_create_response_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::InventoryapiUserExternalAssetCreateResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::InventoryapiUserExternalAssetCreateResponseV1 do + let(:instance) { Falcon::InventoryapiUserExternalAssetCreateResponseV1.new } + + describe 'test an instance of InventoryapiUserExternalAssetCreateResponseV1' do + it 'should create an instance of InventoryapiUserExternalAssetCreateResponseV1' do + expect(instance).to be_instance_of(Falcon::InventoryapiUserExternalAssetCreateResponseV1) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/inventoryapi_user_external_asset_create_spec.rb b/spec/models/inventoryapi_user_external_asset_create_spec.rb new file mode 100644 index 00000000..10cb93e8 --- /dev/null +++ b/spec/models/inventoryapi_user_external_asset_create_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::InventoryapiUserExternalAssetCreate +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::InventoryapiUserExternalAssetCreate do + let(:instance) { Falcon::InventoryapiUserExternalAssetCreate.new } + + describe 'test an instance of InventoryapiUserExternalAssetCreate' do + it 'should create an instance of InventoryapiUserExternalAssetCreate' do + expect(instance).to be_instance_of(Falcon::InventoryapiUserExternalAssetCreate) + end + end + describe 'test attribute "assets"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "subsidiary_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/inventoryapi_user_external_asset_result_spec.rb b/spec/models/inventoryapi_user_external_asset_result_spec.rb new file mode 100644 index 00000000..394e9318 --- /dev/null +++ b/spec/models/inventoryapi_user_external_asset_result_spec.rb @@ -0,0 +1,93 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::InventoryapiUserExternalAssetResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::InventoryapiUserExternalAssetResult do + let(:instance) { Falcon::InventoryapiUserExternalAssetResult.new } + + describe 'test an instance of InventoryapiUserExternalAssetResult' do + it 'should create an instance of InventoryapiUserExternalAssetResult' do + expect(instance).to be_instance_of(Falcon::InventoryapiUserExternalAssetResult) + end + end + describe 'test attribute "asset_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "current_subsidiary"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "error"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "index"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "raw_value"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "subsidiary"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/inventoryapi_user_external_asset_spec.rb b/spec/models/inventoryapi_user_external_asset_spec.rb new file mode 100644 index 00000000..1a3ba906 --- /dev/null +++ b/spec/models/inventoryapi_user_external_asset_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::InventoryapiUserExternalAsset +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::InventoryapiUserExternalAsset do + let(:instance) { Falcon::InventoryapiUserExternalAsset.new } + + describe 'test an instance of InventoryapiUserExternalAsset' do + it 'should create an instance of InventoryapiUserExternalAsset' do + expect(instance).to be_instance_of(Falcon::InventoryapiUserExternalAsset) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/inventoryapidomain_subsidiary_spec.rb b/spec/models/inventoryapidomain_subsidiary_spec.rb new file mode 100644 index 00000000..6a224291 --- /dev/null +++ b/spec/models/inventoryapidomain_subsidiary_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::InventoryapidomainSubsidiary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::InventoryapidomainSubsidiary do + let(:instance) { Falcon::InventoryapidomainSubsidiary.new } + + describe 'test an instance of InventoryapidomainSubsidiary' do + it 'should create an instance of InventoryapidomainSubsidiary' do + expect(instance).to be_instance_of(Falcon::InventoryapidomainSubsidiary) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/jsonschema_pivot_spec.rb b/spec/models/jsonschema_pivot_spec.rb index aed530f5..0c184400 100644 --- a/spec/models/jsonschema_pivot_spec.rb +++ b/spec/models/jsonschema_pivot_spec.rb @@ -54,6 +54,12 @@ end end + describe 'test attribute "entity_on_load"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "entity_value"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -66,6 +72,12 @@ end end + describe 'test attribute "query_string_on_load"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "searchable"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/jsonschema_signals_extensions_spec.rb b/spec/models/jsonschema_signals_extensions_spec.rb index 5ad7e5d8..7866271d 100644 --- a/spec/models/jsonschema_signals_extensions_spec.rb +++ b/spec/models/jsonschema_signals_extensions_spec.rb @@ -60,4 +60,16 @@ end end + describe 'test attribute "use_case"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "vendor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + end diff --git a/spec/models/jsonschema_ui_extensions_spec.rb b/spec/models/jsonschema_ui_extensions_spec.rb index 9cc1b976..9ae923f9 100644 --- a/spec/models/jsonschema_ui_extensions_spec.rb +++ b/spec/models/jsonschema_ui_extensions_spec.rb @@ -78,4 +78,22 @@ end end + describe 'test attribute "hide"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "schema_reference"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "skip"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + end diff --git a/spec/models/models_api_customer_and_image_spec.rb b/spec/models/models_api_customer_and_image_spec.rb index b6e9bb40..757b1a2e 100644 --- a/spec/models/models_api_customer_and_image_spec.rb +++ b/spec/models/models_api_customer_and_image_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::ModelsAPICustomerAndImage) end end + describe 'test attribute "ai_related"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "base_image_id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/models_api_image_combined_export_spec.rb b/spec/models/models_api_image_combined_export_spec.rb index 4ca53f9d..68678691 100644 --- a/spec/models/models_api_image_combined_export_spec.rb +++ b/spec/models/models_api_image_combined_export_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::ModelsAPIImageCombinedExport) end end + describe 'test attribute "ai_related"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "architecture"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -96,6 +102,12 @@ end end + describe 'test attribute "groups"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "image_digest"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/models_api_package_combined_spec.rb b/spec/models/models_api_package_combined_spec.rb index 8b5bd1c4..79affd0a 100644 --- a/spec/models/models_api_package_combined_spec.rb +++ b/spec/models/models_api_package_combined_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::ModelsAPIPackageCombined) end end + describe 'test attribute "ai_related"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "all_images"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/models_api_package_combined_v2_spec.rb b/spec/models/models_api_package_combined_v2_spec.rb new file mode 100644 index 00000000..50d50082 --- /dev/null +++ b/spec/models/models_api_package_combined_v2_spec.rb @@ -0,0 +1,111 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsAPIPackageCombinedV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPackageCombinedV2 do + let(:instance) { Falcon::ModelsAPIPackageCombinedV2.new } + + describe 'test an instance of ModelsAPIPackageCombinedV2' do + it 'should create an instance of ModelsAPIPackageCombinedV2' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPackageCombinedV2) + end + end + describe 'test attribute "ai_related"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "all_images"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cveid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "fix_resolution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "license"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "package_name_version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "running_images"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "severity"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "vulnerability_description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_api_vulnerability_combined_spec.rb b/spec/models/models_api_vulnerability_combined_spec.rb index 44736d83..86631427 100644 --- a/spec/models/models_api_vulnerability_combined_spec.rb +++ b/spec/models/models_api_vulnerability_combined_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::ModelsAPIVulnerabilityCombined) end end + describe 'test attribute "ai_related"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "containers_impacted"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/models_application_library_spec.rb b/spec/models/models_application_library_spec.rb index 76bf4f62..3a1fe173 100644 --- a/spec/models/models_application_library_spec.rb +++ b/spec/models/models_application_library_spec.rb @@ -84,4 +84,10 @@ end end + describe 'test attribute "ai_related"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + end diff --git a/spec/models/models_container_spec.rb b/spec/models/models_container_spec.rb index 5e873d38..bb220724 100644 --- a/spec/models/models_container_spec.rb +++ b/spec/models/models_container_spec.rb @@ -66,6 +66,12 @@ end end + describe 'test attribute "cloud_instance_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "cloud_name"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/models_ext_api_image_combined_spec.rb b/spec/models/models_ext_api_image_combined_spec.rb index 70a06085..d0d50b18 100644 --- a/spec/models/models_ext_api_image_combined_spec.rb +++ b/spec/models/models_ext_api_image_combined_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::ModelsExtAPIImageCombined) end end + describe 'test attribute "ai_related"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "architecture"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/models_message_spec.rb b/spec/models/models_message_spec.rb new file mode 100644 index 00000000..84b2ba43 --- /dev/null +++ b/spec/models/models_message_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsMessage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsMessage do + let(:instance) { Falcon::ModelsMessage.new } + + describe 'test an instance of ModelsMessage' do + it 'should create an instance of ModelsMessage' do + expect(instance).to be_instance_of(Falcon::ModelsMessage) + end + end + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_partial_fingerprints_spec.rb b/spec/models/models_partial_fingerprints_spec.rb new file mode 100644 index 00000000..205c2690 --- /dev/null +++ b/spec/models/models_partial_fingerprints_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsPartialFingerprints +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPartialFingerprints do + let(:instance) { Falcon::ModelsPartialFingerprints.new } + + describe 'test an instance of ModelsPartialFingerprints' do + it 'should create an instance of ModelsPartialFingerprints' do + expect(instance).to be_instance_of(Falcon::ModelsPartialFingerprints) + end + end + describe 'test attribute "identifier_v1"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_result_location_properties_spec.rb b/spec/models/models_result_location_properties_spec.rb new file mode 100644 index 00000000..0209588f --- /dev/null +++ b/spec/models/models_result_location_properties_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsResultLocationProperties +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsResultLocationProperties do + let(:instance) { Falcon::ModelsResultLocationProperties.new } + + describe 'test an instance of ModelsResultLocationProperties' do + it 'should create an instance of ModelsResultLocationProperties' do + expect(instance).to be_instance_of(Falcon::ModelsResultLocationProperties) + end + end + describe 'test attribute "layer"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "path"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_result_location_spec.rb b/spec/models/models_result_location_spec.rb new file mode 100644 index 00000000..7a949af6 --- /dev/null +++ b/spec/models/models_result_location_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsResultLocation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsResultLocation do + let(:instance) { Falcon::ModelsResultLocation.new } + + describe 'test an instance of ModelsResultLocation' do + it 'should create an instance of ModelsResultLocation' do + expect(instance).to be_instance_of(Falcon::ModelsResultLocation) + end + end + describe 'test attribute "physical_location"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_result_physical_location_artifact_location_spec.rb b/spec/models/models_result_physical_location_artifact_location_spec.rb new file mode 100644 index 00000000..d6422cef --- /dev/null +++ b/spec/models/models_result_physical_location_artifact_location_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsResultPhysicalLocationArtifactLocation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsResultPhysicalLocationArtifactLocation do + let(:instance) { Falcon::ModelsResultPhysicalLocationArtifactLocation.new } + + describe 'test an instance of ModelsResultPhysicalLocationArtifactLocation' do + it 'should create an instance of ModelsResultPhysicalLocationArtifactLocation' do + expect(instance).to be_instance_of(Falcon::ModelsResultPhysicalLocationArtifactLocation) + end + end + describe 'test attribute "uri"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_result_physical_location_region_spec.rb b/spec/models/models_result_physical_location_region_spec.rb new file mode 100644 index 00000000..79145477 --- /dev/null +++ b/spec/models/models_result_physical_location_region_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsResultPhysicalLocationRegion +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsResultPhysicalLocationRegion do + let(:instance) { Falcon::ModelsResultPhysicalLocationRegion.new } + + describe 'test an instance of ModelsResultPhysicalLocationRegion' do + it 'should create an instance of ModelsResultPhysicalLocationRegion' do + expect(instance).to be_instance_of(Falcon::ModelsResultPhysicalLocationRegion) + end + end + describe 'test attribute "start_line"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_result_physical_location_spec.rb b/spec/models/models_result_physical_location_spec.rb new file mode 100644 index 00000000..bb6f1df0 --- /dev/null +++ b/spec/models/models_result_physical_location_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsResultPhysicalLocation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsResultPhysicalLocation do + let(:instance) { Falcon::ModelsResultPhysicalLocation.new } + + describe 'test an instance of ModelsResultPhysicalLocation' do + it 'should create an instance of ModelsResultPhysicalLocation' do + expect(instance).to be_instance_of(Falcon::ModelsResultPhysicalLocation) + end + end + describe 'test attribute "artifact_location"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "region"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_result_properties_spec.rb b/spec/models/models_result_properties_spec.rb new file mode 100644 index 00000000..5d323a39 --- /dev/null +++ b/spec/models/models_result_properties_spec.rb @@ -0,0 +1,105 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsResultProperties +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsResultProperties do + let(:instance) { Falcon::ModelsResultProperties.new } + + describe 'test an instance of ModelsResultProperties' do + it 'should create an instance of ModelsResultProperties' do + expect(instance).to be_instance_of(Falcon::ModelsResultProperties) + end + end + describe 'test attribute "asset_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "asset_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "asset_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud_account_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud_account_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud_provider"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "function_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "is_supported"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "region"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_result_spec.rb b/spec/models/models_result_spec.rb new file mode 100644 index 00000000..81aae6ba --- /dev/null +++ b/spec/models/models_result_spec.rb @@ -0,0 +1,93 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsResult do + let(:instance) { Falcon::ModelsResult.new } + + describe 'test an instance of ModelsResult' do + it 'should create an instance of ModelsResult' do + expect(instance).to be_instance_of(Falcon::ModelsResult) + end + end + describe 'test attribute "kind"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "level"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "locations"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "partial_fingerprints"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "rule_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "rule_index"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_rule_default_configuration_spec.rb b/spec/models/models_rule_default_configuration_spec.rb new file mode 100644 index 00000000..5c959c99 --- /dev/null +++ b/spec/models/models_rule_default_configuration_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsRuleDefaultConfiguration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsRuleDefaultConfiguration do + let(:instance) { Falcon::ModelsRuleDefaultConfiguration.new } + + describe 'test an instance of ModelsRuleDefaultConfiguration' do + it 'should create an instance of ModelsRuleDefaultConfiguration' do + expect(instance).to be_instance_of(Falcon::ModelsRuleDefaultConfiguration) + end + end + describe 'test attribute "level"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_rule_properties_spec.rb b/spec/models/models_rule_properties_spec.rb new file mode 100644 index 00000000..96620a13 --- /dev/null +++ b/spec/models/models_rule_properties_spec.rb @@ -0,0 +1,231 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsRuleProperties +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsRuleProperties do + let(:instance) { Falcon::ModelsRuleProperties.new } + + describe 'test an instance of ModelsRuleProperties' do + it 'should create an instance of ModelsRuleProperties' do + expect(instance).to be_instance_of(Falcon::ModelsRuleProperties) + end + end + describe 'test attribute "cvss_attack_complexity"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_attack_vector"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_availability_impact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_base_score"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_confidentiality_impact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_exploitability_score"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_impact_score"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_integrity_impact"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_privileges_required"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_scope"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_source"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_user_interaction"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cvss_vector"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exploit_date_recorded_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exploit_sources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exploit_status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exploit_updated_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exprt_rating"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exprt_rating_date_recorded_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exprt_rating_highest"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exprt_rating_highest_recorded_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "first_seen_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "references"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "remediation_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "remediation_sources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "remediations"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "runtime"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "scanner_version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "severity"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "top_exprt_rating_factors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_rule_spec.rb b/spec/models/models_rule_spec.rb new file mode 100644 index 00000000..fd869c02 --- /dev/null +++ b/spec/models/models_rule_spec.rb @@ -0,0 +1,93 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsRule +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsRule do + let(:instance) { Falcon::ModelsRule.new } + + describe 'test an instance of ModelsRule' do + it 'should create an instance of ModelsRule' do + expect(instance).to be_instance_of(Falcon::ModelsRule) + end + end + describe 'test attribute "default_configuration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "full_description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "help"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "help_uri"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "properties"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "short_description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_run_spec.rb b/spec/models/models_run_spec.rb new file mode 100644 index 00000000..cea6de16 --- /dev/null +++ b/spec/models/models_run_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsRun +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsRun do + let(:instance) { Falcon::ModelsRun.new } + + describe 'test an instance of ModelsRun' do + it 'should create an instance of ModelsRun' do + expect(instance).to be_instance_of(Falcon::ModelsRun) + end + end + describe 'test attribute "results"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tool"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_run_tool_driver_spec.rb b/spec/models/models_run_tool_driver_spec.rb new file mode 100644 index 00000000..938f4eff --- /dev/null +++ b/spec/models/models_run_tool_driver_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsRunToolDriver +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsRunToolDriver do + let(:instance) { Falcon::ModelsRunToolDriver.new } + + describe 'test an instance of ModelsRunToolDriver' do + it 'should create an instance of ModelsRunToolDriver' do + expect(instance).to be_instance_of(Falcon::ModelsRunToolDriver) + end + end + describe 'test attribute "information_uri"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "rules"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_run_tool_spec.rb b/spec/models/models_run_tool_spec.rb new file mode 100644 index 00000000..92954a95 --- /dev/null +++ b/spec/models/models_run_tool_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsRunTool +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsRunTool do + let(:instance) { Falcon::ModelsRunTool.new } + + describe 'test an instance of ModelsRunTool' do + it 'should create an instance of ModelsRunTool' do + expect(instance).to be_instance_of(Falcon::ModelsRunTool) + end + end + describe 'test attribute "driver"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/models_vulnerability_sarif_spec.rb b/spec/models/models_vulnerability_sarif_spec.rb new file mode 100644 index 00000000..6615c79a --- /dev/null +++ b/spec/models/models_vulnerability_sarif_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsVulnerabilitySARIF +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsVulnerabilitySARIF do + let(:instance) { Falcon::ModelsVulnerabilitySARIF.new } + + describe 'test an instance of ModelsVulnerabilitySARIF' do + it 'should create an instance of ModelsVulnerabilitySARIF' do + expect(instance).to be_instance_of(Falcon::ModelsVulnerabilitySARIF) + end + end + describe 'test attribute "schema"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "runs"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/packages_api_combined_package_v2_spec.rb b/spec/models/packages_api_combined_package_v2_spec.rb new file mode 100644 index 00000000..3bea8d1c --- /dev/null +++ b/spec/models/packages_api_combined_package_v2_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::PackagesApiCombinedPackageV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PackagesApiCombinedPackageV2 do + let(:instance) { Falcon::PackagesApiCombinedPackageV2.new } + + describe 'test an instance of PackagesApiCombinedPackageV2' do + it 'should create an instance of PackagesApiCombinedPackageV2' do + expect(instance).to be_instance_of(Falcon::PackagesApiCombinedPackageV2) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/policyframework_benchmark_spec.rb b/spec/models/policyframework_benchmark_spec.rb new file mode 100644 index 00000000..24d272a2 --- /dev/null +++ b/spec/models/policyframework_benchmark_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::PolicyframeworkBenchmark +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PolicyframeworkBenchmark do + let(:instance) { Falcon::PolicyframeworkBenchmark.new } + + describe 'test an instance of PolicyframeworkBenchmark' do + it 'should create an instance of PolicyframeworkBenchmark' do + expect(instance).to be_instance_of(Falcon::PolicyframeworkBenchmark) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/policyframework_control_spec.rb b/spec/models/policyframework_control_spec.rb new file mode 100644 index 00000000..0f8676cb --- /dev/null +++ b/spec/models/policyframework_control_spec.rb @@ -0,0 +1,87 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::PolicyframeworkControl +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PolicyframeworkControl do + let(:instance) { Falcon::PolicyframeworkControl.new } + + describe 'test an instance of PolicyframeworkControl' do + it 'should create an instance of PolicyframeworkControl' do + expect(instance).to be_instance_of(Falcon::PolicyframeworkControl) + end + end + describe 'test attribute "benchmarks"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "framework"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uuid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/quickscanpro_query_scan_results_response_spec.rb b/spec/models/quickscanpro_query_scan_results_response_spec.rb index d474b8b9..39f62070 100644 --- a/spec/models/quickscanpro_query_scan_results_response_spec.rb +++ b/spec/models/quickscanpro_query_scan_results_response_spec.rb @@ -54,6 +54,12 @@ end end + describe 'test attribute "quota"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "resources"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/registration_aws_account_ext_v2_spec.rb b/spec/models/registration_aws_account_ext_v2_spec.rb index 196fb003..80eb131a 100644 --- a/spec/models/registration_aws_account_ext_v2_spec.rb +++ b/spec/models/registration_aws_account_ext_v2_spec.rb @@ -66,6 +66,12 @@ end end + describe 'test attribute "deployment_method"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "dspm_enabled"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -96,6 +102,12 @@ end end + describe 'test attribute "root_stack_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "sensor_management_enabled"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/registration_aws_account_patch_spec.rb b/spec/models/registration_aws_account_patch_spec.rb index 76305ad1..a335631e 100644 --- a/spec/models/registration_aws_account_patch_spec.rb +++ b/spec/models/registration_aws_account_patch_spec.rb @@ -60,6 +60,12 @@ end end + describe 'test attribute "deployment_method"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "dspm_enabled"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -96,6 +102,12 @@ end end + describe 'test attribute "root_stack_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "sensor_management_enabled"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/registration_iom_event_v2_spec.rb b/spec/models/registration_iom_event_v2_spec.rb index bb709a04..8e815f9e 100644 --- a/spec/models/registration_iom_event_v2_spec.rb +++ b/spec/models/registration_iom_event_v2_spec.rb @@ -108,6 +108,12 @@ end end + describe 'test attribute "groups"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/releasecontents_release_content_spec.rb b/spec/models/releasecontents_release_content_spec.rb new file mode 100644 index 00000000..981249d5 --- /dev/null +++ b/spec/models/releasecontents_release_content_spec.rb @@ -0,0 +1,93 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasecontentsReleaseContent +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasecontentsReleaseContent do + let(:instance) { Falcon::ReleasecontentsReleaseContent.new } + + describe 'test an instance of ReleasecontentsReleaseContent' do + it 'should create an instance of ReleasecontentsReleaseContent' do + expect(instance).to be_instance_of(Falcon::ReleasecontentsReleaseContent) + end + end + describe 'test attribute "content_category"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "content_group_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "content_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "content_version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "jira_ticket"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releasecontents_release_content_version_spec.rb b/spec/models/releasecontents_release_content_version_spec.rb new file mode 100644 index 00000000..ae3a5215 --- /dev/null +++ b/spec/models/releasecontents_release_content_version_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasecontentsReleaseContentVersion +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasecontentsReleaseContentVersion do + let(:instance) { Falcon::ReleasecontentsReleaseContentVersion.new } + + describe 'test an instance of ReleasecontentsReleaseContentVersion' do + it 'should create an instance of ReleasecontentsReleaseContentVersion' do + expect(instance).to be_instance_of(Falcon::ReleasecontentsReleaseContentVersion) + end + end + describe 'test attribute "source_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "source_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releasenotes_entities_get_request_spec.rb b/spec/models/releasenotes_entities_get_request_spec.rb new file mode 100644 index 00000000..fd360a36 --- /dev/null +++ b/spec/models/releasenotes_entities_get_request_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasenotesEntitiesGetRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasenotesEntitiesGetRequest do + let(:instance) { Falcon::ReleasenotesEntitiesGetRequest.new } + + describe 'test an instance of ReleasenotesEntitiesGetRequest' do + it 'should create an instance of ReleasenotesEntitiesGetRequest' do + expect(instance).to be_instance_of(Falcon::ReleasenotesEntitiesGetRequest) + end + end + describe 'test attribute "ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releasenotes_entities_get_response_wrapper_spec.rb b/spec/models/releasenotes_entities_get_response_wrapper_spec.rb new file mode 100644 index 00000000..c8e523c0 --- /dev/null +++ b/spec/models/releasenotes_entities_get_response_wrapper_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasenotesEntitiesGetResponseWrapper +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasenotesEntitiesGetResponseWrapper do + let(:instance) { Falcon::ReleasenotesEntitiesGetResponseWrapper.new } + + describe 'test an instance of ReleasenotesEntitiesGetResponseWrapper' do + it 'should create an instance of ReleasenotesEntitiesGetResponseWrapper' do + expect(instance).to be_instance_of(Falcon::ReleasenotesEntitiesGetResponseWrapper) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releasenotes_note_detail_spec.rb b/spec/models/releasenotes_note_detail_spec.rb new file mode 100644 index 00000000..cfdaf35f --- /dev/null +++ b/spec/models/releasenotes_note_detail_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasenotesNoteDetail +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasenotesNoteDetail do + let(:instance) { Falcon::ReleasenotesNoteDetail.new } + + describe 'test an instance of ReleasenotesNoteDetail' do + it 'should create an instance of ReleasenotesNoteDetail' do + expect(instance).to be_instance_of(Falcon::ReleasenotesNoteDetail) + end + end + describe 'test attribute "category"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "note_content"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "platforms"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releasenotes_release_note_v1_spec.rb b/spec/models/releasenotes_release_note_v1_spec.rb new file mode 100644 index 00000000..20552364 --- /dev/null +++ b/spec/models/releasenotes_release_note_v1_spec.rb @@ -0,0 +1,81 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasenotesReleaseNoteV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasenotesReleaseNoteV1 do + let(:instance) { Falcon::ReleasenotesReleaseNoteV1.new } + + describe 'test an instance of ReleasenotesReleaseNoteV1' do + it 'should create an instance of ReleasenotesReleaseNoteV1' do + expect(instance).to be_instance_of(Falcon::ReleasenotesReleaseNoteV1) + end + end + describe 'test attribute "categories"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "early_access"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "general_availability"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releasenotes_release_note_wrapper_v1_spec.rb b/spec/models/releasenotes_release_note_wrapper_v1_spec.rb new file mode 100644 index 00000000..949939e2 --- /dev/null +++ b/spec/models/releasenotes_release_note_wrapper_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasenotesReleaseNoteWrapperV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasenotesReleaseNoteWrapperV1 do + let(:instance) { Falcon::ReleasenotesReleaseNoteWrapperV1.new } + + describe 'test an instance of ReleasenotesReleaseNoteWrapperV1' do + it 'should create an instance of ReleasenotesReleaseNoteWrapperV1' do + expect(instance).to be_instance_of(Falcon::ReleasenotesReleaseNoteWrapperV1) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releases_release_spec.rb b/spec/models/releases_release_spec.rb new file mode 100644 index 00000000..b0b33ec8 --- /dev/null +++ b/spec/models/releases_release_spec.rb @@ -0,0 +1,99 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasesRelease +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasesRelease do + let(:instance) { Falcon::ReleasesRelease.new } + + describe 'test an instance of ReleasesRelease' do + it 'should create an instance of ReleasesRelease' do + expect(instance).to be_instance_of(Falcon::ReleasesRelease) + end + end + describe 'test attribute "created_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "created_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "deployed_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "deployment_start_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_modified_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "last_modified_timestamp"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "release_contents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/releases_release_wrapper_spec.rb b/spec/models/releases_release_wrapper_spec.rb new file mode 100644 index 00000000..45395815 --- /dev/null +++ b/spec/models/releases_release_wrapper_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ReleasesReleaseWrapper +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ReleasesReleaseWrapper do + let(:instance) { Falcon::ReleasesReleaseWrapper.new } + + describe 'test an instance of ReleasesReleaseWrapper' do + it 'should create an instance of ReleasesReleaseWrapper' do + expect(instance).to be_instance_of(Falcon::ReleasesReleaseWrapper) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_app_spec.rb b/spec/models/resources_app_spec.rb new file mode 100644 index 00000000..ced19446 --- /dev/null +++ b/spec/models/resources_app_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesApp +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesApp do + let(:instance) { Falcon::ResourcesApp.new } + + describe 'test an instance of ResourcesApp' do + it 'should create an instance of ResourcesApp' do + expect(instance).to be_instance_of(Falcon::ResourcesApp) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_asset_graph_spec.rb b/spec/models/resources_asset_graph_spec.rb new file mode 100644 index 00000000..c0d23ece --- /dev/null +++ b/spec/models/resources_asset_graph_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesAssetGraph +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesAssetGraph do + let(:instance) { Falcon::ResourcesAssetGraph.new } + + describe 'test an instance of ResourcesAssetGraph' do + it 'should create an instance of ResourcesAssetGraph' do + expect(instance).to be_instance_of(Falcon::ResourcesAssetGraph) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "res_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_cloud_context_spec.rb b/spec/models/resources_cloud_context_spec.rb new file mode 100644 index 00000000..8b7afa4e --- /dev/null +++ b/spec/models/resources_cloud_context_spec.rb @@ -0,0 +1,147 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesCloudContext +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesCloudContext do + let(:instance) { Falcon::ResourcesCloudContext.new } + + describe 'test an instance of ResourcesCloudContext' do + it 'should create an instance of ResourcesCloudContext' do + expect(instance).to be_instance_of(Falcon::ResourcesCloudContext) + end + end + describe 'test attribute "account_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "allows_public_access"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "asset_graph"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cspm_license"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "data_classifications"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "detections"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_falcon_sensor"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "has_tags"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "host"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "instance_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "instance_state"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "legacy_resource_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "legacy_type_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "legacy_uuid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "managed_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "publicly_exposed"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "scan_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_cloud_resource_spec.rb b/spec/models/resources_cloud_resource_spec.rb new file mode 100644 index 00000000..9300dcc3 --- /dev/null +++ b/spec/models/resources_cloud_resource_spec.rb @@ -0,0 +1,291 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesCloudResource +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesCloudResource do + let(:instance) { Falcon::ResourcesCloudResource.new } + + describe 'test an instance of ResourcesCloudResource' do + it 'should create an instance of ResourcesCloudResource' do + expect(instance).to be_instance_of(Falcon::ResourcesCloudResource) + end + end + describe 'test attribute "account_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "account_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "active"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "arn"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "category"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud_context"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud_groups"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud_labels"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cloud_provider"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cluster_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cluster_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "configuration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "creation_time"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "first_seen"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hash"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "location"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "organization_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "parent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "project_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "project_number"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "region"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "relationships"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_group"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_number"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_type_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "revision"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "service"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "subscription_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "supplementary_configuration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "updated_at"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "zone"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "zones"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_compliance_spec.rb b/spec/models/resources_compliance_spec.rb new file mode 100644 index 00000000..638093b2 --- /dev/null +++ b/spec/models/resources_compliance_spec.rb @@ -0,0 +1,87 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesCompliance +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesCompliance do + let(:instance) { Falcon::ResourcesCompliance.new } + + describe 'test an instance of ResourcesCompliance' do + it 'should create an instance of ResourcesCompliance' do + expect(instance).to be_instance_of(Falcon::ResourcesCompliance) + end + end + describe 'test attribute "benchmark_names"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "benchmark_versions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "controls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "framework_versions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "frameworks"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "legacy_policy_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "rules"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_detections_spec.rb b/spec/models/resources_detections_spec.rb new file mode 100644 index 00000000..f66e4961 --- /dev/null +++ b/spec/models/resources_detections_spec.rb @@ -0,0 +1,81 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesDetections +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesDetections do + let(:instance) { Falcon::ResourcesDetections.new } + + describe 'test an instance of ResourcesDetections' do + it 'should create an instance of ResourcesDetections' do + expect(instance).to be_instance_of(Falcon::ResourcesDetections) + end + end + describe 'test attribute "compliant"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "highest_severity"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ioa_counts"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "iom_counts"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "non_compliant"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "severities"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_host_spec.rb b/spec/models/resources_host_spec.rb new file mode 100644 index 00000000..ce470f56 --- /dev/null +++ b/spec/models/resources_host_spec.rb @@ -0,0 +1,147 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesHost +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesHost do + let(:instance) { Falcon::ResourcesHost.new } + + describe 'test an instance of ResourcesHost' do + it 'should create an instance of ResourcesHost' do + expect(instance).to be_instance_of(Falcon::ResourcesHost) + end + end + describe 'test attribute "aid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "apps"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cve_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exprt_ratings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "managed_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "os_build"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "os_version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "platform_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "platform_os_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "platform_os_version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "recommendations"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sensor_priority"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "snapshot_detections"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ssm_managed"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "state"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "vulnerabilities"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "vulnerabilities_count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_relationship_spec.rb b/spec/models/resources_relationship_spec.rb new file mode 100644 index 00000000..6bde30a1 --- /dev/null +++ b/spec/models/resources_relationship_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesRelationship +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesRelationship do + let(:instance) { Falcon::ResourcesRelationship.new } + + describe 'test an instance of ResourcesRelationship' do + it 'should create an instance of ResourcesRelationship' do + expect(instance).to be_instance_of(Falcon::ResourcesRelationship) + end + end + describe 'test attribute "crn"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "relationship_name"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resource_type"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/resources_vulnerability_spec.rb b/spec/models/resources_vulnerability_spec.rb new file mode 100644 index 00000000..9047380b --- /dev/null +++ b/spec/models/resources_vulnerability_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ResourcesVulnerability +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ResourcesVulnerability do + let(:instance) { Falcon::ResourcesVulnerability.new } + + describe 'test an instance of ResourcesVulnerability' do + it 'should create an instance of ResourcesVulnerability' do + expect(instance).to be_instance_of(Falcon::ResourcesVulnerability) + end + end + describe 'test attribute "app"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "cve_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exprt_rating"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rest_azure_download_script_request_data_spec.rb b/spec/models/rest_azure_download_script_request_data_spec.rb new file mode 100644 index 00000000..d5e28343 --- /dev/null +++ b/spec/models/rest_azure_download_script_request_data_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestAzureDownloadScriptRequestData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestAzureDownloadScriptRequestData do + let(:instance) { Falcon::RestAzureDownloadScriptRequestData.new } + + describe 'test an instance of RestAzureDownloadScriptRequestData' do + it 'should create an instance of RestAzureDownloadScriptRequestData' do + expect(instance).to be_instance_of(Falcon::RestAzureDownloadScriptRequestData) + end + end + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rest_azure_download_script_request_v1_spec.rb b/spec/models/rest_azure_download_script_request_v1_spec.rb new file mode 100644 index 00000000..c1836007 --- /dev/null +++ b/spec/models/rest_azure_download_script_request_v1_spec.rb @@ -0,0 +1,51 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestAzureDownloadScriptRequestV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestAzureDownloadScriptRequestV1 do + let(:instance) { Falcon::RestAzureDownloadScriptRequestV1.new } + + describe 'test an instance of RestAzureDownloadScriptRequestV1' do + it 'should create an instance of RestAzureDownloadScriptRequestV1' do + expect(instance).to be_instance_of(Falcon::RestAzureDownloadScriptRequestV1) + end + end + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rest_azure_provision_get_account_script_response_v1_spec.rb b/spec/models/rest_azure_provision_get_account_script_response_v1_spec.rb new file mode 100644 index 00000000..7189542d --- /dev/null +++ b/spec/models/rest_azure_provision_get_account_script_response_v1_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestAzureProvisionGetAccountScriptResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestAzureProvisionGetAccountScriptResponseV1 do + let(:instance) { Falcon::RestAzureProvisionGetAccountScriptResponseV1.new } + + describe 'test an instance of RestAzureProvisionGetAccountScriptResponseV1' do + it 'should create an instance of RestAzureProvisionGetAccountScriptResponseV1' do + expect(instance).to be_instance_of(Falcon::RestAzureProvisionGetAccountScriptResponseV1) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rest_azure_script_spec.rb b/spec/models/rest_azure_script_spec.rb new file mode 100644 index 00000000..4ebee0ef --- /dev/null +++ b/spec/models/rest_azure_script_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestAzureScript +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestAzureScript do + let(:instance) { Falcon::RestAzureScript.new } + + describe 'test an instance of RestAzureScript' do + it 'should create an instance of RestAzureScript' do + expect(instance).to be_instance_of(Falcon::RestAzureScript) + end + end + describe 'test attribute "cid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tenant_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rest_cursor_and_limit_meta_info_spec.rb b/spec/models/rest_cursor_and_limit_meta_info_spec.rb new file mode 100644 index 00000000..4206468b --- /dev/null +++ b/spec/models/rest_cursor_and_limit_meta_info_spec.rb @@ -0,0 +1,81 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestCursorAndLimitMetaInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestCursorAndLimitMetaInfo do + let(:instance) { Falcon::RestCursorAndLimitMetaInfo.new } + + describe 'test an instance of RestCursorAndLimitMetaInfo' do + it 'should create an instance of RestCursorAndLimitMetaInfo' do + expect(instance).to be_instance_of(Falcon::RestCursorAndLimitMetaInfo) + end + end + describe 'test attribute "_next"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pagination"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "powered_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "query_time"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "trace_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "writes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rest_cursor_meta_info_spec.rb b/spec/models/rest_cursor_meta_info_spec.rb new file mode 100644 index 00000000..c82ff027 --- /dev/null +++ b/spec/models/rest_cursor_meta_info_spec.rb @@ -0,0 +1,75 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestCursorMetaInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestCursorMetaInfo do + let(:instance) { Falcon::RestCursorMetaInfo.new } + + describe 'test an instance of RestCursorMetaInfo' do + it 'should create an instance of RestCursorMetaInfo' do + expect(instance).to be_instance_of(Falcon::RestCursorMetaInfo) + end + end + describe 'test attribute "_next"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "powered_by"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "query_time"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "trace_id"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "writes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/rest_cursor_response_fields_spec.rb b/spec/models/rest_cursor_response_fields_spec.rb new file mode 100644 index 00000000..60caf587 --- /dev/null +++ b/spec/models/rest_cursor_response_fields_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestCursorResponseFields +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestCursorResponseFields do + let(:instance) { Falcon::RestCursorResponseFields.new } + + describe 'test an instance of RestCursorResponseFields' do + it 'should create an instance of RestCursorResponseFields' do + expect(instance).to be_instance_of(Falcon::RestCursorResponseFields) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/client_fql_statement_spec.rb b/spec/models/rest_paging_spec.rb similarity index 80% rename from spec/models/client_fql_statement_spec.rb rename to spec/models/rest_paging_spec.rb index d7ccdd2b..ec87f462 100644 --- a/spec/models/client_fql_statement_spec.rb +++ b/spec/models/rest_paging_spec.rb @@ -31,30 +31,30 @@ require 'json' require 'date' -# Unit tests for Falcon::ClientFQLStatement +# Unit tests for Falcon::RestPaging # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::ClientFQLStatement do - let(:instance) { Falcon::ClientFQLStatement.new } +describe Falcon::RestPaging do + let(:instance) { Falcon::RestPaging.new } - describe 'test an instance of ClientFQLStatement' do - it 'should create an instance of ClientFQLStatement' do - expect(instance).to be_instance_of(Falcon::ClientFQLStatement) + describe 'test an instance of RestPaging' do + it 'should create an instance of RestPaging' do + expect(instance).to be_instance_of(Falcon::RestPaging) end end - describe 'test attribute "op"' do + describe 'test attribute "limit"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "prop"' do + describe 'test attribute "offset"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "value"' do + describe 'test attribute "total"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end diff --git a/spec/models/restapi_indicator_response_spec.rb b/spec/models/restapi_indicator_response_spec.rb new file mode 100644 index 00000000..4ff48b76 --- /dev/null +++ b/spec/models/restapi_indicator_response_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestapiIndicatorResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestapiIndicatorResponse do + let(:instance) { Falcon::RestapiIndicatorResponse.new } + + describe 'test an instance of RestapiIndicatorResponse' do + it 'should create an instance of RestapiIndicatorResponse' do + expect(instance).to be_instance_of(Falcon::RestapiIndicatorResponse) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/restapi_indicators_query_request_spec.rb b/spec/models/restapi_indicators_query_request_spec.rb new file mode 100644 index 00000000..d5ad20b3 --- /dev/null +++ b/spec/models/restapi_indicators_query_request_spec.rb @@ -0,0 +1,57 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestapiIndicatorsQueryRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestapiIndicatorsQueryRequest do + let(:instance) { Falcon::RestapiIndicatorsQueryRequest.new } + + describe 'test an instance of RestapiIndicatorsQueryRequest' do + it 'should create an instance of RestapiIndicatorsQueryRequest' do + expect(instance).to be_instance_of(Falcon::RestapiIndicatorsQueryRequest) + end + end + describe 'test attribute "filter"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sort"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/restapi_indicators_query_sort_request_spec.rb b/spec/models/restapi_indicators_query_sort_request_spec.rb new file mode 100644 index 00000000..2e474481 --- /dev/null +++ b/spec/models/restapi_indicators_query_sort_request_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RestapiIndicatorsQuerySortRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RestapiIndicatorsQuerySortRequest do + let(:instance) { Falcon::RestapiIndicatorsQuerySortRequest.new } + + describe 'test an instance of RestapiIndicatorsQuerySortRequest' do + it 'should create an instance of RestapiIndicatorsQuerySortRequest' do + expect(instance).to be_instance_of(Falcon::RestapiIndicatorsQuerySortRequest) + end + end + describe 'test attribute "field"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "missing"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "order"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/sadomain_typosquatting_base_domain_spec.rb b/spec/models/sadomain_typosquatting_base_domain_spec.rb index 2532ba8c..3cc6f83c 100644 --- a/spec/models/sadomain_typosquatting_base_domain_spec.rb +++ b/spec/models/sadomain_typosquatting_base_domain_spec.rb @@ -66,6 +66,18 @@ end end + describe 'test attribute "submit_for_blocking_info"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "submit_for_takedown_info"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "unicode_format"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/sadomain_typosquatting_subdomain_spec.rb b/spec/models/sadomain_typosquatting_subdomain_spec.rb index 48ca89b2..0d126630 100644 --- a/spec/models/sadomain_typosquatting_subdomain_spec.rb +++ b/spec/models/sadomain_typosquatting_subdomain_spec.rb @@ -54,12 +54,6 @@ end end - describe 'test attribute "is_registered"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - describe 'test attribute "last_seen"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/string_wrapper_spec.rb b/spec/models/string_wrapper_spec.rb new file mode 100644 index 00000000..baa469f3 --- /dev/null +++ b/spec/models/string_wrapper_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::StringWrapper +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::StringWrapper do + let(:instance) { Falcon::StringWrapper.new } + + describe 'test an instance of StringWrapper' do + it 'should create an instance of StringWrapper' do + expect(instance).to be_instance_of(Falcon::StringWrapper) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/types_get_executor_nodes_metadata_response_spec.rb b/spec/models/types_get_executor_nodes_metadata_response_spec.rb new file mode 100644 index 00000000..1582cb0d --- /dev/null +++ b/spec/models/types_get_executor_nodes_metadata_response_spec.rb @@ -0,0 +1,75 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::TypesGetExecutorNodesMetadataResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::TypesGetExecutorNodesMetadataResponse do + let(:instance) { Falcon::TypesGetExecutorNodesMetadataResponse.new } + + describe 'test an instance of TypesGetExecutorNodesMetadataResponse' do + it 'should create an instance of TypesGetExecutorNodesMetadataResponse' do + expect(instance).to be_instance_of(Falcon::TypesGetExecutorNodesMetadataResponse) + end + end + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "executor_node_ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "executor_node_names"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "executor_node_states"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "executor_node_types"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/types_get_integration_tasks_metadata_response_spec.rb b/spec/models/types_get_integration_tasks_metadata_response_spec.rb new file mode 100644 index 00000000..b5475cb7 --- /dev/null +++ b/spec/models/types_get_integration_tasks_metadata_response_spec.rb @@ -0,0 +1,69 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::TypesGetIntegrationTasksMetadataResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::TypesGetIntegrationTasksMetadataResponse do + let(:instance) { Falcon::TypesGetIntegrationTasksMetadataResponse.new } + + describe 'test an instance of TypesGetIntegrationTasksMetadataResponse' do + it 'should create an instance of TypesGetIntegrationTasksMetadataResponse' do + expect(instance).to be_instance_of(Falcon::TypesGetIntegrationTasksMetadataResponse) + end + end + describe 'test attribute "count"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "integration_task_types"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "names"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/models/v2_for_loop_spec.rb b/spec/models/v2_for_loop_spec.rb index 02309218..a387d394 100644 --- a/spec/models/v2_for_loop_spec.rb +++ b/spec/models/v2_for_loop_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::V2ForLoop) end end + describe 'test attribute "cel_condition"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "condition"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/vulnerabilities_vulnerability_entity_sarif_response_spec.rb b/spec/models/vulnerabilities_vulnerability_entity_sarif_response_spec.rb new file mode 100644 index 00000000..aca47f4c --- /dev/null +++ b/spec/models/vulnerabilities_vulnerability_entity_sarif_response_spec.rb @@ -0,0 +1,63 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse do + let(:instance) { Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse.new } + + describe 'test an instance of VulnerabilitiesVulnerabilityEntitySARIFResponse' do + it 'should create an instance of VulnerabilitiesVulnerabilityEntitySARIFResponse' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesVulnerabilityEntitySARIFResponse) + end + end + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "resources"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end