From 58b7df7b89c5ac0b601e63bee50958312c643182 Mon Sep 17 00:00:00 2001 From: Carlos Matos Date: Fri, 16 Feb 2024 12:47:46 -0500 Subject: [PATCH] feat(sdk): swagger updates for 2024-01-26 release (#28) Latest swagger updates from end of January --- .openapi-generator/VERSION | 2 +- README.md | 1828 +++++++++- docs/AlertsApi.md | 356 +- docs/AlertsContainerAlertsCountValue.md | 22 + docs/AlertsContainerAlertsEntityResponse.md | 22 + docs/ApiDetectsQueryMeta.md | 24 + docs/ApiDetectsQueryPaging.md | 22 + docs/ApiDeviceCountRespV1.md | 22 + docs/ApiDeviceCountV1.md | 24 + docs/ApiDevicesRanOnRespV1.md | 22 + ...tiesResponse.md => ApiEntitiesResponse.md} | 6 +- docs/ApiExecutionResultsResponse.md | 22 + docs/ApiExposedDataRecordBotLocationV1.md | 20 + ...piExposedDataRecordBotOperatingSystemV1.md | 40 + docs/ApiExposedDataRecordBotV1.md | 32 + docs/ApiExposedDataRecordFinancialV1.md | 6 +- docs/ApiExposedDataRecordLocationV1.md | 12 +- docs/ApiExposedDataRecordSocialV1.md | 18 +- docs/ApiMetaInfo.md | 24 + docs/ApiNotificationExposedDataRecordV1.md | 6 + docs/ApiObjectMetadata.md | 26 + docs/ApiProcessesRanOnRespV1.md | 22 + ...sResponse.md => ApiResourceIDsResponse.md} | 6 +- docs/ApiResponsePagination.md | 20 + .../ApidomainDynamicExecuteSearchRequestV1.md | 26 + docs/ApidomainQueryResponseV1.md | 28 + docs/ApidomainQueryResponseWrapperV1.md | 22 + docs/ApidomainRepoViewListItemV1.md | 34 + docs/ApidomainRepoViewListItemWrapperV1.md | 22 + docs/ApidomainRepositoryV1.md | 26 + docs/ApidomainSavedSearchExecuteRequestV1.md | 38 + docs/ApidomainViewConnectionV1.md | 20 + docs/{PublicACL.md => ChangesACL.md} | 6 +- ...PublicACLChange.md => ChangesACLChange.md} | 4 +- docs/{PublicAfter.md => ChangesAfter.md} | 4 +- ...PublicAttribute.md => ChangesAttribute.md} | 4 +- docs/{PublicBasic.md => ChangesBasic.md} | 4 +- docs/{PublicBefore.md => ChangesBefore.md} | 4 +- docs/{PublicChange.md => ChangesChange.md} | 20 +- docs/{PublicDACL.md => ChangesDACL.md} | 6 +- ...blicDACLEntity.md => ChangesDACLEntity.md} | 8 +- docs/{PublicDiff.md => ChangesDiff.md} | 6 +- .../{PublicDiffHash.md => ChangesDiffHash.md} | 4 +- .../{PublicDiffType.md => ChangesDiffType.md} | 6 +- docs/ChangesGetChangesResponse.md | 22 + docs/ChangesGroup.md | 20 + docs/ChangesHighVolumeQueryMeta.md | 24 + docs/ChangesHighVolumeQueryPaging.md | 22 + docs/ChangesHighVolumeQueryResponse.md | 22 + docs/{PublicHost.md => ChangesHost.md} | 6 +- ...PublicHostGroup.md => ChangesHostGroup.md} | 4 +- docs/ChangesOwner.md | 20 + ...icPermissions.md => ChangesPermissions.md} | 10 +- docs/ChangesPermissionsLin.md | 28 + docs/{PublicPolicy.md => ChangesPolicy.md} | 6 +- ...blicPolicyRule.md => ChangesPolicyRule.md} | 4 +- ...RuleGroup.md => ChangesPolicyRuleGroup.md} | 6 +- ...blicPrevalence.md => ChangesPrevalence.md} | 4 +- docs/{PublicTag.md => ChangesTag.md} | 4 +- docs/ClientActionRequest.md | 18 + docs/ClientCost.md | 22 + docs/ClientCosts.md | 24 + docs/ClientDataIngestResponseV1.md | 20 + docs/ClientDataIngestResponseWrapperV1.md | 22 + docs/ClientDigestFlow.md | 22 + docs/ClientExtraIn.md | 20 + docs/ClientExtraLimit.md | 20 + docs/ClientExtraRename.md | 20 + docs/ClientExtraSort.md | 26 + docs/ClientField.md | 22 + docs/ClientJobStatus.md | 40 + docs/ClientQueryResponseSchemasV1.md | 20 + docs/ClientQueryResultMetadata.md | 54 + docs/ClientRepository.md | 24 + docs/ClientSpent.md | 24 + docs/ClientSystemDefinitionCreateResponse.md | 22 + ...lientSystemDefinitionDeProvisionRequest.md | 24 + docs/ClientSystemDefinitionPromoteRequest.md | 28 + .../ClientSystemDefinitionProvisionRequest.md | 26 + docs/ClientTopValue.md | 20 + docs/CloudSnapshotsApi.md | 77 + docs/CommonCountAsResource.md | 20 + docs/CommonCountResponse.md | 22 + docs/CommonGenericEntityResponseString.md | 22 + docs/ConfigurationAssessmentApi.md | 70 + docs/ContainerAlertsApi.md | 229 ++ docs/ContainerDetectionsApi.md | 453 +++ docs/ContainerImagesApi.md | 763 +++++ docs/ContainerPackagesApi.md | 391 +++ docs/ContainerVulnerabilitiesApi.md | 771 +++++ docs/CspmRegistrationApi.md | 798 ++++- docs/CustomIoaApi.md | 4 +- docs/CustomStorageApi.md | 465 +++ docs/CustomType1255839303.md | 22 + docs/CustomType3191042536.md | 22 + docs/D4cRegistrationApi.md | 296 +- docs/DefinitionsDefinitionEntitiesResponse.md | 22 + docs/DefinitionsDefinitionExt.md | 26 + docs/DefinitionsDefinitionExternalResponse.md | 22 + docs/DefinitionsDefinitionImportResponse.md | 22 + ...finitionsDefinitionImportResponseEntity.md | 28 + docs/DefinitionsFlightControlRequest.md | 24 + docs/DefinitionsParameterProperty.md | 18 + docs/DefinitionsPlaybookParameter.md | 20 + docs/DetectionsApiAssessmentDetections.md | 22 + docs/DetectionsApiCombinedDetections.md | 22 + docs/DetectionsApiDetectionsBySeverity.md | 22 + docs/DetectionsApiDetectionsByType.md | 22 + docs/DetectionsApiDetectionsCount.md | 22 + docs/DetectsAlert.md | 82 +- docs/DetectsapiAggregateAlertQueryRequest.md | 52 + docs/DetectsapiAggregatesResponse.md | 22 + docs/DetectsapiAggregationResult.md | 22 + docs/DetectsapiAggregationResultItem.md | 36 + docs/DetectsapiAlertQueryResponse.md | 22 + .../DetectsapiPatchEntitiesAlertsV3Request.md | 20 + docs/DetectsapiPostEntitiesAlertsV1Request.md | 2 +- .../DetectsapiPostEntitiesAlertsV1Response.md | 2 +- docs/DetectsapiPostEntitiesAlertsV2Request.md | 18 + .../DetectsapiPostEntitiesAlertsV2Response.md | 22 + docs/DetectsapiResponseFields.md | 20 + docs/DeviceDevice.md | 4 + docs/DeviceMappedDevicePolicies.md | 2 + docs/DeviceapiDeviceSwagger.md | 8 + docs/DomainAPIFindingRuleV1.md | 4 + docs/DomainAPIFindingWithRuleV1.md | 2 + docs/DomainAPIHostInfoFacetV1.md | 2 + docs/DomainAPIRuleDetailsResponseV1.md | 22 + docs/DomainAPIRuleDetailsV1.md | 46 + docs/DomainAPIVulnerabilityAppV2.md | 4 +- ...DomainAPIVulnerabilityCVEDetailsFacetV2.md | 2 + docs/DomainAPIVulnerabilityExtendedAppV2.md | 4 +- docs/DomainAPIVulnerabilityHostFacetV2.md | 2 - docs/DomainAPIVulnerabilityV2.md | 6 +- docs/DomainAWSAccountInput.md | 28 + docs/DomainAWSAccountV2.md | 2 + docs/DomainAWSBatchClusterRegion.md | 22 + docs/DomainActorDocument.md | 56 +- docs/DomainActorEntity.md | 22 + docs/DomainActorNewsDocument.md | 24 + docs/DomainAssetCriticalityInfoV1.md | 22 + docs/DomainAttachment.md | 30 + ...omainAzureManagementGroupRoleAssignment.md | 24 + docs/DomainBaseAPIVulnerabilityV2.md | 6 +- docs/DomainBreachedItemV1.md | 26 +- docs/DomainCIDGroup.md | 4 + docs/DomainCIDPolicyAssignments.md | 4 + docs/DomainCard.md | 30 + docs/DomainCloudScope.md | 4 +- docs/DomainCredentials.md | 8 +- docs/DomainDetailedNotificationV1.md | 2 +- docs/DomainDevice.md | 2 + docs/DomainDevicePolicy.md | 18 + docs/DomainDiscoverAPIHost.md | 18 +- docs/DomainDiscoverAPIIoTHost.md | 12 + docs/DomainExposedDataRecordBotLocationV1.md | 20 + ...inExposedDataRecordBotOperatingSystemV1.md | 40 + docs/DomainExposedDataRecordBotV1.md | 32 + docs/DomainExposedDataRecordSocialV1.md | 4 +- docs/DomainFileCountV2.md | 26 + docs/DomainFragmentInfo.md | 30 + docs/DomainGCPAccountV1.md | 2 + docs/DomainHost.md | 42 + docs/DomainIOC.md | 88 + docs/DomainIncident.md | 4 +- docs/DomainItemDetailsV1.md | 70 + docs/DomainLaunchExportJobRequestV1.md | 2 +- docs/DomainMappedDevicePolicies.md | 18 + docs/DomainMarketplaceProduct.md | 30 + docs/DomainMatchedBreachSummaryV1.md | 4 + docs/DomainMetaInfo.md | 14 +- docs/DomainMsaMetaInfo.md | 20 - docs/DomainNewsDocument.md | 2 + docs/DomainNotificationDetailsV1.md | 36 - docs/DomainNotificationV1.md | 2 + docs/DomainPolicyInfo.md | 4 + docs/DomainQueryResponse.md | 4 +- docs/DomainReportMalware.md | 22 + docs/DomainRule.md | 28 +- docs/DomainScan.md | 16 +- docs/DomainScanProfile.md | 4 +- docs/DomainScanV2.md | 92 + docs/DomainSchedule.md | 12 +- docs/DomainSession.md | 10 +- docs/DomainTelegramChannelInfo.md | 20 + docs/DomainTelegramInfo.md | 22 + docs/DomainTelegramRecipientInfo.md | 28 + docs/DomainTelegramSenderInfo.md | 28 + docs/DomainThreatEntity.md | 18 + docs/DomainUser.md | 8 +- docs/DomainUserGrants.md | 8 +- docs/DriftIndicatorsApi.md | 381 +++ docs/DriftindicatorsDriftEntityResponse.md | 22 + ...riftindicatorsDriftIndicatorsCountValue.md | 22 + ...riftindicatorsDriftIndicatorsFieldValue.md | 22 + docs/EmpowerapiFalconScript.md | 60 + docs/EmpowerapiMsaFalconScriptResponse.md | 22 + docs/EmpowerapiMsaIDListResponse.md | 22 + ...sponse.md => EntitiesODSScanResponseV2.md} | 6 +- docs/ExecutionsActivityExecutionResult.md | 40 + docs/ExecutionsAncestorExecution.md | 22 + docs/ExecutionsChildExecutionResult.md | 26 + docs/ExecutionsExecutionResult.md | 38 + docs/ExecutionsIterations.md | 28 + docs/ExecutionsLoopResult.md | 36 + docs/ExecutionsReferenceLink.md | 20 + docs/ExecutionsTriggerResult.md | 24 + docs/FalconCompleteDashboardApi.md | 414 ++- docs/FalconContainerImageApi.md | 78 - docs/FalconxSandboxApi.md | 4 +- docs/FalconxSandboxParametersV1.md | 4 +- docs/FalconxSubmissionV1.md | 8 + docs/FilevantageApi.md | 1852 +++++++++- docs/Flows.md | 22 + docs/FoundryLogscaleApi.md | 1005 ++++++ docs/FwmgrMsaAggregationResult.md | 2 + docs/GraphCondition.md | 22 + docs/GraphConfiguredActivity.md | 28 + docs/GraphConfiguredTrigger.md | 30 + docs/GraphDefinitionModel.md | 30 + docs/GraphEnd.md | 20 + docs/GraphFlow.md | 24 + docs/GraphGateway.md | 22 + docs/GraphMulti.md | 24 + docs/GraphSubModel.md | 28 + docs/GraphTimerEventDefinition.md | 26 + docs/GraphValidationError.md | 30 + docs/HostsApi.md | 148 +- docs/ImageAssessmentPoliciesApi.md | 772 +++++ docs/ImagesApiCombinedImageExport.md | 22 + docs/ImagesApiCustomerAndImage.md | 22 + docs/ImagesApiImageAssessmentHistory.md | 22 + docs/ImagesApiImageByVulnerabilityCount.md | 22 + docs/ImagesApiImageCount.md | 22 + docs/ImagesApiImageCountByBaseOS.md | 22 + docs/ImagesApiImageCountByState.md | 22 + docs/ImagesApiImageIssuesSummary.md | 22 + docs/ImagesApiImageVulnerabilitiesSummary.md | 22 + docs/InstallationTokensApi.md | 32 +- docs/InstallationTokensSettingsApi.md | 8 +- docs/IntelApi.md | 8 +- docs/InternalSensorStatus.md | 16 + docs/InventoriesApi.md | 77 - docs/IocApi.md | 230 ++ docs/JsonschemaAuthorization.md | 24 + docs/JsonschemaCollectionIndexField.md | 22 + docs/JsonschemaComplexPermissions.md | 18 + docs/JsonschemaComplexPermissionsOR.md | 18 + docs/JsonschemaConditionGroupFields.md | 26 + docs/JsonschemaPermission.md | 20 + docs/JsonschemaPivot.md | 34 + docs/JsonschemaResetFields.md | 18 + docs/JsonschemaSchema.md | 20 + docs/JsonschemaSignalsExtensions.md | 22 + docs/JsonschemaSubSchema.md | 134 + docs/JsonschemaWorkflowExtensions.md | 28 + docs/K8sassetsClusterEnrichmentData.md | 22 + docs/K8sassetsClusterEnrichmentEntry.md | 20 + docs/K8sassetsClusterEnrichmentResponse.md | 22 + docs/K8sassetsContainerEnrichmentData.md | 18 + docs/K8sassetsContainerEnrichmentEntry.md | 20 + docs/K8sassetsContainerEnrichmentResponse.md | 22 + docs/K8sassetsContainerInfo.md | 20 + docs/K8sassetsDeploymentEnrichmentData.md | 18 + docs/K8sassetsDeploymentEnrichmentEntry.md | 20 + docs/K8sassetsDeploymentEnrichmentResponse.md | 22 + docs/K8sassetsNodeEnrichmentData.md | 20 + docs/K8sassetsNodeEnrichmentEntry.md | 20 + docs/K8sassetsNodeEnrichmentResponse.md | 22 + docs/K8sassetsPodEnrichmentData.md | 22 + docs/K8sassetsPodEnrichmentEntry.md | 20 + docs/K8sassetsPodEnrichmentResponse.md | 22 + docs/K8siomsKubernetesIOMCountValue.md | 22 + docs/K8siomsKubernetesIOMEntityResponse.md | 22 + docs/K8siomsKubernetesIOMFieldValue.md | 22 + docs/KubernetesProtectionApi.md | 3026 ++++++++++++++++- docs/MessageCenterApi.md | 28 +- docs/ModelUserInputReadResponse.md | 22 + docs/ModelUserInputUpdateRequest.md | 20 + docs/ModelUserInputViewModel.md | 36 + docs/ModelsAPIAssessmentDetections.md | 52 + docs/ModelsAPICombinedDetections.md | 40 + docs/ModelsAPIContainerAlert.md | 32 + docs/ModelsAPICustomerAndImage.md | 50 + docs/ModelsAPIDetectionCount.md | 18 + docs/ModelsAPIDetectionCountByType.md | 20 + docs/ModelsAPIDriftIndicators.md | 66 + docs/ModelsAPIFilterLabel.md | 20 + docs/ModelsAPIFilterResponse.md | 20 + docs/ModelsAPIImageAssessment.md | 28 + docs/ModelsAPIImageAssessmentHistory.md | 20 + docs/ModelsAPIImageByVulnerabilityCount.md | 26 + docs/ModelsAPIImageCombinedExport.md | 56 + docs/ModelsAPIImageCount.md | 18 + docs/ModelsAPIImageIssuesSummary.md | 34 + docs/ModelsAPIImageVulnerabilitiesSummary.md | 34 + docs/ModelsAPIKubernetesIOM.md | 114 + docs/ModelsAPIPackageCombined.md | 32 + docs/ModelsAPIPackageVulnerability.md | 24 + docs/ModelsAPIPackagesByVulnCount.md | 28 + docs/ModelsAPIPolicyCountByAction.md | 20 + docs/ModelsAPIPolicyData.md | 20 + docs/ModelsAPIPolicyEntity.md | 32 + docs/ModelsAPIPolicyExclusion.md | 28 + docs/ModelsAPIPolicyGroup.md | 30 + docs/ModelsAPIPolicyGroupData.md | 18 + docs/ModelsAPIPolicyRule.md | 20 + docs/ModelsAPIPolicyRulesData.md | 18 + docs/ModelsAPIPrecedenceRequest.md | 18 + docs/ModelsAPIRuntimeDetection.md | 124 + docs/ModelsAPIUnidentifiedContainer.md | 58 + docs/ModelsAPIVulnByImageCount.md | 24 + docs/ModelsAPIVulnByPublicationDate.md | 28 + docs/ModelsAPIVulnCount.md | 18 + docs/ModelsAPIVulnCountBySeverity.md | 20 + docs/ModelsAPIVulnerabilityCombined.md | 42 + docs/ModelsAPIVulnerabilityDetails.md | 36 + docs/ModelsAPIVulnerabilityInfo.md | 38 + docs/ModelsAccountEntitiesInput.md | 18 + docs/ModelsAccountStatusResponse.md | 22 + docs/ModelsAggregateValuesByFieldResponse.md | 22 + docs/ModelsCluster.md | 60 + docs/ModelsClusterEntityResponse.md | 22 + docs/ModelsContainer.md | 144 + docs/ModelsContainerCoverage.md | 20 + docs/ModelsContainerCoverageResponseEntity.md | 22 + docs/ModelsContainerEntityResponse.md | 22 + docs/ModelsContainerImage.md | 48 + docs/ModelsContainerInformation.md | 20 + docs/ModelsContainerRuntimePivot.md | 34 + docs/ModelsContainerRuntimePivotResponse.md | 22 + docs/ModelsCreateImageGroupRequest.md | 24 + docs/ModelsCreatePolicyRequest.md | 20 + docs/ModelsDefinitionCreateRequestV2.md | 22 + docs/ModelsDefinitionUpdateRequestV2.md | 26 + docs/ModelsDeployment.md | 34 + docs/ModelsDeploymentEntityResponse.md | 22 + docs/ModelsExclusionCondition.md | 30 + docs/ModelsExclusionConditionRequest.md | 24 + docs/ModelsImageInformation.md | 22 + docs/ModelsImageSummaryPackagesInfo.md | 20 + docs/ModelsIssuesSummaryContainerInfo.md | 22 + docs/ModelsJobMetaData.md | 32 - docs/ModelsLightWeightConfig.md | 32 + docs/ModelsNode.md | 86 + docs/ModelsNodeEntityResponse.md | 22 + docs/ModelsPackageNameVersionType.md | 26 + docs/ModelsPatchImageGroupRequest.md | 22 + docs/ModelsPatchPolicyRequest.md | 24 + docs/ModelsPod.md | 100 + docs/ModelsPodEntityResponse.md | 22 + docs/ModelsPolicyEntityResponse.md | 22 + docs/ModelsPolicyExclusionEntityResponse.md | 22 + docs/ModelsPolicyGroupEntityResponse.md | 22 + docs/ModelsRequestAPIPolicyData.md | 18 + docs/ModelsScanResults.md | 20 - docs/ModelsSnapshotAccountStatus.md | 32 + docs/ModelsSnapshotInventoryApplication.md | 34 - docs/ModelsSnapshotInventoryPayload.md | 20 - docs/ModelsUpdateExclusionsRequest.md | 18 + docs/MsaAggregationResult.md | 2 + docs/OdsApi.md | 80 +- docs/PackagesApiCombinedPackage.md | 22 + docs/PackagesApiCombinedPackageExport.md | 22 + docs/PackagesApiPackagesByVulnCount.md | 22 + docs/ParameterActivityConfigParameterValue.md | 22 + ...rameterActivityConfigProvisionParameter.md | 20 + docs/ParameterActivityProvisionParameters.md | 20 + docs/ParameterActivitySelectionParameter.md | 22 + docs/ParameterConditionFieldParameter.md | 26 + ...rameterConditionFieldProvisionParameter.md | 22 + docs/ParameterConditionProvisionParameter.md | 20 + docs/ParameterTemplateProvisionParameters.md | 22 + docs/ParameterTriggerFieldParameter.md | 22 + docs/ParameterTriggerParameter.md | 20 + docs/ParameterTriggerProvisionParameter.md | 20 + docs/PoliciesAssignedHostGroup.md | 20 + docs/PoliciesAssignedRuleGroup.md | 20 + docs/PoliciesCreateRequest.md | 22 + docs/PoliciesDeleteResponse.md | 22 + docs/PoliciesPolicy.md | 40 + docs/PoliciesPrecedenceResponse.md | 22 + docs/PoliciesResponse.md | 22 + docs/PoliciesUpdateRequest.md | 24 + docs/PublicGroup.md | 20 - docs/PublicOwner.md | 20 - docs/PublicPermissionsLin.md | 28 - docs/QuarantineQuarantinedFile.md | 2 + docs/RealTimeResponseAdminApi.md | 148 + docs/RealTimeResponseAuditApi.md | 87 + docs/ReconApi.md | 16 +- docs/RegistrationAWSAccountPatch.md | 2 + docs/RegistrationAzureAccountPatch.md | 20 + docs/RegistrationAzureAccountPatchRequest.md | 18 + docs/RegistrationAzureAccountV1Ext.md | 6 + ...eManagementGroupCreateRequestExternalV1.md | 18 + ...istrationAzureManagementGroupExternalV1.md | 20 + ...istrationAzureManagementGroupResponseV1.md | 22 + docs/RegistrationAzureManagementGroupV1Ext.md | 56 + docs/RegistrationGCPAccountExtRequestV2.md | 18 + docs/RegistrationGCPAccountPatch.md | 20 + docs/RegistrationGCPAccountPatchRequest.md | 18 + docs/RegistrationGCPAccountReqObjV2.md | 32 + docs/RegistrationGCPAccountResponseExtV2.md | 22 + docs/RegistrationGCPAccountRspObjV2.md | 28 + docs/RegistrationGCPServiceAccountExtV1.md | 24 + ...istrationGCPServiceAccountResponseExtV1.md | 22 + docs/RegistrationIOMEventIDResponseMeta.md | 24 + docs/RegistrationIOMEventIDsResponseV2.md | 2 +- docs/RegistrationIOMEventV2.md | 2 + docs/RegistrationMSASpecMetaInfoExtension.md | 20 - docs/RegistrationNextTokenPagination.md | 24 + docs/RulegroupsAssignedRule.md | 20 + docs/RulegroupsCreateRequest.md | 22 + docs/RulegroupsDeleteResponse.md | 22 + docs/RulegroupsPolicyAssignment.md | 20 + docs/RulegroupsResponse.md | 22 + docs/RulegroupsRule.md | 86 + docs/RulegroupsRuleGroup.md | 36 + docs/RulegroupsRulesResponse.md | 22 + docs/RulegroupsUpdateRequest.md | 22 + docs/RuntimeDetectionsApi.md | 85 + ...ntimedetectionsDetectionsEntityResponse.md | 22 + ...fo.md => SadomainSubmissionInformation.md} | 4 +- docs/SadomainTyposquattingComponent.md | 4 +- docs/ScheduledexclusionsCreateRequest.md | 34 + docs/ScheduledexclusionsRepeated.md | 30 + docs/ScheduledexclusionsResponse.md | 22 + docs/ScheduledexclusionsScheduledExclusion.md | 40 + docs/ScheduledexclusionsUpdateRequest.md | 36 + ...cApi.md => SpotlightEvaluationLogicApi.md} | 26 +- ...sApi.md => SpotlightVulnerabilitiesApi.md} | 42 +- docs/SvExclusionsCreateReqV1.md | 2 + docs/SvExclusionsSVExclusionV1.md | 2 + docs/SvExclusionsUpdateReqV1.md | 2 + docs/UnidentifiedContainersApi.md | 229 ++ ...tainersUnidentifiedContainerAPIResponse.md | 22 + ...tainersUnidentifiedContainersCountValue.md | 22 + docs/V2Activity.md | 22 + docs/V2ActivityParameters.md | 18 + docs/V2ActivityProperties.md | 18 + docs/V2Condition.md | 26 + docs/V2ConditionParameters.md | 18 + docs/V2Definition.md | 42 + docs/V2ForLoop.md | 20 + docs/V2Loop.md | 26 + docs/V2Parameters.md | 24 + docs/V2Trigger.md | 26 + ...VulnerabilitiesApiCombinedVulnerability.md | 22 + ...bilitiesApiCombinedVulnerabilityDetails.md | 22 + ...erabilitiesApiCombinedVulnerabilityInfo.md | 22 + docs/VulnerabilitiesApiVulnByImageCount.md | 22 + docs/VulnerabilitiesApiVulnByPublication.md | 22 + docs/VulnerabilitiesApiVulnCount.md | 22 + ...bilitiesApiVulnCountByActivelyExploited.md | 22 + .../VulnerabilitiesApiVulnCountByCSPRating.md | 22 + .../VulnerabilitiesApiVulnCountByCVSSScore.md | 22 + docs/VulnerabilitiesApiVulnCountBySeverity.md | 22 + docs/WorkflowsApi.md | 1035 ++++++ lib/crimson-falcon.rb | 403 ++- lib/crimson-falcon/api/alerts_api.rb | 326 +- ...entories_api.rb => cloud_snapshots_api.rb} | 32 +- .../api/configuration_assessment_api.rb | 62 + .../api/container_alerts_api.rb | 222 ++ .../api/container_detections_api.rb | 408 +++ .../api/container_images_api.rb | 711 ++++ .../api/container_packages_api.rb | 365 ++ .../api/container_vulnerabilities_api.rb | 693 ++++ .../api/cspm_registration_api.rb | 768 ++++- lib/crimson-falcon/api/custom_ioa_api.rb | 4 +- lib/crimson-falcon/api/custom_storage_api.rb | 590 ++++ .../api/d4c_registration_api.rb | 269 +- .../api/drift_indicators_api.rb | 350 ++ .../api/falcon_complete_dashboard_api.rb | 373 +- .../api/falcon_container_image_api.rb | 67 - lib/crimson-falcon/api/falconx_sandbox_api.rb | 4 +- lib/crimson-falcon/api/filevantage_api.rb | 1775 +++++++++- .../api/foundry_logscale_api.rb | 959 ++++++ lib/crimson-falcon/api/hosts_api.rb | 132 +- .../api/image_assessment_policies_api.rb | 738 ++++ .../api/installation_tokens_api.rb | 24 +- .../api/installation_tokens_settings_api.rb | 6 +- lib/crimson-falcon/api/intel_api.rb | 8 +- lib/crimson-falcon/api/ioc_api.rb | 226 ++ .../api/kubernetes_protection_api.rb | 2511 +++++++++++++- lib/crimson-falcon/api/message_center_api.rb | 22 +- lib/crimson-falcon/api/ods_api.rb | 74 +- .../api/real_time_response_admin_api.rb | 149 + .../api/real_time_response_audit_api.rb | 113 + lib/crimson-falcon/api/recon_api.rb | 12 +- .../api/runtime_detections_api.rb | 106 + ...i.rb => spotlight_evaluation_logic_api.rb} | 26 +- ...pi.rb => spotlight_vulnerabilities_api.rb} | 50 +- .../api/unidentified_containers_api.rb | 222 ++ lib/crimson-falcon/api/workflows_api.rb | 1037 ++++++ .../alerts_container_alerts_count_value.rb | 266 ++ ...alerts_container_alerts_entity_response.rb | 266 ++ .../models/api_detects_query_meta.rb | 271 ++ .../models/api_detects_query_paging.rb | 257 ++ .../models/api_device_count_resp_v1.rb | 266 ++ .../models/api_device_count_v1.rb | 261 ++ .../models/api_devices_ran_on_resp_v1.rb | 266 ++ ...s_response.rb => api_entities_response.rb} | 11 +- .../models/api_execution_results_response.rb | 266 ++ ...api_exposed_data_record_bot_location_v1.rb | 243 ++ ...sed_data_record_bot_operating_system_v1.rb | 339 ++ .../models/api_exposed_data_record_bot_v1.rb | 299 ++ .../api_exposed_data_record_financial_v1.rb | 3 + .../api_exposed_data_record_location_v1.rb | 6 + .../api_exposed_data_record_social_v1.rb | 9 + lib/crimson-falcon/models/api_meta_info.rb | 274 ++ ...api_notification_exposed_data_record_v1.rb | 31 +- .../models/api_object_metadata.rb | 290 ++ .../models/api_processes_ran_on_resp_v1.rb | 266 ++ ...sponse.rb => api_resource_ids_response.rb} | 8 +- .../models/api_response_pagination.rb | 249 ++ ...omain_dynamic_execute_search_request_v1.rb | 285 ++ .../models/apidomain_query_response_v1.rb | 293 ++ .../apidomain_query_response_wrapper_v1.rb | 271 ++ .../apidomain_repo_view_list_item_v1.rb | 343 ++ ...pidomain_repo_view_list_item_wrapper_v1.rb | 271 ++ .../models/apidomain_repository_v1.rb | 295 ++ ...idomain_saved_search_execute_request_v1.rb | 326 ++ .../models/apidomain_view_connection_v1.rb | 253 ++ .../models/{public_acl.rb => changes_acl.rb} | 8 +- ...ic_acl_change.rb => changes_acl_change.rb} | 6 +- .../{public_before.rb => changes_after.rb} | 6 +- ...blic_attribute.rb => changes_attribute.rb} | 6 +- .../{public_basic.rb => changes_basic.rb} | 6 +- .../{public_after.rb => changes_before.rb} | 6 +- .../{public_change.rb => changes_change.rb} | 22 +- .../{public_dacl.rb => changes_dacl.rb} | 8 +- ..._dacl_entity.rb => changes_dacl_entity.rb} | 24 +- .../{public_diff.rb => changes_diff.rb} | 8 +- ...blic_diff_hash.rb => changes_diff_hash.rb} | 6 +- ...blic_diff_type.rb => changes_diff_type.rb} | 8 +- .../models/changes_get_changes_response.rb | 266 ++ .../{public_owner.rb => changes_group.rb} | 10 +- .../models/changes_high_volume_query_meta.rb | 271 ++ .../changes_high_volume_query_paging.rb | 267 ++ .../changes_high_volume_query_response.rb | 266 ++ .../{public_host.rb => changes_host.rb} | 8 +- ...ic_host_group.rb => changes_host_group.rb} | 6 +- .../{public_group.rb => changes_owner.rb} | 10 +- ..._permissions.rb => changes_permissions.rb} | 12 +- ...ions_lin.rb => changes_permissions_lin.rb} | 16 +- .../{public_policy.rb => changes_policy.rb} | 8 +- ..._policy_rule.rb => changes_policy_rule.rb} | 6 +- ..._group.rb => changes_policy_rule_group.rb} | 8 +- ...ic_prevalence.rb => changes_prevalence.rb} | 6 +- .../models/{public_tag.rb => changes_tag.rb} | 6 +- .../models/client_action_request.rb | 242 ++ lib/crimson-falcon/models/client_cost.rb | 267 ++ lib/crimson-falcon/models/client_costs.rb | 281 ++ .../models/client_data_ingest_response_v1.rb | 253 ++ .../client_data_ingest_response_wrapper_v1.rb | 271 ++ .../models/client_digest_flow.rb | 267 ++ lib/crimson-falcon/models/client_extra_in.rb | 255 ++ .../models/client_extra_limit.rb | 253 ++ ...sa_meta_info.rb => client_extra_rename.rb} | 43 +- .../models/client_extra_sort.rb | 276 ++ lib/crimson-falcon/models/client_field.rb | 269 ++ ..._job_meta_data.rb => client_job_status.rb} | 139 +- .../client_query_response_schemas_v1.rb | 243 ++ .../models/client_query_result_metadata.rb | 495 +++ .../models/client_repository.rb | 281 ++ lib/crimson-falcon/models/client_spent.rb | 281 ++ ...lient_system_definition_create_response.rb | 271 ++ ..._system_definition_de_provision_request.rb | 285 ++ ...lient_system_definition_promote_request.rb | 314 ++ ...ent_system_definition_provision_request.rb | 299 ++ lib/crimson-falcon/models/client_top_value.rb | 253 ++ .../models/common_count_as_resource.rb | 253 ++ .../models/common_count_response.rb | 266 ++ .../common_generic_entity_response_string.rb | 266 ++ .../models/custom_type1255839303.rb | 271 ++ .../models/custom_type3191042536.rb | 271 ++ ...efinitions_definition_entities_response.rb | 271 ++ .../models/definitions_definition_ext.rb | 299 ++ ...efinitions_definition_external_response.rb | 266 ++ .../definitions_definition_import_response.rb | 266 ++ ...tions_definition_import_response_entity.rb | 288 ++ .../definitions_flight_control_request.rb | 279 ++ .../models/definitions_parameter_property.rb | 239 ++ .../models/definitions_playbook_parameter.rb | 257 ++ .../detections_api_assessment_detections.rb | 266 ++ .../detections_api_combined_detections.rb | 266 ++ .../detections_api_detections_by_severity.rb | 266 ++ .../detections_api_detections_by_type.rb | 266 ++ .../models/detections_api_detections_count.rb | 266 ++ lib/crimson-falcon/models/detects_alert.rb | 116 +- ...etectsapi_aggregate_alert_query_request.rb | 491 +++ .../models/detectsapi_aggregates_response.rb | 267 ++ .../models/detectsapi_aggregation_result.rb | 267 ++ .../detectsapi_aggregation_result_item.rb | 331 ++ .../models/detectsapi_alert_query_response.rb | 267 ++ ...ctsapi_patch_entities_alerts_v3_request.rb | 252 ++ ...ectsapi_post_entities_alerts_v1_request.rb | 1 + ...ctsapi_post_entities_alerts_v1_response.rb | 1 + ...ectsapi_post_entities_alerts_v2_request.rb | 242 ++ ...ctsapi_post_entities_alerts_v2_response.rb | 267 ++ .../models/detectsapi_response_fields.rb | 250 ++ lib/crimson-falcon/models/device_device.rb | 20 +- .../models/device_mapped_device_policies.rb | 11 +- .../models/deviceapi_device_swagger.rb | 38 +- .../models/domain_actor_document.rb | 274 +- .../models/domain_actor_entity.rb | 257 ++ .../models/domain_actor_news_document.rb | 285 ++ .../models/domain_api_finding_rule_v1.rb | 20 +- .../models/domain_api_finding_with_rule_v1.rb | 13 +- .../models/domain_api_host_info_facet_v1.rb | 11 +- .../domain_api_rule_details_response_v1.rb | 266 ++ .../models/domain_api_rule_details_v1.rb | 434 +++ .../models/domain_api_vulnerability_app_v2.rb | 18 +- ..._api_vulnerability_cve_details_facet_v2.rb | 14 +- ...omain_api_vulnerability_extended_app_v2.rb | 18 +- .../domain_api_vulnerability_host_facet_v2.rb | 12 +- .../models/domain_api_vulnerability_v2.rb | 30 +- .../domain_asset_criticality_info_v1.rb | 254 ++ .../models/domain_attachment.rb | 298 ++ .../models/domain_aws_account_input.rb | 311 ++ .../models/domain_aws_account_v2.rb | 12 +- .../models/domain_aws_batch_cluster_region.rb | 267 ++ ..._azure_management_group_role_assignment.rb | 266 ++ .../domain_base_api_vulnerability_v2.rb | 30 +- .../models/domain_breached_item_v1.rb | 41 +- lib/crimson-falcon/models/domain_card.rb | 288 ++ lib/crimson-falcon/models/domain_cid_group.rb | 20 +- .../models/domain_cid_policy_assignments.rb | 24 +- .../models/domain_cloud_scope.rb | 17 +- .../models/domain_credentials.rb | 43 +- .../models/domain_detailed_notification_v1.rb | 2 +- lib/crimson-falcon/models/domain_device.rb | 11 +- .../models/domain_device_policy.rb | 239 ++ .../models/domain_discover_api_host.rb | 76 +- .../models/domain_discover_apiio_t_host.rb | 76 +- ...in_exposed_data_record_bot_location_v1.rb} | 43 +- ...sed_data_record_bot_operating_system_v1.rb | 399 +++ .../domain_exposed_data_record_bot_v1.rb | 334 ++ .../domain_exposed_data_record_social_v1.rb | 22 +- .../models/domain_file_count_v2.rb | 295 ++ .../models/domain_fragment_info.rb | 299 ++ .../models/domain_gcp_account_v1.rb | 16 +- lib/crimson-falcon/models/domain_host.rb | 342 ++ lib/crimson-falcon/models/domain_incident.rb | 17 +- lib/crimson-falcon/models/domain_ioc.rb | 621 ++++ .../models/domain_item_details_v1.rb | 527 +++ .../domain_launch_export_job_request_v1.rb | 2 +- .../models/domain_mapped_device_policies.rb | 234 ++ .../models/domain_marketplace_product.rb | 288 ++ .../domain_matched_breach_summary_v1.rb | 29 +- lib/crimson-falcon/models/domain_meta_info.rb | 67 +- .../models/domain_news_document.rb | 14 +- .../models/domain_notification_v1.rb | 16 +- .../models/domain_policy_info.rb | 24 +- .../models/domain_query_response.rb | 9 +- .../models/domain_report_malware.rb | 264 ++ lib/crimson-falcon/models/domain_rule.rb | 132 +- lib/crimson-falcon/models/domain_scan.rb | 71 +- .../models/domain_scan_profile.rb | 17 +- lib/crimson-falcon/models/domain_scan_v2.rb | 621 ++++ lib/crimson-falcon/models/domain_schedule.rb | 53 +- lib/crimson-falcon/models/domain_session.rb | 25 - .../models/domain_telegram_channel_info.rb | 243 ++ ...ory_payload.rb => domain_telegram_info.rb} | 51 +- .../models/domain_telegram_recipient_info.rb | 279 ++ .../models/domain_telegram_sender_info.rb | 279 ++ .../models/domain_threat_entity.rb | 235 ++ lib/crimson-falcon/models/domain_user.rb | 36 +- .../models/domain_user_grants.rb | 20 - .../driftindicators_drift_entity_response.rb | 266 ++ ...indicators_drift_indicators_count_value.rb | 266 ++ ...indicators_drift_indicators_field_value.rb | 266 ++ .../models/empowerapi_falcon_script.rb | 521 +++ .../empowerapi_msa_falcon_script_response.rb | 266 ++ .../models/empowerapi_msa_id_list_response.rb | 266 ++ .../models/entities_ods_scan_response_v2.rb | 266 ++ .../executions_activity_execution_result.rb | 377 ++ .../models/executions_ancestor_execution.rb | 270 ++ .../executions_child_execution_result.rb | 295 ++ .../models/executions_execution_result.rb | 390 +++ .../models/executions_iterations.rb | 315 ++ .../models/executions_loop_result.rb | 356 ++ .../models/executions_reference_link.rb | 255 ++ .../models/executions_trigger_result.rb | 270 ++ .../models/falconx_sandbox_parameters_v1.rb | 25 +- .../models/falconx_submission_v1.rb | 38 +- lib/crimson-falcon/models/flows.rb | 269 ++ .../models/fwmgr_msa_aggregation_result.rb | 11 +- lib/crimson-falcon/models/graph_condition.rb | 257 ++ .../models/graph_configured_activity.rb | 308 ++ .../models/graph_configured_trigger.rb | 307 ++ .../models/graph_definition_model.rb | 315 ++ .../{models_scan_results.rb => graph_end.rb} | 47 +- lib/crimson-falcon/models/graph_flow.rb | 274 ++ lib/crimson-falcon/models/graph_gateway.rb | 268 ++ lib/crimson-falcon/models/graph_multi.rb | 285 ++ lib/crimson-falcon/models/graph_sub_model.rb | 301 ++ .../models/graph_timer_event_definition.rb | 290 ++ .../models/graph_validation_error.rb | 300 ++ .../images_api_combined_image_export.rb | 266 ++ .../models/images_api_customer_and_image.rb | 266 ++ .../images_api_image_assessment_history.rb | 266 ++ ...images_api_image_by_vulnerability_count.rb | 266 ++ .../models/images_api_image_count.rb | 266 ++ .../images_api_image_count_by_base_os.rb | 266 ++ .../models/images_api_image_count_by_state.rb | 266 ++ .../models/images_api_image_issues_summary.rb | 266 ++ ...mages_api_image_vulnerabilities_summary.rb | 266 ++ .../models/internal_sensor_status.rb | 76 +- .../models/jsonschema_authorization.rb | 278 ++ .../jsonschema_collection_index_field.rb | 267 ++ .../models/jsonschema_complex_permissions.rb | 236 ++ .../jsonschema_complex_permissions_or.rb | 236 ++ .../jsonschema_condition_group_fields.rb | 270 ++ .../models/jsonschema_permission.rb | 253 ++ lib/crimson-falcon/models/jsonschema_pivot.rb | 306 ++ .../models/jsonschema_reset_fields.rb | 241 ++ .../models/jsonschema_schema.rb | 250 ++ .../models/jsonschema_signals_extensions.rb | 254 ++ .../models/jsonschema_sub_schema.rb | 782 +++++ .../models/jsonschema_workflow_extensions.rb | 281 ++ .../k8sassets_cluster_enrichment_data.rb | 267 ++ .../k8sassets_cluster_enrichment_entry.rb | 253 ++ .../k8sassets_cluster_enrichment_response.rb | 266 ++ .../k8sassets_container_enrichment_data.rb | 241 ++ .../k8sassets_container_enrichment_entry.rb | 253 ++ ...k8sassets_container_enrichment_response.rb | 266 ++ .../models/k8sassets_container_info.rb | 253 ++ .../k8sassets_deployment_enrichment_data.rb | 239 ++ .../k8sassets_deployment_enrichment_entry.rb | 253 ++ ...8sassets_deployment_enrichment_response.rb | 266 ++ .../models/k8sassets_node_enrichment_data.rb | 253 ++ .../models/k8sassets_node_enrichment_entry.rb | 253 ++ .../k8sassets_node_enrichment_response.rb | 266 ++ .../models/k8sassets_pod_enrichment_data.rb | 269 ++ .../models/k8sassets_pod_enrichment_entry.rb | 253 ++ .../k8sassets_pod_enrichment_response.rb | 266 ++ .../k8sioms_kubernetes_iom_count_value.rb | 266 ++ .../k8sioms_kubernetes_iom_entity_response.rb | 266 ++ .../k8sioms_kubernetes_iom_field_value.rb | 266 ++ .../models/model_user_input_read_response.rb | 267 ++ .../models/model_user_input_update_request.rb | 255 ++ .../models/model_user_input_view_model.rb | 379 +++ .../models/models_account_entities_input.rb | 241 ++ .../models/models_account_status_response.rb | 266 ++ ...dels_aggregate_values_by_field_response.rb | 266 ++ .../models_api_assessment_detections.rb | 477 +++ .../models/models_api_combined_detections.rb | 395 +++ .../models/models_api_container_alert.rb | 339 ++ .../models/models_api_customer_and_image.rb | 458 +++ .../models/models_api_detection_count.rb | 239 ++ .../models_api_detection_count_by_type.rb | 253 ++ .../models/models_api_drift_indicators.rb | 577 ++++ .../models/models_api_filter_label.rb | 253 ++ .../models/models_api_filter_response.rb | 255 ++ .../models/models_api_image_assessment.rb | 309 ++ .../models_api_image_assessment_history.rb | 255 ++ ...models_api_image_by_vulnerability_count.rb | 295 ++ .../models_api_image_combined_export.rb | 505 +++ .../models/models_api_image_count.rb | 239 ++ .../models/models_api_image_issues_summary.rb | 359 ++ ...odels_api_image_vulnerabilities_summary.rb | 357 ++ .../models/models_api_kubernetes_iom.rb | 796 +++++ ...s_v1.rb => models_api_package_combined.rb} | 162 +- .../models_api_package_vulnerability.rb | 283 ++ .../models_api_packages_by_vuln_count.rb | 309 ++ .../models_api_policy_count_by_action.rb | 253 ++ .../models/models_api_policy_data.rb | 257 ++ .../models/models_api_policy_entity.rb | 332 ++ .../models/models_api_policy_exclusion.rb | 301 ++ .../models/models_api_policy_group.rb | 313 ++ .../models/models_api_policy_group_data.rb | 241 ++ .../models/models_api_policy_rule.rb | 248 ++ .../models/models_api_policy_rules_data.rb | 241 ++ .../models/models_api_precedence_request.rb | 241 ++ .../models/models_api_runtime_detection.rb | 987 ++++++ .../models_api_unidentified_container.rb | 525 +++ .../models/models_api_vuln_by_image_count.rb | 283 ++ .../models_api_vuln_by_publication_date.rb | 309 ++ .../models/models_api_vuln_count.rb | 239 ++ .../models_api_vuln_count_by_severity.rb | 253 ++ .../models_api_vulnerability_combined.rb | 407 +++ .../models_api_vulnerability_details.rb | 365 ++ .../models/models_api_vulnerability_info.rb | 383 +++ lib/crimson-falcon/models/models_cluster.rb | 539 +++ .../models/models_cluster_entity_response.rb | 266 ++ lib/crimson-falcon/models/models_container.rb | 831 +++++ .../models/models_container_coverage.rb | 253 ++ ...dels_container_coverage_response_entity.rb | 266 ++ .../models_container_entity_response.rb | 266 ++ .../models/models_container_image.rb | 453 +++ .../models/models_container_information.rb | 253 ++ .../models/models_container_runtime_pivot.rb | 353 ++ ...models_container_runtime_pivot_response.rb | 266 ++ .../models_create_image_group_request.rb | 271 ++ .../models/models_create_policy_request.rb | 253 ++ .../models_definition_create_request_v2.rb | 263 ++ .../models_definition_update_request_v2.rb | 288 ++ ...ry_application.rb => models_deployment.rb} | 170 +- .../models_deployment_entity_response.rb | 266 ++ .../models/models_exclusion_condition.rb | 310 ++ .../models_exclusion_condition_request.rb | 273 ++ .../models/models_image_information.rb | 267 ++ .../models_image_summary_packages_info.rb | 253 ++ .../models_issues_summary_container_info.rb | 267 ++ .../models/models_light_weight_config.rb | 347 ++ lib/crimson-falcon/models/models_node.rb | 723 ++++ ...onse.rb => models_node_entity_response.rb} | 8 +- .../models_package_name_version_type.rb | 295 ++ .../models_patch_image_group_request.rb | 262 ++ .../models/models_patch_policy_request.rb | 276 ++ lib/crimson-falcon/models/models_pod.rb | 827 +++++ .../models/models_pod_entity_response.rb | 266 ++ .../models/models_policy_entity_response.rb | 266 ++ ...models_policy_exclusion_entity_response.rb | 266 ++ .../models_policy_group_entity_response.rb | 266 ++ .../models/models_request_api_policy_data.rb | 241 ++ .../models/models_snapshot_account_status.rb | 341 ++ .../models_update_exclusions_request.rb | 241 ++ .../models/msa_aggregation_result.rb | 11 +- .../models/packages_api_combined_package.rb | 266 ++ .../packages_api_combined_package_export.rb | 266 ++ .../packages_api_packages_by_vuln_count.rb | 266 ++ ...rameter_activity_config_parameter_value.rb | 259 ++ ...ter_activity_config_provision_parameter.rb | 255 ++ ...parameter_activity_provision_parameters.rb | 249 ++ .../parameter_activity_selection_parameter.rb | 270 ++ .../parameter_condition_field_parameter.rb | 284 ++ ...ter_condition_field_provision_parameter.rb | 269 ++ ...parameter_condition_provision_parameter.rb | 257 ++ ...parameter_template_provision_parameters.rb | 255 ++ .../parameter_trigger_field_parameter.rb | 259 ++ .../models/parameter_trigger_parameter.rb | 257 ++ .../parameter_trigger_provision_parameter.rb | 257 ++ .../models/policies_assigned_host_group.rb | 253 ++ .../models/policies_assigned_rule_group.rb | 253 ++ .../models/policies_create_request.rb | 257 ++ .../models/policies_delete_response.rb | 266 ++ lib/crimson-falcon/models/policies_policy.rb | 362 ++ .../models/policies_precedence_response.rb | 266 ++ .../models/policies_response.rb | 266 ++ .../models/policies_update_request.rb | 266 ++ .../models/quarantine_quarantined_file.rb | 13 +- .../models/registration_aws_account_patch.rb | 11 +- .../registration_azure_account_patch.rb | 248 ++ ...egistration_azure_account_patch_request.rb | 241 ++ .../registration_azure_account_v1_ext.rb | 30 +- ...gement_group_create_request_external_v1.rb | 241 ++ ...tion_azure_management_group_external_v1.rb | 249 ++ ...tion_azure_management_group_response_v1.rb | 266 ++ ...istration_azure_management_group_v1_ext.rb | 452 +++ ...registration_gcp_account_ext_request_v2.rb | 241 ++ .../models/registration_gcp_account_patch.rb | 248 ++ .../registration_gcp_account_patch_request.rb | 241 ++ .../registration_gcp_account_req_obj_v2.rb | 302 ++ ...egistration_gcp_account_response_ext_v2.rb | 271 ++ .../registration_gcp_account_rsp_obj_v2.rb | 284 ++ ...registration_gcp_service_account_ext_v1.rb | 261 ++ ...ion_gcp_service_account_response_ext_v1.rb | 271 ++ ...registration_iom_event_id_response_meta.rb | 281 ++ .../registration_iom_event_ids_response_v2.rb | 2 +- .../models/registration_iom_event_v2.rb | 18 +- .../registration_next_token_pagination.rb | 266 ++ .../models/rulegroups_assigned_rule.rb | 253 ++ .../models/rulegroups_create_request.rb | 262 ++ .../models/rulegroups_delete_response.rb | 266 ++ .../models/rulegroups_policy_assignment.rb | 253 ++ .../models/rulegroups_response.rb | 266 ++ lib/crimson-falcon/models/rulegroups_rule.rb | 579 ++++ .../models/rulegroups_rule_group.rb | 324 ++ .../models/rulegroups_rules_response.rb | 266 ++ .../models/rulegroups_update_request.rb | 262 ++ ...medetections_detections_entity_response.rb | 266 ++ ....rb => sadomain_submission_information.rb} | 6 +- .../sadomain_typosquatting_component.rb | 13 +- .../scheduledexclusions_create_request.rb | 316 ++ .../models/scheduledexclusions_repeated.rb | 292 ++ .../models/scheduledexclusions_response.rb | 266 ++ ...scheduledexclusions_scheduled_exclusion.rb | 348 ++ .../scheduledexclusions_update_request.rb | 330 ++ .../models/sv_exclusions_create_req_v1.rb | 11 +- .../models/sv_exclusions_sv_exclusion_v1.rb | 11 +- .../models/sv_exclusions_update_req_v1.rb | 11 +- ...ers_unidentified_container_api_response.rb | 266 ++ ...ers_unidentified_containers_count_value.rb | 266 ++ lib/crimson-falcon/models/v2_activity.rb | 264 ++ .../models/v2_activity_parameters.rb | 241 ++ .../models/v2_activity_properties.rb | 241 ++ lib/crimson-falcon/models/v2_condition.rb | 286 ++ .../models/v2_condition_parameters.rb | 241 ++ lib/crimson-falcon/models/v2_definition.rb | 374 ++ lib/crimson-falcon/models/v2_for_loop.rb | 253 ++ lib/crimson-falcon/models/v2_loop.rb | 281 ++ lib/crimson-falcon/models/v2_parameters.rb | 264 ++ lib/crimson-falcon/models/v2_trigger.rb | 277 ++ ...nerabilities_api_combined_vulnerability.rb | 266 ++ ...ties_api_combined_vulnerability_details.rb | 266 ++ ...ilities_api_combined_vulnerability_info.rb | 266 ++ ...vulnerabilities_api_vuln_by_image_count.rb | 266 ++ ...vulnerabilities_api_vuln_by_publication.rb | 266 ++ .../models/vulnerabilities_api_vuln_count.rb | 266 ++ ...es_api_vuln_count_by_actively_exploited.rb | 266 ++ ...rabilities_api_vuln_count_by_csp_rating.rb | 266 ++ ...rabilities_api_vuln_count_by_cvss_score.rb | 266 ++ ...nerabilities_api_vuln_count_by_severity.rb | 266 ++ lib/crimson-falcon/version.rb | 2 +- spec/api/alerts_api_spec.rb | 68 +- ...pi_spec.rb => cloud_snapshots_api_spec.rb} | 20 +- spec/api/configuration_assessment_api_spec.rb | 11 + spec/api/container_alerts_api_spec.rb | 88 + spec/api/container_detections_api_spec.rb | 125 + spec/api/container_images_api_spec.rb | 182 + spec/api/container_packages_api_spec.rb | 119 + .../api/container_vulnerabilities_api_spec.rb | 184 + spec/api/cspm_registration_api_spec.rb | 124 +- spec/api/custom_ioa_api_spec.rb | 2 +- spec/api/custom_storage_api_spec.rb | 133 + spec/api/d4c_registration_api_spec.rb | 47 + spec/api/drift_indicators_api_spec.rb | 114 + .../api/falcon_complete_dashboard_api_spec.rb | 72 +- spec/api/falcon_container_image_api_spec.rb | 14 - spec/api/falconx_sandbox_api_spec.rb | 2 +- spec/api/filevantage_api_spec.rb | 323 +- spec/api/foundry_logscale_api_spec.rb | 226 ++ spec/api/hosts_api_spec.rb | 24 +- .../api/image_assessment_policies_api_spec.rb | 172 + spec/api/installation_tokens_api_spec.rb | 8 +- .../installation_tokens_settings_api_spec.rb | 2 +- spec/api/intel_api_spec.rb | 4 +- spec/api/ioc_api_spec.rb | 41 + spec/api/kubernetes_protection_api_spec.rb | 480 +++ spec/api/message_center_api_spec.rb | 6 +- spec/api/ods_api_spec.rb | 15 +- spec/api/real_time_response_admin_api_spec.rb | 25 + spec/api/real_time_response_audit_api_spec.rb | 67 + spec/api/recon_api_spec.rb | 6 +- spec/api/runtime_detections_api_spec.rb | 66 + ...=> spotlight_evaluation_logic_api_spec.rb} | 12 +- ... => spotlight_vulnerabilities_api_spec.rb} | 16 +- spec/api/unidentified_containers_api_spec.rb | 88 + spec/api/workflows_api_spec.rb | 224 ++ ...lerts_container_alerts_count_value_spec.rb | 63 + ...s_container_alerts_entity_response_spec.rb | 63 + spec/models/api_detects_query_meta_spec.rb | 69 + spec/models/api_detects_query_paging_spec.rb | 63 + ...ec.rb => api_device_count_resp_v1_spec.rb} | 12 +- spec/models/api_device_count_v1_spec.rb | 69 + .../models/api_devices_ran_on_resp_v1_spec.rb | 63 + spec/models/api_entities_response_spec.rb | 63 + .../api_execution_results_response_spec.rb | 63 + ...xposed_data_record_bot_location_v1_spec.rb | 57 + ...ata_record_bot_operating_system_v1_spec.rb | 117 + .../api_exposed_data_record_bot_v1_spec.rb | 93 + spec/models/api_meta_info_spec.rb | 69 + ...otification_exposed_data_record_v1_spec.rb | 18 + spec/models/api_object_metadata_spec.rb | 75 + .../api_processes_ran_on_resp_v1_spec.rb | 63 + ...c.rb => api_resource_ids_response_spec.rb} | 12 +- spec/models/api_response_pagination_spec.rb | 57 + ..._dynamic_execute_search_request_v1_spec.rb | 75 + .../apidomain_query_response_v1_spec.rb | 81 + ...pidomain_query_response_wrapper_v1_spec.rb | 63 + ... apidomain_repo_view_list_item_v1_spec.rb} | 30 +- ...ain_repo_view_list_item_wrapper_v1_spec.rb | 63 + spec/models/apidomain_repository_v1_spec.rb | 75 + ...in_saved_search_execute_request_v1_spec.rb | 111 + .../apidomain_view_connection_v1_spec.rb | 57 + ...nge_spec.rb => changes_acl_change_spec.rb} | 12 +- ...public_acl_spec.rb => changes_acl_spec.rb} | 12 +- ...ic_after_spec.rb => changes_after_spec.rb} | 12 +- ...bute_spec.rb => changes_attribute_spec.rb} | 12 +- ...ic_basic_spec.rb => changes_basic_spec.rb} | 12 +- ..._before_spec.rb => changes_before_spec.rb} | 12 +- ..._change_spec.rb => changes_change_spec.rb} | 12 +- ...ty_spec.rb => changes_dacl_entity_spec.rb} | 18 +- ...blic_dacl_spec.rb => changes_dacl_spec.rb} | 12 +- ...hash_spec.rb => changes_diff_hash_spec.rb} | 12 +- ...blic_diff_spec.rb => changes_diff_spec.rb} | 12 +- ...type_spec.rb => changes_diff_type_spec.rb} | 12 +- .../changes_get_changes_response_spec.rb | 63 + ...ic_owner_spec.rb => changes_group_spec.rb} | 12 +- .../changes_high_volume_query_meta_spec.rb | 69 + .../changes_high_volume_query_paging_spec.rb | 63 + ...changes_high_volume_query_response_spec.rb | 63 + ...oup_spec.rb => changes_host_group_spec.rb} | 12 +- ...blic_host_spec.rb => changes_host_spec.rb} | 12 +- ...ic_group_spec.rb => changes_owner_spec.rb} | 12 +- ...pec.rb => changes_permissions_lin_spec.rb} | 12 +- ...ns_spec.rb => changes_permissions_spec.rb} | 12 +- ...c.rb => changes_policy_rule_group_spec.rb} | 12 +- ...le_spec.rb => changes_policy_rule_spec.rb} | 12 +- ..._policy_spec.rb => changes_policy_spec.rb} | 12 +- ...nce_spec.rb => changes_prevalence_spec.rb} | 12 +- ...public_tag_spec.rb => changes_tag_spec.rb} | 12 +- spec/models/client_action_request_spec.rb | 51 + spec/models/client_cost_spec.rb | 63 + spec/models/client_costs_spec.rb | 69 + .../client_data_ingest_response_v1_spec.rb | 57 + ...nt_data_ingest_response_wrapper_v1_spec.rb | 63 + spec/models/client_digest_flow_spec.rb | 63 + spec/models/client_extra_in_spec.rb | 57 + spec/models/client_extra_limit_spec.rb | 57 + spec/models/client_extra_rename_spec.rb | 57 + spec/models/client_extra_sort_spec.rb | 75 + spec/models/client_field_spec.rb | 63 + spec/models/client_job_status_spec.rb | 117 + .../client_query_response_schemas_v1_spec.rb | 57 + .../client_query_result_metadata_spec.rb | 159 + spec/models/client_repository_spec.rb | 69 + spec/models/client_spent_spec.rb | 69 + ..._system_definition_create_response_spec.rb | 63 + ...em_definition_de_provision_request_spec.rb | 69 + ..._system_definition_promote_request_spec.rb | 81 + ...ystem_definition_provision_request_spec.rb | 75 + spec/models/client_top_value_spec.rb | 57 + spec/models/common_count_as_resource_spec.rb | 57 + spec/models/common_count_response_spec.rb | 63 + ...mon_generic_entity_response_string_spec.rb | 63 + spec/models/custom_type1255839303_spec.rb | 63 + spec/models/custom_type3191042536_spec.rb | 63 + ...tions_definition_entities_response_spec.rb | 63 + .../models/definitions_definition_ext_spec.rb | 75 + ...tions_definition_external_response_spec.rb | 63 + ..._definition_import_response_entity_spec.rb | 81 + ...nitions_definition_import_response_spec.rb | 63 + ...definitions_flight_control_request_spec.rb | 69 + .../definitions_parameter_property_spec.rb | 51 + .../definitions_playbook_parameter_spec.rb | 57 + ...tections_api_assessment_detections_spec.rb | 63 + ...detections_api_combined_detections_spec.rb | 63 + ...ections_api_detections_by_severity_spec.rb | 63 + .../detections_api_detections_by_type_spec.rb | 63 + .../detections_api_detections_count_spec.rb | 63 + spec/models/detects_alert_spec.rb | 42 + ...sapi_aggregate_alert_query_request_spec.rb | 153 + .../detectsapi_aggregates_response_spec.rb | 63 + ...detectsapi_aggregation_result_item_spec.rb | 105 + .../detectsapi_aggregation_result_spec.rb | 63 + .../detectsapi_alert_query_response_spec.rb | 63 + ...i_patch_entities_alerts_v3_request_spec.rb | 57 + ...pi_post_entities_alerts_v2_request_spec.rb | 51 + ...i_post_entities_alerts_v2_response_spec.rb | 63 + .../models/detectsapi_response_fields_spec.rb | 57 + spec/models/device_device_spec.rb | 12 + .../device_mapped_device_policies_spec.rb | 6 + spec/models/deviceapi_device_swagger_spec.rb | 24 + spec/models/domain_actor_document_spec.rb | 162 + spec/models/domain_actor_entity_spec.rb | 63 + .../models/domain_actor_news_document_spec.rb | 69 + .../models/domain_api_finding_rule_v1_spec.rb | 12 + .../domain_api_finding_with_rule_v1_spec.rb | 6 + .../domain_api_host_info_facet_v1_spec.rb | 6 + ...omain_api_rule_details_response_v1_spec.rb | 63 + .../models/domain_api_rule_details_v1_spec.rb | 135 + .../domain_api_vulnerability_app_v2_spec.rb | 6 + ...vulnerability_cve_details_facet_v2_spec.rb | 6 + ..._api_vulnerability_extended_app_v2_spec.rb | 6 + ...in_api_vulnerability_host_facet_v2_spec.rb | 6 - .../domain_api_vulnerability_v2_spec.rb | 12 - .../domain_asset_criticality_info_v1_spec.rb | 63 + spec/models/domain_attachment_spec.rb | 87 + spec/models/domain_aws_account_input_spec.rb | 81 + spec/models/domain_aws_account_v2_spec.rb | 6 + .../domain_aws_batch_cluster_region_spec.rb | 63 + ...e_management_group_role_assignment_spec.rb | 69 + .../domain_base_api_vulnerability_v2_spec.rb | 12 - spec/models/domain_breached_item_v1_spec.rb | 18 + spec/models/domain_card_spec.rb | 87 + spec/models/domain_cid_group_spec.rb | 12 + .../domain_cid_policy_assignments_spec.rb | 12 + spec/models/domain_cloud_scope_spec.rb | 6 + spec/models/domain_credentials_spec.rb | 14 +- spec/models/domain_device_policy_spec.rb | 51 + spec/models/domain_device_spec.rb | 6 + spec/models/domain_discover_api_host_spec.rb | 36 + .../domain_discover_apiio_t_host_spec.rb | 36 + ...posed_data_record_bot_location_v1_spec.rb} | 16 +- ...ata_record_bot_operating_system_v1_spec.rb | 117 + .../domain_exposed_data_record_bot_v1_spec.rb | 93 + ...main_exposed_data_record_social_v1_spec.rb | 6 + spec/models/domain_file_count_v2_spec.rb | 75 + spec/models/domain_fragment_info_spec.rb | 87 + spec/models/domain_gcp_account_v1_spec.rb | 6 + spec/models/domain_host_spec.rb | 123 + spec/models/domain_incident_spec.rb | 6 - spec/models/domain_ioc_spec.rb | 261 ++ spec/models/domain_item_details_v1_spec.rb | 207 ++ .../domain_mapped_device_policies_spec.rb | 51 + .../models/domain_marketplace_product_spec.rb | 87 + .../domain_matched_breach_summary_v1_spec.rb | 12 + spec/models/domain_meta_info_spec.rb | 26 +- spec/models/domain_news_document_spec.rb | 6 + spec/models/domain_notification_v1_spec.rb | 6 + spec/models/domain_policy_info_spec.rb | 12 + spec/models/domain_report_malware_spec.rb | 63 + spec/models/domain_rule_spec.rb | 20 +- spec/models/domain_scan_profile_spec.rb | 6 + spec/models/domain_scan_spec.rb | 42 + spec/models/domain_scan_v2_spec.rb | 273 ++ spec/models/domain_schedule_spec.rb | 6 +- .../domain_telegram_channel_info_spec.rb | 57 + spec/models/domain_telegram_info_spec.rb | 63 + .../domain_telegram_recipient_info_spec.rb | 81 + .../domain_telegram_sender_info_spec.rb | 81 + spec/models/domain_threat_entity_spec.rb | 51 + spec/models/domain_user_spec.rb | 14 +- ...ftindicators_drift_entity_response_spec.rb | 63 + ...ators_drift_indicators_count_value_spec.rb | 63 + ...ators_drift_indicators_field_value_spec.rb | 63 + spec/models/empowerapi_falcon_script_spec.rb | 177 + ...owerapi_msa_falcon_script_response_spec.rb | 63 + .../empowerapi_msa_id_list_response_spec.rb | 63 + .../entities_ods_scan_response_v2_spec.rb | 63 + ...ecutions_activity_execution_result_spec.rb | 117 + .../executions_ancestor_execution_spec.rb | 63 + .../executions_child_execution_result_spec.rb | 75 + .../executions_execution_result_spec.rb | 111 + spec/models/executions_iterations_spec.rb | 81 + spec/models/executions_loop_result_spec.rb | 105 + spec/models/executions_reference_link_spec.rb | 57 + spec/models/executions_trigger_result_spec.rb | 69 + .../falconx_sandbox_parameters_v1_spec.rb | 12 +- spec/models/falconx_submission_v1_spec.rb | 24 + spec/models/flows_spec.rb | 63 + .../fwmgr_msa_aggregation_result_spec.rb | 6 + spec/models/graph_condition_spec.rb | 63 + spec/models/graph_configured_activity_spec.rb | 81 + spec/models/graph_configured_trigger_spec.rb | 87 + spec/models/graph_definition_model_spec.rb | 87 + spec/models/graph_end_spec.rb | 57 + spec/models/graph_flow_spec.rb | 69 + spec/models/graph_gateway_spec.rb | 63 + spec/models/graph_multi_spec.rb | 69 + spec/models/graph_sub_model_spec.rb | 81 + .../graph_timer_event_definition_spec.rb | 75 + spec/models/graph_validation_error_spec.rb | 87 + .../images_api_combined_image_export_spec.rb | 63 + .../images_api_customer_and_image_spec.rb | 63 + ...mages_api_image_assessment_history_spec.rb | 63 + ...s_api_image_by_vulnerability_count_spec.rb | 63 + .../images_api_image_count_by_base_os_spec.rb | 63 + .../images_api_image_count_by_state_spec.rb | 63 + spec/models/images_api_image_count_spec.rb | 63 + .../images_api_image_issues_summary_spec.rb | 63 + ..._api_image_vulnerabilities_summary_spec.rb | 63 + spec/models/internal_sensor_status_spec.rb | 48 + spec/models/jsonschema_authorization_spec.rb | 69 + .../jsonschema_collection_index_field_spec.rb | 63 + .../jsonschema_complex_permissions_or_spec.rb | 51 + .../jsonschema_complex_permissions_spec.rb | 51 + .../jsonschema_condition_group_fields_spec.rb | 75 + spec/models/jsonschema_permission_spec.rb | 57 + spec/models/jsonschema_pivot_spec.rb | 99 + spec/models/jsonschema_reset_fields_spec.rb | 51 + spec/models/jsonschema_schema_spec.rb | 57 + .../jsonschema_signals_extensions_spec.rb | 63 + spec/models/jsonschema_sub_schema_spec.rb | 399 +++ .../jsonschema_workflow_extensions_spec.rb | 81 + .../k8sassets_cluster_enrichment_data_spec.rb | 63 + ...k8sassets_cluster_enrichment_entry_spec.rb | 57 + ...assets_cluster_enrichment_response_spec.rb | 63 + ...8sassets_container_enrichment_data_spec.rb | 51 + ...sassets_container_enrichment_entry_spec.rb | 57 + ...sets_container_enrichment_response_spec.rb | 63 + spec/models/k8sassets_container_info_spec.rb | 57 + ...sassets_deployment_enrichment_data_spec.rb | 51 + ...assets_deployment_enrichment_entry_spec.rb | 57 + ...ets_deployment_enrichment_response_spec.rb | 63 + .../k8sassets_node_enrichment_data_spec.rb | 57 + .../k8sassets_node_enrichment_entry_spec.rb | 57 + ...k8sassets_node_enrichment_response_spec.rb | 63 + .../k8sassets_pod_enrichment_data_spec.rb | 63 + .../k8sassets_pod_enrichment_entry_spec.rb | 57 + .../k8sassets_pod_enrichment_response_spec.rb | 63 + ...k8sioms_kubernetes_iom_count_value_spec.rb | 63 + ...oms_kubernetes_iom_entity_response_spec.rb | 63 + ...k8sioms_kubernetes_iom_field_value_spec.rb | 63 + .../model_user_input_read_response_spec.rb | 63 + .../model_user_input_update_request_spec.rb | 57 + .../model_user_input_view_model_spec.rb | 105 + .../models_account_entities_input_spec.rb | 51 + .../models_account_status_response_spec.rb | 63 + ...aggregate_values_by_field_response_spec.rb | 63 + .../models_api_assessment_detections_spec.rb | 153 + .../models_api_combined_detections_spec.rb | 117 + .../models/models_api_container_alert_spec.rb | 93 + .../models_api_customer_and_image_spec.rb | 147 + ...models_api_detection_count_by_type_spec.rb | 57 + .../models/models_api_detection_count_spec.rb | 51 + .../models_api_drift_indicators_spec.rb | 195 ++ ...pec.rb => models_api_filter_label_spec.rb} | 16 +- .../models/models_api_filter_response_spec.rb | 57 + ...odels_api_image_assessment_history_spec.rb | 57 + .../models_api_image_assessment_spec.rb | 81 + ...s_api_image_by_vulnerability_count_spec.rb | 75 + .../models_api_image_combined_export_spec.rb | 165 + spec/models/models_api_image_count_spec.rb | 51 + .../models_api_image_issues_summary_spec.rb | 99 + ..._api_image_vulnerabilities_summary_spec.rb | 99 + spec/models/models_api_kubernetes_iom_spec.rb | 339 ++ .../models_api_package_combined_spec.rb | 93 + .../models_api_package_vulnerability_spec.rb | 69 + .../models_api_packages_by_vuln_count_spec.rb | 81 + .../models_api_policy_count_by_action_spec.rb | 57 + ...spec.rb => models_api_policy_data_spec.rb} | 16 +- ...ec.rb => models_api_policy_entity_spec.rb} | 28 +- .../models_api_policy_exclusion_spec.rb | 81 + .../models_api_policy_group_data_spec.rb | 51 + spec/models/models_api_policy_group_spec.rb | 87 + spec/models/models_api_policy_rule_spec.rb | 57 + .../models_api_policy_rules_data_spec.rb | 51 + .../models_api_precedence_request_spec.rb | 51 + .../models_api_runtime_detection_spec.rb | 369 ++ .../models_api_unidentified_container_spec.rb | 171 + .../models_api_vuln_by_image_count_spec.rb | 69 + ...odels_api_vuln_by_publication_date_spec.rb | 81 + .../models_api_vuln_count_by_severity_spec.rb | 57 + spec/models/models_api_vuln_count_spec.rb | 51 + .../models_api_vulnerability_combined_spec.rb | 123 + .../models_api_vulnerability_details_spec.rb | 105 + .../models_api_vulnerability_info_spec.rb | 111 + .../models_cluster_entity_response_spec.rb | 63 + spec/models/models_cluster_spec.rb | 177 + ...container_coverage_response_entity_spec.rb | 63 + spec/models/models_container_coverage_spec.rb | 57 + .../models_container_entity_response_spec.rb | 63 + spec/models/models_container_image_spec.rb | 141 + .../models_container_information_spec.rb | 57 + ...s_container_runtime_pivot_response_spec.rb | 63 + .../models_container_runtime_pivot_spec.rb | 99 + spec/models/models_container_spec.rb | 429 +++ .../models_create_image_group_request_spec.rb | 69 + .../models_create_policy_request_spec.rb | 57 + ...odels_definition_create_request_v2_spec.rb | 63 + ...odels_definition_update_request_v2_spec.rb | 75 + .../models_deployment_entity_response_spec.rb | 63 + spec/models/models_deployment_spec.rb | 99 + ...models_exclusion_condition_request_spec.rb | 69 + .../models/models_exclusion_condition_spec.rb | 87 + spec/models/models_image_information_spec.rb | 63 + ...models_image_summary_packages_info_spec.rb | 57 + ...dels_issues_summary_container_info_spec.rb | 63 + .../models/models_light_weight_config_spec.rb | 93 + ...rb => models_node_entity_response_spec.rb} | 12 +- spec/models/models_node_spec.rb | 255 ++ .../models_package_name_version_type_spec.rb | 75 + .../models_patch_image_group_request_spec.rb | 63 + .../models_patch_policy_request_spec.rb | 69 + .../models/models_pod_entity_response_spec.rb | 63 + spec/models/models_pod_spec.rb | 297 ++ .../models_policy_entity_response_spec.rb | 63 + ...s_policy_exclusion_entity_response_spec.rb | 63 + ...odels_policy_group_entity_response_spec.rb | 63 + .../models_request_api_policy_data_spec.rb | 51 + .../models_snapshot_account_status_spec.rb | 93 + .../models_update_exclusions_request_spec.rb | 51 + spec/models/msa_aggregation_result_spec.rb | 6 + ...ckages_api_combined_package_export_spec.rb | 63 + .../packages_api_combined_package_spec.rb | 63 + ...ackages_api_packages_by_vuln_count_spec.rb | 63 + ...er_activity_config_parameter_value_spec.rb | 63 + ...ctivity_config_provision_parameter_spec.rb | 57 + ...eter_activity_provision_parameters_spec.rb | 57 + ...meter_activity_selection_parameter_spec.rb | 63 + ...arameter_condition_field_parameter_spec.rb | 75 + ...ondition_field_provision_parameter_spec.rb | 63 + ...eter_condition_provision_parameter_spec.rb | 57 + ...eter_template_provision_parameters_spec.rb | 63 + .../parameter_trigger_field_parameter_spec.rb | 63 + .../parameter_trigger_parameter_spec.rb | 57 + ...ameter_trigger_provision_parameter_spec.rb | 57 + .../policies_assigned_host_group_spec.rb | 57 + .../policies_assigned_rule_group_spec.rb | 57 + spec/models/policies_create_request_spec.rb | 63 + spec/models/policies_delete_response_spec.rb | 63 + spec/models/policies_policy_spec.rb | 117 + .../policies_precedence_response_spec.rb | 63 + spec/models/policies_response_spec.rb | 63 + spec/models/policies_update_request_spec.rb | 69 + .../quarantine_quarantined_file_spec.rb | 6 + .../registration_aws_account_patch_spec.rb | 6 + ...ration_azure_account_patch_request_spec.rb | 51 + ... registration_azure_account_patch_spec.rb} | 16 +- .../registration_azure_account_v1_ext_spec.rb | 18 + ...t_group_create_request_external_v1_spec.rb | 51 + ...azure_management_group_external_v1_spec.rb | 57 + ...azure_management_group_response_v1_spec.rb | 63 + ...tion_azure_management_group_v1_ext_spec.rb | 165 + ...tration_gcp_account_ext_request_v2_spec.rb | 51 + ...stration_gcp_account_patch_request_spec.rb | 51 + .../registration_gcp_account_patch_spec.rb | 57 + ...egistration_gcp_account_req_obj_v2_spec.rb | 93 + ...ration_gcp_account_response_ext_v2_spec.rb | 63 + ...egistration_gcp_account_rsp_obj_v2_spec.rb | 81 + ...tration_gcp_service_account_ext_v1_spec.rb | 69 + ...cp_service_account_response_ext_v1_spec.rb | 63 + ...tration_iom_event_id_response_meta_spec.rb | 69 + spec/models/registration_iom_event_v2_spec.rb | 6 + ...registration_next_token_pagination_spec.rb | 69 + spec/models/rulegroups_assigned_rule_spec.rb | 57 + spec/models/rulegroups_create_request_spec.rb | 63 + .../models/rulegroups_delete_response_spec.rb | 63 + .../rulegroups_policy_assignment_spec.rb | 57 + spec/models/rulegroups_response_spec.rb | 63 + ..._spec.rb => rulegroups_rule_group_spec.rb} | 32 +- spec/models/rulegroups_rule_spec.rb | 255 ++ spec/models/rulegroups_rules_response_spec.rb | 63 + spec/models/rulegroups_update_request_spec.rb | 63 + ...ections_detections_entity_response_spec.rb | 63 + ...> sadomain_submission_information_spec.rb} | 12 +- .../sadomain_typosquatting_component_spec.rb | 6 + ...scheduledexclusions_create_request_spec.rb | 99 + .../scheduledexclusions_repeated_spec.rb | 87 + .../scheduledexclusions_response_spec.rb | 63 + ...uledexclusions_scheduled_exclusion_spec.rb | 117 + ...scheduledexclusions_update_request_spec.rb | 105 + .../sv_exclusions_create_req_v1_spec.rb | 6 + .../sv_exclusions_sv_exclusion_v1_spec.rb | 6 + .../sv_exclusions_update_req_v1_spec.rb | 6 + ...nidentified_container_api_response_spec.rb | 63 + ...nidentified_containers_count_value_spec.rb | 63 + spec/models/v2_activity_parameters_spec.rb | 51 + spec/models/v2_activity_properties_spec.rb | 51 + spec/models/v2_activity_spec.rb | 63 + spec/models/v2_condition_parameters_spec.rb | 51 + spec/models/v2_condition_spec.rb | 75 + spec/models/v2_definition_spec.rb | 123 + spec/models/v2_for_loop_spec.rb | 57 + spec/models/v2_loop_spec.rb | 75 + spec/models/v2_parameters_spec.rb | 69 + spec/models/v2_trigger_spec.rb | 75 + ...api_combined_vulnerability_details_spec.rb | 63 + ...es_api_combined_vulnerability_info_spec.rb | 63 + ...ilities_api_combined_vulnerability_spec.rb | 63 + ...rabilities_api_vuln_by_image_count_spec.rb | 63 + ...rabilities_api_vuln_by_publication_spec.rb | 63 + ...i_vuln_count_by_actively_exploited_spec.rb | 63 + ...ities_api_vuln_count_by_csp_rating_spec.rb | 63 + ...ities_api_vuln_count_by_cvss_score_spec.rb | 63 + ...ilities_api_vuln_count_by_severity_spec.rb | 63 + .../vulnerabilities_api_vuln_count_spec.rb | 63 + 1342 files changed, 163599 insertions(+), 2735 deletions(-) create mode 100644 docs/AlertsContainerAlertsCountValue.md create mode 100644 docs/AlertsContainerAlertsEntityResponse.md create mode 100644 docs/ApiDetectsQueryMeta.md create mode 100644 docs/ApiDetectsQueryPaging.md create mode 100644 docs/ApiDeviceCountRespV1.md create mode 100644 docs/ApiDeviceCountV1.md create mode 100644 docs/ApiDevicesRanOnRespV1.md rename docs/{CommonEntitiesResponse.md => ApiEntitiesResponse.md} (79%) create mode 100644 docs/ApiExecutionResultsResponse.md create mode 100644 docs/ApiExposedDataRecordBotLocationV1.md create mode 100644 docs/ApiExposedDataRecordBotOperatingSystemV1.md create mode 100644 docs/ApiExposedDataRecordBotV1.md create mode 100644 docs/ApiMetaInfo.md create mode 100644 docs/ApiObjectMetadata.md create mode 100644 docs/ApiProcessesRanOnRespV1.md rename docs/{ApiAggregatesResponse.md => ApiResourceIDsResponse.md} (66%) create mode 100644 docs/ApiResponsePagination.md create mode 100644 docs/ApidomainDynamicExecuteSearchRequestV1.md create mode 100644 docs/ApidomainQueryResponseV1.md create mode 100644 docs/ApidomainQueryResponseWrapperV1.md create mode 100644 docs/ApidomainRepoViewListItemV1.md create mode 100644 docs/ApidomainRepoViewListItemWrapperV1.md create mode 100644 docs/ApidomainRepositoryV1.md create mode 100644 docs/ApidomainSavedSearchExecuteRequestV1.md create mode 100644 docs/ApidomainViewConnectionV1.md rename docs/{PublicACL.md => ChangesACL.md} (69%) rename docs/{PublicACLChange.md => ChangesACLChange.md} (80%) rename docs/{PublicAfter.md => ChangesAfter.md} (80%) rename docs/{PublicAttribute.md => ChangesAttribute.md} (78%) rename docs/{PublicBasic.md => ChangesBasic.md} (85%) rename docs/{PublicBefore.md => ChangesBefore.md} (80%) rename docs/{PublicChange.md => ChangesChange.md} (73%) rename docs/{PublicDACL.md => ChangesDACL.md} (65%) rename docs/{PublicDACLEntity.md => ChangesDACLEntity.md} (63%) rename docs/{PublicDiff.md => ChangesDiff.md} (54%) rename docs/{PublicDiffHash.md => ChangesDiffHash.md} (75%) rename docs/{PublicDiffType.md => ChangesDiffType.md} (53%) create mode 100644 docs/ChangesGetChangesResponse.md create mode 100644 docs/ChangesGroup.md create mode 100644 docs/ChangesHighVolumeQueryMeta.md create mode 100644 docs/ChangesHighVolumeQueryPaging.md create mode 100644 docs/ChangesHighVolumeQueryResponse.md rename docs/{PublicHost.md => ChangesHost.md} (79%) rename docs/{PublicHostGroup.md => ChangesHostGroup.md} (74%) create mode 100644 docs/ChangesOwner.md rename docs/{PublicPermissions.md => ChangesPermissions.md} (54%) create mode 100644 docs/ChangesPermissionsLin.md rename docs/{PublicPolicy.md => ChangesPolicy.md} (58%) rename docs/{PublicPolicyRule.md => ChangesPolicyRule.md} (75%) rename docs/{PublicPolicyRuleGroup.md => ChangesPolicyRuleGroup.md} (57%) rename docs/{PublicPrevalence.md => ChangesPrevalence.md} (86%) rename docs/{PublicTag.md => ChangesTag.md} (78%) create mode 100644 docs/ClientActionRequest.md create mode 100644 docs/ClientCost.md create mode 100644 docs/ClientCosts.md create mode 100644 docs/ClientDataIngestResponseV1.md create mode 100644 docs/ClientDataIngestResponseWrapperV1.md create mode 100644 docs/ClientDigestFlow.md create mode 100644 docs/ClientExtraIn.md create mode 100644 docs/ClientExtraLimit.md create mode 100644 docs/ClientExtraRename.md create mode 100644 docs/ClientExtraSort.md create mode 100644 docs/ClientField.md create mode 100644 docs/ClientJobStatus.md create mode 100644 docs/ClientQueryResponseSchemasV1.md create mode 100644 docs/ClientQueryResultMetadata.md create mode 100644 docs/ClientRepository.md create mode 100644 docs/ClientSpent.md create mode 100644 docs/ClientSystemDefinitionCreateResponse.md create mode 100644 docs/ClientSystemDefinitionDeProvisionRequest.md create mode 100644 docs/ClientSystemDefinitionPromoteRequest.md create mode 100644 docs/ClientSystemDefinitionProvisionRequest.md create mode 100644 docs/ClientTopValue.md create mode 100644 docs/CloudSnapshotsApi.md create mode 100644 docs/CommonCountAsResource.md create mode 100644 docs/CommonCountResponse.md create mode 100644 docs/CommonGenericEntityResponseString.md create mode 100644 docs/ContainerAlertsApi.md create mode 100644 docs/ContainerDetectionsApi.md create mode 100644 docs/ContainerImagesApi.md create mode 100644 docs/ContainerPackagesApi.md create mode 100644 docs/ContainerVulnerabilitiesApi.md create mode 100644 docs/CustomStorageApi.md create mode 100644 docs/CustomType1255839303.md create mode 100644 docs/CustomType3191042536.md create mode 100644 docs/DefinitionsDefinitionEntitiesResponse.md create mode 100644 docs/DefinitionsDefinitionExt.md create mode 100644 docs/DefinitionsDefinitionExternalResponse.md create mode 100644 docs/DefinitionsDefinitionImportResponse.md create mode 100644 docs/DefinitionsDefinitionImportResponseEntity.md create mode 100644 docs/DefinitionsFlightControlRequest.md create mode 100644 docs/DefinitionsParameterProperty.md create mode 100644 docs/DefinitionsPlaybookParameter.md create mode 100644 docs/DetectionsApiAssessmentDetections.md create mode 100644 docs/DetectionsApiCombinedDetections.md create mode 100644 docs/DetectionsApiDetectionsBySeverity.md create mode 100644 docs/DetectionsApiDetectionsByType.md create mode 100644 docs/DetectionsApiDetectionsCount.md create mode 100644 docs/DetectsapiAggregateAlertQueryRequest.md create mode 100644 docs/DetectsapiAggregatesResponse.md create mode 100644 docs/DetectsapiAggregationResult.md create mode 100644 docs/DetectsapiAggregationResultItem.md create mode 100644 docs/DetectsapiAlertQueryResponse.md create mode 100644 docs/DetectsapiPatchEntitiesAlertsV3Request.md create mode 100644 docs/DetectsapiPostEntitiesAlertsV2Request.md create mode 100644 docs/DetectsapiPostEntitiesAlertsV2Response.md create mode 100644 docs/DetectsapiResponseFields.md create mode 100644 docs/DomainAPIRuleDetailsResponseV1.md create mode 100644 docs/DomainAPIRuleDetailsV1.md create mode 100644 docs/DomainAWSAccountInput.md create mode 100644 docs/DomainAWSBatchClusterRegion.md create mode 100644 docs/DomainActorEntity.md create mode 100644 docs/DomainActorNewsDocument.md create mode 100644 docs/DomainAssetCriticalityInfoV1.md create mode 100644 docs/DomainAttachment.md create mode 100644 docs/DomainAzureManagementGroupRoleAssignment.md create mode 100644 docs/DomainCard.md create mode 100644 docs/DomainDevicePolicy.md create mode 100644 docs/DomainExposedDataRecordBotLocationV1.md create mode 100644 docs/DomainExposedDataRecordBotOperatingSystemV1.md create mode 100644 docs/DomainExposedDataRecordBotV1.md create mode 100644 docs/DomainFileCountV2.md create mode 100644 docs/DomainFragmentInfo.md create mode 100644 docs/DomainHost.md create mode 100644 docs/DomainIOC.md create mode 100644 docs/DomainItemDetailsV1.md create mode 100644 docs/DomainMappedDevicePolicies.md create mode 100644 docs/DomainMarketplaceProduct.md delete mode 100644 docs/DomainMsaMetaInfo.md delete mode 100644 docs/DomainNotificationDetailsV1.md create mode 100644 docs/DomainReportMalware.md create mode 100644 docs/DomainScanV2.md create mode 100644 docs/DomainTelegramChannelInfo.md create mode 100644 docs/DomainTelegramInfo.md create mode 100644 docs/DomainTelegramRecipientInfo.md create mode 100644 docs/DomainTelegramSenderInfo.md create mode 100644 docs/DomainThreatEntity.md create mode 100644 docs/DriftIndicatorsApi.md create mode 100644 docs/DriftindicatorsDriftEntityResponse.md create mode 100644 docs/DriftindicatorsDriftIndicatorsCountValue.md create mode 100644 docs/DriftindicatorsDriftIndicatorsFieldValue.md create mode 100644 docs/EmpowerapiFalconScript.md create mode 100644 docs/EmpowerapiMsaFalconScriptResponse.md create mode 100644 docs/EmpowerapiMsaIDListResponse.md rename docs/{PublicGetChangesResponse.md => EntitiesODSScanResponseV2.md} (70%) create mode 100644 docs/ExecutionsActivityExecutionResult.md create mode 100644 docs/ExecutionsAncestorExecution.md create mode 100644 docs/ExecutionsChildExecutionResult.md create mode 100644 docs/ExecutionsExecutionResult.md create mode 100644 docs/ExecutionsIterations.md create mode 100644 docs/ExecutionsLoopResult.md create mode 100644 docs/ExecutionsReferenceLink.md create mode 100644 docs/ExecutionsTriggerResult.md create mode 100644 docs/Flows.md create mode 100644 docs/FoundryLogscaleApi.md create mode 100644 docs/GraphCondition.md create mode 100644 docs/GraphConfiguredActivity.md create mode 100644 docs/GraphConfiguredTrigger.md create mode 100644 docs/GraphDefinitionModel.md create mode 100644 docs/GraphEnd.md create mode 100644 docs/GraphFlow.md create mode 100644 docs/GraphGateway.md create mode 100644 docs/GraphMulti.md create mode 100644 docs/GraphSubModel.md create mode 100644 docs/GraphTimerEventDefinition.md create mode 100644 docs/GraphValidationError.md create mode 100644 docs/ImageAssessmentPoliciesApi.md create mode 100644 docs/ImagesApiCombinedImageExport.md create mode 100644 docs/ImagesApiCustomerAndImage.md create mode 100644 docs/ImagesApiImageAssessmentHistory.md create mode 100644 docs/ImagesApiImageByVulnerabilityCount.md create mode 100644 docs/ImagesApiImageCount.md create mode 100644 docs/ImagesApiImageCountByBaseOS.md create mode 100644 docs/ImagesApiImageCountByState.md create mode 100644 docs/ImagesApiImageIssuesSummary.md create mode 100644 docs/ImagesApiImageVulnerabilitiesSummary.md delete mode 100644 docs/InventoriesApi.md create mode 100644 docs/JsonschemaAuthorization.md create mode 100644 docs/JsonschemaCollectionIndexField.md create mode 100644 docs/JsonschemaComplexPermissions.md create mode 100644 docs/JsonschemaComplexPermissionsOR.md create mode 100644 docs/JsonschemaConditionGroupFields.md create mode 100644 docs/JsonschemaPermission.md create mode 100644 docs/JsonschemaPivot.md create mode 100644 docs/JsonschemaResetFields.md create mode 100644 docs/JsonschemaSchema.md create mode 100644 docs/JsonschemaSignalsExtensions.md create mode 100644 docs/JsonschemaSubSchema.md create mode 100644 docs/JsonschemaWorkflowExtensions.md create mode 100644 docs/K8sassetsClusterEnrichmentData.md create mode 100644 docs/K8sassetsClusterEnrichmentEntry.md create mode 100644 docs/K8sassetsClusterEnrichmentResponse.md create mode 100644 docs/K8sassetsContainerEnrichmentData.md create mode 100644 docs/K8sassetsContainerEnrichmentEntry.md create mode 100644 docs/K8sassetsContainerEnrichmentResponse.md create mode 100644 docs/K8sassetsContainerInfo.md create mode 100644 docs/K8sassetsDeploymentEnrichmentData.md create mode 100644 docs/K8sassetsDeploymentEnrichmentEntry.md create mode 100644 docs/K8sassetsDeploymentEnrichmentResponse.md create mode 100644 docs/K8sassetsNodeEnrichmentData.md create mode 100644 docs/K8sassetsNodeEnrichmentEntry.md create mode 100644 docs/K8sassetsNodeEnrichmentResponse.md create mode 100644 docs/K8sassetsPodEnrichmentData.md create mode 100644 docs/K8sassetsPodEnrichmentEntry.md create mode 100644 docs/K8sassetsPodEnrichmentResponse.md create mode 100644 docs/K8siomsKubernetesIOMCountValue.md create mode 100644 docs/K8siomsKubernetesIOMEntityResponse.md create mode 100644 docs/K8siomsKubernetesIOMFieldValue.md create mode 100644 docs/ModelUserInputReadResponse.md create mode 100644 docs/ModelUserInputUpdateRequest.md create mode 100644 docs/ModelUserInputViewModel.md create mode 100644 docs/ModelsAPIAssessmentDetections.md create mode 100644 docs/ModelsAPICombinedDetections.md create mode 100644 docs/ModelsAPIContainerAlert.md create mode 100644 docs/ModelsAPICustomerAndImage.md create mode 100644 docs/ModelsAPIDetectionCount.md create mode 100644 docs/ModelsAPIDetectionCountByType.md create mode 100644 docs/ModelsAPIDriftIndicators.md create mode 100644 docs/ModelsAPIFilterLabel.md create mode 100644 docs/ModelsAPIFilterResponse.md create mode 100644 docs/ModelsAPIImageAssessment.md create mode 100644 docs/ModelsAPIImageAssessmentHistory.md create mode 100644 docs/ModelsAPIImageByVulnerabilityCount.md create mode 100644 docs/ModelsAPIImageCombinedExport.md create mode 100644 docs/ModelsAPIImageCount.md create mode 100644 docs/ModelsAPIImageIssuesSummary.md create mode 100644 docs/ModelsAPIImageVulnerabilitiesSummary.md create mode 100644 docs/ModelsAPIKubernetesIOM.md create mode 100644 docs/ModelsAPIPackageCombined.md create mode 100644 docs/ModelsAPIPackageVulnerability.md create mode 100644 docs/ModelsAPIPackagesByVulnCount.md create mode 100644 docs/ModelsAPIPolicyCountByAction.md create mode 100644 docs/ModelsAPIPolicyData.md create mode 100644 docs/ModelsAPIPolicyEntity.md create mode 100644 docs/ModelsAPIPolicyExclusion.md create mode 100644 docs/ModelsAPIPolicyGroup.md create mode 100644 docs/ModelsAPIPolicyGroupData.md create mode 100644 docs/ModelsAPIPolicyRule.md create mode 100644 docs/ModelsAPIPolicyRulesData.md create mode 100644 docs/ModelsAPIPrecedenceRequest.md create mode 100644 docs/ModelsAPIRuntimeDetection.md create mode 100644 docs/ModelsAPIUnidentifiedContainer.md create mode 100644 docs/ModelsAPIVulnByImageCount.md create mode 100644 docs/ModelsAPIVulnByPublicationDate.md create mode 100644 docs/ModelsAPIVulnCount.md create mode 100644 docs/ModelsAPIVulnCountBySeverity.md create mode 100644 docs/ModelsAPIVulnerabilityCombined.md create mode 100644 docs/ModelsAPIVulnerabilityDetails.md create mode 100644 docs/ModelsAPIVulnerabilityInfo.md create mode 100644 docs/ModelsAccountEntitiesInput.md create mode 100644 docs/ModelsAccountStatusResponse.md create mode 100644 docs/ModelsAggregateValuesByFieldResponse.md create mode 100644 docs/ModelsCluster.md create mode 100644 docs/ModelsClusterEntityResponse.md create mode 100644 docs/ModelsContainer.md create mode 100644 docs/ModelsContainerCoverage.md create mode 100644 docs/ModelsContainerCoverageResponseEntity.md create mode 100644 docs/ModelsContainerEntityResponse.md create mode 100644 docs/ModelsContainerImage.md create mode 100644 docs/ModelsContainerInformation.md create mode 100644 docs/ModelsContainerRuntimePivot.md create mode 100644 docs/ModelsContainerRuntimePivotResponse.md create mode 100644 docs/ModelsCreateImageGroupRequest.md create mode 100644 docs/ModelsCreatePolicyRequest.md create mode 100644 docs/ModelsDefinitionCreateRequestV2.md create mode 100644 docs/ModelsDefinitionUpdateRequestV2.md create mode 100644 docs/ModelsDeployment.md create mode 100644 docs/ModelsDeploymentEntityResponse.md create mode 100644 docs/ModelsExclusionCondition.md create mode 100644 docs/ModelsExclusionConditionRequest.md create mode 100644 docs/ModelsImageInformation.md create mode 100644 docs/ModelsImageSummaryPackagesInfo.md create mode 100644 docs/ModelsIssuesSummaryContainerInfo.md delete mode 100644 docs/ModelsJobMetaData.md create mode 100644 docs/ModelsLightWeightConfig.md create mode 100644 docs/ModelsNode.md create mode 100644 docs/ModelsNodeEntityResponse.md create mode 100644 docs/ModelsPackageNameVersionType.md create mode 100644 docs/ModelsPatchImageGroupRequest.md create mode 100644 docs/ModelsPatchPolicyRequest.md create mode 100644 docs/ModelsPod.md create mode 100644 docs/ModelsPodEntityResponse.md create mode 100644 docs/ModelsPolicyEntityResponse.md create mode 100644 docs/ModelsPolicyExclusionEntityResponse.md create mode 100644 docs/ModelsPolicyGroupEntityResponse.md create mode 100644 docs/ModelsRequestAPIPolicyData.md delete mode 100644 docs/ModelsScanResults.md create mode 100644 docs/ModelsSnapshotAccountStatus.md delete mode 100644 docs/ModelsSnapshotInventoryApplication.md delete mode 100644 docs/ModelsSnapshotInventoryPayload.md create mode 100644 docs/ModelsUpdateExclusionsRequest.md create mode 100644 docs/PackagesApiCombinedPackage.md create mode 100644 docs/PackagesApiCombinedPackageExport.md create mode 100644 docs/PackagesApiPackagesByVulnCount.md create mode 100644 docs/ParameterActivityConfigParameterValue.md create mode 100644 docs/ParameterActivityConfigProvisionParameter.md create mode 100644 docs/ParameterActivityProvisionParameters.md create mode 100644 docs/ParameterActivitySelectionParameter.md create mode 100644 docs/ParameterConditionFieldParameter.md create mode 100644 docs/ParameterConditionFieldProvisionParameter.md create mode 100644 docs/ParameterConditionProvisionParameter.md create mode 100644 docs/ParameterTemplateProvisionParameters.md create mode 100644 docs/ParameterTriggerFieldParameter.md create mode 100644 docs/ParameterTriggerParameter.md create mode 100644 docs/ParameterTriggerProvisionParameter.md create mode 100644 docs/PoliciesAssignedHostGroup.md create mode 100644 docs/PoliciesAssignedRuleGroup.md create mode 100644 docs/PoliciesCreateRequest.md create mode 100644 docs/PoliciesDeleteResponse.md create mode 100644 docs/PoliciesPolicy.md create mode 100644 docs/PoliciesPrecedenceResponse.md create mode 100644 docs/PoliciesResponse.md create mode 100644 docs/PoliciesUpdateRequest.md delete mode 100644 docs/PublicGroup.md delete mode 100644 docs/PublicOwner.md delete mode 100644 docs/PublicPermissionsLin.md create mode 100644 docs/RealTimeResponseAuditApi.md create mode 100644 docs/RegistrationAzureAccountPatch.md create mode 100644 docs/RegistrationAzureAccountPatchRequest.md create mode 100644 docs/RegistrationAzureManagementGroupCreateRequestExternalV1.md create mode 100644 docs/RegistrationAzureManagementGroupExternalV1.md create mode 100644 docs/RegistrationAzureManagementGroupResponseV1.md create mode 100644 docs/RegistrationAzureManagementGroupV1Ext.md create mode 100644 docs/RegistrationGCPAccountExtRequestV2.md create mode 100644 docs/RegistrationGCPAccountPatch.md create mode 100644 docs/RegistrationGCPAccountPatchRequest.md create mode 100644 docs/RegistrationGCPAccountReqObjV2.md create mode 100644 docs/RegistrationGCPAccountResponseExtV2.md create mode 100644 docs/RegistrationGCPAccountRspObjV2.md create mode 100644 docs/RegistrationGCPServiceAccountExtV1.md create mode 100644 docs/RegistrationGCPServiceAccountResponseExtV1.md create mode 100644 docs/RegistrationIOMEventIDResponseMeta.md delete mode 100644 docs/RegistrationMSASpecMetaInfoExtension.md create mode 100644 docs/RegistrationNextTokenPagination.md create mode 100644 docs/RulegroupsAssignedRule.md create mode 100644 docs/RulegroupsCreateRequest.md create mode 100644 docs/RulegroupsDeleteResponse.md create mode 100644 docs/RulegroupsPolicyAssignment.md create mode 100644 docs/RulegroupsResponse.md create mode 100644 docs/RulegroupsRule.md create mode 100644 docs/RulegroupsRuleGroup.md create mode 100644 docs/RulegroupsRulesResponse.md create mode 100644 docs/RulegroupsUpdateRequest.md create mode 100644 docs/RuntimeDetectionsApi.md create mode 100644 docs/RuntimedetectionsDetectionsEntityResponse.md rename docs/{SadomainSubmitForBlockingInfo.md => SadomainSubmissionInformation.md} (75%) create mode 100644 docs/ScheduledexclusionsCreateRequest.md create mode 100644 docs/ScheduledexclusionsRepeated.md create mode 100644 docs/ScheduledexclusionsResponse.md create mode 100644 docs/ScheduledexclusionsScheduledExclusion.md create mode 100644 docs/ScheduledexclusionsUpdateRequest.md rename docs/{VulnerabilitiesEvaluationLogicApi.md => SpotlightEvaluationLogicApi.md} (82%) rename docs/{VulnerabilitiesApi.md => SpotlightVulnerabilitiesApi.md} (76%) create mode 100644 docs/UnidentifiedContainersApi.md create mode 100644 docs/UnidentifiedcontainersUnidentifiedContainerAPIResponse.md create mode 100644 docs/UnidentifiedcontainersUnidentifiedContainersCountValue.md create mode 100644 docs/V2Activity.md create mode 100644 docs/V2ActivityParameters.md create mode 100644 docs/V2ActivityProperties.md create mode 100644 docs/V2Condition.md create mode 100644 docs/V2ConditionParameters.md create mode 100644 docs/V2Definition.md create mode 100644 docs/V2ForLoop.md create mode 100644 docs/V2Loop.md create mode 100644 docs/V2Parameters.md create mode 100644 docs/V2Trigger.md create mode 100644 docs/VulnerabilitiesApiCombinedVulnerability.md create mode 100644 docs/VulnerabilitiesApiCombinedVulnerabilityDetails.md create mode 100644 docs/VulnerabilitiesApiCombinedVulnerabilityInfo.md create mode 100644 docs/VulnerabilitiesApiVulnByImageCount.md create mode 100644 docs/VulnerabilitiesApiVulnByPublication.md create mode 100644 docs/VulnerabilitiesApiVulnCount.md create mode 100644 docs/VulnerabilitiesApiVulnCountByActivelyExploited.md create mode 100644 docs/VulnerabilitiesApiVulnCountByCSPRating.md create mode 100644 docs/VulnerabilitiesApiVulnCountByCVSSScore.md create mode 100644 docs/VulnerabilitiesApiVulnCountBySeverity.md create mode 100644 docs/WorkflowsApi.md rename lib/crimson-falcon/api/{inventories_api.rb => cloud_snapshots_api.rb} (70%) create mode 100644 lib/crimson-falcon/api/container_alerts_api.rb create mode 100644 lib/crimson-falcon/api/container_detections_api.rb create mode 100644 lib/crimson-falcon/api/container_images_api.rb create mode 100644 lib/crimson-falcon/api/container_packages_api.rb create mode 100644 lib/crimson-falcon/api/container_vulnerabilities_api.rb create mode 100644 lib/crimson-falcon/api/custom_storage_api.rb create mode 100644 lib/crimson-falcon/api/drift_indicators_api.rb create mode 100644 lib/crimson-falcon/api/foundry_logscale_api.rb create mode 100644 lib/crimson-falcon/api/image_assessment_policies_api.rb create mode 100644 lib/crimson-falcon/api/real_time_response_audit_api.rb create mode 100644 lib/crimson-falcon/api/runtime_detections_api.rb rename lib/crimson-falcon/api/{vulnerabilities_evaluation_logic_api.rb => spotlight_evaluation_logic_api.rb} (88%) rename lib/crimson-falcon/api/{vulnerabilities_api.rb => spotlight_vulnerabilities_api.rb} (81%) create mode 100644 lib/crimson-falcon/api/unidentified_containers_api.rb create mode 100644 lib/crimson-falcon/api/workflows_api.rb create mode 100644 lib/crimson-falcon/models/alerts_container_alerts_count_value.rb create mode 100644 lib/crimson-falcon/models/alerts_container_alerts_entity_response.rb create mode 100644 lib/crimson-falcon/models/api_detects_query_meta.rb create mode 100644 lib/crimson-falcon/models/api_detects_query_paging.rb create mode 100644 lib/crimson-falcon/models/api_device_count_resp_v1.rb create mode 100644 lib/crimson-falcon/models/api_device_count_v1.rb create mode 100644 lib/crimson-falcon/models/api_devices_ran_on_resp_v1.rb rename lib/crimson-falcon/models/{common_entities_response.rb => api_entities_response.rb} (95%) create mode 100644 lib/crimson-falcon/models/api_execution_results_response.rb create mode 100644 lib/crimson-falcon/models/api_exposed_data_record_bot_location_v1.rb create mode 100644 lib/crimson-falcon/models/api_exposed_data_record_bot_operating_system_v1.rb create mode 100644 lib/crimson-falcon/models/api_exposed_data_record_bot_v1.rb create mode 100644 lib/crimson-falcon/models/api_meta_info.rb create mode 100644 lib/crimson-falcon/models/api_object_metadata.rb create mode 100644 lib/crimson-falcon/models/api_processes_ran_on_resp_v1.rb rename lib/crimson-falcon/models/{api_aggregates_response.rb => api_resource_ids_response.rb} (96%) create mode 100644 lib/crimson-falcon/models/api_response_pagination.rb create mode 100644 lib/crimson-falcon/models/apidomain_dynamic_execute_search_request_v1.rb create mode 100644 lib/crimson-falcon/models/apidomain_query_response_v1.rb create mode 100644 lib/crimson-falcon/models/apidomain_query_response_wrapper_v1.rb create mode 100644 lib/crimson-falcon/models/apidomain_repo_view_list_item_v1.rb create mode 100644 lib/crimson-falcon/models/apidomain_repo_view_list_item_wrapper_v1.rb create mode 100644 lib/crimson-falcon/models/apidomain_repository_v1.rb create mode 100644 lib/crimson-falcon/models/apidomain_saved_search_execute_request_v1.rb create mode 100644 lib/crimson-falcon/models/apidomain_view_connection_v1.rb rename lib/crimson-falcon/models/{public_acl.rb => changes_acl.rb} (96%) rename lib/crimson-falcon/models/{public_acl_change.rb => changes_acl_change.rb} (97%) rename lib/crimson-falcon/models/{public_before.rb => changes_after.rb} (98%) rename lib/crimson-falcon/models/{public_attribute.rb => changes_attribute.rb} (97%) rename lib/crimson-falcon/models/{public_basic.rb => changes_basic.rb} (97%) rename lib/crimson-falcon/models/{public_after.rb => changes_before.rb} (97%) rename lib/crimson-falcon/models/{public_change.rb => changes_change.rb} (96%) rename lib/crimson-falcon/models/{public_dacl.rb => changes_dacl.rb} (96%) rename lib/crimson-falcon/models/{public_dacl_entity.rb => changes_dacl_entity.rb} (91%) rename lib/crimson-falcon/models/{public_diff.rb => changes_diff.rb} (96%) rename lib/crimson-falcon/models/{public_diff_hash.rb => changes_diff_hash.rb} (96%) rename lib/crimson-falcon/models/{public_diff_type.rb => changes_diff_type.rb} (96%) create mode 100644 lib/crimson-falcon/models/changes_get_changes_response.rb rename lib/crimson-falcon/models/{public_owner.rb => changes_group.rb} (96%) create mode 100644 lib/crimson-falcon/models/changes_high_volume_query_meta.rb create mode 100644 lib/crimson-falcon/models/changes_high_volume_query_paging.rb create mode 100644 lib/crimson-falcon/models/changes_high_volume_query_response.rb rename lib/crimson-falcon/models/{public_host.rb => changes_host.rb} (97%) rename lib/crimson-falcon/models/{public_host_group.rb => changes_host_group.rb} (96%) rename lib/crimson-falcon/models/{public_group.rb => changes_owner.rb} (96%) rename lib/crimson-falcon/models/{public_permissions.rb => changes_permissions.rb} (95%) rename lib/crimson-falcon/models/{public_permissions_lin.rb => changes_permissions_lin.rb} (94%) rename lib/crimson-falcon/models/{public_policy.rb => changes_policy.rb} (96%) rename lib/crimson-falcon/models/{public_policy_rule.rb => changes_policy_rule.rb} (96%) rename lib/crimson-falcon/models/{public_policy_rule_group.rb => changes_policy_rule_group.rb} (96%) rename lib/crimson-falcon/models/{public_prevalence.rb => changes_prevalence.rb} (97%) rename lib/crimson-falcon/models/{public_tag.rb => changes_tag.rb} (97%) create mode 100644 lib/crimson-falcon/models/client_action_request.rb create mode 100644 lib/crimson-falcon/models/client_cost.rb create mode 100644 lib/crimson-falcon/models/client_costs.rb create mode 100644 lib/crimson-falcon/models/client_data_ingest_response_v1.rb create mode 100644 lib/crimson-falcon/models/client_data_ingest_response_wrapper_v1.rb create mode 100644 lib/crimson-falcon/models/client_digest_flow.rb create mode 100644 lib/crimson-falcon/models/client_extra_in.rb create mode 100644 lib/crimson-falcon/models/client_extra_limit.rb rename lib/crimson-falcon/models/{domain_msa_meta_info.rb => client_extra_rename.rb} (89%) create mode 100644 lib/crimson-falcon/models/client_extra_sort.rb create mode 100644 lib/crimson-falcon/models/client_field.rb rename lib/crimson-falcon/models/{models_job_meta_data.rb => client_job_status.rb} (73%) create mode 100644 lib/crimson-falcon/models/client_query_response_schemas_v1.rb create mode 100644 lib/crimson-falcon/models/client_query_result_metadata.rb create mode 100644 lib/crimson-falcon/models/client_repository.rb create mode 100644 lib/crimson-falcon/models/client_spent.rb create mode 100644 lib/crimson-falcon/models/client_system_definition_create_response.rb create mode 100644 lib/crimson-falcon/models/client_system_definition_de_provision_request.rb create mode 100644 lib/crimson-falcon/models/client_system_definition_promote_request.rb create mode 100644 lib/crimson-falcon/models/client_system_definition_provision_request.rb create mode 100644 lib/crimson-falcon/models/client_top_value.rb create mode 100644 lib/crimson-falcon/models/common_count_as_resource.rb create mode 100644 lib/crimson-falcon/models/common_count_response.rb create mode 100644 lib/crimson-falcon/models/common_generic_entity_response_string.rb create mode 100644 lib/crimson-falcon/models/custom_type1255839303.rb create mode 100644 lib/crimson-falcon/models/custom_type3191042536.rb create mode 100644 lib/crimson-falcon/models/definitions_definition_entities_response.rb create mode 100644 lib/crimson-falcon/models/definitions_definition_ext.rb create mode 100644 lib/crimson-falcon/models/definitions_definition_external_response.rb create mode 100644 lib/crimson-falcon/models/definitions_definition_import_response.rb create mode 100644 lib/crimson-falcon/models/definitions_definition_import_response_entity.rb create mode 100644 lib/crimson-falcon/models/definitions_flight_control_request.rb create mode 100644 lib/crimson-falcon/models/definitions_parameter_property.rb create mode 100644 lib/crimson-falcon/models/definitions_playbook_parameter.rb create mode 100644 lib/crimson-falcon/models/detections_api_assessment_detections.rb create mode 100644 lib/crimson-falcon/models/detections_api_combined_detections.rb create mode 100644 lib/crimson-falcon/models/detections_api_detections_by_severity.rb create mode 100644 lib/crimson-falcon/models/detections_api_detections_by_type.rb create mode 100644 lib/crimson-falcon/models/detections_api_detections_count.rb create mode 100644 lib/crimson-falcon/models/detectsapi_aggregate_alert_query_request.rb create mode 100644 lib/crimson-falcon/models/detectsapi_aggregates_response.rb create mode 100644 lib/crimson-falcon/models/detectsapi_aggregation_result.rb create mode 100644 lib/crimson-falcon/models/detectsapi_aggregation_result_item.rb create mode 100644 lib/crimson-falcon/models/detectsapi_alert_query_response.rb create mode 100644 lib/crimson-falcon/models/detectsapi_patch_entities_alerts_v3_request.rb create mode 100644 lib/crimson-falcon/models/detectsapi_post_entities_alerts_v2_request.rb create mode 100644 lib/crimson-falcon/models/detectsapi_post_entities_alerts_v2_response.rb create mode 100644 lib/crimson-falcon/models/detectsapi_response_fields.rb create mode 100644 lib/crimson-falcon/models/domain_actor_entity.rb create mode 100644 lib/crimson-falcon/models/domain_actor_news_document.rb create mode 100644 lib/crimson-falcon/models/domain_api_rule_details_response_v1.rb create mode 100644 lib/crimson-falcon/models/domain_api_rule_details_v1.rb create mode 100644 lib/crimson-falcon/models/domain_asset_criticality_info_v1.rb create mode 100644 lib/crimson-falcon/models/domain_attachment.rb create mode 100644 lib/crimson-falcon/models/domain_aws_account_input.rb create mode 100644 lib/crimson-falcon/models/domain_aws_batch_cluster_region.rb create mode 100644 lib/crimson-falcon/models/domain_azure_management_group_role_assignment.rb create mode 100644 lib/crimson-falcon/models/domain_card.rb create mode 100644 lib/crimson-falcon/models/domain_device_policy.rb rename lib/crimson-falcon/models/{registration_msa_spec_meta_info_extension.rb => domain_exposed_data_record_bot_location_v1.rb} (88%) create mode 100644 lib/crimson-falcon/models/domain_exposed_data_record_bot_operating_system_v1.rb create mode 100644 lib/crimson-falcon/models/domain_exposed_data_record_bot_v1.rb create mode 100644 lib/crimson-falcon/models/domain_file_count_v2.rb create mode 100644 lib/crimson-falcon/models/domain_fragment_info.rb create mode 100644 lib/crimson-falcon/models/domain_host.rb create mode 100644 lib/crimson-falcon/models/domain_ioc.rb create mode 100644 lib/crimson-falcon/models/domain_item_details_v1.rb create mode 100644 lib/crimson-falcon/models/domain_mapped_device_policies.rb create mode 100644 lib/crimson-falcon/models/domain_marketplace_product.rb create mode 100644 lib/crimson-falcon/models/domain_report_malware.rb create mode 100644 lib/crimson-falcon/models/domain_scan_v2.rb create mode 100644 lib/crimson-falcon/models/domain_telegram_channel_info.rb rename lib/crimson-falcon/models/{models_snapshot_inventory_payload.rb => domain_telegram_info.rb} (86%) create mode 100644 lib/crimson-falcon/models/domain_telegram_recipient_info.rb create mode 100644 lib/crimson-falcon/models/domain_telegram_sender_info.rb create mode 100644 lib/crimson-falcon/models/domain_threat_entity.rb create mode 100644 lib/crimson-falcon/models/driftindicators_drift_entity_response.rb create mode 100644 lib/crimson-falcon/models/driftindicators_drift_indicators_count_value.rb create mode 100644 lib/crimson-falcon/models/driftindicators_drift_indicators_field_value.rb create mode 100644 lib/crimson-falcon/models/empowerapi_falcon_script.rb create mode 100644 lib/crimson-falcon/models/empowerapi_msa_falcon_script_response.rb create mode 100644 lib/crimson-falcon/models/empowerapi_msa_id_list_response.rb create mode 100644 lib/crimson-falcon/models/entities_ods_scan_response_v2.rb create mode 100644 lib/crimson-falcon/models/executions_activity_execution_result.rb create mode 100644 lib/crimson-falcon/models/executions_ancestor_execution.rb create mode 100644 lib/crimson-falcon/models/executions_child_execution_result.rb create mode 100644 lib/crimson-falcon/models/executions_execution_result.rb create mode 100644 lib/crimson-falcon/models/executions_iterations.rb create mode 100644 lib/crimson-falcon/models/executions_loop_result.rb create mode 100644 lib/crimson-falcon/models/executions_reference_link.rb create mode 100644 lib/crimson-falcon/models/executions_trigger_result.rb create mode 100644 lib/crimson-falcon/models/flows.rb create mode 100644 lib/crimson-falcon/models/graph_condition.rb create mode 100644 lib/crimson-falcon/models/graph_configured_activity.rb create mode 100644 lib/crimson-falcon/models/graph_configured_trigger.rb create mode 100644 lib/crimson-falcon/models/graph_definition_model.rb rename lib/crimson-falcon/models/{models_scan_results.rb => graph_end.rb} (85%) create mode 100644 lib/crimson-falcon/models/graph_flow.rb create mode 100644 lib/crimson-falcon/models/graph_gateway.rb create mode 100644 lib/crimson-falcon/models/graph_multi.rb create mode 100644 lib/crimson-falcon/models/graph_sub_model.rb create mode 100644 lib/crimson-falcon/models/graph_timer_event_definition.rb create mode 100644 lib/crimson-falcon/models/graph_validation_error.rb create mode 100644 lib/crimson-falcon/models/images_api_combined_image_export.rb create mode 100644 lib/crimson-falcon/models/images_api_customer_and_image.rb create mode 100644 lib/crimson-falcon/models/images_api_image_assessment_history.rb create mode 100644 lib/crimson-falcon/models/images_api_image_by_vulnerability_count.rb create mode 100644 lib/crimson-falcon/models/images_api_image_count.rb create mode 100644 lib/crimson-falcon/models/images_api_image_count_by_base_os.rb create mode 100644 lib/crimson-falcon/models/images_api_image_count_by_state.rb create mode 100644 lib/crimson-falcon/models/images_api_image_issues_summary.rb create mode 100644 lib/crimson-falcon/models/images_api_image_vulnerabilities_summary.rb create mode 100644 lib/crimson-falcon/models/jsonschema_authorization.rb create mode 100644 lib/crimson-falcon/models/jsonschema_collection_index_field.rb create mode 100644 lib/crimson-falcon/models/jsonschema_complex_permissions.rb create mode 100644 lib/crimson-falcon/models/jsonschema_complex_permissions_or.rb create mode 100644 lib/crimson-falcon/models/jsonschema_condition_group_fields.rb create mode 100644 lib/crimson-falcon/models/jsonschema_permission.rb create mode 100644 lib/crimson-falcon/models/jsonschema_pivot.rb create mode 100644 lib/crimson-falcon/models/jsonschema_reset_fields.rb create mode 100644 lib/crimson-falcon/models/jsonschema_schema.rb create mode 100644 lib/crimson-falcon/models/jsonschema_signals_extensions.rb create mode 100644 lib/crimson-falcon/models/jsonschema_sub_schema.rb create mode 100644 lib/crimson-falcon/models/jsonschema_workflow_extensions.rb create mode 100644 lib/crimson-falcon/models/k8sassets_cluster_enrichment_data.rb create mode 100644 lib/crimson-falcon/models/k8sassets_cluster_enrichment_entry.rb create mode 100644 lib/crimson-falcon/models/k8sassets_cluster_enrichment_response.rb create mode 100644 lib/crimson-falcon/models/k8sassets_container_enrichment_data.rb create mode 100644 lib/crimson-falcon/models/k8sassets_container_enrichment_entry.rb create mode 100644 lib/crimson-falcon/models/k8sassets_container_enrichment_response.rb create mode 100644 lib/crimson-falcon/models/k8sassets_container_info.rb create mode 100644 lib/crimson-falcon/models/k8sassets_deployment_enrichment_data.rb create mode 100644 lib/crimson-falcon/models/k8sassets_deployment_enrichment_entry.rb create mode 100644 lib/crimson-falcon/models/k8sassets_deployment_enrichment_response.rb create mode 100644 lib/crimson-falcon/models/k8sassets_node_enrichment_data.rb create mode 100644 lib/crimson-falcon/models/k8sassets_node_enrichment_entry.rb create mode 100644 lib/crimson-falcon/models/k8sassets_node_enrichment_response.rb create mode 100644 lib/crimson-falcon/models/k8sassets_pod_enrichment_data.rb create mode 100644 lib/crimson-falcon/models/k8sassets_pod_enrichment_entry.rb create mode 100644 lib/crimson-falcon/models/k8sassets_pod_enrichment_response.rb create mode 100644 lib/crimson-falcon/models/k8sioms_kubernetes_iom_count_value.rb create mode 100644 lib/crimson-falcon/models/k8sioms_kubernetes_iom_entity_response.rb create mode 100644 lib/crimson-falcon/models/k8sioms_kubernetes_iom_field_value.rb create mode 100644 lib/crimson-falcon/models/model_user_input_read_response.rb create mode 100644 lib/crimson-falcon/models/model_user_input_update_request.rb create mode 100644 lib/crimson-falcon/models/model_user_input_view_model.rb create mode 100644 lib/crimson-falcon/models/models_account_entities_input.rb create mode 100644 lib/crimson-falcon/models/models_account_status_response.rb create mode 100644 lib/crimson-falcon/models/models_aggregate_values_by_field_response.rb create mode 100644 lib/crimson-falcon/models/models_api_assessment_detections.rb create mode 100644 lib/crimson-falcon/models/models_api_combined_detections.rb create mode 100644 lib/crimson-falcon/models/models_api_container_alert.rb create mode 100644 lib/crimson-falcon/models/models_api_customer_and_image.rb create mode 100644 lib/crimson-falcon/models/models_api_detection_count.rb create mode 100644 lib/crimson-falcon/models/models_api_detection_count_by_type.rb create mode 100644 lib/crimson-falcon/models/models_api_drift_indicators.rb create mode 100644 lib/crimson-falcon/models/models_api_filter_label.rb create mode 100644 lib/crimson-falcon/models/models_api_filter_response.rb create mode 100644 lib/crimson-falcon/models/models_api_image_assessment.rb create mode 100644 lib/crimson-falcon/models/models_api_image_assessment_history.rb create mode 100644 lib/crimson-falcon/models/models_api_image_by_vulnerability_count.rb create mode 100644 lib/crimson-falcon/models/models_api_image_combined_export.rb create mode 100644 lib/crimson-falcon/models/models_api_image_count.rb create mode 100644 lib/crimson-falcon/models/models_api_image_issues_summary.rb create mode 100644 lib/crimson-falcon/models/models_api_image_vulnerabilities_summary.rb create mode 100644 lib/crimson-falcon/models/models_api_kubernetes_iom.rb rename lib/crimson-falcon/models/{domain_notification_details_v1.rb => models_api_package_combined.rb} (68%) create mode 100644 lib/crimson-falcon/models/models_api_package_vulnerability.rb create mode 100644 lib/crimson-falcon/models/models_api_packages_by_vuln_count.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_count_by_action.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_data.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_entity.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_exclusion.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_group.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_group_data.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_rule.rb create mode 100644 lib/crimson-falcon/models/models_api_policy_rules_data.rb create mode 100644 lib/crimson-falcon/models/models_api_precedence_request.rb create mode 100644 lib/crimson-falcon/models/models_api_runtime_detection.rb create mode 100644 lib/crimson-falcon/models/models_api_unidentified_container.rb create mode 100644 lib/crimson-falcon/models/models_api_vuln_by_image_count.rb create mode 100644 lib/crimson-falcon/models/models_api_vuln_by_publication_date.rb create mode 100644 lib/crimson-falcon/models/models_api_vuln_count.rb create mode 100644 lib/crimson-falcon/models/models_api_vuln_count_by_severity.rb create mode 100644 lib/crimson-falcon/models/models_api_vulnerability_combined.rb create mode 100644 lib/crimson-falcon/models/models_api_vulnerability_details.rb create mode 100644 lib/crimson-falcon/models/models_api_vulnerability_info.rb create mode 100644 lib/crimson-falcon/models/models_cluster.rb create mode 100644 lib/crimson-falcon/models/models_cluster_entity_response.rb create mode 100644 lib/crimson-falcon/models/models_container.rb create mode 100644 lib/crimson-falcon/models/models_container_coverage.rb create mode 100644 lib/crimson-falcon/models/models_container_coverage_response_entity.rb create mode 100644 lib/crimson-falcon/models/models_container_entity_response.rb create mode 100644 lib/crimson-falcon/models/models_container_image.rb create mode 100644 lib/crimson-falcon/models/models_container_information.rb create mode 100644 lib/crimson-falcon/models/models_container_runtime_pivot.rb create mode 100644 lib/crimson-falcon/models/models_container_runtime_pivot_response.rb create mode 100644 lib/crimson-falcon/models/models_create_image_group_request.rb create mode 100644 lib/crimson-falcon/models/models_create_policy_request.rb create mode 100644 lib/crimson-falcon/models/models_definition_create_request_v2.rb create mode 100644 lib/crimson-falcon/models/models_definition_update_request_v2.rb rename lib/crimson-falcon/models/{models_snapshot_inventory_application.rb => models_deployment.rb} (64%) create mode 100644 lib/crimson-falcon/models/models_deployment_entity_response.rb create mode 100644 lib/crimson-falcon/models/models_exclusion_condition.rb create mode 100644 lib/crimson-falcon/models/models_exclusion_condition_request.rb create mode 100644 lib/crimson-falcon/models/models_image_information.rb create mode 100644 lib/crimson-falcon/models/models_image_summary_packages_info.rb create mode 100644 lib/crimson-falcon/models/models_issues_summary_container_info.rb create mode 100644 lib/crimson-falcon/models/models_light_weight_config.rb create mode 100644 lib/crimson-falcon/models/models_node.rb rename lib/crimson-falcon/models/{public_get_changes_response.rb => models_node_entity_response.rb} (97%) create mode 100644 lib/crimson-falcon/models/models_package_name_version_type.rb create mode 100644 lib/crimson-falcon/models/models_patch_image_group_request.rb create mode 100644 lib/crimson-falcon/models/models_patch_policy_request.rb create mode 100644 lib/crimson-falcon/models/models_pod.rb create mode 100644 lib/crimson-falcon/models/models_pod_entity_response.rb create mode 100644 lib/crimson-falcon/models/models_policy_entity_response.rb create mode 100644 lib/crimson-falcon/models/models_policy_exclusion_entity_response.rb create mode 100644 lib/crimson-falcon/models/models_policy_group_entity_response.rb create mode 100644 lib/crimson-falcon/models/models_request_api_policy_data.rb create mode 100644 lib/crimson-falcon/models/models_snapshot_account_status.rb create mode 100644 lib/crimson-falcon/models/models_update_exclusions_request.rb create mode 100644 lib/crimson-falcon/models/packages_api_combined_package.rb create mode 100644 lib/crimson-falcon/models/packages_api_combined_package_export.rb create mode 100644 lib/crimson-falcon/models/packages_api_packages_by_vuln_count.rb create mode 100644 lib/crimson-falcon/models/parameter_activity_config_parameter_value.rb create mode 100644 lib/crimson-falcon/models/parameter_activity_config_provision_parameter.rb create mode 100644 lib/crimson-falcon/models/parameter_activity_provision_parameters.rb create mode 100644 lib/crimson-falcon/models/parameter_activity_selection_parameter.rb create mode 100644 lib/crimson-falcon/models/parameter_condition_field_parameter.rb create mode 100644 lib/crimson-falcon/models/parameter_condition_field_provision_parameter.rb create mode 100644 lib/crimson-falcon/models/parameter_condition_provision_parameter.rb create mode 100644 lib/crimson-falcon/models/parameter_template_provision_parameters.rb create mode 100644 lib/crimson-falcon/models/parameter_trigger_field_parameter.rb create mode 100644 lib/crimson-falcon/models/parameter_trigger_parameter.rb create mode 100644 lib/crimson-falcon/models/parameter_trigger_provision_parameter.rb create mode 100644 lib/crimson-falcon/models/policies_assigned_host_group.rb create mode 100644 lib/crimson-falcon/models/policies_assigned_rule_group.rb create mode 100644 lib/crimson-falcon/models/policies_create_request.rb create mode 100644 lib/crimson-falcon/models/policies_delete_response.rb create mode 100644 lib/crimson-falcon/models/policies_policy.rb create mode 100644 lib/crimson-falcon/models/policies_precedence_response.rb create mode 100644 lib/crimson-falcon/models/policies_response.rb create mode 100644 lib/crimson-falcon/models/policies_update_request.rb create mode 100644 lib/crimson-falcon/models/registration_azure_account_patch.rb create mode 100644 lib/crimson-falcon/models/registration_azure_account_patch_request.rb create mode 100644 lib/crimson-falcon/models/registration_azure_management_group_create_request_external_v1.rb create mode 100644 lib/crimson-falcon/models/registration_azure_management_group_external_v1.rb create mode 100644 lib/crimson-falcon/models/registration_azure_management_group_response_v1.rb create mode 100644 lib/crimson-falcon/models/registration_azure_management_group_v1_ext.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_account_ext_request_v2.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_account_patch.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_account_patch_request.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_account_req_obj_v2.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_account_response_ext_v2.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_account_rsp_obj_v2.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_service_account_ext_v1.rb create mode 100644 lib/crimson-falcon/models/registration_gcp_service_account_response_ext_v1.rb create mode 100644 lib/crimson-falcon/models/registration_iom_event_id_response_meta.rb create mode 100644 lib/crimson-falcon/models/registration_next_token_pagination.rb create mode 100644 lib/crimson-falcon/models/rulegroups_assigned_rule.rb create mode 100644 lib/crimson-falcon/models/rulegroups_create_request.rb create mode 100644 lib/crimson-falcon/models/rulegroups_delete_response.rb create mode 100644 lib/crimson-falcon/models/rulegroups_policy_assignment.rb create mode 100644 lib/crimson-falcon/models/rulegroups_response.rb create mode 100644 lib/crimson-falcon/models/rulegroups_rule.rb create mode 100644 lib/crimson-falcon/models/rulegroups_rule_group.rb create mode 100644 lib/crimson-falcon/models/rulegroups_rules_response.rb create mode 100644 lib/crimson-falcon/models/rulegroups_update_request.rb create mode 100644 lib/crimson-falcon/models/runtimedetections_detections_entity_response.rb rename lib/crimson-falcon/models/{sadomain_submit_for_blocking_info.rb => sadomain_submission_information.rb} (98%) create mode 100644 lib/crimson-falcon/models/scheduledexclusions_create_request.rb create mode 100644 lib/crimson-falcon/models/scheduledexclusions_repeated.rb create mode 100644 lib/crimson-falcon/models/scheduledexclusions_response.rb create mode 100644 lib/crimson-falcon/models/scheduledexclusions_scheduled_exclusion.rb create mode 100644 lib/crimson-falcon/models/scheduledexclusions_update_request.rb create mode 100644 lib/crimson-falcon/models/unidentifiedcontainers_unidentified_container_api_response.rb create mode 100644 lib/crimson-falcon/models/unidentifiedcontainers_unidentified_containers_count_value.rb create mode 100644 lib/crimson-falcon/models/v2_activity.rb create mode 100644 lib/crimson-falcon/models/v2_activity_parameters.rb create mode 100644 lib/crimson-falcon/models/v2_activity_properties.rb create mode 100644 lib/crimson-falcon/models/v2_condition.rb create mode 100644 lib/crimson-falcon/models/v2_condition_parameters.rb create mode 100644 lib/crimson-falcon/models/v2_definition.rb create mode 100644 lib/crimson-falcon/models/v2_for_loop.rb create mode 100644 lib/crimson-falcon/models/v2_loop.rb create mode 100644 lib/crimson-falcon/models/v2_parameters.rb create mode 100644 lib/crimson-falcon/models/v2_trigger.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability_details.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability_info.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_vuln_by_image_count.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_vuln_by_publication.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_vuln_count.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_actively_exploited.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_csp_rating.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_cvss_score.rb create mode 100644 lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_severity.rb rename spec/api/{inventories_api_spec.rb => cloud_snapshots_api_spec.rb} (76%) create mode 100644 spec/api/container_alerts_api_spec.rb create mode 100644 spec/api/container_detections_api_spec.rb create mode 100644 spec/api/container_images_api_spec.rb create mode 100644 spec/api/container_packages_api_spec.rb create mode 100644 spec/api/container_vulnerabilities_api_spec.rb create mode 100644 spec/api/custom_storage_api_spec.rb create mode 100644 spec/api/drift_indicators_api_spec.rb create mode 100644 spec/api/foundry_logscale_api_spec.rb create mode 100644 spec/api/image_assessment_policies_api_spec.rb create mode 100644 spec/api/real_time_response_audit_api_spec.rb create mode 100644 spec/api/runtime_detections_api_spec.rb rename spec/api/{vulnerabilities_evaluation_logic_api_spec.rb => spotlight_evaluation_logic_api_spec.rb} (90%) rename spec/api/{vulnerabilities_api_spec.rb => spotlight_vulnerabilities_api_spec.rb} (82%) create mode 100644 spec/api/unidentified_containers_api_spec.rb create mode 100644 spec/api/workflows_api_spec.rb create mode 100644 spec/models/alerts_container_alerts_count_value_spec.rb create mode 100644 spec/models/alerts_container_alerts_entity_response_spec.rb create mode 100644 spec/models/api_detects_query_meta_spec.rb create mode 100644 spec/models/api_detects_query_paging_spec.rb rename spec/models/{api_aggregates_response_spec.rb => api_device_count_resp_v1_spec.rb} (84%) create mode 100644 spec/models/api_device_count_v1_spec.rb create mode 100644 spec/models/api_devices_ran_on_resp_v1_spec.rb create mode 100644 spec/models/api_entities_response_spec.rb create mode 100644 spec/models/api_execution_results_response_spec.rb create mode 100644 spec/models/api_exposed_data_record_bot_location_v1_spec.rb create mode 100644 spec/models/api_exposed_data_record_bot_operating_system_v1_spec.rb create mode 100644 spec/models/api_exposed_data_record_bot_v1_spec.rb create mode 100644 spec/models/api_meta_info_spec.rb create mode 100644 spec/models/api_object_metadata_spec.rb create mode 100644 spec/models/api_processes_ran_on_resp_v1_spec.rb rename spec/models/{common_entities_response_spec.rb => api_resource_ids_response_spec.rb} (85%) create mode 100644 spec/models/api_response_pagination_spec.rb create mode 100644 spec/models/apidomain_dynamic_execute_search_request_v1_spec.rb create mode 100644 spec/models/apidomain_query_response_v1_spec.rb create mode 100644 spec/models/apidomain_query_response_wrapper_v1_spec.rb rename spec/models/{models_snapshot_inventory_application_spec.rb => apidomain_repo_view_list_item_v1_spec.rb} (76%) create mode 100644 spec/models/apidomain_repo_view_list_item_wrapper_v1_spec.rb create mode 100644 spec/models/apidomain_repository_v1_spec.rb create mode 100644 spec/models/apidomain_saved_search_execute_request_v1_spec.rb create mode 100644 spec/models/apidomain_view_connection_v1_spec.rb rename spec/models/{public_acl_change_spec.rb => changes_acl_change_spec.rb} (84%) rename spec/models/{public_acl_spec.rb => changes_acl_spec.rb} (88%) rename spec/models/{public_after_spec.rb => changes_after_spec.rb} (85%) rename spec/models/{public_attribute_spec.rb => changes_attribute_spec.rb} (84%) rename spec/models/{public_basic_spec.rb => changes_basic_spec.rb} (87%) rename spec/models/{public_before_spec.rb => changes_before_spec.rb} (85%) rename spec/models/{public_change_spec.rb => changes_change_spec.rb} (95%) rename spec/models/{public_dacl_entity_spec.rb => changes_dacl_entity_spec.rb} (80%) rename spec/models/{public_dacl_spec.rb => changes_dacl_spec.rb} (86%) rename spec/models/{public_diff_hash_spec.rb => changes_diff_hash_spec.rb} (83%) rename spec/models/{public_diff_spec.rb => changes_diff_spec.rb} (84%) rename spec/models/{public_diff_type_spec.rb => changes_diff_type_spec.rb} (83%) create mode 100644 spec/models/changes_get_changes_response_spec.rb rename spec/models/{public_owner_spec.rb => changes_group_spec.rb} (85%) create mode 100644 spec/models/changes_high_volume_query_meta_spec.rb create mode 100644 spec/models/changes_high_volume_query_paging_spec.rb create mode 100644 spec/models/changes_high_volume_query_response_spec.rb rename spec/models/{public_host_group_spec.rb => changes_host_group_spec.rb} (83%) rename spec/models/{public_host_spec.rb => changes_host_spec.rb} (90%) rename spec/models/{public_group_spec.rb => changes_owner_spec.rb} (85%) rename spec/models/{public_permissions_lin_spec.rb => changes_permissions_lin_spec.rb} (87%) rename spec/models/{public_permissions_spec.rb => changes_permissions_spec.rb} (86%) rename spec/models/{public_policy_rule_group_spec.rb => changes_policy_rule_group_spec.rb} (83%) rename spec/models/{public_policy_rule_spec.rb => changes_policy_rule_spec.rb} (83%) rename spec/models/{public_policy_spec.rb => changes_policy_spec.rb} (85%) rename spec/models/{public_prevalence_spec.rb => changes_prevalence_spec.rb} (86%) rename spec/models/{public_tag_spec.rb => changes_tag_spec.rb} (85%) create mode 100644 spec/models/client_action_request_spec.rb create mode 100644 spec/models/client_cost_spec.rb create mode 100644 spec/models/client_costs_spec.rb create mode 100644 spec/models/client_data_ingest_response_v1_spec.rb create mode 100644 spec/models/client_data_ingest_response_wrapper_v1_spec.rb create mode 100644 spec/models/client_digest_flow_spec.rb create mode 100644 spec/models/client_extra_in_spec.rb create mode 100644 spec/models/client_extra_limit_spec.rb create mode 100644 spec/models/client_extra_rename_spec.rb create mode 100644 spec/models/client_extra_sort_spec.rb create mode 100644 spec/models/client_field_spec.rb create mode 100644 spec/models/client_job_status_spec.rb create mode 100644 spec/models/client_query_response_schemas_v1_spec.rb create mode 100644 spec/models/client_query_result_metadata_spec.rb create mode 100644 spec/models/client_repository_spec.rb create mode 100644 spec/models/client_spent_spec.rb create mode 100644 spec/models/client_system_definition_create_response_spec.rb create mode 100644 spec/models/client_system_definition_de_provision_request_spec.rb create mode 100644 spec/models/client_system_definition_promote_request_spec.rb create mode 100644 spec/models/client_system_definition_provision_request_spec.rb create mode 100644 spec/models/client_top_value_spec.rb create mode 100644 spec/models/common_count_as_resource_spec.rb create mode 100644 spec/models/common_count_response_spec.rb create mode 100644 spec/models/common_generic_entity_response_string_spec.rb create mode 100644 spec/models/custom_type1255839303_spec.rb create mode 100644 spec/models/custom_type3191042536_spec.rb create mode 100644 spec/models/definitions_definition_entities_response_spec.rb create mode 100644 spec/models/definitions_definition_ext_spec.rb create mode 100644 spec/models/definitions_definition_external_response_spec.rb create mode 100644 spec/models/definitions_definition_import_response_entity_spec.rb create mode 100644 spec/models/definitions_definition_import_response_spec.rb create mode 100644 spec/models/definitions_flight_control_request_spec.rb create mode 100644 spec/models/definitions_parameter_property_spec.rb create mode 100644 spec/models/definitions_playbook_parameter_spec.rb create mode 100644 spec/models/detections_api_assessment_detections_spec.rb create mode 100644 spec/models/detections_api_combined_detections_spec.rb create mode 100644 spec/models/detections_api_detections_by_severity_spec.rb create mode 100644 spec/models/detections_api_detections_by_type_spec.rb create mode 100644 spec/models/detections_api_detections_count_spec.rb create mode 100644 spec/models/detectsapi_aggregate_alert_query_request_spec.rb create mode 100644 spec/models/detectsapi_aggregates_response_spec.rb create mode 100644 spec/models/detectsapi_aggregation_result_item_spec.rb create mode 100644 spec/models/detectsapi_aggregation_result_spec.rb create mode 100644 spec/models/detectsapi_alert_query_response_spec.rb create mode 100644 spec/models/detectsapi_patch_entities_alerts_v3_request_spec.rb create mode 100644 spec/models/detectsapi_post_entities_alerts_v2_request_spec.rb create mode 100644 spec/models/detectsapi_post_entities_alerts_v2_response_spec.rb create mode 100644 spec/models/detectsapi_response_fields_spec.rb create mode 100644 spec/models/domain_actor_entity_spec.rb create mode 100644 spec/models/domain_actor_news_document_spec.rb create mode 100644 spec/models/domain_api_rule_details_response_v1_spec.rb create mode 100644 spec/models/domain_api_rule_details_v1_spec.rb create mode 100644 spec/models/domain_asset_criticality_info_v1_spec.rb create mode 100644 spec/models/domain_attachment_spec.rb create mode 100644 spec/models/domain_aws_account_input_spec.rb create mode 100644 spec/models/domain_aws_batch_cluster_region_spec.rb create mode 100644 spec/models/domain_azure_management_group_role_assignment_spec.rb create mode 100644 spec/models/domain_card_spec.rb create mode 100644 spec/models/domain_device_policy_spec.rb rename spec/models/{registration_msa_spec_meta_info_extension_spec.rb => domain_exposed_data_record_bot_location_v1_spec.rb} (76%) create mode 100644 spec/models/domain_exposed_data_record_bot_operating_system_v1_spec.rb create mode 100644 spec/models/domain_exposed_data_record_bot_v1_spec.rb create mode 100644 spec/models/domain_file_count_v2_spec.rb create mode 100644 spec/models/domain_fragment_info_spec.rb create mode 100644 spec/models/domain_host_spec.rb create mode 100644 spec/models/domain_ioc_spec.rb create mode 100644 spec/models/domain_item_details_v1_spec.rb create mode 100644 spec/models/domain_mapped_device_policies_spec.rb create mode 100644 spec/models/domain_marketplace_product_spec.rb create mode 100644 spec/models/domain_report_malware_spec.rb create mode 100644 spec/models/domain_scan_v2_spec.rb create mode 100644 spec/models/domain_telegram_channel_info_spec.rb create mode 100644 spec/models/domain_telegram_info_spec.rb create mode 100644 spec/models/domain_telegram_recipient_info_spec.rb create mode 100644 spec/models/domain_telegram_sender_info_spec.rb create mode 100644 spec/models/domain_threat_entity_spec.rb create mode 100644 spec/models/driftindicators_drift_entity_response_spec.rb create mode 100644 spec/models/driftindicators_drift_indicators_count_value_spec.rb create mode 100644 spec/models/driftindicators_drift_indicators_field_value_spec.rb create mode 100644 spec/models/empowerapi_falcon_script_spec.rb create mode 100644 spec/models/empowerapi_msa_falcon_script_response_spec.rb create mode 100644 spec/models/empowerapi_msa_id_list_response_spec.rb create mode 100644 spec/models/entities_ods_scan_response_v2_spec.rb create mode 100644 spec/models/executions_activity_execution_result_spec.rb create mode 100644 spec/models/executions_ancestor_execution_spec.rb create mode 100644 spec/models/executions_child_execution_result_spec.rb create mode 100644 spec/models/executions_execution_result_spec.rb create mode 100644 spec/models/executions_iterations_spec.rb create mode 100644 spec/models/executions_loop_result_spec.rb create mode 100644 spec/models/executions_reference_link_spec.rb create mode 100644 spec/models/executions_trigger_result_spec.rb create mode 100644 spec/models/flows_spec.rb create mode 100644 spec/models/graph_condition_spec.rb create mode 100644 spec/models/graph_configured_activity_spec.rb create mode 100644 spec/models/graph_configured_trigger_spec.rb create mode 100644 spec/models/graph_definition_model_spec.rb create mode 100644 spec/models/graph_end_spec.rb create mode 100644 spec/models/graph_flow_spec.rb create mode 100644 spec/models/graph_gateway_spec.rb create mode 100644 spec/models/graph_multi_spec.rb create mode 100644 spec/models/graph_sub_model_spec.rb create mode 100644 spec/models/graph_timer_event_definition_spec.rb create mode 100644 spec/models/graph_validation_error_spec.rb create mode 100644 spec/models/images_api_combined_image_export_spec.rb create mode 100644 spec/models/images_api_customer_and_image_spec.rb create mode 100644 spec/models/images_api_image_assessment_history_spec.rb create mode 100644 spec/models/images_api_image_by_vulnerability_count_spec.rb create mode 100644 spec/models/images_api_image_count_by_base_os_spec.rb create mode 100644 spec/models/images_api_image_count_by_state_spec.rb create mode 100644 spec/models/images_api_image_count_spec.rb create mode 100644 spec/models/images_api_image_issues_summary_spec.rb create mode 100644 spec/models/images_api_image_vulnerabilities_summary_spec.rb create mode 100644 spec/models/jsonschema_authorization_spec.rb create mode 100644 spec/models/jsonschema_collection_index_field_spec.rb create mode 100644 spec/models/jsonschema_complex_permissions_or_spec.rb create mode 100644 spec/models/jsonschema_complex_permissions_spec.rb create mode 100644 spec/models/jsonschema_condition_group_fields_spec.rb create mode 100644 spec/models/jsonschema_permission_spec.rb create mode 100644 spec/models/jsonschema_pivot_spec.rb create mode 100644 spec/models/jsonschema_reset_fields_spec.rb create mode 100644 spec/models/jsonschema_schema_spec.rb create mode 100644 spec/models/jsonschema_signals_extensions_spec.rb create mode 100644 spec/models/jsonschema_sub_schema_spec.rb create mode 100644 spec/models/jsonschema_workflow_extensions_spec.rb create mode 100644 spec/models/k8sassets_cluster_enrichment_data_spec.rb create mode 100644 spec/models/k8sassets_cluster_enrichment_entry_spec.rb create mode 100644 spec/models/k8sassets_cluster_enrichment_response_spec.rb create mode 100644 spec/models/k8sassets_container_enrichment_data_spec.rb create mode 100644 spec/models/k8sassets_container_enrichment_entry_spec.rb create mode 100644 spec/models/k8sassets_container_enrichment_response_spec.rb create mode 100644 spec/models/k8sassets_container_info_spec.rb create mode 100644 spec/models/k8sassets_deployment_enrichment_data_spec.rb create mode 100644 spec/models/k8sassets_deployment_enrichment_entry_spec.rb create mode 100644 spec/models/k8sassets_deployment_enrichment_response_spec.rb create mode 100644 spec/models/k8sassets_node_enrichment_data_spec.rb create mode 100644 spec/models/k8sassets_node_enrichment_entry_spec.rb create mode 100644 spec/models/k8sassets_node_enrichment_response_spec.rb create mode 100644 spec/models/k8sassets_pod_enrichment_data_spec.rb create mode 100644 spec/models/k8sassets_pod_enrichment_entry_spec.rb create mode 100644 spec/models/k8sassets_pod_enrichment_response_spec.rb create mode 100644 spec/models/k8sioms_kubernetes_iom_count_value_spec.rb create mode 100644 spec/models/k8sioms_kubernetes_iom_entity_response_spec.rb create mode 100644 spec/models/k8sioms_kubernetes_iom_field_value_spec.rb create mode 100644 spec/models/model_user_input_read_response_spec.rb create mode 100644 spec/models/model_user_input_update_request_spec.rb create mode 100644 spec/models/model_user_input_view_model_spec.rb create mode 100644 spec/models/models_account_entities_input_spec.rb create mode 100644 spec/models/models_account_status_response_spec.rb create mode 100644 spec/models/models_aggregate_values_by_field_response_spec.rb create mode 100644 spec/models/models_api_assessment_detections_spec.rb create mode 100644 spec/models/models_api_combined_detections_spec.rb create mode 100644 spec/models/models_api_container_alert_spec.rb create mode 100644 spec/models/models_api_customer_and_image_spec.rb create mode 100644 spec/models/models_api_detection_count_by_type_spec.rb create mode 100644 spec/models/models_api_detection_count_spec.rb create mode 100644 spec/models/models_api_drift_indicators_spec.rb rename spec/models/{domain_msa_meta_info_spec.rb => models_api_filter_label_spec.rb} (80%) create mode 100644 spec/models/models_api_filter_response_spec.rb create mode 100644 spec/models/models_api_image_assessment_history_spec.rb create mode 100644 spec/models/models_api_image_assessment_spec.rb create mode 100644 spec/models/models_api_image_by_vulnerability_count_spec.rb create mode 100644 spec/models/models_api_image_combined_export_spec.rb create mode 100644 spec/models/models_api_image_count_spec.rb create mode 100644 spec/models/models_api_image_issues_summary_spec.rb create mode 100644 spec/models/models_api_image_vulnerabilities_summary_spec.rb create mode 100644 spec/models/models_api_kubernetes_iom_spec.rb create mode 100644 spec/models/models_api_package_combined_spec.rb create mode 100644 spec/models/models_api_package_vulnerability_spec.rb create mode 100644 spec/models/models_api_packages_by_vuln_count_spec.rb create mode 100644 spec/models/models_api_policy_count_by_action_spec.rb rename spec/models/{models_scan_results_spec.rb => models_api_policy_data_spec.rb} (80%) rename spec/models/{models_job_meta_data_spec.rb => models_api_policy_entity_spec.rb} (78%) create mode 100644 spec/models/models_api_policy_exclusion_spec.rb create mode 100644 spec/models/models_api_policy_group_data_spec.rb create mode 100644 spec/models/models_api_policy_group_spec.rb create mode 100644 spec/models/models_api_policy_rule_spec.rb create mode 100644 spec/models/models_api_policy_rules_data_spec.rb create mode 100644 spec/models/models_api_precedence_request_spec.rb create mode 100644 spec/models/models_api_runtime_detection_spec.rb create mode 100644 spec/models/models_api_unidentified_container_spec.rb create mode 100644 spec/models/models_api_vuln_by_image_count_spec.rb create mode 100644 spec/models/models_api_vuln_by_publication_date_spec.rb create mode 100644 spec/models/models_api_vuln_count_by_severity_spec.rb create mode 100644 spec/models/models_api_vuln_count_spec.rb create mode 100644 spec/models/models_api_vulnerability_combined_spec.rb create mode 100644 spec/models/models_api_vulnerability_details_spec.rb create mode 100644 spec/models/models_api_vulnerability_info_spec.rb create mode 100644 spec/models/models_cluster_entity_response_spec.rb create mode 100644 spec/models/models_cluster_spec.rb create mode 100644 spec/models/models_container_coverage_response_entity_spec.rb create mode 100644 spec/models/models_container_coverage_spec.rb create mode 100644 spec/models/models_container_entity_response_spec.rb create mode 100644 spec/models/models_container_image_spec.rb create mode 100644 spec/models/models_container_information_spec.rb create mode 100644 spec/models/models_container_runtime_pivot_response_spec.rb create mode 100644 spec/models/models_container_runtime_pivot_spec.rb create mode 100644 spec/models/models_container_spec.rb create mode 100644 spec/models/models_create_image_group_request_spec.rb create mode 100644 spec/models/models_create_policy_request_spec.rb create mode 100644 spec/models/models_definition_create_request_v2_spec.rb create mode 100644 spec/models/models_definition_update_request_v2_spec.rb create mode 100644 spec/models/models_deployment_entity_response_spec.rb create mode 100644 spec/models/models_deployment_spec.rb create mode 100644 spec/models/models_exclusion_condition_request_spec.rb create mode 100644 spec/models/models_exclusion_condition_spec.rb create mode 100644 spec/models/models_image_information_spec.rb create mode 100644 spec/models/models_image_summary_packages_info_spec.rb create mode 100644 spec/models/models_issues_summary_container_info_spec.rb create mode 100644 spec/models/models_light_weight_config_spec.rb rename spec/models/{public_get_changes_response_spec.rb => models_node_entity_response_spec.rb} (84%) create mode 100644 spec/models/models_node_spec.rb create mode 100644 spec/models/models_package_name_version_type_spec.rb create mode 100644 spec/models/models_patch_image_group_request_spec.rb create mode 100644 spec/models/models_patch_policy_request_spec.rb create mode 100644 spec/models/models_pod_entity_response_spec.rb create mode 100644 spec/models/models_pod_spec.rb create mode 100644 spec/models/models_policy_entity_response_spec.rb create mode 100644 spec/models/models_policy_exclusion_entity_response_spec.rb create mode 100644 spec/models/models_policy_group_entity_response_spec.rb create mode 100644 spec/models/models_request_api_policy_data_spec.rb create mode 100644 spec/models/models_snapshot_account_status_spec.rb create mode 100644 spec/models/models_update_exclusions_request_spec.rb create mode 100644 spec/models/packages_api_combined_package_export_spec.rb create mode 100644 spec/models/packages_api_combined_package_spec.rb create mode 100644 spec/models/packages_api_packages_by_vuln_count_spec.rb create mode 100644 spec/models/parameter_activity_config_parameter_value_spec.rb create mode 100644 spec/models/parameter_activity_config_provision_parameter_spec.rb create mode 100644 spec/models/parameter_activity_provision_parameters_spec.rb create mode 100644 spec/models/parameter_activity_selection_parameter_spec.rb create mode 100644 spec/models/parameter_condition_field_parameter_spec.rb create mode 100644 spec/models/parameter_condition_field_provision_parameter_spec.rb create mode 100644 spec/models/parameter_condition_provision_parameter_spec.rb create mode 100644 spec/models/parameter_template_provision_parameters_spec.rb create mode 100644 spec/models/parameter_trigger_field_parameter_spec.rb create mode 100644 spec/models/parameter_trigger_parameter_spec.rb create mode 100644 spec/models/parameter_trigger_provision_parameter_spec.rb create mode 100644 spec/models/policies_assigned_host_group_spec.rb create mode 100644 spec/models/policies_assigned_rule_group_spec.rb create mode 100644 spec/models/policies_create_request_spec.rb create mode 100644 spec/models/policies_delete_response_spec.rb create mode 100644 spec/models/policies_policy_spec.rb create mode 100644 spec/models/policies_precedence_response_spec.rb create mode 100644 spec/models/policies_response_spec.rb create mode 100644 spec/models/policies_update_request_spec.rb create mode 100644 spec/models/registration_azure_account_patch_request_spec.rb rename spec/models/{models_snapshot_inventory_payload_spec.rb => registration_azure_account_patch_spec.rb} (77%) create mode 100644 spec/models/registration_azure_management_group_create_request_external_v1_spec.rb create mode 100644 spec/models/registration_azure_management_group_external_v1_spec.rb create mode 100644 spec/models/registration_azure_management_group_response_v1_spec.rb create mode 100644 spec/models/registration_azure_management_group_v1_ext_spec.rb create mode 100644 spec/models/registration_gcp_account_ext_request_v2_spec.rb create mode 100644 spec/models/registration_gcp_account_patch_request_spec.rb create mode 100644 spec/models/registration_gcp_account_patch_spec.rb create mode 100644 spec/models/registration_gcp_account_req_obj_v2_spec.rb create mode 100644 spec/models/registration_gcp_account_response_ext_v2_spec.rb create mode 100644 spec/models/registration_gcp_account_rsp_obj_v2_spec.rb create mode 100644 spec/models/registration_gcp_service_account_ext_v1_spec.rb create mode 100644 spec/models/registration_gcp_service_account_response_ext_v1_spec.rb create mode 100644 spec/models/registration_iom_event_id_response_meta_spec.rb create mode 100644 spec/models/registration_next_token_pagination_spec.rb create mode 100644 spec/models/rulegroups_assigned_rule_spec.rb create mode 100644 spec/models/rulegroups_create_request_spec.rb create mode 100644 spec/models/rulegroups_delete_response_spec.rb create mode 100644 spec/models/rulegroups_policy_assignment_spec.rb create mode 100644 spec/models/rulegroups_response_spec.rb rename spec/models/{domain_notification_details_v1_spec.rb => rulegroups_rule_group_spec.rb} (78%) create mode 100644 spec/models/rulegroups_rule_spec.rb create mode 100644 spec/models/rulegroups_rules_response_spec.rb create mode 100644 spec/models/rulegroups_update_request_spec.rb create mode 100644 spec/models/runtimedetections_detections_entity_response_spec.rb rename spec/models/{sadomain_submit_for_blocking_info_spec.rb => sadomain_submission_information_spec.rb} (83%) create mode 100644 spec/models/scheduledexclusions_create_request_spec.rb create mode 100644 spec/models/scheduledexclusions_repeated_spec.rb create mode 100644 spec/models/scheduledexclusions_response_spec.rb create mode 100644 spec/models/scheduledexclusions_scheduled_exclusion_spec.rb create mode 100644 spec/models/scheduledexclusions_update_request_spec.rb create mode 100644 spec/models/unidentifiedcontainers_unidentified_container_api_response_spec.rb create mode 100644 spec/models/unidentifiedcontainers_unidentified_containers_count_value_spec.rb create mode 100644 spec/models/v2_activity_parameters_spec.rb create mode 100644 spec/models/v2_activity_properties_spec.rb create mode 100644 spec/models/v2_activity_spec.rb create mode 100644 spec/models/v2_condition_parameters_spec.rb create mode 100644 spec/models/v2_condition_spec.rb create mode 100644 spec/models/v2_definition_spec.rb create mode 100644 spec/models/v2_for_loop_spec.rb create mode 100644 spec/models/v2_loop_spec.rb create mode 100644 spec/models/v2_parameters_spec.rb create mode 100644 spec/models/v2_trigger_spec.rb create mode 100644 spec/models/vulnerabilities_api_combined_vulnerability_details_spec.rb create mode 100644 spec/models/vulnerabilities_api_combined_vulnerability_info_spec.rb create mode 100644 spec/models/vulnerabilities_api_combined_vulnerability_spec.rb create mode 100644 spec/models/vulnerabilities_api_vuln_by_image_count_spec.rb create mode 100644 spec/models/vulnerabilities_api_vuln_by_publication_spec.rb create mode 100644 spec/models/vulnerabilities_api_vuln_count_by_actively_exploited_spec.rb create mode 100644 spec/models/vulnerabilities_api_vuln_count_by_csp_rating_spec.rb create mode 100644 spec/models/vulnerabilities_api_vuln_count_by_cvss_score_spec.rb create mode 100644 spec/models/vulnerabilities_api_vuln_count_by_severity_spec.rb create mode 100644 spec/models/vulnerabilities_api_vuln_count_spec.rb diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index cd802a1e..3769235d 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/README.md b/README.md index 90df65ca..ebbc465b 100644 --- a/README.md +++ b/README.md @@ -133,9 +133,25 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::AlertsApi` +- **Operation**: [**get_queries_alerts_v2**](docs/AlertsApi.md#get_queries_alerts_v2) +- **GET**: /alerts/queries/alerts/v2 +- **Description**: retrieves all Alerts ids that match a given query + +--- + +**Class**: `Falcon::AlertsApi` + - **Operation**: [**patch_entities_alerts_v2**](docs/AlertsApi.md#patch_entities_alerts_v2) - **PATCH**: /alerts/entities/alerts/v2 -- **Description**: Perform actions on detections identified by detection 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. +- **Description**: 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. + +--- + +**Class**: `Falcon::AlertsApi` + +- **Operation**: [**patch_entities_alerts_v3**](docs/AlertsApi.md#patch_entities_alerts_v3) +- **PATCH**: /alerts/entities/alerts/v3 +- **Description**: 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. --- @@ -143,7 +159,15 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**post_aggregates_alerts_v1**](docs/AlertsApi.md#post_aggregates_alerts_v1) - **POST**: /alerts/aggregates/alerts/v1 -- **Description**: retrieves aggregates for Alerts across all CIDs +- **Description**: retrieves aggregate values for Alerts across all CIDs + +--- + +**Class**: `Falcon::AlertsApi` + +- **Operation**: [**post_aggregates_alerts_v2**](docs/AlertsApi.md#post_aggregates_alerts_v2) +- **POST**: /alerts/aggregates/alerts/v2 +- **Description**: retrieves aggregate values for Alerts across all CIDs --- @@ -155,6 +179,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::AlertsApi` + +- **Operation**: [**post_entities_alerts_v2**](docs/AlertsApi.md#post_entities_alerts_v2) +- **POST**: /alerts/entities/alerts/v2 +- **Description**: retrieves all Alerts given their composite ids + +--- + **Class**: `Falcon::CloudConnectAwsApi` - **Operation**: [**create_or_update_aws_settings**](docs/CloudConnectAwsApi.md#create_or_update_aws_settings) @@ -227,6 +259,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::CloudSnapshotsApi` + +- **Operation**: [**register_cspm_snapshot_account**](docs/CloudSnapshotsApi.md#register_cspm_snapshot_account) +- **POST**: /snapshots/entities/accounts/v1 +- **Description**: Register customer cloud account for snapshot scanning + +--- + **Class**: `Falcon::ConfigurationAssessmentApi` - **Operation**: [**get_combined_assessments_query**](docs/ConfigurationAssessmentApi.md#get_combined_assessments_query) @@ -235,6 +275,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::ConfigurationAssessmentApi` + +- **Operation**: [**get_rule_details**](docs/ConfigurationAssessmentApi.md#get_rule_details) +- **GET**: /configuration-assessment/entities/rule-details/v1 +- **Description**: Get rules details for provided one or more rule IDs + +--- + **Class**: `Falcon::ConfigurationAssessmentEvaluationLogicApi` - **Operation**: [**get_evaluation_logic_mixin0**](docs/ConfigurationAssessmentEvaluationLogicApi.md#get_evaluation_logic_mixin0) @@ -243,6 +291,278 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::ContainerAlertsApi` + +- **Operation**: [**read_container_alerts_count**](docs/ContainerAlertsApi.md#read_container_alerts_count) +- **GET**: /container-security/aggregates/container-alerts/count/v1 +- **Description**: Search Container Alerts by the provided search criteria + +--- + +**Class**: `Falcon::ContainerAlertsApi` + +- **Operation**: [**read_container_alerts_count_by_severity**](docs/ContainerAlertsApi.md#read_container_alerts_count_by_severity) +- **GET**: /container-security/aggregates/container-alerts/count-by-severity/v1 +- **Description**: Get Container Alerts counts by severity + +--- + +**Class**: `Falcon::ContainerAlertsApi` + +- **Operation**: [**search_and_read_container_alerts**](docs/ContainerAlertsApi.md#search_and_read_container_alerts) +- **GET**: /container-security/combined/container-alerts/v1 +- **Description**: Search Container Alerts by the provided search criteria + +--- + +**Class**: `Falcon::ContainerDetectionsApi` + +- **Operation**: [**read_combined_detections**](docs/ContainerDetectionsApi.md#read_combined_detections) +- **GET**: /container-security/combined/detections/v1 +- **Description**: Retrieve image assessment detections identified by the provided filter criteria + +--- + +**Class**: `Falcon::ContainerDetectionsApi` + +- **Operation**: [**read_detections**](docs/ContainerDetectionsApi.md#read_detections) +- **GET**: /container-security/entities/detections/v1 +- **Description**: Retrieve image assessment detection entities identified by the provided filter criteria + +--- + +**Class**: `Falcon::ContainerDetectionsApi` + +- **Operation**: [**read_detections_count**](docs/ContainerDetectionsApi.md#read_detections_count) +- **GET**: /container-security/aggregates/detections/count/v1 +- **Description**: Aggregate count of detections + +--- + +**Class**: `Falcon::ContainerDetectionsApi` + +- **Operation**: [**read_detections_count_by_severity**](docs/ContainerDetectionsApi.md#read_detections_count_by_severity) +- **GET**: /container-security/aggregates/detections/count-by-severity/v1 +- **Description**: Aggregate counts of detections by severity + +--- + +**Class**: `Falcon::ContainerDetectionsApi` + +- **Operation**: [**read_detections_count_by_type**](docs/ContainerDetectionsApi.md#read_detections_count_by_type) +- **GET**: /container-security/aggregates/detections/count-by-type/v1 +- **Description**: Aggregate counts of detections by detection type + +--- + +**Class**: `Falcon::ContainerDetectionsApi` + +- **Operation**: [**search_detections**](docs/ContainerDetectionsApi.md#search_detections) +- **GET**: /container-security/queries/detections/v1 +- **Description**: Retrieve image assessment detection entities identified by the provided filter criteria + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**aggregate_image_assessment_history**](docs/ContainerImagesApi.md#aggregate_image_assessment_history) +- **GET**: /container-security/aggregates/images/assessment-history/v1 +- **Description**: Image assessment history + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**aggregate_image_count**](docs/ContainerImagesApi.md#aggregate_image_count) +- **GET**: /container-security/aggregates/images/count/v1 +- **Description**: Aggregate count of images + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**aggregate_image_count_by_base_os**](docs/ContainerImagesApi.md#aggregate_image_count_by_base_os) +- **GET**: /container-security/aggregates/images/count-by-os-distribution/v1 +- **Description**: Aggregate count of images grouped by Base OS distribution + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**aggregate_image_count_by_state**](docs/ContainerImagesApi.md#aggregate_image_count_by_state) +- **GET**: /container-security/aggregates/images/count-by-state/v1 +- **Description**: Aggregate count of images grouped by state + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**combined_image_by_vulnerability_count**](docs/ContainerImagesApi.md#combined_image_by_vulnerability_count) +- **GET**: /container-security/combined/images/by-vulnerability-count/v1 +- **Description**: Retrieve top x images with the most vulnerabilities + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**combined_image_detail**](docs/ContainerImagesApi.md#combined_image_detail) +- **GET**: /container-security/combined/images/detail/v1 +- **Description**: Retrieve image entities identified by the provided filter criteria + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**combined_image_issues_summary**](docs/ContainerImagesApi.md#combined_image_issues_summary) +- **GET**: /container-security/combined/images/issues-summary/v1 +- **Description**: Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**combined_image_vulnerability_summary**](docs/ContainerImagesApi.md#combined_image_vulnerability_summary) +- **GET**: /container-security/combined/images/vulnerabilities-summary/v1 +- **Description**: aggregates information about vulnerabilities for an image + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**get_combined_images**](docs/ContainerImagesApi.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 + +--- + +**Class**: `Falcon::ContainerImagesApi` + +- **Operation**: [**read_combined_images_export**](docs/ContainerImagesApi.md#read_combined_images_export) +- **GET**: /container-security/combined/images/export/v1 +- **Description**: Retrieve images with an option to expand aggregated vulnerabilities/detections + +--- + +**Class**: `Falcon::ContainerPackagesApi` + +- **Operation**: [**read_packages_by_fixable_vuln_count**](docs/ContainerPackagesApi.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 + +--- + +**Class**: `Falcon::ContainerPackagesApi` + +- **Operation**: [**read_packages_by_vuln_count**](docs/ContainerPackagesApi.md#read_packages_by_vuln_count) +- **GET**: /container-security/combined/packages/by-vulnerability-count/v1 +- **Description**: Retrieve top x packages with the most vulnerabilities + +--- + +**Class**: `Falcon::ContainerPackagesApi` + +- **Operation**: [**read_packages_combined**](docs/ContainerPackagesApi.md#read_packages_combined) +- **GET**: /container-security/combined/packages/v1 +- **Description**: Retrieve packages identified by the provided filter criteria + +--- + +**Class**: `Falcon::ContainerPackagesApi` + +- **Operation**: [**read_packages_combined_export**](docs/ContainerPackagesApi.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 + +--- + +**Class**: `Falcon::ContainerPackagesApi` + +- **Operation**: [**read_packages_count_by_zero_day**](docs/ContainerPackagesApi.md#read_packages_count_by_zero_day) +- **GET**: /container-security/aggregates/packages/count-by-zero-day/v1 +- **Description**: Retrieve packages count affected by zero day vulnerabilities + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_combined_vulnerabilities**](docs/ContainerVulnerabilitiesApi.md#read_combined_vulnerabilities) +- **GET**: /container-security/combined/vulnerabilities/v1 +- **Description**: Retrieve vulnerability and aggregate data filtered by the provided FQL + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_combined_vulnerabilities_details**](docs/ContainerVulnerabilitiesApi.md#read_combined_vulnerabilities_details) +- **GET**: /container-security/combined/vulnerabilities/details/v1 +- **Description**: Retrieve vulnerability details related to an image + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_combined_vulnerabilities_info**](docs/ContainerVulnerabilitiesApi.md#read_combined_vulnerabilities_info) +- **GET**: /container-security/combined/vulnerabilities/info/v1 +- **Description**: Retrieve vulnerability and package related info for this customer + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_vulnerabilities_by_image_count**](docs/ContainerVulnerabilitiesApi.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 + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_vulnerabilities_publication_date**](docs/ContainerVulnerabilitiesApi.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 + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_vulnerability_count**](docs/ContainerVulnerabilitiesApi.md#read_vulnerability_count) +- **GET**: /container-security/aggregates/vulnerabilities/count/v1 +- **Description**: Aggregate count of vulnerabilities + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_vulnerability_count_by_actively_exploited**](docs/ContainerVulnerabilitiesApi.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 + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_vulnerability_count_by_cps_rating**](docs/ContainerVulnerabilitiesApi.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 + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_vulnerability_count_by_cvss_score**](docs/ContainerVulnerabilitiesApi.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 + +--- + +**Class**: `Falcon::ContainerVulnerabilitiesApi` + +- **Operation**: [**read_vulnerability_count_by_severity**](docs/ContainerVulnerabilitiesApi.md#read_vulnerability_count_by_severity) +- **GET**: /container-security/aggregates/vulnerabilities/count-by-severity/v1 +- **Description**: Aggregate count of vulnerabilities grouped by severity + +--- + **Class**: `Falcon::CspmRegistrationApi` - **Operation**: [**azure_download_certificate**](docs/CspmRegistrationApi.md#azure_download_certificate) @@ -253,6 +573,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CspmRegistrationApi` +- **Operation**: [**connect_cspmgcp_account**](docs/CspmRegistrationApi.md#connect_cspmgcp_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 + +--- + +**Class**: `Falcon::CspmRegistrationApi` + - **Operation**: [**create_cspm_aws_account**](docs/CspmRegistrationApi.md#create_cspm_aws_account) - **POST**: /cloud-connect-cspm-aws/entities/account/v1 - **Description**: 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. @@ -269,6 +597,22 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CspmRegistrationApi` +- **Operation**: [**create_cspm_azure_management_group**](docs/CspmRegistrationApi.md#create_cspm_azure_management_group) +- **POST**: /cloud-connect-cspm-azure/entities/management-group/v1 +- **Description**: Creates a new management group in our system for a customer. + +--- + +**Class**: `Falcon::CspmRegistrationApi` + +- **Operation**: [**create_cspmgcp_account**](docs/CspmRegistrationApi.md#create_cspmgcp_account) +- **POST**: /cloud-connect-cspm-gcp/entities/account/v1 +- **Description**: Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. + +--- + +**Class**: `Falcon::CspmRegistrationApi` + - **Operation**: [**delete_cspm_aws_account**](docs/CspmRegistrationApi.md#delete_cspm_aws_account) - **DELETE**: /cloud-connect-cspm-aws/entities/account/v1 - **Description**: Deletes an existing AWS account or organization in our system. @@ -285,6 +629,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CspmRegistrationApi` +- **Operation**: [**delete_cspmgcp_account**](docs/CspmRegistrationApi.md#delete_cspmgcp_account) +- **DELETE**: /cloud-connect-cspm-gcp/entities/account/v1 +- **Description**: Deletes a GCP account from the system. + +--- + +**Class**: `Falcon::CspmRegistrationApi` + - **Operation**: [**get_behavior_detections**](docs/CspmRegistrationApi.md#get_behavior_detections) - **GET**: /detects/entities/ioa/v1 - **Description**: Get list of detected behaviors @@ -311,7 +663,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**get_configuration_detections**](docs/CspmRegistrationApi.md#get_configuration_detections) - **GET**: /detects/entities/iom/v1 -- **Description**: Get list of active misconfigurations +- **Description**: Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead --- @@ -349,6 +701,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CspmRegistrationApi` +- **Operation**: [**get_cspm_azure_management_group**](docs/CspmRegistrationApi.md#get_cspm_azure_management_group) +- **GET**: /cloud-connect-cspm-azure/entities/management-group/v1 +- **Description**: Return information about Azure management group registration + +--- + +**Class**: `Falcon::CspmRegistrationApi` + - **Operation**: [**get_cspm_azure_user_scripts_attachment**](docs/CspmRegistrationApi.md#get_cspm_azure_user_scripts_attachment) - **GET**: /cloud-connect-cspm-azure/entities/user-scripts-download/v1 - **Description**: Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment @@ -389,6 +749,30 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CspmRegistrationApi` +- **Operation**: [**get_cspmcgp_account**](docs/CspmRegistrationApi.md#get_cspmcgp_account) +- **GET**: /cloud-connect-cspm-gcp/entities/account/v1 +- **Description**: Returns information about the current status of an GCP account. + +--- + +**Class**: `Falcon::CspmRegistrationApi` + +- **Operation**: [**get_cspmgcp_service_accounts_ext**](docs/CspmRegistrationApi.md#get_cspmgcp_service_accounts_ext) +- **GET**: /cloud-connect-cspm-gcp/entities/service-accounts/v1 +- **Description**: Returns the service account id and client email for external clients. + +--- + +**Class**: `Falcon::CspmRegistrationApi` + +- **Operation**: [**get_cspmgcp_user_scripts_attachment**](docs/CspmRegistrationApi.md#get_cspmgcp_user_scripts_attachment) +- **GET**: /cloud-connect-cspm-gcp/entities/user-scripts-download/v1 +- **Description**: Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + +--- + +**Class**: `Falcon::CspmRegistrationApi` + - **Operation**: [**patch_cspm_aws_account**](docs/CspmRegistrationApi.md#patch_cspm_aws_account) - **PATCH**: /cloud-connect-cspm-aws/entities/account/v1 - **Description**: Patches a existing account in our system for a customer. @@ -397,6 +781,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::CspmRegistrationApi` +- **Operation**: [**update_cspm_azure_account**](docs/CspmRegistrationApi.md#update_cspm_azure_account) +- **PATCH**: /cloud-connect-cspm-azure/entities/account/v1 +- **Description**: Patches a existing account in our system for a customer. + +--- + +**Class**: `Falcon::CspmRegistrationApi` + - **Operation**: [**update_cspm_azure_account_client_id**](docs/CspmRegistrationApi.md#update_cspm_azure_account_client_id) - **PATCH**: /cloud-connect-cspm-azure/entities/client-id/v1 - **Description**: Update an Azure service account in our system by with the user-created client_id created with the public key we've provided @@ -427,6 +819,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::CspmRegistrationApi` + +- **Operation**: [**update_cspmgcp_account**](docs/CspmRegistrationApi.md#update_cspmgcp_account) +- **PATCH**: /cloud-connect-cspm-gcp/entities/account/v1 +- **Description**: Patches a existing account in our system for a customer. + +--- + **Class**: `Falcon::CustomIoaApi` - **Operation**: [**create_rule**](docs/CustomIoaApi.md#create_rule) @@ -579,6 +979,62 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::CustomStorageApi` + +- **Operation**: [**delete_object**](docs/CustomStorageApi.md#delete_object) +- **DELETE**: /customobjects/v1/collections/{collection_name}/objects/{object_key} +- **Description**: Delete the specified object + +--- + +**Class**: `Falcon::CustomStorageApi` + +- **Operation**: [**get_object**](docs/CustomStorageApi.md#get_object) +- **GET**: /customobjects/v1/collections/{collection_name}/objects/{object_key} +- **Description**: Get the bytes for the specified object + +--- + +**Class**: `Falcon::CustomStorageApi` + +- **Operation**: [**get_object_metadata**](docs/CustomStorageApi.md#get_object_metadata) +- **GET**: /customobjects/v1/collections/{collection_name}/objects/{object_key}/metadata +- **Description**: Get the metadata for the specified object + +--- + +**Class**: `Falcon::CustomStorageApi` + +- **Operation**: [**list_objects**](docs/CustomStorageApi.md#list_objects) +- **GET**: /customobjects/v1/collections/{collection_name}/objects +- **Description**: List the object keys in the specified collection in alphabetical order + +--- + +**Class**: `Falcon::CustomStorageApi` + +- **Operation**: [**put_object**](docs/CustomStorageApi.md#put_object) +- **PUT**: /customobjects/v1/collections/{collection_name}/objects/{object_key} +- **Description**: Put the specified new object at the given key or overwrite an existing object at the given key + +--- + +**Class**: `Falcon::CustomStorageApi` + +- **Operation**: [**search_objects**](docs/CustomStorageApi.md#search_objects) +- **POST**: /customobjects/v1/collections/{collection_name}/objects +- **Description**: Search for objects that match the specified filter criteria (returns metadata, not actual objects) + +--- + +**Class**: `Falcon::D4cRegistrationApi` + +- **Operation**: [**connect_d4_cgcp_account**](docs/D4cRegistrationApi.md#connect_d4_cgcp_account) +- **POST**: /cloud-connect-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 + +--- + **Class**: `Falcon::D4cRegistrationApi` - **Operation**: [**create_d4_c_aws_account**](docs/D4cRegistrationApi.md#create_d4_c_aws_account) @@ -613,6 +1069,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::D4cRegistrationApi` +- **Operation**: [**delete_d4_cgcp_account**](docs/D4cRegistrationApi.md#delete_d4_cgcp_account) +- **DELETE**: /cloud-connect-gcp/entities/account/v1 +- **Description**: Deletes a GCP account from the system. + +--- + +**Class**: `Falcon::D4cRegistrationApi` + - **Operation**: [**discover_cloud_azure_download_certificate**](docs/D4cRegistrationApi.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. @@ -653,6 +1117,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::D4cRegistrationApi` +- **Operation**: [**get_d4_cgcp_service_accounts_ext**](docs/D4cRegistrationApi.md#get_d4_cgcp_service_accounts_ext) +- **GET**: /cloud-connect-gcp/entities/service-accounts/v1 +- **Description**: Returns the service account id and client email for external clients. + +--- + +**Class**: `Falcon::D4cRegistrationApi` + - **Operation**: [**get_d4_cgcp_user_scripts**](docs/D4cRegistrationApi.md#get_d4_cgcp_user_scripts) - **GET**: /cloud-connect-gcp/entities/user-scripts/v1 - **Description**: Return a script for customer to run in their cloud environment to grant us access to their GCP environment @@ -661,6 +1133,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::D4cRegistrationApi` +- **Operation**: [**get_d4_cgcp_user_scripts_attachment**](docs/D4cRegistrationApi.md#get_d4_cgcp_user_scripts_attachment) +- **GET**: /cloud-connect-gcp/entities/user-scripts-download/v1 +- **Description**: Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + +--- + +**Class**: `Falcon::D4cRegistrationApi` + - **Operation**: [**get_discover_cloud_azure_account**](docs/D4cRegistrationApi.md#get_discover_cloud_azure_account) - **GET**: /cloud-connect-azure/entities/account/v1 - **Description**: Return information about Azure account registration @@ -915,6 +1395,46 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::DriftIndicatorsApi` + +- **Operation**: [**get_drift_indicators_values_by_date**](docs/DriftIndicatorsApi.md#get_drift_indicators_values_by_date) +- **GET**: /container-security/aggregates/drift-indicators/count-by-date/v1 +- **Description**: Returns the count of Drift Indicators by the date. by default it's for 7 days. + +--- + +**Class**: `Falcon::DriftIndicatorsApi` + +- **Operation**: [**read_drift_indicator_entities**](docs/DriftIndicatorsApi.md#read_drift_indicator_entities) +- **GET**: /container-security/entities/drift-indicators/v1 +- **Description**: Retrieve Drift Indicator entities identified by the provided IDs + +--- + +**Class**: `Falcon::DriftIndicatorsApi` + +- **Operation**: [**read_drift_indicators_count**](docs/DriftIndicatorsApi.md#read_drift_indicators_count) +- **GET**: /container-security/aggregates/drift-indicators/count/v1 +- **Description**: Returns the total count of Drift indicators over a time period + +--- + +**Class**: `Falcon::DriftIndicatorsApi` + +- **Operation**: [**search_and_read_drift_indicator_entities**](docs/DriftIndicatorsApi.md#search_and_read_drift_indicator_entities) +- **GET**: /container-security/combined/drift-indicators/v1 +- **Description**: Retrieve Drift Indicators by the provided search criteria + +--- + +**Class**: `Falcon::DriftIndicatorsApi` + +- **Operation**: [**search_drift_indicators**](docs/DriftIndicatorsApi.md#search_drift_indicators) +- **GET**: /container-security/queries/drift-indicators/v1 +- **Description**: Retrieve all drift indicators that match the given query + +--- + **Class**: `Falcon::EventSchemaApi` - **Operation**: [**fdrschema_combined_event_get**](docs/EventSchemaApi.md#fdrschema_combined_event_get) @@ -957,6 +1477,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FalconCompleteDashboardApi` +- **Operation**: [**aggregate_alerts**](docs/FalconCompleteDashboardApi.md#aggregate_alerts) +- **POST**: /falcon-complete-dashboards/aggregates/alerts/GET/v1 +- **Description**: Retrieve aggregate alerts values based on the matched filter + +--- + +**Class**: `Falcon::FalconCompleteDashboardApi` + - **Operation**: [**aggregate_allow_list**](docs/FalconCompleteDashboardApi.md#aggregate_allow_list) - **POST**: /falcon-complete-dashboards/aggregates/allowlist/GET/v1 - **Description**: Retrieve aggregate allowlist ticket values based on the matched filter @@ -1005,6 +1533,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FalconCompleteDashboardApi` +- **Operation**: [**aggregate_prevention_policy**](docs/FalconCompleteDashboardApi.md#aggregate_prevention_policy) +- **POST**: /falcon-complete-dashboards/aggregates/prevention-policies/v1 +- **Description**: Retrieve prevention policies aggregate values based on the matched filter + +--- + +**Class**: `Falcon::FalconCompleteDashboardApi` + - **Operation**: [**aggregate_remediations**](docs/FalconCompleteDashboardApi.md#aggregate_remediations) - **POST**: /falcon-complete-dashboards/aggregates/remediations/GET/v1 - **Description**: Retrieve aggregate remediation ticket values based on the matched filter @@ -1013,6 +1549,22 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FalconCompleteDashboardApi` +- **Operation**: [**aggregate_sensor_update_policy**](docs/FalconCompleteDashboardApi.md#aggregate_sensor_update_policy) +- **POST**: /falcon-complete-dashboards/aggregates/sensor-update-policies/v1 +- **Description**: Retrieve sensor update policies aggregate values + +--- + +**Class**: `Falcon::FalconCompleteDashboardApi` + +- **Operation**: [**aggregate_total_device_counts**](docs/FalconCompleteDashboardApi.md#aggregate_total_device_counts) +- **POST**: /falcon-complete-dashboards/aggregates/total-device-counts/v1 +- **Description**: Retrieve aggregate total host/devices based on the matched filter + +--- + +**Class**: `Falcon::FalconCompleteDashboardApi` + - **Operation**: [**get_device_count_collection_queries_by_filter**](docs/FalconCompleteDashboardApi.md#get_device_count_collection_queries_by_filter) - **GET**: /falcon-complete-dashboards/queries/devicecount-collections/v1 - **Description**: Retrieve device count collection Ids that match the provided FQL filter, criteria with scrolling enabled @@ -1021,6 +1573,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FalconCompleteDashboardApi` +- **Operation**: [**query_alert_ids_by_filter**](docs/FalconCompleteDashboardApi.md#query_alert_ids_by_filter) +- **GET**: /falcon-complete-dashboards/queries/alerts/v1 +- **Description**: Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled + +--- + +**Class**: `Falcon::FalconCompleteDashboardApi` + - **Operation**: [**query_allow_list_filter**](docs/FalconCompleteDashboardApi.md#query_allow_list_filter) - **GET**: /falcon-complete-dashboards/queries/allowlist/v1 - **Description**: Retrieve allowlist tickets that match the provided filter criteria with scrolling enabled @@ -1101,14 +1661,6 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FalconContainerImageApi` -- **Operation**: [**get_combined_images**](docs/FalconContainerImageApi.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 - ---- - -**Class**: `Falcon::FalconContainerImageApi` - - **Operation**: [**read_registry_entities**](docs/FalconContainerImageApi.md#read_registry_entities) - **GET**: /container-security/queries/registries/v1 - **Description**: Retrieve registry entities identified by the customer id @@ -1269,6 +1821,70 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FilevantageApi` +- **Operation**: [**create_policies**](docs/FilevantageApi.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. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**create_rule_groups**](docs/FilevantageApi.md#create_rule_groups) +- **POST**: /filevantage/entities/rule-groups/v1 +- **Description**: Creates a new rule group of the specified type. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**create_rules**](docs/FilevantageApi.md#create_rules) +- **POST**: /filevantage/entities/rule-groups-rules/v1 +- **Description**: Creates a new rule configuration within the specified rule group. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**create_scheduled_exclusions**](docs/FilevantageApi.md#create_scheduled_exclusions) +- **POST**: /filevantage/entities/policy-scheduled-exclusions/v1 +- **Description**: Creates a new scheduled exclusion configuration for the provided policy id. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**delete_policies**](docs/FilevantageApi.md#delete_policies) +- **DELETE**: /filevantage/entities/policies/v1 +- **Description**: Deletes 1 or more policies. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**delete_rule_groups**](docs/FilevantageApi.md#delete_rule_groups) +- **DELETE**: /filevantage/entities/rule-groups/v1 +- **Description**: Deletes 1 or more rule groups + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**delete_rules**](docs/FilevantageApi.md#delete_rules) +- **DELETE**: /filevantage/entities/rule-groups-rules/v1 +- **Description**: Deletes 1 or more rules from the specified rule group. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**delete_scheduled_exclusions**](docs/FilevantageApi.md#delete_scheduled_exclusions) +- **DELETE**: /filevantage/entities/policy-scheduled-exclusions/v1 +- **Description**: Deletes 1 or more scheduled exclusions from the provided policy id. + +--- + +**Class**: `Falcon::FilevantageApi` + - **Operation**: [**get_changes**](docs/FilevantageApi.md#get_changes) - **GET**: /filevantage/entities/changes/v2 - **Description**: Retrieve information on changes @@ -1277,9 +1893,137 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::FilevantageApi` +- **Operation**: [**get_policies**](docs/FilevantageApi.md#get_policies) +- **GET**: /filevantage/entities/policies/v1 +- **Description**: Retrieves the configuration for 1 or more policies. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**get_rule_groups**](docs/FilevantageApi.md#get_rule_groups) +- **GET**: /filevantage/entities/rule-groups/v1 +- **Description**: Retrieves the rule group details for 1 or more rule groups. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**get_rules**](docs/FilevantageApi.md#get_rules) +- **GET**: /filevantage/entities/rule-groups-rules/v1 +- **Description**: Retrieves the configuration for 1 or more rules. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**get_scheduled_exclusions**](docs/FilevantageApi.md#get_scheduled_exclusions) +- **GET**: /filevantage/entities/policy-scheduled-exclusions/v1 +- **Description**: Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**high_volume_query_changes**](docs/FilevantageApi.md#high_volume_query_changes) +- **GET**: /filevantage/queries/changes/v3 +- **Description**: Returns 1 or more change ids + +--- + +**Class**: `Falcon::FilevantageApi` + - **Operation**: [**query_changes**](docs/FilevantageApi.md#query_changes) - **GET**: /filevantage/queries/changes/v2 -- **Description**: Returns one or more change IDs +- **Description**: Returns 1 or more change ids + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**query_policies**](docs/FilevantageApi.md#query_policies) +- **GET**: /filevantage/queries/policies/v1 +- **Description**: Retrieve the ids of all policies that are assigned the provided policy type. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**query_rule_groups**](docs/FilevantageApi.md#query_rule_groups) +- **GET**: /filevantage/queries/rule-groups/v1 +- **Description**: Retrieve the ids of all rule groups that are of the provided rule group type. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**query_scheduled_exclusions**](docs/FilevantageApi.md#query_scheduled_exclusions) +- **GET**: /filevantage/queries/policy-scheduled-exclusions/v1 +- **Description**: Retrieve the ids of all scheduled exclusions contained within the provided policy id. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_policies**](docs/FilevantageApi.md#update_policies) +- **PATCH**: /filevantage/entities/policies/v1 +- **Description**: Updates the general information of the provided policy. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_policy_host_groups**](docs/FilevantageApi.md#update_policy_host_groups) +- **PATCH**: /filevantage/entities/policies-host-groups/v1 +- **Description**: Manage host groups assigned to a policy. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_policy_precedence**](docs/FilevantageApi.md#update_policy_precedence) +- **PATCH**: /filevantage/entities/policies-precedence/v1 +- **Description**: Updates the policy precedence for all policies of a specific type. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_policy_rule_groups**](docs/FilevantageApi.md#update_policy_rule_groups) +- **PATCH**: /filevantage/entities/policies-rule-groups/v1 +- **Description**: Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_rule_group_precedence**](docs/FilevantageApi.md#update_rule_group_precedence) +- **PATCH**: /filevantage/entities/rule-groups-rule-precedence/v1 +- **Description**: Updates the rule precedence for all rules in the identified rule group. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_rule_groups**](docs/FilevantageApi.md#update_rule_groups) +- **PATCH**: /filevantage/entities/rule-groups/v1 +- **Description**: Updates the provided rule group. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_rules**](docs/FilevantageApi.md#update_rules) +- **PATCH**: /filevantage/entities/rule-groups-rules/v1 +- **Description**: Updates the provided rule configuration within the specified rule group. + +--- + +**Class**: `Falcon::FilevantageApi` + +- **Operation**: [**update_scheduled_exclusions**](docs/FilevantageApi.md#update_scheduled_exclusions) +- **PATCH**: /filevantage/entities/policy-scheduled-exclusions/v1 +- **Description**: Updates the provided scheduled exclusion configuration within the provided policy. --- @@ -1627,6 +2371,110 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**create_saved_searches_dynamic_execute_alt_v1**](docs/FoundryLogscaleApi.md#create_saved_searches_dynamic_execute_alt_v1) +- **POST**: /loggingapi/entities/saved-searches-dynamic-execute/v1 +- **Description**: Execute a dynamic saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**create_saved_searches_dynamic_execute_v1**](docs/FoundryLogscaleApi.md#create_saved_searches_dynamic_execute_v1) +- **POST**: /loggingapi/entities/saved-searches/execute-dynamic/v1 +- **Description**: Execute a dynamic saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**create_saved_searches_execute_alt_v1**](docs/FoundryLogscaleApi.md#create_saved_searches_execute_alt_v1) +- **POST**: /loggingapi/entities/saved-searches-execute/v1 +- **Description**: Execute a saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**create_saved_searches_execute_v1**](docs/FoundryLogscaleApi.md#create_saved_searches_execute_v1) +- **POST**: /loggingapi/entities/saved-searches/execute/v1 +- **Description**: Execute a saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**create_saved_searches_ingest_alt_v1**](docs/FoundryLogscaleApi.md#create_saved_searches_ingest_alt_v1) +- **POST**: /loggingapi/entities/saved-searches-ingest/v1 +- **Description**: Populate a saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**create_saved_searches_ingest_v1**](docs/FoundryLogscaleApi.md#create_saved_searches_ingest_v1) +- **POST**: /loggingapi/entities/saved-searches/ingest/v1 +- **Description**: Populate a saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**get_saved_searches_execute_alt_v1**](docs/FoundryLogscaleApi.md#get_saved_searches_execute_alt_v1) +- **GET**: /loggingapi/entities/saved-searches-execute/v1 +- **Description**: Get the results of a saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**get_saved_searches_execute_v1**](docs/FoundryLogscaleApi.md#get_saved_searches_execute_v1) +- **GET**: /loggingapi/entities/saved-searches/execute/v1 +- **Description**: Get the results of a saved search + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**get_saved_searches_job_results_download_alt_v1**](docs/FoundryLogscaleApi.md#get_saved_searches_job_results_download_alt_v1) +- **GET**: /loggingapi/entities/saved-searches-job-results-download/v1 +- **Description**: Get the results of a saved search as a file + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**get_saved_searches_job_results_download_v1**](docs/FoundryLogscaleApi.md#get_saved_searches_job_results_download_v1) +- **GET**: /loggingapi/entities/saved-searches/job-results-download/v1 +- **Description**: Get the results of a saved search as a file + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**ingest_data_v1**](docs/FoundryLogscaleApi.md#ingest_data_v1) +- **POST**: /loggingapi/entities/data-ingestion/ingest/v1 +- **Description**: Ingest data into the application repository + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**list_repos_v1**](docs/FoundryLogscaleApi.md#list_repos_v1) +- **GET**: /loggingapi/combined/repos/v1 +- **Description**: Lists available repositories and views + +--- + +**Class**: `Falcon::FoundryLogscaleApi` + +- **Operation**: [**list_view_v1**](docs/FoundryLogscaleApi.md#list_view_v1) +- **GET**: /loggingapi/entities/views/v1 +- **Description**: List views + +--- + **Class**: `Falcon::HostGroupApi` - **Operation**: [**create_host_groups**](docs/HostGroupApi.md#create_host_groups) @@ -1703,15 +2551,7 @@ We appreciate your interest in our project and look forward to collaborating wit - **Operation**: [**entities_perform_action**](docs/HostsApi.md#entities_perform_action) - **POST**: /devices/entities/group-actions/v1 -- **Description**: Performs the specified action on the provided prevention policy IDs. - ---- - -**Class**: `Falcon::HostsApi` - -- **Operation**: [**get_device_details**](docs/HostsApi.md#get_device_details) -- **GET**: /devices/entities/devices/v1 -- **Description**: Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API +- **Description**: Performs the specified action on the provided group IDs. --- @@ -1757,6 +2597,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::HostsApi` +- **Operation**: [**query_device_login_history_v2**](docs/HostsApi.md#query_device_login_history_v2) +- **POST**: /devices/combined/devices/login-history/v2 +- **Description**: Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified + +--- + +**Class**: `Falcon::HostsApi` + - **Operation**: [**query_devices_by_filter**](docs/HostsApi.md#query_devices_by_filter) - **GET**: /devices/queries/devices/v1 - **Description**: Search for hosts in your environment by platform, hostname, IP, and other criteria. @@ -1827,27 +2675,115 @@ We appreciate your interest in our project and look forward to collaborating wit --- -**Class**: `Falcon::IncidentsApi` +**Class**: `Falcon::ImageAssessmentPoliciesApi` -- **Operation**: [**crowd_score**](docs/IncidentsApi.md#crowd_score) -- **GET**: /incidents/combined/crowdscores/v1 -- **Description**: Query environment wide CrowdScore and return the entity data +- **Operation**: [**create_policies**](docs/ImageAssessmentPoliciesApi.md#create_policies) +- **POST**: /container-security/entities/image-assessment-policies/v1 +- **Description**: Create Image Assessment policies --- -**Class**: `Falcon::IncidentsApi` +**Class**: `Falcon::ImageAssessmentPoliciesApi` -- **Operation**: [**get_behaviors**](docs/IncidentsApi.md#get_behaviors) -- **POST**: /incidents/entities/behaviors/GET/v1 -- **Description**: Get details on behaviors by providing behavior IDs +- **Operation**: [**create_policy_groups**](docs/ImageAssessmentPoliciesApi.md#create_policy_groups) +- **POST**: /container-security/entities/image-assessment-policy-groups/v1 +- **Description**: Create Image Assessment Policy Group entities --- -**Class**: `Falcon::IncidentsApi` +**Class**: `Falcon::ImageAssessmentPoliciesApi` -- **Operation**: [**get_incidents**](docs/IncidentsApi.md#get_incidents) -- **POST**: /incidents/entities/incidents/GET/v1 -- **Description**: Get details on incidents by providing incident IDs +- **Operation**: [**delete_policy**](docs/ImageAssessmentPoliciesApi.md#delete_policy) +- **DELETE**: /container-security/entities/image-assessment-policies/v1 +- **Description**: Delete Image Assessment Policy by policy UUID + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**delete_policy_group**](docs/ImageAssessmentPoliciesApi.md#delete_policy_group) +- **DELETE**: /container-security/entities/image-assessment-policy-groups/v1 +- **Description**: Delete Image Assessment Policy Group entities + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**read_policies**](docs/ImageAssessmentPoliciesApi.md#read_policies) +- **GET**: /container-security/entities/image-assessment-policies/v1 +- **Description**: Get all Image Assessment policies + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**read_policy_exclusions**](docs/ImageAssessmentPoliciesApi.md#read_policy_exclusions) +- **GET**: /container-security/entities/image-assessment-policy-exclusions/v1 +- **Description**: Retrieve Image Assessment Policy Exclusion entities + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**read_policy_groups**](docs/ImageAssessmentPoliciesApi.md#read_policy_groups) +- **GET**: /container-security/entities/image-assessment-policy-groups/v1 +- **Description**: Retrieve Image Assessment Policy Group entities + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**update_policies**](docs/ImageAssessmentPoliciesApi.md#update_policies) +- **PATCH**: /container-security/entities/image-assessment-policies/v1 +- **Description**: Update Image Assessment Policy entities + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**update_policy_exclusions**](docs/ImageAssessmentPoliciesApi.md#update_policy_exclusions) +- **POST**: /container-security/entities/image-assessment-policy-exclusions/v1 +- **Description**: Update Image Assessment Policy Exclusion entities + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**update_policy_groups**](docs/ImageAssessmentPoliciesApi.md#update_policy_groups) +- **PATCH**: /container-security/entities/image-assessment-policy-groups/v1 +- **Description**: Update Image Assessment Policy Group entities + +--- + +**Class**: `Falcon::ImageAssessmentPoliciesApi` + +- **Operation**: [**update_policy_precedence**](docs/ImageAssessmentPoliciesApi.md#update_policy_precedence) +- **POST**: /container-security/entities/image-assessment-policy-precedence/v1 +- **Description**: Update Image Assessment Policy precedence + +--- + +**Class**: `Falcon::IncidentsApi` + +- **Operation**: [**crowd_score**](docs/IncidentsApi.md#crowd_score) +- **GET**: /incidents/combined/crowdscores/v1 +- **Description**: Query environment wide CrowdScore and return the entity data + +--- + +**Class**: `Falcon::IncidentsApi` + +- **Operation**: [**get_behaviors**](docs/IncidentsApi.md#get_behaviors) +- **POST**: /incidents/entities/behaviors/GET/v1 +- **Description**: Get details on behaviors by providing behavior IDs + +--- + +**Class**: `Falcon::IncidentsApi` + +- **Operation**: [**get_incidents**](docs/IncidentsApi.md#get_incidents) +- **POST**: /incidents/entities/incidents/GET/v1 +- **Description**: Get details on incidents by providing incident IDs --- @@ -2099,14 +3035,6 @@ We appreciate your interest in our project and look forward to collaborating wit --- -**Class**: `Falcon::InventoriesApi` - -- **Operation**: [**create_inventory**](docs/InventoriesApi.md#create_inventory) -- **POST**: /snapshots/entities/inventories/v1 -- **Description**: Create inventory from data received from snapshot - ---- - **Class**: `Falcon::IoaExclusionsApi` - **Operation**: [**create_ioa_exclusions_v1**](docs/IoaExclusionsApi.md#create_ioa_exclusions_v1) @@ -2147,267 +3075,619 @@ We appreciate your interest in our project and look forward to collaborating wit --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::IocApi` + +- **Operation**: [**action_get_v1**](docs/IocApi.md#action_get_v1) +- **GET**: /iocs/entities/actions/v1 +- **Description**: Get Actions by ids. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**action_query_v1**](docs/IocApi.md#action_query_v1) +- **GET**: /iocs/queries/actions/v1 +- **Description**: Query Actions. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**get_indicators_report**](docs/IocApi.md#get_indicators_report) +- **POST**: /iocs/entities/indicators-reports/v1 +- **Description**: Launch an indicators report creation job + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_aggregate_v1**](docs/IocApi.md#indicator_aggregate_v1) +- **POST**: /iocs/aggregates/indicators/v1 +- **Description**: Get Indicators aggregates as specified via json in the request body. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_combined_v1**](docs/IocApi.md#indicator_combined_v1) +- **GET**: /iocs/combined/indicator/v1 +- **Description**: Get Combined for Indicators. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_create_v1**](docs/IocApi.md#indicator_create_v1) +- **POST**: /iocs/entities/indicators/v1 +- **Description**: Create Indicators. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_delete_v1**](docs/IocApi.md#indicator_delete_v1) +- **DELETE**: /iocs/entities/indicators/v1 +- **Description**: Delete Indicators by ids. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_get_device_count_v1**](docs/IocApi.md#indicator_get_device_count_v1) +- **GET**: /iocs/aggregates/indicators/device-count/v1 +- **Description**: Get the number of devices the indicator has run on + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_get_devices_ran_on_v1**](docs/IocApi.md#indicator_get_devices_ran_on_v1) +- **GET**: /iocs/queries/indicators/devices/v1 +- **Description**: Get the IDs of devices the indicator has run on + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_get_processes_ran_on_v1**](docs/IocApi.md#indicator_get_processes_ran_on_v1) +- **GET**: /iocs/queries/indicators/processes/v1 +- **Description**: Get the number of processes the indicator has run on + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_get_v1**](docs/IocApi.md#indicator_get_v1) +- **GET**: /iocs/entities/indicators/v1 +- **Description**: Get Indicators by ids. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_search_v1**](docs/IocApi.md#indicator_search_v1) +- **GET**: /iocs/queries/indicators/v1 +- **Description**: Search for Indicators. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**indicator_update_v1**](docs/IocApi.md#indicator_update_v1) +- **PATCH**: /iocs/entities/indicators/v1 +- **Description**: Update Indicators. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**ioc_type_query_v1**](docs/IocApi.md#ioc_type_query_v1) +- **GET**: /iocs/queries/ioc-types/v1 +- **Description**: Query IOC Types. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**platform_query_v1**](docs/IocApi.md#platform_query_v1) +- **GET**: /iocs/queries/platforms/v1 +- **Description**: Query Platforms. + +--- + +**Class**: `Falcon::IocApi` + +- **Operation**: [**severity_query_v1**](docs/IocApi.md#severity_query_v1) +- **GET**: /iocs/queries/severities/v1 +- **Description**: Query Severities. + +--- + +**Class**: `Falcon::IocsApi` + +- **Operation**: [**devices_count**](docs/IocsApi.md#devices_count) +- **GET**: /indicators/aggregates/devices-count/v1 +- **Description**: Number of hosts in your customer account that have observed a given custom IOC + +--- + +**Class**: `Falcon::IocsApi` + +- **Operation**: [**devices_ran_on**](docs/IocsApi.md#devices_ran_on) +- **GET**: /indicators/queries/devices/v1 +- **Description**: Find hosts that have observed a given custom IOC. For details about those hosts, use GET /devices/entities/devices/v1 + +--- + +**Class**: `Falcon::IocsApi` + +- **Operation**: [**entities_processes**](docs/IocsApi.md#entities_processes) +- **GET**: /processes/entities/processes/v1 +- **Description**: For the provided ProcessID retrieve the process details + +--- + +**Class**: `Falcon::IocsApi` + +- **Operation**: [**processes_ran_on**](docs/IocsApi.md#processes_ran_on) +- **GET**: /indicators/queries/processes/v1 +- **Description**: Search for processes associated with a custom IOC + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**create_aws_account**](docs/KubernetesProtectionApi.md#create_aws_account) +- **POST**: /kubernetes-protection/entities/accounts/aws/v1 +- **Description**: Creates a new AWS account in our system for a customer and generates the installation script + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**create_azure_subscription**](docs/KubernetesProtectionApi.md#create_azure_subscription) +- **POST**: /kubernetes-protection/entities/accounts/azure/v1 +- **Description**: Creates a new Azure Subscription in our system + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**delete_aws_accounts_mixin0**](docs/KubernetesProtectionApi.md#delete_aws_accounts_mixin0) +- **DELETE**: /kubernetes-protection/entities/accounts/aws/v1 +- **Description**: Delete AWS accounts. + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**delete_azure_subscription**](docs/KubernetesProtectionApi.md#delete_azure_subscription) +- **DELETE**: /kubernetes-protection/entities/accounts/azure/v1 +- **Description**: Deletes a new Azure Subscription in our system + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**find_containers_by_container_run_time_version**](docs/KubernetesProtectionApi.md#find_containers_by_container_run_time_version) +- **GET**: /container-security/aggregates/containers/find-by-runtimeversion/v1 +- **Description**: Retrieve containers by container_runtime_version + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**find_containers_count_affected_by_zero_day_vulnerabilities**](docs/KubernetesProtectionApi.md#find_containers_count_affected_by_zero_day_vulnerabilities) +- **GET**: /container-security/aggregates/containers/count-by-zero-day/v1 +- **Description**: Retrieve containers count affected by zero day vulnerabilities + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_aws_accounts_mixin0**](docs/KubernetesProtectionApi.md#get_aws_accounts_mixin0) +- **GET**: /kubernetes-protection/entities/accounts/aws/v1 +- **Description**: Provides a list of AWS accounts. + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_azure_install_script**](docs/KubernetesProtectionApi.md#get_azure_install_script) +- **GET**: /kubernetes-protection/entities/user-script/azure/v1 +- **Description**: Provides the script to run for a given tenant id and subscription IDs + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_azure_tenant_config**](docs/KubernetesProtectionApi.md#get_azure_tenant_config) +- **GET**: /kubernetes-protection/entities/config/azure/v1 +- **Description**: Gets the Azure tenant Config + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_azure_tenant_ids**](docs/KubernetesProtectionApi.md#get_azure_tenant_ids) +- **GET**: /kubernetes-protection/entities/tenants/azure/v1 +- **Description**: Provides all the azure subscriptions and tenants + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_clusters**](docs/KubernetesProtectionApi.md#get_clusters) +- **GET**: /kubernetes-protection/entities/kubernetes/clusters/v1 +- **Description**: Provides the clusters acknowledged by the Kubernetes Protection service + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_combined_cloud_clusters**](docs/KubernetesProtectionApi.md#get_combined_cloud_clusters) +- **GET**: /kubernetes-protection/entities/cloud_cluster/v1 +- **Description**: Returns a combined list of provisioned cloud accounts and known kubernetes clusters + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_helm_values_yaml**](docs/KubernetesProtectionApi.md#get_helm_values_yaml) +- **GET**: /kubernetes-protection/entities/integration/agent/v1 +- **Description**: Provides a sample Helm values.yaml file for a customer to install alongside the agent Helm chart + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_locations**](docs/KubernetesProtectionApi.md#get_locations) +- **GET**: /kubernetes-protection/entities/cloud-locations/v1 +- **Description**: Provides the cloud locations acknowledged by the Kubernetes Protection service + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**get_static_scripts**](docs/KubernetesProtectionApi.md#get_static_scripts) +- **GET**: /kubernetes-protection/entities/gen/scripts/v1 +- **Description**: Gets static bash scripts that are used during registration + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**group_containers_by_managed**](docs/KubernetesProtectionApi.md#group_containers_by_managed) +- **GET**: /container-security/aggregates/containers/group-by-managed/v1 +- **Description**: Group the containers by Managed + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**list_azure_accounts**](docs/KubernetesProtectionApi.md#list_azure_accounts) +- **GET**: /kubernetes-protection/entities/accounts/azure/v1 +- **Description**: Provides the azure subscriptions registered to Kubernetes Protection + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**patch_azure_service_principal**](docs/KubernetesProtectionApi.md#patch_azure_service_principal) +- **PATCH**: /kubernetes-protection/entities/service-principal/azure/v1 +- **Description**: Adds the client ID for the given tenant ID to our system + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**read_cluster_combined**](docs/KubernetesProtectionApi.md#read_cluster_combined) +- **GET**: /container-security/combined/clusters/v1 +- **Description**: Retrieve kubernetes clusters identified by the provided filter criteria + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**read_cluster_count**](docs/KubernetesProtectionApi.md#read_cluster_count) +- **GET**: /container-security/aggregates/clusters/count/v1 +- **Description**: Retrieve cluster counts + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**read_cluster_enrichment**](docs/KubernetesProtectionApi.md#read_cluster_enrichment) +- **GET**: /container-security/aggregates/enrichment/clusters/entities/v1 +- **Description**: Retrieve cluster enrichment data + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**read_clusters_by_date_range_count**](docs/KubernetesProtectionApi.md#read_clusters_by_date_range_count) +- **GET**: /container-security/aggregates/clusters/count-by-date/v1 +- **Description**: Retrieve clusters by date range counts + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**read_clusters_by_kubernetes_version_count**](docs/KubernetesProtectionApi.md#read_clusters_by_kubernetes_version_count) +- **GET**: /container-security/aggregates/clusters/count-by-kubernetes-version/v1 +- **Description**: Bucket clusters by kubernetes version + +--- + +**Class**: `Falcon::KubernetesProtectionApi` + +- **Operation**: [**read_clusters_by_status_count**](docs/KubernetesProtectionApi.md#read_clusters_by_status_count) +- **GET**: /container-security/aggregates/clusters/count-by-status/v1 +- **Description**: Bucket clusters by status + +--- + +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**action_get_v1**](docs/IocApi.md#action_get_v1) -- **GET**: /iocs/entities/actions/v1 -- **Description**: Get Actions by ids. +- **Operation**: [**read_container_combined**](docs/KubernetesProtectionApi.md#read_container_combined) +- **GET**: /container-security/combined/containers/v1 +- **Description**: Retrieve containers identified by the provided filter criteria --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**action_query_v1**](docs/IocApi.md#action_query_v1) -- **GET**: /iocs/queries/actions/v1 -- **Description**: Query Actions. +- **Operation**: [**read_container_count**](docs/KubernetesProtectionApi.md#read_container_count) +- **GET**: /container-security/aggregates/containers/count/v1 +- **Description**: Retrieve container counts --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_indicators_report**](docs/IocApi.md#get_indicators_report) -- **POST**: /iocs/entities/indicators-reports/v1 -- **Description**: Launch an indicators report creation job +- **Operation**: [**read_container_count_by_registry**](docs/KubernetesProtectionApi.md#read_container_count_by_registry) +- **GET**: /container-security/aggregates/containers/count-by-registry/v1 +- **Description**: Retrieve top container image registries --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**indicator_aggregate_v1**](docs/IocApi.md#indicator_aggregate_v1) -- **POST**: /iocs/aggregates/indicators/v1 -- **Description**: Get Indicators aggregates as specified via json in the request body. +- **Operation**: [**read_container_enrichment**](docs/KubernetesProtectionApi.md#read_container_enrichment) +- **GET**: /container-security/aggregates/enrichment/containers/entities/v1 +- **Description**: Retrieve container enrichment data --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**indicator_combined_v1**](docs/IocApi.md#indicator_combined_v1) -- **GET**: /iocs/combined/indicator/v1 -- **Description**: Get Combined for Indicators. +- **Operation**: [**read_container_image_detections_count_by_date**](docs/KubernetesProtectionApi.md#read_container_image_detections_count_by_date) +- **GET**: /container-security/aggregates/containers/image-detections-count-by-date/v1 +- **Description**: Retrieve count of image assessment detections on running containers over a period of time --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**indicator_create_v1**](docs/IocApi.md#indicator_create_v1) -- **POST**: /iocs/entities/indicators/v1 -- **Description**: Create Indicators. +- **Operation**: [**read_container_images_by_most_used**](docs/KubernetesProtectionApi.md#read_container_images_by_most_used) +- **GET**: /container-security/aggregates/images/most-used/v1 +- **Description**: Bucket container by image-digest --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**indicator_delete_v1**](docs/IocApi.md#indicator_delete_v1) -- **DELETE**: /iocs/entities/indicators/v1 -- **Description**: Delete Indicators by ids. +- **Operation**: [**read_container_images_by_state**](docs/KubernetesProtectionApi.md#read_container_images_by_state) +- **GET**: /container-security/aggregates/containers/images-by-state/v1 +- **Description**: Retrieve count of image states running on containers --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**indicator_get_v1**](docs/IocApi.md#indicator_get_v1) -- **GET**: /iocs/entities/indicators/v1 -- **Description**: Get Indicators by ids. +- **Operation**: [**read_container_vulnerabilities_by_severity_count**](docs/KubernetesProtectionApi.md#read_container_vulnerabilities_by_severity_count) +- **GET**: /container-security/aggregates/containers/vulnerability-count-by-severity/v1 +- **Description**: Retrieve container vulnerabilities by severity counts --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**indicator_search_v1**](docs/IocApi.md#indicator_search_v1) -- **GET**: /iocs/queries/indicators/v1 -- **Description**: Search for Indicators. +- **Operation**: [**read_containers_by_date_range_count**](docs/KubernetesProtectionApi.md#read_containers_by_date_range_count) +- **GET**: /container-security/aggregates/containers/count-by-date/v1 +- **Description**: Retrieve containers by date range counts --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**indicator_update_v1**](docs/IocApi.md#indicator_update_v1) -- **PATCH**: /iocs/entities/indicators/v1 -- **Description**: Update Indicators. +- **Operation**: [**read_containers_sensor_coverage**](docs/KubernetesProtectionApi.md#read_containers_sensor_coverage) +- **GET**: /container-security/aggregates/containers/sensor-coverage/v1 +- **Description**: Bucket containers by agent type and calculate sensor coverage --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**ioc_type_query_v1**](docs/IocApi.md#ioc_type_query_v1) -- **GET**: /iocs/queries/ioc-types/v1 -- **Description**: Query IOC Types. +- **Operation**: [**read_deployment_combined**](docs/KubernetesProtectionApi.md#read_deployment_combined) +- **GET**: /container-security/combined/deployments/v1 +- **Description**: Retrieve kubernetes deployments identified by the provided filter criteria --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**platform_query_v1**](docs/IocApi.md#platform_query_v1) -- **GET**: /iocs/queries/platforms/v1 -- **Description**: Query Platforms. +- **Operation**: [**read_deployment_count**](docs/KubernetesProtectionApi.md#read_deployment_count) +- **GET**: /container-security/aggregates/deployments/count/v1 +- **Description**: Retrieve deployment counts --- -**Class**: `Falcon::IocApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**severity_query_v1**](docs/IocApi.md#severity_query_v1) -- **GET**: /iocs/queries/severities/v1 -- **Description**: Query Severities. +- **Operation**: [**read_deployment_enrichment**](docs/KubernetesProtectionApi.md#read_deployment_enrichment) +- **GET**: /container-security/aggregates/enrichment/deployments/entities/v1 +- **Description**: Retrieve deployment enrichment data --- -**Class**: `Falcon::IocsApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**devices_count**](docs/IocsApi.md#devices_count) -- **GET**: /indicators/aggregates/devices-count/v1 -- **Description**: Number of hosts in your customer account that have observed a given custom IOC +- **Operation**: [**read_deployments_by_date_range_count**](docs/KubernetesProtectionApi.md#read_deployments_by_date_range_count) +- **GET**: /container-security/aggregates/deployments/count-by-date/v1 +- **Description**: Retrieve deployments by date range counts --- -**Class**: `Falcon::IocsApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**devices_ran_on**](docs/IocsApi.md#devices_ran_on) -- **GET**: /indicators/queries/devices/v1 -- **Description**: Find hosts that have observed a given custom IOC. For details about those hosts, use GET /devices/entities/devices/v1 +- **Operation**: [**read_distinct_container_image_count**](docs/KubernetesProtectionApi.md#read_distinct_container_image_count) +- **GET**: /container-security/aggregates/images/count-by-distinct/v1 +- **Description**: Retrieve count of distinct images running on containers --- -**Class**: `Falcon::IocsApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**entities_processes**](docs/IocsApi.md#entities_processes) -- **GET**: /processes/entities/processes/v1 -- **Description**: For the provided ProcessID retrieve the process details +- **Operation**: [**read_kubernetes_iom_by_date_range**](docs/KubernetesProtectionApi.md#read_kubernetes_iom_by_date_range) +- **GET**: /container-security/aggregates/kubernetes-ioms/count-by-date/v1 +- **Description**: Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. --- -**Class**: `Falcon::IocsApi` +**Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**processes_ran_on**](docs/IocsApi.md#processes_ran_on) -- **GET**: /indicators/queries/processes/v1 -- **Description**: Search for processes associated with a custom IOC +- **Operation**: [**read_kubernetes_iom_count**](docs/KubernetesProtectionApi.md#read_kubernetes_iom_count) +- **GET**: /container-security/aggregates/kubernetes-ioms/count/v1 +- **Description**: Returns the total count of Kubernetes IOMs over the past seven days --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**create_aws_account**](docs/KubernetesProtectionApi.md#create_aws_account) -- **POST**: /kubernetes-protection/entities/accounts/aws/v1 -- **Description**: Creates a new AWS account in our system for a customer and generates the installation script +- **Operation**: [**read_kubernetes_iom_entities**](docs/KubernetesProtectionApi.md#read_kubernetes_iom_entities) +- **GET**: /container-security/entities/kubernetes-ioms/v1 +- **Description**: Retrieve Kubernetes IOM entities identified by the provided IDs --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**create_azure_subscription**](docs/KubernetesProtectionApi.md#create_azure_subscription) -- **POST**: /kubernetes-protection/entities/accounts/azure/v1 -- **Description**: Creates a new Azure Subscription in our system +- **Operation**: [**read_node_combined**](docs/KubernetesProtectionApi.md#read_node_combined) +- **GET**: /container-security/combined/nodes/v1 +- **Description**: Retrieve kubernetes nodes identified by the provided filter criteria --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**delete_aws_accounts_mixin0**](docs/KubernetesProtectionApi.md#delete_aws_accounts_mixin0) -- **DELETE**: /kubernetes-protection/entities/accounts/aws/v1 -- **Description**: Delete AWS accounts. +- **Operation**: [**read_node_count**](docs/KubernetesProtectionApi.md#read_node_count) +- **GET**: /container-security/aggregates/nodes/count/v1 +- **Description**: Retrieve node counts --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**delete_azure_subscription**](docs/KubernetesProtectionApi.md#delete_azure_subscription) -- **DELETE**: /kubernetes-protection/entities/accounts/azure/v1 -- **Description**: Deletes a new Azure Subscription in our system +- **Operation**: [**read_node_enrichment**](docs/KubernetesProtectionApi.md#read_node_enrichment) +- **GET**: /container-security/aggregates/enrichment/nodes/entities/v1 +- **Description**: Retrieve node enrichment data --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_aws_accounts_mixin0**](docs/KubernetesProtectionApi.md#get_aws_accounts_mixin0) -- **GET**: /kubernetes-protection/entities/accounts/aws/v1 -- **Description**: Provides a list of AWS accounts. +- **Operation**: [**read_nodes_by_cloud_count**](docs/KubernetesProtectionApi.md#read_nodes_by_cloud_count) +- **GET**: /container-security/aggregates/nodes/count-by-cloud/v1 +- **Description**: Bucket nodes by cloud providers --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_azure_install_script**](docs/KubernetesProtectionApi.md#get_azure_install_script) -- **GET**: /kubernetes-protection/entities/user-script/azure/v1 -- **Description**: Provides the script to run for a given tenant id and subscription IDs +- **Operation**: [**read_nodes_by_container_engine_version_count**](docs/KubernetesProtectionApi.md#read_nodes_by_container_engine_version_count) +- **GET**: /container-security/aggregates/nodes/count-by-container-engine-version/v1 +- **Description**: Bucket nodes by their container engine version --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_azure_tenant_config**](docs/KubernetesProtectionApi.md#get_azure_tenant_config) -- **GET**: /kubernetes-protection/entities/config/azure/v1 -- **Description**: Gets the Azure tenant Config +- **Operation**: [**read_nodes_by_date_range_count**](docs/KubernetesProtectionApi.md#read_nodes_by_date_range_count) +- **GET**: /container-security/aggregates/nodes/count-by-date/v1 +- **Description**: Retrieve nodes by date range counts --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_azure_tenant_ids**](docs/KubernetesProtectionApi.md#get_azure_tenant_ids) -- **GET**: /kubernetes-protection/entities/tenants/azure/v1 -- **Description**: Provides all the azure subscriptions and tenants +- **Operation**: [**read_pod_combined**](docs/KubernetesProtectionApi.md#read_pod_combined) +- **GET**: /container-security/combined/pods/v1 +- **Description**: Retrieve kubernetes pods identified by the provided filter criteria --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_clusters**](docs/KubernetesProtectionApi.md#get_clusters) -- **GET**: /kubernetes-protection/entities/kubernetes/clusters/v1 -- **Description**: Provides the clusters acknowledged by the Kubernetes Protection service +- **Operation**: [**read_pod_count**](docs/KubernetesProtectionApi.md#read_pod_count) +- **GET**: /container-security/aggregates/pods/count/v1 +- **Description**: Retrieve pod counts --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_combined_cloud_clusters**](docs/KubernetesProtectionApi.md#get_combined_cloud_clusters) -- **GET**: /kubernetes-protection/entities/cloud_cluster/v1 -- **Description**: Returns a combined list of provisioned cloud accounts and known kubernetes clusters +- **Operation**: [**read_pod_enrichment**](docs/KubernetesProtectionApi.md#read_pod_enrichment) +- **GET**: /container-security/aggregates/enrichment/pods/entities/v1 +- **Description**: Retrieve pod enrichment data --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_helm_values_yaml**](docs/KubernetesProtectionApi.md#get_helm_values_yaml) -- **GET**: /kubernetes-protection/entities/integration/agent/v1 -- **Description**: Provides a sample Helm values.yaml file for a customer to install alongside the agent Helm chart +- **Operation**: [**read_pods_by_date_range_count**](docs/KubernetesProtectionApi.md#read_pods_by_date_range_count) +- **GET**: /container-security/aggregates/pods/count-by-date/v1 +- **Description**: Retrieve pods by date range counts --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_locations**](docs/KubernetesProtectionApi.md#get_locations) -- **GET**: /kubernetes-protection/entities/cloud-locations/v1 -- **Description**: Provides the cloud locations acknowledged by the Kubernetes Protection service +- **Operation**: [**read_running_container_images**](docs/KubernetesProtectionApi.md#read_running_container_images) +- **GET**: /container-security/combined/container-images/v1 +- **Description**: Retrieve images on running containers --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**get_static_scripts**](docs/KubernetesProtectionApi.md#get_static_scripts) -- **GET**: /kubernetes-protection/entities/gen/scripts/v1 -- **Description**: Gets static bash scripts that are used during registration +- **Operation**: [**read_vulnerable_container_image_count**](docs/KubernetesProtectionApi.md#read_vulnerable_container_image_count) +- **GET**: /container-security/aggregates/containers/count-vulnerable-images/v1 +- **Description**: Retrieve count of vulnerable images running on containers --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**list_azure_accounts**](docs/KubernetesProtectionApi.md#list_azure_accounts) -- **GET**: /kubernetes-protection/entities/accounts/azure/v1 -- **Description**: Provides the azure subscriptions registered to Kubernetes Protection +- **Operation**: [**regenerate_api_key**](docs/KubernetesProtectionApi.md#regenerate_api_key) +- **POST**: /kubernetes-protection/entities/integration/api-key/v1 +- **Description**: Regenerate API key for docker registry integrations --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**patch_azure_service_principal**](docs/KubernetesProtectionApi.md#patch_azure_service_principal) -- **PATCH**: /kubernetes-protection/entities/service-principal/azure/v1 -- **Description**: Adds the client ID for the given tenant ID to our system +- **Operation**: [**search_and_read_kubernetes_iom_entities**](docs/KubernetesProtectionApi.md#search_and_read_kubernetes_iom_entities) +- **GET**: /container-security/combined/kubernetes-ioms/v1 +- **Description**: Search Kubernetes IOM by the provided search criteria --- **Class**: `Falcon::KubernetesProtectionApi` -- **Operation**: [**regenerate_api_key**](docs/KubernetesProtectionApi.md#regenerate_api_key) -- **POST**: /kubernetes-protection/entities/integration/api-key/v1 -- **Description**: Regenerate API key for docker registry integrations +- **Operation**: [**search_kubernetes_ioms**](docs/KubernetesProtectionApi.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 --- @@ -2957,6 +4237,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::OdsApi` +- **Operation**: [**get_scans_by_scan_ids_v2**](docs/OdsApi.md#get_scans_by_scan_ids_v2) +- **GET**: /ods/entities/scans/v2 +- **Description**: Get Scans by IDs. + +--- + +**Class**: `Falcon::OdsApi` + - **Operation**: [**get_scheduled_scans_by_scan_ids**](docs/OdsApi.md#get_scheduled_scans_by_scan_ids) - **GET**: /ods/entities/scheduled-scans/v1 - **Description**: Get ScheduledScans by IDs. @@ -3453,6 +4741,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::RealTimeResponseAdminApi` +- **Operation**: [**r_tr_get_falcon_scripts**](docs/RealTimeResponseAdminApi.md#r_tr_get_falcon_scripts) +- **GET**: /real-time-response/entities/falcon-scripts/v1 +- **Description**: Get Falcon scripts with metadata and content of script + +--- + +**Class**: `Falcon::RealTimeResponseAdminApi` + - **Operation**: [**r_tr_get_put_files**](docs/RealTimeResponseAdminApi.md#r_tr_get_put_files) - **GET**: /real-time-response/entities/put-files/v1 - **Description**: Get put-files based on the ID's given. These are used for the RTR `put` command. @@ -3485,6 +4781,14 @@ We appreciate your interest in our project and look forward to collaborating wit **Class**: `Falcon::RealTimeResponseAdminApi` +- **Operation**: [**r_tr_list_falcon_scripts**](docs/RealTimeResponseAdminApi.md#r_tr_list_falcon_scripts) +- **GET**: /real-time-response/queries/falcon-scripts/v1 +- **Description**: Get a list of Falcon script IDs available to the user to run + +--- + +**Class**: `Falcon::RealTimeResponseAdminApi` + - **Operation**: [**r_tr_list_put_files**](docs/RealTimeResponseAdminApi.md#r_tr_list_put_files) - **GET**: /real-time-response/queries/put-files/v1 - **Description**: Get a list of put-file ID's that are available to the user for the `put` command. @@ -3507,11 +4811,19 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::RealTimeResponseAuditApi` + +- **Operation**: [**r_tr_audit_sessions**](docs/RealTimeResponseAuditApi.md#r_tr_audit_sessions) +- **GET**: /real-time-response-audit/combined/sessions/v1 +- **Description**: Get all the RTR sessions created for a customer in a specified duration + +--- + **Class**: `Falcon::ReconApi` - **Operation**: [**aggregate_notifications_exposed_data_records_v1**](docs/ReconApi.md#aggregate_notifications_exposed_data_records_v1) - **POST**: /recon/aggregates/notifications-exposed-data-records/GET/v1 -- **Description**: Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] +- **Description**: Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] --- @@ -3827,6 +5139,14 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::RuntimeDetectionsApi` + +- **Operation**: [**get_runtime_detections_combined_v2**](docs/RuntimeDetectionsApi.md#get_runtime_detections_combined_v2) +- **GET**: /container-security/combined/runtime-detections/v2 +- **Description**: Retrieve container runtime detections by the provided search criteria + +--- + **Class**: `Falcon::SampleUploadsApi` - **Operation**: [**archive_delete_v1**](docs/SampleUploadsApi.md#archive_delete_v1) @@ -4163,6 +5483,62 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::SpotlightEvaluationLogicApi` + +- **Operation**: [**combined_query_evaluation_logic**](docs/SpotlightEvaluationLogicApi.md#combined_query_evaluation_logic) +- **GET**: /spotlight/combined/evaluation-logic/v1 +- **Description**: Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic entities which match the filter criteria. + +--- + +**Class**: `Falcon::SpotlightEvaluationLogicApi` + +- **Operation**: [**get_evaluation_logic**](docs/SpotlightEvaluationLogicApi.md#get_evaluation_logic) +- **GET**: /spotlight/entities/evaluation-logic/v1 +- **Description**: Get details on evaluation logic items by providing one or more IDs. + +--- + +**Class**: `Falcon::SpotlightEvaluationLogicApi` + +- **Operation**: [**query_evaluation_logic**](docs/SpotlightEvaluationLogicApi.md#query_evaluation_logic) +- **GET**: /spotlight/queries/evaluation-logic/v1 +- **Description**: Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic IDs which match the filter criteria. + +--- + +**Class**: `Falcon::SpotlightVulnerabilitiesApi` + +- **Operation**: [**combined_query_vulnerabilities**](docs/SpotlightVulnerabilitiesApi.md#combined_query_vulnerabilities) +- **GET**: /spotlight/combined/vulnerabilities/v1 +- **Description**: 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 + +--- + +**Class**: `Falcon::SpotlightVulnerabilitiesApi` + +- **Operation**: [**get_remediations_v2**](docs/SpotlightVulnerabilitiesApi.md#get_remediations_v2) +- **GET**: /spotlight/entities/remediations/v2 +- **Description**: Get details on remediation by providing one or more IDs + +--- + +**Class**: `Falcon::SpotlightVulnerabilitiesApi` + +- **Operation**: [**get_vulnerabilities**](docs/SpotlightVulnerabilitiesApi.md#get_vulnerabilities) +- **GET**: /spotlight/entities/vulnerabilities/v2 +- **Description**: Get details on vulnerabilities by providing one or more IDs + +--- + +**Class**: `Falcon::SpotlightVulnerabilitiesApi` + +- **Operation**: [**query_vulnerabilities**](docs/SpotlightVulnerabilitiesApi.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 + +--- + **Class**: `Falcon::TailoredIntelligenceApi` - **Operation**: [**get_events_body**](docs/TailoredIntelligenceApi.md#get_events_body) @@ -4203,6 +5579,30 @@ We appreciate your interest in our project and look forward to collaborating wit --- +**Class**: `Falcon::UnidentifiedContainersApi` + +- **Operation**: [**read_unidentified_containers_by_date_range_count**](docs/UnidentifiedContainersApi.md#read_unidentified_containers_by_date_range_count) +- **GET**: /container-security/aggregates/unidentified-containers/count-by-date/v1 +- **Description**: Returns the count of Unidentified Containers over the last 7 days + +--- + +**Class**: `Falcon::UnidentifiedContainersApi` + +- **Operation**: [**read_unidentified_containers_count**](docs/UnidentifiedContainersApi.md#read_unidentified_containers_count) +- **GET**: /container-security/aggregates/unidentified-containers/count/v1 +- **Description**: Returns the total count of Unidentified Containers over a time period + +--- + +**Class**: `Falcon::UnidentifiedContainersApi` + +- **Operation**: [**search_and_read_unidentified_containers**](docs/UnidentifiedContainersApi.md#search_and_read_unidentified_containers) +- **GET**: /container-security/combined/unidentified-containers/v1 +- **Description**: Search Unidentified Containers by the provided search criteria + +--- + **Class**: `Falcon::UserManagementApi` - **Operation**: [**combined_user_roles_v1**](docs/UserManagementApi.md#combined_user_roles_v1) @@ -4379,59 +5779,115 @@ We appreciate your interest in our project and look forward to collaborating wit --- -**Class**: `Falcon::VulnerabilitiesApi` +**Class**: `Falcon::WorkflowsApi` -- **Operation**: [**combined_query_vulnerabilities**](docs/VulnerabilitiesApi.md#combined_query_vulnerabilities) -- **GET**: /spotlight/combined/vulnerabilities/v1 -- **Description**: 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 +- **Operation**: [**workflow_definitions_combined**](docs/WorkflowsApi.md#workflow_definitions_combined) +- **GET**: /workflows/combined/definitions/v1 +- **Description**: Search workflow definitions based on the provided filter --- -**Class**: `Falcon::VulnerabilitiesApi` +**Class**: `Falcon::WorkflowsApi` -- **Operation**: [**get_remediations_v2**](docs/VulnerabilitiesApi.md#get_remediations_v2) -- **GET**: /spotlight/entities/remediations/v2 -- **Description**: Get details on remediation by providing one or more IDs +- **Operation**: [**workflow_definitions_create**](docs/WorkflowsApi.md#workflow_definitions_create) +- **POST**: /workflows/entities/definitions/v1 +- **Description**: Creates a workflow definition based on the provided model --- -**Class**: `Falcon::VulnerabilitiesApi` +**Class**: `Falcon::WorkflowsApi` -- **Operation**: [**get_vulnerabilities**](docs/VulnerabilitiesApi.md#get_vulnerabilities) -- **GET**: /spotlight/entities/vulnerabilities/v2 -- **Description**: Get details on vulnerabilities by providing one or more IDs +- **Operation**: [**workflow_definitions_export**](docs/WorkflowsApi.md#workflow_definitions_export) +- **GET**: /workflows/entities/definitions/export/v1 +- **Description**: Exports a workflow definition for the given definition ID --- -**Class**: `Falcon::VulnerabilitiesApi` +**Class**: `Falcon::WorkflowsApi` -- **Operation**: [**query_vulnerabilities**](docs/VulnerabilitiesApi.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 +- **Operation**: [**workflow_definitions_import**](docs/WorkflowsApi.md#workflow_definitions_import) +- **POST**: /workflows/entities/definitions/import/v1 +- **Description**: Imports a workflow definition based on the provided model --- -**Class**: `Falcon::VulnerabilitiesEvaluationLogicApi` +**Class**: `Falcon::WorkflowsApi` -- **Operation**: [**combined_query_evaluation_logic**](docs/VulnerabilitiesEvaluationLogicApi.md#combined_query_evaluation_logic) -- **GET**: /spotlight/combined/evaluation-logic/v1 -- **Description**: Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic entities which match the filter criteria. +- **Operation**: [**workflow_definitions_update**](docs/WorkflowsApi.md#workflow_definitions_update) +- **PUT**: /workflows/entities/definitions/v1 +- **Description**: Updates a workflow definition based on the provided model --- -**Class**: `Falcon::VulnerabilitiesEvaluationLogicApi` +**Class**: `Falcon::WorkflowsApi` -- **Operation**: [**get_evaluation_logic**](docs/VulnerabilitiesEvaluationLogicApi.md#get_evaluation_logic) -- **GET**: /spotlight/entities/evaluation-logic/v1 -- **Description**: Get details on evaluation logic items by providing one or more IDs. +- **Operation**: [**workflow_execute**](docs/WorkflowsApi.md#workflow_execute) +- **POST**: /workflows/entities/execute/v1 +- **Description**: Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) --- -**Class**: `Falcon::VulnerabilitiesEvaluationLogicApi` +**Class**: `Falcon::WorkflowsApi` -- **Operation**: [**query_evaluation_logic**](docs/VulnerabilitiesEvaluationLogicApi.md#query_evaluation_logic) -- **GET**: /spotlight/queries/evaluation-logic/v1 -- **Description**: Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic IDs which match the filter criteria. +- **Operation**: [**workflow_execution_results**](docs/WorkflowsApi.md#workflow_execution_results) +- **GET**: /workflows/entities/execution-results/v1 +- **Description**: Get execution result of a given execution + +--- + +**Class**: `Falcon::WorkflowsApi` + +- **Operation**: [**workflow_executions_action**](docs/WorkflowsApi.md#workflow_executions_action) +- **POST**: /workflows/entities/execution-actions/v1 +- **Description**: Allows a user to resume/retry a failed workflow execution. + +--- + +**Class**: `Falcon::WorkflowsApi` + +- **Operation**: [**workflow_executions_combined**](docs/WorkflowsApi.md#workflow_executions_combined) +- **GET**: /workflows/combined/executions/v1 +- **Description**: Search workflow executions based on the provided filter + +--- + +**Class**: `Falcon::WorkflowsApi` + +- **Operation**: [**workflow_get_human_input_v1**](docs/WorkflowsApi.md#workflow_get_human_input_v1) +- **GET**: /workflows/entities/human-inputs/v1 +- **Description**: Gets one or more specific human inputs by their IDs. + +--- + +**Class**: `Falcon::WorkflowsApi` + +- **Operation**: [**workflow_system_definitions_de_provision**](docs/WorkflowsApi.md#workflow_system_definitions_de_provision) +- **POST**: /workflows/system-definitions/deprovision/v1 +- **Description**: Deprovisions a system definition that was previously provisioned on the target CID + +--- + +**Class**: `Falcon::WorkflowsApi` + +- **Operation**: [**workflow_system_definitions_promote**](docs/WorkflowsApi.md#workflow_system_definitions_promote) +- **POST**: /workflows/system-definitions/promote/v1 +- **Description**: Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. + +--- + +**Class**: `Falcon::WorkflowsApi` + +- **Operation**: [**workflow_system_definitions_provision**](docs/WorkflowsApi.md#workflow_system_definitions_provision) +- **POST**: /workflows/system-definitions/provision/v1 +- **Description**: Provisions a system definition onto the target CID by using the template and provided parameters + +--- + +**Class**: `Falcon::WorkflowsApi` + +- **Operation**: [**workflow_update_human_input_v1**](docs/WorkflowsApi.md#workflow_update_human_input_v1) +- **PATCH**: /workflows/entities/human-inputs/v1 +- **Description**: Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. --- diff --git a/docs/AlertsApi.md b/docs/AlertsApi.md index 91a65bb2..23009d27 100644 --- a/docs/AlertsApi.md +++ b/docs/AlertsApi.md @@ -5,14 +5,18 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**get_queries_alerts_v1**](AlertsApi.md#get_queries_alerts_v1) | **GET** /alerts/queries/alerts/v1 | retrieves all Alerts ids that match a given query | -| [**patch_entities_alerts_v2**](AlertsApi.md#patch_entities_alerts_v2) | **PATCH** /alerts/entities/alerts/v2 | Perform actions on detections identified by detection 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**](AlertsApi.md#post_aggregates_alerts_v1) | **POST** /alerts/aggregates/alerts/v1 | retrieves aggregates for Alerts across all CIDs | +| [**get_queries_alerts_v2**](AlertsApi.md#get_queries_alerts_v2) | **GET** /alerts/queries/alerts/v2 | retrieves all Alerts ids that match a given query | +| [**patch_entities_alerts_v2**](AlertsApi.md#patch_entities_alerts_v2) | **PATCH** /alerts/entities/alerts/v2 | 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. | +| [**patch_entities_alerts_v3**](AlertsApi.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**](AlertsApi.md#post_aggregates_alerts_v1) | **POST** /alerts/aggregates/alerts/v1 | retrieves aggregate values for Alerts across all CIDs | +| [**post_aggregates_alerts_v2**](AlertsApi.md#post_aggregates_alerts_v2) | **POST** /alerts/aggregates/alerts/v2 | retrieves aggregate values for Alerts across all CIDs | | [**post_entities_alerts_v1**](AlertsApi.md#post_entities_alerts_v1) | **POST** /alerts/entities/alerts/v1 | retrieves all Alerts given their ids | +| [**post_entities_alerts_v2**](AlertsApi.md#post_entities_alerts_v2) | **POST** /alerts/entities/alerts/v2 | retrieves all Alerts given their composite ids | ## get_queries_alerts_v1 -> get_queries_alerts_v1(opts) +> get_queries_alerts_v1(opts) retrieves all Alerts ids that match a given query @@ -33,8 +37,8 @@ api_instance = Falcon::AlertsApi.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. - sort: 'sort_example', # String | Sort detections in either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. - filter: 'filter_example', # String | Filter detections using a query in Falcon Query Language (FQL). An asterisk wildcard `*` includes all results. 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). + 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 detection metadata for the provided string } @@ -51,7 +55,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_queries_alerts_v1_with_http_info(opts) +> , Integer, Hash)> get_queries_alerts_v1_with_http_info(opts) ```ruby begin @@ -59,7 +63,7 @@ begin data, status_code, headers = api_instance.get_queries_alerts_v1_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling AlertsApi->get_queries_alerts_v1_with_http_info: #{e}" end @@ -71,13 +75,94 @@ end | ---- | ---- | ----------- | ----- | | **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] | -| **sort** | **String** | Sort detections in either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. | [optional] | -| **filter** | **String** | Filter detections using a query in Falcon Query Language (FQL). An asterisk wildcard `*` includes all results. 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] | +| **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 detection metadata for the provided string | [optional] | ### Return type -[**MsaspecQueryResponse**](MsaspecQueryResponse.md) +[**DetectsapiAlertQueryResponse**](DetectsapiAlertQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_queries_alerts_v2 + +> get_queries_alerts_v2(opts) + +retrieves all Alerts ids that match a given query + +### 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::AlertsApi.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. + 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 detection metadata for the provided string +} + +begin + # retrieves all Alerts ids that match a given query + result = api_instance.get_queries_alerts_v2(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->get_queries_alerts_v2: #{e}" +end +``` + +#### Using the get_queries_alerts_v2_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_queries_alerts_v2_with_http_info(opts) + +```ruby +begin + # retrieves all Alerts ids that match a given query + data, status_code, headers = api_instance.get_queries_alerts_v2_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->get_queries_alerts_v2_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **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] | +| **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 detection metadata for the provided string | [optional] | + +### Return type + +[**DetectsapiAlertQueryResponse**](DetectsapiAlertQueryResponse.md) ### Authorization @@ -91,9 +176,9 @@ end ## patch_entities_alerts_v2 -> patch_entities_alerts_v2(body) +> patch_entities_alerts_v2(body) -Perform actions on detections identified by detection 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. +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. ### Examples @@ -112,7 +197,7 @@ api_instance = Falcon::AlertsApi.new body = Falcon::DetectsapiPatchEntitiesAlertsV2Request.new({ids: ['ids_example']}) # DetectsapiPatchEntitiesAlertsV2Request | request body takes a list of action parameter request that is applied against all \"ids\" provided begin - # Perform actions on detections identified by detection 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. + # 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. result = api_instance.patch_entities_alerts_v2(body) p result rescue Falcon::ApiError => e @@ -124,15 +209,15 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> patch_entities_alerts_v2_with_http_info(body) +> , Integer, Hash)> patch_entities_alerts_v2_with_http_info(body) ```ruby begin - # Perform actions on detections identified by detection 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. + # 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. data, status_code, headers = api_instance.patch_entities_alerts_v2_with_http_info(body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling AlertsApi->patch_entities_alerts_v2_with_http_info: #{e}" end @@ -146,7 +231,80 @@ end ### Return type -[**MsaspecResponseFields**](MsaspecResponseFields.md) +[**DetectsapiResponseFields**](DetectsapiResponseFields.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## patch_entities_alerts_v3 + +> patch_entities_alerts_v3(body, opts) + +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. + +### 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::AlertsApi.new +body = Falcon::DetectsapiPatchEntitiesAlertsV3Request.new({composite_ids: ['composite_ids_example']}) # DetectsapiPatchEntitiesAlertsV3Request | request body takes a list of action parameter request that is applied against all \"ids\" provided +opts = { + include_hidden: true # Boolean | allows previously hidden alerts to be retrieved +} + +begin + # 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. + result = api_instance.patch_entities_alerts_v3(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->patch_entities_alerts_v3: #{e}" +end +``` + +#### Using the patch_entities_alerts_v3_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> patch_entities_alerts_v3_with_http_info(body, opts) + +```ruby +begin + # 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. + data, status_code, headers = api_instance.patch_entities_alerts_v3_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->patch_entities_alerts_v3_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**DetectsapiPatchEntitiesAlertsV3Request**](DetectsapiPatchEntitiesAlertsV3Request.md) | request body takes a list of action parameter request that is applied against all \"ids\" provided | | +| **include_hidden** | **Boolean** | allows previously hidden alerts to be retrieved | [optional][default to true] | + +### Return type + +[**DetectsapiResponseFields**](DetectsapiResponseFields.md) ### Authorization @@ -160,9 +318,9 @@ end ## post_aggregates_alerts_v1 -> post_aggregates_alerts_v1(body) +> post_aggregates_alerts_v1(body) -retrieves aggregates for Alerts across all CIDs +retrieves aggregate values for Alerts across all CIDs ### Examples @@ -178,10 +336,10 @@ Falcon.configure do |config| end api_instance = Falcon::AlertsApi.new -body = [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | request body takes a list of aggregation query requests +body = [Falcon::DetectsapiAggregateAlertQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::DetectsapiAggregateAlertQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | request body takes a list of aggregate-alert query requests begin - # retrieves aggregates for Alerts across all CIDs + # retrieves aggregate values for Alerts across all CIDs result = api_instance.post_aggregates_alerts_v1(body) p result rescue Falcon::ApiError => e @@ -193,15 +351,15 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> post_aggregates_alerts_v1_with_http_info(body) +> , Integer, Hash)> post_aggregates_alerts_v1_with_http_info(body) ```ruby begin - # retrieves aggregates for Alerts across all CIDs + # retrieves aggregate values for Alerts across all CIDs data, status_code, headers = api_instance.post_aggregates_alerts_v1_with_http_info(body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling AlertsApi->post_aggregates_alerts_v1_with_http_info: #{e}" end @@ -211,11 +369,84 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **body** | [**Array<MsaAggregateQueryRequest>**](MsaAggregateQueryRequest.md) | request body takes a list of aggregation query requests | | +| **body** | [**Array<DetectsapiAggregateAlertQueryRequest>**](DetectsapiAggregateAlertQueryRequest.md) | request body takes a list of aggregate-alert query requests | | + +### Return type + +[**DetectsapiAggregatesResponse**](DetectsapiAggregatesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## post_aggregates_alerts_v2 + +> post_aggregates_alerts_v2(body, opts) + +retrieves aggregate values for Alerts across all CIDs + +### 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::AlertsApi.new +body = [Falcon::DetectsapiAggregateAlertQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::DetectsapiAggregateAlertQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | request body takes a list of aggregate-alert query requests +opts = { + include_hidden: true # Boolean | allows previously hidden alerts to be retrieved +} + +begin + # retrieves aggregate values for Alerts across all CIDs + result = api_instance.post_aggregates_alerts_v2(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->post_aggregates_alerts_v2: #{e}" +end +``` + +#### Using the post_aggregates_alerts_v2_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_aggregates_alerts_v2_with_http_info(body, opts) + +```ruby +begin + # retrieves aggregate values for Alerts across all CIDs + data, status_code, headers = api_instance.post_aggregates_alerts_v2_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->post_aggregates_alerts_v2_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**Array<DetectsapiAggregateAlertQueryRequest>**](DetectsapiAggregateAlertQueryRequest.md) | request body takes a list of aggregate-alert query requests | | +| **include_hidden** | **Boolean** | allows previously hidden alerts to be retrieved | [optional][default to true] | ### Return type -[**ApiAggregatesResponse**](ApiAggregatesResponse.md) +[**DetectsapiAggregatesResponse**](DetectsapiAggregatesResponse.md) ### Authorization @@ -295,3 +526,76 @@ end - **Content-Type**: application/json - **Accept**: application/json + +## post_entities_alerts_v2 + +> post_entities_alerts_v2(body, opts) + +retrieves all Alerts given their composite 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::AlertsApi.new +body = Falcon::DetectsapiPostEntitiesAlertsV2Request.new({composite_ids: ['composite_ids_example']}) # DetectsapiPostEntitiesAlertsV2Request | +opts = { + include_hidden: true # Boolean | allows previously hidden alerts to be retrieved +} + +begin + # retrieves all Alerts given their composite ids + result = api_instance.post_entities_alerts_v2(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->post_entities_alerts_v2: #{e}" +end +``` + +#### Using the post_entities_alerts_v2_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> post_entities_alerts_v2_with_http_info(body, opts) + +```ruby +begin + # retrieves all Alerts given their composite ids + data, status_code, headers = api_instance.post_entities_alerts_v2_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling AlertsApi->post_entities_alerts_v2_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**DetectsapiPostEntitiesAlertsV2Request**](DetectsapiPostEntitiesAlertsV2Request.md) | | | +| **include_hidden** | **Boolean** | allows previously hidden alerts to be retrieved | [optional][default to true] | + +### Return type + +[**DetectsapiPostEntitiesAlertsV2Response**](DetectsapiPostEntitiesAlertsV2Response.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/AlertsContainerAlertsCountValue.md b/docs/AlertsContainerAlertsCountValue.md new file mode 100644 index 00000000..6fcdfd7a --- /dev/null +++ b/docs/AlertsContainerAlertsCountValue.md @@ -0,0 +1,22 @@ +# Falcon::AlertsContainerAlertsCountValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<CommonCountAsResource>**](CommonCountAsResource.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::AlertsContainerAlertsCountValue.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/AlertsContainerAlertsEntityResponse.md b/docs/AlertsContainerAlertsEntityResponse.md new file mode 100644 index 00000000..212d91fd --- /dev/null +++ b/docs/AlertsContainerAlertsEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::AlertsContainerAlertsEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIContainerAlert>**](ModelsAPIContainerAlert.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::AlertsContainerAlertsEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ApiDetectsQueryMeta.md b/docs/ApiDetectsQueryMeta.md new file mode 100644 index 00000000..2c1732d2 --- /dev/null +++ b/docs/ApiDetectsQueryMeta.md @@ -0,0 +1,24 @@ +# Falcon::ApiDetectsQueryMeta + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **pagination** | [**ApiDetectsQueryPaging**](ApiDetectsQueryPaging.md) | | [optional] | +| **powered_by** | **String** | | [optional] | +| **query_time** | **Float** | | | +| **trace_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiDetectsQueryMeta.new( + pagination: null, + powered_by: null, + query_time: null, + trace_id: null +) +``` + diff --git a/docs/ApiDetectsQueryPaging.md b/docs/ApiDetectsQueryPaging.md new file mode 100644 index 00000000..84f7360e --- /dev/null +++ b/docs/ApiDetectsQueryPaging.md @@ -0,0 +1,22 @@ +# Falcon::ApiDetectsQueryPaging + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | **String** | | [optional] | +| **limit** | **Integer** | | | +| **offset** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiDetectsQueryPaging.new( + after: null, + limit: null, + offset: null +) +``` + diff --git a/docs/ApiDeviceCountRespV1.md b/docs/ApiDeviceCountRespV1.md new file mode 100644 index 00000000..93d80041 --- /dev/null +++ b/docs/ApiDeviceCountRespV1.md @@ -0,0 +1,22 @@ +# Falcon::ApiDeviceCountRespV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | [optional] | +| **resources** | [**Array<ApiDeviceCountV1>**](ApiDeviceCountV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiDeviceCountRespV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ApiDeviceCountV1.md b/docs/ApiDeviceCountV1.md new file mode 100644 index 00000000..58e5e05d --- /dev/null +++ b/docs/ApiDeviceCountV1.md @@ -0,0 +1,24 @@ +# Falcon::ApiDeviceCountV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **device_count** | **Integer** | | [optional] | +| **limit_exceeded** | **Boolean** | | [optional] | +| **type** | **String** | | [optional] | +| **value** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiDeviceCountV1.new( + device_count: null, + limit_exceeded: null, + type: null, + value: null +) +``` + diff --git a/docs/ApiDevicesRanOnRespV1.md b/docs/ApiDevicesRanOnRespV1.md new file mode 100644 index 00000000..88780f43 --- /dev/null +++ b/docs/ApiDevicesRanOnRespV1.md @@ -0,0 +1,22 @@ +# Falcon::ApiDevicesRanOnRespV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**ApiDetectsQueryMeta**](ApiDetectsQueryMeta.md) | | [optional] | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiDevicesRanOnRespV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/CommonEntitiesResponse.md b/docs/ApiEntitiesResponse.md similarity index 79% rename from docs/CommonEntitiesResponse.md rename to docs/ApiEntitiesResponse.md index da5ca47a..759e2647 100644 --- a/docs/CommonEntitiesResponse.md +++ b/docs/ApiEntitiesResponse.md @@ -1,10 +1,10 @@ -# Falcon::CommonEntitiesResponse +# Falcon::ApiEntitiesResponse ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | | **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | | **resources** | **Object** | | | @@ -13,7 +13,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::CommonEntitiesResponse.new( +instance = Falcon::ApiEntitiesResponse.new( errors: null, meta: null, resources: null diff --git a/docs/ApiExecutionResultsResponse.md b/docs/ApiExecutionResultsResponse.md new file mode 100644 index 00000000..a8497899 --- /dev/null +++ b/docs/ApiExecutionResultsResponse.md @@ -0,0 +1,22 @@ +# Falcon::ApiExecutionResultsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ExecutionsExecutionResult>**](ExecutionsExecutionResult.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiExecutionResultsResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ApiExposedDataRecordBotLocationV1.md b/docs/ApiExposedDataRecordBotLocationV1.md new file mode 100644 index 00000000..8fdc03aa --- /dev/null +++ b/docs/ApiExposedDataRecordBotLocationV1.md @@ -0,0 +1,20 @@ +# Falcon::ApiExposedDataRecordBotLocationV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **country** | **String** | | [optional] | +| **zip_code** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiExposedDataRecordBotLocationV1.new( + country: null, + zip_code: null +) +``` + diff --git a/docs/ApiExposedDataRecordBotOperatingSystemV1.md b/docs/ApiExposedDataRecordBotOperatingSystemV1.md new file mode 100644 index 00000000..0e416cba --- /dev/null +++ b/docs/ApiExposedDataRecordBotOperatingSystemV1.md @@ -0,0 +1,40 @@ +# Falcon::ApiExposedDataRecordBotOperatingSystemV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **antivirus** | **Array<String>** | | [optional] | +| **computer_name** | **String** | | [optional] | +| **domain** | **String** | | [optional] | +| **hardware_id** | **String** | | [optional] | +| **installed_software** | **Array<String>** | | [optional] | +| **language** | **String** | | [optional] | +| **layouts** | **Array<String>** | | [optional] | +| **os_architecture** | **String** | | [optional] | +| **os_version** | **String** | | [optional] | +| **timezone** | **String** | | [optional] | +| **uac** | **String** | | [optional] | +| **username** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiExposedDataRecordBotOperatingSystemV1.new( + antivirus: null, + computer_name: null, + domain: null, + hardware_id: null, + installed_software: null, + language: null, + layouts: null, + os_architecture: null, + os_version: null, + timezone: null, + uac: null, + username: null +) +``` + diff --git a/docs/ApiExposedDataRecordBotV1.md b/docs/ApiExposedDataRecordBotV1.md new file mode 100644 index 00000000..bd596b58 --- /dev/null +++ b/docs/ApiExposedDataRecordBotV1.md @@ -0,0 +1,32 @@ +# Falcon::ApiExposedDataRecordBotV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **bot_id** | **String** | | [optional] | +| **domain_detects** | **Array<String>** | | [optional] | +| **infection_build_id** | **String** | | [optional] | +| **infection_date** | **Time** | | [optional] | +| **infection_path** | **String** | | [optional] | +| **ip** | **String** | | [optional] | +| **location** | [**ApiExposedDataRecordBotLocationV1**](ApiExposedDataRecordBotLocationV1.md) | | [optional] | +| **operating_system** | [**ApiExposedDataRecordBotOperatingSystemV1**](ApiExposedDataRecordBotOperatingSystemV1.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiExposedDataRecordBotV1.new( + bot_id: null, + domain_detects: null, + infection_build_id: null, + infection_date: null, + infection_path: null, + ip: null, + location: null, + operating_system: null +) +``` + diff --git a/docs/ApiExposedDataRecordFinancialV1.md b/docs/ApiExposedDataRecordFinancialV1.md index 38431175..52548c08 100644 --- a/docs/ApiExposedDataRecordFinancialV1.md +++ b/docs/ApiExposedDataRecordFinancialV1.md @@ -4,9 +4,9 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **bank_account** | **String** | | [optional] | -| **credit_card** | **String** | | [optional] | -| **crypto_currency_addresses** | **Array<String>** | | [optional] | +| **bank_account** | **String** | Bank Account information | [optional] | +| **credit_card** | **String** | Credit Card information | [optional] | +| **crypto_currency_addresses** | **Array<String>** | A list of Crypto Currency addresses | [optional] | ## Example diff --git a/docs/ApiExposedDataRecordLocationV1.md b/docs/ApiExposedDataRecordLocationV1.md index 0acc6dd2..6ffde2f8 100644 --- a/docs/ApiExposedDataRecordLocationV1.md +++ b/docs/ApiExposedDataRecordLocationV1.md @@ -4,12 +4,12 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **city** | **String** | | [optional] | -| **country_code** | **String** | | [optional] | -| **federal_admin_region** | **String** | | [optional] | -| **federal_district** | **String** | | [optional] | -| **postal_code** | **String** | | [optional] | -| **state** | **String** | | [optional] | +| **city** | **String** | City name | [optional] | +| **country_code** | **String** | The country code | [optional] | +| **federal_admin_region** | **String** | Federal Administrative Region | [optional] | +| **federal_district** | **String** | Federal District | [optional] | +| **postal_code** | **String** | The postal code | [optional] | +| **state** | **String** | State name | [optional] | ## Example diff --git a/docs/ApiExposedDataRecordSocialV1.md b/docs/ApiExposedDataRecordSocialV1.md index a3e736d5..2b2b75ee 100644 --- a/docs/ApiExposedDataRecordSocialV1.md +++ b/docs/ApiExposedDataRecordSocialV1.md @@ -4,15 +4,15 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **aim_id** | **String** | | [optional] | -| **facebook_id** | **String** | | [optional] | -| **icq_id** | **String** | | [optional] | -| **instagram_id** | **String** | | [optional] | -| **msn_id** | **String** | | [optional] | -| **skype_id** | **String** | | [optional] | -| **twitter_id** | **String** | | [optional] | -| **vk_id** | **String** | | [optional] | -| **vk_token** | **String** | | [optional] | +| **aim_id** | **String** | AIM ID of the affected user | [optional] | +| **facebook_id** | **String** | Facebook ID of the affected user | [optional] | +| **icq_id** | **String** | ICQ ID of the affected user | [optional] | +| **instagram_id** | **String** | Instagram ID of the affected user | [optional] | +| **msn_id** | **String** | MSN ID of the affected user | [optional] | +| **skype_id** | **String** | Skype ID of the affected user | [optional] | +| **twitter_id** | **String** | Twitter ID of the affected user | [optional] | +| **vk_id** | **String** | VK ID of the affected user | [optional] | +| **vk_token** | **String** | VK Access Token of the affected user | [optional] | ## Example diff --git a/docs/ApiMetaInfo.md b/docs/ApiMetaInfo.md new file mode 100644 index 00000000..4dd0fc5b --- /dev/null +++ b/docs/ApiMetaInfo.md @@ -0,0 +1,24 @@ +# Falcon::ApiMetaInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **pagination** | [**ApiResponsePagination**](ApiResponsePagination.md) | | [optional] | +| **powered_by** | **String** | The alias of the service which handled the request | [optional] | +| **query_time** | **Float** | The duration (in seconds) that the service took to handle the request | | +| **trace_id** | **String** | Identifier used to debug the request | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiMetaInfo.new( + pagination: null, + powered_by: null, + query_time: null, + trace_id: null +) +``` + diff --git a/docs/ApiNotificationExposedDataRecordV1.md b/docs/ApiNotificationExposedDataRecordV1.md index b7a12d0f..01f3470b 100644 --- a/docs/ApiNotificationExposedDataRecordV1.md +++ b/docs/ApiNotificationExposedDataRecordV1.md @@ -6,9 +6,11 @@ | ---- | ---- | ----------- | ----- | | **author** | **String** | The individual or group who exposed the data | | | **author_id** | **String** | The ID of the author within Recon | [optional] | +| **bot** | [**ApiExposedDataRecordBotV1**](ApiExposedDataRecordBotV1.md) | | [optional] | | **cid** | **String** | The customer ID | | | **company** | **String** | The company of the user | [optional] | | **created_date** | **Time** | The date when this entity was created in Recon | | +| **credential_status** | **String** | The status set after deduplication. Possible values: 'newly_detected', 'previously_reported', 'other' | [optional] | | **credentials_domain** | **String** | The domain where the credentials are valid | [optional] | | **credentials_ip** | **String** | The IP where the credentials are valid | [optional] | | **credentials_url** | **String** | The URL where the credentials are valid | [optional] | @@ -25,6 +27,7 @@ | **job_position** | **String** | The users job at the company | [optional] | | **location** | [**ApiExposedDataRecordLocationV1**](ApiExposedDataRecordLocationV1.md) | | [optional] | | **login_id** | **String** | | [optional] | +| **malware_family** | **String** | Information of the bot malware family | [optional] | | **notification_id** | **String** | The ID of the parent notification associated with this entity | | | **password** | **String** | The password used for login | [optional] | | **password_hash** | **String** | The password hash | [optional] | @@ -48,9 +51,11 @@ require 'crimson-falcon' instance = Falcon::ApiNotificationExposedDataRecordV1.new( author: null, author_id: null, + bot: null, cid: null, company: null, created_date: null, + credential_status: null, credentials_domain: null, credentials_ip: null, credentials_url: null, @@ -67,6 +72,7 @@ instance = Falcon::ApiNotificationExposedDataRecordV1.new( job_position: null, location: null, login_id: null, + malware_family: null, notification_id: null, password: null, password_hash: null, diff --git a/docs/ApiObjectMetadata.md b/docs/ApiObjectMetadata.md new file mode 100644 index 00000000..5ec7751d --- /dev/null +++ b/docs/ApiObjectMetadata.md @@ -0,0 +1,26 @@ +# Falcon::ApiObjectMetadata + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **collection_name** | **String** | | | +| **last_modified_time** | **Time** | | [optional] | +| **namespace** | **String** | | | +| **object_key** | **String** | | | +| **schema_version** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiObjectMetadata.new( + collection_name: null, + last_modified_time: null, + namespace: null, + object_key: null, + schema_version: null +) +``` + diff --git a/docs/ApiProcessesRanOnRespV1.md b/docs/ApiProcessesRanOnRespV1.md new file mode 100644 index 00000000..f2f491c6 --- /dev/null +++ b/docs/ApiProcessesRanOnRespV1.md @@ -0,0 +1,22 @@ +# Falcon::ApiProcessesRanOnRespV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**ApiDetectsQueryMeta**](ApiDetectsQueryMeta.md) | | [optional] | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiProcessesRanOnRespV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ApiAggregatesResponse.md b/docs/ApiResourceIDsResponse.md similarity index 66% rename from docs/ApiAggregatesResponse.md rename to docs/ApiResourceIDsResponse.md index c7688d98..98aed4ff 100644 --- a/docs/ApiAggregatesResponse.md +++ b/docs/ApiResourceIDsResponse.md @@ -1,4 +1,4 @@ -# Falcon::ApiAggregatesResponse +# Falcon::ApiResourceIDsResponse ## Properties @@ -6,14 +6,14 @@ | ---- | ---- | ----------- | ----- | | **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | | **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | -| **resources** | [**Array<MsaAggregationResult>**](MsaAggregationResult.md) | | | +| **resources** | **Array<String>** | | | ## Example ```ruby require 'crimson-falcon' -instance = Falcon::ApiAggregatesResponse.new( +instance = Falcon::ApiResourceIDsResponse.new( errors: null, meta: null, resources: null diff --git a/docs/ApiResponsePagination.md b/docs/ApiResponsePagination.md new file mode 100644 index 00000000..051a7df2 --- /dev/null +++ b/docs/ApiResponsePagination.md @@ -0,0 +1,20 @@ +# Falcon::ApiResponsePagination + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **offset** | **Object** | | [optional] | +| **total** | **Integer** | The total number of elements | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApiResponsePagination.new( + offset: null, + total: null +) +``` + diff --git a/docs/ApidomainDynamicExecuteSearchRequestV1.md b/docs/ApidomainDynamicExecuteSearchRequestV1.md new file mode 100644 index 00000000..5953c390 --- /dev/null +++ b/docs/ApidomainDynamicExecuteSearchRequestV1.md @@ -0,0 +1,26 @@ +# Falcon::ApidomainDynamicExecuteSearchRequestV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_end** | **String** | | [optional] | +| **repo_or_view** | **String** | | | +| **search_query** | **String** | | | +| **search_query_args** | **Object** | | | +| **start** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainDynamicExecuteSearchRequestV1.new( + _end: null, + repo_or_view: null, + search_query: null, + search_query_args: null, + start: null +) +``` + diff --git a/docs/ApidomainQueryResponseV1.md b/docs/ApidomainQueryResponseV1.md new file mode 100644 index 00000000..c50cde92 --- /dev/null +++ b/docs/ApidomainQueryResponseV1.md @@ -0,0 +1,28 @@ +# Falcon::ApidomainQueryResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **event_count** | **Integer** | | | +| **events** | **Array<Object>** | | | +| **fields** | [**Array<ClientField>**](ClientField.md) | | [optional] | +| **job_status** | [**ClientJobStatus**](ClientJobStatus.md) | | [optional] | +| **meta_data** | [**ClientQueryResultMetadata**](ClientQueryResultMetadata.md) | | [optional] | +| **schemas** | [**ClientQueryResponseSchemasV1**](ClientQueryResponseSchemasV1.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainQueryResponseV1.new( + event_count: null, + events: null, + fields: null, + job_status: null, + meta_data: null, + schemas: null +) +``` + diff --git a/docs/ApidomainQueryResponseWrapperV1.md b/docs/ApidomainQueryResponseWrapperV1.md new file mode 100644 index 00000000..9379aee7 --- /dev/null +++ b/docs/ApidomainQueryResponseWrapperV1.md @@ -0,0 +1,22 @@ +# Falcon::ApidomainQueryResponseWrapperV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ApidomainQueryResponseV1>**](ApidomainQueryResponseV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainQueryResponseWrapperV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ApidomainRepoViewListItemV1.md b/docs/ApidomainRepoViewListItemV1.md new file mode 100644 index 00000000..90fca5c1 --- /dev/null +++ b/docs/ApidomainRepoViewListItemV1.md @@ -0,0 +1,34 @@ +# Falcon::ApidomainRepoViewListItemV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **connections** | [**Array<ApidomainViewConnectionV1>**](ApidomainViewConnectionV1.md) | | [optional] | +| **description** | **String** | | | +| **display_name** | **String** | | | +| **has_test_data** | **Boolean** | | | +| **id** | **String** | | | +| **name** | **String** | | | +| **name_contracted** | **String** | | | +| **size** | **Integer** | | [optional] | +| **type_name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainRepoViewListItemV1.new( + connections: null, + description: null, + display_name: null, + has_test_data: null, + id: null, + name: null, + name_contracted: null, + size: null, + type_name: null +) +``` + diff --git a/docs/ApidomainRepoViewListItemWrapperV1.md b/docs/ApidomainRepoViewListItemWrapperV1.md new file mode 100644 index 00000000..2e20756e --- /dev/null +++ b/docs/ApidomainRepoViewListItemWrapperV1.md @@ -0,0 +1,22 @@ +# Falcon::ApidomainRepoViewListItemWrapperV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ApidomainRepoViewListItemV1>**](ApidomainRepoViewListItemV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainRepoViewListItemWrapperV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ApidomainRepositoryV1.md b/docs/ApidomainRepositoryV1.md new file mode 100644 index 00000000..83e141a4 --- /dev/null +++ b/docs/ApidomainRepositoryV1.md @@ -0,0 +1,26 @@ +# Falcon::ApidomainRepositoryV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **display_name** | **String** | | | +| **id** | **String** | | | +| **name** | **String** | | | +| **size** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainRepositoryV1.new( + description: null, + display_name: null, + id: null, + name: null, + size: null +) +``` + diff --git a/docs/ApidomainSavedSearchExecuteRequestV1.md b/docs/ApidomainSavedSearchExecuteRequestV1.md new file mode 100644 index 00000000..9998c642 --- /dev/null +++ b/docs/ApidomainSavedSearchExecuteRequestV1.md @@ -0,0 +1,38 @@ +# Falcon::ApidomainSavedSearchExecuteRequestV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_end** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **mode** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **parameters** | **Object** | | [optional] | +| **start** | **String** | | [optional] | +| **version** | **String** | | [optional] | +| **with_in** | [**ClientExtraIn**](ClientExtraIn.md) | | [optional] | +| **with_limit** | [**ClientExtraLimit**](ClientExtraLimit.md) | | [optional] | +| **with_renames** | [**Array<ClientExtraRename>**](ClientExtraRename.md) | | [optional] | +| **with_sort** | [**ClientExtraSort**](ClientExtraSort.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainSavedSearchExecuteRequestV1.new( + _end: null, + id: null, + mode: null, + name: null, + parameters: null, + start: null, + version: null, + with_in: null, + with_limit: null, + with_renames: null, + with_sort: null +) +``` + diff --git a/docs/ApidomainViewConnectionV1.md b/docs/ApidomainViewConnectionV1.md new file mode 100644 index 00000000..1b424ae3 --- /dev/null +++ b/docs/ApidomainViewConnectionV1.md @@ -0,0 +1,20 @@ +# Falcon::ApidomainViewConnectionV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | | | +| **repository** | [**ApidomainRepositoryV1**](ApidomainRepositoryV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ApidomainViewConnectionV1.new( + filter: null, + repository: null +) +``` + diff --git a/docs/PublicACL.md b/docs/ChangesACL.md similarity index 69% rename from docs/PublicACL.md rename to docs/ChangesACL.md index 5c48722a..5c507275 100644 --- a/docs/PublicACL.md +++ b/docs/ChangesACL.md @@ -1,10 +1,10 @@ -# Falcon::PublicACL +# Falcon::ChangesACL ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **acl_permission_change** | [**Array<PublicACLChange>**](PublicACLChange.md) | | [optional] | +| **acl_permission_change** | [**Array<ChangesACLChange>**](ChangesACLChange.md) | | [optional] | | **entity** | **String** | | [optional] | | **entity_id** | **String** | | [optional] | | **entity_name** | **String** | | [optional] | @@ -14,7 +14,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicACL.new( +instance = Falcon::ChangesACL.new( acl_permission_change: null, entity: null, entity_id: null, diff --git a/docs/PublicACLChange.md b/docs/ChangesACLChange.md similarity index 80% rename from docs/PublicACLChange.md rename to docs/ChangesACLChange.md index 2a6d2ea2..4104f803 100644 --- a/docs/PublicACLChange.md +++ b/docs/ChangesACLChange.md @@ -1,4 +1,4 @@ -# Falcon::PublicACLChange +# Falcon::ChangesACLChange ## Properties @@ -12,7 +12,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicACLChange.new( +instance = Falcon::ChangesACLChange.new( operation: null, permissions: null ) diff --git a/docs/PublicAfter.md b/docs/ChangesAfter.md similarity index 80% rename from docs/PublicAfter.md rename to docs/ChangesAfter.md index 8bdbad92..3f57e645 100644 --- a/docs/PublicAfter.md +++ b/docs/ChangesAfter.md @@ -1,4 +1,4 @@ -# Falcon::PublicAfter +# Falcon::ChangesAfter ## Properties @@ -12,7 +12,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicAfter.new( +instance = Falcon::ChangesAfter.new( id: null, name: null ) diff --git a/docs/PublicAttribute.md b/docs/ChangesAttribute.md similarity index 78% rename from docs/PublicAttribute.md rename to docs/ChangesAttribute.md index 1572d36d..9e550c29 100644 --- a/docs/PublicAttribute.md +++ b/docs/ChangesAttribute.md @@ -1,4 +1,4 @@ -# Falcon::PublicAttribute +# Falcon::ChangesAttribute ## Properties @@ -12,7 +12,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicAttribute.new( +instance = Falcon::ChangesAttribute.new( attribute: null, change: null ) diff --git a/docs/PublicBasic.md b/docs/ChangesBasic.md similarity index 85% rename from docs/PublicBasic.md rename to docs/ChangesBasic.md index 37efa53a..635f88de 100644 --- a/docs/PublicBasic.md +++ b/docs/ChangesBasic.md @@ -1,4 +1,4 @@ -# Falcon::PublicBasic +# Falcon::ChangesBasic ## Properties @@ -13,7 +13,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicBasic.new( +instance = Falcon::ChangesBasic.new( entity: null, operation: null, permissions: null diff --git a/docs/PublicBefore.md b/docs/ChangesBefore.md similarity index 80% rename from docs/PublicBefore.md rename to docs/ChangesBefore.md index ed25a548..ad51f688 100644 --- a/docs/PublicBefore.md +++ b/docs/ChangesBefore.md @@ -1,4 +1,4 @@ -# Falcon::PublicBefore +# Falcon::ChangesBefore ## Properties @@ -12,7 +12,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicBefore.new( +instance = Falcon::ChangesBefore.new( id: null, name: null ) diff --git a/docs/PublicChange.md b/docs/ChangesChange.md similarity index 73% rename from docs/PublicChange.md rename to docs/ChangesChange.md index 6c4f1e53..696642ff 100644 --- a/docs/PublicChange.md +++ b/docs/ChangesChange.md @@ -1,4 +1,4 @@ -# Falcon::PublicChange +# Falcon::ChangesChange ## Properties @@ -7,31 +7,31 @@ | **action_timestamp** | **String** | | | | **action_type** | **String** | Possible values: UNKNOWN, CREATE, WRITE, DELETE, SET, RENAME. | | | **aid** | **String** | | | -| **attributes** | [**Array<PublicAttribute>**](PublicAttribute.md) | | [optional] | +| **attributes** | [**Array<ChangesAttribute>**](ChangesAttribute.md) | | [optional] | | **cid** | **String** | | | | **command_line** | **String** | | | -| **diff** | [**PublicDiff**](PublicDiff.md) | | [optional] | +| **diff** | [**ChangesDiff**](ChangesDiff.md) | | [optional] | | **entity_path** | **String** | | | | **entity_path_new** | **String** | | [optional] | | **entity_type** | **String** | Possible values: UNKNOWN, FILE, DIR, REGKEY, REGVAL. | | | **grandparent_process_image_file_name** | **String** | | [optional] | -| **host** | [**PublicHost**](PublicHost.md) | | [optional] | +| **host** | [**ChangesHost**](ChangesHost.md) | | [optional] | | **id** | **String** | | | | **ingestion_timestamp** | **String** | | | | **is_from_different_mount_namespace** | **Boolean** | | [optional] | | **is_suppressed** | **Boolean** | | | | **oci_container_id** | **String** | | [optional] | | **parent_process_image_file_name** | **String** | | [optional] | -| **permissions** | [**PublicPermissions**](PublicPermissions.md) | | [optional] | -| **permissions_lin** | [**PublicPermissionsLin**](PublicPermissionsLin.md) | | [optional] | +| **permissions** | [**ChangesPermissions**](ChangesPermissions.md) | | [optional] | +| **permissions_lin** | [**ChangesPermissionsLin**](ChangesPermissionsLin.md) | | [optional] | | **platform_name** | **String** | | | -| **policy** | [**PublicPolicy**](PublicPolicy.md) | | [optional] | -| **prevalence** | [**PublicPrevalence**](PublicPrevalence.md) | | [optional] | +| **policy** | [**ChangesPolicy**](ChangesPolicy.md) | | [optional] | +| **prevalence** | [**ChangesPrevalence**](ChangesPrevalence.md) | | [optional] | | **process_id** | **String** | | | | **process_image_file_name** | **String** | | | | **real_user_id** | **String** | | [optional] | | **severity** | **String** | Possible values: UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL | | -| **tags** | [**Array<PublicTag>**](PublicTag.md) | | [optional] | +| **tags** | [**Array<ChangesTag>**](ChangesTag.md) | | [optional] | | **user_id** | **String** | | | | **user_name** | **String** | | | @@ -40,7 +40,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicChange.new( +instance = Falcon::ChangesChange.new( action_timestamp: null, action_type: null, aid: null, diff --git a/docs/PublicDACL.md b/docs/ChangesDACL.md similarity index 65% rename from docs/PublicDACL.md rename to docs/ChangesDACL.md index 2a4efa7f..91a2b4f5 100644 --- a/docs/PublicDACL.md +++ b/docs/ChangesDACL.md @@ -1,18 +1,18 @@ -# Falcon::PublicDACL +# Falcon::ChangesDACL ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **changes_type** | **Integer** | Possible values: 0 - MODIFIED, 1 - NULL, 2 - EMPTY, 3 - SAME | [optional] | -| **entity_list** | [**Array<PublicDACLEntity>**](PublicDACLEntity.md) | | [optional] | +| **entity_list** | [**Array<ChangesDACLEntity>**](ChangesDACLEntity.md) | | [optional] | ## Example ```ruby require 'crimson-falcon' -instance = Falcon::PublicDACL.new( +instance = Falcon::ChangesDACL.new( changes_type: null, entity_list: null ) diff --git a/docs/PublicDACLEntity.md b/docs/ChangesDACLEntity.md similarity index 63% rename from docs/PublicDACLEntity.md rename to docs/ChangesDACLEntity.md index 37200f8d..62d868da 100644 --- a/docs/PublicDACLEntity.md +++ b/docs/ChangesDACLEntity.md @@ -1,12 +1,13 @@ -# Falcon::PublicDACLEntity +# Falcon::ChangesDACLEntity ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **acl_change_type** | **Integer** | | [optional] | -| **acl_permission_change** | [**Array<PublicAttribute>**](PublicAttribute.md) | | | +| **acl_permission_change** | [**Array<ChangesAttribute>**](ChangesAttribute.md) | | | | **acl_principal** | **String** | | | +| **acl_principal_id** | **String** | | | | **acl_type** | **Integer** | Possible values: 0 - ALLOW, 1 - DENY | | ## Example @@ -14,10 +15,11 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicDACLEntity.new( +instance = Falcon::ChangesDACLEntity.new( acl_change_type: null, acl_permission_change: null, acl_principal: null, + acl_principal_id: null, acl_type: null ) ``` diff --git a/docs/PublicDiff.md b/docs/ChangesDiff.md similarity index 54% rename from docs/PublicDiff.md rename to docs/ChangesDiff.md index 46c37104..3dc41f78 100644 --- a/docs/PublicDiff.md +++ b/docs/ChangesDiff.md @@ -1,17 +1,17 @@ -# Falcon::PublicDiff +# Falcon::ChangesDiff ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **after** | [**PublicDiffType**](PublicDiffType.md) | | [optional] | +| **after** | [**ChangesDiffType**](ChangesDiffType.md) | | [optional] | ## Example ```ruby require 'crimson-falcon' -instance = Falcon::PublicDiff.new( +instance = Falcon::ChangesDiff.new( after: null ) ``` diff --git a/docs/PublicDiffHash.md b/docs/ChangesDiffHash.md similarity index 75% rename from docs/PublicDiffHash.md rename to docs/ChangesDiffHash.md index e2ed12ba..31e37dab 100644 --- a/docs/PublicDiffHash.md +++ b/docs/ChangesDiffHash.md @@ -1,4 +1,4 @@ -# Falcon::PublicDiffHash +# Falcon::ChangesDiffHash ## Properties @@ -11,7 +11,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicDiffHash.new( +instance = Falcon::ChangesDiffHash.new( sha256: null ) ``` diff --git a/docs/PublicDiffType.md b/docs/ChangesDiffType.md similarity index 53% rename from docs/PublicDiffType.md rename to docs/ChangesDiffType.md index 52283220..11277385 100644 --- a/docs/PublicDiffType.md +++ b/docs/ChangesDiffType.md @@ -1,17 +1,17 @@ -# Falcon::PublicDiffType +# Falcon::ChangesDiffType ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **hash** | [**PublicDiffHash**](PublicDiffHash.md) | | [optional] | +| **hash** | [**ChangesDiffHash**](ChangesDiffHash.md) | | [optional] | ## Example ```ruby require 'crimson-falcon' -instance = Falcon::PublicDiffType.new( +instance = Falcon::ChangesDiffType.new( hash: null ) ``` diff --git a/docs/ChangesGetChangesResponse.md b/docs/ChangesGetChangesResponse.md new file mode 100644 index 00000000..2f6ea2c9 --- /dev/null +++ b/docs/ChangesGetChangesResponse.md @@ -0,0 +1,22 @@ +# Falcon::ChangesGetChangesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ChangesChange>**](ChangesChange.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ChangesGetChangesResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ChangesGroup.md b/docs/ChangesGroup.md new file mode 100644 index 00000000..6f7fcbb2 --- /dev/null +++ b/docs/ChangesGroup.md @@ -0,0 +1,20 @@ +# Falcon::ChangesGroup + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | [**ChangesAfter**](ChangesAfter.md) | | [optional] | +| **before** | [**ChangesBefore**](ChangesBefore.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ChangesGroup.new( + after: null, + before: null +) +``` + diff --git a/docs/ChangesHighVolumeQueryMeta.md b/docs/ChangesHighVolumeQueryMeta.md new file mode 100644 index 00000000..09d6679f --- /dev/null +++ b/docs/ChangesHighVolumeQueryMeta.md @@ -0,0 +1,24 @@ +# Falcon::ChangesHighVolumeQueryMeta + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **pagination** | [**ChangesHighVolumeQueryPaging**](ChangesHighVolumeQueryPaging.md) | | [optional] | +| **powered_by** | **String** | | [optional] | +| **query_time** | **Float** | | | +| **trace_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ChangesHighVolumeQueryMeta.new( + pagination: null, + powered_by: null, + query_time: null, + trace_id: null +) +``` + diff --git a/docs/ChangesHighVolumeQueryPaging.md b/docs/ChangesHighVolumeQueryPaging.md new file mode 100644 index 00000000..b727e9bf --- /dev/null +++ b/docs/ChangesHighVolumeQueryPaging.md @@ -0,0 +1,22 @@ +# Falcon::ChangesHighVolumeQueryPaging + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | **String** | | | +| **limit** | **Integer** | | | +| **total** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ChangesHighVolumeQueryPaging.new( + after: null, + limit: null, + total: null +) +``` + diff --git a/docs/ChangesHighVolumeQueryResponse.md b/docs/ChangesHighVolumeQueryResponse.md new file mode 100644 index 00000000..aa6f84fc --- /dev/null +++ b/docs/ChangesHighVolumeQueryResponse.md @@ -0,0 +1,22 @@ +# Falcon::ChangesHighVolumeQueryResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**ChangesHighVolumeQueryMeta**](ChangesHighVolumeQueryMeta.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ChangesHighVolumeQueryResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PublicHost.md b/docs/ChangesHost.md similarity index 79% rename from docs/PublicHost.md rename to docs/ChangesHost.md index 1ff5541e..7e4c1eec 100644 --- a/docs/PublicHost.md +++ b/docs/ChangesHost.md @@ -1,4 +1,4 @@ -# Falcon::PublicHost +# Falcon::ChangesHost ## Properties @@ -7,7 +7,7 @@ | **agent_version** | **String** | | [optional] | | **containment_status** | **String** | | [optional] | | **external_ip** | **String** | | [optional] | -| **groups** | [**Array<PublicHostGroup>**](PublicHostGroup.md) | | [optional] | +| **groups** | [**Array<ChangesHostGroup>**](ChangesHostGroup.md) | | [optional] | | **local_ip** | **String** | | [optional] | | **name** | **String** | | [optional] | | **os_version** | **String** | | [optional] | @@ -17,7 +17,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicHost.new( +instance = Falcon::ChangesHost.new( agent_version: null, containment_status: null, external_ip: null, diff --git a/docs/PublicHostGroup.md b/docs/ChangesHostGroup.md similarity index 74% rename from docs/PublicHostGroup.md rename to docs/ChangesHostGroup.md index 915fc0fd..8e5d00f8 100644 --- a/docs/PublicHostGroup.md +++ b/docs/ChangesHostGroup.md @@ -1,4 +1,4 @@ -# Falcon::PublicHostGroup +# Falcon::ChangesHostGroup ## Properties @@ -11,7 +11,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicHostGroup.new( +instance = Falcon::ChangesHostGroup.new( name: null ) ``` diff --git a/docs/ChangesOwner.md b/docs/ChangesOwner.md new file mode 100644 index 00000000..6784c8bb --- /dev/null +++ b/docs/ChangesOwner.md @@ -0,0 +1,20 @@ +# Falcon::ChangesOwner + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | [**ChangesAfter**](ChangesAfter.md) | | [optional] | +| **before** | [**ChangesBefore**](ChangesBefore.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ChangesOwner.new( + after: null, + before: null +) +``` + diff --git a/docs/PublicPermissions.md b/docs/ChangesPermissions.md similarity index 54% rename from docs/PublicPermissions.md rename to docs/ChangesPermissions.md index 00720ee3..6230f0ba 100644 --- a/docs/PublicPermissions.md +++ b/docs/ChangesPermissions.md @@ -1,12 +1,12 @@ -# Falcon::PublicPermissions +# Falcon::ChangesPermissions ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **dacl** | [**PublicDACL**](PublicDACL.md) | | [optional] | -| **group** | [**PublicGroup**](PublicGroup.md) | | [optional] | -| **owner** | [**PublicOwner**](PublicOwner.md) | | [optional] | +| **dacl** | [**ChangesDACL**](ChangesDACL.md) | | [optional] | +| **group** | [**ChangesGroup**](ChangesGroup.md) | | [optional] | +| **owner** | [**ChangesOwner**](ChangesOwner.md) | | [optional] | | **security_info** | **Integer** | Possible values: 0 - OWNER, 1 - GROUP, 2 - DACL, 3 - SACL | [optional] | ## Example @@ -14,7 +14,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicPermissions.new( +instance = Falcon::ChangesPermissions.new( dacl: null, group: null, owner: null, diff --git a/docs/ChangesPermissionsLin.md b/docs/ChangesPermissionsLin.md new file mode 100644 index 00000000..f8bb62fa --- /dev/null +++ b/docs/ChangesPermissionsLin.md @@ -0,0 +1,28 @@ +# Falcon::ChangesPermissionsLin + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **acl** | [**Array<ChangesACL>**](ChangesACL.md) | | [optional] | +| **basic** | [**Array<ChangesBasic>**](ChangesBasic.md) | | [optional] | +| **default_acl** | [**Array<ChangesACL>**](ChangesACL.md) | | [optional] | +| **group** | [**ChangesGroup**](ChangesGroup.md) | | [optional] | +| **owner** | [**ChangesOwner**](ChangesOwner.md) | | [optional] | +| **security_info** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ChangesPermissionsLin.new( + acl: null, + basic: null, + default_acl: null, + group: null, + owner: null, + security_info: null +) +``` + diff --git a/docs/PublicPolicy.md b/docs/ChangesPolicy.md similarity index 58% rename from docs/PublicPolicy.md rename to docs/ChangesPolicy.md index 188b371a..62637ca9 100644 --- a/docs/PublicPolicy.md +++ b/docs/ChangesPolicy.md @@ -1,18 +1,18 @@ -# Falcon::PublicPolicy +# Falcon::ChangesPolicy ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **name** | **String** | | [optional] | -| **rule_group** | [**PublicPolicyRuleGroup**](PublicPolicyRuleGroup.md) | | [optional] | +| **rule_group** | [**ChangesPolicyRuleGroup**](ChangesPolicyRuleGroup.md) | | [optional] | ## Example ```ruby require 'crimson-falcon' -instance = Falcon::PublicPolicy.new( +instance = Falcon::ChangesPolicy.new( name: null, rule_group: null ) diff --git a/docs/PublicPolicyRule.md b/docs/ChangesPolicyRule.md similarity index 75% rename from docs/PublicPolicyRule.md rename to docs/ChangesPolicyRule.md index 5d42f16d..57218bf4 100644 --- a/docs/PublicPolicyRule.md +++ b/docs/ChangesPolicyRule.md @@ -1,4 +1,4 @@ -# Falcon::PublicPolicyRule +# Falcon::ChangesPolicyRule ## Properties @@ -11,7 +11,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicPolicyRule.new( +instance = Falcon::ChangesPolicyRule.new( base_path: null ) ``` diff --git a/docs/PublicPolicyRuleGroup.md b/docs/ChangesPolicyRuleGroup.md similarity index 57% rename from docs/PublicPolicyRuleGroup.md rename to docs/ChangesPolicyRuleGroup.md index f6072b5c..18e142ca 100644 --- a/docs/PublicPolicyRuleGroup.md +++ b/docs/ChangesPolicyRuleGroup.md @@ -1,18 +1,18 @@ -# Falcon::PublicPolicyRuleGroup +# Falcon::ChangesPolicyRuleGroup ## Properties | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **name** | **String** | | [optional] | -| **rule** | [**PublicPolicyRule**](PublicPolicyRule.md) | | [optional] | +| **rule** | [**ChangesPolicyRule**](ChangesPolicyRule.md) | | [optional] | ## Example ```ruby require 'crimson-falcon' -instance = Falcon::PublicPolicyRuleGroup.new( +instance = Falcon::ChangesPolicyRuleGroup.new( name: null, rule: null ) diff --git a/docs/PublicPrevalence.md b/docs/ChangesPrevalence.md similarity index 86% rename from docs/PublicPrevalence.md rename to docs/ChangesPrevalence.md index 4015f64e..cf363c67 100644 --- a/docs/PublicPrevalence.md +++ b/docs/ChangesPrevalence.md @@ -1,4 +1,4 @@ -# Falcon::PublicPrevalence +# Falcon::ChangesPrevalence ## Properties @@ -14,7 +14,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicPrevalence.new( +instance = Falcon::ChangesPrevalence.new( computed_timestamp: null, current: null, key: null, diff --git a/docs/PublicTag.md b/docs/ChangesTag.md similarity index 78% rename from docs/PublicTag.md rename to docs/ChangesTag.md index 83a6efcd..9591726c 100644 --- a/docs/PublicTag.md +++ b/docs/ChangesTag.md @@ -1,4 +1,4 @@ -# Falcon::PublicTag +# Falcon::ChangesTag ## Properties @@ -11,7 +11,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::PublicTag.new( +instance = Falcon::ChangesTag.new( name: null ) ``` diff --git a/docs/ClientActionRequest.md b/docs/ClientActionRequest.md new file mode 100644 index 00000000..213aca4b --- /dev/null +++ b/docs/ClientActionRequest.md @@ -0,0 +1,18 @@ +# Falcon::ClientActionRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | **Array<String>** | Execution IDs to perform an action | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientActionRequest.new( + ids: null +) +``` + diff --git a/docs/ClientCost.md b/docs/ClientCost.md new file mode 100644 index 00000000..77bf35ab --- /dev/null +++ b/docs/ClientCost.md @@ -0,0 +1,22 @@ +# Falcon::ClientCost + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **live_cost** | **Integer** | | | +| **query_count** | **Integer** | | | +| **static_cost** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientCost.new( + live_cost: null, + query_count: null, + static_cost: null +) +``` + diff --git a/docs/ClientCosts.md b/docs/ClientCosts.md new file mode 100644 index 00000000..134b2586 --- /dev/null +++ b/docs/ClientCosts.md @@ -0,0 +1,24 @@ +# Falcon::ClientCosts + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **live_cost** | **Float** | | | +| **live_cost_rate** | **Float** | | | +| **static_cost** | **Float** | | | +| **static_cost_rate** | **Float** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientCosts.new( + live_cost: null, + live_cost_rate: null, + static_cost: null, + static_cost_rate: null +) +``` + diff --git a/docs/ClientDataIngestResponseV1.md b/docs/ClientDataIngestResponseV1.md new file mode 100644 index 00000000..15a2a932 --- /dev/null +++ b/docs/ClientDataIngestResponseV1.md @@ -0,0 +1,20 @@ +# Falcon::ClientDataIngestResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **repo** | [**ClientRepository**](ClientRepository.md) | | | +| **rows_written** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientDataIngestResponseV1.new( + repo: null, + rows_written: null +) +``` + diff --git a/docs/ClientDataIngestResponseWrapperV1.md b/docs/ClientDataIngestResponseWrapperV1.md new file mode 100644 index 00000000..8a4ff107 --- /dev/null +++ b/docs/ClientDataIngestResponseWrapperV1.md @@ -0,0 +1,22 @@ +# Falcon::ClientDataIngestResponseWrapperV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ClientDataIngestResponseV1>**](ClientDataIngestResponseV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientDataIngestResponseWrapperV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ClientDigestFlow.md b/docs/ClientDigestFlow.md new file mode 100644 index 00000000..b78400e9 --- /dev/null +++ b/docs/ClientDigestFlow.md @@ -0,0 +1,22 @@ +# Falcon::ClientDigestFlow + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ingest_time_known_good** | **Integer** | | | +| **max_ingest_latency** | **Integer** | | | +| **min_ingest_time_included** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientDigestFlow.new( + ingest_time_known_good: null, + max_ingest_latency: null, + min_ingest_time_included: null +) +``` + diff --git a/docs/ClientExtraIn.md b/docs/ClientExtraIn.md new file mode 100644 index 00000000..c6173a65 --- /dev/null +++ b/docs/ClientExtraIn.md @@ -0,0 +1,20 @@ +# Falcon::ClientExtraIn + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **field** | **String** | | | +| **values** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientExtraIn.new( + field: null, + values: null +) +``` + diff --git a/docs/ClientExtraLimit.md b/docs/ClientExtraLimit.md new file mode 100644 index 00000000..32ef2e89 --- /dev/null +++ b/docs/ClientExtraLimit.md @@ -0,0 +1,20 @@ +# Falcon::ClientExtraLimit + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **from** | **String** | | | +| **limit** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientExtraLimit.new( + from: null, + limit: null +) +``` + diff --git a/docs/ClientExtraRename.md b/docs/ClientExtraRename.md new file mode 100644 index 00000000..c396a727 --- /dev/null +++ b/docs/ClientExtraRename.md @@ -0,0 +1,20 @@ +# Falcon::ClientExtraRename + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **as** | **String** | | | +| **field** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientExtraRename.new( + as: null, + field: null +) +``` + diff --git a/docs/ClientExtraSort.md b/docs/ClientExtraSort.md new file mode 100644 index 00000000..ae8f84a2 --- /dev/null +++ b/docs/ClientExtraSort.md @@ -0,0 +1,26 @@ +# Falcon::ClientExtraSort + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **fields** | **Array<String>** | | [optional] | +| **limit** | **Integer** | | [optional] | +| **order** | **Array<String>** | | [optional] | +| **reverse** | **Boolean** | | [optional] | +| **type** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientExtraSort.new( + fields: null, + limit: null, + order: null, + reverse: null, + type: null +) +``` + diff --git a/docs/ClientField.md b/docs/ClientField.md new file mode 100644 index 00000000..ceec4293 --- /dev/null +++ b/docs/ClientField.md @@ -0,0 +1,22 @@ +# Falcon::ClientField + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | +| **name** | **String** | | | +| **top_values** | [**Array<ClientTopValue>**](ClientTopValue.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientField.new( + count: null, + name: null, + top_values: null +) +``` + diff --git a/docs/ClientJobStatus.md b/docs/ClientJobStatus.md new file mode 100644 index 00000000..339f8c7a --- /dev/null +++ b/docs/ClientJobStatus.md @@ -0,0 +1,40 @@ +# Falcon::ClientJobStatus + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **content_length** | **Integer** | | [optional] | +| **digest_algo** | **String** | | [optional] | +| **digest_hex** | **String** | | [optional] | +| **event_count** | **Integer** | | [optional] | +| **file_link** | **String** | | [optional] | +| **job_id** | **String** | | | +| **job_url** | **String** | | [optional] | +| **message** | **String** | | [optional] | +| **percent_complete** | **Integer** | | [optional] | +| **result_count** | **Integer** | | [optional] | +| **run_duration** | **Float** | | [optional] | +| **status** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientJobStatus.new( + content_length: null, + digest_algo: null, + digest_hex: null, + event_count: null, + file_link: null, + job_id: null, + job_url: null, + message: null, + percent_complete: null, + result_count: null, + run_duration: null, + status: null +) +``` + diff --git a/docs/ClientQueryResponseSchemasV1.md b/docs/ClientQueryResponseSchemasV1.md new file mode 100644 index 00000000..271003f1 --- /dev/null +++ b/docs/ClientQueryResponseSchemasV1.md @@ -0,0 +1,20 @@ +# Falcon::ClientQueryResponseSchemasV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **request_schema** | **String** | | [optional] | +| **response_schema** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientQueryResponseSchemasV1.new( + request_schema: null, + response_schema: null +) +``` + diff --git a/docs/ClientQueryResultMetadata.md b/docs/ClientQueryResultMetadata.md new file mode 100644 index 00000000..0e283fc0 --- /dev/null +++ b/docs/ClientQueryResultMetadata.md @@ -0,0 +1,54 @@ +# Falcon::ClientQueryResultMetadata + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **costs** | [**ClientCosts**](ClientCosts.md) | | | +| **digest_flow** | [**ClientDigestFlow**](ClientDigestFlow.md) | | | +| **event_count** | **Integer** | | | +| **extra_data** | **Object** | | | +| **field_order** | **Array<String>** | | | +| **is_aggregate** | **Boolean** | | | +| **poll_after** | **Integer** | | | +| **processed_bytes** | **Integer** | | | +| **processed_events** | **Integer** | | | +| **query_end** | **Integer** | | | +| **query_spent** | [**ClientSpent**](ClientSpent.md) | | | +| **query_start** | **Integer** | | | +| **quota_total_spent** | [**ClientSpent**](ClientSpent.md) | | | +| **responder_v_host** | **Integer** | | | +| **result_buffer_size** | **Integer** | | | +| **time_millis** | **Integer** | | | +| **total_work** | **Integer** | | | +| **warnings** | **Array<Object>** | | | +| **work_done** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientQueryResultMetadata.new( + costs: null, + digest_flow: null, + event_count: null, + extra_data: null, + field_order: null, + is_aggregate: null, + poll_after: null, + processed_bytes: null, + processed_events: null, + query_end: null, + query_spent: null, + query_start: null, + quota_total_spent: null, + responder_v_host: null, + result_buffer_size: null, + time_millis: null, + total_work: null, + warnings: null, + work_done: null +) +``` + diff --git a/docs/ClientRepository.md b/docs/ClientRepository.md new file mode 100644 index 00000000..f1749ed5 --- /dev/null +++ b/docs/ClientRepository.md @@ -0,0 +1,24 @@ +# Falcon::ClientRepository + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **id** | **String** | | | +| **name** | **String** | | | +| **space_used** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientRepository.new( + description: null, + id: null, + name: null, + space_used: null +) +``` + diff --git a/docs/ClientSpent.md b/docs/ClientSpent.md new file mode 100644 index 00000000..8d21f613 --- /dev/null +++ b/docs/ClientSpent.md @@ -0,0 +1,24 @@ +# Falcon::ClientSpent + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **day** | [**ClientCost**](ClientCost.md) | | | +| **hour** | [**ClientCost**](ClientCost.md) | | | +| **one_minute** | [**ClientCost**](ClientCost.md) | | | +| **ten_minutes** | [**ClientCost**](ClientCost.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientSpent.new( + day: null, + hour: null, + one_minute: null, + ten_minutes: null +) +``` + diff --git a/docs/ClientSystemDefinitionCreateResponse.md b/docs/ClientSystemDefinitionCreateResponse.md new file mode 100644 index 00000000..cf4e332f --- /dev/null +++ b/docs/ClientSystemDefinitionCreateResponse.md @@ -0,0 +1,22 @@ +# Falcon::ClientSystemDefinitionCreateResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientSystemDefinitionCreateResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ClientSystemDefinitionDeProvisionRequest.md b/docs/ClientSystemDefinitionDeProvisionRequest.md new file mode 100644 index 00000000..cc7f2220 --- /dev/null +++ b/docs/ClientSystemDefinitionDeProvisionRequest.md @@ -0,0 +1,24 @@ +# Falcon::ClientSystemDefinitionDeProvisionRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **definition_id** | **String** | Customer scoped definition ID that is being deprovisioned. This is required when the template is defined as multi-instance | | +| **deprovision_all** | **Boolean** | When enabled, the CustomerDefinitionID property is ignored and all template workflows are deprovisioned | | +| **template_id** | **String** | ID of the system definition template that is to be deprovisioned | | +| **template_name** | **String** | Name of the system definition template to deprovision | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientSystemDefinitionDeProvisionRequest.new( + definition_id: null, + deprovision_all: null, + template_id: null, + template_name: null +) +``` + diff --git a/docs/ClientSystemDefinitionPromoteRequest.md b/docs/ClientSystemDefinitionPromoteRequest.md new file mode 100644 index 00000000..baa579bb --- /dev/null +++ b/docs/ClientSystemDefinitionPromoteRequest.md @@ -0,0 +1,28 @@ +# Falcon::ClientSystemDefinitionPromoteRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **customer_definition_id** | **String** | Customer scoped definition ID that is being promoted. This is required when the template is defined as multi-instance | | +| **name** | **String** | Optional name to be set on the customer scope definition. Must be unique within a given CID. | | +| **parameters** | [**ParameterTemplateProvisionParameters**](ParameterTemplateProvisionParameters.md) | | | +| **template_id** | **String** | ID of the system definition template that was previously created | | +| **template_name** | **String** | Name of the system definition template to provision | | +| **template_version** | **String** | Version of system definition template that was previously created, if omitted the latest version will be used. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientSystemDefinitionPromoteRequest.new( + customer_definition_id: null, + name: null, + parameters: null, + template_id: null, + template_name: null, + template_version: null +) +``` + diff --git a/docs/ClientSystemDefinitionProvisionRequest.md b/docs/ClientSystemDefinitionProvisionRequest.md new file mode 100644 index 00000000..fd096125 --- /dev/null +++ b/docs/ClientSystemDefinitionProvisionRequest.md @@ -0,0 +1,26 @@ +# Falcon::ClientSystemDefinitionProvisionRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | Optional name to be set on the customer scope definition. Must be unique within a given CID. | | +| **parameters** | [**ParameterTemplateProvisionParameters**](ParameterTemplateProvisionParameters.md) | | | +| **template_id** | **String** | ID of the system definition template that was previously created | | +| **template_name** | **String** | Name of the system definition template to provision | | +| **template_version** | **String** | Version of system definition template that was previously created, if omitted the latest version will be used. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientSystemDefinitionProvisionRequest.new( + name: null, + parameters: null, + template_id: null, + template_name: null, + template_version: null +) +``` + diff --git a/docs/ClientTopValue.md b/docs/ClientTopValue.md new file mode 100644 index 00000000..e18ca0d0 --- /dev/null +++ b/docs/ClientTopValue.md @@ -0,0 +1,20 @@ +# Falcon::ClientTopValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | +| **value** | **Object** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ClientTopValue.new( + count: null, + value: null +) +``` + diff --git a/docs/CloudSnapshotsApi.md b/docs/CloudSnapshotsApi.md new file mode 100644 index 00000000..541997f8 --- /dev/null +++ b/docs/CloudSnapshotsApi.md @@ -0,0 +1,77 @@ +# Falcon::CloudSnapshotsApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**register_cspm_snapshot_account**](CloudSnapshotsApi.md#register_cspm_snapshot_account) | **POST** /snapshots/entities/accounts/v1 | Register customer cloud account for snapshot scanning | + + +## register_cspm_snapshot_account + +> register_cspm_snapshot_account(body) + +Register customer cloud account for snapshot 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::CloudSnapshotsApi.new +body = Falcon::ModelsAccountEntitiesInput.new({aws_accounts: [Falcon::DomainAWSAccountInput.new({account_number: 'account_number_example', batch_regions: [Falcon::DomainAWSBatchClusterRegion.new({job_definition_name: 'job_definition_name_example', job_queue: 'job_queue_example', region: 'region_example'})], iam_external_id: 'iam_external_id_example', iam_role_arn: 'iam_role_arn_example', kms_alias: 'kms_alias_example', processing_account: 'processing_account_example'})]}) # ModelsAccountEntitiesInput | + +begin + # Register customer cloud account for snapshot scanning + result = api_instance.register_cspm_snapshot_account(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CloudSnapshotsApi->register_cspm_snapshot_account: #{e}" +end +``` + +#### Using the register_cspm_snapshot_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> register_cspm_snapshot_account_with_http_info(body) + +```ruby +begin + # Register customer cloud account for snapshot scanning + data, status_code, headers = api_instance.register_cspm_snapshot_account_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CloudSnapshotsApi->register_cspm_snapshot_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ModelsAccountEntitiesInput**](ModelsAccountEntitiesInput.md) | | | + +### Return type + +[**ModelsAccountStatusResponse**](ModelsAccountStatusResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/CommonCountAsResource.md b/docs/CommonCountAsResource.md new file mode 100644 index 00000000..7f089ae1 --- /dev/null +++ b/docs/CommonCountAsResource.md @@ -0,0 +1,20 @@ +# Falcon::CommonCountAsResource + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | +| **label** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::CommonCountAsResource.new( + count: null, + label: null +) +``` + diff --git a/docs/CommonCountResponse.md b/docs/CommonCountResponse.md new file mode 100644 index 00000000..8a1fb2bd --- /dev/null +++ b/docs/CommonCountResponse.md @@ -0,0 +1,22 @@ +# Falcon::CommonCountResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<CommonCountAsResource>**](CommonCountAsResource.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::CommonCountResponse.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/CommonGenericEntityResponseString.md b/docs/CommonGenericEntityResponseString.md new file mode 100644 index 00000000..78885e6d --- /dev/null +++ b/docs/CommonGenericEntityResponseString.md @@ -0,0 +1,22 @@ +# Falcon::CommonGenericEntityResponseString + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::CommonGenericEntityResponseString.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ConfigurationAssessmentApi.md b/docs/ConfigurationAssessmentApi.md index c0af1f14..6a696857 100644 --- a/docs/ConfigurationAssessmentApi.md +++ b/docs/ConfigurationAssessmentApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**get_combined_assessments_query**](ConfigurationAssessmentApi.md#get_combined_assessments_query) | **GET** /configuration-assessment/combined/assessments/v1 | Search for assessments in your environment by providing an FQL filter and paging details. Returns a set of HostFinding entities which match the filter criteria | +| [**get_rule_details**](ConfigurationAssessmentApi.md#get_rule_details) | **GET** /configuration-assessment/entities/rule-details/v1 | Get rules details for provided one or more rule IDs | ## get_combined_assessments_query @@ -85,3 +86,72 @@ end - **Content-Type**: Not defined - **Accept**: application/json + +## get_rule_details + +> get_rule_details(ids) + +Get rules details for provided one or more rule 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::ConfigurationAssessmentApi.new +ids = ['inner_example'] # Array | One or more rules IDs (max: 400) + +begin + # Get rules details for provided one or more rule IDs + result = api_instance.get_rule_details(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling ConfigurationAssessmentApi->get_rule_details: #{e}" +end +``` + +#### Using the get_rule_details_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_rule_details_with_http_info(ids) + +```ruby +begin + # Get rules details for provided one or more rule IDs + data, status_code, headers = api_instance.get_rule_details_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ConfigurationAssessmentApi->get_rule_details_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | One or more rules IDs (max: 400) | | + +### Return type + +[**DomainAPIRuleDetailsResponseV1**](DomainAPIRuleDetailsResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ContainerAlertsApi.md b/docs/ContainerAlertsApi.md new file mode 100644 index 00000000..482fb916 --- /dev/null +++ b/docs/ContainerAlertsApi.md @@ -0,0 +1,229 @@ +# Falcon::ContainerAlertsApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**read_container_alerts_count**](ContainerAlertsApi.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**](ContainerAlertsApi.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**](ContainerAlertsApi.md#search_and_read_container_alerts) | **GET** /container-security/combined/container-alerts/v1 | Search Container Alerts by the provided search criteria | + + +## read_container_alerts_count + +> read_container_alerts_count(opts) + +Search Container Alerts by the provided search 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::ContainerAlertsApi.new +opts = { + filter: 'filter_example' # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen +} + +begin + # Search Container Alerts by the provided search criteria + result = api_instance.read_container_alerts_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerAlertsApi->read_container_alerts_count: #{e}" +end +``` + +#### Using the read_container_alerts_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_alerts_count_with_http_info(opts) + +```ruby +begin + # Search Container Alerts by the provided search criteria + data, status_code, headers = api_instance.read_container_alerts_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerAlertsApi->read_container_alerts_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**AlertsContainerAlertsCountValue**](AlertsContainerAlertsCountValue.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_alerts_count_by_severity + +> read_container_alerts_count_by_severity(opts) + +Get Container Alerts counts by severity + +### 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::ContainerAlertsApi.new +opts = { + filter: 'filter_example' # String | Search Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen +} + +begin + # Get Container Alerts counts by severity + result = api_instance.read_container_alerts_count_by_severity(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerAlertsApi->read_container_alerts_count_by_severity: #{e}" +end +``` + +#### Using the read_container_alerts_count_by_severity_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_alerts_count_by_severity_with_http_info(opts) + +```ruby +begin + # Get Container Alerts counts by severity + data, status_code, headers = api_instance.read_container_alerts_count_by_severity_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerAlertsApi->read_container_alerts_count_by_severity_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**AlertsContainerAlertsCountValue**](AlertsContainerAlertsCountValue.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## search_and_read_container_alerts + +> search_and_read_container_alerts(opts) + +Search Container Alerts by the provided search 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::ContainerAlertsApi.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 + 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 + result = api_instance.search_and_read_container_alerts(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerAlertsApi->search_and_read_container_alerts: #{e}" +end +``` + +#### Using the search_and_read_container_alerts_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_and_read_container_alerts_with_http_info(opts) + +```ruby +begin + # Search Container Alerts by the provided search criteria + data, status_code, headers = api_instance.search_and_read_container_alerts_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerAlertsApi->search_and_read_container_alerts_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | The fields to sort the records on. | [optional] | + +### Return type + +[**AlertsContainerAlertsEntityResponse**](AlertsContainerAlertsEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ContainerDetectionsApi.md b/docs/ContainerDetectionsApi.md new file mode 100644 index 00000000..6ac8c7a3 --- /dev/null +++ b/docs/ContainerDetectionsApi.md @@ -0,0 +1,453 @@ +# Falcon::ContainerDetectionsApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**read_combined_detections**](ContainerDetectionsApi.md#read_combined_detections) | **GET** /container-security/combined/detections/v1 | Retrieve image assessment detections identified by the provided filter criteria | +| [**read_detections**](ContainerDetectionsApi.md#read_detections) | **GET** /container-security/entities/detections/v1 | Retrieve image assessment detection entities identified by the provided filter criteria | +| [**read_detections_count**](ContainerDetectionsApi.md#read_detections_count) | **GET** /container-security/aggregates/detections/count/v1 | Aggregate count of detections | +| [**read_detections_count_by_severity**](ContainerDetectionsApi.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**](ContainerDetectionsApi.md#read_detections_count_by_type) | **GET** /container-security/aggregates/detections/count-by-type/v1 | Aggregate counts of detections by detection type | +| [**search_detections**](ContainerDetectionsApi.md#search_detections) | **GET** /container-security/queries/detections/v1 | Retrieve image assessment detection entities identified by the provided filter criteria | + + +## read_combined_detections + +> read_combined_detections(opts) + +Retrieve image assessment detections identified by the provided 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::ContainerDetectionsApi.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 + 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] +} + +begin + # Retrieve image assessment detections identified by the provided filter criteria + result = api_instance.read_combined_detections(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_combined_detections: #{e}" +end +``` + +#### Using the read_combined_detections_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_combined_detections_with_http_info(opts) + +```ruby +begin + # Retrieve image assessment detections identified by the provided filter criteria + data, status_code, headers = api_instance.read_combined_detections_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_combined_detections_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **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 + +[**DetectionsApiCombinedDetections**](DetectionsApiCombinedDetections.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_detections + +> read_detections(opts) + +Retrieve image assessment detection entities identified by the provided 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::ContainerDetectionsApi.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 + 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 + result = api_instance.read_detections(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections: #{e}" +end +``` + +#### Using the read_detections_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_detections_with_http_info(opts) + +```ruby +begin + # Retrieve image assessment detection entities identified by the provided filter criteria + data, status_code, headers = api_instance.read_detections_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**DetectionsApiAssessmentDetections**](DetectionsApiAssessmentDetections.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_detections_count + +> read_detections_count(opts) + +Aggregate count of detections + +### 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::ContainerDetectionsApi.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 +} + +begin + # Aggregate count of detections + result = api_instance.read_detections_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections_count: #{e}" +end +``` + +#### Using the read_detections_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_detections_count_with_http_info(opts) + +```ruby +begin + # Aggregate count of detections + data, status_code, headers = api_instance.read_detections_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**DetectionsApiDetectionsCount**](DetectionsApiDetectionsCount.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_detections_count_by_severity + +> read_detections_count_by_severity(opts) + +Aggregate counts of detections by severity + +### 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::ContainerDetectionsApi.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 +} + +begin + # Aggregate counts of detections by severity + result = api_instance.read_detections_count_by_severity(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections_count_by_severity: #{e}" +end +``` + +#### Using the read_detections_count_by_severity_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_detections_count_by_severity_with_http_info(opts) + +```ruby +begin + # Aggregate counts of detections by severity + data, status_code, headers = api_instance.read_detections_count_by_severity_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections_count_by_severity_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**DetectionsApiDetectionsBySeverity**](DetectionsApiDetectionsBySeverity.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_detections_count_by_type + +> read_detections_count_by_type(opts) + +Aggregate counts of detections by detection type + +### 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::ContainerDetectionsApi.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 +} + +begin + # Aggregate counts of detections by detection type + result = api_instance.read_detections_count_by_type(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections_count_by_type: #{e}" +end +``` + +#### Using the read_detections_count_by_type_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_detections_count_by_type_with_http_info(opts) + +```ruby +begin + # Aggregate counts of detections by detection type + data, status_code, headers = api_instance.read_detections_count_by_type_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->read_detections_count_by_type_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**DetectionsApiDetectionsByType**](DetectionsApiDetectionsByType.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## search_detections + +> search_detections(opts) + +Retrieve image assessment detection entities identified by the provided 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::ContainerDetectionsApi.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 + 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 + result = api_instance.search_detections(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->search_detections: #{e}" +end +``` + +#### Using the search_detections_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_detections_with_http_info(opts) + +```ruby +begin + # Retrieve image assessment detection entities identified by the provided filter criteria + data, status_code, headers = api_instance.search_detections_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerDetectionsApi->search_detections_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**CommonGenericEntityResponseString**](CommonGenericEntityResponseString.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ContainerImagesApi.md b/docs/ContainerImagesApi.md new file mode 100644 index 00000000..512e0f68 --- /dev/null +++ b/docs/ContainerImagesApi.md @@ -0,0 +1,763 @@ +# Falcon::ContainerImagesApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**aggregate_image_assessment_history**](ContainerImagesApi.md#aggregate_image_assessment_history) | **GET** /container-security/aggregates/images/assessment-history/v1 | Image assessment history | +| [**aggregate_image_count**](ContainerImagesApi.md#aggregate_image_count) | **GET** /container-security/aggregates/images/count/v1 | Aggregate count of images | +| [**aggregate_image_count_by_base_os**](ContainerImagesApi.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**](ContainerImagesApi.md#aggregate_image_count_by_state) | **GET** /container-security/aggregates/images/count-by-state/v1 | Aggregate count of images grouped by state | +| [**combined_image_by_vulnerability_count**](ContainerImagesApi.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**](ContainerImagesApi.md#combined_image_detail) | **GET** /container-security/combined/images/detail/v1 | Retrieve image entities identified by the provided filter criteria | +| [**combined_image_issues_summary**](ContainerImagesApi.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**](ContainerImagesApi.md#combined_image_vulnerability_summary) | **GET** /container-security/combined/images/vulnerabilities-summary/v1 | aggregates information about vulnerabilities for an image | +| [**get_combined_images**](ContainerImagesApi.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**](ContainerImagesApi.md#read_combined_images_export) | **GET** /container-security/combined/images/export/v1 | Retrieve images with an option to expand aggregated vulnerabilities/detections | + + +## aggregate_image_assessment_history + +> aggregate_image_assessment_history(opts) + +Image assessment history + +### 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::ContainerImagesApi.new +opts = { + filter: 'filter_example' # String | Filter using a query in Falcon Query Language (FQL). Supported filters: cid,registry,repository +} + +begin + # Image assessment history + result = api_instance.aggregate_image_assessment_history(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_assessment_history: #{e}" +end +``` + +#### Using the aggregate_image_assessment_history_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_image_assessment_history_with_http_info(opts) + +```ruby +begin + # Image assessment history + data, status_code, headers = api_instance.aggregate_image_assessment_history_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_assessment_history_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter using a query in Falcon Query Language (FQL). Supported filters: cid,registry,repository | [optional] | + +### Return type + +[**ImagesApiImageAssessmentHistory**](ImagesApiImageAssessmentHistory.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## aggregate_image_count + +> aggregate_image_count(opts) + +Aggregate count of images + +### 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::ContainerImagesApi.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,layer_digest,package_name_version,registry,repository,tag,vulnerability_count,vulnerability_severity +} + +begin + # Aggregate count of images + result = api_instance.aggregate_image_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_count: #{e}" +end +``` + +#### Using the aggregate_image_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_image_count_with_http_info(opts) + +```ruby +begin + # Aggregate count of images + data, status_code, headers = api_instance.aggregate_image_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,layer_digest,package_name_version,registry,repository,tag,vulnerability_count,vulnerability_severity | [optional] | + +### Return type + +[**ImagesApiImageCount**](ImagesApiImageCount.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## aggregate_image_count_by_base_os + +> aggregate_image_count_by_base_os(opts) + +Aggregate count of images grouped by Base OS distribution + +### 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::ContainerImagesApi.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 +} + +begin + # Aggregate count of images grouped by Base OS distribution + result = api_instance.aggregate_image_count_by_base_os(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_count_by_base_os: #{e}" +end +``` + +#### Using the aggregate_image_count_by_base_os_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_image_count_by_base_os_with_http_info(opts) + +```ruby +begin + # Aggregate count of images grouped by Base OS distribution + data, status_code, headers = api_instance.aggregate_image_count_by_base_os_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_count_by_base_os_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**ImagesApiImageCountByBaseOS**](ImagesApiImageCountByBaseOS.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## aggregate_image_count_by_state + +> aggregate_image_count_by_state(opts) + +Aggregate count of images grouped by state + +### 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::ContainerImagesApi.new +opts = { + filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen,registry,repository +} + +begin + # Aggregate count of images grouped by state + result = api_instance.aggregate_image_count_by_state(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_count_by_state: #{e}" +end +``` + +#### Using the aggregate_image_count_by_state_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_image_count_by_state_with_http_info(opts) + +```ruby +begin + # Aggregate count of images grouped by state + data, status_code, headers = api_instance.aggregate_image_count_by_state_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->aggregate_image_count_by_state_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen,registry,repository | [optional] | + +### Return type + +[**ImagesApiImageCountByState**](ImagesApiImageCountByState.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## combined_image_by_vulnerability_count + +> combined_image_by_vulnerability_count(opts) + +Retrieve top x images with the most vulnerabilities + +### 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::ContainerImagesApi.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 + 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. +} + +begin + # Retrieve top x images with the most vulnerabilities + result = api_instance.combined_image_by_vulnerability_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_by_vulnerability_count: #{e}" +end +``` + +#### Using the combined_image_by_vulnerability_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> combined_image_by_vulnerability_count_with_http_info(opts) + +```ruby +begin + # Retrieve top x images with the most vulnerabilities + data, status_code, headers = api_instance.combined_image_by_vulnerability_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_by_vulnerability_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **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] | + +### Return type + +[**ImagesApiImageByVulnerabilityCount**](ImagesApiImageByVulnerabilityCount.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## combined_image_detail + +> combined_image_detail(opts) + +Retrieve image entities identified by the provided 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::ContainerImagesApi.new +opts = { + filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: registry,repository,tag + with_config: true, # Boolean | (true/false) include image config, default is false + 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 + # Retrieve image entities identified by the provided filter criteria + result = api_instance.combined_image_detail(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_detail: #{e}" +end +``` + +#### Using the combined_image_detail_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> combined_image_detail_with_http_info(opts) + +```ruby +begin + # Retrieve image entities identified by the provided filter criteria + data, status_code, headers = api_instance.combined_image_detail_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_detail_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: 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] | + +### Return type + +[**ImagesApiCustomerAndImage**](ImagesApiCustomerAndImage.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## combined_image_issues_summary + +> combined_image_issues_summary(cid, registry, repository, tag) + +Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities + +### 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::ContainerImagesApi.new +cid = 'cid_example' # String | CID +registry = 'registry_example' # String | registry name +repository = 'repository_example' # String | repository name +tag = 'tag_example' # String | tag name + +begin + # Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities + result = api_instance.combined_image_issues_summary(cid, registry, repository, tag) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_issues_summary: #{e}" +end +``` + +#### Using the combined_image_issues_summary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> combined_image_issues_summary_with_http_info(cid, registry, repository, tag) + +```ruby +begin + # Retrieve image issues summary such as Image detections, Runtime detections, Policies, vulnerabilities + data, status_code, headers = api_instance.combined_image_issues_summary_with_http_info(cid, registry, repository, tag) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_issues_summary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | CID | | +| **registry** | **String** | registry name | | +| **repository** | **String** | repository name | | +| **tag** | **String** | tag name | | + +### Return type + +[**ImagesApiImageIssuesSummary**](ImagesApiImageIssuesSummary.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## combined_image_vulnerability_summary + +> combined_image_vulnerability_summary(cid, registry, repository, tag) + +aggregates information about vulnerabilities for an image + +### 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::ContainerImagesApi.new +cid = 'cid_example' # String | CID +registry = 'registry_example' # String | registry name +repository = 'repository_example' # String | repository name +tag = 'tag_example' # String | tag name + +begin + # aggregates information about vulnerabilities for an image + result = api_instance.combined_image_vulnerability_summary(cid, registry, repository, tag) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_vulnerability_summary: #{e}" +end +``` + +#### Using the combined_image_vulnerability_summary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> combined_image_vulnerability_summary_with_http_info(cid, registry, repository, tag) + +```ruby +begin + # aggregates information about vulnerabilities for an image + data, status_code, headers = api_instance.combined_image_vulnerability_summary_with_http_info(cid, registry, repository, tag) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->combined_image_vulnerability_summary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | CID | | +| **registry** | **String** | registry name | | +| **repository** | **String** | repository name | | +| **tag** | **String** | tag name | | + +### Return type + +[**ImagesApiImageVulnerabilitiesSummary**](ImagesApiImageVulnerabilitiesSummary.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_combined_images + +> get_combined_images(opts) + +Get image assessment results by providing an FQL filter and paging 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::ContainerImagesApi.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 tag] +} + +begin + # Get image assessment results by providing an FQL filter and paging details + result = api_instance.get_combined_images(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->get_combined_images: #{e}" +end +``` + +#### Using the get_combined_images_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_combined_images_with_http_info(opts) + +```ruby +begin + # Get image assessment results by providing an FQL filter and paging details + data, status_code, headers = api_instance.get_combined_images_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->get_combined_images_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **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 tag] | [optional] | + +### Return type + +[**ImagesExtCombinedImagesResponse**](ImagesExtCombinedImagesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_combined_images_export + +> read_combined_images_export(opts) + +Retrieve images with an option to expand aggregated vulnerabilities/detections + +### 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::ContainerImagesApi.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,layer_digest,package_name_version,registry,repository,tag,vulnerability_count,vulnerability_severity + expand_vulnerabilities: true, # Boolean | expand vulnerabilities + expand_detections: true, # Boolean | expand detections + 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 containers detections firstScanned first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository tag vulnerabilities] +} + +begin + # Retrieve images with an option to expand aggregated vulnerabilities/detections + result = api_instance.read_combined_images_export(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->read_combined_images_export: #{e}" +end +``` + +#### Using the read_combined_images_export_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_combined_images_export_with_http_info(opts) + +```ruby +begin + # Retrieve images with an option to expand aggregated vulnerabilities/detections + data, status_code, headers = api_instance.read_combined_images_export_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerImagesApi->read_combined_images_export_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,layer_digest,package_name_version,registry,repository,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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | The fields to sort the records on. Supported columns: [base_os cid containers detections firstScanned first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository tag vulnerabilities] | [optional] | + +### Return type + +[**ImagesApiCombinedImageExport**](ImagesApiCombinedImageExport.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ContainerPackagesApi.md b/docs/ContainerPackagesApi.md new file mode 100644 index 00000000..fd5f8a1a --- /dev/null +++ b/docs/ContainerPackagesApi.md @@ -0,0 +1,391 @@ +# Falcon::ContainerPackagesApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**read_packages_by_fixable_vuln_count**](ContainerPackagesApi.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**](ContainerPackagesApi.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**](ContainerPackagesApi.md#read_packages_combined) | **GET** /container-security/combined/packages/v1 | Retrieve packages identified by the provided filter criteria | +| [**read_packages_combined_export**](ContainerPackagesApi.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_count_by_zero_day**](ContainerPackagesApi.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 | + + +## read_packages_by_fixable_vuln_count + +> read_packages_by_fixable_vuln_count(opts) + +Retrieve top x app packages with the most fixable vulnerabilities + +### 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::ContainerPackagesApi.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 + 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 + result = api_instance.read_packages_by_fixable_vuln_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_by_fixable_vuln_count: #{e}" +end +``` + +#### Using the read_packages_by_fixable_vuln_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_packages_by_fixable_vuln_count_with_http_info(opts) + +```ruby +begin + # Retrieve top x app packages with the most fixable vulnerabilities + data, status_code, headers = api_instance.read_packages_by_fixable_vuln_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_by_fixable_vuln_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**PackagesApiPackagesByVulnCount**](PackagesApiPackagesByVulnCount.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_packages_by_vuln_count + +> read_packages_by_vuln_count(opts) + +Retrieve top x packages with the most vulnerabilities + +### 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::ContainerPackagesApi.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 + 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 + result = api_instance.read_packages_by_vuln_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_by_vuln_count: #{e}" +end +``` + +#### Using the read_packages_by_vuln_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_packages_by_vuln_count_with_http_info(opts) + +```ruby +begin + # Retrieve top x packages with the most vulnerabilities + data, status_code, headers = api_instance.read_packages_by_vuln_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_by_vuln_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**PackagesApiPackagesByVulnCount**](PackagesApiPackagesByVulnCount.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_packages_combined + +> read_packages_combined(opts) + +Retrieve packages identified by the provided 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::ContainerPackagesApi.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 + 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] +} + +begin + # Retrieve packages identified by the provided filter criteria + result = api_instance.read_packages_combined(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_combined: #{e}" +end +``` + +#### Using the read_packages_combined_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_packages_combined_with_http_info(opts) + +```ruby +begin + # Retrieve packages identified by the provided filter criteria + data, status_code, headers = api_instance.read_packages_combined_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_combined_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **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 + +[**PackagesApiCombinedPackage**](PackagesApiCombinedPackage.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_packages_combined_export + +> read_packages_combined_export(opts) + +Retrieve packages identified by the provided filter criteria for the purpose of export + +### 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::ContainerPackagesApi.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 + 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] +} + +begin + # Retrieve packages identified by the provided filter criteria for the purpose of export + result = api_instance.read_packages_combined_export(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_combined_export: #{e}" +end +``` + +#### Using the read_packages_combined_export_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_packages_combined_export_with_http_info(opts) + +```ruby +begin + # Retrieve packages identified by the provided filter criteria for the purpose of export + data, status_code, headers = api_instance.read_packages_combined_export_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_combined_export_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **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 + +[**PackagesApiCombinedPackageExport**](PackagesApiCombinedPackageExport.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) + +Retrieve packages count affected by zero day vulnerabilities + +### 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::ContainerPackagesApi.new +opts = { + filter: 'filter_example' # String | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid +} + +begin + # Retrieve packages count affected by zero day vulnerabilities + result = api_instance.read_packages_count_by_zero_day(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_count_by_zero_day: #{e}" +end +``` + +#### Using the read_packages_count_by_zero_day_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_packages_count_by_zero_day_with_http_info(opts) + +```ruby +begin + # Retrieve packages count affected by zero day vulnerabilities + data, status_code, headers = api_instance.read_packages_count_by_zero_day_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerPackagesApi->read_packages_count_by_zero_day_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter packages using a query in Falcon Query Language (FQL). Supported filters: cid | [optional] | + +### Return type + +[**CommonCountResponse**](CommonCountResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ContainerVulnerabilitiesApi.md b/docs/ContainerVulnerabilitiesApi.md new file mode 100644 index 00000000..650a703c --- /dev/null +++ b/docs/ContainerVulnerabilitiesApi.md @@ -0,0 +1,771 @@ +# Falcon::ContainerVulnerabilitiesApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**read_combined_vulnerabilities**](ContainerVulnerabilitiesApi.md#read_combined_vulnerabilities) | **GET** /container-security/combined/vulnerabilities/v1 | Retrieve vulnerability and aggregate data filtered by the provided FQL | +| [**read_combined_vulnerabilities_details**](ContainerVulnerabilitiesApi.md#read_combined_vulnerabilities_details) | **GET** /container-security/combined/vulnerabilities/details/v1 | Retrieve vulnerability details related to an image | +| [**read_combined_vulnerabilities_info**](ContainerVulnerabilitiesApi.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**](ContainerVulnerabilitiesApi.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**](ContainerVulnerabilitiesApi.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**](ContainerVulnerabilitiesApi.md#read_vulnerability_count) | **GET** /container-security/aggregates/vulnerabilities/count/v1 | Aggregate count of vulnerabilities | +| [**read_vulnerability_count_by_actively_exploited**](ContainerVulnerabilitiesApi.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**](ContainerVulnerabilitiesApi.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**](ContainerVulnerabilitiesApi.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**](ContainerVulnerabilitiesApi.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 + +> read_combined_vulnerabilities(opts) + +Retrieve vulnerability and aggregate data filtered by the provided FQL + +### 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::ContainerVulnerabilitiesApi.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,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] +} + +begin + # Retrieve vulnerability and aggregate data filtered by the provided FQL + result = api_instance.read_combined_vulnerabilities(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_combined_vulnerabilities: #{e}" +end +``` + +#### Using the read_combined_vulnerabilities_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_combined_vulnerabilities_with_http_info(opts) + +```ruby +begin + # Retrieve vulnerability and aggregate data filtered by the provided FQL + data, status_code, headers = api_instance.read_combined_vulnerabilities_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_combined_vulnerabilities_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,package_name_version,registry,repository,severity,tag | [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: [cps_current_rating cve_id cvss_score description images_impacted packages_impacted severity] | [optional] | + +### Return type + +[**VulnerabilitiesApiCombinedVulnerability**](VulnerabilitiesApiCombinedVulnerability.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_combined_vulnerabilities_details + +> read_combined_vulnerabilities_details(id, opts) + +Retrieve vulnerability details related to an image + +### 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::ContainerVulnerabilitiesApi.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,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 + result = api_instance.read_combined_vulnerabilities_details(id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_combined_vulnerabilities_details: #{e}" +end +``` + +#### Using the read_combined_vulnerabilities_details_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_combined_vulnerabilities_details_with_http_info(id, opts) + +```ruby +begin + # Retrieve vulnerability details related to an image + data, status_code, headers = api_instance.read_combined_vulnerabilities_details_with_http_info(id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_combined_vulnerabilities_details_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,is_zero_day,remediation_available,severity | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiCombinedVulnerabilityDetails**](VulnerabilitiesApiCombinedVulnerabilityDetails.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_combined_vulnerabilities_info + +> read_combined_vulnerabilities_info(cve_id, opts) + +Retrieve vulnerability and package related info for this customer + +### 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::ContainerVulnerabilitiesApi.new +cve_id = 'cve_id_example' # String | Vulnerability CVE ID +opts = { + 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 and package related info for this customer + result = api_instance.read_combined_vulnerabilities_info(cve_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_combined_vulnerabilities_info: #{e}" +end +``` + +#### Using the read_combined_vulnerabilities_info_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_combined_vulnerabilities_info_with_http_info(cve_id, opts) + +```ruby +begin + # Retrieve vulnerability and package related info for this customer + data, status_code, headers = api_instance.read_combined_vulnerabilities_info_with_http_info(cve_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_combined_vulnerabilities_info_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cve_id** | **String** | Vulnerability CVE ID | | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiCombinedVulnerabilityInfo**](VulnerabilitiesApiCombinedVulnerabilityInfo.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerabilities_by_image_count + +> read_vulnerabilities_by_image_count(opts) + +Retrieve top x vulnerabilities with the most impacted images + +### 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::ContainerVulnerabilitiesApi.new +opts = { + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: 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 + result = api_instance.read_vulnerabilities_by_image_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerabilities_by_image_count: #{e}" +end +``` + +#### Using the read_vulnerabilities_by_image_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerabilities_by_image_count_with_http_info(opts) + +```ruby +begin + # Retrieve top x vulnerabilities with the most impacted images + data, status_code, headers = api_instance.read_vulnerabilities_by_image_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerabilities_by_image_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiVulnByImageCount**](VulnerabilitiesApiVulnByImageCount.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerabilities_publication_date + +> read_vulnerabilities_publication_date(opts) + +Retrieve top x vulnerabilities with the most recent publication date + +### 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::ContainerVulnerabilitiesApi.new +opts = { + filter: 'filter_example', # String | Filter vulnerabilities using a query in Falcon Query Language (FQL). Supported filters: 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 + result = api_instance.read_vulnerabilities_publication_date(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerabilities_publication_date: #{e}" +end +``` + +#### Using the read_vulnerabilities_publication_date_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerabilities_publication_date_with_http_info(opts) + +```ruby +begin + # Retrieve top x vulnerabilities with the most recent publication date + data, status_code, headers = api_instance.read_vulnerabilities_publication_date_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerabilities_publication_date_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiVulnByPublication**](VulnerabilitiesApiVulnByPublication.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerability_count + +> read_vulnerability_count(opts) + +Aggregate count of vulnerabilities + +### 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::ContainerVulnerabilitiesApi.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,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 + result = api_instance.read_vulnerability_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count: #{e}" +end +``` + +#### Using the read_vulnerability_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerability_count_with_http_info(opts) + +```ruby +begin + # Aggregate count of vulnerabilities + data, status_code, headers = api_instance.read_vulnerability_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,package_name_version,registry,repository,severity,tag | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiVulnCount**](VulnerabilitiesApiVulnCount.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerability_count_by_actively_exploited + +> read_vulnerability_count_by_actively_exploited(opts) + +Aggregate count of vulnerabilities grouped by actively exploited + +### 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::ContainerVulnerabilitiesApi.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,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 + result = api_instance.read_vulnerability_count_by_actively_exploited(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_actively_exploited: #{e}" +end +``` + +#### Using the read_vulnerability_count_by_actively_exploited_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerability_count_by_actively_exploited_with_http_info(opts) + +```ruby +begin + # Aggregate count of vulnerabilities grouped by actively exploited + data, status_code, headers = api_instance.read_vulnerability_count_by_actively_exploited_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_actively_exploited_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,package_name_version,registry,repository,severity,tag | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiVulnCountByActivelyExploited**](VulnerabilitiesApiVulnCountByActivelyExploited.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerability_count_by_cps_rating + +> read_vulnerability_count_by_cps_rating(opts) + +Aggregate count of vulnerabilities grouped by csp_rating + +### 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::ContainerVulnerabilitiesApi.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,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 + result = api_instance.read_vulnerability_count_by_cps_rating(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_cps_rating: #{e}" +end +``` + +#### Using the read_vulnerability_count_by_cps_rating_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerability_count_by_cps_rating_with_http_info(opts) + +```ruby +begin + # Aggregate count of vulnerabilities grouped by csp_rating + data, status_code, headers = api_instance.read_vulnerability_count_by_cps_rating_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_cps_rating_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,package_name_version,registry,repository,severity,tag | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiVulnCountByCSPRating**](VulnerabilitiesApiVulnCountByCSPRating.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerability_count_by_cvss_score + +> read_vulnerability_count_by_cvss_score(opts) + +Aggregate count of vulnerabilities grouped by cvss score + +### 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::ContainerVulnerabilitiesApi.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,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 + result = api_instance.read_vulnerability_count_by_cvss_score(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_cvss_score: #{e}" +end +``` + +#### Using the read_vulnerability_count_by_cvss_score_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerability_count_by_cvss_score_with_http_info(opts) + +```ruby +begin + # Aggregate count of vulnerabilities grouped by cvss score + data, status_code, headers = api_instance.read_vulnerability_count_by_cvss_score_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_cvss_score_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,package_name_version,registry,repository,severity,tag | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiVulnCountByCVSSScore**](VulnerabilitiesApiVulnCountByCVSSScore.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerability_count_by_severity + +> read_vulnerability_count_by_severity(opts) + +Aggregate count of vulnerabilities grouped by severity + +### 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::ContainerVulnerabilitiesApi.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,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 + result = api_instance.read_vulnerability_count_by_severity(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_severity: #{e}" +end +``` + +#### Using the read_vulnerability_count_by_severity_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerability_count_by_severity_with_http_info(opts) + +```ruby +begin + # Aggregate count of vulnerabilities grouped by severity + data, status_code, headers = api_instance.read_vulnerability_count_by_severity_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ContainerVulnerabilitiesApi->read_vulnerability_count_by_severity_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,package_name_version,registry,repository,severity,tag | [optional] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | + +### Return type + +[**VulnerabilitiesApiVulnCountBySeverity**](VulnerabilitiesApiVulnCountBySeverity.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/CspmRegistrationApi.md b/docs/CspmRegistrationApi.md index 0f1c5d02..ae252798 100644 --- a/docs/CspmRegistrationApi.md +++ b/docs/CspmRegistrationApi.md @@ -5,28 +5,38 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**azure_download_certificate**](CspmRegistrationApi.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. | +| [**connect_cspmgcp_account**](CspmRegistrationApi.md#connect_cspmgcp_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**](CspmRegistrationApi.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**](CspmRegistrationApi.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. | +| [**create_cspm_azure_management_group**](CspmRegistrationApi.md#create_cspm_azure_management_group) | **POST** /cloud-connect-cspm-azure/entities/management-group/v1 | Creates a new management group in our system for a customer. | +| [**create_cspmgcp_account**](CspmRegistrationApi.md#create_cspmgcp_account) | **POST** /cloud-connect-cspm-gcp/entities/account/v1 | Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. | | [**delete_cspm_aws_account**](CspmRegistrationApi.md#delete_cspm_aws_account) | **DELETE** /cloud-connect-cspm-aws/entities/account/v1 | Deletes an existing AWS account or organization in our system. | | [**delete_cspm_azure_account**](CspmRegistrationApi.md#delete_cspm_azure_account) | **DELETE** /cloud-connect-cspm-azure/entities/account/v1 | Deletes an Azure subscription from the system. | +| [**delete_cspmgcp_account**](CspmRegistrationApi.md#delete_cspmgcp_account) | **DELETE** /cloud-connect-cspm-gcp/entities/account/v1 | Deletes a GCP account from the system. | | [**get_behavior_detections**](CspmRegistrationApi.md#get_behavior_detections) | **GET** /detects/entities/ioa/v1 | Get list of detected behaviors | | [**get_configuration_detection_entities**](CspmRegistrationApi.md#get_configuration_detection_entities) | **GET** /detects/entities/iom/v2 | Get misconfigurations based on the ID - including custom policy detections in addition to default policy detections. | | [**get_configuration_detection_ids_v2**](CspmRegistrationApi.md#get_configuration_detection_ids_v2) | **GET** /detects/queries/iom/v2 | Get list of active misconfiguration ids - including custom policy detections in addition to default policy detections. | -| [**get_configuration_detections**](CspmRegistrationApi.md#get_configuration_detections) | **GET** /detects/entities/iom/v1 | Get list of active misconfigurations | +| [**get_configuration_detections**](CspmRegistrationApi.md#get_configuration_detections) | **GET** /detects/entities/iom/v1 | Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead | | [**get_cspm_aws_account**](CspmRegistrationApi.md#get_cspm_aws_account) | **GET** /cloud-connect-cspm-aws/entities/account/v1 | Returns information about the current status of an AWS account. | | [**get_cspm_aws_account_scripts_attachment**](CspmRegistrationApi.md#get_cspm_aws_account_scripts_attachment) | **GET** /cloud-connect-cspm-aws/entities/user-scripts-download/v1 | Return a script for customer to run in their cloud environment to grant us access to their AWS environment as a downloadable attachment. | | [**get_cspm_aws_console_setup_urls**](CspmRegistrationApi.md#get_cspm_aws_console_setup_urls) | **GET** /cloud-connect-cspm-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_cspm_azure_account**](CspmRegistrationApi.md#get_cspm_azure_account) | **GET** /cloud-connect-cspm-azure/entities/account/v1 | Return information about Azure account registration | +| [**get_cspm_azure_management_group**](CspmRegistrationApi.md#get_cspm_azure_management_group) | **GET** /cloud-connect-cspm-azure/entities/management-group/v1 | Return information about Azure management group registration | | [**get_cspm_azure_user_scripts_attachment**](CspmRegistrationApi.md#get_cspm_azure_user_scripts_attachment) | **GET** /cloud-connect-cspm-azure/entities/user-scripts-download/v1 | Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment | | [**get_cspm_policies_details**](CspmRegistrationApi.md#get_cspm_policies_details) | **GET** /settings/entities/policy-details/v2 | Given an array of policy IDs, returns detailed policies information. | | [**get_cspm_policy**](CspmRegistrationApi.md#get_cspm_policy) | **GET** /settings/entities/policy-details/v1 | Given a policy ID, returns detailed policy information. | | [**get_cspm_policy_settings**](CspmRegistrationApi.md#get_cspm_policy_settings) | **GET** /settings/entities/policy/v1 | Returns information about current policy settings. | | [**get_cspm_scan_schedule**](CspmRegistrationApi.md#get_cspm_scan_schedule) | **GET** /settings/scan-schedule/v1 | Returns scan schedule configuration for one or more cloud platforms. | +| [**get_cspmcgp_account**](CspmRegistrationApi.md#get_cspmcgp_account) | **GET** /cloud-connect-cspm-gcp/entities/account/v1 | Returns information about the current status of an GCP account. | +| [**get_cspmgcp_service_accounts_ext**](CspmRegistrationApi.md#get_cspmgcp_service_accounts_ext) | **GET** /cloud-connect-cspm-gcp/entities/service-accounts/v1 | Returns the service account id and client email for external clients. | +| [**get_cspmgcp_user_scripts_attachment**](CspmRegistrationApi.md#get_cspmgcp_user_scripts_attachment) | **GET** /cloud-connect-cspm-gcp/entities/user-scripts-download/v1 | Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment | | [**patch_cspm_aws_account**](CspmRegistrationApi.md#patch_cspm_aws_account) | **PATCH** /cloud-connect-cspm-aws/entities/account/v1 | Patches a existing account in our system for a customer. | +| [**update_cspm_azure_account**](CspmRegistrationApi.md#update_cspm_azure_account) | **PATCH** /cloud-connect-cspm-azure/entities/account/v1 | Patches a existing account in our system for a customer. | | [**update_cspm_azure_account_client_id**](CspmRegistrationApi.md#update_cspm_azure_account_client_id) | **PATCH** /cloud-connect-cspm-azure/entities/client-id/v1 | Update an Azure service account in our system by with the user-created client_id created with the public key we've provided | | [**update_cspm_azure_tenant_default_subscription_id**](CspmRegistrationApi.md#update_cspm_azure_tenant_default_subscription_id) | **PATCH** /cloud-connect-cspm-azure/entities/default-subscription-id/v1 | Update an Azure default subscription_id in our system for given tenant_id | | [**update_cspm_policy_settings**](CspmRegistrationApi.md#update_cspm_policy_settings) | **PATCH** /settings/entities/policy/v1 | Updates a policy setting - can be used to override policy severity or to disable a policy entirely. | | [**update_cspm_scan_schedule**](CspmRegistrationApi.md#update_cspm_scan_schedule) | **POST** /settings/scan-schedule/v1 | Updates scan schedule configuration for one or more cloud platforms. | +| [**update_cspmgcp_account**](CspmRegistrationApi.md#update_cspmgcp_account) | **PATCH** /cloud-connect-cspm-gcp/entities/account/v1 | Patches a existing account in our system for a customer. | ## azure_download_certificate @@ -104,6 +114,75 @@ end - **Accept**: application/json, application/octet-stream +## connect_cspmgcp_account + +> connect_cspmgcp_account(body) + +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 + +### 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::CspmRegistrationApi.new +body = Falcon::RegistrationGCPAccountExtRequestV2.new({resources: [Falcon::RegistrationGCPAccountReqObjV2.new({parent_id: 'parent_id_example'})]}) # RegistrationGCPAccountExtRequestV2 | + +begin + # 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 + result = api_instance.connect_cspmgcp_account(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->connect_cspmgcp_account: #{e}" +end +``` + +#### Using the connect_cspmgcp_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> connect_cspmgcp_account_with_http_info(body) + +```ruby +begin + # 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 + data, status_code, headers = api_instance.connect_cspmgcp_account_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->connect_cspmgcp_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RegistrationGCPAccountExtRequestV2**](RegistrationGCPAccountExtRequestV2.md) | | | + +### Return type + +[**RegistrationGCPAccountResponseExtV2**](RegistrationGCPAccountResponseExtV2.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## create_cspm_aws_account > create_cspm_aws_account(body) @@ -242,6 +321,144 @@ end - **Accept**: application/json +## create_cspm_azure_management_group + +> create_cspm_azure_management_group(body) + +Creates a new management group in our system for a customer. + +### 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::CspmRegistrationApi.new +body = Falcon::RegistrationAzureManagementGroupCreateRequestExternalV1.new({resources: [Falcon::RegistrationAzureManagementGroupExternalV1.new({tenant_id: 'tenant_id_example'})]}) # RegistrationAzureManagementGroupCreateRequestExternalV1 | + +begin + # Creates a new management group in our system for a customer. + result = api_instance.create_cspm_azure_management_group(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->create_cspm_azure_management_group: #{e}" +end +``` + +#### Using the create_cspm_azure_management_group_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_cspm_azure_management_group_with_http_info(body) + +```ruby +begin + # Creates a new management group in our system for a customer. + data, status_code, headers = api_instance.create_cspm_azure_management_group_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->create_cspm_azure_management_group_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RegistrationAzureManagementGroupCreateRequestExternalV1**](RegistrationAzureManagementGroupCreateRequestExternalV1.md) | | | + +### Return type + +[**RegistrationAzureAccountResponseV1**](RegistrationAzureAccountResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_cspmgcp_account + +> create_cspmgcp_account(body) + +Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. + +### 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::CspmRegistrationApi.new +body = Falcon::RegistrationGCPAccountCreateRequestExtV1.new({resources: [Falcon::RegistrationGCPAccountExtV1.new({parent_id: 'parent_id_example'})]}) # RegistrationGCPAccountCreateRequestExtV1 | + +begin + # Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. + result = api_instance.create_cspmgcp_account(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->create_cspmgcp_account: #{e}" +end +``` + +#### Using the create_cspmgcp_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_cspmgcp_account_with_http_info(body) + +```ruby +begin + # Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. + data, status_code, headers = api_instance.create_cspmgcp_account_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->create_cspmgcp_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RegistrationGCPAccountCreateRequestExtV1**](RegistrationGCPAccountCreateRequestExtV1.md) | | | + +### Return type + +[**RegistrationGCPAccountResponseV1**](RegistrationGCPAccountResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## delete_cspm_aws_account > delete_cspm_aws_account(opts) @@ -390,6 +607,77 @@ end - **Accept**: application/json +## delete_cspmgcp_account + +> delete_cspmgcp_account(opts) + +Deletes a GCP account from the system. + +### 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::CspmRegistrationApi.new +opts = { + ids: ['inner_example'] # Array | Hierarchical Resource IDs of accounts +} + +begin + # Deletes a GCP account from the system. + result = api_instance.delete_cspmgcp_account(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->delete_cspmgcp_account: #{e}" +end +``` + +#### Using the delete_cspmgcp_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_cspmgcp_account_with_http_info(opts) + +```ruby +begin + # Deletes a GCP account from the system. + data, status_code, headers = api_instance.delete_cspmgcp_account_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->delete_cspmgcp_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | Hierarchical Resource IDs of accounts | [optional] | + +### Return type + +[**MsaBaseEntitiesResponse**](MsaBaseEntitiesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_behavior_detections > get_behavior_detections(opts) @@ -639,7 +927,7 @@ end > get_configuration_detections(opts) -Get list of active misconfigurations +Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead ### Examples @@ -669,7 +957,7 @@ opts = { } begin - # Get list of active misconfigurations + # Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead result = api_instance.get_configuration_detections(opts) p result rescue Falcon::ApiError => e @@ -685,7 +973,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Get list of active misconfigurations + # Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead data, status_code, headers = api_instance.get_configuration_detections_with_http_info(opts) p status_code # => 2xx p headers # => { ... } @@ -745,13 +1033,14 @@ end api_instance = Falcon::CspmRegistrationApi.new opts = { - scan_type: 'scan_type_example', # String | Type of scan, dry or full, to perform on selected accounts + scan_type: 'dry', # String | Type of scan, dry or full, to perform on selected accounts ids: ['inner_example'], # Array | AWS account IDs iam_role_arns: ['inner_example'], # Array | AWS IAM role ARNs organization_ids: ['inner_example'], # Array | AWS organization IDs - status: 'status_example', # String | Account status to filter results by. + status: 'provisioned', # String | Account status to filter results by. limit: 56, # Integer | The maximum records to return. Defaults to 100. - migrated: 'false', # String | Only return migrated d4c accounts + cspm_lite: 'true', # String | Only return CSPM Lite accounts + migrated: 'true', # String | Only return migrated d4c accounts offset: 56, # Integer | The offset to start retrieving records from group_by: 'organization' # String | Field to group by. } @@ -793,6 +1082,7 @@ end | **organization_ids** | [**Array<String>**](String.md) | AWS organization IDs | [optional] | | **status** | **String** | Account status to filter results by. | [optional] | | **limit** | **Integer** | The maximum records to return. Defaults to 100. | [optional][default to 100] | +| **cspm_lite** | **String** | Only return CSPM Lite accounts | [optional] | | **migrated** | **String** | Only return migrated d4c accounts | [optional] | | **offset** | **Integer** | The offset to start retrieving records from | [optional] | | **group_by** | **String** | Field to group by. | [optional] | @@ -904,7 +1194,7 @@ end api_instance = Falcon::CspmRegistrationApi.new opts = { ids: ['inner_example'], # Array | AWS account IDs - use_existing_cloudtrail: 'false', # String | + use_existing_cloudtrail: 'true', # String | region: 'region_example' # String | Region } @@ -982,6 +1272,7 @@ opts = { tenant_ids: ['inner_example'], # Array | Tenant ids to filter azure accounts scan_type: 'scan_type_example', # String | Type of scan, dry or full, to perform on selected accounts status: 'status_example', # String | Account status to filter results by. + cspm_lite: 'false', # String | Only return CSPM Lite accounts limit: 56, # Integer | The maximum records to return. Defaults to 100. offset: 56 # Integer | The offset to start retrieving records from } @@ -1021,6 +1312,7 @@ end | **tenant_ids** | [**Array<String>**](String.md) | Tenant ids to filter azure accounts | [optional] | | **scan_type** | **String** | Type of scan, dry or full, to perform on selected accounts | [optional] | | **status** | **String** | Account status to filter results by. | [optional] | +| **cspm_lite** | **String** | Only return CSPM Lite accounts | [optional] | | **limit** | **Integer** | The maximum records to return. Defaults to 100. | [optional][default to 100] | | **offset** | **Integer** | The offset to start retrieving records from | [optional] | @@ -1038,11 +1330,11 @@ end - **Accept**: application/json -## get_cspm_azure_user_scripts_attachment +## get_cspm_azure_management_group -> get_cspm_azure_user_scripts_attachment(opts) +> get_cspm_azure_management_group(opts) -Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment +Return information about Azure management group registration ### Examples @@ -1059,36 +1351,35 @@ end api_instance = Falcon::CspmRegistrationApi.new opts = { - tenant_id: 'tenant_id_example', # String | Tenant ID to generate script for. Defaults to most recently registered tenant. - subscription_ids: ['inner_example'], # Array | Subscription IDs to generate script for. Defaults to all. - account_type: 'commercial', # String | - template: 'template_example' # String | Template to be rendered + tenant_ids: ['inner_example'], # Array | Tenant ids to filter azure accounts + limit: 56, # Integer | The maximum records to return. Defaults to 100. + offset: 56 # Integer | The offset to start retrieving records from } begin - # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment - result = api_instance.get_cspm_azure_user_scripts_attachment(opts) + # Return information about Azure management group registration + result = api_instance.get_cspm_azure_management_group(opts) p result rescue Falcon::ApiError => e - puts "Error when calling CspmRegistrationApi->get_cspm_azure_user_scripts_attachment: #{e}" + puts "Error when calling CspmRegistrationApi->get_cspm_azure_management_group: #{e}" end ``` -#### Using the get_cspm_azure_user_scripts_attachment_with_http_info variant +#### Using the get_cspm_azure_management_group_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_cspm_azure_user_scripts_attachment_with_http_info(opts) +> , Integer, Hash)> get_cspm_azure_management_group_with_http_info(opts) ```ruby begin - # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment - data, status_code, headers = api_instance.get_cspm_azure_user_scripts_attachment_with_http_info(opts) + # Return information about Azure management group registration + data, status_code, headers = api_instance.get_cspm_azure_management_group_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e - puts "Error when calling CspmRegistrationApi->get_cspm_azure_user_scripts_attachment_with_http_info: #{e}" + puts "Error when calling CspmRegistrationApi->get_cspm_azure_management_group_with_http_info: #{e}" end ``` @@ -1096,14 +1387,13 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **tenant_id** | **String** | Tenant ID to generate script for. Defaults to most recently registered tenant. | [optional] | -| **subscription_ids** | [**Array<String>**](String.md) | Subscription IDs to generate script for. Defaults to all. | [optional] | -| **account_type** | **String** | | [optional] | -| **template** | **String** | Template to be rendered | [optional] | +| **tenant_ids** | [**Array<String>**](String.md) | Tenant ids to filter azure accounts | [optional] | +| **limit** | **Integer** | The maximum records to return. Defaults to 100. | [optional][default to 100] | +| **offset** | **Integer** | The offset to start retrieving records from | [optional] | ### Return type -[**RegistrationAzureProvisionGetUserScriptResponseV1**](RegistrationAzureProvisionGetUserScriptResponseV1.md) +[**RegistrationAzureManagementGroupResponseV1**](RegistrationAzureManagementGroupResponseV1.md) ### Authorization @@ -1112,12 +1402,91 @@ end ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json, application/octet-stream +- **Accept**: application/json -## get_cspm_policies_details +## get_cspm_azure_user_scripts_attachment -> get_cspm_policies_details(ids) +> get_cspm_azure_user_scripts_attachment(opts) + +Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment + +### 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::CspmRegistrationApi.new +opts = { + tenant_id: 'tenant_id_example', # String | Tenant ID to generate script for. Defaults to most recently registered tenant. + subscription_ids: ['inner_example'], # Array | Subscription IDs to generate script for. Defaults to all. + account_type: 'commercial', # String | + template: 'template_example', # String | Template to be rendered + azure_management_group: true # Boolean | Use Azure Management Group +} + +begin + # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment + result = api_instance.get_cspm_azure_user_scripts_attachment(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspm_azure_user_scripts_attachment: #{e}" +end +``` + +#### Using the get_cspm_azure_user_scripts_attachment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_cspm_azure_user_scripts_attachment_with_http_info(opts) + +```ruby +begin + # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment + data, status_code, headers = api_instance.get_cspm_azure_user_scripts_attachment_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspm_azure_user_scripts_attachment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **tenant_id** | **String** | Tenant ID to generate script for. Defaults to most recently registered tenant. | [optional] | +| **subscription_ids** | [**Array<String>**](String.md) | Subscription IDs to generate script for. Defaults to all. | [optional] | +| **account_type** | **String** | | [optional] | +| **template** | **String** | Template to be rendered | [optional] | +| **azure_management_group** | **Boolean** | Use Azure Management Group | [optional] | + +### Return type + +[**RegistrationAzureProvisionGetUserScriptResponseV1**](RegistrationAzureProvisionGetUserScriptResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/octet-stream + + +## get_cspm_policies_details + +> get_cspm_policies_details(ids) Given an array of policy IDs, returns detailed policies information. @@ -1399,6 +1768,233 @@ end - **Accept**: application/json +## get_cspmcgp_account + +> get_cspmcgp_account(opts) + +Returns information about the current status of an GCP account. + +### 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::CspmRegistrationApi.new +opts = { + parent_type: 'Folder', # String | GCP Hierarchy Parent Type, organization/folder/project + ids: ['inner_example'], # Array | Hierarchical Resource IDs of accounts + scan_type: 'dry', # String | Type of scan, dry or full, to perform on selected accounts + status: 'operational', # String | Account status to filter results by. + limit: 56, # Integer | The maximum records to return. Defaults to 100. + offset: 56, # Integer | The offset to start retrieving records from + sort: 'sort_example' # String | Order fields in ascending or descending order. Ex: parent_type|asc. +} + +begin + # Returns information about the current status of an GCP account. + result = api_instance.get_cspmcgp_account(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspmcgp_account: #{e}" +end +``` + +#### Using the get_cspmcgp_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_cspmcgp_account_with_http_info(opts) + +```ruby +begin + # Returns information about the current status of an GCP account. + data, status_code, headers = api_instance.get_cspmcgp_account_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspmcgp_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **parent_type** | **String** | GCP Hierarchy Parent Type, organization/folder/project | [optional] | +| **ids** | [**Array<String>**](String.md) | Hierarchical Resource IDs of accounts | [optional] | +| **scan_type** | **String** | Type of scan, dry or full, to perform on selected accounts | [optional] | +| **status** | **String** | Account status to filter results by. | [optional] | +| **limit** | **Integer** | The maximum records to return. Defaults to 100. | [optional][default to 100] | +| **offset** | **Integer** | The offset to start retrieving records from | [optional] | +| **sort** | **String** | Order fields in ascending or descending order. Ex: parent_type|asc. | [optional] | + +### Return type + +[**RegistrationGCPAccountResponseV1**](RegistrationGCPAccountResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_cspmgcp_service_accounts_ext + +> get_cspmgcp_service_accounts_ext(opts) + +Returns the service account id and client email for external clients. + +### 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::CspmRegistrationApi.new +opts = { + id: 'id_example' # String | Service Account ID +} + +begin + # Returns the service account id and client email for external clients. + result = api_instance.get_cspmgcp_service_accounts_ext(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspmgcp_service_accounts_ext: #{e}" +end +``` + +#### Using the get_cspmgcp_service_accounts_ext_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_cspmgcp_service_accounts_ext_with_http_info(opts) + +```ruby +begin + # Returns the service account id and client email for external clients. + data, status_code, headers = api_instance.get_cspmgcp_service_accounts_ext_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspmgcp_service_accounts_ext_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Service Account ID | [optional] | + +### Return type + +[**RegistrationGCPServiceAccountResponseExtV1**](RegistrationGCPServiceAccountResponseExtV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_cspmgcp_user_scripts_attachment + +> get_cspmgcp_user_scripts_attachment(opts) + +Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + +### 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::CspmRegistrationApi.new +opts = { + parent_type: 'Folder', # String | GCP Hierarchy Parent Type, organization/folder/project + ids: ['inner_example'] # Array | Hierarchical Resource IDs of accounts +} + +begin + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + result = api_instance.get_cspmgcp_user_scripts_attachment(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspmgcp_user_scripts_attachment: #{e}" +end +``` + +#### Using the get_cspmgcp_user_scripts_attachment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_cspmgcp_user_scripts_attachment_with_http_info(opts) + +```ruby +begin + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + data, status_code, headers = api_instance.get_cspmgcp_user_scripts_attachment_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->get_cspmgcp_user_scripts_attachment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **parent_type** | **String** | GCP Hierarchy Parent Type, organization/folder/project | [optional] | +| **ids** | [**Array<String>**](String.md) | Hierarchical Resource IDs of accounts | [optional] | + +### Return type + +[**RegistrationGCPProvisionGetUserScriptResponseV1**](RegistrationGCPProvisionGetUserScriptResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/octet-stream + + ## patch_cspm_aws_account > patch_cspm_aws_account(body) @@ -1468,6 +2064,75 @@ end - **Accept**: application/json +## update_cspm_azure_account + +> update_cspm_azure_account(body) + +Patches a existing account in our system for a customer. + +### 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::CspmRegistrationApi.new +body = Falcon::RegistrationAzureAccountPatchRequest.new({resources: [Falcon::RegistrationAzureAccountPatch.new({subscription_id: 'subscription_id_example'})]}) # RegistrationAzureAccountPatchRequest | + +begin + # Patches a existing account in our system for a customer. + result = api_instance.update_cspm_azure_account(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->update_cspm_azure_account: #{e}" +end +``` + +#### Using the update_cspm_azure_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_cspm_azure_account_with_http_info(body) + +```ruby +begin + # Patches a existing account in our system for a customer. + data, status_code, headers = api_instance.update_cspm_azure_account_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->update_cspm_azure_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RegistrationAzureAccountPatchRequest**](RegistrationAzureAccountPatchRequest.md) | | | + +### Return type + +[**RegistrationAzureAccountResponseV1**](RegistrationAzureAccountResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## update_cspm_azure_account_client_id > update_cspm_azure_account_client_id(id, opts) @@ -1751,3 +2416,72 @@ end - **Content-Type**: application/json - **Accept**: application/json + +## update_cspmgcp_account + +> update_cspmgcp_account(body) + +Patches a existing account in our system for a customer. + +### 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::CspmRegistrationApi.new +body = Falcon::RegistrationGCPAccountPatchRequest.new({resources: [Falcon::RegistrationGCPAccountPatch.new({parent_id: 'parent_id_example'})]}) # RegistrationGCPAccountPatchRequest | + +begin + # Patches a existing account in our system for a customer. + result = api_instance.update_cspmgcp_account(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->update_cspmgcp_account: #{e}" +end +``` + +#### Using the update_cspmgcp_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_cspmgcp_account_with_http_info(body) + +```ruby +begin + # Patches a existing account in our system for a customer. + data, status_code, headers = api_instance.update_cspmgcp_account_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CspmRegistrationApi->update_cspmgcp_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RegistrationGCPAccountPatchRequest**](RegistrationGCPAccountPatchRequest.md) | | | + +### Return type + +[**RegistrationGCPAccountResponseV1**](RegistrationGCPAccountResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/CustomIoaApi.md b/docs/CustomIoaApi.md index 5bb614a1..fdc82abf 100644 --- a/docs/CustomIoaApi.md +++ b/docs/CustomIoaApi.md @@ -1123,7 +1123,7 @@ end api_instance = Falcon::CustomIoaApi.new opts = { - sort: 'rules.created_by', # String | Possible order by fields: {rules.created_on, rules.current_version.name, rules.current_version.modified_by, rules.ruletype_name, rules.created_by, rules.current_version.description, rules.current_version.pattern_severity, rules.current_version.action_label, rules.current_version.modified_on, rules.enabled} + sort: 'rules.created_by', # String | Possible order by fields: {rules.current_version.description, rules.current_version.action_label, rules.current_version.modified_on, rules.created_on, rules.current_version.name, rules.created_by, rules.current_version.pattern_severity, rules.current_version.modified_by, rules.ruletype_name, rules.enabled} filter: 'filter_example', # String | FQL query specifying the filter parameters. Filter term criteria: [enabled platform name description rules.action_label rules.name rules.description rules.pattern_severity rules.ruletype_name rules.enabled]. Filter range criteria: created_on, modified_on; use any common date format, such as '2010-05-15T14:55:21.892315096Z'. q: 'q_example', # String | Match query criteria, which includes all the filter string fields offset: 'offset_example', # String | Starting index of overall result set from which to return IDs @@ -1161,7 +1161,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **sort** | **String** | Possible order by fields: {rules.created_on, rules.current_version.name, rules.current_version.modified_by, rules.ruletype_name, rules.created_by, rules.current_version.description, rules.current_version.pattern_severity, rules.current_version.action_label, rules.current_version.modified_on, rules.enabled} | [optional] | +| **sort** | **String** | Possible order by fields: {rules.current_version.description, rules.current_version.action_label, rules.current_version.modified_on, rules.created_on, rules.current_version.name, rules.created_by, rules.current_version.pattern_severity, rules.current_version.modified_by, rules.ruletype_name, rules.enabled} | [optional] | | **filter** | **String** | FQL query specifying the filter parameters. Filter term criteria: [enabled platform name description rules.action_label rules.name rules.description rules.pattern_severity rules.ruletype_name rules.enabled]. Filter range criteria: created_on, modified_on; use any common date format, such as '2010-05-15T14:55:21.892315096Z'. | [optional] | | **q** | **String** | Match query criteria, which includes all the filter string fields | [optional] | | **offset** | **String** | Starting index of overall result set from which to return IDs | [optional] | diff --git a/docs/CustomStorageApi.md b/docs/CustomStorageApi.md new file mode 100644 index 00000000..8556bd36 --- /dev/null +++ b/docs/CustomStorageApi.md @@ -0,0 +1,465 @@ +# Falcon::CustomStorageApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**delete_object**](CustomStorageApi.md#delete_object) | **DELETE** /customobjects/v1/collections/{collection_name}/objects/{object_key} | Delete the specified object | +| [**get_object**](CustomStorageApi.md#get_object) | **GET** /customobjects/v1/collections/{collection_name}/objects/{object_key} | Get the bytes for the specified object | +| [**get_object_metadata**](CustomStorageApi.md#get_object_metadata) | **GET** /customobjects/v1/collections/{collection_name}/objects/{object_key}/metadata | Get the metadata for the specified object | +| [**list_objects**](CustomStorageApi.md#list_objects) | **GET** /customobjects/v1/collections/{collection_name}/objects | List the object keys in the specified collection in alphabetical order | +| [**put_object**](CustomStorageApi.md#put_object) | **PUT** /customobjects/v1/collections/{collection_name}/objects/{object_key} | Put the specified new object at the given key or overwrite an existing object at the given key | +| [**search_objects**](CustomStorageApi.md#search_objects) | **POST** /customobjects/v1/collections/{collection_name}/objects | Search for objects that match the specified filter criteria (returns metadata, not actual objects) | + + +## delete_object + +> delete_object(collection_name, object_key, opts) + +Delete the specified object + +### 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::CustomStorageApi.new +collection_name = 'collection_name_example' # String | The name of the collection +object_key = 'object_key_example' # String | The object key +opts = { + dry_run: true # Boolean | If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. +} + +begin + # Delete the specified object + result = api_instance.delete_object(collection_name, object_key, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->delete_object: #{e}" +end +``` + +#### Using the delete_object_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_object_with_http_info(collection_name, object_key, opts) + +```ruby +begin + # Delete the specified object + data, status_code, headers = api_instance.delete_object_with_http_info(collection_name, object_key, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->delete_object_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **collection_name** | **String** | The name of the collection | | +| **object_key** | **String** | The object key | | +| **dry_run** | **Boolean** | If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. | [optional] | + +### Return type + +[**CustomType3191042536**](CustomType3191042536.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_object + +> File get_object(collection_name, object_key) + +Get the bytes for the specified object + +### 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::CustomStorageApi.new +collection_name = 'collection_name_example' # String | The name of the collection +object_key = 'object_key_example' # String | The object key + +begin + # Get the bytes for the specified object + result = api_instance.get_object(collection_name, object_key) + p result +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->get_object: #{e}" +end +``` + +#### Using the get_object_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> get_object_with_http_info(collection_name, object_key) + +```ruby +begin + # Get the bytes for the specified object + data, status_code, headers = api_instance.get_object_with_http_info(collection_name, object_key) + p status_code # => 2xx + p headers # => { ... } + p data # => File +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->get_object_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **collection_name** | **String** | The name of the collection | | +| **object_key** | **String** | The object key | | + +### Return type + +**File** + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream, application/json + + +## get_object_metadata + +> get_object_metadata(collection_name, object_key) + +Get the metadata for the specified object + +### 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::CustomStorageApi.new +collection_name = 'collection_name_example' # String | The name of the collection +object_key = 'object_key_example' # String | The object key + +begin + # Get the metadata for the specified object + result = api_instance.get_object_metadata(collection_name, object_key) + p result +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->get_object_metadata: #{e}" +end +``` + +#### Using the get_object_metadata_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_object_metadata_with_http_info(collection_name, object_key) + +```ruby +begin + # Get the metadata for the specified object + data, status_code, headers = api_instance.get_object_metadata_with_http_info(collection_name, object_key) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->get_object_metadata_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **collection_name** | **String** | The name of the collection | | +| **object_key** | **String** | The object key | | + +### Return type + +[**CustomType3191042536**](CustomType3191042536.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_objects + +> list_objects(collection_name, opts) + +List the object keys in the specified collection in alphabetical order + +### 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::CustomStorageApi.new +collection_name = 'collection_name_example' # String | The name of the collection +opts = { + _end: '_end_example', # String | The end key to end listing to + limit: 56, # Integer | The limit of results to return + start: 'start_example' # String | The start key to start listing from +} + +begin + # List the object keys in the specified collection in alphabetical order + result = api_instance.list_objects(collection_name, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->list_objects: #{e}" +end +``` + +#### Using the list_objects_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_objects_with_http_info(collection_name, opts) + +```ruby +begin + # List the object keys in the specified collection in alphabetical order + data, status_code, headers = api_instance.list_objects_with_http_info(collection_name, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->list_objects_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **collection_name** | **String** | The name of the collection | | +| **_end** | **String** | The end key to end listing to | [optional] | +| **limit** | **Integer** | The limit of results to return | [optional] | +| **start** | **String** | The start key to start listing from | [optional] | + +### Return type + +[**CustomType1255839303**](CustomType1255839303.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## put_object + +> put_object(collection_name, object_key, body, opts) + +Put the specified new object at the given key or overwrite an existing object at the given key + +### 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::CustomStorageApi.new +collection_name = 'collection_name_example' # String | The name of the collection +object_key = 'object_key_example' # String | The object key +body = File.new('/path/to/some/file') # File | +opts = { + dry_run: true, # Boolean | If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. + schema_version: 'schema_version_example' # String | The version of the collection schema +} + +begin + # Put the specified new object at the given key or overwrite an existing object at the given key + result = api_instance.put_object(collection_name, object_key, body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->put_object: #{e}" +end +``` + +#### Using the put_object_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> put_object_with_http_info(collection_name, object_key, body, opts) + +```ruby +begin + # Put the specified new object at the given key or overwrite an existing object at the given key + data, status_code, headers = api_instance.put_object_with_http_info(collection_name, object_key, body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->put_object_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **collection_name** | **String** | The name of the collection | | +| **object_key** | **String** | The object key | | +| **body** | **File** | | | +| **dry_run** | **Boolean** | If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. | [optional] | +| **schema_version** | **String** | The version of the collection schema | [optional] | + +### Return type + +[**CustomType3191042536**](CustomType3191042536.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/octet-stream, application/json +- **Accept**: application/json + + +## search_objects + +> search_objects(collection_name, filter, opts) + +Search for objects that match the specified filter criteria (returns metadata, not actual objects) + +### 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::CustomStorageApi.new +collection_name = 'collection_name_example' # String | The name of the collection +filter = 'filter_example' # String | The filter to limit the returned results. +opts = { + limit: 56, # Integer | The limit of results to return + offset: 56, # Integer | The offset of results to return + sort: 'sort_example' # String | The sort order for the returned results. +} + +begin + # Search for objects that match the specified filter criteria (returns metadata, not actual objects) + result = api_instance.search_objects(collection_name, filter, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->search_objects: #{e}" +end +``` + +#### Using the search_objects_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_objects_with_http_info(collection_name, filter, opts) + +```ruby +begin + # Search for objects that match the specified filter criteria (returns metadata, not actual objects) + data, status_code, headers = api_instance.search_objects_with_http_info(collection_name, filter, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling CustomStorageApi->search_objects_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **collection_name** | **String** | The name of the collection | | +| **filter** | **String** | The filter to limit the returned results. | | +| **limit** | **Integer** | The limit of results to return | [optional] | +| **offset** | **Integer** | The offset of results to return | [optional] | +| **sort** | **String** | The sort order for the returned results. | [optional] | + +### Return type + +[**CustomType3191042536**](CustomType3191042536.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/CustomType1255839303.md b/docs/CustomType1255839303.md new file mode 100644 index 00000000..4840c5b1 --- /dev/null +++ b/docs/CustomType1255839303.md @@ -0,0 +1,22 @@ +# Falcon::CustomType1255839303 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**ApiMetaInfo**](ApiMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::CustomType1255839303.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/CustomType3191042536.md b/docs/CustomType3191042536.md new file mode 100644 index 00000000..75dfbb6e --- /dev/null +++ b/docs/CustomType3191042536.md @@ -0,0 +1,22 @@ +# Falcon::CustomType3191042536 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**ApiMetaInfo**](ApiMetaInfo.md) | | | +| **resources** | [**Array<ApiObjectMetadata>**](ApiObjectMetadata.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::CustomType3191042536.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/D4cRegistrationApi.md b/docs/D4cRegistrationApi.md index 0c8d30c8..cd20f213 100644 --- a/docs/D4cRegistrationApi.md +++ b/docs/D4cRegistrationApi.md @@ -4,16 +4,20 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | +| [**connect_d4_cgcp_account**](D4cRegistrationApi.md#connect_d4_cgcp_account) | **POST** /cloud-connect-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_d4_c_aws_account**](D4cRegistrationApi.md#create_d4_c_aws_account) | **POST** /cloud-connect-aws/entities/account/v2 | 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_d4_cgcp_account**](D4cRegistrationApi.md#create_d4_cgcp_account) | **POST** /cloud-connect-gcp/entities/account/v1 | Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. | | [**create_discover_cloud_azure_account**](D4cRegistrationApi.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**](D4cRegistrationApi.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**](D4cRegistrationApi.md#delete_d4_cgcp_account) | **DELETE** /cloud-connect-gcp/entities/account/v1 | Deletes a GCP account from the system. | | [**discover_cloud_azure_download_certificate**](D4cRegistrationApi.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**](D4cRegistrationApi.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**](D4cRegistrationApi.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_caws_account_scripts_attachment**](D4cRegistrationApi.md#get_d4_caws_account_scripts_attachment) | **GET** /cloud-connect-aws/entities/user-scripts-download/v1 | Return a script for customer to run in their cloud environment to grant us access to their AWS environment as a downloadable attachment. | | [**get_d4_ccgp_account**](D4cRegistrationApi.md#get_d4_ccgp_account) | **GET** /cloud-connect-gcp/entities/account/v1 | Returns information about the current status of an GCP account. | +| [**get_d4_cgcp_service_accounts_ext**](D4cRegistrationApi.md#get_d4_cgcp_service_accounts_ext) | **GET** /cloud-connect-gcp/entities/service-accounts/v1 | Returns the service account id and client email for external clients. | | [**get_d4_cgcp_user_scripts**](D4cRegistrationApi.md#get_d4_cgcp_user_scripts) | **GET** /cloud-connect-gcp/entities/user-scripts/v1 | Return a script for customer to run in their cloud environment to grant us access to their GCP environment | +| [**get_d4_cgcp_user_scripts_attachment**](D4cRegistrationApi.md#get_d4_cgcp_user_scripts_attachment) | **GET** /cloud-connect-gcp/entities/user-scripts-download/v1 | Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment | | [**get_discover_cloud_azure_account**](D4cRegistrationApi.md#get_discover_cloud_azure_account) | **GET** /cloud-connect-azure/entities/account/v1 | Return information about Azure account registration | | [**get_discover_cloud_azure_tenant_ids**](D4cRegistrationApi.md#get_discover_cloud_azure_tenant_ids) | **GET** /cloud-connect-azure/entities/tenant-id/v1 | Return available tenant ids for discover for cloud | | [**get_discover_cloud_azure_user_scripts**](D4cRegistrationApi.md#get_discover_cloud_azure_user_scripts) | **GET** /cloud-connect-azure/entities/user-scripts/v1 | Return a script for customer to run in their cloud environment to grant us access to their Azure environment | @@ -22,6 +26,75 @@ All URIs are relative to *https://api.crowdstrike.com* | [**update_discover_cloud_azure_account_client_id**](D4cRegistrationApi.md#update_discover_cloud_azure_account_client_id) | **PATCH** /cloud-connect-azure/entities/client-id/v1 | Update an Azure service account in our system by with the user-created client_id created with the public key we've provided | +## connect_d4_cgcp_account + +> connect_d4_cgcp_account(body) + +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 + +### 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::D4cRegistrationApi.new +body = Falcon::RegistrationGCPAccountExtRequestV2.new({resources: [Falcon::RegistrationGCPAccountReqObjV2.new({parent_id: 'parent_id_example'})]}) # RegistrationGCPAccountExtRequestV2 | + +begin + # 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 + result = api_instance.connect_d4_cgcp_account(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->connect_d4_cgcp_account: #{e}" +end +``` + +#### Using the connect_d4_cgcp_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> connect_d4_cgcp_account_with_http_info(body) + +```ruby +begin + # 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 + data, status_code, headers = api_instance.connect_d4_cgcp_account_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->connect_d4_cgcp_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RegistrationGCPAccountExtRequestV2**](RegistrationGCPAccountExtRequestV2.md) | | | + +### Return type + +[**RegistrationGCPAccountResponseExtV2**](RegistrationGCPAccountResponseExtV2.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## create_d4_c_aws_account > create_d4_c_aws_account(body) @@ -302,6 +375,77 @@ end - **Accept**: application/json +## delete_d4_cgcp_account + +> delete_d4_cgcp_account(opts) + +Deletes a GCP account from the system. + +### 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::D4cRegistrationApi.new +opts = { + ids: ['inner_example'] # Array | Hierarchical Resource IDs of accounts +} + +begin + # Deletes a GCP account from the system. + result = api_instance.delete_d4_cgcp_account(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->delete_d4_cgcp_account: #{e}" +end +``` + +#### Using the delete_d4_cgcp_account_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_d4_cgcp_account_with_http_info(opts) + +```ruby +begin + # Deletes a GCP account from the system. + data, status_code, headers = api_instance.delete_d4_cgcp_account_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->delete_d4_cgcp_account_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | Hierarchical Resource IDs of accounts | [optional] | + +### Return type + +[**MsaBaseEntitiesResponse**](MsaBaseEntitiesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## discover_cloud_azure_download_certificate > discover_cloud_azure_download_certificate(tenant_id, opts) @@ -404,7 +548,7 @@ opts = { status: 'status_example', # String | Account status to filter results by. limit: 56, # Integer | The maximum records to return. Defaults to 100. offset: 56, # Integer | The offset to start retrieving records from - migrated: 'false' # String | Only return migrated d4c accounts + migrated: 'true' # String | Only return migrated d4c accounts } begin @@ -685,6 +829,77 @@ end - **Accept**: application/json +## get_d4_cgcp_service_accounts_ext + +> get_d4_cgcp_service_accounts_ext(opts) + +Returns the service account id and client email for external clients. + +### 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::D4cRegistrationApi.new +opts = { + id: 'id_example' # String | Service Account ID +} + +begin + # Returns the service account id and client email for external clients. + result = api_instance.get_d4_cgcp_service_accounts_ext(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->get_d4_cgcp_service_accounts_ext: #{e}" +end +``` + +#### Using the get_d4_cgcp_service_accounts_ext_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_d4_cgcp_service_accounts_ext_with_http_info(opts) + +```ruby +begin + # Returns the service account id and client email for external clients. + data, status_code, headers = api_instance.get_d4_cgcp_service_accounts_ext_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->get_d4_cgcp_service_accounts_ext_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Service Account ID | [optional] | + +### Return type + +[**RegistrationGCPServiceAccountResponseExtV1**](RegistrationGCPServiceAccountResponseExtV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_d4_cgcp_user_scripts > get_d4_cgcp_user_scripts(opts) @@ -756,6 +971,81 @@ end - **Accept**: application/json +## get_d4_cgcp_user_scripts_attachment + +> get_d4_cgcp_user_scripts_attachment(opts) + +Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + +### 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::D4cRegistrationApi.new +opts = { + parent_type: 'Folder', # String | GCP Hierarchy Parent Type, organization/folder/project + ids: ['inner_example'], # Array | Hierarchical Resource IDs of accounts + status: 'operational' # String | Account status to filter results by. +} + +begin + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + result = api_instance.get_d4_cgcp_user_scripts_attachment(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->get_d4_cgcp_user_scripts_attachment: #{e}" +end +``` + +#### Using the get_d4_cgcp_user_scripts_attachment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_d4_cgcp_user_scripts_attachment_with_http_info(opts) + +```ruby +begin + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + data, status_code, headers = api_instance.get_d4_cgcp_user_scripts_attachment_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling D4cRegistrationApi->get_d4_cgcp_user_scripts_attachment_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **parent_type** | **String** | GCP Hierarchy Parent Type, organization/folder/project | [optional] | +| **ids** | [**Array<String>**](String.md) | Hierarchical Resource IDs of accounts | [optional] | +| **status** | **String** | Account status to filter results by. | [optional] | + +### Return type + +[**RegistrationGCPProvisionGetUserScriptResponseV1**](RegistrationGCPProvisionGetUserScriptResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/octet-stream + + ## get_discover_cloud_azure_account > get_discover_cloud_azure_account(opts) @@ -992,7 +1282,8 @@ api_instance = Falcon::D4cRegistrationApi.new tenant_id = ['inner_example'] # Array | Azure Tenant ID opts = { subscription_ids: ['inner_example'], # Array | Azure Subscription ID - template: 'template_example' # String | Template to be rendered + template: 'template_example', # String | Template to be rendered + azure_management_group: true # Boolean | Use Azure Management Group } begin @@ -1029,6 +1320,7 @@ end | **tenant_id** | [**Array<String>**](String.md) | Azure Tenant ID | | | **subscription_ids** | [**Array<String>**](String.md) | Azure Subscription ID | [optional] | | **template** | **String** | Template to be rendered | [optional] | +| **azure_management_group** | **Boolean** | Use Azure Management Group | [optional] | ### Return type diff --git a/docs/DefinitionsDefinitionEntitiesResponse.md b/docs/DefinitionsDefinitionEntitiesResponse.md new file mode 100644 index 00000000..6c158cd7 --- /dev/null +++ b/docs/DefinitionsDefinitionEntitiesResponse.md @@ -0,0 +1,22 @@ +# Falcon::DefinitionsDefinitionEntitiesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsDefinitionEntitiesResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DefinitionsDefinitionExt.md b/docs/DefinitionsDefinitionExt.md new file mode 100644 index 00000000..2344e317 --- /dev/null +++ b/docs/DefinitionsDefinitionExt.md @@ -0,0 +1,26 @@ +# Falcon::DefinitionsDefinitionExt + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **definition** | [**V2Definition**](V2Definition.md) | | | +| **enabled** | **Boolean** | Indicates whether the workflow is enabled and active or not. | | +| **id** | **String** | Unique identifier for the trigger. | | +| **last_modified_timestamp** | **Time** | Timestamp of when this version of the workflow was created. | | +| **version** | **Integer** | Version of the workflow. A given definition ID can have many versions. Each time an update is applied a new version is generated. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsDefinitionExt.new( + definition: null, + enabled: null, + id: null, + last_modified_timestamp: null, + version: null +) +``` + diff --git a/docs/DefinitionsDefinitionExternalResponse.md b/docs/DefinitionsDefinitionExternalResponse.md new file mode 100644 index 00000000..82162989 --- /dev/null +++ b/docs/DefinitionsDefinitionExternalResponse.md @@ -0,0 +1,22 @@ +# Falcon::DefinitionsDefinitionExternalResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<DefinitionsDefinitionExt>**](DefinitionsDefinitionExt.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsDefinitionExternalResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DefinitionsDefinitionImportResponse.md b/docs/DefinitionsDefinitionImportResponse.md new file mode 100644 index 00000000..fcdd2f81 --- /dev/null +++ b/docs/DefinitionsDefinitionImportResponse.md @@ -0,0 +1,22 @@ +# Falcon::DefinitionsDefinitionImportResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<DefinitionsDefinitionImportResponseEntity>**](DefinitionsDefinitionImportResponseEntity.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsDefinitionImportResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DefinitionsDefinitionImportResponseEntity.md b/docs/DefinitionsDefinitionImportResponseEntity.md new file mode 100644 index 00000000..135b11cb --- /dev/null +++ b/docs/DefinitionsDefinitionImportResponseEntity.md @@ -0,0 +1,28 @@ +# Falcon::DefinitionsDefinitionImportResponseEntity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **model** | [**GraphDefinitionModel**](GraphDefinitionModel.md) | | [optional] | +| **name** | **String** | | [optional] | +| **parameters** | [**Array<DefinitionsPlaybookParameter>**](DefinitionsPlaybookParameter.md) | | | +| **validation_errors** | [**Array<GraphValidationError>**](GraphValidationError.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsDefinitionImportResponseEntity.new( + description: null, + id: null, + model: null, + name: null, + parameters: null, + validation_errors: null +) +``` + diff --git a/docs/DefinitionsFlightControlRequest.md b/docs/DefinitionsFlightControlRequest.md new file mode 100644 index 00000000..4af6421a --- /dev/null +++ b/docs/DefinitionsFlightControlRequest.md @@ -0,0 +1,24 @@ +# Falcon::DefinitionsFlightControlRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **all_cids** | **Boolean** | Flag to specify the workflow should apply to all child CIDs | | +| **excluded_cids** | **Array<String>** | Child CIDs that are excluded from workflow propagation used in conjunction with the all_cids flag | [optional] | +| **include_parent_cid** | **Boolean** | Flag to specify whether the workflow should apply to the current (parent) CID, in addition to specified child CIDs | | +| **selected_cids** | **Array<String>** | List of child CIDs that the workflow should apply to if not propagating to all CIDs | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsFlightControlRequest.new( + all_cids: null, + excluded_cids: null, + include_parent_cid: null, + selected_cids: null +) +``` + diff --git a/docs/DefinitionsParameterProperty.md b/docs/DefinitionsParameterProperty.md new file mode 100644 index 00000000..be799f5f --- /dev/null +++ b/docs/DefinitionsParameterProperty.md @@ -0,0 +1,18 @@ +# Falcon::DefinitionsParameterProperty + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsParameterProperty.new( + name: null +) +``` + diff --git a/docs/DefinitionsPlaybookParameter.md b/docs/DefinitionsPlaybookParameter.md new file mode 100644 index 00000000..934e6740 --- /dev/null +++ b/docs/DefinitionsPlaybookParameter.md @@ -0,0 +1,20 @@ +# Falcon::DefinitionsPlaybookParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **node_id** | **String** | id of the node in the model where the parameter needs to be applied | | +| **properties** | [**Array<DefinitionsParameterProperty>**](DefinitionsParameterProperty.md) | list of properties that need to be parameterized | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DefinitionsPlaybookParameter.new( + node_id: null, + properties: null +) +``` + diff --git a/docs/DetectionsApiAssessmentDetections.md b/docs/DetectionsApiAssessmentDetections.md new file mode 100644 index 00000000..1f4fcfa5 --- /dev/null +++ b/docs/DetectionsApiAssessmentDetections.md @@ -0,0 +1,22 @@ +# Falcon::DetectionsApiAssessmentDetections + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIAssessmentDetections>**](ModelsAPIAssessmentDetections.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectionsApiAssessmentDetections.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/DetectionsApiCombinedDetections.md b/docs/DetectionsApiCombinedDetections.md new file mode 100644 index 00000000..d8c5109a --- /dev/null +++ b/docs/DetectionsApiCombinedDetections.md @@ -0,0 +1,22 @@ +# Falcon::DetectionsApiCombinedDetections + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPICombinedDetections>**](ModelsAPICombinedDetections.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectionsApiCombinedDetections.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/DetectionsApiDetectionsBySeverity.md b/docs/DetectionsApiDetectionsBySeverity.md new file mode 100644 index 00000000..f04781ac --- /dev/null +++ b/docs/DetectionsApiDetectionsBySeverity.md @@ -0,0 +1,22 @@ +# Falcon::DetectionsApiDetectionsBySeverity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectionsApiDetectionsBySeverity.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DetectionsApiDetectionsByType.md b/docs/DetectionsApiDetectionsByType.md new file mode 100644 index 00000000..ec9dd97f --- /dev/null +++ b/docs/DetectionsApiDetectionsByType.md @@ -0,0 +1,22 @@ +# Falcon::DetectionsApiDetectionsByType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectionsApiDetectionsByType.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DetectionsApiDetectionsCount.md b/docs/DetectionsApiDetectionsCount.md new file mode 100644 index 00000000..2f51e985 --- /dev/null +++ b/docs/DetectionsApiDetectionsCount.md @@ -0,0 +1,22 @@ +# Falcon::DetectionsApiDetectionsCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIDetectionCount>**](ModelsAPIDetectionCount.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectionsApiDetectionsCount.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/DetectsAlert.md b/docs/DetectsAlert.md index c2e1d755..46e35088 100644 --- a/docs/DetectsAlert.md +++ b/docs/DetectsAlert.md @@ -4,40 +4,47 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **agent_id** | **String** | | [optional] | -| **aggregate_id** | **String** | | [optional] | -| **assigned_to_name** | **String** | | [optional] | -| **assigned_to_uid** | **String** | | [optional] | -| **assigned_to_uuid** | **String** | | [optional] | -| **cid** | **String** | | [optional] | -| **composite_id** | **String** | | [optional] | -| **confidence** | **Integer** | | [optional] | -| **crawl_edge_ids** | **Hash<String, Array<String>>** | | [optional] | -| **crawl_vertex_ids** | **Hash<String, Array<String>>** | | [optional] | -| **crawled_timestamp** | **Time** | | [optional] | -| **created_timestamp** | **Time** | | [optional] | -| **description** | **String** | | [optional] | -| **display_name** | **String** | | [optional] | -| **email_sent** | **Boolean** | | [optional] | -| **external** | **Boolean** | | [optional] | -| **id** | **String** | | | -| **name** | **String** | | [optional] | -| **objective** | **String** | | [optional] | -| **pattern_id** | **Integer** | | [optional] | -| **platform** | **String** | | [optional] | -| **product** | **String** | | [optional] | -| **scenario** | **String** | | [optional] | -| **severity** | **Integer** | | [optional] | -| **show_in_ui** | **Boolean** | | [optional] | -| **status** | **String** | | [optional] | -| **tactic** | **String** | | [optional] | -| **tactic_id** | **String** | | [optional] | -| **tags** | **Array<String>** | | [optional] | -| **technique** | **String** | | [optional] | -| **technique_id** | **String** | | [optional] | -| **timestamp** | **Time** | | [optional] | -| **type** | **String** | | | -| **updated_timestamp** | **Time** | | [optional] | +| **agent_id** | **String** | Device or sensor ID for which the Alert was generated | [optional] | +| **aggregate_id** | **String** | Common linkage between multiple Alerts that belong so the same detection bouquet | [optional] | +| **assigned_to_name** | **String** | Name of the person this Alert is assigned to | [optional] | +| **assigned_to_uid** | **String** | UserID to which this Alert is assigned to | [optional] | +| **assigned_to_uuid** | **String** | UUID to which this Alert is assigned to | [optional] | +| **cid** | **String** | Unique ID of CrowdStrike customers | [optional] | +| **composite_id** | **String** | An opaque internal identifier that can uniquely identify an Alert | [optional] | +| **confidence** | **Integer** | Confidence is a 1-100 integer value denoting the confidence that, when this Alert fires, it is indicative of malicious activity | [optional] | +| **crawl_edge_ids** | **Hash<String, Array<String>>** | internal only | [optional] | +| **crawl_vertex_ids** | **Hash<String, Array<String>>** | internal only | [optional] | +| **crawled_timestamp** | **Time** | indicates when ThreatGraph was crawled to gather info for this alert creation/update | [optional] | +| **created_timestamp** | **Time** | indicates when the Alert was first written to backend store | [optional] | +| **data_domains** | **Array<String>** | Data Domains represents domains to which this alert belongs to | [optional] | +| **description** | **String** | Short, customer-visible summary of the detected activity | [optional] | +| **display_name** | **String** | Customer visible name for the Alert's pattern | [optional] | +| **email_sent** | **Boolean** | Boolean to know if we sent email regarding this Alert | [optional] | +| **es_doc_id** | **String** | internal only | [optional] | +| **es_doc_version** | **Integer** | internal only | [optional] | +| **es_routing_id** | **String** | internal only | [optional] | +| **external** | **Boolean** | Boolean indicating if this Alert is internal or external | [optional] | +| **id** | **String** | Vertex key which triggers the formation of the Alert | [optional] | +| **name** | **String** | Pattern Name coming either from Taxonomy or directly from the ingested Alert | [optional] | +| **objective** | **String** | End goal that an attack adversary intends to achieve according to MITRE | [optional] | +| **pattern_id** | **Integer** | Taxonomy patternID for this Alert | [optional] | +| **platform** | **String** | Platform that this Alert was triggered on e.g. Android, Windows, etc.. | [optional] | +| **poly_id** | **String** | | [optional] | +| **product** | **String** | Product specifies the SKU that this Alert belongs to e.g. mobile, idp, epp | [optional] | +| **scenario** | **String** | Scenario was used pre-Handrails to display additional killchain context for UI alerts. With handrails, this field is mostly obsolete in favor of tactic/technique. Still, it can be useful for determining specific pattern types that are not straightforward to distinguish from other fields alone | [optional] | +| **severity** | **Integer** | Severity is also a 1-100 integer value, but unlike confidence severity impacts how a Alert is displayed in the UI | [optional] | +| **show_in_ui** | **Boolean** | Boolean indicating if this Alert will be shown in the UI or if it's hidden' | [optional] | +| **source_products** | **Array<String>** | Source Products are products that produced events which contributed to this alert | [optional] | +| **source_vendors** | **Array<String>** | Source Vendors are vendors that produced events which contributed to this alert | [optional] | +| **status** | **String** | Could be one of the following - New, closed, in_progress, reopened | [optional] | +| **tactic** | **String** | Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures | [optional] | +| **tactic_id** | **String** | Unique ID for the tactic seen in the Alert | [optional] | +| **tags** | **Array<String>** | Tags are string values associated with the alert that can be added or removed through the API | [optional] | +| **technique** | **String** | Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures | [optional] | +| **technique_id** | **String** | Unique ID for the technique seen in the Alert | [optional] | +| **timestamp** | **Time** | stored value coming in directly from the ingested event or set by cloud in the absence of it | [optional] | +| **type** | **String** | Type of definition Detections Extensibility use. Keyed-off of Pattern of the incoming events/Alerts | | +| **updated_timestamp** | **Time** | indicates when the Alert was last modified | [optional] | ## Example @@ -57,19 +64,26 @@ instance = Falcon::DetectsAlert.new( crawl_vertex_ids: null, crawled_timestamp: null, created_timestamp: null, + data_domains: null, description: null, display_name: null, email_sent: null, + es_doc_id: null, + es_doc_version: null, + es_routing_id: null, external: null, id: null, name: null, objective: null, pattern_id: null, platform: null, + poly_id: null, product: null, scenario: null, severity: null, show_in_ui: null, + source_products: null, + source_vendors: null, status: null, tactic: null, tactic_id: null, diff --git a/docs/DetectsapiAggregateAlertQueryRequest.md b/docs/DetectsapiAggregateAlertQueryRequest.md new file mode 100644 index 00000000..47b319d2 --- /dev/null +++ b/docs/DetectsapiAggregateAlertQueryRequest.md @@ -0,0 +1,52 @@ +# Falcon::DetectsapiAggregateAlertQueryRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **date_ranges** | [**Array<MsaDateRangeSpec>**](MsaDateRangeSpec.md) | DateRanges applies to date_range aggregations. | | +| **exclude** | **String** | Exclude Post-filtering on queried fields | | +| **field** | **String** | Field applies for example to date_histogram and range aggregations. | | +| **filter** | **String** | FQL query specifying the filter parameters. | | +| **from** | **Integer** | used in bucket sort aggregations as an offset | | +| **include** | **String** | Include Post-filtering on queried fields | | +| **interval** | **String** | Interval applies for example to date_histogram aggregations (uses calendar_interval). Possible values: year, month, week, day, hour, minute. | | +| **max_doc_count** | **Integer** | only return terms that match less than a configured number of hits. | [optional] | +| **min_doc_count** | **Integer** | only return terms that match more than a configured number of hits. | [optional] | +| **missing** | **String** | Missing is a value for missing term field. The behavior that query should return if the document does not have the field in the query | | +| **name** | **String** | Name of the aggregate query | | +| **q** | **String** | represents full text query | | +| **ranges** | [**Array<MsaRangeSpec>**](MsaRangeSpec.md) | Ranges applies to range aggregations. | | +| **size** | **Integer** | how many term buckets should be returned. | | +| **sort** | **String** | Sort spec, ex: 'pattern_id|desc'. | | +| **sub_aggregates** | [**Array<DetectsapiAggregateAlertQueryRequest>**](DetectsapiAggregateAlertQueryRequest.md) | sub aggregate alert query. | | +| **time_zone** | **String** | TimeZone timezone to specify when bucketing results. | | +| **type** | **String** | Datastore supported value types: term, terms, date_histogram, facet, range, cardinality. Exact allowed values specific to endpoint. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiAggregateAlertQueryRequest.new( + date_ranges: null, + exclude: null, + field: null, + filter: null, + from: null, + include: null, + interval: null, + max_doc_count: null, + min_doc_count: null, + missing: null, + name: null, + q: null, + ranges: null, + size: null, + sort: null, + sub_aggregates: null, + time_zone: null, + type: null +) +``` + diff --git a/docs/DetectsapiAggregatesResponse.md b/docs/DetectsapiAggregatesResponse.md new file mode 100644 index 00000000..151360c6 --- /dev/null +++ b/docs/DetectsapiAggregatesResponse.md @@ -0,0 +1,22 @@ +# Falcon::DetectsapiAggregatesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<DetectsapiAggregationResult>**](DetectsapiAggregationResult.md) | collection of aggregate query results | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiAggregatesResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DetectsapiAggregationResult.md b/docs/DetectsapiAggregationResult.md new file mode 100644 index 00000000..b952f280 --- /dev/null +++ b/docs/DetectsapiAggregationResult.md @@ -0,0 +1,22 @@ +# Falcon::DetectsapiAggregationResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **buckets** | [**Array<DetectsapiAggregationResultItem>**](DetectsapiAggregationResultItem.md) | collection of aggregate results matching the criteria | | +| **name** | **String** | aggregate query name as provided in the request | | +| **sum_other_doc_count** | **Integer** | sum of the document counts for all buckets that are not part of the response | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiAggregationResult.new( + buckets: null, + name: null, + sum_other_doc_count: null +) +``` + diff --git a/docs/DetectsapiAggregationResultItem.md b/docs/DetectsapiAggregationResultItem.md new file mode 100644 index 00000000..c837db10 --- /dev/null +++ b/docs/DetectsapiAggregationResultItem.md @@ -0,0 +1,36 @@ +# Falcon::DetectsapiAggregationResultItem + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | total count of items falling in this bucket | | +| **from** | **Float** | used to determine the start of the range in aggregations | [optional] | +| **key_as_string** | **String** | the formatted string version using the format parameter specification | [optional] | +| **label** | **Object** | | [optional] | +| **string_from** | **String** | string representation of 'From' date | [optional] | +| **string_to** | **String** | string representation of 'To' date | [optional] | +| **sub_aggregates** | [**Array<DetectsapiAggregationResult>**](DetectsapiAggregationResult.md) | nested aggregation result | [optional] | +| **to** | **Float** | used to determine end of the range in aggregations | [optional] | +| **value** | **Float** | numeric aggregations (Min, Max, Avg, Percentile...) | [optional] | +| **value_as_string** | **String** | string representation of Value | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiAggregationResultItem.new( + count: null, + from: null, + key_as_string: null, + label: null, + string_from: null, + string_to: null, + sub_aggregates: null, + to: null, + value: null, + value_as_string: null +) +``` + diff --git a/docs/DetectsapiAlertQueryResponse.md b/docs/DetectsapiAlertQueryResponse.md new file mode 100644 index 00000000..5a726fd3 --- /dev/null +++ b/docs/DetectsapiAlertQueryResponse.md @@ -0,0 +1,22 @@ +# Falcon::DetectsapiAlertQueryResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | Array of the Alerts requested | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiAlertQueryResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DetectsapiPatchEntitiesAlertsV3Request.md b/docs/DetectsapiPatchEntitiesAlertsV3Request.md new file mode 100644 index 00000000..ccaa1777 --- /dev/null +++ b/docs/DetectsapiPatchEntitiesAlertsV3Request.md @@ -0,0 +1,20 @@ +# Falcon::DetectsapiPatchEntitiesAlertsV3Request + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action_parameters** | [**Array<MsaspecActionParameter>**](MsaspecActionParameter.md) | | [optional] | +| **composite_ids** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiPatchEntitiesAlertsV3Request.new( + action_parameters: null, + composite_ids: null +) +``` + diff --git a/docs/DetectsapiPostEntitiesAlertsV1Request.md b/docs/DetectsapiPostEntitiesAlertsV1Request.md index 1a560f06..216e4f4e 100644 --- a/docs/DetectsapiPostEntitiesAlertsV1Request.md +++ b/docs/DetectsapiPostEntitiesAlertsV1Request.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **ids** | **Array<String>** | | | +| **ids** | **Array<String>** | IDs represent the slice of Alert IDs that would be looked up | | ## Example diff --git a/docs/DetectsapiPostEntitiesAlertsV1Response.md b/docs/DetectsapiPostEntitiesAlertsV1Response.md index 6e0c00e5..5ea030cd 100644 --- a/docs/DetectsapiPostEntitiesAlertsV1Response.md +++ b/docs/DetectsapiPostEntitiesAlertsV1Response.md @@ -6,7 +6,7 @@ | ---- | ---- | ----------- | ----- | | **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | | **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | -| **resources** | [**Array<DetectsAlert>**](DetectsAlert.md) | | | +| **resources** | [**Array<DetectsAlert>**](DetectsAlert.md) | Resources represent the slice of Alerts that were retrieved for the given Alert IDs | | ## Example diff --git a/docs/DetectsapiPostEntitiesAlertsV2Request.md b/docs/DetectsapiPostEntitiesAlertsV2Request.md new file mode 100644 index 00000000..767eee9c --- /dev/null +++ b/docs/DetectsapiPostEntitiesAlertsV2Request.md @@ -0,0 +1,18 @@ +# Falcon::DetectsapiPostEntitiesAlertsV2Request + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **composite_ids** | **Array<String>** | CompositeIDs represent the slice of Alert CompositeIDs that would be looked up | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiPostEntitiesAlertsV2Request.new( + composite_ids: null +) +``` + diff --git a/docs/DetectsapiPostEntitiesAlertsV2Response.md b/docs/DetectsapiPostEntitiesAlertsV2Response.md new file mode 100644 index 00000000..3ec1a358 --- /dev/null +++ b/docs/DetectsapiPostEntitiesAlertsV2Response.md @@ -0,0 +1,22 @@ +# Falcon::DetectsapiPostEntitiesAlertsV2Response + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<DetectsAlert>**](DetectsAlert.md) | Resources represent the slice of Alerts that were retrieved for the given Alert IDs | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiPostEntitiesAlertsV2Response.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DetectsapiResponseFields.md b/docs/DetectsapiResponseFields.md new file mode 100644 index 00000000..72726756 --- /dev/null +++ b/docs/DetectsapiResponseFields.md @@ -0,0 +1,20 @@ +# Falcon::DetectsapiResponseFields + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DetectsapiResponseFields.new( + errors: null, + meta: null +) +``` + diff --git a/docs/DeviceDevice.md b/docs/DeviceDevice.md index 5c4fdbcb..4118d7cf 100644 --- a/docs/DeviceDevice.md +++ b/docs/DeviceDevice.md @@ -41,7 +41,9 @@ | **k8s_cluster_version** | **String** | | [optional] | | **kernel_version** | **String** | | [optional] | | **last_login_timestamp** | **String** | | [optional] | +| **last_login_uid** | **String** | | [optional] | | **last_login_user** | **String** | | [optional] | +| **last_login_user_sid** | **String** | | [optional] | | **last_reboot** | **String** | | [optional] | | **last_seen** | **String** | | [optional] | | **linux_sensor_mode** | **String** | | [optional] | @@ -134,7 +136,9 @@ instance = Falcon::DeviceDevice.new( k8s_cluster_version: null, kernel_version: null, last_login_timestamp: null, + last_login_uid: null, last_login_user: null, + last_login_user_sid: null, last_reboot: null, last_seen: null, linux_sensor_mode: null, diff --git a/docs/DeviceMappedDevicePolicies.md b/docs/DeviceMappedDevicePolicies.md index eb64c769..d6cfa87d 100644 --- a/docs/DeviceMappedDevicePolicies.md +++ b/docs/DeviceMappedDevicePolicies.md @@ -12,6 +12,7 @@ | **fim** | [**DeviceDevicePolicy**](DeviceDevicePolicy.md) | | [optional] | | **firewall** | [**DeviceDevicePolicy**](DeviceDevicePolicy.md) | | [optional] | | **global_config** | [**DeviceDevicePolicy**](DeviceDevicePolicy.md) | | [optional] | +| **host_retention** | [**DeviceDevicePolicy**](DeviceDevicePolicy.md) | | [optional] | | **identity_protection** | [**DeviceDevicePolicy**](DeviceDevicePolicy.md) | | [optional] | | **jumpcloud** | [**DeviceDevicePolicy**](DeviceDevicePolicy.md) | | [optional] | | **kubernetes_admission_control** | [**DeviceDevicePolicy**](DeviceDevicePolicy.md) | | [optional] | @@ -38,6 +39,7 @@ instance = Falcon::DeviceMappedDevicePolicies.new( fim: null, firewall: null, global_config: null, + host_retention: null, identity_protection: null, jumpcloud: null, kubernetes_admission_control: null, diff --git a/docs/DeviceapiDeviceSwagger.md b/docs/DeviceapiDeviceSwagger.md index 9d527fbb..4c8835be 100644 --- a/docs/DeviceapiDeviceSwagger.md +++ b/docs/DeviceapiDeviceSwagger.md @@ -19,6 +19,7 @@ | **connection_ip** | **String** | | [optional] | | **connection_mac_address** | **String** | | [optional] | | **cpu_signature** | **String** | | [optional] | +| **cpu_vendor** | **String** | | [optional] | | **default_gateway_ip** | **String** | | [optional] | | **deployment_type** | **String** | | [optional] | | **detection_suppression_status** | **String** | | [optional] | @@ -40,6 +41,9 @@ | **k8s_cluster_version** | **String** | | [optional] | | **kernel_version** | **String** | | [optional] | | **last_login_timestamp** | **String** | | [optional] | +| **last_login_uid** | **String** | | [optional] | +| **last_login_user** | **String** | | [optional] | +| **last_login_user_sid** | **String** | | [optional] | | **last_reboot** | **String** | | [optional] | | **last_seen** | **String** | | [optional] | | **linux_sensor_mode** | **String** | | [optional] | @@ -109,6 +113,7 @@ instance = Falcon::DeviceapiDeviceSwagger.new( connection_ip: null, connection_mac_address: null, cpu_signature: null, + cpu_vendor: null, default_gateway_ip: null, deployment_type: null, detection_suppression_status: null, @@ -130,6 +135,9 @@ instance = Falcon::DeviceapiDeviceSwagger.new( k8s_cluster_version: null, kernel_version: null, last_login_timestamp: null, + last_login_uid: null, + last_login_user: null, + last_login_user_sid: null, last_reboot: null, last_seen: null, linux_sensor_mode: null, diff --git a/docs/DomainAPIFindingRuleV1.md b/docs/DomainAPIFindingRuleV1.md index ee05f18f..611a200e 100644 --- a/docs/DomainAPIFindingRuleV1.md +++ b/docs/DomainAPIFindingRuleV1.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **authority** | **String** | | [optional] | +| **benchmark_type** | **String** | | [optional] | | **cce** | **String** | | [optional] | | **edited** | **Boolean** | | | | **group_id** | **String** | | [optional] | @@ -13,6 +14,7 @@ | **last_edited_timestamp** | **String** | | [optional] | | **mitre_attack_tactics** | [**Array<DomainAPIMitreAttackTacticV1>**](DomainAPIMitreAttackTacticV1.md) | | [optional] | | **name** | **String** | | [optional] | +| **platform_name** | **String** | | [optional] | | **policy_id** | **String** | | [optional] | | **policy_name** | **String** | | [optional] | | **recommendation_id** | **String** | | [optional] | @@ -25,6 +27,7 @@ require 'crimson-falcon' instance = Falcon::DomainAPIFindingRuleV1.new( authority: null, + benchmark_type: null, cce: null, edited: null, group_id: null, @@ -33,6 +36,7 @@ instance = Falcon::DomainAPIFindingRuleV1.new( last_edited_timestamp: null, mitre_attack_tactics: null, name: null, + platform_name: null, policy_id: null, policy_name: null, recommendation_id: null, diff --git a/docs/DomainAPIFindingWithRuleV1.md b/docs/DomainAPIFindingWithRuleV1.md index 005b8617..94eefaf0 100644 --- a/docs/DomainAPIFindingWithRuleV1.md +++ b/docs/DomainAPIFindingWithRuleV1.md @@ -7,6 +7,7 @@ | **evaluation_logic_type** | **String** | Example values: NOT_AVAILABLE, AVAILABLE, DISABLE_RULE, UNSUPPORTED_RULE, OVERRIDE_STATUS | [optional] | | **evaluation_reason** | **String** | | [optional] | | **host_id** | **String** | | [optional] | +| **policy_host_groups** | **Array<String>** | | [optional] | | **rule** | [**DomainAPIFindingRuleV1**](DomainAPIFindingRuleV1.md) | | [optional] | | **status** | **String** | | [optional] | | **status_since_timestamp** | **String** | | [optional] | @@ -20,6 +21,7 @@ instance = Falcon::DomainAPIFindingWithRuleV1.new( evaluation_logic_type: null, evaluation_reason: null, host_id: null, + policy_host_groups: null, rule: null, status: null, status_since_timestamp: null diff --git a/docs/DomainAPIHostInfoFacetV1.md b/docs/DomainAPIHostInfoFacetV1.md index 02d78466..be5a6511 100644 --- a/docs/DomainAPIHostInfoFacetV1.md +++ b/docs/DomainAPIHostInfoFacetV1.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **asset_criticality** | [**DomainAssetCriticalityInfoV1**](DomainAssetCriticalityInfoV1.md) | | [optional] | | **build_number** | **String** | | [optional] | | **groups** | [**Array<DomainAPIHostGroup>**](DomainAPIHostGroup.md) | | | | **host_hidden_status** | **String** | | [optional] | @@ -29,6 +30,7 @@ require 'crimson-falcon' instance = Falcon::DomainAPIHostInfoFacetV1.new( + asset_criticality: null, build_number: null, groups: null, host_hidden_status: null, diff --git a/docs/DomainAPIRuleDetailsResponseV1.md b/docs/DomainAPIRuleDetailsResponseV1.md new file mode 100644 index 00000000..9d53e7fb --- /dev/null +++ b/docs/DomainAPIRuleDetailsResponseV1.md @@ -0,0 +1,22 @@ +# Falcon::DomainAPIRuleDetailsResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<DomainAPIRuleDetailsV1>**](DomainAPIRuleDetailsV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainAPIRuleDetailsResponseV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DomainAPIRuleDetailsV1.md b/docs/DomainAPIRuleDetailsV1.md new file mode 100644 index 00000000..c76e8234 --- /dev/null +++ b/docs/DomainAPIRuleDetailsV1.md @@ -0,0 +1,46 @@ +# Falcon::DomainAPIRuleDetailsV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **additional_information** | **String** | | | +| **applicable_profiles** | **Array<String>** | | | +| **assessment_status** | **String** | | | +| **audit_procedure** | **String** | | | +| **authority** | **String** | | | +| **benchmark_title** | **String** | | | +| **description** | **String** | | | +| **id** | **String** | | | +| **impact_statement** | **String** | | | +| **platform** | **String** | | | +| **rationale_statement** | **String** | | | +| **recommendation_id** | **String** | | | +| **references** | **Array<String>** | | [optional] | +| **remediation_procedure** | **String** | | | +| **title** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainAPIRuleDetailsV1.new( + additional_information: null, + applicable_profiles: null, + assessment_status: null, + audit_procedure: null, + authority: null, + benchmark_title: null, + description: null, + id: null, + impact_statement: null, + platform: null, + rationale_statement: null, + recommendation_id: null, + references: null, + remediation_procedure: null, + title: null +) +``` + diff --git a/docs/DomainAPIVulnerabilityAppV2.md b/docs/DomainAPIVulnerabilityAppV2.md index 0fdc54ae..bc5d5376 100644 --- a/docs/DomainAPIVulnerabilityAppV2.md +++ b/docs/DomainAPIVulnerabilityAppV2.md @@ -4,7 +4,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **product_name_version** | **String** | | | +| **product_name_normalized** | **String** | Refers to the normalized product name of the product for which the vulnerability has been detected | | +| **product_name_version** | **String** | Refers to the un-normalized combination of product name and version of the product for which the vulnerability has been detected | | ## Example @@ -12,6 +13,7 @@ require 'crimson-falcon' instance = Falcon::DomainAPIVulnerabilityAppV2.new( + product_name_normalized: null, product_name_version: null ) ``` diff --git a/docs/DomainAPIVulnerabilityCVEDetailsFacetV2.md b/docs/DomainAPIVulnerabilityCVEDetailsFacetV2.md index 30bd675e..d4625d8c 100644 --- a/docs/DomainAPIVulnerabilityCVEDetailsFacetV2.md +++ b/docs/DomainAPIVulnerabilityCVEDetailsFacetV2.md @@ -19,6 +19,7 @@ | **remediation_level** | **String** | Remediation level indicates the required effort to mitigate a security vulnerability, ranging from official fixes to unavailable remedies | [optional] | | **severity** | **String** | Severity refers to the level of impact or potential harm caused by a security vulnerability. It is often assessed using metrics such as the CVSS base score, which takes into account factors such as exploitability, impact on confidentiality, integrity, and availability, and other relevant parameters to determine the severity level of a vulnerability. | [optional] | | **spotlight_published_date** | **String** | Corresponds to a point in time when Spotlight offered support for detecting a specific vulnerability | [optional] | +| **types** | **Array<String>** | The types of vulnerability. Can be of: Vulnerability, Misconfiguration, and Unsupported software | [optional] | | **vector** | **String** | Refers to the vector of attack or the specific method or path through which an attacker can exploit a vulnerability | [optional] | | **vendor_advisory** | **Array<String>** | Refers to one or more URLs that points to vendor advisories | [optional] | @@ -43,6 +44,7 @@ instance = Falcon::DomainAPIVulnerabilityCVEDetailsFacetV2.new( remediation_level: null, severity: null, spotlight_published_date: null, + types: null, vector: null, vendor_advisory: null ) diff --git a/docs/DomainAPIVulnerabilityExtendedAppV2.md b/docs/DomainAPIVulnerabilityExtendedAppV2.md index d9faf2e3..76753819 100644 --- a/docs/DomainAPIVulnerabilityExtendedAppV2.md +++ b/docs/DomainAPIVulnerabilityExtendedAppV2.md @@ -5,7 +5,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **evaluation_logic** | [**DomainAPIEvaluationLogicV1**](DomainAPIEvaluationLogicV1.md) | | [optional] | -| **product_name_version** | **String** | | | +| **product_name_normalized** | **String** | Refers to the normalized product name of the product for which the vulnerability has been detected | | +| **product_name_version** | **String** | Refers to the un-normalized combination of product name and version of the product for which the vulnerability has been detected | | | **remediation** | [**DomainAPIRemediationIDs**](DomainAPIRemediationIDs.md) | | [optional] | | **sub_status** | **String** | Contains vulnerability status for a particular product - can differentiate in cases where a vulnerability is detected for multiple products | [optional] | @@ -16,6 +17,7 @@ require 'crimson-falcon' instance = Falcon::DomainAPIVulnerabilityExtendedAppV2.new( evaluation_logic: null, + product_name_normalized: null, product_name_version: null, remediation: null, sub_status: null diff --git a/docs/DomainAPIVulnerabilityHostFacetV2.md b/docs/DomainAPIVulnerabilityHostFacetV2.md index e86e1cc8..ef1f6577 100644 --- a/docs/DomainAPIVulnerabilityHostFacetV2.md +++ b/docs/DomainAPIVulnerabilityHostFacetV2.md @@ -6,7 +6,6 @@ | ---- | ---- | ----------- | ----- | | **asset_criticality** | **String** | Refers to how critical an asset has been evaluated to be | [optional] | | **asset_roles** | **Array<String>** | Refers to one or more roles that have been assigned to the assets | [optional] | -| **entity_graph_id** | **String** | A unique identifier assigned by entity graph | [optional] | | **groups** | [**Array<DomainAPIHostGroup>**](DomainAPIHostGroup.md) | Refers to a logic grouping of assets | [optional] | | **host_last_seen_timestamp** | **String** | A timestamp corresponding to the last day when we detected activity coming from an asset | [optional] | | **hostname** | **String** | Refers to the hostname used by the asset on which the vulnerability was detected | | @@ -35,7 +34,6 @@ require 'crimson-falcon' instance = Falcon::DomainAPIVulnerabilityHostFacetV2.new( asset_criticality: null, asset_roles: null, - entity_graph_id: null, groups: null, host_last_seen_timestamp: null, hostname: null, diff --git a/docs/DomainAPIVulnerabilityV2.md b/docs/DomainAPIVulnerabilityV2.md index 57668fbe..19d4693e 100644 --- a/docs/DomainAPIVulnerabilityV2.md +++ b/docs/DomainAPIVulnerabilityV2.md @@ -14,13 +14,11 @@ | **data_providers** | [**Array<DomainAPIVulnerabilityDataProviderV1>**](DomainAPIVulnerabilityDataProviderV1.md) | Contains information about the vulnerability data providers of this entity | [optional] | | **host_info** | [**DomainAPIVulnerabilityHostFacetV2**](DomainAPIVulnerabilityHostFacetV2.md) | | [optional] | | **id** | **String** | Vulnerability unique ID | | -| **ports** | **Array<Integer>** | Contains ports that the vulnerability affects | [optional] | | **remediation** | [**DomainAPIVulnerabilityRemediationFacetV2**](DomainAPIVulnerabilityRemediationFacetV2.md) | | [optional] | | **status** | **String** | Current status of a vulnerability (open, closed, reopen) | | | **suppression_info** | [**DomainAPIVulnerabilitySuppressionInfoV2**](DomainAPIVulnerabilitySuppressionInfoV2.md) | | [optional] | | **updated_timestamp** | **String** | A timestamp corresponding to the point in time when a vulnerability's information or status have been updated | | | **vulnerability_id** | **String** | Dynamic label that contains the CVE ID if applicable, otherwise the vulnerability metadata ID or label from the provider | [optional] | -| **vulnerability_metadata_id** | **String** | Unique identifier for the vulnerability metadata | [optional] | ## Example @@ -38,13 +36,11 @@ instance = Falcon::DomainAPIVulnerabilityV2.new( data_providers: null, host_info: null, id: null, - ports: null, remediation: null, status: null, suppression_info: null, updated_timestamp: null, - vulnerability_id: null, - vulnerability_metadata_id: null + vulnerability_id: null ) ``` diff --git a/docs/DomainAWSAccountInput.md b/docs/DomainAWSAccountInput.md new file mode 100644 index 00000000..94187a0f --- /dev/null +++ b/docs/DomainAWSAccountInput.md @@ -0,0 +1,28 @@ +# Falcon::DomainAWSAccountInput + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_number** | **String** | | | +| **batch_regions** | [**Array<DomainAWSBatchClusterRegion>**](DomainAWSBatchClusterRegion.md) | | | +| **iam_external_id** | **String** | | | +| **iam_role_arn** | **String** | | | +| **kms_alias** | **String** | | | +| **processing_account** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainAWSAccountInput.new( + account_number: null, + batch_regions: null, + iam_external_id: null, + iam_role_arn: null, + kms_alias: null, + processing_account: null +) +``` + diff --git a/docs/DomainAWSAccountV2.md b/docs/DomainAWSAccountV2.md index b543637f..31789e7b 100644 --- a/docs/DomainAWSAccountV2.md +++ b/docs/DomainAWSAccountV2.md @@ -29,6 +29,7 @@ | **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] | | **intermediate_role_arn** | **String** | | [optional] | +| **is_cspm_lite** | **Boolean** | Is CSPM Lite enabled. | [optional] | | **is_custom_rolename** | **Boolean** | | | | **is_master** | **Boolean** | | [optional] | | **organization_id** | **String** | Up to 34 character AWS provided unique identifier for the organization. | [optional] | @@ -75,6 +76,7 @@ instance = Falcon::DomainAWSAccountV2.new( external_id: null, iam_role_arn: null, intermediate_role_arn: null, + is_cspm_lite: null, is_custom_rolename: null, is_master: null, organization_id: null, diff --git a/docs/DomainAWSBatchClusterRegion.md b/docs/DomainAWSBatchClusterRegion.md new file mode 100644 index 00000000..9ad50d71 --- /dev/null +++ b/docs/DomainAWSBatchClusterRegion.md @@ -0,0 +1,22 @@ +# Falcon::DomainAWSBatchClusterRegion + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **job_definition_name** | **String** | | | +| **job_queue** | **String** | | | +| **region** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainAWSBatchClusterRegion.new( + job_definition_name: null, + job_queue: null, + region: null +) +``` + diff --git a/docs/DomainActorDocument.md b/docs/DomainActorDocument.md index 4090a13c..f837032e 100644 --- a/docs/DomainActorDocument.md +++ b/docs/DomainActorDocument.md @@ -10,12 +10,27 @@ | **capability** | [**DomainEntity**](DomainEntity.md) | | [optional] | | **created_date** | **Integer** | Actor's document creation date when it was added to the Falcon portal in unix timestamp format | | | **description** | **String** | Actor's text description, partially containing structured data from other fields | [optional] | +| **description_length** | **Integer** | | [optional] | +| **develops_threats** | [**Array<DomainThreatEntity>**](DomainThreatEntity.md) | | [optional] | +| **develops_threats_count** | **Integer** | | [optional] | | **ecrime_kill_chain** | [**DomainECrimeKillChain**](DomainECrimeKillChain.md) | | [optional] | | **entitlements** | [**Array<DomainEntity>**](DomainEntity.md) | Field used to filter user's access to actor documents | [optional] | | **first_activity_date** | **Integer** | Actor's first activity observed date in unix timestamp format | | | **group** | [**DomainEntity**](DomainEntity.md) | | [optional] | +| **has_subgroup** | [**Array<DomainActorEntity>**](DomainActorEntity.md) | | [optional] | +| **has_subgroup_actors_count** | **Integer** | | [optional] | +| **has_successor** | [**Array<DomainActorEntity>**](DomainActorEntity.md) | | [optional] | +| **has_successor_actors_count** | **Integer** | | [optional] | | **id** | **Integer** | Numerical ID for the Actor | | | **image** | [**DomainImage**](DomainImage.md) | | [optional] | +| **in_reports** | [**Array<DomainActorNewsDocument>**](DomainActorNewsDocument.md) | | [optional] | +| **in_reports_count** | **Integer** | | [optional] | +| **is_subgroup_of** | [**Array<DomainActorEntity>**](DomainActorEntity.md) | | [optional] | +| **is_subgroup_of_actors_count** | **Integer** | | [optional] | +| **is_successor_of** | [**Array<DomainActorEntity>**](DomainActorEntity.md) | | [optional] | +| **is_successor_of_actors_count** | **Integer** | | [optional] | +| **is_supported_by** | [**Array<DomainActorEntity>**](DomainActorEntity.md) | | [optional] | +| **is_supported_by_actors_count** | **Integer** | | [optional] | | **kill_chain** | [**DomainKillChain**](DomainKillChain.md) | | [optional] | | **known_as** | **String** | Alternative names and community identifiers of an actor | | | **last_activity_date** | **Integer** | Actor's last (most recent) activity observed date in unix timestamp format | | @@ -28,14 +43,26 @@ | **recent_alerting** | **Integer** | Recent CrowdStrike's finished intelligence alerting date in unix timestamp format | [optional] | | **region** | [**DomainEntity**](DomainEntity.md) | | [optional] | | **rich_text_description** | **String** | Rich text version of the description field | [optional] | +| **sells_threats** | [**Array<DomainThreatEntity>**](DomainThreatEntity.md) | | [optional] | +| **sells_threats_count** | **Integer** | | [optional] | | **short_description** | **String** | Short version of the description field | | | **slug** | **String** | Name in url friendly format, lowercased and spaces replaced with dash | [optional] | | **status** | **String** | Status of an actor, one of: Active, Inactive, Retired | | +| **supports** | [**Array<DomainActorEntity>**](DomainActorEntity.md) | | [optional] | +| **supports_actors_count** | **Integer** | | [optional] | | **target_countries** | [**Array<DomainEntity>**](DomainEntity.md) | Target countries of actor's activity and attacks, slug value is a 2 characters code for the country value, some examples: United States,United Kingdom,Germany,India,Japan,France,Australia,Canada,China | | | **target_industries** | [**Array<DomainEntity>**](DomainEntity.md) | Target economical industries of actor's activity and attacks. List of available values: Government, Financial Services, Technology, Telecommunications, Healthcare, Energy, Academic, Media, Aerospace, NGO, Manufacturing, Industrials and Engineering, Retail, Hospitality, Consulting and Professional Services, Opportunistic, Aviation, Defense, Transportation, Oil and Gas, Legal, Pharmaceutical, Logistics, Military, Automotive, Food and Beverage, Consumer Goods, Real Estate, Insurance, Agriculture, Chemicals, Utilities, Maritime, Extractive, Travel, Dissident, Cryptocurrency, Entertainment, National Government, Law Enforcement, Think Tanks, Local Government, Sports Organizations, Computer Gaming, Biomedical, Nonprofit, Financial Management & Hedge Funds, Political Parties, Architectural and Engineering, Emergency Services, Social Media, International Government, Nuclear, Research Entities, Vocational and Higher-Level Education, eCommerce | | | **target_regions** | [**Array<DomainEntity>**](DomainEntity.md) | Target geographic regions of actor's activity and attacks. List of available values: North America, Western Europe, Southeast Asia, Middle East, Eastern Europe, South Asia, South America, Oceania, East Asia, Central Africa, Northern Europe, Southern Europe, North Africa, Southern Africa, Central America, Central Asia, East Africa, West Africa, Caribbean | | | **thumbnail** | [**DomainImage**](DomainImage.md) | | [optional] | | **url** | **String** | URL at which actor profile can be accessed | [optional] | +| **uses_indicators_count** | **Integer** | | [optional] | +| **uses_mitre_attacks_count** | **Integer** | | [optional] | +| **uses_mitre_tactics_count** | **Integer** | | [optional] | +| **uses_mitre_techniques_count** | **Integer** | | [optional] | +| **uses_threats** | [**Array<DomainThreatEntity>**](DomainThreatEntity.md) | | [optional] | +| **uses_threats_count** | **Integer** | | [optional] | +| **uses_vulnerabilities** | **Array<String>** | Comma separated values of vulnerabilities by CVE codes that are exploited by actor | [optional] | +| **vulnerabilities_count** | **Integer** | | [optional] | ## Example @@ -49,12 +76,27 @@ instance = Falcon::DomainActorDocument.new( capability: null, created_date: null, description: null, + description_length: null, + develops_threats: null, + develops_threats_count: null, ecrime_kill_chain: null, entitlements: null, first_activity_date: null, group: null, + has_subgroup: null, + has_subgroup_actors_count: null, + has_successor: null, + has_successor_actors_count: null, id: null, image: null, + in_reports: null, + in_reports_count: null, + is_subgroup_of: null, + is_subgroup_of_actors_count: null, + is_successor_of: null, + is_successor_of_actors_count: null, + is_supported_by: null, + is_supported_by_actors_count: null, kill_chain: null, known_as: null, last_activity_date: null, @@ -67,14 +109,26 @@ instance = Falcon::DomainActorDocument.new( recent_alerting: null, region: null, rich_text_description: null, + sells_threats: null, + sells_threats_count: null, short_description: null, slug: null, status: null, + supports: null, + supports_actors_count: null, target_countries: null, target_industries: null, target_regions: null, thumbnail: null, - url: null + url: null, + uses_indicators_count: null, + uses_mitre_attacks_count: null, + uses_mitre_tactics_count: null, + uses_mitre_techniques_count: null, + uses_threats: null, + uses_threats_count: null, + uses_vulnerabilities: null, + vulnerabilities_count: null ) ``` diff --git a/docs/DomainActorEntity.md b/docs/DomainActorEntity.md new file mode 100644 index 00000000..79c93a78 --- /dev/null +++ b/docs/DomainActorEntity.md @@ -0,0 +1,22 @@ +# Falcon::DomainActorEntity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | id of the actor | [optional] | +| **name** | **String** | name of the actor | [optional] | +| **publish_flags** | **Array<String>** | set of publish flags | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainActorEntity.new( + id: null, + name: null, + publish_flags: null +) +``` + diff --git a/docs/DomainActorNewsDocument.md b/docs/DomainActorNewsDocument.md new file mode 100644 index 00000000..0c76cd1d --- /dev/null +++ b/docs/DomainActorNewsDocument.md @@ -0,0 +1,24 @@ +# Falcon::DomainActorNewsDocument + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_date** | **Integer** | Date of the news document creation, unix timestamp | | +| **id** | **Integer** | Integer ID of the News document | | +| **name** | **String** | News title | | +| **slug** | **String** | News title in a url friendly way, which is title in lowercase and special characters including space replaced with dash | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainActorNewsDocument.new( + created_date: null, + id: null, + name: null, + slug: null +) +``` + diff --git a/docs/DomainAssetCriticalityInfoV1.md b/docs/DomainAssetCriticalityInfoV1.md new file mode 100644 index 00000000..28e2913b --- /dev/null +++ b/docs/DomainAssetCriticalityInfoV1.md @@ -0,0 +1,22 @@ +# Falcon::DomainAssetCriticalityInfoV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **criticality** | **String** | | [optional] | +| **internet_exposure** | **String** | | [optional] | +| **roles** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainAssetCriticalityInfoV1.new( + criticality: null, + internet_exposure: null, + roles: null +) +``` + diff --git a/docs/DomainAttachment.md b/docs/DomainAttachment.md new file mode 100644 index 00000000..e11db333 --- /dev/null +++ b/docs/DomainAttachment.md @@ -0,0 +1,30 @@ +# Falcon::DomainAttachment + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **date** | **Time** | | [optional] | +| **file_name** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **link** | **String** | | | +| **mime_type** | **String** | | | +| **sha256** | **String** | | [optional] | +| **source_url** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainAttachment.new( + date: null, + file_name: null, + id: null, + link: null, + mime_type: null, + sha256: null, + source_url: null +) +``` + diff --git a/docs/DomainAzureManagementGroupRoleAssignment.md b/docs/DomainAzureManagementGroupRoleAssignment.md new file mode 100644 index 00000000..10e4e430 --- /dev/null +++ b/docs/DomainAzureManagementGroupRoleAssignment.md @@ -0,0 +1,24 @@ +# Falcon::DomainAzureManagementGroupRoleAssignment + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **management_group_id** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **role_definition_id** | **String** | | [optional] | +| **status** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainAzureManagementGroupRoleAssignment.new( + management_group_id: null, + name: null, + role_definition_id: null, + status: null +) +``` + diff --git a/docs/DomainBaseAPIVulnerabilityV2.md b/docs/DomainBaseAPIVulnerabilityV2.md index 78bae4af..f8d8cae8 100644 --- a/docs/DomainBaseAPIVulnerabilityV2.md +++ b/docs/DomainBaseAPIVulnerabilityV2.md @@ -14,13 +14,11 @@ | **data_providers** | [**Array<DomainAPIVulnerabilityDataProviderV1>**](DomainAPIVulnerabilityDataProviderV1.md) | Contains information about the vulnerability data providers of this entity | [optional] | | **host_info** | [**DomainAPIVulnerabilityHostFacetV2**](DomainAPIVulnerabilityHostFacetV2.md) | | [optional] | | **id** | **String** | Vulnerability unique ID | | -| **ports** | **Array<Integer>** | Contains ports that the vulnerability affects | [optional] | | **remediation** | [**DomainAPIVulnerabilityRemediationFacetV2**](DomainAPIVulnerabilityRemediationFacetV2.md) | | [optional] | | **status** | **String** | Current status of a vulnerability (open, closed, reopen) | | | **suppression_info** | [**DomainAPIVulnerabilitySuppressionInfoV2**](DomainAPIVulnerabilitySuppressionInfoV2.md) | | [optional] | | **updated_timestamp** | **String** | A timestamp corresponding to the point in time when a vulnerability's information or status have been updated | | | **vulnerability_id** | **String** | Dynamic label that contains the CVE ID if applicable, otherwise the vulnerability metadata ID or label from the provider | [optional] | -| **vulnerability_metadata_id** | **String** | Unique identifier for the vulnerability metadata | [optional] | ## Example @@ -38,13 +36,11 @@ instance = Falcon::DomainBaseAPIVulnerabilityV2.new( data_providers: null, host_info: null, id: null, - ports: null, remediation: null, status: null, suppression_info: null, updated_timestamp: null, - vulnerability_id: null, - vulnerability_metadata_id: null + vulnerability_id: null ) ``` diff --git a/docs/DomainBreachedItemV1.md b/docs/DomainBreachedItemV1.md index 37f57266..f23cd068 100644 --- a/docs/DomainBreachedItemV1.md +++ b/docs/DomainBreachedItemV1.md @@ -4,26 +4,29 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **company** | **String** | | [optional] | -| **credentials_domain** | **String** | | [optional] | -| **credentials_ip** | **String** | | [optional] | -| **credentials_url** | **String** | | [optional] | -| **display_name** | **String** | | [optional] | +| **bot** | [**DomainExposedDataRecordBotV1**](DomainExposedDataRecordBotV1.md) | | [optional] | +| **company** | **String** | The company of the user | [optional] | +| **credential_status** | **String** | The status set after deduplication. Possible values: 'newly_detected', 'previously_reported', 'other' | [optional] | +| **credentials_domain** | **String** | The domain where the credentials are valid | [optional] | +| **credentials_ip** | **String** | The IP where the credentials are valid | [optional] | +| **credentials_url** | **String** | The URL where the credentials are valid | [optional] | +| **display_name** | **String** | The nickname of the user on the impacted site | [optional] | | **domain** | **String** | The domain associated with the breached account. | | | **email** | **String** | The email of the breached account. | | | **financial** | [**DomainExposedDataRecordFinancialV1**](DomainExposedDataRecordFinancialV1.md) | | [optional] | | **hash_type** | **String** | The original hashing algorithm applied to the breached password. Possible values: 'plain', 'unknown', 'base64', 'md5', 'sha1', 'bcrypt', etc. The value 'plain' means that the password was originally found as plaintext. | | -| **job_position** | **String** | | [optional] | +| **job_position** | **String** | The user's job at the company | [optional] | | **location** | [**DomainExposedDataRecordLocationV1**](DomainExposedDataRecordLocationV1.md) | | [optional] | | **login_id** | **String** | The username of the breached account. | | +| **malware_family** | **String** | The stealer log bot malware family | [optional] | | **name** | **String** | The name of the person associated with the breached account. | | | **password** | **String** | The breached password. Passwords are returned as salted hashes, generated using the SHA256 algorithm and the CID as the salt. | | -| **password_hash** | **String** | | [optional] | -| **password_salt** | **String** | | [optional] | +| **password_hash** | **String** | The password hash | [optional] | +| **password_salt** | **String** | The password salt | [optional] | | **phone** | **String** | The phone number of the person associated with the breached account. | | | **social** | [**DomainExposedDataRecordSocialV1**](DomainExposedDataRecordSocialV1.md) | | [optional] | -| **user_id** | **String** | | [optional] | -| **user_ip** | **String** | | [optional] | +| **user_id** | **String** | The ID of the user on the impacted site | [optional] | +| **user_ip** | **String** | The IP of the user on the impacted site | [optional] | ## Example @@ -31,7 +34,9 @@ require 'crimson-falcon' instance = Falcon::DomainBreachedItemV1.new( + bot: null, company: null, + credential_status: null, credentials_domain: null, credentials_ip: null, credentials_url: null, @@ -43,6 +48,7 @@ instance = Falcon::DomainBreachedItemV1.new( job_position: null, location: null, login_id: null, + malware_family: null, name: null, password: null, password_hash: null, diff --git a/docs/DomainCIDGroup.md b/docs/DomainCIDGroup.md index e6e253b0..d7367fe6 100644 --- a/docs/DomainCIDGroup.md +++ b/docs/DomainCIDGroup.md @@ -4,8 +4,10 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **cid** | **String** | | [optional] | | **cid_group_id** | **String** | | | | **description** | **String** | | [optional] | +| **is_default** | **Boolean** | | [optional] | | **name** | **String** | | | ## Example @@ -14,8 +16,10 @@ require 'crimson-falcon' instance = Falcon::DomainCIDGroup.new( + cid: null, cid_group_id: null, description: null, + is_default: null, name: null ) ``` diff --git a/docs/DomainCIDPolicyAssignments.md b/docs/DomainCIDPolicyAssignments.md index ce05ff85..913e9e28 100644 --- a/docs/DomainCIDPolicyAssignments.md +++ b/docs/DomainCIDPolicyAssignments.md @@ -18,6 +18,8 @@ | **created_at** | **Time** | | [optional] | | **default_severity** | **String** | | [optional] | | **fql_policy** | **String** | | [optional] | +| **hipaa_benchmark** | [**Array<DomainBenchmark>**](DomainBenchmark.md) | | [optional] | +| **hitrust_benchmark** | [**Array<DomainBenchmark>**](DomainBenchmark.md) | | [optional] | | **is_remediable** | **Boolean** | | | | **iso_benchmark** | [**Array<DomainBenchmark>**](DomainBenchmark.md) | | [optional] | | **name** | **String** | | [optional] | @@ -51,6 +53,8 @@ instance = Falcon::DomainCIDPolicyAssignments.new( created_at: null, default_severity: null, fql_policy: null, + hipaa_benchmark: null, + hitrust_benchmark: null, is_remediable: null, iso_benchmark: null, name: null, diff --git a/docs/DomainCard.md b/docs/DomainCard.md new file mode 100644 index 00000000..011bd0c8 --- /dev/null +++ b/docs/DomainCard.md @@ -0,0 +1,30 @@ +# Falcon::DomainCard + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **bin_code** | **String** | | [optional] | +| **cardholder_name** | **String** | | [optional] | +| **description** | **String** | | [optional] | +| **expiration** | **String** | | [optional] | +| **issuing_bank** | **String** | | [optional] | +| **last_transaction_at** | **Time** | | [optional] | +| **servicecode** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainCard.new( + bin_code: null, + cardholder_name: null, + description: null, + expiration: null, + issuing_bank: null, + last_transaction_at: null, + servicecode: null +) +``` + diff --git a/docs/DomainCloudScope.md b/docs/DomainCloudScope.md index 923c9752..7fd10f3a 100644 --- a/docs/DomainCloudScope.md +++ b/docs/DomainCloudScope.md @@ -14,6 +14,7 @@ | **name** | **String** | | [optional] | | **owners** | **Array<String>** | | [optional] | | **total_accounts** | **Integer** | | [optional] | +| **updated_at** | **Time** | | [optional] | ## Example @@ -30,7 +31,8 @@ instance = Falcon::DomainCloudScope.new( id: null, name: null, owners: null, - total_accounts: null + total_accounts: null, + updated_at: null ) ``` diff --git a/docs/DomainCredentials.md b/docs/DomainCredentials.md index 201136e8..680ac79a 100644 --- a/docs/DomainCredentials.md +++ b/docs/DomainCredentials.md @@ -4,7 +4,9 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **token** | **String** | | | +| **sites_all** | **Array<String>** | | [optional] | +| **sites_with_cookie_only** | **Array<String>** | | [optional] | +| **sites_with_password** | **Array<String>** | | [optional] | ## Example @@ -12,7 +14,9 @@ require 'crimson-falcon' instance = Falcon::DomainCredentials.new( - token: null + sites_all: null, + sites_with_cookie_only: null, + sites_with_password: null ) ``` diff --git a/docs/DomainDetailedNotificationV1.md b/docs/DomainDetailedNotificationV1.md index b55de8fb..c8527371 100644 --- a/docs/DomainDetailedNotificationV1.md +++ b/docs/DomainDetailedNotificationV1.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **breach_details** | [**DomainBreachDetailsV1**](DomainBreachDetailsV1.md) | | [optional] | -| **details** | [**DomainNotificationDetailsV1**](DomainNotificationDetailsV1.md) | | [optional] | +| **details** | [**DomainItemDetailsV1**](DomainItemDetailsV1.md) | | [optional] | | **id** | **String** | | | | **notification** | [**DomainNotificationV1**](DomainNotificationV1.md) | | | diff --git a/docs/DomainDevice.md b/docs/DomainDevice.md index 68fb6127..bdfab0e1 100644 --- a/docs/DomainDevice.md +++ b/docs/DomainDevice.md @@ -10,6 +10,7 @@ | **config_id_build** | **String** | | [optional] | | **config_id_platform** | **String** | | [optional] | | **device_id** | **String** | | | +| **device_policies** | [**DomainMappedDevicePolicies**](DomainMappedDevicePolicies.md) | | [optional] | | **external_ip** | **String** | | [optional] | | **first_login_timestamp** | **String** | | [optional] | | **first_login_user** | **String** | | [optional] | @@ -51,6 +52,7 @@ instance = Falcon::DomainDevice.new( config_id_build: null, config_id_platform: null, device_id: null, + device_policies: null, external_ip: null, first_login_timestamp: null, first_login_user: null, diff --git a/docs/DomainDevicePolicy.md b/docs/DomainDevicePolicy.md new file mode 100644 index 00000000..bc4193a8 --- /dev/null +++ b/docs/DomainDevicePolicy.md @@ -0,0 +1,18 @@ +# Falcon::DomainDevicePolicy + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **policy_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainDevicePolicy.new( + policy_id: null +) +``` + diff --git a/docs/DomainDiscoverAPIHost.md b/docs/DomainDiscoverAPIHost.md index 8e60cfea..c1e7d36a 100644 --- a/docs/DomainDiscoverAPIHost.md +++ b/docs/DomainDiscoverAPIHost.md @@ -30,7 +30,9 @@ | **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] | | **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 Unknown). | [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] | +| **computed_internet_exposure_last_seen** | **String** | When the asset was last seen as internet exposed. | [optional] | | **confidence** | **Integer** | The level of confidence that the asset is a corporate asset (25 = low confidence, 50 = medium confidence, 75 = high confidence). | [optional] | | **country** | **String** | The name of the country where the asset is located. | [optional] | | **cpu_manufacturer** | **String** | The manufacturer of the asset's CPU. | [optional] | @@ -42,12 +44,14 @@ | **criticality_timestamp** | **String** | The date and time the criticality level was manually assigned | [optional] | | **criticality_username** | **String** | The username of the account that manually assigned the criticality level | [optional] | | **current_local_ip** | **String** | The last seen local IPv4 address of the asset. | [optional] | +| **current_network_prefix** | **String** | The last seen network prefix of the asset. | [optional] | | **data_providers** | **Array<String>** | Where the data about the asset came from (such as CrowdStrike, ServiceNow, or Active Directory). | [optional] | | **data_providers_count** | **Integer** | How many services provided data about the asset. | [optional] | | **department** | **String** | The department where the asset is used. | [optional] | | **descriptions** | **Array<String>** | The descriptions of the asset in Active Directory (Cannot be used for filtering, sorting, or querying). | [optional] | | **discoverer_aids** | **Array<String>** | The agent IDs of the Falcon sensors installed on the sources that discovered the asset. | [optional] | | **discoverer_count** | **Integer** | The number of sources that discovered the asset. | [optional] | +| **discoverer_criticalities** | **Array<String>** | The criticalities of the sources that discovered the asset | [optional] | | **discoverer_hostnames** | **Array<String>** | The hostnames of the sources that discovered the asset. | [optional] | | **discoverer_platform_names** | **Array<String>** | The platform names of the sources that discovered the asset. | [optional] | | **discoverer_product_type_descs** | **Array<String>** | The product type descriptions of the sources that discovered the asset. | [optional] | @@ -68,7 +72,7 @@ | **groups** | **Array<String>** | The host management groups the asset is part of. | [optional] | | **hostname** | **String** | The asset's hostname. | [optional] | | **id** | **String** | The unique ID of the asset. | | -| **internet_exposure** | **String** | Whether the asset is exposed to the internet (Yes or Unknown). | [optional] | +| **internet_exposure** | **String** | Whether the asset is exposed to the internet (Yes, No or Pending). | [optional] | | **internet_exposure_description** | **String** | The description the user entered when manually assigning a internet exposure level | [optional] | | **internet_exposure_timestamp** | **String** | The date and time the internet exposure level was manually assigned | [optional] | | **internet_exposure_username** | **String** | The username of the account that manually assigned the internet exposure level | [optional] | @@ -123,6 +127,8 @@ | **used_disk_space** | **Integer** | The used disk space in the last 15 minutes on the host | [optional] | | **used_disk_space_pct** | **Integer** | The used disk space percent in the last 15 minutes on the host | [optional] | | **used_for** | **String** | What the asset is used for, such as production, staging, or QA. | [optional] | +| **user_asset_roles** | **Array<String>** | The asset role or roles manually assigned to the asset. | [optional] | +| **user_internet_exposure** | **String** | The internet exposure manually assigned to the asset | [optional] | ## Example @@ -157,6 +163,8 @@ instance = Falcon::DomainDiscoverAPIHost.new( cloud_resource_id: null, computed_asset_roles: null, computed_internet_exposure: null, + computed_internet_exposure_external_ip: null, + computed_internet_exposure_last_seen: null, confidence: null, country: null, cpu_manufacturer: null, @@ -168,12 +176,14 @@ instance = Falcon::DomainDiscoverAPIHost.new( criticality_timestamp: null, criticality_username: null, current_local_ip: null, + current_network_prefix: null, data_providers: null, data_providers_count: null, department: null, descriptions: null, discoverer_aids: null, discoverer_count: null, + discoverer_criticalities: null, discoverer_hostnames: null, discoverer_platform_names: null, discoverer_product_type_descs: null, @@ -248,7 +258,9 @@ instance = Falcon::DomainDiscoverAPIHost.new( unencrypted_drives_count: null, used_disk_space: null, used_disk_space_pct: null, - used_for: null + used_for: null, + user_asset_roles: null, + user_internet_exposure: null ) ``` diff --git a/docs/DomainDiscoverAPIIoTHost.md b/docs/DomainDiscoverAPIIoTHost.md index e81eaffc..777dfc57 100644 --- a/docs/DomainDiscoverAPIIoTHost.md +++ b/docs/DomainDiscoverAPIIoTHost.md @@ -16,6 +16,9 @@ | **cid** | **String** | The asset's customer ID. | | | **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] | +| **computed_internet_exposure** | **String** | Whether the asset is exposed to the internet (Yes or Unknown) | [optional] | +| **computed_internet_exposure_external_ip** | **String** | External IP that is exposed to the Internet | [optional] | +| **computed_internet_exposure_last_seen** | **String** | Timestamp when the asset was last seen as exposed to the Internet | [optional] | | **confidence** | **Integer** | The level of confidence that the asset is a corporate asset (25 = low confidence, 50 = medium confidence, 75 = high confidence). | [optional] | | **country** | **String** | The name of the country where the asset is located. | [optional] | | **cpu_processor_name** | **String** | The Detailed processor name | [optional] | @@ -32,6 +35,7 @@ | **discoverer_ics_collector_ids** | **Array<String>** | A list of agent IDs of the Falcon sensors installed on the source hosts that discovered the asset via ICS Asset discovery mechanism | [optional] | | **discoverer_product_type_descs** | **Array<String>** | The product type descriptions of the sources that discovered the asset. | [optional] | | **disk_sizes** | [**Array<DomainDiscoverAPIDiskSize>**](DomainDiscoverAPIDiskSize.md) | The names and sizes of the disks on the asset | [optional] | +| **dragos_id** | **String** | The ID generated by dragos asset discovery mechanism | [optional] | | **encrypted_drives** | **Array<String>** | The list of encrypted drives on the asset | [optional] | | **encrypted_drives_count** | **Integer** | The count of encrypted drives on the asset | [optional] | | **encryption_status** | **String** | The encryption status of the asset | [optional] | @@ -63,6 +67,8 @@ | **number_of_disk_drives** | **Integer** | The number of active physical drives available on the system | [optional] | | **os_is_eol** | **String** | Whether the asset is at end of support (Yes, No, or Unknown) | [optional] | | **os_version** | **String** | The OS version of the asset. | [optional] | +| **ot_information_sources** | **Array<String>** | A list of sources through which host is discovered | | +| **ot_serial_numbers** | **Array<String>** | A list of ot serial numbers that discovered with host | | | **ou** | **String** | The organizational unit of the asset (applies only to Windows hosts). | [optional] | | **physical_core_count** | **Integer** | The number of physical CPU cores available on the system | [optional] | | **platform_name** | **String** | The platform name of the asset (Windows, Mac, Linux). | [optional] | @@ -111,6 +117,9 @@ instance = Falcon::DomainDiscoverAPIIoTHost.new( cid: null, city: null, claroty_id: null, + computed_internet_exposure: null, + computed_internet_exposure_external_ip: null, + computed_internet_exposure_last_seen: null, confidence: null, country: null, cpu_processor_name: null, @@ -127,6 +136,7 @@ instance = Falcon::DomainDiscoverAPIIoTHost.new( discoverer_ics_collector_ids: null, discoverer_product_type_descs: null, disk_sizes: null, + dragos_id: null, encrypted_drives: null, encrypted_drives_count: null, encryption_status: null, @@ -158,6 +168,8 @@ instance = Falcon::DomainDiscoverAPIIoTHost.new( number_of_disk_drives: null, os_is_eol: null, os_version: null, + ot_information_sources: null, + ot_serial_numbers: null, ou: null, physical_core_count: null, platform_name: null, diff --git a/docs/DomainExposedDataRecordBotLocationV1.md b/docs/DomainExposedDataRecordBotLocationV1.md new file mode 100644 index 00000000..fbedcdaa --- /dev/null +++ b/docs/DomainExposedDataRecordBotLocationV1.md @@ -0,0 +1,20 @@ +# Falcon::DomainExposedDataRecordBotLocationV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **country** | **String** | | | +| **zip_code** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainExposedDataRecordBotLocationV1.new( + country: null, + zip_code: null +) +``` + diff --git a/docs/DomainExposedDataRecordBotOperatingSystemV1.md b/docs/DomainExposedDataRecordBotOperatingSystemV1.md new file mode 100644 index 00000000..486e90a6 --- /dev/null +++ b/docs/DomainExposedDataRecordBotOperatingSystemV1.md @@ -0,0 +1,40 @@ +# Falcon::DomainExposedDataRecordBotOperatingSystemV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **antivirus** | **Array<String>** | | | +| **computer_name** | **String** | | | +| **domain** | **String** | | | +| **hardware_id** | **String** | | | +| **installed_software** | **Array<String>** | | | +| **language** | **String** | | | +| **layouts** | **Array<String>** | | | +| **os_architecture** | **String** | | | +| **os_version** | **String** | | | +| **timezone** | **String** | | | +| **uac** | **String** | | | +| **username** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainExposedDataRecordBotOperatingSystemV1.new( + antivirus: null, + computer_name: null, + domain: null, + hardware_id: null, + installed_software: null, + language: null, + layouts: null, + os_architecture: null, + os_version: null, + timezone: null, + uac: null, + username: null +) +``` + diff --git a/docs/DomainExposedDataRecordBotV1.md b/docs/DomainExposedDataRecordBotV1.md new file mode 100644 index 00000000..46f785cf --- /dev/null +++ b/docs/DomainExposedDataRecordBotV1.md @@ -0,0 +1,32 @@ +# Falcon::DomainExposedDataRecordBotV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **bot_id** | **String** | | | +| **domain_detects** | **Array<String>** | | | +| **infection_build_id** | **String** | | | +| **infection_date** | **Time** | | | +| **infection_path** | **String** | | | +| **ip** | **String** | | [optional] | +| **location** | [**DomainExposedDataRecordBotLocationV1**](DomainExposedDataRecordBotLocationV1.md) | | | +| **operating_system** | [**DomainExposedDataRecordBotOperatingSystemV1**](DomainExposedDataRecordBotOperatingSystemV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainExposedDataRecordBotV1.new( + bot_id: null, + domain_detects: null, + infection_build_id: null, + infection_date: null, + infection_path: null, + ip: null, + location: null, + operating_system: null +) +``` + diff --git a/docs/DomainExposedDataRecordSocialV1.md b/docs/DomainExposedDataRecordSocialV1.md index 3095e786..4ed6cda2 100644 --- a/docs/DomainExposedDataRecordSocialV1.md +++ b/docs/DomainExposedDataRecordSocialV1.md @@ -12,6 +12,7 @@ | **skype_id** | **String** | | | | **twitter_id** | **String** | | | | **vk_id** | **String** | | | +| **vk_token** | **String** | | | ## Example @@ -26,7 +27,8 @@ instance = Falcon::DomainExposedDataRecordSocialV1.new( msn_id: null, skype_id: null, twitter_id: null, - vk_id: null + vk_id: null, + vk_token: null ) ``` diff --git a/docs/DomainFileCountV2.md b/docs/DomainFileCountV2.md new file mode 100644 index 00000000..3066fd28 --- /dev/null +++ b/docs/DomainFileCountV2.md @@ -0,0 +1,26 @@ +# Falcon::DomainFileCountV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **malicious** | **Integer** | | | +| **quarantined** | **Integer** | | | +| **scanned** | **Integer** | | | +| **skipped** | **Integer** | | | +| **traversed** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainFileCountV2.new( + malicious: null, + quarantined: null, + scanned: null, + skipped: null, + traversed: null +) +``` + diff --git a/docs/DomainFragmentInfo.md b/docs/DomainFragmentInfo.md new file mode 100644 index 00000000..79c679d3 --- /dev/null +++ b/docs/DomainFragmentInfo.md @@ -0,0 +1,30 @@ +# Falcon::DomainFragmentInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **content_offset** | **Integer** | Offset of the content field from the start of data, in characters | [optional] | +| **count** | **Integer** | Total number of fragments for this group | [optional] | +| **fragmented_fields** | **Array<String>** | List of fields that have been split, such as: content, iocs, translated_content, ... | [optional] | +| **group_id** | **String** | HEX string, similar to stream_id, ties all fragments together | [optional] | +| **index** | **Integer** | Zero-based index of fragment in the group | [optional] | +| **translated_content_offset** | **Integer** | Offset of the translated_content field from the start of data, in characters | [optional] | +| **truncated_fields** | **Array<String>** | List of fields that have been truncated or deleted | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainFragmentInfo.new( + content_offset: null, + count: null, + fragmented_fields: null, + group_id: null, + index: null, + translated_content_offset: null, + truncated_fields: null +) +``` + diff --git a/docs/DomainGCPAccountV1.md b/docs/DomainGCPAccountV1.md index 99382393..8fab18ab 100644 --- a/docs/DomainGCPAccountV1.md +++ b/docs/DomainGCPAccountV1.md @@ -25,6 +25,7 @@ | **service_account_client_id** | **String** | | [optional] | | **service_account_id** | **Integer** | GCP service account ID | [optional] | | **service_account_private_key_id** | **String** | | [optional] | +| **service_account_project_id** | **String** | | | | **status** | **String** | Account registration status. | [optional] | ## Example @@ -54,6 +55,7 @@ instance = Falcon::DomainGCPAccountV1.new( service_account_client_id: null, service_account_id: null, service_account_private_key_id: null, + service_account_project_id: null, status: null ) ``` diff --git a/docs/DomainHost.md b/docs/DomainHost.md new file mode 100644 index 00000000..9e4f6d3d --- /dev/null +++ b/docs/DomainHost.md @@ -0,0 +1,42 @@ +# Falcon::DomainHost + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **admin_available** | **Boolean** | | [optional] | +| **bandwidth_mbps** | **Float** | | [optional] | +| **behind_nat** | **Boolean** | | [optional] | +| **ip** | **String** | | [optional] | +| **ip_parsed** | **String** | | [optional] | +| **isp** | **String** | | [optional] | +| **os_banner** | **String** | | [optional] | +| **ping_ms** | **Integer** | | [optional] | +| **processor_banner** | **String** | | [optional] | +| **ram_gigs** | **Float** | | [optional] | +| **ssl_available** | **Boolean** | | [optional] | +| **tld** | **String** | | [optional] | +| **uptime_hours** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainHost.new( + admin_available: null, + bandwidth_mbps: null, + behind_nat: null, + ip: null, + ip_parsed: null, + isp: null, + os_banner: null, + ping_ms: null, + processor_banner: null, + ram_gigs: null, + ssl_available: null, + tld: null, + uptime_hours: null +) +``` + diff --git a/docs/DomainIOC.md b/docs/DomainIOC.md new file mode 100644 index 00000000..f7e3d16a --- /dev/null +++ b/docs/DomainIOC.md @@ -0,0 +1,88 @@ +# Falcon::DomainIOC + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **at_accounts** | **Array<String>** | | [optional] | +| **aws_clis** | **Array<String>** | | [optional] | +| **aws_ids** | **Array<String>** | | [optional] | +| **aws_secrets** | **Array<String>** | | [optional] | +| **bitcoin_address** | **Array<String>** | | [optional] | +| **cves** | **Array<String>** | | [optional] | +| **discord_urls** | **Array<String>** | | [optional] | +| **domains** | **Array<String>** | | [optional] | +| **email_domains** | **Array<String>** | | [optional] | +| **emails** | **Array<String>** | | [optional] | +| **emails_local_part** | **Array<String>** | | [optional] | +| **ethereum_addresses** | **Array<String>** | | [optional] | +| **generic_apis** | **Array<String>** | | [optional] | +| **github_apis** | **Array<String>** | | [optional] | +| **google_apis** | **Array<String>** | | [optional] | +| **hashtags** | **Array<String>** | | [optional] | +| **i2p_urls** | **Array<String>** | | [optional] | +| **icq_urls** | **Array<String>** | | [optional] | +| **ips** | **Array<String>** | | [optional] | +| **magnet_urls** | **Array<String>** | | [optional] | +| **md5s** | **Array<String>** | | [optional] | +| **monero_addresses** | **Array<String>** | | [optional] | +| **onion_urls** | **Array<String>** | | [optional] | +| **paste_urls** | **Array<String>** | | [optional] | +| **phone_numbers** | **Array<String>** | | [optional] | +| **s3_buckets** | **Array<String>** | | [optional] | +| **sha1s** | **Array<String>** | | [optional] | +| **sha256s** | **Array<String>** | | [optional] | +| **sha512s** | **Array<String>** | | [optional] | +| **skype_urls** | **Array<String>** | | [optional] | +| **slack_apis** | **Array<String>** | | [optional] | +| **sqs_queues** | **Array<String>** | | [optional] | +| **telegram_urls** | **Array<String>** | | [optional] | +| **torrent_urls** | **Array<String>** | | [optional] | +| **urls** | **Array<String>** | | [optional] | +| **whatsapp_urls** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainIOC.new( + at_accounts: null, + aws_clis: null, + aws_ids: null, + aws_secrets: null, + bitcoin_address: null, + cves: null, + discord_urls: null, + domains: null, + email_domains: null, + emails: null, + emails_local_part: null, + ethereum_addresses: null, + generic_apis: null, + github_apis: null, + google_apis: null, + hashtags: null, + i2p_urls: null, + icq_urls: null, + ips: null, + magnet_urls: null, + md5s: null, + monero_addresses: null, + onion_urls: null, + paste_urls: null, + phone_numbers: null, + s3_buckets: null, + sha1s: null, + sha256s: null, + sha512s: null, + skype_urls: null, + slack_apis: null, + sqs_queues: null, + telegram_urls: null, + torrent_urls: null, + urls: null, + whatsapp_urls: null +) +``` + diff --git a/docs/DomainIncident.md b/docs/DomainIncident.md index 90292514..4c969507 100644 --- a/docs/DomainIncident.md +++ b/docs/DomainIncident.md @@ -32,7 +32,6 @@ | **tags** | **Array<String>** | | [optional] | | **techniques** | **Array<String>** | | [optional] | | **users** | **Array<String>** | | [optional] | -| **visibility** | **Integer** | | [optional] | ## Example @@ -67,8 +66,7 @@ instance = Falcon::DomainIncident.new( tactics: null, tags: null, techniques: null, - users: null, - visibility: null + users: null ) ``` diff --git a/docs/DomainItemDetailsV1.md b/docs/DomainItemDetailsV1.md new file mode 100644 index 00000000..089d9eef --- /dev/null +++ b/docs/DomainItemDetailsV1.md @@ -0,0 +1,70 @@ +# Falcon::DomainItemDetailsV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **actor_slug** | **String** | Threat actor associated with the raw intelligence item, if available | [optional] | +| **attachments** | [**Array<DomainAttachment>**](DomainAttachment.md) | Pointers to attachments items linked to this item | [optional] | +| **author** | **String** | The raw intelligence item author username | [optional] | +| **author_id** | **String** | The raw intelligence item author identifier in our system | [optional] | +| **category** | **String** | Category of the source where the item was found | | +| **collection_date** | **Time** | The date when the raw intelligence item was scraped from the original source | [optional] | +| **content** | **String** | Highlighted content based on the rule that generated the notifications. Highlights are surrounded with a `<cs-highlight>` tag | | +| **created_date** | **Time** | The date when the raw intelligence item was created | | +| **file_type** | **String** | Mime type of the file for file type items | [optional] | +| **fragment_info** | [**DomainFragmentInfo**](DomainFragmentInfo.md) | | [optional] | +| **ioc_types** | **Array<String>** | IOC types available in the raw intelligence item. List of keys populated in the iocs field | [optional] | +| **iocs** | [**DomainIOC**](DomainIOC.md) | | [optional] | +| **labels** | **Array<String>** | The raw intelligence item labels. These contain hints around what is actually included in the item (malware, IPs, emails, etc). | [optional] | +| **language** | **String** | The raw intelligence item language | [optional] | +| **marketplace_product** | [**DomainMarketplaceProduct**](DomainMarketplaceProduct.md) | | [optional] | +| **mime_type** | **String** | Mime type of the file for file type items | [optional] | +| **sha256** | **String** | SHA256 of the file contents for file type items | [optional] | +| **site** | **String** | The site where the raw intelligence item was found | [optional] | +| **site_id** | **String** | The ID of the site where the raw intelligence item was found | | +| **size** | **Integer** | Size of the item's content in bytes, if available | [optional] | +| **telegram_info** | [**DomainTelegramInfo**](DomainTelegramInfo.md) | | [optional] | +| **thread_id** | **String** | Identifier that groups all raw intelligence items belonging to the same 'conversation stream', i.e. chatroom, forum thread, etc. | [optional] | +| **title** | **String** | The raw intelligence item title | [optional] | +| **type** | **String** | The type of the raw intelligence item | | +| **updated_date** | **Time** | The date when the raw intelligence item was updated | | +| **url** | **String** | The raw intelligence item URL | [optional] | +| **user_id** | **String** | The raw intelligence item author identifier in the original site | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainItemDetailsV1.new( + actor_slug: null, + attachments: null, + author: null, + author_id: null, + category: null, + collection_date: null, + content: null, + created_date: null, + file_type: null, + fragment_info: null, + ioc_types: null, + iocs: null, + labels: null, + language: null, + marketplace_product: null, + mime_type: null, + sha256: null, + site: null, + site_id: null, + size: null, + telegram_info: null, + thread_id: null, + title: null, + type: null, + updated_date: null, + url: null, + user_id: null +) +``` + diff --git a/docs/DomainLaunchExportJobRequestV1.md b/docs/DomainLaunchExportJobRequestV1.md index 2cc4a242..1fa8b630 100644 --- a/docs/DomainLaunchExportJobRequestV1.md +++ b/docs/DomainLaunchExportJobRequestV1.md @@ -4,7 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **entity** | **String** | The entity type. This can be one of: [`notification-exposed-data-record`] | | +| **entity** | **String** | The entity type. This can be one of: [`notification-exposed-data-record`, `historical-search-exposed-data-record`] | | | **export_type** | **String** | The file type of the export. This can be one of: [`json`, `csv`] | | | **filter** | **String** | FQL query to filter entities by. Possible filter properties depend on the entity type. | | | **human_readable** | **Boolean** | If set to true (default), the field names in the exported file will resemble the table header in the UI (e.g. \"Hash type\"), otherwise the API level field names will be used (e.g. \"hash_type\") | | diff --git a/docs/DomainMappedDevicePolicies.md b/docs/DomainMappedDevicePolicies.md new file mode 100644 index 00000000..28e2d584 --- /dev/null +++ b/docs/DomainMappedDevicePolicies.md @@ -0,0 +1,18 @@ +# Falcon::DomainMappedDevicePolicies + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **remote_response** | [**DomainDevicePolicy**](DomainDevicePolicy.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainMappedDevicePolicies.new( + remote_response: null +) +``` + diff --git a/docs/DomainMarketplaceProduct.md b/docs/DomainMarketplaceProduct.md new file mode 100644 index 00000000..f74cc5f9 --- /dev/null +++ b/docs/DomainMarketplaceProduct.md @@ -0,0 +1,30 @@ +# Falcon::DomainMarketplaceProduct + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **card** | [**DomainCard**](DomainCard.md) | | [optional] | +| **country_code** | **String** | | [optional] | +| **credentials** | [**DomainCredentials**](DomainCredentials.md) | | [optional] | +| **host** | [**DomainHost**](DomainHost.md) | | [optional] | +| **location** | **String** | | [optional] | +| **price** | **String** | | [optional] | +| **type** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainMarketplaceProduct.new( + card: null, + country_code: null, + credentials: null, + host: null, + location: null, + price: null, + type: null +) +``` + diff --git a/docs/DomainMatchedBreachSummaryV1.md b/docs/DomainMatchedBreachSummaryV1.md index 10f6bb00..3882182a 100644 --- a/docs/DomainMatchedBreachSummaryV1.md +++ b/docs/DomainMatchedBreachSummaryV1.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **community_name** | **String** | Community/colloquial exposed data event name. | [optional] | | **confidence_level** | **String** | The level of confidence regarding data veridicality. Options for likely authentic, confirmed authentic (default: unverified). | [optional] | +| **credential_statuses** | **Array<String>** | A list of statuses for the exposed data records contained in the notification. Possible values: 'newly_detected', 'previously_reported' and/or 'other' | [optional] | | **credentials_domains** | **Array<String>** | | [optional] | | **credentials_ips** | **Array<String>** | | [optional] | | **description** | **String** | The description of the breach | | @@ -16,6 +17,7 @@ | **files** | [**Array<DomainFileDetailsV1>**](DomainFileDetailsV1.md) | Metadata regarding the file(s) where exposed data records where found. | [optional] | | **idp_send_date** | **Time** | | [optional] | | **idp_send_status** | **String** | | [optional] | +| **is_retroactively_deduped** | **Boolean** | (Boolean) If the notification was processed before the introduction of exposed data deduplication | | | **name** | **String** | The name of the breach | | | **obtained_by** | **String** | Exposed Data Event Threat Actor/Group: Moniker(s) or real name(s) of the individual/group who unveiled confidential data. | [optional] | | **url** | **String** | Where the leak was found. | [optional] | @@ -28,6 +30,7 @@ require 'crimson-falcon' instance = Falcon::DomainMatchedBreachSummaryV1.new( community_name: null, confidence_level: null, + credential_statuses: null, credentials_domains: null, credentials_ips: null, description: null, @@ -38,6 +41,7 @@ instance = Falcon::DomainMatchedBreachSummaryV1.new( files: null, idp_send_date: null, idp_send_status: null, + is_retroactively_deduped: null, name: null, obtained_by: null, url: null diff --git a/docs/DomainMetaInfo.md b/docs/DomainMetaInfo.md index 291916a4..d71228a7 100644 --- a/docs/DomainMetaInfo.md +++ b/docs/DomainMetaInfo.md @@ -4,8 +4,12 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **msa_meta_info** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **pagination** | [**MsaspecPaging**](MsaspecPaging.md) | | [optional] | +| **powered_by** | **String** | | [optional] | +| **query_time** | **Float** | | | | **quota** | [**DomainQuota**](DomainQuota.md) | | [optional] | +| **trace_id** | **String** | | | +| **writes** | [**MsaspecWrites**](MsaspecWrites.md) | | [optional] | ## Example @@ -13,8 +17,12 @@ require 'crimson-falcon' instance = Falcon::DomainMetaInfo.new( - msa_meta_info: null, - quota: null + pagination: null, + powered_by: null, + query_time: null, + quota: null, + trace_id: null, + writes: null ) ``` diff --git a/docs/DomainMsaMetaInfo.md b/docs/DomainMsaMetaInfo.md deleted file mode 100644 index fe57f7c6..00000000 --- a/docs/DomainMsaMetaInfo.md +++ /dev/null @@ -1,20 +0,0 @@ -# Falcon::DomainMsaMetaInfo - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **pagination** | [**MsaspecPaging**](MsaspecPaging.md) | | [optional] | -| **query_time** | **Float** | | | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::DomainMsaMetaInfo.new( - pagination: null, - query_time: null -) -``` - diff --git a/docs/DomainNewsDocument.md b/docs/DomainNewsDocument.md index a4d1fdff..2bb27b4a 100644 --- a/docs/DomainNewsDocument.md +++ b/docs/DomainNewsDocument.md @@ -13,6 +13,7 @@ | **id** | **Integer** | Integer ID of the News document | | | **image** | [**DomainImage**](DomainImage.md) | | [optional] | | **last_modified_date** | **Integer** | Date of the news document last modification, unix timestampt | | +| **malware** | [**Array<DomainReportMalware>**](DomainReportMalware.md) | Malware mentioned, related or referenced in the news/report | [optional] | | **motivations** | [**Array<DomainEntity>**](DomainEntity.md) | News mentioned motivation or motivation of related actors and malware families | | | **name** | **String** | News title | | | **notify_users** | **Boolean** | internal field, not used | [optional] | @@ -43,6 +44,7 @@ instance = Falcon::DomainNewsDocument.new( id: null, image: null, last_modified_date: null, + malware: null, motivations: null, name: null, notify_users: null, diff --git a/docs/DomainNotificationDetailsV1.md b/docs/DomainNotificationDetailsV1.md deleted file mode 100644 index 9cd89bc7..00000000 --- a/docs/DomainNotificationDetailsV1.md +++ /dev/null @@ -1,36 +0,0 @@ -# Falcon::DomainNotificationDetailsV1 - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **author** | **String** | The raw intelligence item author username | [optional] | -| **content** | **String** | Highlighted content based on the rule that generated the notifications. Highlights are surrounded with a `<cs-highlight>` tag | | -| **created_date** | **Time** | The date when the raw intelligence item was created | | -| **labels** | **Array<String>** | The raw intelligence item labels. These contain hints around what is actually included in the item (malware, IPs, emails, etc). | [optional] | -| **language** | **String** | The raw intelligence item language | [optional] | -| **site** | **String** | The site where the raw intelligence item was found | [optional] | -| **title** | **String** | The raw intelligence item title | [optional] | -| **type** | **String** | The type of the raw intelligence item | | -| **updated_date** | **Time** | The date when the raw intelligence item was updated | | -| **url** | **String** | The raw intelligence item URL | [optional] | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::DomainNotificationDetailsV1.new( - author: null, - content: null, - created_date: null, - labels: null, - language: null, - site: null, - title: null, - type: null, - updated_date: null, - url: null -) -``` - diff --git a/docs/DomainNotificationV1.md b/docs/DomainNotificationV1.md index 07891061..3c445cb8 100644 --- a/docs/DomainNotificationV1.md +++ b/docs/DomainNotificationV1.md @@ -4,6 +4,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | +| **actor_slug** | **String** | | | | **assigned_to_uid** | **String** | The email of the user who is assigned to this notification | [optional] | | **assigned_to_username** | **String** | The name of the user who is assigned to this notification | [optional] | | **assigned_to_uuid** | **String** | The unique ID of the user who is assigned to this notification | [optional] | @@ -36,6 +37,7 @@ require 'crimson-falcon' instance = Falcon::DomainNotificationV1.new( + actor_slug: null, assigned_to_uid: null, assigned_to_username: null, assigned_to_uuid: null, diff --git a/docs/DomainPolicyInfo.md b/docs/DomainPolicyInfo.md index da9c717b..927ab755 100644 --- a/docs/DomainPolicyInfo.md +++ b/docs/DomainPolicyInfo.md @@ -31,6 +31,8 @@ | **description** | **String** | | [optional] | | **event_type** | **String** | | [optional] | | **fql_policy** | **String** | | [optional] | +| **hipaa_benchmark_ids** | **Array<Integer>** | | [optional] | +| **hitrust_benchmark_ids** | **Array<Integer>** | | [optional] | | **internal_only** | **Boolean** | | [optional] | | **is_enabled** | **Boolean** | | | | **is_remediable** | **Boolean** | | | @@ -89,6 +91,8 @@ instance = Falcon::DomainPolicyInfo.new( description: null, event_type: null, fql_policy: null, + hipaa_benchmark_ids: null, + hitrust_benchmark_ids: null, internal_only: null, is_enabled: null, is_remediable: null, diff --git a/docs/DomainQueryResponse.md b/docs/DomainQueryResponse.md index a1269488..f2587360 100644 --- a/docs/DomainQueryResponse.md +++ b/docs/DomainQueryResponse.md @@ -4,8 +4,8 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | -| **meta** | [**DomainMsaMetaInfo**](DomainMsaMetaInfo.md) | | | +| **errors** | [**Array<DomainReconAPIError>**](DomainReconAPIError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | | **resources** | **Array<String>** | | | ## Example diff --git a/docs/DomainReportMalware.md b/docs/DomainReportMalware.md new file mode 100644 index 00000000..8858f8c4 --- /dev/null +++ b/docs/DomainReportMalware.md @@ -0,0 +1,22 @@ +# Falcon::DomainReportMalware + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **community_identifiers** | **Array<String>** | | [optional] | +| **family_name** | **String** | | | +| **slug** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainReportMalware.new( + community_identifiers: null, + family_name: null, + slug: null +) +``` + diff --git a/docs/DomainRule.md b/docs/DomainRule.md index 22827b49..e02c5acb 100644 --- a/docs/DomainRule.md +++ b/docs/DomainRule.md @@ -4,15 +4,14 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **created_date** | **Integer** | | | -| **description** | **String** | | | -| **id** | **Integer** | | | -| **last_modified_date** | **Integer** | | | -| **name** | **String** | | | -| **rich_text_description** | **String** | | | -| **short_description** | **String** | | | -| **tags** | **Array<String>** | | | -| **type** | **String** | | | +| **categories** | **Array<String>** | The categories associated with the rule | | +| **created_date** | **String** | UTC timestamp when rule was created | | +| **customer_id** | **String** | The ID of the customer | | +| **id** | **String** | The ID of the rule | | +| **name** | **String** | The name of the rule | | +| **rule_type** | **String** | The type of the rule | | +| **updated_date** | **String** | UTC timestamp when rule was last updated | | +| **value** | **String** | The value of the rule | | ## Example @@ -20,15 +19,14 @@ require 'crimson-falcon' instance = Falcon::DomainRule.new( + categories: null, created_date: null, - description: null, + customer_id: null, id: null, - last_modified_date: null, name: null, - rich_text_description: null, - short_description: null, - tags: null, - type: null + rule_type: null, + updated_date: null, + value: null ) ``` diff --git a/docs/DomainScan.md b/docs/DomainScan.md index b95e91f7..69b91580 100644 --- a/docs/DomainScan.md +++ b/docs/DomainScan.md @@ -8,6 +8,7 @@ | **cid** | **String** | | [optional] | | **cloud_ml_level_detection** | **Integer** | | [optional] | | **cloud_ml_level_prevention** | **Integer** | | [optional] | +| **completed_host_count** | **Integer** | | [optional] | | **cpu_priority** | **Integer** | | [optional] | | **created_by** | **String** | | [optional] | | **created_on** | **Time** | | [optional] | @@ -18,11 +19,14 @@ | **host_groups** | **Array<String>** | | [optional] | | **hosts** | **Array<String>** | | [optional] | | **id** | **String** | | | +| **incomplete_host_count** | **Integer** | | [optional] | | **initiated_from** | **String** | | [optional] | | **last_updated** | **Time** | | [optional] | | **max_duration** | **Integer** | | [optional] | | **max_file_size** | **Integer** | | [optional] | | **metadata** | [**Array<DomainScanMetadata>**](DomainScanMetadata.md) | | [optional] | +| **missing_host_count** | **Integer** | | [optional] | +| **not_started_host_count** | **Integer** | | [optional] | | **pause_duration** | **Integer** | | [optional] | | **policy_setting** | **Array<Integer>** | | [optional] | | **preemption_priority** | **Integer** | | [optional] | @@ -31,11 +35,14 @@ | **scan_completed_on** | **Time** | | [optional] | | **scan_exclusions** | **Array<String>** | | [optional] | | **scan_inclusions** | **Array<String>** | | [optional] | +| **scan_scheduled_on** | **Time** | | [optional] | | **scan_started_on** | **Time** | | [optional] | | **sensor_ml_level_detection** | **Integer** | | [optional] | | **sensor_ml_level_prevention** | **Integer** | | [optional] | | **severity** | **Integer** | | [optional] | +| **started_host_count** | **Integer** | | [optional] | | **status** | **String** | | [optional] | +| **targeted_host_count** | **Integer** | | [optional] | ## Example @@ -47,6 +54,7 @@ instance = Falcon::DomainScan.new( cid: null, cloud_ml_level_detection: null, cloud_ml_level_prevention: null, + completed_host_count: null, cpu_priority: null, created_by: null, created_on: null, @@ -57,11 +65,14 @@ instance = Falcon::DomainScan.new( host_groups: null, hosts: null, id: null, + incomplete_host_count: null, initiated_from: null, last_updated: null, max_duration: null, max_file_size: null, metadata: null, + missing_host_count: null, + not_started_host_count: null, pause_duration: null, policy_setting: null, preemption_priority: null, @@ -70,11 +81,14 @@ instance = Falcon::DomainScan.new( scan_completed_on: null, scan_exclusions: null, scan_inclusions: null, + scan_scheduled_on: null, scan_started_on: null, sensor_ml_level_detection: null, sensor_ml_level_prevention: null, severity: null, - status: null + started_host_count: null, + status: null, + targeted_host_count: null ) ``` diff --git a/docs/DomainScanProfile.md b/docs/DomainScanProfile.md index cb5ba92f..942fd090 100644 --- a/docs/DomainScanProfile.md +++ b/docs/DomainScanProfile.md @@ -32,6 +32,7 @@ | **sensor_ml_level_detection** | **Integer** | | [optional] | | **sensor_ml_level_prevention** | **Integer** | | [optional] | | **status** | **String** | | [optional] | +| **targeted_host_count** | **Integer** | | [optional] | ## Example @@ -66,7 +67,8 @@ instance = Falcon::DomainScanProfile.new( schedule: null, sensor_ml_level_detection: null, sensor_ml_level_prevention: null, - status: null + status: null, + targeted_host_count: null ) ``` diff --git a/docs/DomainScanV2.md b/docs/DomainScanV2.md new file mode 100644 index 00000000..26a4b8ef --- /dev/null +++ b/docs/DomainScanV2.md @@ -0,0 +1,92 @@ +# Falcon::DomainScanV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **affected_hosts_count** | **Integer** | | | +| **cid** | **String** | | [optional] | +| **cloud_ml_level_detection** | **Integer** | | [optional] | +| **cloud_ml_level_prevention** | **Integer** | | [optional] | +| **completed_host_count** | **Integer** | | | +| **cpu_priority** | **Integer** | | [optional] | +| **created_by** | **String** | | [optional] | +| **created_on** | **Time** | | [optional] | +| **description** | **String** | | [optional] | +| **endpoint_notification** | **Boolean** | | [optional] | +| **file_paths** | **Array<String>** | | [optional] | +| **filecount** | [**DomainFileCountV2**](DomainFileCountV2.md) | | [optional] | +| **host_groups** | **Array<String>** | | [optional] | +| **hosts** | **Array<String>** | | [optional] | +| **id** | **String** | | | +| **incomplete_host_count** | **Integer** | | | +| **initiated_from** | **String** | | [optional] | +| **last_updated** | **Time** | | [optional] | +| **max_duration** | **Integer** | | [optional] | +| **max_file_size** | **Integer** | | [optional] | +| **metadata** | **Array<String>** | | [optional] | +| **missing_host_count** | **Integer** | | | +| **not_started_host_count** | **Integer** | | | +| **pause_duration** | **Integer** | | [optional] | +| **policy_setting** | **Array<Integer>** | | [optional] | +| **preemption_priority** | **Integer** | | [optional] | +| **profile_id** | **String** | | [optional] | +| **quarantine** | **Boolean** | | [optional] | +| **scan_completed_on** | **Time** | | [optional] | +| **scan_exclusions** | **Array<String>** | | [optional] | +| **scan_inclusions** | **Array<String>** | | [optional] | +| **scan_started_on** | **Time** | | [optional] | +| **sensor_ml_level_detection** | **Integer** | | [optional] | +| **sensor_ml_level_prevention** | **Integer** | | [optional] | +| **severity** | **Integer** | | [optional] | +| **started_host_count** | **Integer** | | | +| **status** | **String** | | [optional] | +| **targeted_host_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainScanV2.new( + affected_hosts_count: null, + cid: null, + cloud_ml_level_detection: null, + cloud_ml_level_prevention: null, + completed_host_count: null, + cpu_priority: null, + created_by: null, + created_on: null, + description: null, + endpoint_notification: null, + file_paths: null, + filecount: null, + host_groups: null, + hosts: null, + id: null, + incomplete_host_count: null, + initiated_from: null, + last_updated: null, + max_duration: null, + max_file_size: null, + metadata: null, + missing_host_count: null, + not_started_host_count: null, + pause_duration: null, + policy_setting: null, + preemption_priority: null, + profile_id: null, + quarantine: null, + scan_completed_on: null, + scan_exclusions: null, + scan_inclusions: null, + scan_started_on: null, + sensor_ml_level_detection: null, + sensor_ml_level_prevention: null, + severity: null, + started_host_count: null, + status: null, + targeted_host_count: null +) +``` + diff --git a/docs/DomainSchedule.md b/docs/DomainSchedule.md index 6de9b3ac..215faeca 100644 --- a/docs/DomainSchedule.md +++ b/docs/DomainSchedule.md @@ -4,9 +4,9 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **can_stagger** | **Boolean** | | | -| **definition** | **String** | | | -| **display** | **String** | | | +| **ignored_by_channelfile** | **Boolean** | | [optional] | +| **interval** | **Integer** | | [optional] | +| **start_timestamp** | **String** | | [optional] | ## Example @@ -14,9 +14,9 @@ require 'crimson-falcon' instance = Falcon::DomainSchedule.new( - can_stagger: null, - definition: null, - display: null + ignored_by_channelfile: null, + interval: null, + start_timestamp: null ) ``` diff --git a/docs/DomainSession.md b/docs/DomainSession.md index db739064..7d12181d 100644 --- a/docs/DomainSession.md +++ b/docs/DomainSession.md @@ -6,11 +6,11 @@ | ---- | ---- | ----------- | ----- | | **cid** | **String** | | | | **cloud_request_ids** | **Array<String>** | | | -| **commands** | **Hash<String, Object>** | | | +| **commands** | **Hash<String, Object>** | | [optional] | | **commands_queued** | **Boolean** | | | | **created_at** | **Time** | | | | **deleted_at** | **Time** | | | -| **device_details** | [**DomainDevice**](DomainDevice.md) | | | +| **device_details** | [**DomainDevice**](DomainDevice.md) | | [optional] | | **device_id** | **String** | | | | **duration** | **Float** | | | | **hostname** | **String** | | | @@ -18,9 +18,9 @@ | **logs** | [**Array<ModelSessionLog>**](ModelSessionLog.md) | | | | **offline_queued** | **Boolean** | | | | **origin** | **String** | | | -| **platform_id** | **Integer** | | | -| **platform_name** | **String** | | | -| **pwd** | **String** | | | +| **platform_id** | **Integer** | | [optional] | +| **platform_name** | **String** | | [optional] | +| **pwd** | **String** | | [optional] | | **updated_at** | **Time** | | | | **user_id** | **String** | | | | **user_uuid** | **String** | | | diff --git a/docs/DomainTelegramChannelInfo.md b/docs/DomainTelegramChannelInfo.md new file mode 100644 index 00000000..f17d2212 --- /dev/null +++ b/docs/DomainTelegramChannelInfo.md @@ -0,0 +1,20 @@ +# Falcon::DomainTelegramChannelInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **title** | **String** | | [optional] | +| **url** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainTelegramChannelInfo.new( + title: null, + url: null +) +``` + diff --git a/docs/DomainTelegramInfo.md b/docs/DomainTelegramInfo.md new file mode 100644 index 00000000..7cc291bb --- /dev/null +++ b/docs/DomainTelegramInfo.md @@ -0,0 +1,22 @@ +# Falcon::DomainTelegramInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **channel_info** | [**DomainTelegramChannelInfo**](DomainTelegramChannelInfo.md) | | [optional] | +| **recipient_info** | [**DomainTelegramRecipientInfo**](DomainTelegramRecipientInfo.md) | | [optional] | +| **sender_info** | [**DomainTelegramSenderInfo**](DomainTelegramSenderInfo.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainTelegramInfo.new( + channel_info: null, + recipient_info: null, + sender_info: null +) +``` + diff --git a/docs/DomainTelegramRecipientInfo.md b/docs/DomainTelegramRecipientInfo.md new file mode 100644 index 00000000..aedb56a2 --- /dev/null +++ b/docs/DomainTelegramRecipientInfo.md @@ -0,0 +1,28 @@ +# Falcon::DomainTelegramRecipientInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **first_name** | **String** | | [optional] | +| **id** | **Integer** | | [optional] | +| **last_name** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **username** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainTelegramRecipientInfo.new( + first_name: null, + id: null, + last_name: null, + name: null, + type: null, + username: null +) +``` + diff --git a/docs/DomainTelegramSenderInfo.md b/docs/DomainTelegramSenderInfo.md new file mode 100644 index 00000000..302a8a45 --- /dev/null +++ b/docs/DomainTelegramSenderInfo.md @@ -0,0 +1,28 @@ +# Falcon::DomainTelegramSenderInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **first_name** | **String** | | [optional] | +| **id** | **Integer** | | [optional] | +| **last_name** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **username** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainTelegramSenderInfo.new( + first_name: null, + id: null, + last_name: null, + name: null, + type: null, + username: null +) +``` + diff --git a/docs/DomainThreatEntity.md b/docs/DomainThreatEntity.md new file mode 100644 index 00000000..3e03406e --- /dev/null +++ b/docs/DomainThreatEntity.md @@ -0,0 +1,18 @@ +# Falcon::DomainThreatEntity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **family_name** | **String** | family name of the threat | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DomainThreatEntity.new( + family_name: null +) +``` + diff --git a/docs/DomainUser.md b/docs/DomainUser.md index e1172451..6318e05f 100644 --- a/docs/DomainUser.md +++ b/docs/DomainUser.md @@ -5,11 +5,9 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **cid** | **String** | | [optional] | -| **created_at** | **Time** | | [optional] | +| **email** | **String** | | [optional] | | **first_name** | **String** | | [optional] | -| **last_login_at** | **Time** | | [optional] | | **last_name** | **String** | | [optional] | -| **uid** | **String** | | [optional] | | **uuid** | **String** | | [optional] | ## Example @@ -19,11 +17,9 @@ require 'crimson-falcon' instance = Falcon::DomainUser.new( cid: null, - created_at: null, + email: null, first_name: null, - last_login_at: null, last_name: null, - uid: null, uuid: null ) ``` diff --git a/docs/DomainUserGrants.md b/docs/DomainUserGrants.md index a2018038..a4afdbe8 100644 --- a/docs/DomainUserGrants.md +++ b/docs/DomainUserGrants.md @@ -4,16 +4,16 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **cid** | **String** | | | +| **cid** | **String** | | [optional] | | **cid_group_id** | **String** | | [optional] | | **cid_group_name** | **String** | | [optional] | -| **grant_type** | **String** | | | +| **grant_type** | **String** | | [optional] | | **parent_cid** | **String** | | [optional] | | **role_id** | **String** | | | -| **role_name** | **String** | | | +| **role_name** | **String** | | [optional] | | **user_group_id** | **String** | | [optional] | | **user_group_name** | **String** | | [optional] | -| **uuid** | **String** | | | +| **uuid** | **String** | | [optional] | ## Example diff --git a/docs/DriftIndicatorsApi.md b/docs/DriftIndicatorsApi.md new file mode 100644 index 00000000..8ba118a4 --- /dev/null +++ b/docs/DriftIndicatorsApi.md @@ -0,0 +1,381 @@ +# Falcon::DriftIndicatorsApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**get_drift_indicators_values_by_date**](DriftIndicatorsApi.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**](DriftIndicatorsApi.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**](DriftIndicatorsApi.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**](DriftIndicatorsApi.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**](DriftIndicatorsApi.md#search_drift_indicators) | **GET** /container-security/queries/drift-indicators/v1 | Retrieve all drift indicators that match the given query | + + +## get_drift_indicators_values_by_date + +> get_drift_indicators_values_by_date(opts) + +Returns the count of Drift Indicators by the date. by default it's for 7 days. + +### 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::DriftIndicatorsApi.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 + limit: 56 # Integer | The upper-bound on the number of records to retrieve. +} + +begin + # Returns the count of Drift Indicators by the date. by default it's for 7 days. + result = api_instance.get_drift_indicators_values_by_date(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->get_drift_indicators_values_by_date: #{e}" +end +``` + +#### Using the get_drift_indicators_values_by_date_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_drift_indicators_values_by_date_with_http_info(opts) + +```ruby +begin + # Returns the count of Drift Indicators by the date. by default it's for 7 days. + data, status_code, headers = api_instance.get_drift_indicators_values_by_date_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->get_drift_indicators_values_by_date_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**DriftindicatorsDriftIndicatorsFieldValue**](DriftindicatorsDriftIndicatorsFieldValue.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_drift_indicator_entities + +> read_drift_indicator_entities(opts) + +Retrieve Drift Indicator entities identified by the provided 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::DriftIndicatorsApi.new +opts = { + ids: ['inner_example'] # Array | Search Drift Indicators by ids - The maximum amount is 100 IDs +} + +begin + # Retrieve Drift Indicator entities identified by the provided IDs + result = api_instance.read_drift_indicator_entities(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->read_drift_indicator_entities: #{e}" +end +``` + +#### Using the read_drift_indicator_entities_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_drift_indicator_entities_with_http_info(opts) + +```ruby +begin + # Retrieve Drift Indicator entities identified by the provided IDs + data, status_code, headers = api_instance.read_drift_indicator_entities_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->read_drift_indicator_entities_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | Search Drift Indicators by ids - The maximum amount is 100 IDs | [optional] | + +### Return type + +[**DriftindicatorsDriftEntityResponse**](DriftindicatorsDriftEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_drift_indicators_count + +> read_drift_indicators_count(opts) + +Returns the total count of Drift indicators over a time period + +### 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::DriftIndicatorsApi.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 +} + +begin + # Returns the total count of Drift indicators over a time period + result = api_instance.read_drift_indicators_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->read_drift_indicators_count: #{e}" +end +``` + +#### Using the read_drift_indicators_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_drift_indicators_count_with_http_info(opts) + +```ruby +begin + # Returns the total count of Drift indicators over a time period + data, status_code, headers = api_instance.read_drift_indicators_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->read_drift_indicators_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**DriftindicatorsDriftIndicatorsCountValue**](DriftindicatorsDriftIndicatorsCountValue.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## search_and_read_drift_indicator_entities + +> search_and_read_drift_indicator_entities(opts) + +Retrieve Drift Indicators by the provided search 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::DriftIndicatorsApi.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 + 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 + # Retrieve Drift Indicators by the provided search criteria + result = api_instance.search_and_read_drift_indicator_entities(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->search_and_read_drift_indicator_entities: #{e}" +end +``` + +#### Using the search_and_read_drift_indicator_entities_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_and_read_drift_indicator_entities_with_http_info(opts) + +```ruby +begin + # Retrieve Drift Indicators by the provided search criteria + data, status_code, headers = api_instance.search_and_read_drift_indicator_entities_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->search_and_read_drift_indicator_entities_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **sort** | **String** | The fields to sort the records on. | [optional] | + +### Return type + +[**DriftindicatorsDriftEntityResponse**](DriftindicatorsDriftEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## search_drift_indicators + +> search_drift_indicators(opts) + +Retrieve all drift indicators that match the given query + +### 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::DriftIndicatorsApi.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 + 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 + # Retrieve all drift indicators that match the given query + result = api_instance.search_drift_indicators(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->search_drift_indicators: #{e}" +end +``` + +#### Using the search_drift_indicators_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_drift_indicators_with_http_info(opts) + +```ruby +begin + # Retrieve all drift indicators that match the given query + data, status_code, headers = api_instance.search_drift_indicators_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling DriftIndicatorsApi->search_drift_indicators_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **sort** | **String** | The fields to sort the records on. | [optional] | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/DriftindicatorsDriftEntityResponse.md b/docs/DriftindicatorsDriftEntityResponse.md new file mode 100644 index 00000000..1a94361a --- /dev/null +++ b/docs/DriftindicatorsDriftEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::DriftindicatorsDriftEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIDriftIndicators>**](ModelsAPIDriftIndicators.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DriftindicatorsDriftEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/DriftindicatorsDriftIndicatorsCountValue.md b/docs/DriftindicatorsDriftIndicatorsCountValue.md new file mode 100644 index 00000000..dabea6d4 --- /dev/null +++ b/docs/DriftindicatorsDriftIndicatorsCountValue.md @@ -0,0 +1,22 @@ +# Falcon::DriftindicatorsDriftIndicatorsCountValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<CommonCountAsResource>**](CommonCountAsResource.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DriftindicatorsDriftIndicatorsCountValue.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/DriftindicatorsDriftIndicatorsFieldValue.md b/docs/DriftindicatorsDriftIndicatorsFieldValue.md new file mode 100644 index 00000000..a436262e --- /dev/null +++ b/docs/DriftindicatorsDriftIndicatorsFieldValue.md @@ -0,0 +1,22 @@ +# Falcon::DriftindicatorsDriftIndicatorsFieldValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::DriftindicatorsDriftIndicatorsFieldValue.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/EmpowerapiFalconScript.md b/docs/EmpowerapiFalconScript.md new file mode 100644 index 00000000..834125e4 --- /dev/null +++ b/docs/EmpowerapiFalconScript.md @@ -0,0 +1,60 @@ +# Falcon::EmpowerapiFalconScript + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **access_roles** | **Array<String>** | | | +| **categories** | **Array<String>** | | | +| **content** | **String** | | [optional] | +| **created_by** | **String** | | | +| **created_timestamp** | **Time** | | | +| **description** | **String** | | | +| **id** | **String** | | | +| **is_disruptive** | **Boolean** | | | +| **modified_by** | **String** | | | +| **modified_timestamp** | **Time** | | | +| **modifies_system** | **Boolean** | | | +| **name** | **String** | | | +| **platform** | **String** | | | +| **required_skus** | **Array<String>** | | [optional] | +| **revision** | **Integer** | | | +| **sha256** | **String** | | [optional] | +| **size** | **Integer** | | [optional] | +| **use_case** | **String** | | | +| **workflow_enabled** | **Boolean** | | | +| **workflow_input_schema** | **String** | | | +| **workflow_output_schema** | **String** | | | +| **workflow_tags** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::EmpowerapiFalconScript.new( + access_roles: null, + categories: null, + content: null, + created_by: null, + created_timestamp: null, + description: null, + id: null, + is_disruptive: null, + modified_by: null, + modified_timestamp: null, + modifies_system: null, + name: null, + platform: null, + required_skus: null, + revision: null, + sha256: null, + size: null, + use_case: null, + workflow_enabled: null, + workflow_input_schema: null, + workflow_output_schema: null, + workflow_tags: null +) +``` + diff --git a/docs/EmpowerapiMsaFalconScriptResponse.md b/docs/EmpowerapiMsaFalconScriptResponse.md new file mode 100644 index 00000000..49eb056a --- /dev/null +++ b/docs/EmpowerapiMsaFalconScriptResponse.md @@ -0,0 +1,22 @@ +# Falcon::EmpowerapiMsaFalconScriptResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<EmpowerapiFalconScript>**](EmpowerapiFalconScript.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::EmpowerapiMsaFalconScriptResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/EmpowerapiMsaIDListResponse.md b/docs/EmpowerapiMsaIDListResponse.md new file mode 100644 index 00000000..b5cfc5b2 --- /dev/null +++ b/docs/EmpowerapiMsaIDListResponse.md @@ -0,0 +1,22 @@ +# Falcon::EmpowerapiMsaIDListResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::EmpowerapiMsaIDListResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PublicGetChangesResponse.md b/docs/EntitiesODSScanResponseV2.md similarity index 70% rename from docs/PublicGetChangesResponse.md rename to docs/EntitiesODSScanResponseV2.md index a6e9d037..77c400ee 100644 --- a/docs/PublicGetChangesResponse.md +++ b/docs/EntitiesODSScanResponseV2.md @@ -1,4 +1,4 @@ -# Falcon::PublicGetChangesResponse +# Falcon::EntitiesODSScanResponseV2 ## Properties @@ -6,14 +6,14 @@ | ---- | ---- | ----------- | ----- | | **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | | **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | -| **resources** | [**Array<PublicChange>**](PublicChange.md) | | | +| **resources** | [**Array<DomainScanV2>**](DomainScanV2.md) | | | ## Example ```ruby require 'crimson-falcon' -instance = Falcon::PublicGetChangesResponse.new( +instance = Falcon::EntitiesODSScanResponseV2.new( errors: null, meta: null, resources: null diff --git a/docs/ExecutionsActivityExecutionResult.md b/docs/ExecutionsActivityExecutionResult.md new file mode 100644 index 00000000..d16a238d --- /dev/null +++ b/docs/ExecutionsActivityExecutionResult.md @@ -0,0 +1,40 @@ +# Falcon::ExecutionsActivityExecutionResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **end_timestamp** | **Time** | Timestamp of when the execution completed. Only present when status is an end state. | [optional] | +| **error_code** | **Integer** | When a node execution is in an error status this field is present and provides an error code that can be used to determine details why the failure occurred. | [optional] | +| **error_message** | **String** | When a node execution is in an error status this field is present and provides a user friendly error message. | [optional] | +| **id** | **String** | The unique identifier of the selected activity that is being configured. | | +| **mocked** | **Boolean** | Whether this node's result is mocked | [optional] | +| **name** | **String** | Optional user provided name for the activity, if not specified a default of the name for that activity will be used. | | +| **node_id** | **String** | Unique id of the node as specified in the definition. | | +| **references** | [**Array<ExecutionsReferenceLink>**](ExecutionsReferenceLink.md) | A set of objects which provide references to other URLs related to the activity execution. | [optional] | +| **result** | **Object** | Result fields of activity execution. | [optional] | +| **start_timestamp** | **Time** | Timestamp of when the execution first started. | | +| **status** | **String** | Current status of execution for the activity. | | +| **type** | **String** | Root element of the execution route of the activity | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsActivityExecutionResult.new( + end_timestamp: null, + error_code: null, + error_message: null, + id: null, + mocked: null, + name: null, + node_id: null, + references: null, + result: null, + start_timestamp: null, + status: null, + type: null +) +``` + diff --git a/docs/ExecutionsAncestorExecution.md b/docs/ExecutionsAncestorExecution.md new file mode 100644 index 00000000..e810f929 --- /dev/null +++ b/docs/ExecutionsAncestorExecution.md @@ -0,0 +1,22 @@ +# Falcon::ExecutionsAncestorExecution + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **field** | **String** | Display name of the input field to the parent execution loop node. | | +| **id** | **String** | Unique id of the ancestor execution id. | | +| **iteration** | **Integer** | Index number indicating what iteration of the parent execution this given execution is associated with. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsAncestorExecution.new( + field: null, + id: null, + iteration: null +) +``` + diff --git a/docs/ExecutionsChildExecutionResult.md b/docs/ExecutionsChildExecutionResult.md new file mode 100644 index 00000000..5b9b0de2 --- /dev/null +++ b/docs/ExecutionsChildExecutionResult.md @@ -0,0 +1,26 @@ +# Falcon::ExecutionsChildExecutionResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **end_timestamp** | **Time** | Timestamp of when the execution completed. Only present when status is an end state. | [optional] | +| **id** | **String** | Unique id of the child execution id. | | +| **iteration** | **Integer** | Index number indicating what iteration of the parent execution this given execution is associated with. | | +| **start_timestamp** | **Time** | Timestamp of when the execution first started. | | +| **status** | **String** | Current status of execution. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsChildExecutionResult.new( + end_timestamp: null, + id: null, + iteration: null, + start_timestamp: null, + status: null +) +``` + diff --git a/docs/ExecutionsExecutionResult.md b/docs/ExecutionsExecutionResult.md new file mode 100644 index 00000000..3d5c658c --- /dev/null +++ b/docs/ExecutionsExecutionResult.md @@ -0,0 +1,38 @@ +# Falcon::ExecutionsExecutionResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **activities** | [**Array<ExecutionsActivityExecutionResult>**](ExecutionsActivityExecutionResult.md) | Details for the result of each activity node. | | +| **ancestor_executions** | [**Array<ExecutionsAncestorExecution>**](ExecutionsAncestorExecution.md) | Populated when the execution origin is from a sub model. | | +| **definition_id** | **String** | Unique id of the workflow the execution is associated with. | | +| **definition_version** | **Integer** | Version of the definition that executed. | | +| **end_timestamp** | **Time** | Timestamp of when the execution completed. Only present when status is an end state. | [optional] | +| **execution_id** | **String** | Unique id generated for the execution. | | +| **loops** | [**Array<ExecutionsLoopResult>**](ExecutionsLoopResult.md) | Details for the results of each loop in the workflow definition. | | +| **retryable** | **Boolean** | A boolean value indicating whether the failed workflow execution is retryable | | +| **start_timestamp** | **Time** | Timestamp of when the execution first started. | | +| **status** | **String** | Overall status for the execution. | | +| **trigger** | [**ExecutionsTriggerResult**](ExecutionsTriggerResult.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsExecutionResult.new( + activities: null, + ancestor_executions: null, + definition_id: null, + definition_version: null, + end_timestamp: null, + execution_id: null, + loops: null, + retryable: null, + start_timestamp: null, + status: null, + trigger: null +) +``` + diff --git a/docs/ExecutionsIterations.md b/docs/ExecutionsIterations.md new file mode 100644 index 00000000..c357e99f --- /dev/null +++ b/docs/ExecutionsIterations.md @@ -0,0 +1,28 @@ +# Falcon::ExecutionsIterations + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **completed** | **Integer** | count of executions with completed status. | | +| **failed** | **Integer** | count of executions with failed status. | | +| **in_progress** | **Integer** | count of executions with in progress status | | +| **is_nonrecoverable** | **Boolean** | true when sub-model has non recoverable status | | +| **pending** | **Integer** | count of executions that are pending | | +| **total** | **Integer** | count of total executions. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsIterations.new( + completed: null, + failed: null, + in_progress: null, + is_nonrecoverable: null, + pending: null, + total: null +) +``` + diff --git a/docs/ExecutionsLoopResult.md b/docs/ExecutionsLoopResult.md new file mode 100644 index 00000000..67adb7e7 --- /dev/null +++ b/docs/ExecutionsLoopResult.md @@ -0,0 +1,36 @@ +# Falcon::ExecutionsLoopResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **child_executions** | [**Array<ExecutionsChildExecutionResult>**](ExecutionsChildExecutionResult.md) | Details of all child executions associated with the loop. A child execution is generated for each iteration of the input data. | | +| **end_timestamp** | **Time** | Timestamp of when the execution completed. Only present when status is an end state. | [optional] | +| **error_code** | **Integer** | When a node execution is in an error status this field is present and provides an error code that can be used to determine details why the failure occurred. | [optional] | +| **error_message** | **String** | When a node execution is in an error status this field is present and provides a user friendly error message. | [optional] | +| **input_field** | **String** | Display name of the input field that the sub model is iterating over. | | +| **iterations** | [**ExecutionsIterations**](ExecutionsIterations.md) | | | +| **mocked** | **Boolean** | Whether this node's result is mocked | [optional] | +| **node_id** | **String** | Unique id of the node as specified in the definition. | | +| **start_timestamp** | **Time** | Timestamp of when the execution first started. | | +| **status** | **String** | Current status of execution for the activity. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsLoopResult.new( + child_executions: null, + end_timestamp: null, + error_code: null, + error_message: null, + input_field: null, + iterations: null, + mocked: null, + node_id: null, + start_timestamp: null, + status: null +) +``` + diff --git a/docs/ExecutionsReferenceLink.md b/docs/ExecutionsReferenceLink.md new file mode 100644 index 00000000..a920fc45 --- /dev/null +++ b/docs/ExecutionsReferenceLink.md @@ -0,0 +1,20 @@ +# Falcon::ExecutionsReferenceLink + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **display** | **String** | Descriptive name of the reference | | +| **url** | **String** | URL path to the reference | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsReferenceLink.new( + display: null, + url: null +) +``` + diff --git a/docs/ExecutionsTriggerResult.md b/docs/ExecutionsTriggerResult.md new file mode 100644 index 00000000..7a3dabd9 --- /dev/null +++ b/docs/ExecutionsTriggerResult.md @@ -0,0 +1,24 @@ +# Falcon::ExecutionsTriggerResult + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier for the selected trigger as provided by the triggers API | [optional] | +| **mocked** | **Boolean** | Whether this node's result is mocked | [optional] | +| **name** | **String** | Display name of the trigger | | +| **result** | **String** | Opaque blob for result of trigger. Structured according to the trigger's JSON schema'. | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ExecutionsTriggerResult.new( + id: null, + mocked: null, + name: null, + result: null +) +``` + diff --git a/docs/FalconCompleteDashboardApi.md b/docs/FalconCompleteDashboardApi.md index 74f0a4a6..2acaa2e7 100644 --- a/docs/FalconCompleteDashboardApi.md +++ b/docs/FalconCompleteDashboardApi.md @@ -4,14 +4,19 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | +| [**aggregate_alerts**](FalconCompleteDashboardApi.md#aggregate_alerts) | **POST** /falcon-complete-dashboards/aggregates/alerts/GET/v1 | Retrieve aggregate alerts values based on the matched filter | | [**aggregate_allow_list**](FalconCompleteDashboardApi.md#aggregate_allow_list) | **POST** /falcon-complete-dashboards/aggregates/allowlist/GET/v1 | Retrieve aggregate allowlist ticket values based on the matched filter | | [**aggregate_block_list**](FalconCompleteDashboardApi.md#aggregate_block_list) | **POST** /falcon-complete-dashboards/aggregates/blocklist/GET/v1 | Retrieve aggregate blocklist ticket values based on the matched filter | | [**aggregate_detections**](FalconCompleteDashboardApi.md#aggregate_detections) | **POST** /falcon-complete-dashboards/aggregates/detects/GET/v1 | Retrieve aggregate detection values based on the matched filter | | [**aggregate_device_count_collection**](FalconCompleteDashboardApi.md#aggregate_device_count_collection) | **POST** /falcon-complete-dashboards/aggregates/devicecount-collections/GET/v1 | Retrieve aggregate host/devices count based on the matched filter | | [**aggregate_escalations**](FalconCompleteDashboardApi.md#aggregate_escalations) | **POST** /falcon-complete-dashboards/aggregates/escalations/GET/v1 | Retrieve aggregate escalation ticket values based on the matched filter | | [**aggregate_fc_incidents**](FalconCompleteDashboardApi.md#aggregate_fc_incidents) | **POST** /falcon-complete-dashboards/aggregates/incidents/GET/v1 | Retrieve aggregate incident values based on the matched filter | +| [**aggregate_prevention_policy**](FalconCompleteDashboardApi.md#aggregate_prevention_policy) | **POST** /falcon-complete-dashboards/aggregates/prevention-policies/v1 | Retrieve prevention policies aggregate values based on the matched filter | | [**aggregate_remediations**](FalconCompleteDashboardApi.md#aggregate_remediations) | **POST** /falcon-complete-dashboards/aggregates/remediations/GET/v1 | Retrieve aggregate remediation ticket values based on the matched filter | +| [**aggregate_sensor_update_policy**](FalconCompleteDashboardApi.md#aggregate_sensor_update_policy) | **POST** /falcon-complete-dashboards/aggregates/sensor-update-policies/v1 | Retrieve sensor update policies aggregate values | +| [**aggregate_total_device_counts**](FalconCompleteDashboardApi.md#aggregate_total_device_counts) | **POST** /falcon-complete-dashboards/aggregates/total-device-counts/v1 | Retrieve aggregate total host/devices based on the matched filter | | [**get_device_count_collection_queries_by_filter**](FalconCompleteDashboardApi.md#get_device_count_collection_queries_by_filter) | **GET** /falcon-complete-dashboards/queries/devicecount-collections/v1 | Retrieve device count collection Ids that match the provided FQL filter, criteria with scrolling enabled | +| [**query_alert_ids_by_filter**](FalconCompleteDashboardApi.md#query_alert_ids_by_filter) | **GET** /falcon-complete-dashboards/queries/alerts/v1 | Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled | | [**query_allow_list_filter**](FalconCompleteDashboardApi.md#query_allow_list_filter) | **GET** /falcon-complete-dashboards/queries/allowlist/v1 | Retrieve allowlist tickets that match the provided filter criteria with scrolling enabled | | [**query_block_list_filter**](FalconCompleteDashboardApi.md#query_block_list_filter) | **GET** /falcon-complete-dashboards/queries/blocklist/v1 | Retrieve block listtickets that match the provided filter criteria with scrolling enabled | | [**query_detection_ids_by_filter**](FalconCompleteDashboardApi.md#query_detection_ids_by_filter) | **GET** /falcon-complete-dashboards/queries/detects/v1 | Retrieve DetectionsIds that match the provided FQL filter, criteria with scrolling enabled | @@ -20,6 +25,75 @@ All URIs are relative to *https://api.crowdstrike.com* | [**query_remediations_filter**](FalconCompleteDashboardApi.md#query_remediations_filter) | **GET** /falcon-complete-dashboards/queries/remediations/v1 | Retrieve remediation tickets that match the provided filter criteria with scrolling enabled | +## aggregate_alerts + +> aggregate_alerts(body) + +Retrieve aggregate alerts values based on the matched 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::FalconCompleteDashboardApi.new +body = [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | + +begin + # Retrieve aggregate alerts values based on the matched filter + result = api_instance.aggregate_alerts(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_alerts: #{e}" +end +``` + +#### Using the aggregate_alerts_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_alerts_with_http_info(body) + +```ruby +begin + # Retrieve aggregate alerts values based on the matched filter + data, status_code, headers = api_instance.aggregate_alerts_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_alerts_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**Array<MsaAggregateQueryRequest>**](MsaAggregateQueryRequest.md) | | | + +### Return type + +[**MsaAggregatesResponse**](MsaAggregatesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## aggregate_allow_list > aggregate_allow_list(body) @@ -436,6 +510,75 @@ end - **Accept**: application/json +## aggregate_prevention_policy + +> aggregate_prevention_policy(body) + +Retrieve prevention policies aggregate values based on the matched 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::FalconCompleteDashboardApi.new +body = [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | + +begin + # Retrieve prevention policies aggregate values based on the matched filter + result = api_instance.aggregate_prevention_policy(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_prevention_policy: #{e}" +end +``` + +#### Using the aggregate_prevention_policy_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_prevention_policy_with_http_info(body) + +```ruby +begin + # Retrieve prevention policies aggregate values based on the matched filter + data, status_code, headers = api_instance.aggregate_prevention_policy_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_prevention_policy_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**Array<MsaAggregateQueryRequest>**](MsaAggregateQueryRequest.md) | | | + +### Return type + +[**MsaAggregatesResponse**](MsaAggregatesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## aggregate_remediations > aggregate_remediations(body) @@ -505,9 +648,147 @@ end - **Accept**: application/json +## aggregate_sensor_update_policy + +> aggregate_sensor_update_policy(body) + +Retrieve sensor update policies aggregate values + +### 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::FalconCompleteDashboardApi.new +body = [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | + +begin + # Retrieve sensor update policies aggregate values + result = api_instance.aggregate_sensor_update_policy(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_sensor_update_policy: #{e}" +end +``` + +#### Using the aggregate_sensor_update_policy_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_sensor_update_policy_with_http_info(body) + +```ruby +begin + # Retrieve sensor update policies aggregate values + data, status_code, headers = api_instance.aggregate_sensor_update_policy_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_sensor_update_policy_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**Array<MsaAggregateQueryRequest>**](MsaAggregateQueryRequest.md) | | | + +### Return type + +[**MsaAggregatesResponse**](MsaAggregatesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## aggregate_total_device_counts + +> aggregate_total_device_counts(body) + +Retrieve aggregate total host/devices based on the matched 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::FalconCompleteDashboardApi.new +body = [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | + +begin + # Retrieve aggregate total host/devices based on the matched filter + result = api_instance.aggregate_total_device_counts(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_total_device_counts: #{e}" +end +``` + +#### Using the aggregate_total_device_counts_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> aggregate_total_device_counts_with_http_info(body) + +```ruby +begin + # Retrieve aggregate total host/devices based on the matched filter + data, status_code, headers = api_instance.aggregate_total_device_counts_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->aggregate_total_device_counts_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**Array<MsaAggregateQueryRequest>**](MsaAggregateQueryRequest.md) | | | + +### Return type + +[**MsaAggregatesResponse**](MsaAggregatesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## get_device_count_collection_queries_by_filter -> get_device_count_collection_queries_by_filter(opts) +> get_device_count_collection_queries_by_filter(opts) Retrieve device count collection Ids that match the provided FQL filter, criteria with scrolling enabled @@ -545,7 +826,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> get_device_count_collection_queries_by_filter_with_http_info(opts) +> , Integer, Hash)> get_device_count_collection_queries_by_filter_with_http_info(opts) ```ruby begin @@ -553,7 +834,7 @@ begin data, status_code, headers = api_instance.get_device_count_collection_queries_by_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling FalconCompleteDashboardApi->get_device_count_collection_queries_by_filter_with_http_info: #{e}" end @@ -570,7 +851,84 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_alert_ids_by_filter + +> query_alert_ids_by_filter(opts) + +Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled + +### 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::FalconCompleteDashboardApi.new +opts = { + limit: 56, # Integer | The maximum records to return. [1-500] + sort: 'sort_example', # String | The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". + filter: 'filter_example', # String | Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + offset: 'offset_example' # String | Starting index of overall result set from which to return ids. +} + +begin + # Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled + result = api_instance.query_alert_ids_by_filter(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->query_alert_ids_by_filter: #{e}" +end +``` + +#### Using the query_alert_ids_by_filter_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_alert_ids_by_filter_with_http_info(opts) + +```ruby +begin + # Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled + data, status_code, headers = api_instance.query_alert_ids_by_filter_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FalconCompleteDashboardApi->query_alert_ids_by_filter_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **limit** | **Integer** | The maximum records to return. [1-500] | [optional] | +| **sort** | **String** | The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". | [optional] | +| **filter** | **String** | Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). | [optional] | +| **offset** | **String** | Starting index of overall result set from which to return ids. | [optional] | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -584,7 +942,7 @@ end ## query_allow_list_filter -> query_allow_list_filter(opts) +> query_allow_list_filter(opts) Retrieve allowlist tickets that match the provided filter criteria with scrolling enabled @@ -622,7 +980,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_allow_list_filter_with_http_info(opts) +> , Integer, Hash)> query_allow_list_filter_with_http_info(opts) ```ruby begin @@ -630,7 +988,7 @@ begin data, status_code, headers = api_instance.query_allow_list_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling FalconCompleteDashboardApi->query_allow_list_filter_with_http_info: #{e}" end @@ -647,7 +1005,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -661,7 +1019,7 @@ end ## query_block_list_filter -> query_block_list_filter(opts) +> query_block_list_filter(opts) Retrieve block listtickets that match the provided filter criteria with scrolling enabled @@ -699,7 +1057,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_block_list_filter_with_http_info(opts) +> , Integer, Hash)> query_block_list_filter_with_http_info(opts) ```ruby begin @@ -707,7 +1065,7 @@ begin data, status_code, headers = api_instance.query_block_list_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling FalconCompleteDashboardApi->query_block_list_filter_with_http_info: #{e}" end @@ -724,7 +1082,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -738,7 +1096,7 @@ end ## query_detection_ids_by_filter -> query_detection_ids_by_filter(opts) +> query_detection_ids_by_filter(opts) Retrieve DetectionsIds that match the provided FQL filter, criteria with scrolling enabled @@ -776,7 +1134,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_detection_ids_by_filter_with_http_info(opts) +> , Integer, Hash)> query_detection_ids_by_filter_with_http_info(opts) ```ruby begin @@ -784,7 +1142,7 @@ begin data, status_code, headers = api_instance.query_detection_ids_by_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling FalconCompleteDashboardApi->query_detection_ids_by_filter_with_http_info: #{e}" end @@ -801,7 +1159,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -815,7 +1173,7 @@ end ## query_escalations_filter -> query_escalations_filter(opts) +> query_escalations_filter(opts) Retrieve escalation tickets that match the provided filter criteria with scrolling enabled @@ -853,7 +1211,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_escalations_filter_with_http_info(opts) +> , Integer, Hash)> query_escalations_filter_with_http_info(opts) ```ruby begin @@ -861,7 +1219,7 @@ begin data, status_code, headers = api_instance.query_escalations_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling FalconCompleteDashboardApi->query_escalations_filter_with_http_info: #{e}" end @@ -878,7 +1236,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -892,7 +1250,7 @@ end ## query_incident_ids_by_filter -> query_incident_ids_by_filter(opts) +> query_incident_ids_by_filter(opts) Retrieve incidents that match the provided filter criteria with scrolling enabled @@ -930,7 +1288,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_incident_ids_by_filter_with_http_info(opts) +> , Integer, Hash)> query_incident_ids_by_filter_with_http_info(opts) ```ruby begin @@ -938,7 +1296,7 @@ begin data, status_code, headers = api_instance.query_incident_ids_by_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling FalconCompleteDashboardApi->query_incident_ids_by_filter_with_http_info: #{e}" end @@ -955,7 +1313,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -969,7 +1327,7 @@ end ## query_remediations_filter -> query_remediations_filter(opts) +> query_remediations_filter(opts) Retrieve remediation tickets that match the provided filter criteria with scrolling enabled @@ -1007,7 +1365,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_remediations_filter_with_http_info(opts) +> , Integer, Hash)> query_remediations_filter_with_http_info(opts) ```ruby begin @@ -1015,7 +1373,7 @@ begin data, status_code, headers = api_instance.query_remediations_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling FalconCompleteDashboardApi->query_remediations_filter_with_http_info: #{e}" end @@ -1032,7 +1390,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization diff --git a/docs/FalconContainerImageApi.md b/docs/FalconContainerImageApi.md index e7fdeee5..0289d9df 100644 --- a/docs/FalconContainerImageApi.md +++ b/docs/FalconContainerImageApi.md @@ -6,7 +6,6 @@ All URIs are relative to *https://api.crowdstrike.com* | ------ | ------------ | ----------- | | [**create_registry_entities**](FalconContainerImageApi.md#create_registry_entities) | **POST** /container-security/entities/registries/v1 | Create a registry entity using the provided details | | [**delete_registry_entities**](FalconContainerImageApi.md#delete_registry_entities) | **DELETE** /container-security/entities/registries/v1 | Delete the registry entity identified by the entity UUID | -| [**get_combined_images**](FalconContainerImageApi.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_registry_entities**](FalconContainerImageApi.md#read_registry_entities) | **GET** /container-security/queries/registries/v1 | Retrieve registry entities identified by the customer id | | [**read_registry_entities_by_uuid**](FalconContainerImageApi.md#read_registry_entities_by_uuid) | **GET** /container-security/entities/registries/v1 | Retrieve the registry entity identified by the entity UUID | | [**update_registry_entities**](FalconContainerImageApi.md#update_registry_entities) | **PATCH** /container-security/entities/registries/v1 | Update the registry entity, as identified by the entity UUID, using the provided details | @@ -150,83 +149,6 @@ end - **Accept**: application/json -## get_combined_images - -> get_combined_images(opts) - -Get image assessment results by providing an FQL filter and paging 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::FalconContainerImageApi.new -opts = { - filter: 'filter_example', # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: container_running_status, cve_id, first_seen, 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 registry repository tag vulnerability_severity] -} - -begin - # Get image assessment results by providing an FQL filter and paging details - result = api_instance.get_combined_images(opts) - p result -rescue Falcon::ApiError => e - puts "Error when calling FalconContainerImageApi->get_combined_images: #{e}" -end -``` - -#### Using the get_combined_images_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_combined_images_with_http_info(opts) - -```ruby -begin - # Get image assessment results by providing an FQL filter and paging details - data, status_code, headers = api_instance.get_combined_images_with_http_info(opts) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue Falcon::ApiError => e - puts "Error when calling FalconContainerImageApi->get_combined_images_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: container_running_status, cve_id, first_seen, registry, repository, tag, vulnerability_severity | [optional] | -| **limit** | **Integer** | The upper-bound on the number of records to retrieve [1-100] | [optional] | -| **offset** | **Integer** | The offset from where to begin. | [optional] | -| **sort** | **String** | The fields to sort the records on. Supported columns: [first_seen registry repository tag vulnerability_severity] | [optional] | - -### Return type - -[**ImagesExtCombinedImagesResponse**](ImagesExtCombinedImagesResponse.md) - -### Authorization - -**oauth2** - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - ## read_registry_entities > read_registry_entities(opts) diff --git a/docs/FalconxSandboxApi.md b/docs/FalconxSandboxApi.md index 5b1d58ab..3418e344 100644 --- a/docs/FalconxSandboxApi.md +++ b/docs/FalconxSandboxApi.md @@ -982,7 +982,7 @@ Falcon.configure do |config| end api_instance = Falcon::FalconxSandboxApi.new -body = Falcon::FalconxSubmissionParametersV1.new # FalconxSubmissionParametersV1 | Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. +body = Falcon::FalconxSubmissionParametersV1.new # FalconxSubmissionParametersV1 | Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `400`: MacOS Catalina 10.15 - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `140`: Windows 11, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. begin # Submit an uploaded file or a URL for sandbox analysis. Time required for analysis varies but is usually less than 15 minutes. @@ -1015,7 +1015,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **body** | [**FalconxSubmissionParametersV1**](FalconxSubmissionParametersV1.md) | Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. | | +| **body** | [**FalconxSubmissionParametersV1**](FalconxSubmissionParametersV1.md) | Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `400`: MacOS Catalina 10.15 - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `140`: Windows 11, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. | | ### Return type diff --git a/docs/FalconxSandboxParametersV1.md b/docs/FalconxSandboxParametersV1.md index 82856132..d8a16734 100644 --- a/docs/FalconxSandboxParametersV1.md +++ b/docs/FalconxSandboxParametersV1.md @@ -4,12 +4,12 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **interactivity** | **Boolean** | | | | **action_script** | **String** | | [optional] | | **command_line** | **String** | | [optional] | | **document_password** | **String** | | [optional] | | **enable_tor** | **Boolean** | | [optional] | | **environment_id** | **Integer** | | [optional] | +| **interactivity** | **Boolean** | | [optional] | | **network_settings** | **String** | | [optional] | | **sha256** | **String** | | [optional] | | **submit_name** | **String** | | [optional] | @@ -23,12 +23,12 @@ require 'crimson-falcon' instance = Falcon::FalconxSandboxParametersV1.new( - interactivity: null, action_script: null, command_line: null, document_password: null, enable_tor: null, environment_id: null, + interactivity: null, network_settings: null, sha256: null, submit_name: null, diff --git a/docs/FalconxSubmissionV1.md b/docs/FalconxSubmissionV1.md index 2df75cca..3e2d76e2 100644 --- a/docs/FalconxSubmissionV1.md +++ b/docs/FalconxSubmissionV1.md @@ -6,8 +6,12 @@ | ---- | ---- | ----------- | ----- | | **cid** | **String** | | [optional] | | **created_timestamp** | **String** | | [optional] | +| **error_message** | **String** | | [optional] | +| **error_origin** | **String** | | [optional] | +| **error_type** | **String** | | [optional] | | **id** | **String** | | [optional] | | **index_timestamp** | **String** | | [optional] | +| **interactive_phase** | **String** | | [optional] | | **origin** | **String** | | [optional] | | **sandbox** | [**Array<FalconxSandboxParametersV1>**](FalconxSandboxParametersV1.md) | | [optional] | | **send_email_notification** | **Boolean** | | [optional] | @@ -25,8 +29,12 @@ require 'crimson-falcon' instance = Falcon::FalconxSubmissionV1.new( cid: null, created_timestamp: null, + error_message: null, + error_origin: null, + error_type: null, id: null, index_timestamp: null, + interactive_phase: null, origin: null, sandbox: null, send_email_notification: null, diff --git a/docs/FilevantageApi.md b/docs/FilevantageApi.md index 86b15e41..4ab43f3d 100644 --- a/docs/FilevantageApi.md +++ b/docs/FilevantageApi.md @@ -4,17 +4,1505 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | +| [**create_policies**](FilevantageApi.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**](FilevantageApi.md#create_rule_groups) | **POST** /filevantage/entities/rule-groups/v1 | Creates a new rule group of the specified type. | +| [**create_rules**](FilevantageApi.md#create_rules) | **POST** /filevantage/entities/rule-groups-rules/v1 | Creates a new rule configuration within the specified rule group. | +| [**create_scheduled_exclusions**](FilevantageApi.md#create_scheduled_exclusions) | **POST** /filevantage/entities/policy-scheduled-exclusions/v1 | Creates a new scheduled exclusion configuration for the provided policy id. | +| [**delete_policies**](FilevantageApi.md#delete_policies) | **DELETE** /filevantage/entities/policies/v1 | Deletes 1 or more policies. | +| [**delete_rule_groups**](FilevantageApi.md#delete_rule_groups) | **DELETE** /filevantage/entities/rule-groups/v1 | Deletes 1 or more rule groups | +| [**delete_rules**](FilevantageApi.md#delete_rules) | **DELETE** /filevantage/entities/rule-groups-rules/v1 | Deletes 1 or more rules from the specified rule group. | +| [**delete_scheduled_exclusions**](FilevantageApi.md#delete_scheduled_exclusions) | **DELETE** /filevantage/entities/policy-scheduled-exclusions/v1 | Deletes 1 or more scheduled exclusions from the provided policy id. | | [**get_changes**](FilevantageApi.md#get_changes) | **GET** /filevantage/entities/changes/v2 | Retrieve information on changes | -| [**query_changes**](FilevantageApi.md#query_changes) | **GET** /filevantage/queries/changes/v2 | Returns one or more change IDs | +| [**get_policies**](FilevantageApi.md#get_policies) | **GET** /filevantage/entities/policies/v1 | Retrieves the configuration for 1 or more policies. | +| [**get_rule_groups**](FilevantageApi.md#get_rule_groups) | **GET** /filevantage/entities/rule-groups/v1 | Retrieves the rule group details for 1 or more rule groups. | +| [**get_rules**](FilevantageApi.md#get_rules) | **GET** /filevantage/entities/rule-groups-rules/v1 | Retrieves the configuration for 1 or more rules. | +| [**get_scheduled_exclusions**](FilevantageApi.md#get_scheduled_exclusions) | **GET** /filevantage/entities/policy-scheduled-exclusions/v1 | Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. | +| [**high_volume_query_changes**](FilevantageApi.md#high_volume_query_changes) | **GET** /filevantage/queries/changes/v3 | Returns 1 or more change ids | +| [**query_changes**](FilevantageApi.md#query_changes) | **GET** /filevantage/queries/changes/v2 | Returns 1 or more change ids | +| [**query_policies**](FilevantageApi.md#query_policies) | **GET** /filevantage/queries/policies/v1 | Retrieve the ids of all policies that are assigned the provided policy type. | +| [**query_rule_groups**](FilevantageApi.md#query_rule_groups) | **GET** /filevantage/queries/rule-groups/v1 | Retrieve the ids of all rule groups that are of the provided rule group type. | +| [**query_scheduled_exclusions**](FilevantageApi.md#query_scheduled_exclusions) | **GET** /filevantage/queries/policy-scheduled-exclusions/v1 | Retrieve the ids of all scheduled exclusions contained within the provided policy id. | +| [**update_policies**](FilevantageApi.md#update_policies) | **PATCH** /filevantage/entities/policies/v1 | Updates the general information of the provided policy. | +| [**update_policy_host_groups**](FilevantageApi.md#update_policy_host_groups) | **PATCH** /filevantage/entities/policies-host-groups/v1 | Manage host groups assigned to a policy. | +| [**update_policy_precedence**](FilevantageApi.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**](FilevantageApi.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**](FilevantageApi.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**](FilevantageApi.md#update_rule_groups) | **PATCH** /filevantage/entities/rule-groups/v1 | Updates the provided rule group. | +| [**update_rules**](FilevantageApi.md#update_rules) | **PATCH** /filevantage/entities/rule-groups-rules/v1 | Updates the provided rule configuration within the specified rule group. | +| [**update_scheduled_exclusions**](FilevantageApi.md#update_scheduled_exclusions) | **PATCH** /filevantage/entities/policy-scheduled-exclusions/v1 | Updates the provided scheduled exclusion configuration within the provided policy. | + + +## create_policies + +> 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. + +After they are created, host and rule groups can be assigned, scheduled exclusions can be defined, and policy precedence can be set. + +### 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::FilevantageApi.new +body = Falcon::PoliciesCreateRequest.new({name: 'name_example'}) # 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. + +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(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_policies: #{e}" +end +``` + +#### 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_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_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**PoliciesCreateRequest**](PoliciesCreateRequest.md) | 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. | | + +### Return type + +[**PoliciesResponse**](PoliciesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_rule_groups + +> create_rule_groups(body) + +Creates a new rule group of the specified type. + +Individual rules can be assigned to a rule group after it has been created. + +### 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::FilevantageApi.new +body = Falcon::RulegroupsCreateRequest.new({name: 'name_example', type: 'type_example'}) # RulegroupsCreateRequest | Create a new rule group of a specific type. * `name` must be between 1 and 100 characters. * `type` must be one of `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. * `description` can be between 0 and 500 characters. Note: rules are added/removed from rule groups using their dedicated end-points. + +begin + # Creates a new rule group of the specified type. + result = api_instance.create_rule_groups(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_rule_groups: #{e}" +end +``` + +#### Using the create_rule_groups_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_rule_groups_with_http_info(body) + +```ruby +begin + # Creates a new rule group of the specified type. + data, status_code, headers = api_instance.create_rule_groups_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_rule_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RulegroupsCreateRequest**](RulegroupsCreateRequest.md) | Create a new rule group of a specific type. * `name` must be between 1 and 100 characters. * `type` must be one of `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. * `description` can be between 0 and 500 characters. Note: rules are added/removed from rule groups using their dedicated end-points. | | + +### Return type + +[**RulegroupsResponse**](RulegroupsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_rules + +> create_rules(body) + +Creates a new rule configuration within the specified rule group. + +Creates a new rule configuration within the specified rule group. + +### 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::FilevantageApi.new +body = Falcon::RulegroupsRule.new({depth: 'depth_example', id: 'id_example', include: 'include_example', path: 'path_example', rule_group_id: 'rule_group_id_example', severity: 'severity_example', type: 'type_example'}) # RulegroupsRule | Create a new rule configuration for the specified rule group. * `id` is not supported for creation of a rule, the new id of the created rule will be included in the response. * `rule_group_id` to add the new rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` - is not supported for creation of a rule, new rules will be added last in precedence order. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files whose content will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + +begin + # Creates a new rule configuration within the specified rule group. + result = api_instance.create_rules(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_rules: #{e}" +end +``` + +#### Using the create_rules_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_rules_with_http_info(body) + +```ruby +begin + # Creates a new rule configuration within the specified rule group. + data, status_code, headers = api_instance.create_rules_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_rules_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RulegroupsRule**](RulegroupsRule.md) | Create a new rule configuration for the specified rule group. * `id` is not supported for creation of a rule, the new id of the created rule will be included in the response. * `rule_group_id` to add the new rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` - is not supported for creation of a rule, new rules will be added last in precedence order. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files whose content will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` | | + +### Return type + +[**RulegroupsRulesResponse**](RulegroupsRulesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_scheduled_exclusions + +> create_scheduled_exclusions(body) + +Creates a new scheduled exclusion configuration for the provided policy id. + +Creates a new scheduled exclusion configuration for the provided policy id. + +### 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::FilevantageApi.new +body = Falcon::ScheduledexclusionsCreateRequest.new({name: 'name_example', timezone: 'timezone_example'}) # ScheduledexclusionsCreateRequest | Create a new scheduled exclusion configuration for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + +begin + # Creates a new scheduled exclusion configuration for the provided policy id. + result = api_instance.create_scheduled_exclusions(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_scheduled_exclusions: #{e}" +end +``` + +#### Using the create_scheduled_exclusions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_scheduled_exclusions_with_http_info(body) + +```ruby +begin + # Creates a new scheduled exclusion configuration for the provided policy id. + data, status_code, headers = api_instance.create_scheduled_exclusions_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->create_scheduled_exclusions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ScheduledexclusionsCreateRequest**](ScheduledexclusionsCreateRequest.md) | Create a new scheduled exclusion configuration for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. | | + +### Return type + +[**ScheduledexclusionsResponse**](ScheduledexclusionsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_policies + +> delete_policies(ids) + +Deletes 1 or more policies. + +Only disabled policies are allowed to be deleted. + +### 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::FilevantageApi.new +ids = ['inner_example'] # Array | One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + +begin + # Deletes 1 or more policies. + result = api_instance.delete_policies(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_policies: #{e}" +end +``` + +#### Using the delete_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_policies_with_http_info(ids) + +```ruby +begin + # Deletes 1 or more policies. + data, status_code, headers = api_instance.delete_policies_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` | | + +### Return type + +[**PoliciesDeleteResponse**](PoliciesDeleteResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_rule_groups + +> delete_rule_groups(ids) + +Deletes 1 or more rule groups + +The rule groups represented by the provided ids and all rules that they contain will be deleted. Rule groups can only be deleted if they are not assigned to a policy. + +### 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::FilevantageApi.new +ids = ['inner_example'] # Array | One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + +begin + # Deletes 1 or more rule groups + result = api_instance.delete_rule_groups(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_rule_groups: #{e}" +end +``` + +#### 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_with_http_info(ids) + +```ruby +begin + # Deletes 1 or more rule groups + data, status_code, headers = api_instance.delete_rule_groups_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_rule_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` | | + +### Return type + +[**RulegroupsDeleteResponse**](RulegroupsDeleteResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_rules + +> delete_rules(rule_group_id, ids) + +Deletes 1 or more rules from the specified rule group. + +Rules that match a provided id will be deleted from the provided rule group id. + +### 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::FilevantageApi.new +rule_group_id = 'rule_group_id_example' # String | The id of the rule group from which the rules will be deleted. +ids = ['inner_example'] # Array | One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2` + +begin + # Deletes 1 or more rules from the specified rule group. + result = api_instance.delete_rules(rule_group_id, ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_rules: #{e}" +end +``` + +#### 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_with_http_info(rule_group_id, ids) + +```ruby +begin + # Deletes 1 or more rules from the specified rule group. + data, status_code, headers = api_instance.delete_rules_with_http_info(rule_group_id, ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_rules_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **rule_group_id** | **String** | The id of the rule group from which the rules will be deleted. | | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2` | | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_scheduled_exclusions + +> delete_scheduled_exclusions(policy_id, ids) + +Deletes 1 or more scheduled exclusions from the provided policy id. + +Scheduled exclusions that match a provided id will be deleted from the provided policy id. + +### 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::FilevantageApi.new +policy_id = 'policy_id_example' # String | ID of the policy to delete the scheduled exclusions from. +ids = ['inner_example'] # Array | One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + +begin + # Deletes 1 or more scheduled exclusions from the provided policy id. + result = api_instance.delete_scheduled_exclusions(policy_id, ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_scheduled_exclusions: #{e}" +end +``` + +#### Using the delete_scheduled_exclusions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_scheduled_exclusions_with_http_info(policy_id, ids) + +```ruby +begin + # Deletes 1 or more scheduled exclusions from the provided policy id. + data, status_code, headers = api_instance.delete_scheduled_exclusions_with_http_info(policy_id, ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->delete_scheduled_exclusions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **policy_id** | **String** | ID of the policy to delete the scheduled exclusions from. | | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. | | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json ## get_changes -> get_changes(ids) +> get_changes(ids) + +Retrieve information on changes + +Retrieve key attributes of Falcon FileVantage changes for the specified 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::FilevantageApi.new +ids = ['inner_example'] # Array | One or more change ids in the form of `ids=ID1&ids=ID2`. The maximum number of ids that can be requested at once is `500`. + +begin + # Retrieve information on changes + result = api_instance.get_changes(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_changes: #{e}" +end +``` + +#### Using the get_changes_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_changes_with_http_info(ids) + +```ruby +begin + # Retrieve information on changes + data, status_code, headers = api_instance.get_changes_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_changes_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | One or more change ids in the form of `ids=ID1&ids=ID2`. The maximum number of ids that can be requested at once is `500`. | | + +### Return type + +[**ChangesGetChangesResponse**](ChangesGetChangesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_policies + +> get_policies(ids) + +Retrieves the configuration for 1 or more policies. + +The configuration of each policy that match the provided id will be returned. + +### 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::FilevantageApi.new +ids = ['inner_example'] # Array | One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + +begin + # Retrieves the configuration for 1 or more policies. + result = api_instance.get_policies(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_policies: #{e}" +end +``` + +#### Using the get_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_policies_with_http_info(ids) + +```ruby +begin + # Retrieves the configuration for 1 or more policies. + data, status_code, headers = api_instance.get_policies_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` | | + +### Return type + +[**PoliciesResponse**](PoliciesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_rule_groups + +> get_rule_groups(ids) + +Retrieves the rule group details for 1 or more rule groups. + +Full details of each rule group that matches a provided id will be returned in the response + +### 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::FilevantageApi.new +ids = ['inner_example'] # Array | One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + +begin + # Retrieves the rule group details for 1 or more rule groups. + result = api_instance.get_rule_groups(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_rule_groups: #{e}" +end +``` + +#### 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_with_http_info(ids) + +```ruby +begin + # Retrieves the rule group details for 1 or more rule groups. + 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 FilevantageApi->get_rule_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` | | + +### Return type + +[**RulegroupsResponse**](RulegroupsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_rules + +> get_rules(rule_group_id, ids) + +Retrieves the configuration for 1 or more rules. + +Rules within the provided rule group id that match a provided id will be returned within the response. + +### 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::FilevantageApi.new +rule_group_id = 'rule_group_id_example' # String | Rule group from which to retrieve the rule configuration. +ids = ['inner_example'] # Array | One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2`. + +begin + # Retrieves the configuration for 1 or more rules. + result = api_instance.get_rules(rule_group_id, ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_rules: #{e}" +end +``` + +#### 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_with_http_info(rule_group_id, ids) + +```ruby +begin + # Retrieves the configuration for 1 or more rules. + data, status_code, headers = api_instance.get_rules_with_http_info(rule_group_id, ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_rules_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **rule_group_id** | **String** | Rule group from which to retrieve the rule configuration. | | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2`. | | + +### Return type + +[**RulegroupsRulesResponse**](RulegroupsRulesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_scheduled_exclusions + +> get_scheduled_exclusions(policy_id, ids) + +Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. + +Full details of each each scheduled exclusion that match a provided id will be returned in the response. + +### 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::FilevantageApi.new +policy_id = 'policy_id_example' # String | The id of the policy to retrieve the scheduled exclusion configurations. +ids = ['inner_example'] # Array | One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + +begin + # Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. + result = api_instance.get_scheduled_exclusions(policy_id, ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_scheduled_exclusions: #{e}" +end +``` + +#### Using the get_scheduled_exclusions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_scheduled_exclusions_with_http_info(policy_id, ids) + +```ruby +begin + # Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. + data, status_code, headers = api_instance.get_scheduled_exclusions_with_http_info(policy_id, ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->get_scheduled_exclusions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **policy_id** | **String** | The id of the policy to retrieve the scheduled exclusion configurations. | | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. | | + +### Return type + +[**ScheduledexclusionsResponse**](ScheduledexclusionsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## high_volume_query_changes + +> high_volume_query_changes(opts) + +Returns 1 or more change ids + +Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. It can retrieve an unlimited number of results using multiple requests. + +### 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::FilevantageApi.new +opts = { + after: 'after_example', # String | A pagination token used with the `limit` parameter to manage pagination of results. On your first request don't provide a value for the `after` token. On subsequent requests provide the `after` token value from the previous response to continue pagination from where you left. If the response returns an empty `after` token it means there are no more results to return. + limit: 56, # Integer | The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `5000`. + sort: 'sort_example', # String | Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. Defaults to `action_timestamp|desc` no value is specified. The full list of allowed sorting options can be reviewed in our API documentation. + filter: 'filter_example' # String | Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. +} + +begin + # Returns 1 or more change ids + result = api_instance.high_volume_query_changes(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->high_volume_query_changes: #{e}" +end +``` + +#### Using the high_volume_query_changes_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> high_volume_query_changes_with_http_info(opts) + +```ruby +begin + # Returns 1 or more change ids + data, status_code, headers = api_instance.high_volume_query_changes_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->high_volume_query_changes_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **after** | **String** | A pagination token used with the `limit` parameter to manage pagination of results. On your first request don't provide a value for the `after` token. On subsequent requests provide the `after` token value from the previous response to continue pagination from where you left. If the response returns an empty `after` token it means there are no more results to return. | [optional] | +| **limit** | **Integer** | The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `5000`. | [optional][default to 100] | +| **sort** | **String** | Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. Defaults to `action_timestamp|desc` no value is specified. The full list of allowed sorting options can be reviewed in our API documentation. | [optional][default to 'action_timestamp|desc'] | +| **filter** | **String** | Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. | [optional] | + +### Return type + +[**ChangesHighVolumeQueryResponse**](ChangesHighVolumeQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_changes + +> query_changes(opts) + +Returns 1 or more change ids + +Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. Using this endpoint you can retrieve up to `10000` results by using pagination with multiple requests. If you need to retrieve more than `10000` results consider using the `/queries/changes/v3` endpoint + +### 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::FilevantageApi.new +opts = { + offset: 56, # Integer | The offset to start retrieving records from. Defaults to `0` if not specified. + limit: 56, # Integer | The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `500`. + sort: 'sort_example', # String | Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. + filter: 'filter_example' # String | Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. +} + +begin + # Returns 1 or more change ids + result = api_instance.query_changes(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_changes: #{e}" +end +``` + +#### Using the query_changes_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_changes_with_http_info(opts) + +```ruby +begin + # Returns 1 or more change ids + data, status_code, headers = api_instance.query_changes_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_changes_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **offset** | **Integer** | The offset to start retrieving records from. Defaults to `0` if not specified. | [optional][default to 0] | +| **limit** | **Integer** | The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `500`. | [optional][default to 100] | +| **sort** | **String** | Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. | [optional] | +| **filter** | **String** | Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. | [optional] | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_policies + +> query_policies(type, opts) + +Retrieve the ids of all policies that are assigned the provided policy type. + +Policy ids will be returned sorted by a `precedence` order of ascending when a `sort` parameter is not provided. + +### 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::FilevantageApi.new +type = 'type_example' # String | The types of policies to retrieve. Allowed values are: `Windows`, `Linux` or `Mac`. +opts = { + offset: 56, # Integer | The offset to start retrieving records from. Defaults to 0 if not specified. + limit: 56, # Integer | The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + sort: 'sort_example' # String | Sort the returned ids based on one of the following properties: `precedence`, `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `precedence|asc`. +} + +begin + # Retrieve the ids of all policies that are assigned the provided policy type. + result = api_instance.query_policies(type, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_policies: #{e}" +end +``` + +#### Using the query_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_policies_with_http_info(type, opts) + +```ruby +begin + # Retrieve the ids of all policies that are assigned the provided policy type. + data, status_code, headers = api_instance.query_policies_with_http_info(type, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | The types of policies to retrieve. Allowed values are: `Windows`, `Linux` or `Mac`. | | +| **offset** | **Integer** | The offset to start retrieving records from. Defaults to 0 if not specified. | [optional] | +| **limit** | **Integer** | The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. | [optional] | +| **sort** | **String** | Sort the returned ids based on one of the following properties: `precedence`, `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `precedence|asc`. | [optional] | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_rule_groups + +> query_rule_groups(type, opts) + +Retrieve the ids of all rule groups that are of the provided rule group type. + +Rule group ids will be returned sorted by `created_timestamp` order if a `sort` parameter is not provided + +### 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::FilevantageApi.new +type = 'type_example' # String | The rule group type to retrieve the ids of. Allowed values are: `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. +opts = { + offset: 56, # Integer | The offset to start retrieving records from. Defaults to 0 if not specified. + limit: 56, # Integer | The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + sort: 'sort_example' # String | Sort the returned ids based on one of the following properties: `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `created_timestamp|asc`. +} + +begin + # Retrieve the ids of all rule groups that are of the provided rule group type. + result = api_instance.query_rule_groups(type, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_rule_groups: #{e}" +end +``` + +#### 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_with_http_info(type, opts) + +```ruby +begin + # Retrieve the ids of all rule groups that are of the provided rule group type. + data, status_code, headers = api_instance.query_rule_groups_with_http_info(type, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_rule_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | The rule group type to retrieve the ids of. Allowed values are: `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. | | +| **offset** | **Integer** | The offset to start retrieving records from. Defaults to 0 if not specified. | [optional] | +| **limit** | **Integer** | The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. | [optional] | +| **sort** | **String** | Sort the returned ids based on one of the following properties: `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `created_timestamp|asc`. | [optional] | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## query_scheduled_exclusions + +> query_scheduled_exclusions(policy_id) + +Retrieve the ids of all scheduled exclusions contained within the provided policy id. + +Retrieve the ids of all scheduled exclusions contained within the provided policy id + +### 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::FilevantageApi.new +policy_id = 'policy_id_example' # String | The id of the policy from which to retrieve the scheduled exclusion ids. + +begin + # Retrieve the ids of all scheduled exclusions contained within the provided policy id. + result = api_instance.query_scheduled_exclusions(policy_id) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_scheduled_exclusions: #{e}" +end +``` + +#### Using the query_scheduled_exclusions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_scheduled_exclusions_with_http_info(policy_id) + +```ruby +begin + # Retrieve the ids of all scheduled exclusions contained within the provided policy id. + data, status_code, headers = api_instance.query_scheduled_exclusions_with_http_info(policy_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->query_scheduled_exclusions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **policy_id** | **String** | The id of the policy from which to retrieve the scheduled exclusion ids. | | + +### Return type + +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## update_policies + +> update_policies(body) + +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. + +### 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::FilevantageApi.new +body = Falcon::PoliciesUpdateRequest.new({id: 'id_example'}) # 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. + +begin + # Updates the general information of the provided policy. + result = api_instance.update_policies(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_policies: #{e}" +end +``` + +#### 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_with_http_info(body) + +```ruby +begin + # Updates the general information of the provided policy. + 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 FilevantageApi->update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**PoliciesUpdateRequest**](PoliciesUpdateRequest.md) | 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. | | + +### Return type + +[**PoliciesResponse**](PoliciesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_policy_host_groups + +> update_policy_host_groups(policy_id, action, ids) + +Manage host groups assigned to a policy. + +Manage host groups assigned to a policy. + +### 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::FilevantageApi.new +policy_id = 'policy_id_example' # String | The id of the policy for which to perform the action. +action = 'action_example' # String | The action to perform with the provided ids, must be one of: `assign` or `unassign`. +ids = ['inner_example'] # Array | One or more host group ids in the form of `ids=ID1&ids=ID2` + +begin + # Manage host groups assigned to a policy. + result = api_instance.update_policy_host_groups(policy_id, action, ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_policy_host_groups: #{e}" +end +``` + +#### Using the update_policy_host_groups_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_policy_host_groups_with_http_info(policy_id, action, ids) + +```ruby +begin + # Manage host groups assigned to a policy. + data, status_code, headers = api_instance.update_policy_host_groups_with_http_info(policy_id, action, ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_policy_host_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **policy_id** | **String** | The id of the policy for which to perform the action. | | +| **action** | **String** | The action to perform with the provided ids, must be one of: `assign` or `unassign`. | | +| **ids** | [**Array<String>**](String.md) | One or more host group ids in the form of `ids=ID1&ids=ID2` | | -Retrieve information on changes +### Return type + +[**PoliciesResponse**](PoliciesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json -Retrieve key attributes of Falcon FileVantage changes for the specified ids. + +## update_policy_precedence + +> update_policy_precedence(ids, type) + +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. ### Examples @@ -30,32 +1518,33 @@ Falcon.configure do |config| end api_instance = Falcon::FilevantageApi.new -ids = ['inner_example'] # Array | One or more change ids in the form of ids=ID1&ids=ID2 +ids = ['inner_example'] # Array | Precedence of the policies for the provided type in the form of `ids=ID1&ids=ID2` +type = 'type_example' # String | The policy type for which to set the precedence order, must be one of `Windows`, `Linux` or `Mac`. begin - # Retrieve information on changes - result = api_instance.get_changes(ids) + # Updates the policy precedence for all policies of a specific type. + result = api_instance.update_policy_precedence(ids, type) p result rescue Falcon::ApiError => e - puts "Error when calling FilevantageApi->get_changes: #{e}" + puts "Error when calling FilevantageApi->update_policy_precedence: #{e}" end ``` -#### Using the get_changes_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)> get_changes_with_http_info(ids) +> , Integer, Hash)> update_policy_precedence_with_http_info(ids, type) ```ruby begin - # Retrieve information on changes - data, status_code, headers = api_instance.get_changes_with_http_info(ids) + # Updates the policy precedence for all policies of a specific type. + data, status_code, headers = api_instance.update_policy_precedence_with_http_info(ids, type) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e - puts "Error when calling FilevantageApi->get_changes_with_http_info: #{e}" + puts "Error when calling FilevantageApi->update_policy_precedence_with_http_info: #{e}" end ``` @@ -63,11 +1552,12 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **ids** | [**Array<String>**](String.md) | One or more change ids in the form of ids=ID1&ids=ID2 | | +| **ids** | [**Array<String>**](String.md) | Precedence of the policies for the provided type in the form of `ids=ID1&ids=ID2` | | +| **type** | **String** | The policy type for which to set the precedence order, must be one of `Windows`, `Linux` or `Mac`. | | ### Return type -[**PublicGetChangesResponse**](PublicGetChangesResponse.md) +[**PoliciesPrecedenceResponse**](PoliciesPrecedenceResponse.md) ### Authorization @@ -79,13 +1569,13 @@ end - **Accept**: application/json -## query_changes +## update_policy_rule_groups -> query_changes(opts) +> update_policy_rule_groups(policy_id, action, ids) -Returns one or more change IDs +Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. -Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided +Manage the rule groups assigned to the policy. Rule groups must be of the same type as the policy they are being added: * `WindowsRegistry` and `WindowsFiles` groups can only be added to a `Windows` policy. * `LinuxFiles` groups can only be added to a `Linux` policy. * `MacFiles` groups can only be added to a `Mac` policy. When setting rule group precedence, the precedence for `all` rule group ids within the policy must be provided. ### Examples @@ -101,37 +1591,34 @@ Falcon.configure do |config| end api_instance = Falcon::FilevantageApi.new -opts = { - offset: 56, # Integer | The first change index to return in the response. If not provided it will default to '0'. Use with the `limit` parameter to manage pagination of results. - limit: 56, # Integer | The maximum number of changes to return in the response (default: 100; max: 500). Use with the `offset` parameter to manage pagination of results - sort: 'sort_example', # String | Sort changes using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. - filter: 'filter_example' # String | Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.host_name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. -} +policy_id = 'policy_id_example' # String | The id of the policy for which to perform the action. +action = 'action_example' # String | The action to perform with the provided ids, must be one of: `assign`, `unassign`, or `precedence`. +ids = ['inner_example'] # Array | One or more rule group ids in the form of ids=ID1&ids=ID2. Note, for the precedence action, precedence is controlled by the order of the ids as they are specified in the request. begin - # Returns one or more change IDs - result = api_instance.query_changes(opts) + # Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. + result = api_instance.update_policy_rule_groups(policy_id, action, ids) p result rescue Falcon::ApiError => e - puts "Error when calling FilevantageApi->query_changes: #{e}" + puts "Error when calling FilevantageApi->update_policy_rule_groups: #{e}" end ``` -#### Using the query_changes_with_http_info variant +#### Using the update_policy_rule_groups_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_changes_with_http_info(opts) +> , Integer, Hash)> update_policy_rule_groups_with_http_info(policy_id, action, ids) ```ruby begin - # Returns one or more change IDs - data, status_code, headers = api_instance.query_changes_with_http_info(opts) + # Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. + data, status_code, headers = api_instance.update_policy_rule_groups_with_http_info(policy_id, action, ids) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e - puts "Error when calling FilevantageApi->query_changes_with_http_info: #{e}" + puts "Error when calling FilevantageApi->update_policy_rule_groups_with_http_info: #{e}" end ``` @@ -139,14 +1626,86 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **offset** | **Integer** | The first change index to return in the response. If not provided it will default to '0'. Use with the `limit` parameter to manage pagination of results. | [optional] | -| **limit** | **Integer** | The maximum number of changes to return in the response (default: 100; max: 500). Use with the `offset` parameter to manage pagination of results | [optional] | -| **sort** | **String** | Sort changes using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. | [optional] | -| **filter** | **String** | Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.host_name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. | [optional] | +| **policy_id** | **String** | The id of the policy for which to perform the action. | | +| **action** | **String** | The action to perform with the provided ids, must be one of: `assign`, `unassign`, or `precedence`. | | +| **ids** | [**Array<String>**](String.md) | One or more rule group ids in the form of ids=ID1&ids=ID2. Note, for the precedence action, precedence is controlled by the order of the ids as they are specified in the request. | | ### Return type -[**MsaspecQueryResponse**](MsaspecQueryResponse.md) +[**PoliciesResponse**](PoliciesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## update_rule_group_precedence + +> update_rule_group_precedence(rule_group_id, ids) + +Updates the rule precedence for all rules in the identified rule group. + +The ids for `all` rules contained within the rule group must be specified in the desired precedence order. Requests that do not represent all ids will not be processed. + +### 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::FilevantageApi.new +rule_group_id = 'rule_group_id_example' # String | Rule group from which to set the precedence. +ids = ['inner_example'] # Array | One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2`. + +begin + # Updates the rule precedence for all rules in the identified rule group. + result = api_instance.update_rule_group_precedence(rule_group_id, ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_rule_group_precedence: #{e}" +end +``` + +#### Using the update_rule_group_precedence_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_rule_group_precedence_with_http_info(rule_group_id, ids) + +```ruby +begin + # Updates the rule precedence for all rules in the identified rule group. + data, status_code, headers = api_instance.update_rule_group_precedence_with_http_info(rule_group_id, ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_rule_group_precedence_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **rule_group_id** | **String** | Rule group from which to set the precedence. | | +| **ids** | [**Array<String>**](String.md) | One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2`. | | + +### Return type + +[**RulegroupsResponse**](RulegroupsResponse.md) ### Authorization @@ -157,3 +1716,216 @@ end - **Content-Type**: Not defined - **Accept**: application/json + +## update_rule_groups + +> update_rule_groups(body) + +Updates the provided rule group. + +Provides the ability to update the name and description of the rule group. + +### 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::FilevantageApi.new +body = Falcon::RulegroupsUpdateRequest.new({id: 'id_example', name: 'name_example'}) # RulegroupsUpdateRequest | Enables updates to the following fields for an existing rule group. * `id` of the rule group to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `type` may not be modified after the rule group is created. Note: rules are added/removed from rule groups using their dedicated end-points. + +begin + # Updates the provided rule group. + result = api_instance.update_rule_groups(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_rule_groups: #{e}" +end +``` + +#### Using the update_rule_groups_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_rule_groups_with_http_info(body) + +```ruby +begin + # Updates the provided rule group. + data, status_code, headers = api_instance.update_rule_groups_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_rule_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RulegroupsUpdateRequest**](RulegroupsUpdateRequest.md) | Enables updates to the following fields for an existing rule group. * `id` of the rule group to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `type` may not be modified after the rule group is created. Note: rules are added/removed from rule groups using their dedicated end-points. | | + +### Return type + +[**RulegroupsResponse**](RulegroupsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_rules + +> update_rules(body) + +Updates the provided rule configuration within the specified rule group. + +The rule must currently exist within the specified rule group. + +### 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::FilevantageApi.new +body = Falcon::RulegroupsRule.new({depth: 'depth_example', id: 'id_example', include: 'include_example', path: 'path_example', rule_group_id: 'rule_group_id_example', severity: 'severity_example', type: 'type_example'}) # RulegroupsRule | Update the rule configuration for the specified rule ID and group. * `id` of the rule to update. * `rule_group_id` that contains the rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` is the order in which rules will be evaluated starting with 1. Specifying a precedence value that is already set for another rule in the group will result this rule being placed before that existing rule. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files that will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + +begin + # Updates the provided rule configuration within the specified rule group. + result = api_instance.update_rules(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_rules: #{e}" +end +``` + +#### 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_with_http_info(body) + +```ruby +begin + # Updates the provided rule configuration within the specified rule group. + 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 FilevantageApi->update_rules_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**RulegroupsRule**](RulegroupsRule.md) | Update the rule configuration for the specified rule ID and group. * `id` of the rule to update. * `rule_group_id` that contains the rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` is the order in which rules will be evaluated starting with 1. Specifying a precedence value that is already set for another rule in the group will result this rule being placed before that existing rule. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files that will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` | | + +### Return type + +[**RulegroupsRulesResponse**](RulegroupsRulesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_scheduled_exclusions + +> update_scheduled_exclusions(body) + +Updates the provided scheduled exclusion configuration within the provided policy. + +Updates the provided scheduled exclusion configuration within the provided policy. + +### 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::FilevantageApi.new +body = Falcon::ScheduledexclusionsUpdateRequest.new({id: 'id_example', name: 'name_example', timezone: 'timezone_example'}) # ScheduledexclusionsUpdateRequest | Update an existing scheduled exclusion for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + +begin + # Updates the provided scheduled exclusion configuration within the provided policy. + result = api_instance.update_scheduled_exclusions(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_scheduled_exclusions: #{e}" +end +``` + +#### Using the update_scheduled_exclusions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_scheduled_exclusions_with_http_info(body) + +```ruby +begin + # Updates the provided scheduled exclusion configuration within the provided policy. + data, status_code, headers = api_instance.update_scheduled_exclusions_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FilevantageApi->update_scheduled_exclusions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ScheduledexclusionsUpdateRequest**](ScheduledexclusionsUpdateRequest.md) | Update an existing scheduled exclusion for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. | | + +### Return type + +[**ScheduledexclusionsResponse**](ScheduledexclusionsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/Flows.md b/docs/Flows.md new file mode 100644 index 00000000..79d66c15 --- /dev/null +++ b/docs/Flows.md @@ -0,0 +1,22 @@ +# Falcon::Flows + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **default** | **String** | Reference to the ID of the sequence flow node which acts as the default path. | [optional] | +| **incoming** | **Array<String>** | References to the IDs of the sequence flow nodes inbound to the gateway. | | +| **outgoing** | **Array<String>** | References to the IDs of the sequence flow nodes outbound from the gateway. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::Flows.new( + default: null, + incoming: null, + outgoing: null +) +``` + diff --git a/docs/FoundryLogscaleApi.md b/docs/FoundryLogscaleApi.md new file mode 100644 index 00000000..c1a8e38e --- /dev/null +++ b/docs/FoundryLogscaleApi.md @@ -0,0 +1,1005 @@ +# Falcon::FoundryLogscaleApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_saved_searches_dynamic_execute_alt_v1**](FoundryLogscaleApi.md#create_saved_searches_dynamic_execute_alt_v1) | **POST** /loggingapi/entities/saved-searches-dynamic-execute/v1 | Execute a dynamic saved search | +| [**create_saved_searches_dynamic_execute_v1**](FoundryLogscaleApi.md#create_saved_searches_dynamic_execute_v1) | **POST** /loggingapi/entities/saved-searches/execute-dynamic/v1 | Execute a dynamic saved search | +| [**create_saved_searches_execute_alt_v1**](FoundryLogscaleApi.md#create_saved_searches_execute_alt_v1) | **POST** /loggingapi/entities/saved-searches-execute/v1 | Execute a saved search | +| [**create_saved_searches_execute_v1**](FoundryLogscaleApi.md#create_saved_searches_execute_v1) | **POST** /loggingapi/entities/saved-searches/execute/v1 | Execute a saved search | +| [**create_saved_searches_ingest_alt_v1**](FoundryLogscaleApi.md#create_saved_searches_ingest_alt_v1) | **POST** /loggingapi/entities/saved-searches-ingest/v1 | Populate a saved search | +| [**create_saved_searches_ingest_v1**](FoundryLogscaleApi.md#create_saved_searches_ingest_v1) | **POST** /loggingapi/entities/saved-searches/ingest/v1 | Populate a saved search | +| [**get_saved_searches_execute_alt_v1**](FoundryLogscaleApi.md#get_saved_searches_execute_alt_v1) | **GET** /loggingapi/entities/saved-searches-execute/v1 | Get the results of a saved search | +| [**get_saved_searches_execute_v1**](FoundryLogscaleApi.md#get_saved_searches_execute_v1) | **GET** /loggingapi/entities/saved-searches/execute/v1 | Get the results of a saved search | +| [**get_saved_searches_job_results_download_alt_v1**](FoundryLogscaleApi.md#get_saved_searches_job_results_download_alt_v1) | **GET** /loggingapi/entities/saved-searches-job-results-download/v1 | Get the results of a saved search as a file | +| [**get_saved_searches_job_results_download_v1**](FoundryLogscaleApi.md#get_saved_searches_job_results_download_v1) | **GET** /loggingapi/entities/saved-searches/job-results-download/v1 | Get the results of a saved search as a file | +| [**ingest_data_v1**](FoundryLogscaleApi.md#ingest_data_v1) | **POST** /loggingapi/entities/data-ingestion/ingest/v1 | Ingest data into the application repository | +| [**list_repos_v1**](FoundryLogscaleApi.md#list_repos_v1) | **GET** /loggingapi/combined/repos/v1 | Lists available repositories and views | +| [**list_view_v1**](FoundryLogscaleApi.md#list_view_v1) | **GET** /loggingapi/entities/views/v1 | List views | + + +## create_saved_searches_dynamic_execute_alt_v1 + +> create_saved_searches_dynamic_execute_alt_v1(body, opts) + +Execute a dynamic saved search + +### 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::FoundryLogscaleApi.new +body = Falcon::ApidomainDynamicExecuteSearchRequestV1.new({repo_or_view: 'repo_or_view_example', search_query: 'search_query_example', search_query_args: 3.56}) # ApidomainDynamicExecuteSearchRequestV1 | +opts = { + app_id: 'app_id_example', # String | Application ID. + include_schema_generation: true, # Boolean | Include generated schemas in the response + include_test_data: true, # Boolean | Include test data when executing searches + metadata: true, # Boolean | Whether to include metadata in the response + mode: 'sync' # String | Mode to execute the query under. +} + +begin + # Execute a dynamic saved search + result = api_instance.create_saved_searches_dynamic_execute_alt_v1(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_dynamic_execute_alt_v1: #{e}" +end +``` + +#### Using the create_saved_searches_dynamic_execute_alt_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_saved_searches_dynamic_execute_alt_v1_with_http_info(body, opts) + +```ruby +begin + # Execute a dynamic saved search + data, status_code, headers = api_instance.create_saved_searches_dynamic_execute_alt_v1_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_dynamic_execute_alt_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ApidomainDynamicExecuteSearchRequestV1**](ApidomainDynamicExecuteSearchRequestV1.md) | | | +| **app_id** | **String** | Application ID. | [optional] | +| **include_schema_generation** | **Boolean** | Include generated schemas in the response | [optional][default to false] | +| **include_test_data** | **Boolean** | Include test data when executing searches | [optional][default to false] | +| **metadata** | **Boolean** | Whether to include metadata in the response | [optional][default to false] | +| **mode** | **String** | Mode to execute the query under. | [optional] | + +### Return type + +[**ApidomainQueryResponseWrapperV1**](ApidomainQueryResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_saved_searches_dynamic_execute_v1 + +> create_saved_searches_dynamic_execute_v1(body, opts) + +Execute a dynamic saved search + +### 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::FoundryLogscaleApi.new +body = Falcon::ApidomainDynamicExecuteSearchRequestV1.new({repo_or_view: 'repo_or_view_example', search_query: 'search_query_example', search_query_args: 3.56}) # ApidomainDynamicExecuteSearchRequestV1 | +opts = { + app_id: 'app_id_example', # String | Application ID. + include_schema_generation: true, # Boolean | Include generated schemas in the response + include_test_data: true, # Boolean | Include test data when executing searches + metadata: true, # Boolean | Whether to include metadata in the response + mode: 'sync' # String | Mode to execute the query under. +} + +begin + # Execute a dynamic saved search + result = api_instance.create_saved_searches_dynamic_execute_v1(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_dynamic_execute_v1: #{e}" +end +``` + +#### Using the create_saved_searches_dynamic_execute_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_saved_searches_dynamic_execute_v1_with_http_info(body, opts) + +```ruby +begin + # Execute a dynamic saved search + data, status_code, headers = api_instance.create_saved_searches_dynamic_execute_v1_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_dynamic_execute_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ApidomainDynamicExecuteSearchRequestV1**](ApidomainDynamicExecuteSearchRequestV1.md) | | | +| **app_id** | **String** | Application ID. | [optional] | +| **include_schema_generation** | **Boolean** | Include generated schemas in the response | [optional][default to false] | +| **include_test_data** | **Boolean** | Include test data when executing searches | [optional][default to false] | +| **metadata** | **Boolean** | Whether to include metadata in the response | [optional][default to false] | +| **mode** | **String** | Mode to execute the query under. | [optional] | + +### Return type + +[**ApidomainQueryResponseWrapperV1**](ApidomainQueryResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_saved_searches_execute_alt_v1 + +> create_saved_searches_execute_alt_v1(body, opts) + +Execute a saved search + +### 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::FoundryLogscaleApi.new +body = Falcon::ApidomainSavedSearchExecuteRequestV1.new # ApidomainSavedSearchExecuteRequestV1 | +opts = { + app_id: 'app_id_example', # String | Application ID. + detailed: true, # Boolean | Whether to include search field details + include_test_data: true, # Boolean | Include test data when executing searches + metadata: true # Boolean | Whether to include metadata in the response +} + +begin + # Execute a saved search + result = api_instance.create_saved_searches_execute_alt_v1(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_execute_alt_v1: #{e}" +end +``` + +#### Using the create_saved_searches_execute_alt_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_saved_searches_execute_alt_v1_with_http_info(body, opts) + +```ruby +begin + # Execute a saved search + data, status_code, headers = api_instance.create_saved_searches_execute_alt_v1_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_execute_alt_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ApidomainSavedSearchExecuteRequestV1**](ApidomainSavedSearchExecuteRequestV1.md) | | | +| **app_id** | **String** | Application ID. | [optional] | +| **detailed** | **Boolean** | Whether to include search field details | [optional][default to false] | +| **include_test_data** | **Boolean** | Include test data when executing searches | [optional][default to false] | +| **metadata** | **Boolean** | Whether to include metadata in the response | [optional][default to false] | + +### Return type + +[**ApidomainQueryResponseWrapperV1**](ApidomainQueryResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_saved_searches_execute_v1 + +> create_saved_searches_execute_v1(body, opts) + +Execute a saved search + +### 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::FoundryLogscaleApi.new +body = Falcon::ApidomainSavedSearchExecuteRequestV1.new # ApidomainSavedSearchExecuteRequestV1 | +opts = { + app_id: 'app_id_example', # String | Application ID. + detailed: true, # Boolean | Whether to include search field details + include_test_data: true, # Boolean | Include test data when executing searches + metadata: true # Boolean | Whether to include metadata in the response +} + +begin + # Execute a saved search + result = api_instance.create_saved_searches_execute_v1(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_execute_v1: #{e}" +end +``` + +#### Using the create_saved_searches_execute_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_saved_searches_execute_v1_with_http_info(body, opts) + +```ruby +begin + # Execute a saved search + data, status_code, headers = api_instance.create_saved_searches_execute_v1_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_execute_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ApidomainSavedSearchExecuteRequestV1**](ApidomainSavedSearchExecuteRequestV1.md) | | | +| **app_id** | **String** | Application ID. | [optional] | +| **detailed** | **Boolean** | Whether to include search field details | [optional][default to false] | +| **include_test_data** | **Boolean** | Include test data when executing searches | [optional][default to false] | +| **metadata** | **Boolean** | Whether to include metadata in the response | [optional][default to false] | + +### Return type + +[**ApidomainQueryResponseWrapperV1**](ApidomainQueryResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_saved_searches_ingest_alt_v1 + +> create_saved_searches_ingest_alt_v1(opts) + +Populate a saved search + +### 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::FoundryLogscaleApi.new +opts = { + app_id: 'app_id_example' # String | Application ID. +} + +begin + # Populate a saved search + result = api_instance.create_saved_searches_ingest_alt_v1(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_ingest_alt_v1: #{e}" +end +``` + +#### Using the create_saved_searches_ingest_alt_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_saved_searches_ingest_alt_v1_with_http_info(opts) + +```ruby +begin + # Populate a saved search + data, status_code, headers = api_instance.create_saved_searches_ingest_alt_v1_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_ingest_alt_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **String** | Application ID. | [optional] | + +### Return type + +[**ClientDataIngestResponseWrapperV1**](ClientDataIngestResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## create_saved_searches_ingest_v1 + +> create_saved_searches_ingest_v1(opts) + +Populate a saved search + +### 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::FoundryLogscaleApi.new +opts = { + app_id: 'app_id_example' # String | Application ID. +} + +begin + # Populate a saved search + result = api_instance.create_saved_searches_ingest_v1(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_ingest_v1: #{e}" +end +``` + +#### Using the create_saved_searches_ingest_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_saved_searches_ingest_v1_with_http_info(opts) + +```ruby +begin + # Populate a saved search + data, status_code, headers = api_instance.create_saved_searches_ingest_v1_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->create_saved_searches_ingest_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_id** | **String** | Application ID. | [optional] | + +### Return type + +[**ClientDataIngestResponseWrapperV1**](ClientDataIngestResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_saved_searches_execute_alt_v1 + +> get_saved_searches_execute_alt_v1(job_id, opts) + +Get the results of a saved search + +### 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::FoundryLogscaleApi.new +job_id = 'job_id_example' # String | Job ID for a previously executed async query +opts = { + app_id: 'app_id_example', # String | Application ID. + limit: 'limit_example', # String | Maximum number of records to return. + metadata: true, # Boolean | Whether to include metadata in the response + offset: 'offset_example' # String | Starting pagination offset of records to return. +} + +begin + # Get the results of a saved search + result = api_instance.get_saved_searches_execute_alt_v1(job_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_execute_alt_v1: #{e}" +end +``` + +#### Using the get_saved_searches_execute_alt_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_saved_searches_execute_alt_v1_with_http_info(job_id, opts) + +```ruby +begin + # Get the results of a saved search + data, status_code, headers = api_instance.get_saved_searches_execute_alt_v1_with_http_info(job_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_execute_alt_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **job_id** | **String** | Job ID for a previously executed async query | | +| **app_id** | **String** | Application ID. | [optional] | +| **limit** | **String** | Maximum number of records to return. | [optional] | +| **metadata** | **Boolean** | Whether to include metadata in the response | [optional][default to false] | +| **offset** | **String** | Starting pagination offset of records to return. | [optional] | + +### Return type + +[**ApidomainQueryResponseWrapperV1**](ApidomainQueryResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_saved_searches_execute_v1 + +> get_saved_searches_execute_v1(job_id, opts) + +Get the results of a saved search + +### 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::FoundryLogscaleApi.new +job_id = 'job_id_example' # String | Job ID for a previously executed async query +opts = { + app_id: 'app_id_example', # String | Application ID. + limit: 'limit_example', # String | Maximum number of records to return. + metadata: true, # Boolean | Whether to include metadata in the response + offset: 'offset_example' # String | Starting pagination offset of records to return. +} + +begin + # Get the results of a saved search + result = api_instance.get_saved_searches_execute_v1(job_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_execute_v1: #{e}" +end +``` + +#### Using the get_saved_searches_execute_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_saved_searches_execute_v1_with_http_info(job_id, opts) + +```ruby +begin + # Get the results of a saved search + data, status_code, headers = api_instance.get_saved_searches_execute_v1_with_http_info(job_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_execute_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **job_id** | **String** | Job ID for a previously executed async query | | +| **app_id** | **String** | Application ID. | [optional] | +| **limit** | **String** | Maximum number of records to return. | [optional] | +| **metadata** | **Boolean** | Whether to include metadata in the response | [optional][default to false] | +| **offset** | **String** | Starting pagination offset of records to return. | [optional] | + +### Return type + +[**ApidomainQueryResponseWrapperV1**](ApidomainQueryResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_saved_searches_job_results_download_alt_v1 + +> File get_saved_searches_job_results_download_alt_v1(job_id, opts) + +Get the results of a saved search as a 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::FoundryLogscaleApi.new +job_id = 'job_id_example' # String | Job ID for a previously executed async query +opts = { + result_format: 'json' # String | Result Format +} + +begin + # Get the results of a saved search as a file + result = api_instance.get_saved_searches_job_results_download_alt_v1(job_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_job_results_download_alt_v1: #{e}" +end +``` + +#### Using the get_saved_searches_job_results_download_alt_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> get_saved_searches_job_results_download_alt_v1_with_http_info(job_id, opts) + +```ruby +begin + # Get the results of a saved search as a file + data, status_code, headers = api_instance.get_saved_searches_job_results_download_alt_v1_with_http_info(job_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => File +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_job_results_download_alt_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **job_id** | **String** | Job ID for a previously executed async query | | +| **result_format** | **String** | Result Format | [optional] | + +### Return type + +**File** + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream + + +## get_saved_searches_job_results_download_v1 + +> File get_saved_searches_job_results_download_v1(job_id, opts) + +Get the results of a saved search as a 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::FoundryLogscaleApi.new +job_id = 'job_id_example' # String | Job ID for a previously executed async query +opts = { + result_format: 'json' # String | Result Format +} + +begin + # Get the results of a saved search as a file + result = api_instance.get_saved_searches_job_results_download_v1(job_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_job_results_download_v1: #{e}" +end +``` + +#### Using the get_saved_searches_job_results_download_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> get_saved_searches_job_results_download_v1_with_http_info(job_id, opts) + +```ruby +begin + # Get the results of a saved search as a file + data, status_code, headers = api_instance.get_saved_searches_job_results_download_v1_with_http_info(job_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => File +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->get_saved_searches_job_results_download_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **job_id** | **String** | Job ID for a previously executed async query | | +| **result_format** | **String** | Result Format | [optional] | + +### Return type + +**File** + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream + + +## ingest_data_v1 + +> ingest_data_v1(data_file, opts) + +Ingest data into the application repository + +### 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::FoundryLogscaleApi.new +data_file = File.new('/path/to/some/file') # File | Data file to ingest +opts = { + tag: ['inner_example'], # Array | Custom tag for ingested data in the form tag:value + tag_source: 'tag_source_example', # String | Tag the data with the specified source + test_data: true # Boolean | Tag the data with test-ingest +} + +begin + # Ingest data into the application repository + result = api_instance.ingest_data_v1(data_file, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->ingest_data_v1: #{e}" +end +``` + +#### Using the ingest_data_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> ingest_data_v1_with_http_info(data_file, opts) + +```ruby +begin + # Ingest data into the application repository + data, status_code, headers = api_instance.ingest_data_v1_with_http_info(data_file, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->ingest_data_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data_file** | **File** | Data file to ingest | | +| **tag** | [**Array<String>**](String.md) | Custom tag for ingested data in the form tag:value | [optional] | +| **tag_source** | **String** | Tag the data with the specified source | [optional] | +| **test_data** | **Boolean** | Tag the data with test-ingest | [optional][default to false] | + +### Return type + +[**ClientDataIngestResponseWrapperV1**](ClientDataIngestResponseWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + +## list_repos_v1 + +> list_repos_v1(opts) + +Lists available repositories and views + +### 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::FoundryLogscaleApi.new +opts = { + check_test_data: true # Boolean | Include whether test data is present in the application repository +} + +begin + # Lists available repositories and views + result = api_instance.list_repos_v1(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->list_repos_v1: #{e}" +end +``` + +#### Using the list_repos_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_repos_v1_with_http_info(opts) + +```ruby +begin + # Lists available repositories and views + data, status_code, headers = api_instance.list_repos_v1_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->list_repos_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **check_test_data** | **Boolean** | Include whether test data is present in the application repository | [optional][default to false] | + +### Return type + +[**ApidomainRepoViewListItemWrapperV1**](ApidomainRepoViewListItemWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_view_v1 + +> list_view_v1(opts) + +List views + +### 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::FoundryLogscaleApi.new +opts = { + check_test_data: true # Boolean | Include whether test data is present in the application repository +} + +begin + # List views + result = api_instance.list_view_v1(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->list_view_v1: #{e}" +end +``` + +#### Using the list_view_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_view_v1_with_http_info(opts) + +```ruby +begin + # List views + data, status_code, headers = api_instance.list_view_v1_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling FoundryLogscaleApi->list_view_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **check_test_data** | **Boolean** | Include whether test data is present in the application repository | [optional][default to false] | + +### Return type + +[**ApidomainRepoViewListItemWrapperV1**](ApidomainRepoViewListItemWrapperV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/FwmgrMsaAggregationResult.md b/docs/FwmgrMsaAggregationResult.md index 4a8e45e1..401f15f0 100644 --- a/docs/FwmgrMsaAggregationResult.md +++ b/docs/FwmgrMsaAggregationResult.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **buckets** | [**Array<FwmgrMsaAggregationResultItem>**](FwmgrMsaAggregationResultItem.md) | | | +| **doc_count_error_upper_bound** | **Integer** | | [optional] | | **name** | **String** | | | | **sum_other_doc_count** | **Integer** | | [optional] | @@ -15,6 +16,7 @@ require 'crimson-falcon' instance = Falcon::FwmgrMsaAggregationResult.new( buckets: null, + doc_count_error_upper_bound: null, name: null, sum_other_doc_count: null ) diff --git a/docs/GraphCondition.md b/docs/GraphCondition.md new file mode 100644 index 00000000..825b33f2 --- /dev/null +++ b/docs/GraphCondition.md @@ -0,0 +1,22 @@ +# Falcon::GraphCondition + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **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] | +| **expression** | **String** | FQL expression for the condition on the sequence flow. | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphCondition.new( + display: null, + evaluated: null, + expression: null +) +``` + diff --git a/docs/GraphConfiguredActivity.md b/docs/GraphConfiguredActivity.md new file mode 100644 index 00000000..4c5e6459 --- /dev/null +++ b/docs/GraphConfiguredActivity.md @@ -0,0 +1,28 @@ +# Falcon::GraphConfiguredActivity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **flows** | [**Flows**](Flows.md) | | | +| **id** | **String** | The unique identifier of the selected activity that is being configured. | | +| **max_seconds** | **String** | Maximum seconds to wait for an async process to finish. Overrides default async_max_seconds on Activity seed. | [optional] | +| **name** | **String** | Optional user provided name for the activity, if not specified a default of the name for that Activity will be used. | | +| **node_id** | **String** | | | +| **properties** | **Object** | Dynamic payload providing values needed to configure the activity for execution. The structure of this data is dictated by the JSON Schema defined for the selected Activity. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphConfiguredActivity.new( + flows: null, + id: null, + max_seconds: null, + name: null, + node_id: null, + properties: null +) +``` + diff --git a/docs/GraphConfiguredTrigger.md b/docs/GraphConfiguredTrigger.md new file mode 100644 index 00000000..94cccb38 --- /dev/null +++ b/docs/GraphConfiguredTrigger.md @@ -0,0 +1,30 @@ +# Falcon::GraphConfiguredTrigger + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Unique identifier for the selected trigger as provided by the triggers API | [optional] | +| **name** | **String** | Display name of the trigger | | +| **node_id** | **String** | | | +| **outgoing_flow** | **String** | Reference to the ID of the flow node outbound from the trigger. | | +| **parameters** | [**JsonschemaSchema**](JsonschemaSchema.md) | | [optional] | +| **timer_event_definition** | [**GraphTimerEventDefinition**](GraphTimerEventDefinition.md) | | [optional] | +| **trigger_type** | **String** | Denotes the type of trigger, signal based, scheduled, on demand, etc | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphConfiguredTrigger.new( + id: null, + name: null, + node_id: null, + outgoing_flow: null, + parameters: null, + timer_event_definition: null, + trigger_type: null +) +``` + diff --git a/docs/GraphDefinitionModel.md b/docs/GraphDefinitionModel.md new file mode 100644 index 00000000..9b73e837 --- /dev/null +++ b/docs/GraphDefinitionModel.md @@ -0,0 +1,30 @@ +# Falcon::GraphDefinitionModel + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **activities** | [**Hash<String, GraphConfiguredActivity>**](GraphConfiguredActivity.md) | Details of all the activities within the model. Each activity has a unique node ID as the key, that is set by the caller. | [optional] | +| **_end** | [**GraphEnd**](GraphEnd.md) | | [optional] | +| **flows** | [**Hash<String, GraphFlow>**](GraphFlow.md) | Details all the sequence flows within the model. Each flow has a unique node ID as the key, that is set by the caller. | | +| **gateways** | [**Hash<String, GraphGateway>**](GraphGateway.md) | Details all the gateways within the model. Each gateway has a unique node ID as the key, that is set by the caller. | [optional] | +| **node_registry** | **Object** | | | +| **sub_models** | [**Hash<String, GraphSubModel>**](GraphSubModel.md) | Details of all sub-models within the model. Each sub-model has a unique node ID as the key set by the caller. | [optional] | +| **trigger** | [**GraphConfiguredTrigger**](GraphConfiguredTrigger.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphDefinitionModel.new( + activities: null, + _end: null, + flows: null, + gateways: null, + node_registry: null, + sub_models: null, + trigger: null +) +``` + diff --git a/docs/GraphEnd.md b/docs/GraphEnd.md new file mode 100644 index 00000000..d732b30d --- /dev/null +++ b/docs/GraphEnd.md @@ -0,0 +1,20 @@ +# Falcon::GraphEnd + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **incoming_flows** | **Array<String>** | Reference to the ID of the flow nodes inbound to the end node. | | +| **node_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphEnd.new( + incoming_flows: null, + node_id: null +) +``` + diff --git a/docs/GraphFlow.md b/docs/GraphFlow.md new file mode 100644 index 00000000..9e32feea --- /dev/null +++ b/docs/GraphFlow.md @@ -0,0 +1,24 @@ +# Falcon::GraphFlow + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **condition** | [**GraphCondition**](GraphCondition.md) | | [optional] | +| **source** | **String** | Reference to the ID of the node that is the source of the flow. | | +| **source_alias** | **String** | Alias for the source of the flow. | [optional] | +| **target** | **String** | Reference to the ID of the node that is the target of the flow. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphFlow.new( + condition: null, + source: null, + source_alias: null, + target: null +) +``` + diff --git a/docs/GraphGateway.md b/docs/GraphGateway.md new file mode 100644 index 00000000..355d2002 --- /dev/null +++ b/docs/GraphGateway.md @@ -0,0 +1,22 @@ +# Falcon::GraphGateway + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **flows** | [**Flows**](Flows.md) | | | +| **node_id** | **String** | | | +| **type** | **String** | The type of gateway being specified, allowed values are; exclusive, inclusive and parallel. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphGateway.new( + flows: null, + node_id: null, + type: null +) +``` + diff --git a/docs/GraphMulti.md b/docs/GraphMulti.md new file mode 100644 index 00000000..076be90e --- /dev/null +++ b/docs/GraphMulti.md @@ -0,0 +1,24 @@ +# Falcon::GraphMulti + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **array_field** | **String** | Name of the field that contains the array in input data | | +| **array_field_display_name** | **String** | Display name of the field that contains the array in input data | | +| **continue_on_partial_execution** | **Boolean** | If true will allow the workflow to continue execution even if some loop iterations fail or when there are no iterations to execute | | +| **max_iteration_count** | **Integer** | Maximum number of iterations allowed in sub model | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphMulti.new( + array_field: null, + array_field_display_name: null, + continue_on_partial_execution: null, + max_iteration_count: null +) +``` + diff --git a/docs/GraphSubModel.md b/docs/GraphSubModel.md new file mode 100644 index 00000000..a9ccbe7a --- /dev/null +++ b/docs/GraphSubModel.md @@ -0,0 +1,28 @@ +# Falcon::GraphSubModel + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **flows** | [**Flows**](Flows.md) | | | +| **model** | [**GraphDefinitionModel**](GraphDefinitionModel.md) | | | +| **multi** | [**GraphMulti**](GraphMulti.md) | | | +| **name** | **String** | Optional user provided name for the activity, if not specified a name based on the array field is used. | [optional] | +| **node_id** | **String** | | | +| **output_field** | **String** | Name of the output field that contains the result from sub-model. | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphSubModel.new( + flows: null, + model: null, + multi: null, + name: null, + node_id: null, + output_field: null +) +``` + diff --git a/docs/GraphTimerEventDefinition.md b/docs/GraphTimerEventDefinition.md new file mode 100644 index 00000000..250a99f7 --- /dev/null +++ b/docs/GraphTimerEventDefinition.md @@ -0,0 +1,26 @@ +# Falcon::GraphTimerEventDefinition + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **end_date** | **String** | End date in mm-dd-yyyy format | [optional] | +| **skip_concurrent** | **Boolean** | Flag indicating if concurrent execution of scheduled workflow should be skipped or not | | +| **start_date** | **String** | Start date in mm-dd-yyyy format | [optional] | +| **time_cycle** | **String** | A time cycle element specifies repeating intervals, and can be specified using using cron expressions. | | +| **tz** | **String** | Timezone label from IANA timezone database, for example, America/Los_Angeles | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphTimerEventDefinition.new( + end_date: null, + skip_concurrent: null, + start_date: null, + time_cycle: null, + tz: null +) +``` + diff --git a/docs/GraphValidationError.md b/docs/GraphValidationError.md new file mode 100644 index 00000000..b1ffcaf7 --- /dev/null +++ b/docs/GraphValidationError.md @@ -0,0 +1,30 @@ +# Falcon::GraphValidationError + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | The cid the validation error applies to if it is not the CID managing the workflow | [optional] | +| **code** | **Integer** | identifier for UI to indicate reason for node being invalid. | [optional] | +| **display_name** | **String** | Display name for the property if it exists in a trigger or activity | [optional] | +| **message** | **String** | Detail of why the node is invalid. | | +| **node_id** | **String** | ID of the node in the graph that has been invalidated. | [optional] | +| **parent_node_id** | **String** | ID of the parent node in the graph that resulted in a child node being invalidated. | [optional] | +| **property** | **String** | Used to specify an exact property that is invalid for fql evaluation | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::GraphValidationError.new( + cid: null, + code: null, + display_name: null, + message: null, + node_id: null, + parent_node_id: null, + property: null +) +``` + diff --git a/docs/HostsApi.md b/docs/HostsApi.md index 77ce14f2..3c02bad5 100644 --- a/docs/HostsApi.md +++ b/docs/HostsApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**entities_perform_action**](HostsApi.md#entities_perform_action) | **POST** /devices/entities/group-actions/v1 | Performs the specified action on the provided prevention policy IDs. | -| [**get_device_details**](HostsApi.md#get_device_details) | **GET** /devices/entities/devices/v1 | Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API | +| [**entities_perform_action**](HostsApi.md#entities_perform_action) | **POST** /devices/entities/group-actions/v1 | Performs the specified action on the provided group IDs. | | [**get_device_details_v2**](HostsApi.md#get_device_details_v2) | **GET** /devices/entities/devices/v2 | Get details on one or more hosts by providing host IDs as a query parameter. Supports up to a maximum 100 IDs. | | [**get_online_state_v1**](HostsApi.md#get_online_state_v1) | **GET** /devices/entities/online-state/v1 | Get the online status for one or more hosts by specifying each host’s unique ID. Successful requests return an HTTP 200 response and the status for each host identified by a `state` of `online`, `offline`, or `unknown` for each host, identified by host `id`. Make a `GET` request to `/devices/queries/devices/v1` to get a list of host IDs. | | [**perform_action_v2**](HostsApi.md#perform_action_v2) | **POST** /devices/entities/devices-actions/v2 | Take various actions on the hosts in your environment. Contain or lift containment on a host. Delete or restore a host. | | [**post_device_details_v2**](HostsApi.md#post_device_details_v2) | **POST** /devices/entities/devices/v2 | Get details on one or more hosts by providing host IDs in a POST body. Supports up to a maximum 5000 IDs. | | [**query_device_login_history**](HostsApi.md#query_device_login_history) | **POST** /devices/combined/devices/login-history/v1 | Retrieve details about recent login sessions for a set of devices. | +| [**query_device_login_history_v2**](HostsApi.md#query_device_login_history_v2) | **POST** /devices/combined/devices/login-history/v2 | Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified | | [**query_devices_by_filter**](HostsApi.md#query_devices_by_filter) | **GET** /devices/queries/devices/v1 | Search for hosts in your environment by platform, hostname, IP, and other criteria. | | [**query_devices_by_filter_scroll**](HostsApi.md#query_devices_by_filter_scroll) | **GET** /devices/queries/devices-scroll/v1 | Search for hosts in your environment by platform, hostname, IP, and other criteria with continuous pagination capability (based on offset pointer which expires after 2 minutes with no maximum limit) | | [**query_get_network_address_history_v1**](HostsApi.md#query_get_network_address_history_v1) | **POST** /devices/combined/devices/network-address-history/v1 | Retrieve history of IP and MAC addresses of devices. | @@ -22,7 +22,7 @@ All URIs are relative to *https://api.crowdstrike.com* > entities_perform_action(ids, action_name, body, opts) -Performs the specified action on the provided prevention policy IDs. +Performs the specified action on the provided group IDs. ### Examples @@ -46,7 +46,7 @@ opts = { } begin - # Performs the specified action on the provided prevention policy IDs. + # Performs the specified action on the provided group IDs. result = api_instance.entities_perform_action(ids, action_name, body, opts) p result rescue Falcon::ApiError => e @@ -62,7 +62,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Performs the specified action on the provided prevention policy IDs. + # Performs the specified action on the provided group IDs. data, status_code, headers = api_instance.entities_perform_action_with_http_info(ids, action_name, body, opts) p status_code # => 2xx p headers # => { ... } @@ -95,75 +95,6 @@ end - **Accept**: application/json -## get_device_details - -> get_device_details(ids) - -Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API - -### 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::HostsApi.new -ids = ['inner_example'] # Array | The host agentIDs used to get details on - -begin - # Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API - result = api_instance.get_device_details(ids) - p result -rescue Falcon::ApiError => e - puts "Error when calling HostsApi->get_device_details: #{e}" -end -``` - -#### Using the get_device_details_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> get_device_details_with_http_info(ids) - -```ruby -begin - # Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API - data, status_code, headers = api_instance.get_device_details_with_http_info(ids) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue Falcon::ApiError => e - puts "Error when calling HostsApi->get_device_details_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **ids** | [**Array<String>**](String.md) | The host agentIDs used to get details on | | - -### Return type - -[**DeviceapiDeviceDetailsResponseSwagger**](DeviceapiDeviceDetailsResponseSwagger.md) - -### Authorization - -**oauth2** - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - ## get_device_details_v2 > get_device_details_v2(ids) @@ -511,6 +442,75 @@ end - **Accept**: application/json +## query_device_login_history_v2 + +> query_device_login_history_v2(body) + +Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified + +### 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::HostsApi.new +body = Falcon::MsaIdsRequest.new({ids: ['ids_example']}) # MsaIdsRequest | + +begin + # Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified + result = api_instance.query_device_login_history_v2(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling HostsApi->query_device_login_history_v2: #{e}" +end +``` + +#### Using the query_device_login_history_v2_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> query_device_login_history_v2_with_http_info(body) + +```ruby +begin + # Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified + data, status_code, headers = api_instance.query_device_login_history_v2_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling HostsApi->query_device_login_history_v2_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**MsaIdsRequest**](MsaIdsRequest.md) | | | + +### Return type + +[**DeviceapiLoginHistoryResponseV1**](DeviceapiLoginHistoryResponseV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + ## query_devices_by_filter > query_devices_by_filter(opts) diff --git a/docs/ImageAssessmentPoliciesApi.md b/docs/ImageAssessmentPoliciesApi.md new file mode 100644 index 00000000..33858624 --- /dev/null +++ b/docs/ImageAssessmentPoliciesApi.md @@ -0,0 +1,772 @@ +# Falcon::ImageAssessmentPoliciesApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_policies**](ImageAssessmentPoliciesApi.md#create_policies) | **POST** /container-security/entities/image-assessment-policies/v1 | Create Image Assessment policies | +| [**create_policy_groups**](ImageAssessmentPoliciesApi.md#create_policy_groups) | **POST** /container-security/entities/image-assessment-policy-groups/v1 | Create Image Assessment Policy Group entities | +| [**delete_policy**](ImageAssessmentPoliciesApi.md#delete_policy) | **DELETE** /container-security/entities/image-assessment-policies/v1 | Delete Image Assessment Policy by policy UUID | +| [**delete_policy_group**](ImageAssessmentPoliciesApi.md#delete_policy_group) | **DELETE** /container-security/entities/image-assessment-policy-groups/v1 | Delete Image Assessment Policy Group entities | +| [**read_policies**](ImageAssessmentPoliciesApi.md#read_policies) | **GET** /container-security/entities/image-assessment-policies/v1 | Get all Image Assessment policies | +| [**read_policy_exclusions**](ImageAssessmentPoliciesApi.md#read_policy_exclusions) | **GET** /container-security/entities/image-assessment-policy-exclusions/v1 | Retrieve Image Assessment Policy Exclusion entities | +| [**read_policy_groups**](ImageAssessmentPoliciesApi.md#read_policy_groups) | **GET** /container-security/entities/image-assessment-policy-groups/v1 | Retrieve Image Assessment Policy Group entities | +| [**update_policies**](ImageAssessmentPoliciesApi.md#update_policies) | **PATCH** /container-security/entities/image-assessment-policies/v1 | Update Image Assessment Policy entities | +| [**update_policy_exclusions**](ImageAssessmentPoliciesApi.md#update_policy_exclusions) | **POST** /container-security/entities/image-assessment-policy-exclusions/v1 | Update Image Assessment Policy Exclusion entities | +| [**update_policy_groups**](ImageAssessmentPoliciesApi.md#update_policy_groups) | **PATCH** /container-security/entities/image-assessment-policy-groups/v1 | Update Image Assessment Policy Group entities | +| [**update_policy_precedence**](ImageAssessmentPoliciesApi.md#update_policy_precedence) | **POST** /container-security/entities/image-assessment-policy-precedence/v1 | Update Image Assessment Policy precedence | + + +## create_policies + +> create_policies(body) + +Create Image Assessment policies + +### 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::ImageAssessmentPoliciesApi.new +body = Falcon::ModelsCreatePolicyRequest.new({description: 'description_example', name: 'name_example'}) # ModelsCreatePolicyRequest | + +begin + # Create Image Assessment policies + result = api_instance.create_policies(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->create_policies: #{e}" +end +``` + +#### 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_with_http_info(body) + +```ruby +begin + # Create Image Assessment policies + 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 ImageAssessmentPoliciesApi->create_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ModelsCreatePolicyRequest**](ModelsCreatePolicyRequest.md) | | | + +### Return type + +[**ModelsPolicyEntityResponse**](ModelsPolicyEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_policy_groups + +> create_policy_groups(body) + +Create Image Assessment Policy Group entities + +### 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::ImageAssessmentPoliciesApi.new +body = Falcon::ModelsCreateImageGroupRequest.new({description: 'description_example', name: 'name_example'}) # ModelsCreateImageGroupRequest | + +begin + # Create Image Assessment Policy Group entities + result = api_instance.create_policy_groups(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->create_policy_groups: #{e}" +end +``` + +#### Using the create_policy_groups_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_policy_groups_with_http_info(body) + +```ruby +begin + # Create Image Assessment Policy Group entities + data, status_code, headers = api_instance.create_policy_groups_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->create_policy_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ModelsCreateImageGroupRequest**](ModelsCreateImageGroupRequest.md) | | | + +### Return type + +[**ModelsPolicyGroupEntityResponse**](ModelsPolicyGroupEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## delete_policy + +> delete_policy(id) + +Delete Image Assessment Policy by policy UUID + +### 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::ImageAssessmentPoliciesApi.new +id = 'id_example' # String | Image Assessment Policy entity UUID + +begin + # Delete Image Assessment Policy by policy UUID + result = api_instance.delete_policy(id) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->delete_policy: #{e}" +end +``` + +#### Using the delete_policy_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_policy_with_http_info(id) + +```ruby +begin + # Delete Image Assessment Policy by policy UUID + data, status_code, headers = api_instance.delete_policy_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->delete_policy_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Image Assessment Policy entity UUID | | + +### Return type + +[**CoreEntitiesResponse**](CoreEntitiesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## delete_policy_group + +> delete_policy_group(id) + +Delete Image Assessment Policy Group entities + +### 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::ImageAssessmentPoliciesApi.new +id = 'id_example' # String | Policy Image Group entity UUID + +begin + # Delete Image Assessment Policy Group entities + result = api_instance.delete_policy_group(id) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->delete_policy_group: #{e}" +end +``` + +#### Using the delete_policy_group_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> delete_policy_group_with_http_info(id) + +```ruby +begin + # Delete Image Assessment Policy Group entities + data, status_code, headers = api_instance.delete_policy_group_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->delete_policy_group_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Policy Image Group entity UUID | | + +### Return type + +[**CoreEntitiesResponse**](CoreEntitiesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_policies + +> read_policies + +Get all Image Assessment policies + +### 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::ImageAssessmentPoliciesApi.new + +begin + # Get all Image Assessment policies + result = api_instance.read_policies + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->read_policies: #{e}" +end +``` + +#### Using the read_policies_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_policies_with_http_info + +```ruby +begin + # Get all Image Assessment policies + data, status_code, headers = api_instance.read_policies_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->read_policies_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ModelsPolicyEntityResponse**](ModelsPolicyEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_policy_exclusions + +> read_policy_exclusions + +Retrieve Image Assessment Policy Exclusion entities + +### 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::ImageAssessmentPoliciesApi.new + +begin + # Retrieve Image Assessment Policy Exclusion entities + result = api_instance.read_policy_exclusions + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->read_policy_exclusions: #{e}" +end +``` + +#### Using the read_policy_exclusions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_policy_exclusions_with_http_info + +```ruby +begin + # Retrieve Image Assessment Policy Exclusion entities + data, status_code, headers = api_instance.read_policy_exclusions_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->read_policy_exclusions_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ModelsPolicyExclusionEntityResponse**](ModelsPolicyExclusionEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_policy_groups + +> read_policy_groups + +Retrieve Image Assessment Policy Group entities + +### 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::ImageAssessmentPoliciesApi.new + +begin + # Retrieve Image Assessment Policy Group entities + result = api_instance.read_policy_groups + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->read_policy_groups: #{e}" +end +``` + +#### Using the read_policy_groups_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_policy_groups_with_http_info + +```ruby +begin + # Retrieve Image Assessment Policy Group entities + data, status_code, headers = api_instance.read_policy_groups_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->read_policy_groups_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ModelsPolicyGroupEntityResponse**](ModelsPolicyGroupEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## update_policies + +> update_policies(id, body) + +Update Image Assessment Policy entities + +### 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::ImageAssessmentPoliciesApi.new +id = 'id_example' # String | Image Assessment Policy entity UUID +body = Falcon::ModelsPatchPolicyRequest.new({description: 'description_example', is_enabled: false, name: 'name_example'}) # ModelsPatchPolicyRequest | + +begin + # Update Image Assessment Policy entities + result = api_instance.update_policies(id, body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policies: #{e}" +end +``` + +#### 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_with_http_info(id, body) + +```ruby +begin + # Update Image Assessment Policy entities + data, status_code, headers = api_instance.update_policies_with_http_info(id, body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policies_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Image Assessment Policy entity UUID | | +| **body** | [**ModelsPatchPolicyRequest**](ModelsPatchPolicyRequest.md) | | | + +### Return type + +[**ModelsPolicyEntityResponse**](ModelsPolicyEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_policy_exclusions + +> update_policy_exclusions(body) + +Update Image Assessment Policy Exclusion entities + +### 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::ImageAssessmentPoliciesApi.new +body = Falcon::ModelsUpdateExclusionsRequest.new({conditions: [Falcon::ModelsExclusionConditionRequest.new({prop: 'prop_example', value: ['value_example']})]}) # ModelsUpdateExclusionsRequest | + +begin + # Update Image Assessment Policy Exclusion entities + result = api_instance.update_policy_exclusions(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policy_exclusions: #{e}" +end +``` + +#### Using the update_policy_exclusions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_policy_exclusions_with_http_info(body) + +```ruby +begin + # Update Image Assessment Policy Exclusion entities + data, status_code, headers = api_instance.update_policy_exclusions_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policy_exclusions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ModelsUpdateExclusionsRequest**](ModelsUpdateExclusionsRequest.md) | | | + +### Return type + +[**ModelsPolicyExclusionEntityResponse**](ModelsPolicyExclusionEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_policy_groups + +> update_policy_groups(id, body) + +Update Image Assessment Policy Group entities + +### 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::ImageAssessmentPoliciesApi.new +id = 'id_example' # String | Policy Image Group entity UUID +body = Falcon::ModelsPatchImageGroupRequest.new({description: 'description_example', name: 'name_example'}) # ModelsPatchImageGroupRequest | + +begin + # Update Image Assessment Policy Group entities + result = api_instance.update_policy_groups(id, body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policy_groups: #{e}" +end +``` + +#### Using the update_policy_groups_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_policy_groups_with_http_info(id, body) + +```ruby +begin + # Update Image Assessment Policy Group entities + data, status_code, headers = api_instance.update_policy_groups_with_http_info(id, body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policy_groups_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | Policy Image Group entity UUID | | +| **body** | [**ModelsPatchImageGroupRequest**](ModelsPatchImageGroupRequest.md) | | | + +### Return type + +[**ModelsPolicyGroupEntityResponse**](ModelsPolicyGroupEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## update_policy_precedence + +> update_policy_precedence(body) + +Update Image Assessment Policy 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::ImageAssessmentPoliciesApi.new +body = Falcon::ModelsAPIPrecedenceRequest.new({precedence: ['precedence_example']}) # ModelsAPIPrecedenceRequest | + +begin + # Update Image Assessment Policy precedence + result = api_instance.update_policy_precedence(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policy_precedence: #{e}" +end +``` + +#### 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_with_http_info(body) + +```ruby +begin + # Update Image Assessment Policy precedence + data, status_code, headers = api_instance.update_policy_precedence_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling ImageAssessmentPoliciesApi->update_policy_precedence_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ModelsAPIPrecedenceRequest**](ModelsAPIPrecedenceRequest.md) | | | + +### Return type + +[**ModelsPolicyEntityResponse**](ModelsPolicyEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/ImagesApiCombinedImageExport.md b/docs/ImagesApiCombinedImageExport.md new file mode 100644 index 00000000..e88bf8c3 --- /dev/null +++ b/docs/ImagesApiCombinedImageExport.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiCombinedImageExport + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIImageCombinedExport>**](ModelsAPIImageCombinedExport.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiCombinedImageExport.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiCustomerAndImage.md b/docs/ImagesApiCustomerAndImage.md new file mode 100644 index 00000000..a835c28d --- /dev/null +++ b/docs/ImagesApiCustomerAndImage.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiCustomerAndImage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPICustomerAndImage>**](ModelsAPICustomerAndImage.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiCustomerAndImage.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiImageAssessmentHistory.md b/docs/ImagesApiImageAssessmentHistory.md new file mode 100644 index 00000000..b0d6e30b --- /dev/null +++ b/docs/ImagesApiImageAssessmentHistory.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiImageAssessmentHistory + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIImageAssessmentHistory>**](ModelsAPIImageAssessmentHistory.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiImageAssessmentHistory.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiImageByVulnerabilityCount.md b/docs/ImagesApiImageByVulnerabilityCount.md new file mode 100644 index 00000000..60761d13 --- /dev/null +++ b/docs/ImagesApiImageByVulnerabilityCount.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiImageByVulnerabilityCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIImageByVulnerabilityCount>**](ModelsAPIImageByVulnerabilityCount.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiImageByVulnerabilityCount.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiImageCount.md b/docs/ImagesApiImageCount.md new file mode 100644 index 00000000..c5473aa2 --- /dev/null +++ b/docs/ImagesApiImageCount.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiImageCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIImageCount>**](ModelsAPIImageCount.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiImageCount.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiImageCountByBaseOS.md b/docs/ImagesApiImageCountByBaseOS.md new file mode 100644 index 00000000..5c0934ca --- /dev/null +++ b/docs/ImagesApiImageCountByBaseOS.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiImageCountByBaseOS + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiImageCountByBaseOS.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiImageCountByState.md b/docs/ImagesApiImageCountByState.md new file mode 100644 index 00000000..02f36f81 --- /dev/null +++ b/docs/ImagesApiImageCountByState.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiImageCountByState + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiImageCountByState.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiImageIssuesSummary.md b/docs/ImagesApiImageIssuesSummary.md new file mode 100644 index 00000000..948be2d6 --- /dev/null +++ b/docs/ImagesApiImageIssuesSummary.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiImageIssuesSummary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIImageIssuesSummary>**](ModelsAPIImageIssuesSummary.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiImageIssuesSummary.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ImagesApiImageVulnerabilitiesSummary.md b/docs/ImagesApiImageVulnerabilitiesSummary.md new file mode 100644 index 00000000..c9d92a06 --- /dev/null +++ b/docs/ImagesApiImageVulnerabilitiesSummary.md @@ -0,0 +1,22 @@ +# Falcon::ImagesApiImageVulnerabilitiesSummary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIImageVulnerabilitiesSummary>**](ModelsAPIImageVulnerabilitiesSummary.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ImagesApiImageVulnerabilitiesSummary.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/InstallationTokensApi.md b/docs/InstallationTokensApi.md index 25a9cd54..83fb3ce1 100644 --- a/docs/InstallationTokensApi.md +++ b/docs/InstallationTokensApi.md @@ -16,7 +16,7 @@ All URIs are relative to *https://api.crowdstrike.com* ## audit_events_query -> audit_events_query(opts) +> audit_events_query(opts) Search for audit events by providing an FQL filter and paging details. @@ -54,7 +54,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> audit_events_query_with_http_info(opts) +> , Integer, Hash)> audit_events_query_with_http_info(opts) ```ruby begin @@ -62,7 +62,7 @@ begin data, status_code, headers = api_instance.audit_events_query_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling InstallationTokensApi->audit_events_query_with_http_info: #{e}" end @@ -79,7 +79,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -299,7 +299,7 @@ end ## tokens_delete -> tokens_delete(ids) +> tokens_delete(ids) Deletes a token immediately. To revoke a token, use PATCH /installation-tokens/entities/tokens/v1 instead. @@ -332,7 +332,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> tokens_delete_with_http_info(ids) +> , Integer, Hash)> tokens_delete_with_http_info(ids) ```ruby begin @@ -340,7 +340,7 @@ begin data, status_code, headers = api_instance.tokens_delete_with_http_info(ids) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling InstallationTokensApi->tokens_delete_with_http_info: #{e}" end @@ -354,7 +354,7 @@ end ### Return type -[**MsaReplyMetaOnly**](MsaReplyMetaOnly.md) +[**MsaspecResponseFields**](MsaspecResponseFields.md) ### Authorization @@ -368,7 +368,7 @@ end ## tokens_query -> tokens_query(opts) +> tokens_query(opts) Search for tokens by providing an FQL filter and paging details. @@ -406,7 +406,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> tokens_query_with_http_info(opts) +> , Integer, Hash)> tokens_query_with_http_info(opts) ```ruby begin @@ -414,7 +414,7 @@ begin data, status_code, headers = api_instance.tokens_query_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling InstallationTokensApi->tokens_query_with_http_info: #{e}" end @@ -431,7 +431,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -516,7 +516,7 @@ end ## tokens_update -> tokens_update(ids, body) +> tokens_update(ids, body) Updates one or more tokens. Use this endpoint to edit labels, change expiration, revoke, or restore. @@ -550,7 +550,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> tokens_update_with_http_info(ids, body) +> , Integer, Hash)> tokens_update_with_http_info(ids, body) ```ruby begin @@ -558,7 +558,7 @@ begin data, status_code, headers = api_instance.tokens_update_with_http_info(ids, body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling InstallationTokensApi->tokens_update_with_http_info: #{e}" end @@ -573,7 +573,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization diff --git a/docs/InstallationTokensSettingsApi.md b/docs/InstallationTokensSettingsApi.md index 0662e887..76d37ed3 100644 --- a/docs/InstallationTokensSettingsApi.md +++ b/docs/InstallationTokensSettingsApi.md @@ -9,7 +9,7 @@ All URIs are relative to *https://api.crowdstrike.com* ## customer_settings_update -> customer_settings_update(body) +> customer_settings_update(body) Update installation token settings. @@ -42,7 +42,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> customer_settings_update_with_http_info(body) +> , Integer, Hash)> customer_settings_update_with_http_info(body) ```ruby begin @@ -50,7 +50,7 @@ begin data, status_code, headers = api_instance.customer_settings_update_with_http_info(body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling InstallationTokensSettingsApi->customer_settings_update_with_http_info: #{e}" end @@ -64,7 +64,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization diff --git a/docs/IntelApi.md b/docs/IntelApi.md index ec3f0f33..c9da09f7 100644 --- a/docs/IntelApi.md +++ b/docs/IntelApi.md @@ -1090,7 +1090,7 @@ opts = { offset: 56, # Integer | Set the starting row number to return reports from. Defaults to 0. limit: 56, # Integer | Set the number of reports to return. The value must be between 1 and 5000. sort: 'sort_example', # String | Order fields in ascending or descending order. Ex: created_date|asc. - filter: 'filter_example', # String | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + filter: 'filter_example', # String | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. q: 'q_example', # String | Perform a generic substring search across all fields. fields: ['inner_example'] # Array | The fields to return, or a predefined set of fields in the form of the collection name surrounded by two underscores like: \\_\\_\\\\_\\_. Ex: slug \\_\\_full\\_\\_. Defaults to \\_\\_basic\\_\\_. } @@ -1129,7 +1129,7 @@ end | **offset** | **Integer** | Set the starting row number to return reports from. Defaults to 0. | [optional] | | **limit** | **Integer** | Set the number of reports to return. The value must be between 1 and 5000. | [optional] | | **sort** | **String** | Order fields in ascending or descending order. Ex: created_date|asc. | [optional] | -| **filter** | **String** | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. | [optional] | +| **filter** | **String** | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. | [optional] | | **q** | **String** | Perform a generic substring search across all fields. | [optional] | | **fields** | [**Array<String>**](String.md) | The fields to return, or a predefined set of fields in the form of the collection name surrounded by two underscores like: \\_\\_\\<collection\\>\\_\\_. Ex: slug \\_\\_full\\_\\_. Defaults to \\_\\_basic\\_\\_. | [optional] | @@ -1171,7 +1171,7 @@ opts = { offset: 56, # Integer | Set the starting row number to return report IDs from. Defaults to 0. limit: 56, # Integer | Set the number of report IDs to return. The value must be between 1 and 5000. sort: 'sort_example', # String | Order fields in ascending or descending order. Ex: created_date|asc. - filter: 'filter_example', # String | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + filter: 'filter_example', # String | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. q: 'q_example' # String | Perform a generic substring search across all fields. } @@ -1209,7 +1209,7 @@ end | **offset** | **Integer** | Set the starting row number to return report IDs from. Defaults to 0. | [optional] | | **limit** | **Integer** | Set the number of report IDs to return. The value must be between 1 and 5000. | [optional] | | **sort** | **String** | Order fields in ascending or descending order. Ex: created_date|asc. | [optional] | -| **filter** | **String** | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. | [optional] | +| **filter** | **String** | Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. | [optional] | | **q** | **String** | Perform a generic substring search across all fields. | [optional] | ### Return type diff --git a/docs/InternalSensorStatus.md b/docs/InternalSensorStatus.md index 314de0a5..29d00b23 100644 --- a/docs/InternalSensorStatus.md +++ b/docs/InternalSensorStatus.md @@ -10,9 +10,17 @@ | **hostname** | **String** | | [optional] | | **idp_policy_id** | **String** | | [optional] | | **idp_policy_name** | **String** | | [optional] | +| **kerberos_config** | **String** | | [optional] | +| **ldap_config** | **String** | | [optional] | +| **ldaps_config** | **String** | | [optional] | | **local_ip** | **String** | | [optional] | | **machine_domain** | **String** | | [optional] | +| **ntlm_config** | **String** | | [optional] | | **os_version** | **String** | | [optional] | +| **rdp_to_dc_config** | **String** | | [optional] | +| **smb_to_dc_config** | **String** | | [optional] | +| **status** | **String** | | [optional] | +| **status_causes** | **Array<String>** | | [optional] | | **ti_enabled** | **String** | | [optional] | ## Example @@ -27,9 +35,17 @@ instance = Falcon::InternalSensorStatus.new( hostname: null, idp_policy_id: null, idp_policy_name: null, + kerberos_config: null, + ldap_config: null, + ldaps_config: null, local_ip: null, machine_domain: null, + ntlm_config: null, os_version: null, + rdp_to_dc_config: null, + smb_to_dc_config: null, + status: null, + status_causes: null, ti_enabled: null ) ``` diff --git a/docs/InventoriesApi.md b/docs/InventoriesApi.md deleted file mode 100644 index a4db4bc0..00000000 --- a/docs/InventoriesApi.md +++ /dev/null @@ -1,77 +0,0 @@ -# Falcon::InventoriesApi - -All URIs are relative to *https://api.crowdstrike.com* - -| Method | HTTP request | Description | -| ------ | ------------ | ----------- | -| [**create_inventory**](InventoriesApi.md#create_inventory) | **POST** /snapshots/entities/inventories/v1 | Create inventory from data received from snapshot | - - -## create_inventory - -> create_inventory(body) - -Create inventory from data received from snapshot - -### 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::InventoriesApi.new -body = Falcon::ModelsSnapshotInventoryPayload.new({job_metadata: Falcon::ModelsJobMetaData.new({cloud_provider: 'cloud_provider_example', instance_id: 'instance_id_example', job_end_time: Time.now, job_id: 'job_id_example', job_start_time: Time.now, message: 'message_example', scanner_version: 'scanner_version_example', status: 'status_example'}), results: Falcon::ModelsScanResults.new({applications: [Falcon::ModelsSnapshotInventoryApplication.new({major_version: 'major_version_example', package_hash: 'package_hash_example', package_provider: 'package_provider_example', package_source: 'package_source_example', path: 'path_example', product: 'product_example', software_architecture: 'software_architecture_example', type: 'type_example', vendor: 'vendor_example'})], os_version: 'os_version_example'})}) # ModelsSnapshotInventoryPayload | - -begin - # Create inventory from data received from snapshot - result = api_instance.create_inventory(body) - p result -rescue Falcon::ApiError => e - puts "Error when calling InventoriesApi->create_inventory: #{e}" -end -``` - -#### Using the create_inventory_with_http_info variant - -This returns an Array which contains the response data, status code and headers. - -> , Integer, Hash)> create_inventory_with_http_info(body) - -```ruby -begin - # Create inventory from data received from snapshot - data, status_code, headers = api_instance.create_inventory_with_http_info(body) - p status_code # => 2xx - p headers # => { ... } - p data # => -rescue Falcon::ApiError => e - puts "Error when calling InventoriesApi->create_inventory_with_http_info: #{e}" -end -``` - -### Parameters - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **body** | [**ModelsSnapshotInventoryPayload**](ModelsSnapshotInventoryPayload.md) | | | - -### Return type - -[**CommonEntitiesResponse**](CommonEntitiesResponse.md) - -### Authorization - -**oauth2** - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - diff --git a/docs/IocApi.md b/docs/IocApi.md index 1d62068d..8f5564a8 100644 --- a/docs/IocApi.md +++ b/docs/IocApi.md @@ -11,6 +11,9 @@ All URIs are relative to *https://api.crowdstrike.com* | [**indicator_combined_v1**](IocApi.md#indicator_combined_v1) | **GET** /iocs/combined/indicator/v1 | Get Combined for Indicators. | | [**indicator_create_v1**](IocApi.md#indicator_create_v1) | **POST** /iocs/entities/indicators/v1 | Create Indicators. | | [**indicator_delete_v1**](IocApi.md#indicator_delete_v1) | **DELETE** /iocs/entities/indicators/v1 | Delete Indicators by ids. | +| [**indicator_get_device_count_v1**](IocApi.md#indicator_get_device_count_v1) | **GET** /iocs/aggregates/indicators/device-count/v1 | Get the number of devices the indicator has run on | +| [**indicator_get_devices_ran_on_v1**](IocApi.md#indicator_get_devices_ran_on_v1) | **GET** /iocs/queries/indicators/devices/v1 | Get the IDs of devices the indicator has run on | +| [**indicator_get_processes_ran_on_v1**](IocApi.md#indicator_get_processes_ran_on_v1) | **GET** /iocs/queries/indicators/processes/v1 | Get the number of processes the indicator has run on | | [**indicator_get_v1**](IocApi.md#indicator_get_v1) | **GET** /iocs/entities/indicators/v1 | Get Indicators by ids. | | [**indicator_search_v1**](IocApi.md#indicator_search_v1) | **GET** /iocs/queries/indicators/v1 | Search for Indicators. | | [**indicator_update_v1**](IocApi.md#indicator_update_v1) | **PATCH** /iocs/entities/indicators/v1 | Update Indicators. | @@ -540,6 +543,233 @@ end - **Accept**: application/json +## indicator_get_device_count_v1 + +> indicator_get_device_count_v1(type, value) + +Get the number of devices the indicator has run 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::IocApi.new +type = 'type_example' # String | The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. +value = 'value_example' # String | The string representation of the indicator + +begin + # Get the number of devices the indicator has run on + result = api_instance.indicator_get_device_count_v1(type, value) + p result +rescue Falcon::ApiError => e + puts "Error when calling IocApi->indicator_get_device_count_v1: #{e}" +end +``` + +#### Using the indicator_get_device_count_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> indicator_get_device_count_v1_with_http_info(type, value) + +```ruby +begin + # Get the number of devices the indicator has run on + data, status_code, headers = api_instance.indicator_get_device_count_v1_with_http_info(type, value) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling IocApi->indicator_get_device_count_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. | | +| **value** | **String** | The string representation of the indicator | | + +### Return type + +[**ApiDeviceCountRespV1**](ApiDeviceCountRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## indicator_get_devices_ran_on_v1 + +> indicator_get_devices_ran_on_v1(type, value, opts) + +Get the IDs of devices the indicator has run 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::IocApi.new +type = 'type_example' # String | The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. +value = 'value_example' # String | The string representation of the indicator +opts = { + limit: 'limit_example', # String | The maximum number of results to return. Use with the offset parameter to manage pagination of results. + offset: 'offset_example' # String | The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. +} + +begin + # Get the IDs of devices the indicator has run on + result = api_instance.indicator_get_devices_ran_on_v1(type, value, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling IocApi->indicator_get_devices_ran_on_v1: #{e}" +end +``` + +#### Using the indicator_get_devices_ran_on_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> indicator_get_devices_ran_on_v1_with_http_info(type, value, opts) + +```ruby +begin + # Get the IDs of devices the indicator has run on + data, status_code, headers = api_instance.indicator_get_devices_ran_on_v1_with_http_info(type, value, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling IocApi->indicator_get_devices_ran_on_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. | | +| **value** | **String** | The string representation of the indicator | | +| **limit** | **String** | The maximum number of results to return. Use with the offset parameter to manage pagination of results. | [optional] | +| **offset** | **String** | The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. | [optional] | + +### Return type + +[**ApiDevicesRanOnRespV1**](ApiDevicesRanOnRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## indicator_get_processes_ran_on_v1 + +> indicator_get_processes_ran_on_v1(type, value, device_id, opts) + +Get the number of processes the indicator has run 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::IocApi.new +type = 'type_example' # String | The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. +value = 'value_example' # String | The string representation of the indicator +device_id = 'device_id_example' # String | Specify a host's ID to return only processes from that host. Get a host's ID from GET /devices/queries/devices/v1, the Falcon console, or the Streaming API. +opts = { + limit: 'limit_example', # String | The maximum number of results to return. Use with the offset parameter to manage pagination of results. + offset: 'offset_example' # String | The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. +} + +begin + # Get the number of processes the indicator has run on + result = api_instance.indicator_get_processes_ran_on_v1(type, value, device_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling IocApi->indicator_get_processes_ran_on_v1: #{e}" +end +``` + +#### Using the indicator_get_processes_ran_on_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> indicator_get_processes_ran_on_v1_with_http_info(type, value, device_id, opts) + +```ruby +begin + # Get the number of processes the indicator has run on + data, status_code, headers = api_instance.indicator_get_processes_ran_on_v1_with_http_info(type, value, device_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling IocApi->indicator_get_processes_ran_on_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. | | +| **value** | **String** | The string representation of the indicator | | +| **device_id** | **String** | Specify a host's ID to return only processes from that host. Get a host's ID from GET /devices/queries/devices/v1, the Falcon console, or the Streaming API. | | +| **limit** | **String** | The maximum number of results to return. Use with the offset parameter to manage pagination of results. | [optional] | +| **offset** | **String** | The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. | [optional] | + +### Return type + +[**ApiProcessesRanOnRespV1**](ApiProcessesRanOnRespV1.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## indicator_get_v1 > indicator_get_v1(ids) diff --git a/docs/JsonschemaAuthorization.md b/docs/JsonschemaAuthorization.md new file mode 100644 index 00000000..1adba020 --- /dev/null +++ b/docs/JsonschemaAuthorization.md @@ -0,0 +1,24 @@ +# Falcon::JsonschemaAuthorization + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **api_scope** | **String** | | [optional] | +| **complex_permissions** | [**JsonschemaComplexPermissions**](JsonschemaComplexPermissions.md) | | | +| **feature_flag** | **String** | | | +| **permissions** | [**Array<JsonschemaPermission>**](JsonschemaPermission.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaAuthorization.new( + api_scope: null, + complex_permissions: null, + feature_flag: null, + permissions: null +) +``` + diff --git a/docs/JsonschemaCollectionIndexField.md b/docs/JsonschemaCollectionIndexField.md new file mode 100644 index 00000000..26a42d46 --- /dev/null +++ b/docs/JsonschemaCollectionIndexField.md @@ -0,0 +1,22 @@ +# Falcon::JsonschemaCollectionIndexField + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **field** | **String** | | | +| **fql_name** | **String** | | | +| **type** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaCollectionIndexField.new( + field: null, + fql_name: null, + type: null +) +``` + diff --git a/docs/JsonschemaComplexPermissions.md b/docs/JsonschemaComplexPermissions.md new file mode 100644 index 00000000..e6afbf49 --- /dev/null +++ b/docs/JsonschemaComplexPermissions.md @@ -0,0 +1,18 @@ +# Falcon::JsonschemaComplexPermissions + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_or** | [**Array<JsonschemaComplexPermissionsOR>**](JsonschemaComplexPermissionsOR.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaComplexPermissions.new( + _or: null +) +``` + diff --git a/docs/JsonschemaComplexPermissionsOR.md b/docs/JsonschemaComplexPermissionsOR.md new file mode 100644 index 00000000..f4be3caa --- /dev/null +++ b/docs/JsonschemaComplexPermissionsOR.md @@ -0,0 +1,18 @@ +# Falcon::JsonschemaComplexPermissionsOR + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **_and** | [**Array<JsonschemaPermission>**](JsonschemaPermission.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaComplexPermissionsOR.new( + _and: null +) +``` + diff --git a/docs/JsonschemaConditionGroupFields.md b/docs/JsonschemaConditionGroupFields.md new file mode 100644 index 00000000..36558ac8 --- /dev/null +++ b/docs/JsonschemaConditionGroupFields.md @@ -0,0 +1,26 @@ +# Falcon::JsonschemaConditionGroupFields + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **condition_control** | **Boolean** | | [optional] | +| **control_name** | **String** | | [optional] | +| **controller** | **Boolean** | | [optional] | +| **dependent_control** | **String** | | [optional] | +| **reset_fields** | [**JsonschemaResetFields**](JsonschemaResetFields.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaConditionGroupFields.new( + condition_control: null, + control_name: null, + controller: null, + dependent_control: null, + reset_fields: null +) +``` + diff --git a/docs/JsonschemaPermission.md b/docs/JsonschemaPermission.md new file mode 100644 index 00000000..68b84b1e --- /dev/null +++ b/docs/JsonschemaPermission.md @@ -0,0 +1,20 @@ +# Falcon::JsonschemaPermission + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action** | **String** | | | +| **resource** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaPermission.new( + action: null, + resource: null +) +``` + diff --git a/docs/JsonschemaPivot.md b/docs/JsonschemaPivot.md new file mode 100644 index 00000000..22b60398 --- /dev/null +++ b/docs/JsonschemaPivot.md @@ -0,0 +1,34 @@ +# Falcon::JsonschemaPivot + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **case_sensitive** | **Boolean** | | [optional] | +| **entity** | **String** | | [optional] | +| **entity_value** | **String** | | [optional] | +| **query_string** | **String** | | [optional] | +| **searchable** | **Boolean** | | [optional] | +| **sort_by_display** | **Boolean** | | [optional] | +| **sort_by_value** | **Boolean** | | [optional] | +| **sort_desc** | **Boolean** | | [optional] | +| **strict** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaPivot.new( + case_sensitive: null, + entity: null, + entity_value: null, + query_string: null, + searchable: null, + sort_by_display: null, + sort_by_value: null, + sort_desc: null, + strict: null +) +``` + diff --git a/docs/JsonschemaResetFields.md b/docs/JsonschemaResetFields.md new file mode 100644 index 00000000..ffdf49b8 --- /dev/null +++ b/docs/JsonschemaResetFields.md @@ -0,0 +1,18 @@ +# Falcon::JsonschemaResetFields + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **fields** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaResetFields.new( + fields: null +) +``` + diff --git a/docs/JsonschemaSchema.md b/docs/JsonschemaSchema.md new file mode 100644 index 00000000..69a4431e --- /dev/null +++ b/docs/JsonschemaSchema.md @@ -0,0 +1,20 @@ +# Falcon::JsonschemaSchema + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **sub_schema** | [**JsonschemaSubSchema**](JsonschemaSubSchema.md) | | | +| **definitions** | [**Hash<String, JsonschemaSubSchema>**](JsonschemaSubSchema.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaSchema.new( + sub_schema: null, + definitions: null +) +``` + diff --git a/docs/JsonschemaSignalsExtensions.md b/docs/JsonschemaSignalsExtensions.md new file mode 100644 index 00000000..c08e1c3b --- /dev/null +++ b/docs/JsonschemaSignalsExtensions.md @@ -0,0 +1,22 @@ +# Falcon::JsonschemaSignalsExtensions + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enum_wrapper** | **Boolean** | | [optional] | +| **example_display_map** | **Hash<String, String>** | | [optional] | +| **path_name** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaSignalsExtensions.new( + enum_wrapper: null, + example_display_map: null, + path_name: null +) +``` + diff --git a/docs/JsonschemaSubSchema.md b/docs/JsonschemaSubSchema.md new file mode 100644 index 00000000..35dbf016 --- /dev/null +++ b/docs/JsonschemaSubSchema.md @@ -0,0 +1,134 @@ +# Falcon::JsonschemaSubSchema + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ref** | **String** | | [optional] | +| **schema** | **String** | | [optional] | +| **additional_items** | **String** | | [optional] | +| **additional_properties** | **String** | | [optional] | +| **all_of** | [**Array<JsonschemaSubSchema>**](JsonschemaSubSchema.md) | | [optional] | +| **any_of** | [**Array<JsonschemaSubSchema>**](JsonschemaSubSchema.md) | | [optional] | +| **binary_encoding** | **String** | | [optional] | +| **const** | **Object** | | [optional] | +| **default** | **Object** | | [optional] | +| **dependencies** | [**Hash<String, JsonschemaSubSchema>**](JsonschemaSubSchema.md) | | [optional] | +| **deprecated** | **Boolean** | | [optional] | +| **description** | **String** | | [optional] | +| **_else** | [**JsonschemaSubSchema**](JsonschemaSubSchema.md) | | [optional] | +| **enum** | **Array<Object>** | | [optional] | +| **error_message** | **String** | | [optional] | +| **examples** | **Array<Object>** | | [optional] | +| **exclusive_maximum** | **Boolean** | | [optional] | +| **exclusive_minimum** | **Boolean** | | [optional] | +| **format** | **String** | | [optional] | +| **_if** | [**JsonschemaSubSchema**](JsonschemaSubSchema.md) | | [optional] | +| **items** | [**JsonschemaSubSchema**](JsonschemaSubSchema.md) | | [optional] | +| **max_items** | **Integer** | | [optional] | +| **max_length** | **Integer** | | [optional] | +| **max_properties** | **Integer** | | [optional] | +| **maximum** | **Integer** | | [optional] | +| **media** | [**JsonschemaSubSchema**](JsonschemaSubSchema.md) | | [optional] | +| **min_items** | **Integer** | | [optional] | +| **min_length** | **Integer** | | [optional] | +| **min_properties** | **Integer** | | [optional] | +| **minimum** | **Integer** | | [optional] | +| **multiple_of** | **Integer** | | [optional] | +| **_not** | [**JsonschemaSubSchema**](JsonschemaSubSchema.md) | | [optional] | +| **one_of** | [**Array<JsonschemaSubSchema>**](JsonschemaSubSchema.md) | | [optional] | +| **pattern** | **String** | | [optional] | +| **pattern_properties** | [**Hash<String, JsonschemaSubSchema>**](JsonschemaSubSchema.md) | | [optional] | +| **properties** | [**Hash<String, JsonschemaSubSchema>**](JsonschemaSubSchema.md) | | [optional] | +| **required** | **Array<String>** | | [optional] | +| **_then** | [**JsonschemaSubSchema**](JsonschemaSubSchema.md) | | [optional] | +| **title** | **String** | | [optional] | +| **type** | **String** | | [optional] | +| **uicomponent** | **String** | | [optional] | +| **unique_items** | **Boolean** | | [optional] | +| **x_cs_authorization** | [**JsonschemaAuthorization**](JsonschemaAuthorization.md) | | [optional] | +| **x_cs_can_create** | **Boolean** | | [optional] | +| **x_cs_condition_group_fields** | [**JsonschemaConditionGroupFields**](JsonschemaConditionGroupFields.md) | | [optional] | +| **x_cs_do_not_hide** | **Boolean** | | [optional] | +| **x_cs_indexable** | **Boolean** | | [optional] | +| **x_cs_indexable_fields** | [**Array<JsonschemaCollectionIndexField>**](JsonschemaCollectionIndexField.md) | | [optional] | +| **x_cs_max_duration** | **Integer** | | [optional] | +| **x_cs_min_duration** | **Integer** | | [optional] | +| **x_cs_not_parameterizable** | **Boolean** | | [optional] | +| **x_cs_order** | **Array<String>** | | [optional] | +| **x_cs_pivot** | [**JsonschemaPivot**](JsonschemaPivot.md) | | [optional] | +| **x_cs_signals** | [**JsonschemaSignalsExtensions**](JsonschemaSignalsExtensions.md) | | [optional] | +| **x_cs_signals_category** | **String** | | [optional] | +| **x_cs_signals_operators** | **Array<String>** | | [optional] | +| **x_cs_signals_sub_category** | **String** | | [optional] | +| **x_cs_tags** | **Array<String>** | | [optional] | +| **x_cs_workflow** | [**JsonschemaWorkflowExtensions**](JsonschemaWorkflowExtensions.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaSubSchema.new( + ref: null, + schema: null, + additional_items: null, + additional_properties: null, + all_of: null, + any_of: null, + binary_encoding: null, + const: null, + default: null, + dependencies: null, + deprecated: null, + description: null, + _else: null, + enum: null, + error_message: null, + examples: null, + exclusive_maximum: null, + exclusive_minimum: null, + format: null, + _if: null, + items: null, + max_items: null, + max_length: null, + max_properties: null, + maximum: null, + media: null, + min_items: null, + min_length: null, + min_properties: null, + minimum: null, + multiple_of: null, + _not: null, + one_of: null, + pattern: null, + pattern_properties: null, + properties: null, + required: null, + _then: null, + title: null, + type: null, + uicomponent: null, + unique_items: null, + x_cs_authorization: null, + x_cs_can_create: null, + x_cs_condition_group_fields: null, + x_cs_do_not_hide: null, + x_cs_indexable: null, + x_cs_indexable_fields: null, + x_cs_max_duration: null, + x_cs_min_duration: null, + x_cs_not_parameterizable: null, + x_cs_order: null, + x_cs_pivot: null, + x_cs_signals: null, + x_cs_signals_category: null, + x_cs_signals_operators: null, + x_cs_signals_sub_category: null, + x_cs_tags: null, + x_cs_workflow: null +) +``` + diff --git a/docs/JsonschemaWorkflowExtensions.md b/docs/JsonschemaWorkflowExtensions.md new file mode 100644 index 00000000..0a12a578 --- /dev/null +++ b/docs/JsonschemaWorkflowExtensions.md @@ -0,0 +1,28 @@ +# Falcon::JsonschemaWorkflowExtensions + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **node_id** | **String** | | [optional] | +| **system** | **Boolean** | | [optional] | +| **tags** | **Array<String>** | | [optional] | +| **x_cs_no_variable_injection** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::JsonschemaWorkflowExtensions.new( + description: null, + name: null, + node_id: null, + system: null, + tags: null, + x_cs_no_variable_injection: null +) +``` + diff --git a/docs/K8sassetsClusterEnrichmentData.md b/docs/K8sassetsClusterEnrichmentData.md new file mode 100644 index 00000000..e97af7d2 --- /dev/null +++ b/docs/K8sassetsClusterEnrichmentData.md @@ -0,0 +1,22 @@ +# Falcon::K8sassetsClusterEnrichmentData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **container_count** | **Integer** | | | +| **node_count** | **Integer** | | | +| **pod_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsClusterEnrichmentData.new( + container_count: null, + node_count: null, + pod_count: null +) +``` + diff --git a/docs/K8sassetsClusterEnrichmentEntry.md b/docs/K8sassetsClusterEnrichmentEntry.md new file mode 100644 index 00000000..33c43280 --- /dev/null +++ b/docs/K8sassetsClusterEnrichmentEntry.md @@ -0,0 +1,20 @@ +# Falcon::K8sassetsClusterEnrichmentEntry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cluster_id** | **String** | | | +| **enrichment_data** | [**K8sassetsClusterEnrichmentData**](K8sassetsClusterEnrichmentData.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsClusterEnrichmentEntry.new( + cluster_id: null, + enrichment_data: null +) +``` + diff --git a/docs/K8sassetsClusterEnrichmentResponse.md b/docs/K8sassetsClusterEnrichmentResponse.md new file mode 100644 index 00000000..5c669cb3 --- /dev/null +++ b/docs/K8sassetsClusterEnrichmentResponse.md @@ -0,0 +1,22 @@ +# Falcon::K8sassetsClusterEnrichmentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enrichment_data** | [**Array<K8sassetsClusterEnrichmentEntry>**](K8sassetsClusterEnrichmentEntry.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsClusterEnrichmentResponse.new( + enrichment_data: null, + errors: null, + meta: null +) +``` + diff --git a/docs/K8sassetsContainerEnrichmentData.md b/docs/K8sassetsContainerEnrichmentData.md new file mode 100644 index 00000000..91bc8768 --- /dev/null +++ b/docs/K8sassetsContainerEnrichmentData.md @@ -0,0 +1,18 @@ +# Falcon::K8sassetsContainerEnrichmentData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **agents** | **Array<Hash>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsContainerEnrichmentData.new( + agents: null +) +``` + diff --git a/docs/K8sassetsContainerEnrichmentEntry.md b/docs/K8sassetsContainerEnrichmentEntry.md new file mode 100644 index 00000000..bc7da16f --- /dev/null +++ b/docs/K8sassetsContainerEnrichmentEntry.md @@ -0,0 +1,20 @@ +# Falcon::K8sassetsContainerEnrichmentEntry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **container_id** | **String** | | | +| **enrichment_data** | [**K8sassetsContainerEnrichmentData**](K8sassetsContainerEnrichmentData.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsContainerEnrichmentEntry.new( + container_id: null, + enrichment_data: null +) +``` + diff --git a/docs/K8sassetsContainerEnrichmentResponse.md b/docs/K8sassetsContainerEnrichmentResponse.md new file mode 100644 index 00000000..19e786ba --- /dev/null +++ b/docs/K8sassetsContainerEnrichmentResponse.md @@ -0,0 +1,22 @@ +# Falcon::K8sassetsContainerEnrichmentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enrichment_data** | [**Array<K8sassetsContainerEnrichmentEntry>**](K8sassetsContainerEnrichmentEntry.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsContainerEnrichmentResponse.new( + enrichment_data: null, + errors: null, + meta: null +) +``` + diff --git a/docs/K8sassetsContainerInfo.md b/docs/K8sassetsContainerInfo.md new file mode 100644 index 00000000..98ea5ffb --- /dev/null +++ b/docs/K8sassetsContainerInfo.md @@ -0,0 +1,20 @@ +# Falcon::K8sassetsContainerInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | | +| **name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsContainerInfo.new( + id: null, + name: null +) +``` + diff --git a/docs/K8sassetsDeploymentEnrichmentData.md b/docs/K8sassetsDeploymentEnrichmentData.md new file mode 100644 index 00000000..4f9b42f8 --- /dev/null +++ b/docs/K8sassetsDeploymentEnrichmentData.md @@ -0,0 +1,18 @@ +# Falcon::K8sassetsDeploymentEnrichmentData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **pod_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsDeploymentEnrichmentData.new( + pod_count: null +) +``` + diff --git a/docs/K8sassetsDeploymentEnrichmentEntry.md b/docs/K8sassetsDeploymentEnrichmentEntry.md new file mode 100644 index 00000000..adec7301 --- /dev/null +++ b/docs/K8sassetsDeploymentEnrichmentEntry.md @@ -0,0 +1,20 @@ +# Falcon::K8sassetsDeploymentEnrichmentEntry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **deployment_id** | **String** | | | +| **enrichment_data** | [**K8sassetsDeploymentEnrichmentData**](K8sassetsDeploymentEnrichmentData.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsDeploymentEnrichmentEntry.new( + deployment_id: null, + enrichment_data: null +) +``` + diff --git a/docs/K8sassetsDeploymentEnrichmentResponse.md b/docs/K8sassetsDeploymentEnrichmentResponse.md new file mode 100644 index 00000000..1c689ad7 --- /dev/null +++ b/docs/K8sassetsDeploymentEnrichmentResponse.md @@ -0,0 +1,22 @@ +# Falcon::K8sassetsDeploymentEnrichmentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enrichment_data** | [**Array<K8sassetsDeploymentEnrichmentEntry>**](K8sassetsDeploymentEnrichmentEntry.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsDeploymentEnrichmentResponse.new( + enrichment_data: null, + errors: null, + meta: null +) +``` + diff --git a/docs/K8sassetsNodeEnrichmentData.md b/docs/K8sassetsNodeEnrichmentData.md new file mode 100644 index 00000000..a1f41112 --- /dev/null +++ b/docs/K8sassetsNodeEnrichmentData.md @@ -0,0 +1,20 @@ +# Falcon::K8sassetsNodeEnrichmentData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **container_count** | **Integer** | | | +| **pod_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsNodeEnrichmentData.new( + container_count: null, + pod_count: null +) +``` + diff --git a/docs/K8sassetsNodeEnrichmentEntry.md b/docs/K8sassetsNodeEnrichmentEntry.md new file mode 100644 index 00000000..ebd44f06 --- /dev/null +++ b/docs/K8sassetsNodeEnrichmentEntry.md @@ -0,0 +1,20 @@ +# Falcon::K8sassetsNodeEnrichmentEntry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enrichment_data** | [**K8sassetsNodeEnrichmentData**](K8sassetsNodeEnrichmentData.md) | | | +| **node_name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsNodeEnrichmentEntry.new( + enrichment_data: null, + node_name: null +) +``` + diff --git a/docs/K8sassetsNodeEnrichmentResponse.md b/docs/K8sassetsNodeEnrichmentResponse.md new file mode 100644 index 00000000..c0117736 --- /dev/null +++ b/docs/K8sassetsNodeEnrichmentResponse.md @@ -0,0 +1,22 @@ +# Falcon::K8sassetsNodeEnrichmentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enrichment_data** | [**Array<K8sassetsNodeEnrichmentEntry>**](K8sassetsNodeEnrichmentEntry.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsNodeEnrichmentResponse.new( + enrichment_data: null, + errors: null, + meta: null +) +``` + diff --git a/docs/K8sassetsPodEnrichmentData.md b/docs/K8sassetsPodEnrichmentData.md new file mode 100644 index 00000000..e0785a00 --- /dev/null +++ b/docs/K8sassetsPodEnrichmentData.md @@ -0,0 +1,22 @@ +# Falcon::K8sassetsPodEnrichmentData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **container_count** | **Integer** | | | +| **container_info** | [**Array<K8sassetsContainerInfo>**](K8sassetsContainerInfo.md) | | | +| **deployment_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsPodEnrichmentData.new( + container_count: null, + container_info: null, + deployment_id: null +) +``` + diff --git a/docs/K8sassetsPodEnrichmentEntry.md b/docs/K8sassetsPodEnrichmentEntry.md new file mode 100644 index 00000000..ed41a17f --- /dev/null +++ b/docs/K8sassetsPodEnrichmentEntry.md @@ -0,0 +1,20 @@ +# Falcon::K8sassetsPodEnrichmentEntry + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enrichment_data** | [**K8sassetsPodEnrichmentData**](K8sassetsPodEnrichmentData.md) | | | +| **pod_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsPodEnrichmentEntry.new( + enrichment_data: null, + pod_id: null +) +``` + diff --git a/docs/K8sassetsPodEnrichmentResponse.md b/docs/K8sassetsPodEnrichmentResponse.md new file mode 100644 index 00000000..aefc53df --- /dev/null +++ b/docs/K8sassetsPodEnrichmentResponse.md @@ -0,0 +1,22 @@ +# Falcon::K8sassetsPodEnrichmentResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **enrichment_data** | [**Array<K8sassetsPodEnrichmentEntry>**](K8sassetsPodEnrichmentEntry.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8sassetsPodEnrichmentResponse.new( + enrichment_data: null, + errors: null, + meta: null +) +``` + diff --git a/docs/K8siomsKubernetesIOMCountValue.md b/docs/K8siomsKubernetesIOMCountValue.md new file mode 100644 index 00000000..327771a3 --- /dev/null +++ b/docs/K8siomsKubernetesIOMCountValue.md @@ -0,0 +1,22 @@ +# Falcon::K8siomsKubernetesIOMCountValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<CommonCountAsResource>**](CommonCountAsResource.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8siomsKubernetesIOMCountValue.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/K8siomsKubernetesIOMEntityResponse.md b/docs/K8siomsKubernetesIOMEntityResponse.md new file mode 100644 index 00000000..d1835c6d --- /dev/null +++ b/docs/K8siomsKubernetesIOMEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::K8siomsKubernetesIOMEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIKubernetesIOM>**](ModelsAPIKubernetesIOM.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8siomsKubernetesIOMEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/K8siomsKubernetesIOMFieldValue.md b/docs/K8siomsKubernetesIOMFieldValue.md new file mode 100644 index 00000000..159d6d51 --- /dev/null +++ b/docs/K8siomsKubernetesIOMFieldValue.md @@ -0,0 +1,22 @@ +# Falcon::K8siomsKubernetesIOMFieldValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::K8siomsKubernetesIOMFieldValue.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/KubernetesProtectionApi.md b/docs/KubernetesProtectionApi.md index 7592bc8f..cb0a97c9 100644 --- a/docs/KubernetesProtectionApi.md +++ b/docs/KubernetesProtectionApi.md @@ -8,6 +8,8 @@ All URIs are relative to *https://api.crowdstrike.com* | [**create_azure_subscription**](KubernetesProtectionApi.md#create_azure_subscription) | **POST** /kubernetes-protection/entities/accounts/azure/v1 | Creates a new Azure Subscription in our system | | [**delete_aws_accounts_mixin0**](KubernetesProtectionApi.md#delete_aws_accounts_mixin0) | **DELETE** /kubernetes-protection/entities/accounts/aws/v1 | Delete AWS accounts. | | [**delete_azure_subscription**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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_count_affected_by_zero_day_vulnerabilities**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#get_aws_accounts_mixin0) | **GET** /kubernetes-protection/entities/accounts/aws/v1 | Provides a list of AWS accounts. | | [**get_azure_install_script**](KubernetesProtectionApi.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 | | [**get_azure_tenant_config**](KubernetesProtectionApi.md#get_azure_tenant_config) | **GET** /kubernetes-protection/entities/config/azure/v1 | Gets the Azure tenant Config | @@ -17,9 +19,48 @@ All URIs are relative to *https://api.crowdstrike.com* | [**get_helm_values_yaml**](KubernetesProtectionApi.md#get_helm_values_yaml) | **GET** /kubernetes-protection/entities/integration/agent/v1 | Provides a sample Helm values.yaml file for a customer to install alongside the agent Helm chart | | [**get_locations**](KubernetesProtectionApi.md#get_locations) | **GET** /kubernetes-protection/entities/cloud-locations/v1 | Provides the cloud locations acknowledged by the Kubernetes Protection service | | [**get_static_scripts**](KubernetesProtectionApi.md#get_static_scripts) | **GET** /kubernetes-protection/entities/gen/scripts/v1 | Gets static bash scripts that are used during registration | +| [**group_containers_by_managed**](KubernetesProtectionApi.md#group_containers_by_managed) | **GET** /container-security/aggregates/containers/group-by-managed/v1 | Group the containers by Managed | | [**list_azure_accounts**](KubernetesProtectionApi.md#list_azure_accounts) | **GET** /kubernetes-protection/entities/accounts/azure/v1 | Provides the azure subscriptions registered to Kubernetes Protection | | [**patch_azure_service_principal**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#read_cluster_combined) | **GET** /container-security/combined/clusters/v1 | Retrieve kubernetes clusters identified by the provided filter criteria | +| [**read_cluster_count**](KubernetesProtectionApi.md#read_cluster_count) | **GET** /container-security/aggregates/clusters/count/v1 | Retrieve cluster counts | +| [**read_cluster_enrichment**](KubernetesProtectionApi.md#read_cluster_enrichment) | **GET** /container-security/aggregates/enrichment/clusters/entities/v1 | Retrieve cluster enrichment data | +| [**read_clusters_by_date_range_count**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#read_clusters_by_status_count) | **GET** /container-security/aggregates/clusters/count-by-status/v1 | Bucket clusters by status | +| [**read_container_combined**](KubernetesProtectionApi.md#read_container_combined) | **GET** /container-security/combined/containers/v1 | Retrieve containers identified by the provided filter criteria | +| [**read_container_count**](KubernetesProtectionApi.md#read_container_count) | **GET** /container-security/aggregates/containers/count/v1 | Retrieve container counts | +| [**read_container_count_by_registry**](KubernetesProtectionApi.md#read_container_count_by_registry) | **GET** /container-security/aggregates/containers/count-by-registry/v1 | Retrieve top container image registries | +| [**read_container_enrichment**](KubernetesProtectionApi.md#read_container_enrichment) | **GET** /container-security/aggregates/enrichment/containers/entities/v1 | Retrieve container enrichment data | +| [**read_container_image_detections_count_by_date**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#read_container_images_by_most_used) | **GET** /container-security/aggregates/images/most-used/v1 | Bucket container by image-digest | +| [**read_container_images_by_state**](KubernetesProtectionApi.md#read_container_images_by_state) | **GET** /container-security/aggregates/containers/images-by-state/v1 | Retrieve count of image states running on containers | +| [**read_container_vulnerabilities_by_severity_count**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#read_deployment_combined) | **GET** /container-security/combined/deployments/v1 | Retrieve kubernetes deployments identified by the provided filter criteria | +| [**read_deployment_count**](KubernetesProtectionApi.md#read_deployment_count) | **GET** /container-security/aggregates/deployments/count/v1 | Retrieve deployment counts | +| [**read_deployment_enrichment**](KubernetesProtectionApi.md#read_deployment_enrichment) | **GET** /container-security/aggregates/enrichment/deployments/entities/v1 | Retrieve deployment enrichment data | +| [**read_deployments_by_date_range_count**](KubernetesProtectionApi.md#read_deployments_by_date_range_count) | **GET** /container-security/aggregates/deployments/count-by-date/v1 | Retrieve deployments by date range counts | +| [**read_distinct_container_image_count**](KubernetesProtectionApi.md#read_distinct_container_image_count) | **GET** /container-security/aggregates/images/count-by-distinct/v1 | Retrieve count of distinct images running on containers | +| [**read_kubernetes_iom_by_date_range**](KubernetesProtectionApi.md#read_kubernetes_iom_by_date_range) | **GET** /container-security/aggregates/kubernetes-ioms/count-by-date/v1 | Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. | +| [**read_kubernetes_iom_count**](KubernetesProtectionApi.md#read_kubernetes_iom_count) | **GET** /container-security/aggregates/kubernetes-ioms/count/v1 | Returns the total count of Kubernetes IOMs over the past seven days | +| [**read_kubernetes_iom_entities**](KubernetesProtectionApi.md#read_kubernetes_iom_entities) | **GET** /container-security/entities/kubernetes-ioms/v1 | Retrieve Kubernetes IOM entities identified by the provided IDs | +| [**read_node_combined**](KubernetesProtectionApi.md#read_node_combined) | **GET** /container-security/combined/nodes/v1 | Retrieve kubernetes nodes identified by the provided filter criteria | +| [**read_node_count**](KubernetesProtectionApi.md#read_node_count) | **GET** /container-security/aggregates/nodes/count/v1 | Retrieve node counts | +| [**read_node_enrichment**](KubernetesProtectionApi.md#read_node_enrichment) | **GET** /container-security/aggregates/enrichment/nodes/entities/v1 | Retrieve node enrichment data | +| [**read_nodes_by_cloud_count**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#read_pod_combined) | **GET** /container-security/combined/pods/v1 | Retrieve kubernetes pods identified by the provided filter criteria | +| [**read_pod_count**](KubernetesProtectionApi.md#read_pod_count) | **GET** /container-security/aggregates/pods/count/v1 | Retrieve pod counts | +| [**read_pod_enrichment**](KubernetesProtectionApi.md#read_pod_enrichment) | **GET** /container-security/aggregates/enrichment/pods/entities/v1 | Retrieve pod enrichment data | +| [**read_pods_by_date_range_count**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#read_running_container_images) | **GET** /container-security/combined/container-images/v1 | Retrieve images on running containers | +| [**read_vulnerable_container_image_count**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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**](KubernetesProtectionApi.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 | | [**trigger_scan**](KubernetesProtectionApi.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**](KubernetesProtectionApi.md#update_aws_account) | **PATCH** /kubernetes-protection/entities/accounts/aws/v1 | Updates the AWS account per the query parameters provided | @@ -302,6 +343,149 @@ end - **Accept**: application/json +## find_containers_by_container_run_time_version + +> find_containers_by_container_run_time_version(opts) + +Retrieve containers by container_runtime_version + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 + result = api_instance.find_containers_by_container_run_time_version(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->find_containers_by_container_run_time_version: #{e}" +end +``` + +#### Using the find_containers_by_container_run_time_version_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> find_containers_by_container_run_time_version_with_http_info(opts) + +```ruby +begin + # Retrieve containers by container_runtime_version + data, status_code, headers = api_instance.find_containers_by_container_run_time_version_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->find_containers_by_container_run_time_version_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsContainerRuntimePivotResponse**](ModelsContainerRuntimePivotResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## find_containers_count_affected_by_zero_day_vulnerabilities + +> find_containers_count_affected_by_zero_day_vulnerabilities + +Retrieve containers count affected by zero day vulnerabilities + +### 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::KubernetesProtectionApi.new + +begin + # Retrieve containers count affected by zero day vulnerabilities + result = api_instance.find_containers_count_affected_by_zero_day_vulnerabilities + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->find_containers_count_affected_by_zero_day_vulnerabilities: #{e}" +end +``` + +#### Using the find_containers_count_affected_by_zero_day_vulnerabilities_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> find_containers_count_affected_by_zero_day_vulnerabilities_with_http_info + +```ruby +begin + # Retrieve containers count affected by zero day vulnerabilities + data, status_code, headers = api_instance.find_containers_count_affected_by_zero_day_vulnerabilities_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->find_containers_count_affected_by_zero_day_vulnerabilities_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**CommonCountResponse**](CommonCountResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_aws_accounts_mixin0 > get_aws_accounts_mixin0(opts) @@ -980,6 +1164,77 @@ This endpoint does not need any parameter. - **Accept**: application/json +## group_containers_by_managed + +> group_containers_by_managed(opts) + +Group the containers by Managed + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 + # Group the containers by Managed + result = api_instance.group_containers_by_managed(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->group_containers_by_managed: #{e}" +end +``` + +#### Using the group_containers_by_managed_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> group_containers_by_managed_with_http_info(opts) + +```ruby +begin + # Group the containers by Managed + data, status_code, headers = api_instance.group_containers_by_managed_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->group_containers_by_managed_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsContainerCoverageResponseEntity**](ModelsContainerCoverageResponseEntity.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## list_azure_accounts > list_azure_accounts(opts) @@ -1132,11 +1387,11 @@ end - **Accept**: application/json -## regenerate_api_key +## read_cluster_combined -> regenerate_api_key +> read_cluster_combined(opts) -Regenerate API key for docker registry integrations +Retrieve kubernetes clusters identified by the provided filter criteria ### Examples @@ -1152,41 +1407,2784 @@ Falcon.configure do |config| end api_instance = Falcon::KubernetesProtectionApi.new +opts = { + filter: 'filter_example', # String | Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + 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 +} begin - # Regenerate API key for docker registry integrations - result = api_instance.regenerate_api_key + # Retrieve kubernetes clusters identified by the provided filter criteria + result = api_instance.read_cluster_combined(opts) p result rescue Falcon::ApiError => e - puts "Error when calling KubernetesProtectionApi->regenerate_api_key: #{e}" + puts "Error when calling KubernetesProtectionApi->read_cluster_combined: #{e}" end ``` -#### Using the regenerate_api_key_with_http_info variant +#### Using the read_cluster_combined_with_http_info variant This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> regenerate_api_key_with_http_info +> , Integer, Hash)> read_cluster_combined_with_http_info(opts) ```ruby begin - # Regenerate API key for docker registry integrations - data, status_code, headers = api_instance.regenerate_api_key_with_http_info + # Retrieve kubernetes clusters identified by the provided filter criteria + data, status_code, headers = api_instance.read_cluster_combined_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e - puts "Error when calling KubernetesProtectionApi->regenerate_api_key_with_http_info: #{e}" + puts "Error when calling KubernetesProtectionApi->read_cluster_combined_with_http_info: #{e}" end ``` ### Parameters -This endpoint does not need any parameter. +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | Field to sort results by | [optional] | ### Return type -[**K8sregRegenAPIKeyResp**](K8sregRegenAPIKeyResp.md) +[**ModelsClusterEntityResponse**](ModelsClusterEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_cluster_count + +> read_cluster_count(opts) + +Retrieve cluster counts + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags +} + +begin + # Retrieve cluster counts + result = api_instance.read_cluster_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_cluster_count: #{e}" +end +``` + +#### Using the read_cluster_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_cluster_count_with_http_info(opts) + +```ruby +begin + # Retrieve cluster counts + data, status_code, headers = api_instance.read_cluster_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_cluster_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags | [optional] | + +### Return type + +[**CommonCountResponse**](CommonCountResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_cluster_enrichment + +> read_cluster_enrichment(cluster_id, opts) + +Retrieve cluster enrichment data + +### 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::KubernetesProtectionApi.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 +} + +begin + # Retrieve cluster enrichment data + result = api_instance.read_cluster_enrichment(cluster_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_cluster_enrichment: #{e}" +end +``` + +#### Using the read_cluster_enrichment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_cluster_enrichment_with_http_info(cluster_id, opts) + +```ruby +begin + # Retrieve cluster enrichment data + data, status_code, headers = api_instance.read_cluster_enrichment_with_http_info(cluster_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_cluster_enrichment_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**K8sassetsClusterEnrichmentResponse**](K8sassetsClusterEnrichmentResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_clusters_by_date_range_count + +> read_clusters_by_date_range_count + +Retrieve clusters by date range counts + +### 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::KubernetesProtectionApi.new + +begin + # Retrieve clusters by date range counts + result = api_instance.read_clusters_by_date_range_count + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_clusters_by_date_range_count: #{e}" +end +``` + +#### Using the read_clusters_by_date_range_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_clusters_by_date_range_count_with_http_info + +```ruby +begin + # Retrieve clusters by date range counts + data, status_code, headers = api_instance.read_clusters_by_date_range_count_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_clusters_by_date_range_count_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_clusters_by_kubernetes_version_count + +> read_clusters_by_kubernetes_version_count(opts) + +Bucket clusters by kubernetes version + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags +} + +begin + # Bucket clusters by kubernetes version + result = api_instance.read_clusters_by_kubernetes_version_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_clusters_by_kubernetes_version_count: #{e}" +end +``` + +#### Using the read_clusters_by_kubernetes_version_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_clusters_by_kubernetes_version_count_with_http_info(opts) + +```ruby +begin + # Bucket clusters by kubernetes version + data, status_code, headers = api_instance.read_clusters_by_kubernetes_version_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_clusters_by_kubernetes_version_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags | [optional] | + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_clusters_by_status_count + +> read_clusters_by_status_count(opts) + +Bucket clusters by status + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags +} + +begin + # Bucket clusters by status + result = api_instance.read_clusters_by_status_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_clusters_by_status_count: #{e}" +end +``` + +#### Using the read_clusters_by_status_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_clusters_by_status_count_with_http_info(opts) + +```ruby +begin + # Bucket clusters by status + data, status_code, headers = api_instance.read_clusters_by_status_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_clusters_by_status_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Retrieve count of Kubernetes clusters that match a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags | [optional] | + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_combined + +> read_container_combined(opts) + +Retrieve containers identified by the provided 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 | Field to sort results by +} + +begin + # Retrieve containers identified by the provided filter criteria + result = api_instance.read_container_combined(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_combined: #{e}" +end +``` + +#### Using the read_container_combined_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_combined_with_http_info(opts) + +```ruby +begin + # Retrieve containers identified by the provided filter criteria + data, status_code, headers = api_instance.read_container_combined_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_combined_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | Field to sort results by | [optional] | + +### Return type + +[**ModelsContainerEntityResponse**](ModelsContainerEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_count + +> read_container_count(opts) + +Retrieve container counts + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 container counts + result = api_instance.read_container_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_count: #{e}" +end +``` + +#### Using the read_container_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_count_with_http_info(opts) + +```ruby +begin + # Retrieve container counts + data, status_code, headers = api_instance.read_container_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**CommonCountResponse**](CommonCountResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_count_by_registry + +> read_container_count_by_registry(opts) + +Retrieve top container image registries + +### 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::KubernetesProtectionApi.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 + limit: 56 # Integer | The upper-bound on the number of records to retrieve. +} + +begin + # Retrieve top container image registries + result = api_instance.read_container_count_by_registry(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_count_by_registry: #{e}" +end +``` + +#### Using the read_container_count_by_registry_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_count_by_registry_with_http_info(opts) + +```ruby +begin + # Retrieve top container image registries + data, status_code, headers = api_instance.read_container_count_by_registry_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_count_by_registry_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **limit** | **Integer** | The upper-bound on the number of records to retrieve. | [optional] | + +### Return type + +[**ModelsAPIFilterResponse**](ModelsAPIFilterResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_enrichment + +> read_container_enrichment(container_id, opts) + +Retrieve container enrichment data + +### 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::KubernetesProtectionApi.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 +} + +begin + # Retrieve container enrichment data + result = api_instance.read_container_enrichment(container_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_enrichment: #{e}" +end +``` + +#### Using the read_container_enrichment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_enrichment_with_http_info(container_id, opts) + +```ruby +begin + # Retrieve container enrichment data + data, status_code, headers = api_instance.read_container_enrichment_with_http_info(container_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_enrichment_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**K8sassetsContainerEnrichmentResponse**](K8sassetsContainerEnrichmentResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_image_detections_count_by_date + +> read_container_image_detections_count_by_date(opts) + +Retrieve count of image assessment detections on running containers over a period of time + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 count of image assessment detections on running containers over a period of time + result = api_instance.read_container_image_detections_count_by_date(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_image_detections_count_by_date: #{e}" +end +``` + +#### Using the read_container_image_detections_count_by_date_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_image_detections_count_by_date_with_http_info(opts) + +```ruby +begin + # Retrieve count of image assessment detections on running containers over a period of time + data, status_code, headers = api_instance.read_container_image_detections_count_by_date_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_image_detections_count_by_date_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsAPIFilterResponse**](ModelsAPIFilterResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_images_by_most_used + +> read_container_images_by_most_used(opts) + +Bucket container by image-digest + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 + # Bucket container by image-digest + result = api_instance.read_container_images_by_most_used(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_images_by_most_used: #{e}" +end +``` + +#### Using the read_container_images_by_most_used_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_images_by_most_used_with_http_info(opts) + +```ruby +begin + # Bucket container by image-digest + data, status_code, headers = api_instance.read_container_images_by_most_used_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_images_by_most_used_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_images_by_state + +> read_container_images_by_state(opts) + +Retrieve count of image states running on containers + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Filter using a query in Falcon Query Language (FQL). Supported filters: cid +} + +begin + # Retrieve count of image states running on containers + result = api_instance.read_container_images_by_state(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_images_by_state: #{e}" +end +``` + +#### Using the read_container_images_by_state_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_images_by_state_with_http_info(opts) + +```ruby +begin + # Retrieve count of image states running on containers + data, status_code, headers = api_instance.read_container_images_by_state_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_images_by_state_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter using a query in Falcon Query Language (FQL). Supported filters: cid | [optional] | + +### Return type + +[**ModelsAPIFilterResponse**](ModelsAPIFilterResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_container_vulnerabilities_by_severity_count + +> read_container_vulnerabilities_by_severity_count(opts) + +Retrieve container vulnerabilities by severity counts + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 container vulnerabilities by severity counts + result = api_instance.read_container_vulnerabilities_by_severity_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_vulnerabilities_by_severity_count: #{e}" +end +``` + +#### Using the read_container_vulnerabilities_by_severity_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_container_vulnerabilities_by_severity_count_with_http_info(opts) + +```ruby +begin + # Retrieve container vulnerabilities by severity counts + data, status_code, headers = api_instance.read_container_vulnerabilities_by_severity_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_container_vulnerabilities_by_severity_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_containers_by_date_range_count + +> read_containers_by_date_range_count(opts) + +Retrieve containers by date range counts + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 date range counts + result = api_instance.read_containers_by_date_range_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_containers_by_date_range_count: #{e}" +end +``` + +#### Using the read_containers_by_date_range_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_containers_by_date_range_count_with_http_info(opts) + +```ruby +begin + # Retrieve containers by date range counts + data, status_code, headers = api_instance.read_containers_by_date_range_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_containers_by_date_range_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_containers_sensor_coverage + +> read_containers_sensor_coverage(opts) + +Bucket containers by agent type and calculate sensor coverage + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 + # Bucket containers by agent type and calculate sensor coverage + result = api_instance.read_containers_sensor_coverage(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_containers_sensor_coverage: #{e}" +end +``` + +#### Using the read_containers_sensor_coverage_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_containers_sensor_coverage_with_http_info(opts) + +```ruby +begin + # Bucket containers by agent type and calculate sensor coverage + data, status_code, headers = api_instance.read_containers_sensor_coverage_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_containers_sensor_coverage_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_deployment_combined + +> read_deployment_combined(opts) + +Retrieve kubernetes deployments identified by the provided 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example', # String | Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_count + 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 +} + +begin + # Retrieve kubernetes deployments identified by the provided filter criteria + result = api_instance.read_deployment_combined(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployment_combined: #{e}" +end +``` + +#### Using the read_deployment_combined_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_deployment_combined_with_http_info(opts) + +```ruby +begin + # Retrieve kubernetes deployments identified by the provided filter criteria + data, status_code, headers = api_instance.read_deployment_combined_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployment_combined_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_count | [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** | Field to sort results by | [optional] | + +### Return type + +[**ModelsDeploymentEntityResponse**](ModelsDeploymentEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_deployment_count + +> read_deployment_count(opts) + +Retrieve deployment counts + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filters: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_count +} + +begin + # Retrieve deployment counts + result = api_instance.read_deployment_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployment_count: #{e}" +end +``` + +#### Using the read_deployment_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_deployment_count_with_http_info(opts) + +```ruby +begin + # Retrieve deployment counts + data, status_code, headers = api_instance.read_deployment_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployment_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Retrieve count of Kubernetes deployments that match a query in Falcon Query Language (FQL). Supported filters: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_count | [optional] | + +### Return type + +[**CommonCountResponse**](CommonCountResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_deployment_enrichment + +> read_deployment_enrichment(deployment_id, opts) + +Retrieve deployment enrichment data + +### 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::KubernetesProtectionApi.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 +} + +begin + # Retrieve deployment enrichment data + result = api_instance.read_deployment_enrichment(deployment_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployment_enrichment: #{e}" +end +``` + +#### Using the read_deployment_enrichment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_deployment_enrichment_with_http_info(deployment_id, opts) + +```ruby +begin + # Retrieve deployment enrichment data + data, status_code, headers = api_instance.read_deployment_enrichment_with_http_info(deployment_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployment_enrichment_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**K8sassetsDeploymentEnrichmentResponse**](K8sassetsDeploymentEnrichmentResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_deployments_by_date_range_count + +> read_deployments_by_date_range_count + +Retrieve deployments by date range counts + +### 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::KubernetesProtectionApi.new + +begin + # Retrieve deployments by date range counts + result = api_instance.read_deployments_by_date_range_count + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployments_by_date_range_count: #{e}" +end +``` + +#### Using the read_deployments_by_date_range_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_deployments_by_date_range_count_with_http_info + +```ruby +begin + # Retrieve deployments by date range counts + data, status_code, headers = api_instance.read_deployments_by_date_range_count_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_deployments_by_date_range_count_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_distinct_container_image_count + +> read_distinct_container_image_count(opts) + +Retrieve count of distinct images running on containers + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 count of distinct images running on containers + result = api_instance.read_distinct_container_image_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_distinct_container_image_count: #{e}" +end +``` + +#### Using the read_distinct_container_image_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_distinct_container_image_count_with_http_info(opts) + +```ruby +begin + # Retrieve count of distinct images running on containers + data, status_code, headers = api_instance.read_distinct_container_image_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_distinct_container_image_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsAPIFilterResponse**](ModelsAPIFilterResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_kubernetes_iom_by_date_range + +> read_kubernetes_iom_by_date_range(opts) + +Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,severity +} + +begin + # Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. + result = api_instance.read_kubernetes_iom_by_date_range(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_kubernetes_iom_by_date_range: #{e}" +end +``` + +#### Using the read_kubernetes_iom_by_date_range_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_kubernetes_iom_by_date_range_with_http_info(opts) + +```ruby +begin + # Returns the count of Kubernetes IOMs by the date. by default it's for 7 days. + data, status_code, headers = api_instance.read_kubernetes_iom_by_date_range_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_kubernetes_iom_by_date_range_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,severity | [optional] | + +### Return type + +[**K8siomsKubernetesIOMFieldValue**](K8siomsKubernetesIOMFieldValue.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_kubernetes_iom_count + +> read_kubernetes_iom_count(opts) + +Returns the total count of Kubernetes IOMs over the past seven days + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,severity +} + +begin + # Returns the total count of Kubernetes IOMs over the past seven days + result = api_instance.read_kubernetes_iom_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_kubernetes_iom_count: #{e}" +end +``` + +#### Using the read_kubernetes_iom_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_kubernetes_iom_count_with_http_info(opts) + +```ruby +begin + # Returns the total count of Kubernetes IOMs over the past seven days + data, status_code, headers = api_instance.read_kubernetes_iom_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_kubernetes_iom_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Filter images using a query in Falcon Query Language (FQL). Supported filters: cid,created_timestamp,detect_timestamp,severity | [optional] | + +### Return type + +[**K8siomsKubernetesIOMCountValue**](K8siomsKubernetesIOMCountValue.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_kubernetes_iom_entities + +> read_kubernetes_iom_entities(opts) + +Retrieve Kubernetes IOM entities identified by the provided 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::KubernetesProtectionApi.new +opts = { + ids: ['inner_example'] # Array | Search Kubernetes IOMs by ids - The maximum amount is 100 IDs +} + +begin + # Retrieve Kubernetes IOM entities identified by the provided IDs + result = api_instance.read_kubernetes_iom_entities(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_kubernetes_iom_entities: #{e}" +end +``` + +#### Using the read_kubernetes_iom_entities_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_kubernetes_iom_entities_with_http_info(opts) + +```ruby +begin + # Retrieve Kubernetes IOM entities identified by the provided IDs + data, status_code, headers = api_instance.read_kubernetes_iom_entities_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_kubernetes_iom_entities_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | Search Kubernetes IOMs by ids - The maximum amount is 100 IDs | [optional] | + +### Return type + +[**K8siomsKubernetesIOMEntityResponse**](K8siomsKubernetesIOMEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_node_combined + +> read_node_combined(opts) + +Retrieve kubernetes nodes identified by the provided 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example', # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + 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 +} + +begin + # Retrieve kubernetes nodes identified by the provided filter criteria + result = api_instance.read_node_combined(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_node_combined: #{e}" +end +``` + +#### Using the read_node_combined_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_node_combined_with_http_info(opts) + +```ruby +begin + # Retrieve kubernetes nodes identified by the provided filter criteria + data, status_code, headers = api_instance.read_node_combined_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_node_combined_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count | [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** | Field to sort results by | [optional] | + +### Return type + +[**ModelsNodeEntityResponse**](ModelsNodeEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_node_count + +> read_node_count(opts) + +Retrieve node counts + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count +} + +begin + # Retrieve node counts + result = api_instance.read_node_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_node_count: #{e}" +end +``` + +#### Using the read_node_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_node_count_with_http_info(opts) + +```ruby +begin + # Retrieve node counts + data, status_code, headers = api_instance.read_node_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_node_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Retrieve count of Kubernetes nodes that match a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count | [optional] | + +### Return type + +[**CommonCountResponse**](CommonCountResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_node_enrichment + +> read_node_enrichment(node_name, opts) + +Retrieve node enrichment data + +### 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::KubernetesProtectionApi.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 +} + +begin + # Retrieve node enrichment data + result = api_instance.read_node_enrichment(node_name, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_node_enrichment: #{e}" +end +``` + +#### Using the read_node_enrichment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_node_enrichment_with_http_info(node_name, opts) + +```ruby +begin + # Retrieve node enrichment data + data, status_code, headers = api_instance.read_node_enrichment_with_http_info(node_name, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_node_enrichment_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**K8sassetsNodeEnrichmentResponse**](K8sassetsNodeEnrichmentResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_nodes_by_cloud_count + +> read_nodes_by_cloud_count(opts) + +Bucket nodes by cloud providers + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count +} + +begin + # Bucket nodes by cloud providers + result = api_instance.read_nodes_by_cloud_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_nodes_by_cloud_count: #{e}" +end +``` + +#### Using the read_nodes_by_cloud_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_nodes_by_cloud_count_with_http_info(opts) + +```ruby +begin + # Bucket nodes by cloud providers + data, status_code, headers = api_instance.read_nodes_by_cloud_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_nodes_by_cloud_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count | [optional] | + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_nodes_by_container_engine_version_count + +> read_nodes_by_container_engine_version_count(opts) + +Bucket nodes by their container engine version + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count +} + +begin + # Bucket nodes by their container engine version + result = api_instance.read_nodes_by_container_engine_version_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_nodes_by_container_engine_version_count: #{e}" +end +``` + +#### Using the read_nodes_by_container_engine_version_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_nodes_by_container_engine_version_count_with_http_info(opts) + +```ruby +begin + # Bucket nodes by their container engine version + data, status_code, headers = api_instance.read_nodes_by_container_engine_version_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_nodes_by_container_engine_version_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count | [optional] | + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_nodes_by_date_range_count + +> read_nodes_by_date_range_count(opts) + +Retrieve nodes by date range counts + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example' # String | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count +} + +begin + # Retrieve nodes by date range counts + result = api_instance.read_nodes_by_date_range_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_nodes_by_date_range_count: #{e}" +end +``` + +#### Using the read_nodes_by_date_range_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_nodes_by_date_range_count_with_http_info(opts) + +```ruby +begin + # Retrieve nodes by date range counts + data, status_code, headers = api_instance.read_nodes_by_date_range_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_nodes_by_date_range_count_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count | [optional] | + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_pod_combined + +> read_pod_combined(opts) + +Retrieve kubernetes pods identified by the provided 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user + 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 +} + +begin + # Retrieve kubernetes pods identified by the provided filter criteria + result = api_instance.read_pod_combined(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pod_combined: #{e}" +end +``` + +#### Using the read_pod_combined_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_pod_combined_with_http_info(opts) + +```ruby +begin + # Retrieve kubernetes pods identified by the provided filter criteria + data, status_code, headers = api_instance.read_pod_combined_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pod_combined_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | Field to sort results by | [optional] | + +### Return type + +[**ModelsPodEntityResponse**](ModelsPodEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_pod_count + +> read_pod_count(opts) + +Retrieve pod counts + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user +} + +begin + # Retrieve pod counts + result = api_instance.read_pod_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pod_count: #{e}" +end +``` + +#### Using the read_pod_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_pod_count_with_http_info(opts) + +```ruby +begin + # Retrieve pod counts + data, status_code, headers = api_instance.read_pod_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pod_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user | [optional] | + +### Return type + +[**CommonCountResponse**](CommonCountResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_pod_enrichment + +> read_pod_enrichment(pod_id, opts) + +Retrieve pod enrichment data + +### 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::KubernetesProtectionApi.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 +} + +begin + # Retrieve pod enrichment data + result = api_instance.read_pod_enrichment(pod_id, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pod_enrichment: #{e}" +end +``` + +#### Using the read_pod_enrichment_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_pod_enrichment_with_http_info(pod_id, opts) + +```ruby +begin + # Retrieve pod enrichment data + data, status_code, headers = api_instance.read_pod_enrichment_with_http_info(pod_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pod_enrichment_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**K8sassetsPodEnrichmentResponse**](K8sassetsPodEnrichmentResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_pods_by_date_range_count + +> read_pods_by_date_range_count + +Retrieve pods by date range counts + +### 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::KubernetesProtectionApi.new + +begin + # Retrieve pods by date range counts + result = api_instance.read_pods_by_date_range_count + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pods_by_date_range_count: #{e}" +end +``` + +#### Using the read_pods_by_date_range_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_pods_by_date_range_count_with_http_info + +```ruby +begin + # Retrieve pods by date range counts + data, status_code, headers = api_instance.read_pods_by_date_range_count_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_pods_by_date_range_count_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_running_container_images + +> read_running_container_images(opts) + +Retrieve images on running containers + +### 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::KubernetesProtectionApi.new +opts = { + filter: 'filter_example', # String | Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filters: cid,hosts,image_digest,image_has_been_assessed,image_id,image_name,image_registry,image_repository,image_tag,last_seen,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 | Field to sort results by +} + +begin + # Retrieve images on running containers + result = api_instance.read_running_container_images(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_running_container_images: #{e}" +end +``` + +#### Using the read_running_container_images_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_running_container_images_with_http_info(opts) + +```ruby +begin + # Retrieve images on running containers + data, status_code, headers = api_instance.read_running_container_images_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_running_container_images_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Retrieve list of images on running containers using a query in Falcon Query Language (FQL). Supported filters: cid,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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | Field to sort results by | [optional] | + +### Return type + +[**ModelsContainerImage**](ModelsContainerImage.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_vulnerable_container_image_count + +> read_vulnerable_container_image_count(opts) + +Retrieve count of vulnerable images running on containers + +### 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::KubernetesProtectionApi.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,cluster_id,cluster_name,container_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,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 count of vulnerable images running on containers + result = api_instance.read_vulnerable_container_image_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_vulnerable_container_image_count: #{e}" +end +``` + +#### Using the read_vulnerable_container_image_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_vulnerable_container_image_count_with_http_info(opts) + +```ruby +begin + # Retrieve count of vulnerable images running on containers + data, status_code, headers = api_instance.read_vulnerable_container_image_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->read_vulnerable_container_image_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,cluster_id,cluster_name,container_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,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 + +[**ModelsAPIFilterResponse**](ModelsAPIFilterResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## regenerate_api_key + +> regenerate_api_key + +Regenerate API key for docker registry integrations + +### 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::KubernetesProtectionApi.new + +begin + # Regenerate API key for docker registry integrations + result = api_instance.regenerate_api_key + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->regenerate_api_key: #{e}" +end +``` + +#### Using the regenerate_api_key_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> regenerate_api_key_with_http_info + +```ruby +begin + # Regenerate API key for docker registry integrations + data, status_code, headers = api_instance.regenerate_api_key_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->regenerate_api_key_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**K8sregRegenAPIKeyResp**](K8sregRegenAPIKeyResp.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## search_and_read_kubernetes_iom_entities + +> search_and_read_kubernetes_iom_entities(opts) + +Search Kubernetes IOM by the provided search 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::KubernetesProtectionApi.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,resource_id,resource_name,resource_type,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 Kubernetes IOM by the provided search criteria + result = api_instance.search_and_read_kubernetes_iom_entities(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->search_and_read_kubernetes_iom_entities: #{e}" +end +``` + +#### Using the search_and_read_kubernetes_iom_entities_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_and_read_kubernetes_iom_entities_with_http_info(opts) + +```ruby +begin + # Search Kubernetes IOM by the provided search criteria + data, status_code, headers = api_instance.search_and_read_kubernetes_iom_entities_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->search_and_read_kubernetes_iom_entities_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,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] | +| **sort** | **String** | The fields to sort the records on. | [optional] | + +### Return type + +[**K8siomsKubernetesIOMEntityResponse**](K8siomsKubernetesIOMEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## search_kubernetes_ioms + +> search_kubernetes_ioms(opts) + +Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + +### 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::KubernetesProtectionApi.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,resource_id,resource_name,resource_type,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 Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + result = api_instance.search_kubernetes_ioms(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->search_kubernetes_ioms: #{e}" +end +``` + +#### Using the search_kubernetes_ioms_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_kubernetes_ioms_with_http_info(opts) + +```ruby +begin + # Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + data, status_code, headers = api_instance.search_kubernetes_ioms_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling KubernetesProtectionApi->search_kubernetes_ioms_with_http_info: #{e}" +end +``` + +### Parameters + +| 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,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] | +| **sort** | **String** | The fields to sort the records on. | [optional] | + +### Return type + +[**CommonGenericEntityResponseString**](CommonGenericEntityResponseString.md) ### Authorization diff --git a/docs/MessageCenterApi.md b/docs/MessageCenterApi.md index cfcdc967..472e1c21 100644 --- a/docs/MessageCenterApi.md +++ b/docs/MessageCenterApi.md @@ -87,7 +87,7 @@ end ## case_add_activity -> case_add_activity(body) +> case_add_activity(body) Add an activity to case. Only activities of type comment are allowed via API @@ -120,7 +120,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> case_add_activity_with_http_info(body) +> , Integer, Hash)> case_add_activity_with_http_info(body) ```ruby begin @@ -128,7 +128,7 @@ begin data, status_code, headers = api_instance.case_add_activity_with_http_info(body) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling MessageCenterApi->case_add_activity_with_http_info: #{e}" end @@ -142,7 +142,7 @@ end ### Return type -[**MsaReplyMetaOnly**](MsaReplyMetaOnly.md) +[**MsaspecResponseFields**](MsaspecResponseFields.md) ### Authorization @@ -576,7 +576,7 @@ end ## query_activity_by_case_id -> query_activity_by_case_id(case_id, opts) +> query_activity_by_case_id(case_id, opts) Retrieve activities id's for a case @@ -597,7 +597,7 @@ api_instance = Falcon::MessageCenterApi.new case_id = 'case_id_example' # String | Case ID opts = { limit: 56, # Integer | The maximum records to return. [1-500] - sort: 'activity.created_time.asc', # String | The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". + sort: 'activity.type.asc', # String | The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". filter: 'filter_example', # String | Optional filter and sort criteria in the form of an FQL query. Allowed filters are: activity.created_time activity.type offset: 'offset_example' # String | Starting index of overall result set from which to return ids. } @@ -615,7 +615,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_activity_by_case_id_with_http_info(case_id, opts) +> , Integer, Hash)> query_activity_by_case_id_with_http_info(case_id, opts) ```ruby begin @@ -623,7 +623,7 @@ begin data, status_code, headers = api_instance.query_activity_by_case_id_with_http_info(case_id, opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling MessageCenterApi->query_activity_by_case_id_with_http_info: #{e}" end @@ -641,7 +641,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization @@ -655,7 +655,7 @@ end ## query_cases_ids_by_filter -> query_cases_ids_by_filter(opts) +> query_cases_ids_by_filter(opts) Retrieve case id's that match the provided filter criteria @@ -675,7 +675,7 @@ end api_instance = Falcon::MessageCenterApi.new opts = { limit: 56, # Integer | The maximum records to return. [1-500] - sort: 'case.created_time.asc', # String | The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". + sort: 'case.id.asc', # String | The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". filter: 'filter_example', # String | Optional filter and sort criteria in the form of an FQL query. Allowed filters are: _all activity.body case.aids case.assigner.display_name case.assigner.first_name case.assigner.last_name case.assigner.uid case.assigner.uuid case.body case.created_time case.detections.id case.hosts case.id case.incidents.id case.ip_addresses case.key case.last_modified_time case.status case.title case.type offset: 'offset_example' # String | Starting index of overall result set from which to return ids. } @@ -693,7 +693,7 @@ end This returns an Array which contains the response data, status code and headers. -> , Integer, Hash)> query_cases_ids_by_filter_with_http_info(opts) +> , Integer, Hash)> query_cases_ids_by_filter_with_http_info(opts) ```ruby begin @@ -701,7 +701,7 @@ begin data, status_code, headers = api_instance.query_cases_ids_by_filter_with_http_info(opts) p status_code # => 2xx p headers # => { ... } - p data # => + p data # => rescue Falcon::ApiError => e puts "Error when calling MessageCenterApi->query_cases_ids_by_filter_with_http_info: #{e}" end @@ -718,7 +718,7 @@ end ### Return type -[**MsaQueryResponse**](MsaQueryResponse.md) +[**MsaspecQueryResponse**](MsaspecQueryResponse.md) ### Authorization diff --git a/docs/ModelUserInputReadResponse.md b/docs/ModelUserInputReadResponse.md new file mode 100644 index 00000000..5eb8a2a8 --- /dev/null +++ b/docs/ModelUserInputReadResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelUserInputReadResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelUserInputViewModel>**](ModelUserInputViewModel.md) | user inputs returned | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelUserInputReadResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelUserInputUpdateRequest.md b/docs/ModelUserInputUpdateRequest.md new file mode 100644 index 00000000..a71f4a94 --- /dev/null +++ b/docs/ModelUserInputUpdateRequest.md @@ -0,0 +1,20 @@ +# Falcon::ModelUserInputUpdateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **input** | **String** | input to provide to the user input activity | | +| **note** | **String** | note added to user input at the time an input is provided | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelUserInputUpdateRequest.new( + input: null, + note: null +) +``` + diff --git a/docs/ModelUserInputViewModel.md b/docs/ModelUserInputViewModel.md new file mode 100644 index 00000000..f1adbe6f --- /dev/null +++ b/docs/ModelUserInputViewModel.md @@ -0,0 +1,36 @@ +# Falcon::ModelUserInputViewModel + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **allowed_inputs** | **Array<String>** | if not empty, only listed inputs are allowed | | +| **allowed_responders** | **Array<String>** | if not empty, only listed responders are allowed to provide input | | +| **completed** | **Boolean** | whether or not the user input is completed yet | | +| **completed_at** | **Time** | time at which the user input was modified | | +| **created_at** | **Time** | time at which the user input was created | | +| **id** | **String** | ID of the user input | | +| **input** | **String** | input provided by a responder user | | +| **note** | **String** | note added to user input at the time an input is provided | | +| **responder** | **String** | user responding to the user input request | | +| **timeout_at** | **Time** | time after which the user input may be expired and no longer actionable | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelUserInputViewModel.new( + allowed_inputs: null, + allowed_responders: null, + completed: null, + completed_at: null, + created_at: null, + id: null, + input: null, + note: null, + responder: null, + timeout_at: null +) +``` + diff --git a/docs/ModelsAPIAssessmentDetections.md b/docs/ModelsAPIAssessmentDetections.md new file mode 100644 index 00000000..c2769f1b --- /dev/null +++ b/docs/ModelsAPIAssessmentDetections.md @@ -0,0 +1,52 @@ +# Falcon::ModelsAPIAssessmentDetections + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **details** | **String** | | | +| **detection_type** | **String** | | | +| **id** | **String** | | | +| **image_architecture** | **String** | | | +| **image_created_at** | **String** | | | +| **image_digest** | **String** | | | +| **image_id** | **String** | | | +| **image_registry** | **String** | | | +| **image_repository** | **String** | | | +| **image_size** | **String** | | | +| **image_tag** | **String** | | | +| **name** | **String** | | | +| **os_name** | **String** | | | +| **os_version** | **String** | | | +| **remediation** | **String** | | | +| **severity** | **String** | | | +| **title** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIAssessmentDetections.new( + description: null, + details: null, + detection_type: null, + id: null, + image_architecture: null, + image_created_at: null, + image_digest: null, + image_id: null, + image_registry: null, + image_repository: null, + image_size: null, + image_tag: null, + name: null, + os_name: null, + os_version: null, + remediation: null, + severity: null, + title: null +) +``` + diff --git a/docs/ModelsAPICombinedDetections.md b/docs/ModelsAPICombinedDetections.md new file mode 100644 index 00000000..055567c0 --- /dev/null +++ b/docs/ModelsAPICombinedDetections.md @@ -0,0 +1,40 @@ +# Falcon::ModelsAPICombinedDetections + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | | | +| **containers_impacted** | **Integer** | | | +| **description** | **String** | | | +| **details** | **Array<String>** | | | +| **detection_id** | **String** | | | +| **detection_name** | **String** | | | +| **detection_severity** | **String** | | | +| **detection_type** | **String** | | | +| **images_impacted** | **Integer** | | | +| **last_detected** | **String** | | | +| **remediation** | **String** | | | +| **title** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPICombinedDetections.new( + cid: null, + containers_impacted: null, + description: null, + details: null, + detection_id: null, + detection_name: null, + detection_severity: null, + detection_type: null, + images_impacted: null, + last_detected: null, + remediation: null, + title: null +) +``` + diff --git a/docs/ModelsAPIContainerAlert.md b/docs/ModelsAPIContainerAlert.md new file mode 100644 index 00000000..61eb3ad7 --- /dev/null +++ b/docs/ModelsAPIContainerAlert.md @@ -0,0 +1,32 @@ +# Falcon::ModelsAPIContainerAlert + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **containers_impacted_count** | **String** | | | +| **containers_impacted_ids** | **Array<String>** | | | +| **detection_description** | **String** | | | +| **detection_event_simple_name** | **String** | | | +| **detection_name** | **String** | | | +| **first_seen_timestamp** | **String** | | | +| **last_seen_timestamp** | **String** | | | +| **severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIContainerAlert.new( + containers_impacted_count: null, + containers_impacted_ids: null, + detection_description: null, + detection_event_simple_name: null, + detection_name: null, + first_seen_timestamp: null, + last_seen_timestamp: null, + severity: null +) +``` + diff --git a/docs/ModelsAPICustomerAndImage.md b/docs/ModelsAPICustomerAndImage.md new file mode 100644 index 00000000..243f8970 --- /dev/null +++ b/docs/ModelsAPICustomerAndImage.md @@ -0,0 +1,50 @@ +# Falcon::ModelsAPICustomerAndImage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **base_os** | **String** | | | +| **base_os_version** | **String** | | | +| **cid** | **String** | | | +| **config** | [**ModelsLightWeightConfig**](ModelsLightWeightConfig.md) | | [optional] | +| **created_at** | **String** | | | +| **crowdstrike_user** | **String** | | | +| **digest** | **String** | | | +| **eol_date** | **String** | | | +| **first_scanned** | **String** | | | +| **image_id** | **String** | | | +| **image_scanning_active** | **Boolean** | | | +| **image_size** | **Integer** | | | +| **registry** | **String** | | | +| **repository** | **String** | | | +| **tag** | **String** | | | +| **updated_at** | **String** | | | +| **uuid** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPICustomerAndImage.new( + base_os: null, + base_os_version: null, + cid: null, + config: null, + created_at: null, + crowdstrike_user: null, + digest: null, + eol_date: null, + first_scanned: null, + image_id: null, + image_scanning_active: null, + image_size: null, + registry: null, + repository: null, + tag: null, + updated_at: null, + uuid: null +) +``` + diff --git a/docs/ModelsAPIDetectionCount.md b/docs/ModelsAPIDetectionCount.md new file mode 100644 index 00000000..4e0cf329 --- /dev/null +++ b/docs/ModelsAPIDetectionCount.md @@ -0,0 +1,18 @@ +# Falcon::ModelsAPIDetectionCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIDetectionCount.new( + count: null +) +``` + diff --git a/docs/ModelsAPIDetectionCountByType.md b/docs/ModelsAPIDetectionCountByType.md new file mode 100644 index 00000000..49ea6391 --- /dev/null +++ b/docs/ModelsAPIDetectionCountByType.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIDetectionCountByType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | +| **type** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIDetectionCountByType.new( + count: null, + type: null +) +``` + diff --git a/docs/ModelsAPIDriftIndicators.md b/docs/ModelsAPIDriftIndicators.md new file mode 100644 index 00000000..f3f2f2aa --- /dev/null +++ b/docs/ModelsAPIDriftIndicators.md @@ -0,0 +1,66 @@ +# Falcon::ModelsAPIDriftIndicators + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **agent_id** | **String** | | | +| **aid** | **String** | | | +| **cid** | **String** | | | +| **cloud_name** | **String** | | | +| **command_line** | **String** | | | +| **computer_name** | **String** | | | +| **container_id** | **String** | | | +| **detection_description** | **String** | | | +| **detection_id** | **String** | | | +| **detection_name** | **String** | | | +| **file_name** | **String** | | | +| **host_id** | **String** | | | +| **indicator_process_id** | **String** | | | +| **namespace** | **String** | | | +| **occurred_at** | **String** | | | +| **parent_process_id** | **String** | | | +| **pod_id** | **String** | | | +| **pod_name** | **String** | | | +| **prevented** | **Boolean** | | | +| **prevention_status** | **Array<String>** | | | +| **prevention_status_string** | **String** | | | +| **scheduler_name** | **String** | | | +| **severity** | **String** | | | +| **sha256** | **String** | | | +| **timestamp** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIDriftIndicators.new( + agent_id: null, + aid: null, + cid: null, + cloud_name: null, + command_line: null, + computer_name: null, + container_id: null, + detection_description: null, + detection_id: null, + detection_name: null, + file_name: null, + host_id: null, + indicator_process_id: null, + namespace: null, + occurred_at: null, + parent_process_id: null, + pod_id: null, + pod_name: null, + prevented: null, + prevention_status: null, + prevention_status_string: null, + scheduler_name: null, + severity: null, + sha256: null, + timestamp: null +) +``` + diff --git a/docs/ModelsAPIFilterLabel.md b/docs/ModelsAPIFilterLabel.md new file mode 100644 index 00000000..e6c311b1 --- /dev/null +++ b/docs/ModelsAPIFilterLabel.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIFilterLabel + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | +| **label** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIFilterLabel.new( + count: null, + label: null +) +``` + diff --git a/docs/ModelsAPIFilterResponse.md b/docs/ModelsAPIFilterResponse.md new file mode 100644 index 00000000..158aec16 --- /dev/null +++ b/docs/ModelsAPIFilterResponse.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIFilterResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **buckets** | [**Array<ModelsAPIFilterLabel>**](ModelsAPIFilterLabel.md) | | | +| **name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIFilterResponse.new( + buckets: null, + name: null +) +``` + diff --git a/docs/ModelsAPIImageAssessment.md b/docs/ModelsAPIImageAssessment.md new file mode 100644 index 00000000..f9404d59 --- /dev/null +++ b/docs/ModelsAPIImageAssessment.md @@ -0,0 +1,28 @@ +# Falcon::ModelsAPIImageAssessment + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **assessed** | **Integer** | | | +| **error_image_pull** | **Integer** | | | +| **error_image_push** | **Integer** | | | +| **error_missing_config** | **Integer** | | | +| **error_unsupported_schema_version** | **Integer** | | | +| **time_stamp** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIImageAssessment.new( + assessed: null, + error_image_pull: null, + error_image_push: null, + error_missing_config: null, + error_unsupported_schema_version: null, + time_stamp: null +) +``` + diff --git a/docs/ModelsAPIImageAssessmentHistory.md b/docs/ModelsAPIImageAssessmentHistory.md new file mode 100644 index 00000000..2357469a --- /dev/null +++ b/docs/ModelsAPIImageAssessmentHistory.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIImageAssessmentHistory + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **buckets** | [**Array<ModelsAPIImageAssessment>**](ModelsAPIImageAssessment.md) | | | +| **name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIImageAssessmentHistory.new( + buckets: null, + name: null +) +``` + diff --git a/docs/ModelsAPIImageByVulnerabilityCount.md b/docs/ModelsAPIImageByVulnerabilityCount.md new file mode 100644 index 00000000..e216256b --- /dev/null +++ b/docs/ModelsAPIImageByVulnerabilityCount.md @@ -0,0 +1,26 @@ +# Falcon::ModelsAPIImageByVulnerabilityCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **image_id** | **String** | | | +| **registry** | **String** | | | +| **repository** | **String** | | | +| **tag** | **String** | | | +| **vulnerability_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIImageByVulnerabilityCount.new( + image_id: null, + registry: null, + repository: null, + tag: null, + vulnerability_count: null +) +``` + diff --git a/docs/ModelsAPIImageCombinedExport.md b/docs/ModelsAPIImageCombinedExport.md new file mode 100644 index 00000000..6f8ae862 --- /dev/null +++ b/docs/ModelsAPIImageCombinedExport.md @@ -0,0 +1,56 @@ +# Falcon::ModelsAPIImageCombinedExport + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **base_os** | **String** | | | +| **cid** | **String** | | | +| **cve_id** | **String** | | | +| **cvss_score** | **String** | | | +| **detection_name** | **String** | | | +| **detection_severity** | **String** | | | +| **detection_type** | **String** | | | +| **first_seen** | **String** | | | +| **image_digest** | **String** | | | +| **image_id** | **String** | | | +| **last_seen** | **String** | | | +| **packages_impacted** | **Integer** | | | +| **registry** | **String** | | | +| **repository** | **String** | | | +| **started_containers** | **Integer** | | | +| **stopped_containers** | **Integer** | | | +| **tag** | **String** | | | +| **vulnerability_cps_rating** | **String** | | | +| **vulnerability_description** | **String** | | | +| **vulnerability_severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIImageCombinedExport.new( + base_os: null, + cid: null, + cve_id: null, + cvss_score: null, + detection_name: null, + detection_severity: null, + detection_type: null, + first_seen: null, + image_digest: null, + image_id: null, + last_seen: null, + packages_impacted: null, + registry: null, + repository: null, + started_containers: null, + stopped_containers: null, + tag: null, + vulnerability_cps_rating: null, + vulnerability_description: null, + vulnerability_severity: null +) +``` + diff --git a/docs/ModelsAPIImageCount.md b/docs/ModelsAPIImageCount.md new file mode 100644 index 00000000..1ebc1613 --- /dev/null +++ b/docs/ModelsAPIImageCount.md @@ -0,0 +1,18 @@ +# Falcon::ModelsAPIImageCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIImageCount.new( + count: null +) +``` + diff --git a/docs/ModelsAPIImageIssuesSummary.md b/docs/ModelsAPIImageIssuesSummary.md new file mode 100644 index 00000000..99562840 --- /dev/null +++ b/docs/ModelsAPIImageIssuesSummary.md @@ -0,0 +1,34 @@ +# Falcon::ModelsAPIImageIssuesSummary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **image_container_info** | [**ModelsIssuesSummaryContainerInfo**](ModelsIssuesSummaryContainerInfo.md) | | | +| **image_detections** | [**Array<ModelsAPIDetectionCountByType>**](ModelsAPIDetectionCountByType.md) | | | +| **is_dca_run** | **Boolean** | | | +| **known_issues** | **Integer** | | | +| **packages_info** | [**ModelsImageSummaryPackagesInfo**](ModelsImageSummaryPackagesInfo.md) | | | +| **policies_summary** | [**Array<ModelsAPIPolicyCountByAction>**](ModelsAPIPolicyCountByAction.md) | | | +| **runtime_detections** | [**Array<ModelsAPIFilterLabel>**](ModelsAPIFilterLabel.md) | | | +| **vulnerabilities_summary** | [**Array<ModelsAPIVulnCountBySeverity>**](ModelsAPIVulnCountBySeverity.md) | | | +| **zero_day_impacted** | **Boolean** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIImageIssuesSummary.new( + image_container_info: null, + image_detections: null, + is_dca_run: null, + known_issues: null, + packages_info: null, + policies_summary: null, + runtime_detections: null, + vulnerabilities_summary: null, + zero_day_impacted: null +) +``` + diff --git a/docs/ModelsAPIImageVulnerabilitiesSummary.md b/docs/ModelsAPIImageVulnerabilitiesSummary.md new file mode 100644 index 00000000..8f907de9 --- /dev/null +++ b/docs/ModelsAPIImageVulnerabilitiesSummary.md @@ -0,0 +1,34 @@ +# Falcon::ModelsAPIImageVulnerabilitiesSummary + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **app_packages_with_vulnerabilities** | **Integer** | | | +| **app_vuln_by_severity** | [**Array<ModelsAPIVulnCountBySeverity>**](ModelsAPIVulnCountBySeverity.md) | | | +| **image_vuln_by_severity** | [**Array<ModelsAPIVulnCountBySeverity>**](ModelsAPIVulnCountBySeverity.md) | | | +| **layers_with_vulnerabilities** | **Integer** | | | +| **os_packages_with_vulnerabilities** | **Integer** | | | +| **os_vuln_by_severity** | [**Array<ModelsAPIVulnCountBySeverity>**](ModelsAPIVulnCountBySeverity.md) | | | +| **total_app_packages** | **Integer** | | | +| **total_os_packages** | **Integer** | | | +| **total_vulnerabilities** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIImageVulnerabilitiesSummary.new( + app_packages_with_vulnerabilities: null, + app_vuln_by_severity: null, + image_vuln_by_severity: null, + layers_with_vulnerabilities: null, + os_packages_with_vulnerabilities: null, + os_vuln_by_severity: null, + total_app_packages: null, + total_os_packages: null, + total_vulnerabilities: null +) +``` + diff --git a/docs/ModelsAPIKubernetesIOM.md b/docs/ModelsAPIKubernetesIOM.md new file mode 100644 index 00000000..2549988b --- /dev/null +++ b/docs/ModelsAPIKubernetesIOM.md @@ -0,0 +1,114 @@ +# Falcon::ModelsAPIKubernetesIOM + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **admission_review_action** | **String** | | [optional] | +| **admission_review_id** | **String** | | [optional] | +| **admission_review_msg** | **String** | | [optional] | +| **admission_review_operation** | **String** | | [optional] | +| **cid** | **String** | | | +| **cis_id** | **Array<String>** | | | +| **cluster_id** | **String** | | | +| **cluster_name** | **String** | | | +| **containers_impacted_count** | **String** | | | +| **containers_impacted_ids** | **Array<String>** | | | +| **description** | **String** | | | +| **detect_timestamp** | **String** | | | +| **detection_id** | **String** | | | +| **detection_name** | **String** | | | +| **detection_type** | **String** | | | +| **image_assessment_matched_cves** | **Array<String>** | | [optional] | +| **image_assessment_policy_description** | **String** | | [optional] | +| **image_assessment_policy_id** | **String** | | [optional] | +| **image_assessment_policy_name** | **String** | | [optional] | +| **image_digest** | **String** | | [optional] | +| **image_has_been_assessed** | **Boolean** | | [optional] | +| **image_id** | **String** | | [optional] | +| **image_registry** | **String** | | [optional] | +| **image_repository** | **String** | | [optional] | +| **image_tag** | **String** | | [optional] | +| **last_seen_timestamp** | **String** | | [optional] | +| **mitigation_id** | **String** | | [optional] | +| **mitigation_name** | **String** | | [optional] | +| **namespace** | **String** | | | +| **nist_id** | **String** | | [optional] | +| **pod_label** | **String** | | [optional] | +| **pods_impacted_count** | **String** | | [optional] | +| **policy_id** | **String** | | [optional] | +| **policy_name** | **String** | | [optional] | +| **ports** | **Array<String>** | | [optional] | +| **prevented** | **String** | | | +| **remediation** | **String** | | | +| **resource_creation_timestamp** | **String** | | | +| **resource_group_name** | **String** | | [optional] | +| **resource_id** | **String** | | | +| **resource_name** | **String** | | | +| **resource_type** | **String** | | | +| **sensitive_env_vars** | **Array<String>** | | | +| **service_type** | **String** | | [optional] | +| **severity** | **String** | | | +| **tactic_id** | **String** | | | +| **tactic_name** | **String** | | | +| **technique_id** | **String** | | | +| **technique_name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIKubernetesIOM.new( + admission_review_action: null, + admission_review_id: null, + admission_review_msg: null, + admission_review_operation: null, + cid: null, + cis_id: null, + cluster_id: null, + cluster_name: null, + containers_impacted_count: null, + containers_impacted_ids: null, + description: null, + detect_timestamp: null, + detection_id: null, + detection_name: null, + detection_type: null, + image_assessment_matched_cves: null, + image_assessment_policy_description: null, + image_assessment_policy_id: null, + image_assessment_policy_name: null, + image_digest: null, + image_has_been_assessed: null, + image_id: null, + image_registry: null, + image_repository: null, + image_tag: null, + last_seen_timestamp: null, + mitigation_id: null, + mitigation_name: null, + namespace: null, + nist_id: null, + pod_label: null, + pods_impacted_count: null, + policy_id: null, + policy_name: null, + ports: null, + prevented: null, + remediation: null, + resource_creation_timestamp: null, + resource_group_name: null, + resource_id: null, + resource_name: null, + resource_type: null, + sensitive_env_vars: null, + service_type: null, + severity: null, + tactic_id: null, + tactic_name: null, + technique_id: null, + technique_name: null +) +``` + diff --git a/docs/ModelsAPIPackageCombined.md b/docs/ModelsAPIPackageCombined.md new file mode 100644 index 00000000..22faa0c7 --- /dev/null +++ b/docs/ModelsAPIPackageCombined.md @@ -0,0 +1,32 @@ +# Falcon::ModelsAPIPackageCombined + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **all_images** | **Integer** | | | +| **cid** | **String** | | | +| **license** | **String** | | | +| **package_name_version** | **String** | | | +| **running_images** | **Integer** | | | +| **type** | **String** | | | +| **vulnerabilities** | [**Array<ModelsAPIPackageVulnerability>**](ModelsAPIPackageVulnerability.md) | | | +| **vulnerability_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPackageCombined.new( + all_images: null, + cid: null, + license: null, + package_name_version: null, + running_images: null, + type: null, + vulnerabilities: null, + vulnerability_count: null +) +``` + diff --git a/docs/ModelsAPIPackageVulnerability.md b/docs/ModelsAPIPackageVulnerability.md new file mode 100644 index 00000000..a413ccb4 --- /dev/null +++ b/docs/ModelsAPIPackageVulnerability.md @@ -0,0 +1,24 @@ +# Falcon::ModelsAPIPackageVulnerability + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cveid** | **String** | | | +| **description** | **String** | | | +| **fix_resolution** | **Array<String>** | | | +| **severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPackageVulnerability.new( + cveid: null, + description: null, + fix_resolution: null, + severity: null +) +``` + diff --git a/docs/ModelsAPIPackagesByVulnCount.md b/docs/ModelsAPIPackagesByVulnCount.md new file mode 100644 index 00000000..e6bb00de --- /dev/null +++ b/docs/ModelsAPIPackagesByVulnCount.md @@ -0,0 +1,28 @@ +# Falcon::ModelsAPIPackagesByVulnCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **images** | **Integer** | | | +| **package** | **String** | | | +| **packages_type** | **String** | | | +| **running_images** | **Integer** | | | +| **version** | **String** | | | +| **vulnerabilities** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPackagesByVulnCount.new( + images: null, + package: null, + packages_type: null, + running_images: null, + version: null, + vulnerabilities: null +) +``` + diff --git a/docs/ModelsAPIPolicyCountByAction.md b/docs/ModelsAPIPolicyCountByAction.md new file mode 100644 index 00000000..4f58cd98 --- /dev/null +++ b/docs/ModelsAPIPolicyCountByAction.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIPolicyCountByAction + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action** | **String** | | | +| **count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyCountByAction.new( + action: null, + count: null +) +``` + diff --git a/docs/ModelsAPIPolicyData.md b/docs/ModelsAPIPolicyData.md new file mode 100644 index 00000000..1fea6d8f --- /dev/null +++ b/docs/ModelsAPIPolicyData.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIPolicyData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **groups** | [**Array<ModelsAPIPolicyGroup>**](ModelsAPIPolicyGroup.md) | | | +| **rules** | [**Array<ModelsAPIPolicyRule>**](ModelsAPIPolicyRule.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyData.new( + groups: null, + rules: null +) +``` + diff --git a/docs/ModelsAPIPolicyEntity.md b/docs/ModelsAPIPolicyEntity.md new file mode 100644 index 00000000..c2afa57c --- /dev/null +++ b/docs/ModelsAPIPolicyEntity.md @@ -0,0 +1,32 @@ +# Falcon::ModelsAPIPolicyEntity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_at** | **String** | | | +| **description** | **String** | | | +| **is_enabled** | **Boolean** | | | +| **name** | **String** | | | +| **policy_data** | [**ModelsAPIPolicyData**](ModelsAPIPolicyData.md) | | [optional] | +| **policy_id** | **String** | | | +| **precedence** | **Integer** | | | +| **updated_at** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyEntity.new( + created_at: null, + description: null, + is_enabled: null, + name: null, + policy_data: null, + policy_id: null, + precedence: null, + updated_at: null +) +``` + diff --git a/docs/ModelsAPIPolicyExclusion.md b/docs/ModelsAPIPolicyExclusion.md new file mode 100644 index 00000000..9b1a211c --- /dev/null +++ b/docs/ModelsAPIPolicyExclusion.md @@ -0,0 +1,28 @@ +# Falcon::ModelsAPIPolicyExclusion + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **conditions** | [**Array<ModelsExclusionCondition>**](ModelsExclusionCondition.md) | | | +| **created_at** | **String** | | [optional] | +| **description** | **String** | | | +| **name** | **String** | | | +| **policy_type_uuid** | **String** | | | +| **updated_at** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyExclusion.new( + conditions: null, + created_at: null, + description: null, + name: null, + policy_type_uuid: null, + updated_at: null +) +``` + diff --git a/docs/ModelsAPIPolicyGroup.md b/docs/ModelsAPIPolicyGroup.md new file mode 100644 index 00000000..d703d939 --- /dev/null +++ b/docs/ModelsAPIPolicyGroup.md @@ -0,0 +1,30 @@ +# Falcon::ModelsAPIPolicyGroup + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_at** | **String** | | | +| **description** | **String** | | | +| **name** | **String** | | | +| **policy_group_data** | [**ModelsAPIPolicyGroupData**](ModelsAPIPolicyGroupData.md) | | [optional] | +| **policy_uuid** | **String** | | [optional] | +| **updated_at** | **String** | | | +| **uuid** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyGroup.new( + created_at: null, + description: null, + name: null, + policy_group_data: null, + policy_uuid: null, + updated_at: null, + uuid: null +) +``` + diff --git a/docs/ModelsAPIPolicyGroupData.md b/docs/ModelsAPIPolicyGroupData.md new file mode 100644 index 00000000..d005f494 --- /dev/null +++ b/docs/ModelsAPIPolicyGroupData.md @@ -0,0 +1,18 @@ +# Falcon::ModelsAPIPolicyGroupData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **conditions** | **Array<Object>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyGroupData.new( + conditions: null +) +``` + diff --git a/docs/ModelsAPIPolicyRule.md b/docs/ModelsAPIPolicyRule.md new file mode 100644 index 00000000..faf2caf6 --- /dev/null +++ b/docs/ModelsAPIPolicyRule.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIPolicyRule + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action** | **String** | | | +| **policy_rules_data** | [**ModelsAPIPolicyRulesData**](ModelsAPIPolicyRulesData.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyRule.new( + action: null, + policy_rules_data: null +) +``` + diff --git a/docs/ModelsAPIPolicyRulesData.md b/docs/ModelsAPIPolicyRulesData.md new file mode 100644 index 00000000..6baa2439 --- /dev/null +++ b/docs/ModelsAPIPolicyRulesData.md @@ -0,0 +1,18 @@ +# Falcon::ModelsAPIPolicyRulesData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **conditions** | **Array<Object>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPolicyRulesData.new( + conditions: null +) +``` + diff --git a/docs/ModelsAPIPrecedenceRequest.md b/docs/ModelsAPIPrecedenceRequest.md new file mode 100644 index 00000000..b11840a4 --- /dev/null +++ b/docs/ModelsAPIPrecedenceRequest.md @@ -0,0 +1,18 @@ +# Falcon::ModelsAPIPrecedenceRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **precedence** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIPrecedenceRequest.new( + precedence: null +) +``` + diff --git a/docs/ModelsAPIRuntimeDetection.md b/docs/ModelsAPIRuntimeDetection.md new file mode 100644 index 00000000..e9ec87a3 --- /dev/null +++ b/docs/ModelsAPIRuntimeDetection.md @@ -0,0 +1,124 @@ +# Falcon::ModelsAPIRuntimeDetection + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action_taken** | **String** | | | +| **agent_type** | **String** | | | +| **aid** | **String** | | | +| **assigned_to** | **String** | | | +| **cid** | **String** | | | +| **cloud** | **String** | | | +| **cloud_account_id** | **String** | | | +| **cloud_id** | **String** | | | +| **cloud_instance_id** | **String** | | | +| **cloud_name** | **String** | | | +| **cluster_name** | **String** | | | +| **command_line** | **String** | | | +| **computer_name** | **String** | | | +| **container_devices** | **Array<String>** | | | +| **container_id** | **String** | | | +| **container_interactive_mode** | **String** | | | +| **container_name** | **String** | | | +| **container_network_ip_address** | **String** | | | +| **container_privileged** | **String** | | | +| **container_read_only_root_fs** | **String** | | | +| **container_user_info** | **String** | | | +| **containers_impacted_count** | **String** | | | +| **detect_timestamp** | **String** | | | +| **detection_description** | **String** | | | +| **detection_id** | **String** | | | +| **detection_name** | **Array<String>** | | | +| **executable_sha_256** | **String** | | | +| **file_name** | **String** | | | +| **file_path** | **String** | | | +| **host_containers_count** | **String** | | | +| **host_detections_count** | **String** | | | +| **host_detections_ids** | **Array<String>** | | | +| **host_id** | **String** | | | +| **host_last_seen_timestamp** | **String** | | | +| **host_type** | **String** | | | +| **image_digest** | **String** | | | +| **image_first_seen_timestamp** | **String** | | | +| **image_id** | **String** | | | +| **image_label** | **String** | | | +| **image_last_seen_timestamp** | **String** | | | +| **image_maintainer** | **String** | | | +| **image_name** | **String** | | | +| **images_container_count** | **String** | | | +| **namespace** | **String** | | | +| **network_ip_address** | **String** | | | +| **os_version** | **String** | | | +| **pod_id** | **String** | | | +| **pod_name** | **String** | | | +| **pod_namespace** | **String** | | | +| **sensor_version** | **String** | | | +| **severity** | **String** | | | +| **tactic_and_technique** | **String** | | | +| **type** | **String** | | | +| **vulnerabilities_count** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIRuntimeDetection.new( + action_taken: null, + agent_type: null, + aid: null, + assigned_to: null, + cid: null, + cloud: null, + cloud_account_id: null, + cloud_id: null, + cloud_instance_id: null, + cloud_name: null, + cluster_name: null, + command_line: null, + computer_name: null, + container_devices: null, + container_id: null, + container_interactive_mode: null, + container_name: null, + container_network_ip_address: null, + container_privileged: null, + container_read_only_root_fs: null, + container_user_info: null, + containers_impacted_count: null, + detect_timestamp: null, + detection_description: null, + detection_id: null, + detection_name: null, + executable_sha_256: null, + file_name: null, + file_path: null, + host_containers_count: null, + host_detections_count: null, + host_detections_ids: null, + host_id: null, + host_last_seen_timestamp: null, + host_type: null, + image_digest: null, + image_first_seen_timestamp: null, + image_id: null, + image_label: null, + image_last_seen_timestamp: null, + image_maintainer: null, + image_name: null, + images_container_count: null, + namespace: null, + network_ip_address: null, + os_version: null, + pod_id: null, + pod_name: null, + pod_namespace: null, + sensor_version: null, + severity: null, + tactic_and_technique: null, + type: null, + vulnerabilities_count: null +) +``` + diff --git a/docs/ModelsAPIUnidentifiedContainer.md b/docs/ModelsAPIUnidentifiedContainer.md new file mode 100644 index 00000000..98b9c521 --- /dev/null +++ b/docs/ModelsAPIUnidentifiedContainer.md @@ -0,0 +1,58 @@ +# Falcon::ModelsAPIUnidentifiedContainer + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **assessed_images** | [**Array<ModelsImageInformation>**](ModelsImageInformation.md) | | | +| **assessed_images_count** | **String** | | | +| **cid** | **String** | | | +| **cluster_name** | **String** | | | +| **containers_impacted** | [**Array<ModelsContainerInformation>**](ModelsContainerInformation.md) | | | +| **containers_impacted_count** | **String** | | | +| **detect_timestamp** | **String** | | | +| **detections_count** | **String** | | | +| **first_seen** | **String** | | | +| **host_id** | **String** | | | +| **image_assessment_detections_count** | **String** | | | +| **last_seen** | **String** | | | +| **namespace** | **String** | | | +| **node_name** | **String** | | | +| **pod_id** | **String** | | | +| **pod_name** | **String** | | | +| **runtime_detections_count** | **String** | | | +| **severity** | **String** | | | +| **unassessed_images** | [**Array<ModelsImageInformation>**](ModelsImageInformation.md) | | | +| **unassessed_images_count** | **String** | | | +| **visible_to_k8s** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIUnidentifiedContainer.new( + assessed_images: null, + assessed_images_count: null, + cid: null, + cluster_name: null, + containers_impacted: null, + containers_impacted_count: null, + detect_timestamp: null, + detections_count: null, + first_seen: null, + host_id: null, + image_assessment_detections_count: null, + last_seen: null, + namespace: null, + node_name: null, + pod_id: null, + pod_name: null, + runtime_detections_count: null, + severity: null, + unassessed_images: null, + unassessed_images_count: null, + visible_to_k8s: null +) +``` + diff --git a/docs/ModelsAPIVulnByImageCount.md b/docs/ModelsAPIVulnByImageCount.md new file mode 100644 index 00000000..f67212cb --- /dev/null +++ b/docs/ModelsAPIVulnByImageCount.md @@ -0,0 +1,24 @@ +# Falcon::ModelsAPIVulnByImageCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cve_id** | **String** | | | +| **images_impacted** | **Integer** | | | +| **product** | **Array<String>** | | | +| **severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIVulnByImageCount.new( + cve_id: null, + images_impacted: null, + product: null, + severity: null +) +``` + diff --git a/docs/ModelsAPIVulnByPublicationDate.md b/docs/ModelsAPIVulnByPublicationDate.md new file mode 100644 index 00000000..7a6681ad --- /dev/null +++ b/docs/ModelsAPIVulnByPublicationDate.md @@ -0,0 +1,28 @@ +# Falcon::ModelsAPIVulnByPublicationDate + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **containers_impacted** | **Integer** | | | +| **cve_id** | **String** | | | +| **cvss_score** | **Float** | | | +| **images_impacted** | **Integer** | | | +| **published_date** | **String** | | | +| **severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIVulnByPublicationDate.new( + containers_impacted: null, + cve_id: null, + cvss_score: null, + images_impacted: null, + published_date: null, + severity: null +) +``` + diff --git a/docs/ModelsAPIVulnCount.md b/docs/ModelsAPIVulnCount.md new file mode 100644 index 00000000..da41ed48 --- /dev/null +++ b/docs/ModelsAPIVulnCount.md @@ -0,0 +1,18 @@ +# Falcon::ModelsAPIVulnCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIVulnCount.new( + count: null +) +``` + diff --git a/docs/ModelsAPIVulnCountBySeverity.md b/docs/ModelsAPIVulnCountBySeverity.md new file mode 100644 index 00000000..48902590 --- /dev/null +++ b/docs/ModelsAPIVulnCountBySeverity.md @@ -0,0 +1,20 @@ +# Falcon::ModelsAPIVulnCountBySeverity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count** | **Integer** | | | +| **severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIVulnCountBySeverity.new( + count: null, + severity: null +) +``` + diff --git a/docs/ModelsAPIVulnerabilityCombined.md b/docs/ModelsAPIVulnerabilityCombined.md new file mode 100644 index 00000000..10224f1e --- /dev/null +++ b/docs/ModelsAPIVulnerabilityCombined.md @@ -0,0 +1,42 @@ +# Falcon::ModelsAPIVulnerabilityCombined + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **containers_impacted** | **Integer** | | | +| **cps_current_rating** | **String** | | | +| **cve_id** | **String** | | | +| **cvss_score** | **Float** | | | +| **description** | **String** | | | +| **exploit_found** | **Boolean** | | | +| **exploited_status** | **Integer** | | | +| **exploited_status_string** | **String** | | | +| **images_impacted** | **Integer** | | | +| **packages_impacted** | **Integer** | | | +| **published_date** | **String** | | | +| **remediation_available** | **Boolean** | | | +| **severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIVulnerabilityCombined.new( + containers_impacted: null, + cps_current_rating: null, + cve_id: null, + cvss_score: null, + description: null, + exploit_found: null, + exploited_status: null, + exploited_status_string: null, + images_impacted: null, + packages_impacted: null, + published_date: null, + remediation_available: null, + severity: null +) +``` + diff --git a/docs/ModelsAPIVulnerabilityDetails.md b/docs/ModelsAPIVulnerabilityDetails.md new file mode 100644 index 00000000..14745f28 --- /dev/null +++ b/docs/ModelsAPIVulnerabilityDetails.md @@ -0,0 +1,36 @@ +# Falcon::ModelsAPIVulnerabilityDetails + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cps_current_rating** | **String** | | | +| **cve_id** | **String** | | | +| **cvss_score** | **String** | | | +| **exploited_status** | **Integer** | | | +| **layer_command** | **String** | | | +| **layer_index** | **Integer** | | | +| **package_name_version** | **String** | | | +| **package_path** | **String** | | | +| **remediation_available** | **Boolean** | | | +| **severity** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIVulnerabilityDetails.new( + cps_current_rating: null, + cve_id: null, + cvss_score: null, + exploited_status: null, + layer_command: null, + layer_index: null, + package_name_version: null, + package_path: null, + remediation_available: null, + severity: null +) +``` + diff --git a/docs/ModelsAPIVulnerabilityInfo.md b/docs/ModelsAPIVulnerabilityInfo.md new file mode 100644 index 00000000..01520bb8 --- /dev/null +++ b/docs/ModelsAPIVulnerabilityInfo.md @@ -0,0 +1,38 @@ +# Falcon::ModelsAPIVulnerabilityInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cps_current_rating** | **String** | | | +| **cve_id** | **String** | | | +| **cvss_score** | **String** | | | +| **description** | **String** | | | +| **exploit_found** | **String** | | | +| **exploited_status_string** | **String** | | | +| **images_impacted** | **Integer** | | | +| **packages** | [**Array<ModelsPackageNameVersionType>**](ModelsPackageNameVersionType.md) | | | +| **published_date** | **String** | | | +| **severity** | **String** | | | +| **threat_actors** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAPIVulnerabilityInfo.new( + cps_current_rating: null, + cve_id: null, + cvss_score: null, + description: null, + exploit_found: null, + exploited_status_string: null, + images_impacted: null, + packages: null, + published_date: null, + severity: null, + threat_actors: null +) +``` + diff --git a/docs/ModelsAccountEntitiesInput.md b/docs/ModelsAccountEntitiesInput.md new file mode 100644 index 00000000..378f08c9 --- /dev/null +++ b/docs/ModelsAccountEntitiesInput.md @@ -0,0 +1,18 @@ +# Falcon::ModelsAccountEntitiesInput + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **aws_accounts** | [**Array<DomainAWSAccountInput>**](DomainAWSAccountInput.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAccountEntitiesInput.new( + aws_accounts: null +) +``` + diff --git a/docs/ModelsAccountStatusResponse.md b/docs/ModelsAccountStatusResponse.md new file mode 100644 index 00000000..f7f02425 --- /dev/null +++ b/docs/ModelsAccountStatusResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsAccountStatusResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsSnapshotAccountStatus>**](ModelsSnapshotAccountStatus.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAccountStatusResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsAggregateValuesByFieldResponse.md b/docs/ModelsAggregateValuesByFieldResponse.md new file mode 100644 index 00000000..afdfebcc --- /dev/null +++ b/docs/ModelsAggregateValuesByFieldResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsAggregateValuesByFieldResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsAggregateValuesByFieldResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsCluster.md b/docs/ModelsCluster.md new file mode 100644 index 00000000..5dbf054b --- /dev/null +++ b/docs/ModelsCluster.md @@ -0,0 +1,60 @@ +# Falcon::ModelsCluster + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **access** | **String** | | | +| **agent_status** | **String** | | | +| **agents** | **Array<Hash>** | | | +| **cid** | **String** | | | +| **cloud_account_id** | **String** | | | +| **cloud_name** | **String** | | | +| **cloud_region** | **String** | | | +| **cluster_id** | **String** | | | +| **cluster_name** | **String** | | | +| **cluster_security_group** | **String** | | | +| **cluster_status** | **String** | | | +| **container_count** | **Integer** | | | +| **first_seen** | **String** | | | +| **kubernetes_version** | **String** | | | +| **labels_list** | **Array<String>** | | | +| **last_seen** | **String** | | | +| **management_status** | **String** | | | +| **node_count** | **Integer** | | | +| **pod_count** | **Integer** | | | +| **security_group** | **String** | | | +| **tags** | **Hash<String, String>** | | | +| **virtual_network** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsCluster.new( + access: null, + agent_status: null, + agents: null, + cid: null, + cloud_account_id: null, + cloud_name: null, + cloud_region: null, + cluster_id: null, + cluster_name: null, + cluster_security_group: null, + cluster_status: null, + container_count: null, + first_seen: null, + kubernetes_version: null, + labels_list: null, + last_seen: null, + management_status: null, + node_count: null, + pod_count: null, + security_group: null, + tags: null, + virtual_network: null +) +``` + diff --git a/docs/ModelsClusterEntityResponse.md b/docs/ModelsClusterEntityResponse.md new file mode 100644 index 00000000..6195fe71 --- /dev/null +++ b/docs/ModelsClusterEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsClusterEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsCluster>**](ModelsCluster.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsClusterEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsContainer.md b/docs/ModelsContainer.md new file mode 100644 index 00000000..ef8f96a1 --- /dev/null +++ b/docs/ModelsContainer.md @@ -0,0 +1,144 @@ +# Falcon::ModelsContainer + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **agents** | **Array<Hash>** | | [optional] | +| **allow_privilege_escalation** | **Boolean** | | [optional] | +| **cid** | **String** | | | +| **cloud** | **String** | | [optional] | +| **cloud_account_id** | **String** | | [optional] | +| **cloud_region** | **String** | | [optional] | +| **cluster_id** | **String** | | [optional] | +| **cluster_name** | **String** | | [optional] | +| **config_labels** | **String** | | [optional] | +| **config_user** | **String** | | [optional] | +| **container_image_id** | **String** | | [optional] | +| **created_at** | **Integer** | | [optional] | +| **cve_ids** | **Array<String>** | | [optional] | +| **first_seen** | **Integer** | | [optional] | +| **host_config_devices** | **String** | | [optional] | +| **id** | **String** | | | +| **image_application_package_count** | **Integer** | | [optional] | +| **image_assessed_at** | **Integer** | | [optional] | +| **image_detection_count** | **Integer** | | [optional] | +| **image_detection_id_list** | **Array<String>** | | [optional] | +| **image_detection_name_list** | **Array<String>** | | [optional] | +| **image_detection_severity_by_type** | **Hash<String, Integer>** | | [optional] | +| **image_digest** | **String** | | [optional] | +| **image_has_been_assessed** | **Boolean** | | [optional] | +| **image_highest_severity_vulnerability** | **String** | | [optional] | +| **image_id** | **String** | | [optional] | +| **image_package_count** | **Integer** | | [optional] | +| **image_registry** | **String** | | [optional] | +| **image_repo** | **String** | | [optional] | +| **image_tag** | **String** | | [optional] | +| **image_vulnerability_count** | **Integer** | | [optional] | +| **image_vulnerability_severity_by_type** | **Hash<String, Integer>** | | [optional] | +| **insecure_mount_source** | **String** | | [optional] | +| **insecure_mount_type** | **String** | | [optional] | +| **insecure_propagation_mode** | **Boolean** | | [optional] | +| **interactive_mode** | **Boolean** | | [optional] | +| **ipv4** | **String** | | [optional] | +| **ipv6** | **String** | | [optional] | +| **kpa_coverage** | **Boolean** | | [optional] | +| **labels** | **Hash<String, String>** | | [optional] | +| **labels_list** | **Array<String>** | | [optional] | +| **last_seen** | **Integer** | | [optional] | +| **linux_sensor_aid** | **String** | | [optional] | +| **linux_sensor_config_build** | **String** | | [optional] | +| **linux_sensor_coverage** | **Boolean** | | [optional] | +| **lumos_sensor_aid** | **String** | | [optional] | +| **lumos_sensor_config_build** | **String** | | [optional] | +| **lumos_sensor_coverage** | **Boolean** | | [optional] | +| **name** | **String** | | [optional] | +| **namespace** | **String** | | [optional] | +| **node_id** | **String** | | [optional] | +| **node_name** | **String** | | [optional] | +| **pod_id** | **String** | | [optional] | +| **pod_name** | **String** | | [optional] | +| **port_list** | **Array<Hash>** | | [optional] | +| **privileged** | **Boolean** | | [optional] | +| **root_write_access** | **Boolean** | | [optional] | +| **rpd** | **Array<Integer>** | | [optional] | +| **run_as_root_group** | **Boolean** | | [optional] | +| **run_as_root_user** | **Boolean** | | [optional] | +| **running_status** | **Boolean** | | [optional] | +| **snapshot_coverage** | **Boolean** | | [optional] | +| **unidentified** | **Boolean** | | [optional] | +| **volume_mounts** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainer.new( + agents: null, + allow_privilege_escalation: null, + cid: null, + cloud: null, + cloud_account_id: null, + cloud_region: null, + cluster_id: null, + cluster_name: null, + config_labels: null, + config_user: null, + container_image_id: null, + created_at: null, + cve_ids: null, + first_seen: null, + host_config_devices: null, + id: null, + image_application_package_count: null, + image_assessed_at: null, + image_detection_count: null, + image_detection_id_list: null, + image_detection_name_list: null, + image_detection_severity_by_type: null, + image_digest: null, + image_has_been_assessed: null, + image_highest_severity_vulnerability: null, + image_id: null, + image_package_count: null, + image_registry: null, + image_repo: null, + image_tag: null, + image_vulnerability_count: null, + image_vulnerability_severity_by_type: null, + insecure_mount_source: null, + insecure_mount_type: null, + insecure_propagation_mode: null, + interactive_mode: null, + ipv4: null, + ipv6: null, + kpa_coverage: null, + labels: null, + labels_list: null, + last_seen: null, + linux_sensor_aid: null, + linux_sensor_config_build: null, + linux_sensor_coverage: null, + lumos_sensor_aid: null, + lumos_sensor_config_build: null, + lumos_sensor_coverage: null, + name: null, + namespace: null, + node_id: null, + node_name: null, + pod_id: null, + pod_name: null, + port_list: null, + privileged: null, + root_write_access: null, + rpd: null, + run_as_root_group: null, + run_as_root_user: null, + running_status: null, + snapshot_coverage: null, + unidentified: null, + volume_mounts: null +) +``` + diff --git a/docs/ModelsContainerCoverage.md b/docs/ModelsContainerCoverage.md new file mode 100644 index 00000000..ede114c7 --- /dev/null +++ b/docs/ModelsContainerCoverage.md @@ -0,0 +1,20 @@ +# Falcon::ModelsContainerCoverage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **managed** | **Integer** | | | +| **unmanaged** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainerCoverage.new( + managed: null, + unmanaged: null +) +``` + diff --git a/docs/ModelsContainerCoverageResponseEntity.md b/docs/ModelsContainerCoverageResponseEntity.md new file mode 100644 index 00000000..47b88943 --- /dev/null +++ b/docs/ModelsContainerCoverageResponseEntity.md @@ -0,0 +1,22 @@ +# Falcon::ModelsContainerCoverageResponseEntity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsContainerCoverage>**](ModelsContainerCoverage.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainerCoverageResponseEntity.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsContainerEntityResponse.md b/docs/ModelsContainerEntityResponse.md new file mode 100644 index 00000000..98794a78 --- /dev/null +++ b/docs/ModelsContainerEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsContainerEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsContainer>**](ModelsContainer.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainerEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsContainerImage.md b/docs/ModelsContainerImage.md new file mode 100644 index 00000000..4c076df0 --- /dev/null +++ b/docs/ModelsContainerImage.md @@ -0,0 +1,48 @@ +# Falcon::ModelsContainerImage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | | | +| **container_count** | **Integer** | | | +| **containers_running_status** | **Hash<String, Boolean>** | | | +| **hosts** | **Array<String>** | | | +| **id** | **String** | | | +| **image_detection_count** | **Integer** | | | +| **image_digest** | **String** | | | +| **image_has_been_assessed** | **Boolean** | | | +| **image_id** | **String** | | | +| **image_name** | **String** | | | +| **image_registry** | **String** | | | +| **image_repository** | **String** | | | +| **image_tag** | **String** | | | +| **image_vulnerability_count** | **Integer** | | | +| **last_seen** | **String** | | | +| **running_container_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainerImage.new( + cid: null, + container_count: null, + containers_running_status: null, + hosts: null, + id: null, + image_detection_count: null, + image_digest: null, + image_has_been_assessed: null, + image_id: null, + image_name: null, + image_registry: null, + image_repository: null, + image_tag: null, + image_vulnerability_count: null, + last_seen: null, + running_container_count: null +) +``` + diff --git a/docs/ModelsContainerInformation.md b/docs/ModelsContainerInformation.md new file mode 100644 index 00000000..a90903ed --- /dev/null +++ b/docs/ModelsContainerInformation.md @@ -0,0 +1,20 @@ +# Falcon::ModelsContainerInformation + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **container_detection_count** | **String** | | | +| **container_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainerInformation.new( + container_detection_count: null, + container_id: null +) +``` + diff --git a/docs/ModelsContainerRuntimePivot.md b/docs/ModelsContainerRuntimePivot.md new file mode 100644 index 00000000..02fc916c --- /dev/null +++ b/docs/ModelsContainerRuntimePivot.md @@ -0,0 +1,34 @@ +# Falcon::ModelsContainerRuntimePivot + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **cid** | **String** | | | +| **cloud_name** | **String** | | | +| **cluster_name** | **String** | | | +| **container_runtime_version** | **String** | | | +| **created_at** | **String** | | | +| **first_seen** | **String** | | | +| **last_seen** | **String** | | | +| **node_name** | **String** | | | +| **pod_name** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainerRuntimePivot.new( + cid: null, + cloud_name: null, + cluster_name: null, + container_runtime_version: null, + created_at: null, + first_seen: null, + last_seen: null, + node_name: null, + pod_name: null +) +``` + diff --git a/docs/ModelsContainerRuntimePivotResponse.md b/docs/ModelsContainerRuntimePivotResponse.md new file mode 100644 index 00000000..b81c3068 --- /dev/null +++ b/docs/ModelsContainerRuntimePivotResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsContainerRuntimePivotResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsContainerRuntimePivot>**](ModelsContainerRuntimePivot.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsContainerRuntimePivotResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsCreateImageGroupRequest.md b/docs/ModelsCreateImageGroupRequest.md new file mode 100644 index 00000000..be074153 --- /dev/null +++ b/docs/ModelsCreateImageGroupRequest.md @@ -0,0 +1,24 @@ +# Falcon::ModelsCreateImageGroupRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **name** | **String** | | | +| **policy_group_data** | [**ModelsAPIPolicyGroupData**](ModelsAPIPolicyGroupData.md) | | [optional] | +| **policy_id** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsCreateImageGroupRequest.new( + description: null, + name: null, + policy_group_data: null, + policy_id: null +) +``` + diff --git a/docs/ModelsCreatePolicyRequest.md b/docs/ModelsCreatePolicyRequest.md new file mode 100644 index 00000000..0824ff77 --- /dev/null +++ b/docs/ModelsCreatePolicyRequest.md @@ -0,0 +1,20 @@ +# Falcon::ModelsCreatePolicyRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsCreatePolicyRequest.new( + description: null, + name: null +) +``` + diff --git a/docs/ModelsDefinitionCreateRequestV2.md b/docs/ModelsDefinitionCreateRequestV2.md new file mode 100644 index 00000000..528231d1 --- /dev/null +++ b/docs/ModelsDefinitionCreateRequestV2.md @@ -0,0 +1,22 @@ +# Falcon::ModelsDefinitionCreateRequestV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **definition** | [**V2Definition**](V2Definition.md) | | | +| **enabled** | **Boolean** | Specifies whether a new definition should be enabled when created, always set to false if it's imported' | | +| **flight_control** | [**DefinitionsFlightControlRequest**](DefinitionsFlightControlRequest.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsDefinitionCreateRequestV2.new( + definition: null, + enabled: null, + flight_control: null +) +``` + diff --git a/docs/ModelsDefinitionUpdateRequestV2.md b/docs/ModelsDefinitionUpdateRequestV2.md new file mode 100644 index 00000000..90479bc2 --- /dev/null +++ b/docs/ModelsDefinitionUpdateRequestV2.md @@ -0,0 +1,26 @@ +# Falcon::ModelsDefinitionUpdateRequestV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **definition** | [**V2Definition**](V2Definition.md) | | | +| **change_log** | **String** | Optional user provided description to outline the changes made as part of the update. Maximum of 500 characters. | [optional] | +| **enabled** | **Boolean** | Specifies whether a new definition should be enabled when created, always set to false if it's imported' | | +| **flight_control** | [**DefinitionsFlightControlRequest**](DefinitionsFlightControlRequest.md) | | [optional] | +| **id** | **String** | Used to identify documents across versions | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsDefinitionUpdateRequestV2.new( + definition: null, + change_log: null, + enabled: null, + flight_control: null, + id: null +) +``` + diff --git a/docs/ModelsDeployment.md b/docs/ModelsDeployment.md new file mode 100644 index 00000000..582fa859 --- /dev/null +++ b/docs/ModelsDeployment.md @@ -0,0 +1,34 @@ +# Falcon::ModelsDeployment + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_id** | **String** | | | +| **asset_identifier** | **String** | | | +| **cloud_provider** | **String** | | | +| **id** | **String** | | | +| **instance_type** | **String** | | | +| **last_updated_timestamp** | **String** | | | +| **region** | **String** | | | +| **status** | **String** | | | +| **status_detail** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsDeployment.new( + account_id: null, + asset_identifier: null, + cloud_provider: null, + id: null, + instance_type: null, + last_updated_timestamp: null, + region: null, + status: null, + status_detail: null +) +``` + diff --git a/docs/ModelsDeploymentEntityResponse.md b/docs/ModelsDeploymentEntityResponse.md new file mode 100644 index 00000000..bded7164 --- /dev/null +++ b/docs/ModelsDeploymentEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsDeploymentEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsDeployment>**](ModelsDeployment.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsDeploymentEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsExclusionCondition.md b/docs/ModelsExclusionCondition.md new file mode 100644 index 00000000..2e6f5b35 --- /dev/null +++ b/docs/ModelsExclusionCondition.md @@ -0,0 +1,30 @@ +# Falcon::ModelsExclusionCondition + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_at** | **String** | | [optional] | +| **description** | **String** | | | +| **op** | **String** | | | +| **prop** | **String** | | | +| **ttl** | **Float** | | [optional] | +| **updated_at** | **String** | | [optional] | +| **value** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsExclusionCondition.new( + created_at: null, + description: null, + op: null, + prop: null, + ttl: null, + updated_at: null, + value: null +) +``` + diff --git a/docs/ModelsExclusionConditionRequest.md b/docs/ModelsExclusionConditionRequest.md new file mode 100644 index 00000000..0a87535d --- /dev/null +++ b/docs/ModelsExclusionConditionRequest.md @@ -0,0 +1,24 @@ +# Falcon::ModelsExclusionConditionRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **prop** | **String** | | | +| **ttl** | **Float** | | [optional] | +| **value** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsExclusionConditionRequest.new( + description: null, + prop: null, + ttl: null, + value: null +) +``` + diff --git a/docs/ModelsImageInformation.md b/docs/ModelsImageInformation.md new file mode 100644 index 00000000..de450d15 --- /dev/null +++ b/docs/ModelsImageInformation.md @@ -0,0 +1,22 @@ +# Falcon::ModelsImageInformation + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **image_digest** | **String** | | | +| **image_id** | **String** | | | +| **image_name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsImageInformation.new( + image_digest: null, + image_id: null, + image_name: null +) +``` + diff --git a/docs/ModelsImageSummaryPackagesInfo.md b/docs/ModelsImageSummaryPackagesInfo.md new file mode 100644 index 00000000..a6fb8f32 --- /dev/null +++ b/docs/ModelsImageSummaryPackagesInfo.md @@ -0,0 +1,20 @@ +# Falcon::ModelsImageSummaryPackagesInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **count_with_vulnerabilities** | **Integer** | | | +| **total_count** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsImageSummaryPackagesInfo.new( + count_with_vulnerabilities: null, + total_count: null +) +``` + diff --git a/docs/ModelsIssuesSummaryContainerInfo.md b/docs/ModelsIssuesSummaryContainerInfo.md new file mode 100644 index 00000000..7ac3463c --- /dev/null +++ b/docs/ModelsIssuesSummaryContainerInfo.md @@ -0,0 +1,22 @@ +# Falcon::ModelsIssuesSummaryContainerInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **first_seen** | **Integer** | | | +| **last_seen** | **Integer** | | | +| **running_containers** | **Integer** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsIssuesSummaryContainerInfo.new( + first_seen: null, + last_seen: null, + running_containers: null +) +``` + diff --git a/docs/ModelsJobMetaData.md b/docs/ModelsJobMetaData.md deleted file mode 100644 index 14c01906..00000000 --- a/docs/ModelsJobMetaData.md +++ /dev/null @@ -1,32 +0,0 @@ -# Falcon::ModelsJobMetaData - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **cloud_provider** | **String** | | | -| **instance_id** | **String** | | | -| **job_end_time** | **Time** | | | -| **job_id** | **String** | | | -| **job_start_time** | **Time** | | | -| **message** | **String** | | | -| **scanner_version** | **String** | | | -| **status** | **String** | | | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::ModelsJobMetaData.new( - cloud_provider: null, - instance_id: null, - job_end_time: null, - job_id: null, - job_start_time: null, - message: null, - scanner_version: null, - status: null -) -``` - diff --git a/docs/ModelsLightWeightConfig.md b/docs/ModelsLightWeightConfig.md new file mode 100644 index 00000000..45038e49 --- /dev/null +++ b/docs/ModelsLightWeightConfig.md @@ -0,0 +1,32 @@ +# Falcon::ModelsLightWeightConfig + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **architecture** | **String** | | | +| **cmd** | **Array<String>** | | | +| **entry_point** | **Array<String>** | | | +| **env** | **Array<String>** | | | +| **exposed_ports** | **Hash<String, Object>** | | | +| **labels** | **Hash<String, String>** | | | +| **user** | **String** | | | +| **working_dir** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsLightWeightConfig.new( + architecture: null, + cmd: null, + entry_point: null, + env: null, + exposed_ports: null, + labels: null, + user: null, + working_dir: null +) +``` + diff --git a/docs/ModelsNode.md b/docs/ModelsNode.md new file mode 100644 index 00000000..8c5c3f52 --- /dev/null +++ b/docs/ModelsNode.md @@ -0,0 +1,86 @@ +# Falcon::ModelsNode + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **agents** | **Array<Hash>** | | | +| **annotations_list** | **Array<String>** | | | +| **architecture** | **String** | | | +| **base_image** | **String** | | | +| **cid** | **String** | | | +| **cloud_account_id** | **String** | | | +| **cloud_instance_id** | **String** | | | +| **cloud_instance_type** | **String** | | | +| **cloud_name** | **String** | | | +| **cloud_region** | **String** | | | +| **cluster_id** | **String** | | | +| **cluster_name** | **String** | | | +| **container_count** | **Integer** | | | +| **container_runtime_version** | **String** | | | +| **cpu** | **String** | | | +| **created_at** | **String** | | | +| **external_ip** | **String** | | | +| **first_seen** | **String** | | | +| **ipv4** | **String** | | | +| **ipv6** | **String** | | | +| **kernel_version** | **String** | | | +| **kubernetes_version** | **String** | | | +| **labels** | **Hash<String, String>** | | | +| **labels_list** | **Array<String>** | | | +| **last_seen** | **String** | | | +| **linux_sensor_coverage** | **Boolean** | | | +| **memory** | **String** | | | +| **node_id** | **String** | | | +| **node_name** | **String** | | | +| **os** | **String** | | | +| **pod_cidr** | **String** | | | +| **pod_count** | **Integer** | | | +| **provider_id** | **String** | | | +| **storage** | **String** | | | +| **uid** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsNode.new( + agents: null, + annotations_list: null, + architecture: null, + base_image: null, + cid: null, + cloud_account_id: null, + cloud_instance_id: null, + cloud_instance_type: null, + cloud_name: null, + cloud_region: null, + cluster_id: null, + cluster_name: null, + container_count: null, + container_runtime_version: null, + cpu: null, + created_at: null, + external_ip: null, + first_seen: null, + ipv4: null, + ipv6: null, + kernel_version: null, + kubernetes_version: null, + labels: null, + labels_list: null, + last_seen: null, + linux_sensor_coverage: null, + memory: null, + node_id: null, + node_name: null, + os: null, + pod_cidr: null, + pod_count: null, + provider_id: null, + storage: null, + uid: null +) +``` + diff --git a/docs/ModelsNodeEntityResponse.md b/docs/ModelsNodeEntityResponse.md new file mode 100644 index 00000000..22393993 --- /dev/null +++ b/docs/ModelsNodeEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsNodeEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsNode>**](ModelsNode.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsNodeEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsPackageNameVersionType.md b/docs/ModelsPackageNameVersionType.md new file mode 100644 index 00000000..a0a52f92 --- /dev/null +++ b/docs/ModelsPackageNameVersionType.md @@ -0,0 +1,26 @@ +# Falcon::ModelsPackageNameVersionType + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **package_fixed_version** | **String** | | | +| **package_name_version** | **String** | | | +| **package_os_version** | **String** | | | +| **package_remediation** | **String** | | | +| **package_type** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPackageNameVersionType.new( + package_fixed_version: null, + package_name_version: null, + package_os_version: null, + package_remediation: null, + package_type: null +) +``` + diff --git a/docs/ModelsPatchImageGroupRequest.md b/docs/ModelsPatchImageGroupRequest.md new file mode 100644 index 00000000..c37b5705 --- /dev/null +++ b/docs/ModelsPatchImageGroupRequest.md @@ -0,0 +1,22 @@ +# Falcon::ModelsPatchImageGroupRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **name** | **String** | | | +| **policy_group_data** | [**ModelsAPIPolicyGroupData**](ModelsAPIPolicyGroupData.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPatchImageGroupRequest.new( + description: null, + name: null, + policy_group_data: null +) +``` + diff --git a/docs/ModelsPatchPolicyRequest.md b/docs/ModelsPatchPolicyRequest.md new file mode 100644 index 00000000..9fed4f53 --- /dev/null +++ b/docs/ModelsPatchPolicyRequest.md @@ -0,0 +1,24 @@ +# Falcon::ModelsPatchPolicyRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | | +| **is_enabled** | **Boolean** | | | +| **name** | **String** | | | +| **policy_data** | [**ModelsRequestAPIPolicyData**](ModelsRequestAPIPolicyData.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPatchPolicyRequest.new( + description: null, + is_enabled: null, + name: null, + policy_data: null +) +``` + diff --git a/docs/ModelsPod.md b/docs/ModelsPod.md new file mode 100644 index 00000000..ce1d67f6 --- /dev/null +++ b/docs/ModelsPod.md @@ -0,0 +1,100 @@ +# Falcon::ModelsPod + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **agents** | **Array<Hash>** | | | +| **allow_privilege_escalation** | **Boolean** | | | +| **annotations_list** | **Array<String>** | | | +| **automount_service_token** | **Boolean** | | | +| **cid** | **String** | | | +| **cloud_account_id** | **String** | | | +| **cloud_name** | **String** | | | +| **cloud_region** | **String** | | | +| **cluster_id** | **String** | | | +| **cluster_name** | **String** | | | +| **container_count** | **Integer** | | | +| **containers** | **Array<Hash>** | | | +| **created_at** | **String** | | | +| **first_seen** | **String** | | | +| **host_ipc** | **Boolean** | | | +| **host_network** | **Boolean** | | | +| **host_pid** | **Boolean** | | | +| **image_pull_secrets** | **Array<String>** | | | +| **ipv4** | **String** | | | +| **ipv6** | **String** | | | +| **labels** | **Hash<String, String>** | | | +| **labels_list** | **Array<String>** | | | +| **last_seen** | **String** | | | +| **namespace** | **String** | | | +| **node_ipv4** | **String** | | | +| **node_name** | **String** | | | +| **node_selector** | **String** | | | +| **node_uid** | **String** | | | +| **owner_id** | **String** | | | +| **owner_type** | **String** | | | +| **pod_external_id** | **String** | | | +| **pod_id** | **String** | | | +| **pod_name** | **String** | | | +| **ports** | **Array<Hash>** | | | +| **privileged** | **Boolean** | | | +| **root_write_access** | **Boolean** | | | +| **run_as_root_group** | **Boolean** | | | +| **run_as_root_user** | **Boolean** | | | +| **scheduler_name** | **String** | | | +| **service_account_name** | **String** | | | +| **share_process_namespace** | **Boolean** | | | +| **volume_mounts** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPod.new( + agents: null, + allow_privilege_escalation: null, + annotations_list: null, + automount_service_token: null, + cid: null, + cloud_account_id: null, + cloud_name: null, + cloud_region: null, + cluster_id: null, + cluster_name: null, + container_count: null, + containers: null, + created_at: null, + first_seen: null, + host_ipc: null, + host_network: null, + host_pid: null, + image_pull_secrets: null, + ipv4: null, + ipv6: null, + labels: null, + labels_list: null, + last_seen: null, + namespace: null, + node_ipv4: null, + node_name: null, + node_selector: null, + node_uid: null, + owner_id: null, + owner_type: null, + pod_external_id: null, + pod_id: null, + pod_name: null, + ports: null, + privileged: null, + root_write_access: null, + run_as_root_group: null, + run_as_root_user: null, + scheduler_name: null, + service_account_name: null, + share_process_namespace: null, + volume_mounts: null +) +``` + diff --git a/docs/ModelsPodEntityResponse.md b/docs/ModelsPodEntityResponse.md new file mode 100644 index 00000000..6c7493fa --- /dev/null +++ b/docs/ModelsPodEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsPodEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsPod>**](ModelsPod.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPodEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ModelsPolicyEntityResponse.md b/docs/ModelsPolicyEntityResponse.md new file mode 100644 index 00000000..45b92b00 --- /dev/null +++ b/docs/ModelsPolicyEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsPolicyEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIPolicyEntity>**](ModelsAPIPolicyEntity.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPolicyEntityResponse.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/ModelsPolicyExclusionEntityResponse.md b/docs/ModelsPolicyExclusionEntityResponse.md new file mode 100644 index 00000000..220325c1 --- /dev/null +++ b/docs/ModelsPolicyExclusionEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsPolicyExclusionEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIPolicyExclusion>**](ModelsAPIPolicyExclusion.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPolicyExclusionEntityResponse.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/ModelsPolicyGroupEntityResponse.md b/docs/ModelsPolicyGroupEntityResponse.md new file mode 100644 index 00000000..f2361c76 --- /dev/null +++ b/docs/ModelsPolicyGroupEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::ModelsPolicyGroupEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIPolicyGroup>**](ModelsAPIPolicyGroup.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsPolicyGroupEntityResponse.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/ModelsRequestAPIPolicyData.md b/docs/ModelsRequestAPIPolicyData.md new file mode 100644 index 00000000..a0b5f8b8 --- /dev/null +++ b/docs/ModelsRequestAPIPolicyData.md @@ -0,0 +1,18 @@ +# Falcon::ModelsRequestAPIPolicyData + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **rules** | [**Array<ModelsAPIPolicyRule>**](ModelsAPIPolicyRule.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsRequestAPIPolicyData.new( + rules: null +) +``` + diff --git a/docs/ModelsScanResults.md b/docs/ModelsScanResults.md deleted file mode 100644 index 2cca7443..00000000 --- a/docs/ModelsScanResults.md +++ /dev/null @@ -1,20 +0,0 @@ -# Falcon::ModelsScanResults - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **applications** | [**Array<ModelsSnapshotInventoryApplication>**](ModelsSnapshotInventoryApplication.md) | | | -| **os_version** | **String** | | | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::ModelsScanResults.new( - applications: null, - os_version: null -) -``` - diff --git a/docs/ModelsSnapshotAccountStatus.md b/docs/ModelsSnapshotAccountStatus.md new file mode 100644 index 00000000..55b90dbe --- /dev/null +++ b/docs/ModelsSnapshotAccountStatus.md @@ -0,0 +1,32 @@ +# Falcon::ModelsSnapshotAccountStatus + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **account_id** | **String** | | | +| **account_status** | **String** | | | +| **batch_regions** | [**Array<DomainAWSBatchClusterRegion>**](DomainAWSBatchClusterRegion.md) | | | +| **cloud_provider** | **Integer** | | | +| **iam_external_id** | **String** | | | +| **iam_role_arn** | **String** | | | +| **processing_account** | **String** | | | +| **regions** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsSnapshotAccountStatus.new( + account_id: null, + account_status: null, + batch_regions: null, + cloud_provider: null, + iam_external_id: null, + iam_role_arn: null, + processing_account: null, + regions: null +) +``` + diff --git a/docs/ModelsSnapshotInventoryApplication.md b/docs/ModelsSnapshotInventoryApplication.md deleted file mode 100644 index f838e3e9..00000000 --- a/docs/ModelsSnapshotInventoryApplication.md +++ /dev/null @@ -1,34 +0,0 @@ -# Falcon::ModelsSnapshotInventoryApplication - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **major_version** | **String** | | | -| **package_hash** | **String** | | | -| **package_provider** | **String** | | | -| **package_source** | **String** | | | -| **path** | **String** | | | -| **product** | **String** | | | -| **software_architecture** | **String** | | | -| **type** | **String** | | | -| **vendor** | **String** | | | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::ModelsSnapshotInventoryApplication.new( - major_version: null, - package_hash: null, - package_provider: null, - package_source: null, - path: null, - product: null, - software_architecture: null, - type: null, - vendor: null -) -``` - diff --git a/docs/ModelsSnapshotInventoryPayload.md b/docs/ModelsSnapshotInventoryPayload.md deleted file mode 100644 index 17bd6418..00000000 --- a/docs/ModelsSnapshotInventoryPayload.md +++ /dev/null @@ -1,20 +0,0 @@ -# Falcon::ModelsSnapshotInventoryPayload - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **job_metadata** | [**ModelsJobMetaData**](ModelsJobMetaData.md) | | | -| **results** | [**ModelsScanResults**](ModelsScanResults.md) | | | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::ModelsSnapshotInventoryPayload.new( - job_metadata: null, - results: null -) -``` - diff --git a/docs/ModelsUpdateExclusionsRequest.md b/docs/ModelsUpdateExclusionsRequest.md new file mode 100644 index 00000000..c8750007 --- /dev/null +++ b/docs/ModelsUpdateExclusionsRequest.md @@ -0,0 +1,18 @@ +# Falcon::ModelsUpdateExclusionsRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **conditions** | [**Array<ModelsExclusionConditionRequest>**](ModelsExclusionConditionRequest.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ModelsUpdateExclusionsRequest.new( + conditions: null +) +``` + diff --git a/docs/MsaAggregationResult.md b/docs/MsaAggregationResult.md index bc55995b..fe44c5ee 100644 --- a/docs/MsaAggregationResult.md +++ b/docs/MsaAggregationResult.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **buckets** | [**Array<MsaAggregationResultItem>**](MsaAggregationResultItem.md) | | | +| **doc_count_error_upper_bound** | **Integer** | | [optional] | | **name** | **String** | | | | **sum_other_doc_count** | **Integer** | | [optional] | @@ -15,6 +16,7 @@ require 'crimson-falcon' instance = Falcon::MsaAggregationResult.new( buckets: null, + doc_count_error_upper_bound: null, name: null, sum_other_doc_count: null ) diff --git a/docs/OdsApi.md b/docs/OdsApi.md index 97dde1b8..2df60638 100644 --- a/docs/OdsApi.md +++ b/docs/OdsApi.md @@ -13,6 +13,7 @@ All URIs are relative to *https://api.crowdstrike.com* | [**get_malicious_files_by_ids**](OdsApi.md#get_malicious_files_by_ids) | **GET** /ods/entities/malicious-files/v1 | Get malicious files by ids. | | [**get_scan_host_metadata_by_ids**](OdsApi.md#get_scan_host_metadata_by_ids) | **GET** /ods/entities/scan-hosts/v1 | Get scan hosts by ids. | | [**get_scans_by_scan_ids**](OdsApi.md#get_scans_by_scan_ids) | **GET** /ods/entities/scans/v1 | Get Scans by IDs. | +| [**get_scans_by_scan_ids_v2**](OdsApi.md#get_scans_by_scan_ids_v2) | **GET** /ods/entities/scans/v2 | Get Scans by IDs. | | [**get_scheduled_scans_by_scan_ids**](OdsApi.md#get_scheduled_scans_by_scan_ids) | **GET** /ods/entities/scheduled-scans/v1 | Get ScheduledScans by IDs. | | [**query_malicious_files**](OdsApi.md#query_malicious_files) | **GET** /ods/queries/malicious-files/v1 | Query malicious files. | | [**query_scan_host_metadata**](OdsApi.md#query_scan_host_metadata) | **GET** /ods/queries/scan-hosts/v1 | Query scan hosts. | @@ -646,6 +647,75 @@ end - **Accept**: application/json +## get_scans_by_scan_ids_v2 + +> get_scans_by_scan_ids_v2(ids) + +Get Scans 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::OdsApi.new +ids = ['inner_example'] # Array | The scan IDs to retrieve the scan entities + +begin + # Get Scans by IDs. + result = api_instance.get_scans_by_scan_ids_v2(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling OdsApi->get_scans_by_scan_ids_v2: #{e}" +end +``` + +#### Using the get_scans_by_scan_ids_v2_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_scans_by_scan_ids_v2_with_http_info(ids) + +```ruby +begin + # Get Scans by IDs. + data, status_code, headers = api_instance.get_scans_by_scan_ids_v2_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling OdsApi->get_scans_by_scan_ids_v2_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | The scan IDs to retrieve the scan entities | | + +### Return type + +[**EntitiesODSScanResponseV2**](EntitiesODSScanResponseV2.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## get_scheduled_scans_by_scan_ids > get_scheduled_scans_by_scan_ids(ids) @@ -813,7 +883,7 @@ end api_instance = Falcon::OdsApi.new opts = { - filter: 'filter_example', # String | A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated] + filter: 'filter_example', # String | A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated scan_control_reason] offset: 56, # Integer | Index of the starting resource limit: 56, # Integer | The max number of resources to return sort: 'id|asc' # String | The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" @@ -850,7 +920,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated] | [optional] | +| **filter** | **String** | A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated scan_control_reason] | [optional] | | **offset** | **Integer** | Index of the starting resource | [optional][default to 0] | | **limit** | **Integer** | The max number of resources to return | [optional][default to 500] | | **sort** | **String** | The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" | [optional][default to 'last_updated|desc'] | @@ -890,7 +960,7 @@ end api_instance = Falcon::OdsApi.new opts = { - filter: 'filter_example', # String | A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated] + filter: 'filter_example', # String | A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated targeted_host_count missing_host_count] offset: 56, # Integer | Index of the starting resource limit: 56, # Integer | The max number of resources to return sort: 'id|asc' # String | The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" @@ -927,7 +997,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated] | [optional] | +| **filter** | **String** | A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated targeted_host_count missing_host_count] | [optional] | | **offset** | **Integer** | Index of the starting resource | [optional][default to 0] | | **limit** | **Integer** | The max number of resources to return | [optional][default to 500] | | **sort** | **String** | The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" | [optional][default to 'created_on|desc'] | @@ -1043,7 +1113,7 @@ Falcon.configure do |config| end api_instance = Falcon::OdsApi.new -body = Falcon::EntitiesODSScheduleScanRequest.new({cloud_ml_level_detection: 37, cloud_ml_level_prevention: 37, cpu_priority: 37, description: 'description_example', endpoint_notification: false, file_paths: ['file_paths_example'], host_groups: ['host_groups_example'], initiated_from: 'initiated_from_example', max_duration: 37, max_file_size: 37, pause_duration: 37, quarantine: false, scan_exclusions: ['scan_exclusions_example'], scan_inclusions: ['scan_inclusions_example'], schedule: Falcon::DomainSchedule.new({can_stagger: false, definition: 'definition_example', display: 'display_example'}), sensor_ml_level_detection: 37, sensor_ml_level_prevention: 37}) # EntitiesODSScheduleScanRequest | +body = Falcon::EntitiesODSScheduleScanRequest.new({cloud_ml_level_detection: 37, cloud_ml_level_prevention: 37, cpu_priority: 37, description: 'description_example', endpoint_notification: false, file_paths: ['file_paths_example'], host_groups: ['host_groups_example'], initiated_from: 'initiated_from_example', max_duration: 37, max_file_size: 37, pause_duration: 37, quarantine: false, scan_exclusions: ['scan_exclusions_example'], scan_inclusions: ['scan_inclusions_example'], schedule: Falcon::DomainSchedule.new, sensor_ml_level_detection: 37, sensor_ml_level_prevention: 37}) # EntitiesODSScheduleScanRequest | begin # Create ODS scan and start or schedule scan for the given scan request. diff --git a/docs/PackagesApiCombinedPackage.md b/docs/PackagesApiCombinedPackage.md new file mode 100644 index 00000000..53bc6902 --- /dev/null +++ b/docs/PackagesApiCombinedPackage.md @@ -0,0 +1,22 @@ +# Falcon::PackagesApiCombinedPackage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIPackageCombined>**](ModelsAPIPackageCombined.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PackagesApiCombinedPackage.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PackagesApiCombinedPackageExport.md b/docs/PackagesApiCombinedPackageExport.md new file mode 100644 index 00000000..0bdef11f --- /dev/null +++ b/docs/PackagesApiCombinedPackageExport.md @@ -0,0 +1,22 @@ +# Falcon::PackagesApiCombinedPackageExport + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIPackageCombined>**](ModelsAPIPackageCombined.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PackagesApiCombinedPackageExport.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PackagesApiPackagesByVulnCount.md b/docs/PackagesApiPackagesByVulnCount.md new file mode 100644 index 00000000..81d14858 --- /dev/null +++ b/docs/PackagesApiPackagesByVulnCount.md @@ -0,0 +1,22 @@ +# Falcon::PackagesApiPackagesByVulnCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<ModelsAPIPackagesByVulnCount>**](ModelsAPIPackagesByVulnCount.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PackagesApiPackagesByVulnCount.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/ParameterActivityConfigParameterValue.md b/docs/ParameterActivityConfigParameterValue.md new file mode 100644 index 00000000..eb7fa8e3 --- /dev/null +++ b/docs/ParameterActivityConfigParameterValue.md @@ -0,0 +1,22 @@ +# Falcon::ParameterActivityConfigParameterValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **default_value** | **Object** | | [optional] | +| **deny_override** | **Boolean** | Specifies whether the given activity configuration property can be overridden at provisioning time. | [optional] | +| **required** | **Boolean** | Indication of whether the property must be specified as a parameter during template provisioning. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterActivityConfigParameterValue.new( + default_value: null, + deny_override: null, + required: null +) +``` + diff --git a/docs/ParameterActivityConfigProvisionParameter.md b/docs/ParameterActivityConfigProvisionParameter.md new file mode 100644 index 00000000..73b8822c --- /dev/null +++ b/docs/ParameterActivityConfigProvisionParameter.md @@ -0,0 +1,20 @@ +# Falcon::ParameterActivityConfigProvisionParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **node_id** | **String** | The node_id of the activity in the model that is to be configured. | | +| **properties** | **Object** | The configurable properties of the activity and their accompanying metadata. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterActivityConfigProvisionParameter.new( + node_id: null, + properties: null +) +``` + diff --git a/docs/ParameterActivityProvisionParameters.md b/docs/ParameterActivityProvisionParameters.md new file mode 100644 index 00000000..35567a0d --- /dev/null +++ b/docs/ParameterActivityProvisionParameters.md @@ -0,0 +1,20 @@ +# Falcon::ParameterActivityProvisionParameters + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **configuration** | [**Array<ParameterActivityConfigProvisionParameter>**](ParameterActivityConfigProvisionParameter.md) | provisioning parameterization of activity configuration. | [optional] | +| **selection** | [**Array<ParameterActivitySelectionParameter>**](ParameterActivitySelectionParameter.md) | provisioning parameterization of activity selection. | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterActivityProvisionParameters.new( + configuration: null, + selection: null +) +``` + diff --git a/docs/ParameterActivitySelectionParameter.md b/docs/ParameterActivitySelectionParameter.md new file mode 100644 index 00000000..dc9b6560 --- /dev/null +++ b/docs/ParameterActivitySelectionParameter.md @@ -0,0 +1,22 @@ +# Falcon::ParameterActivitySelectionParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | A static activity ID that is a suitable candidate for specifying at provisioning time. | | +| **properties** | **Object** | Statically defines properties that will be applied to the referenced activity. | | +| **source** | **String** | The ID of the node in the model the activity should be bound to at provisioning time. The activity will be generated along with a flow node that connects it to this source node. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterActivitySelectionParameter.new( + id: null, + properties: null, + source: null +) +``` + diff --git a/docs/ParameterConditionFieldParameter.md b/docs/ParameterConditionFieldParameter.md new file mode 100644 index 00000000..e1501232 --- /dev/null +++ b/docs/ParameterConditionFieldParameter.md @@ -0,0 +1,26 @@ +# Falcon::ParameterConditionFieldParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **default_operator** | **String** | Optional default operator to be used as part of the condition | [optional] | +| **default_value** | **Object** | | [optional] | +| **multiple** | **Boolean** | Whether the field can be specified multiple times as provisioning parameter. When true, all values or combined via an OR operator. | | +| **operator** | **String** | The default operator that should be applied for this field. | [optional] | +| **required** | **Boolean** | Indicates whether the field must be specified as a parameter at provision time. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterConditionFieldParameter.new( + default_operator: null, + default_value: null, + multiple: null, + operator: null, + required: null +) +``` + diff --git a/docs/ParameterConditionFieldProvisionParameter.md b/docs/ParameterConditionFieldProvisionParameter.md new file mode 100644 index 00000000..3d1afc84 --- /dev/null +++ b/docs/ParameterConditionFieldProvisionParameter.md @@ -0,0 +1,22 @@ +# Falcon::ParameterConditionFieldProvisionParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | Fully qualified name of the field | | +| **operator** | **String** | Optional operator to be used as part of the condition. It not supplied the default in the template will be used. | | +| **value** | **Object** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterConditionFieldProvisionParameter.new( + name: null, + operator: null, + value: null +) +``` + diff --git a/docs/ParameterConditionProvisionParameter.md b/docs/ParameterConditionProvisionParameter.md new file mode 100644 index 00000000..6f8cf9ba --- /dev/null +++ b/docs/ParameterConditionProvisionParameter.md @@ -0,0 +1,20 @@ +# Falcon::ParameterConditionProvisionParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **fields** | [**Array<ParameterConditionFieldProvisionParameter>**](ParameterConditionFieldProvisionParameter.md) | details for the condition fields to be set when provisioning. | | +| **node_id** | **String** | The flow node_id in the model this condition is associated with. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterConditionProvisionParameter.new( + fields: null, + node_id: null +) +``` + diff --git a/docs/ParameterTemplateProvisionParameters.md b/docs/ParameterTemplateProvisionParameters.md new file mode 100644 index 00000000..6d89d653 --- /dev/null +++ b/docs/ParameterTemplateProvisionParameters.md @@ -0,0 +1,22 @@ +# Falcon::ParameterTemplateProvisionParameters + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **activities** | [**ParameterActivityProvisionParameters**](ParameterActivityProvisionParameters.md) | | [optional] | +| **conditions** | [**Array<ParameterConditionProvisionParameter>**](ParameterConditionProvisionParameter.md) | set of parameters for provisioning of conditions within the associated template. | [optional] | +| **trigger** | [**ParameterTriggerProvisionParameter**](ParameterTriggerProvisionParameter.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterTemplateProvisionParameters.new( + activities: null, + conditions: null, + trigger: null +) +``` + diff --git a/docs/ParameterTriggerFieldParameter.md b/docs/ParameterTriggerFieldParameter.md new file mode 100644 index 00000000..5f297e01 --- /dev/null +++ b/docs/ParameterTriggerFieldParameter.md @@ -0,0 +1,22 @@ +# Falcon::ParameterTriggerFieldParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **default_value** | **Object** | | [optional] | +| **properties** | **Object** | Values associated with trigger property received during provisioning call. | [optional] | +| **required** | **Boolean** | Indicates whether the field must be specified as a parameter at provision time. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterTriggerFieldParameter.new( + default_value: null, + properties: null, + required: null +) +``` + diff --git a/docs/ParameterTriggerParameter.md b/docs/ParameterTriggerParameter.md new file mode 100644 index 00000000..7bd4922d --- /dev/null +++ b/docs/ParameterTriggerParameter.md @@ -0,0 +1,20 @@ +# Falcon::ParameterTriggerParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **fields** | [**Hash<String, ParameterTriggerFieldParameter>**](ParameterTriggerFieldParameter.md) | Contains a mapping of each parameterized trigger field with default values. | | +| **node_id** | **String** | The graph node ID for where these conditions reside. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterTriggerParameter.new( + fields: null, + node_id: null +) +``` + diff --git a/docs/ParameterTriggerProvisionParameter.md b/docs/ParameterTriggerProvisionParameter.md new file mode 100644 index 00000000..9ae2bcee --- /dev/null +++ b/docs/ParameterTriggerProvisionParameter.md @@ -0,0 +1,20 @@ +# Falcon::ParameterTriggerProvisionParameter + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **fields** | [**Hash<String, ParameterTriggerFieldParameter>**](ParameterTriggerFieldParameter.md) | Contains a mapping of each parameterized trigger field with default values. | | +| **node_id** | **String** | The flow node_id in the model this condition is associated with. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ParameterTriggerProvisionParameter.new( + fields: null, + node_id: null +) +``` + diff --git a/docs/PoliciesAssignedHostGroup.md b/docs/PoliciesAssignedHostGroup.md new file mode 100644 index 00000000..1dfa4330 --- /dev/null +++ b/docs/PoliciesAssignedHostGroup.md @@ -0,0 +1,20 @@ +# Falcon::PoliciesAssignedHostGroup + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **href** | **String** | | | +| **id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesAssignedHostGroup.new( + href: null, + id: null +) +``` + diff --git a/docs/PoliciesAssignedRuleGroup.md b/docs/PoliciesAssignedRuleGroup.md new file mode 100644 index 00000000..7722f932 --- /dev/null +++ b/docs/PoliciesAssignedRuleGroup.md @@ -0,0 +1,20 @@ +# Falcon::PoliciesAssignedRuleGroup + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **href** | **String** | | | +| **id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesAssignedRuleGroup.new( + href: null, + id: null +) +``` + diff --git a/docs/PoliciesCreateRequest.md b/docs/PoliciesCreateRequest.md new file mode 100644 index 00000000..ab50cbf8 --- /dev/null +++ b/docs/PoliciesCreateRequest.md @@ -0,0 +1,22 @@ +# Falcon::PoliciesCreateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **name** | **String** | | | +| **platform** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesCreateRequest.new( + description: null, + name: null, + platform: null +) +``` + diff --git a/docs/PoliciesDeleteResponse.md b/docs/PoliciesDeleteResponse.md new file mode 100644 index 00000000..25ca175a --- /dev/null +++ b/docs/PoliciesDeleteResponse.md @@ -0,0 +1,22 @@ +# Falcon::PoliciesDeleteResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesDeleteResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PoliciesPolicy.md b/docs/PoliciesPolicy.md new file mode 100644 index 00000000..5ede3f8a --- /dev/null +++ b/docs/PoliciesPolicy.md @@ -0,0 +1,40 @@ +# Falcon::PoliciesPolicy + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_by** | **String** | | [optional] | +| **created_timestamp** | **String** | | | +| **description** | **String** | | [optional] | +| **enabled** | **Boolean** | | | +| **host_groups** | [**Array<PoliciesAssignedHostGroup>**](PoliciesAssignedHostGroup.md) | | [optional] | +| **id** | **String** | | | +| **modified_by** | **String** | | | +| **modified_timestamp** | **String** | | | +| **name** | **String** | | [optional] | +| **platform** | **String** | | [optional] | +| **precedence** | **Integer** | | [optional] | +| **rule_groups** | [**Array<PoliciesAssignedRuleGroup>**](PoliciesAssignedRuleGroup.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesPolicy.new( + created_by: null, + created_timestamp: null, + description: null, + enabled: null, + host_groups: null, + id: null, + modified_by: null, + modified_timestamp: null, + name: null, + platform: null, + precedence: null, + rule_groups: null +) +``` + diff --git a/docs/PoliciesPrecedenceResponse.md b/docs/PoliciesPrecedenceResponse.md new file mode 100644 index 00000000..3d8a129f --- /dev/null +++ b/docs/PoliciesPrecedenceResponse.md @@ -0,0 +1,22 @@ +# Falcon::PoliciesPrecedenceResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesPrecedenceResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PoliciesResponse.md b/docs/PoliciesResponse.md new file mode 100644 index 00000000..756a29cf --- /dev/null +++ b/docs/PoliciesResponse.md @@ -0,0 +1,22 @@ +# Falcon::PoliciesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<PoliciesPolicy>**](PoliciesPolicy.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/PoliciesUpdateRequest.md b/docs/PoliciesUpdateRequest.md new file mode 100644 index 00000000..2721ca08 --- /dev/null +++ b/docs/PoliciesUpdateRequest.md @@ -0,0 +1,24 @@ +# Falcon::PoliciesUpdateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **enabled** | **Boolean** | | [optional] | +| **id** | **String** | | | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::PoliciesUpdateRequest.new( + description: null, + enabled: null, + id: null, + name: null +) +``` + diff --git a/docs/PublicGroup.md b/docs/PublicGroup.md deleted file mode 100644 index 992cc1f3..00000000 --- a/docs/PublicGroup.md +++ /dev/null @@ -1,20 +0,0 @@ -# Falcon::PublicGroup - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **after** | [**PublicAfter**](PublicAfter.md) | | [optional] | -| **before** | [**PublicBefore**](PublicBefore.md) | | [optional] | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::PublicGroup.new( - after: null, - before: null -) -``` - diff --git a/docs/PublicOwner.md b/docs/PublicOwner.md deleted file mode 100644 index d673e2b5..00000000 --- a/docs/PublicOwner.md +++ /dev/null @@ -1,20 +0,0 @@ -# Falcon::PublicOwner - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **after** | [**PublicAfter**](PublicAfter.md) | | [optional] | -| **before** | [**PublicBefore**](PublicBefore.md) | | [optional] | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::PublicOwner.new( - after: null, - before: null -) -``` - diff --git a/docs/PublicPermissionsLin.md b/docs/PublicPermissionsLin.md deleted file mode 100644 index 66ea802e..00000000 --- a/docs/PublicPermissionsLin.md +++ /dev/null @@ -1,28 +0,0 @@ -# Falcon::PublicPermissionsLin - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **acl** | [**Array<PublicACL>**](PublicACL.md) | | [optional] | -| **basic** | [**Array<PublicBasic>**](PublicBasic.md) | | [optional] | -| **default_acl** | [**Array<PublicACL>**](PublicACL.md) | | [optional] | -| **group** | [**PublicGroup**](PublicGroup.md) | | [optional] | -| **owner** | [**PublicOwner**](PublicOwner.md) | | [optional] | -| **security_info** | **Integer** | | [optional] | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::PublicPermissionsLin.new( - acl: null, - basic: null, - default_acl: null, - group: null, - owner: null, - security_info: null -) -``` - diff --git a/docs/QuarantineQuarantinedFile.md b/docs/QuarantineQuarantinedFile.md index ebc89f8c..40acd48a 100644 --- a/docs/QuarantineQuarantinedFile.md +++ b/docs/QuarantineQuarantinedFile.md @@ -5,6 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **aid** | **String** | | [optional] | +| **alert_ids** | **Array<String>** | | [optional] | | **cid** | **String** | | [optional] | | **date_created** | **String** | | [optional] | | **date_updated** | **String** | | [optional] | @@ -29,6 +30,7 @@ require 'crimson-falcon' instance = Falcon::QuarantineQuarantinedFile.new( aid: null, + alert_ids: null, cid: null, date_created: null, date_updated: null, diff --git a/docs/RealTimeResponseAdminApi.md b/docs/RealTimeResponseAdminApi.md index 85b56505..bcd97d77 100644 --- a/docs/RealTimeResponseAdminApi.md +++ b/docs/RealTimeResponseAdminApi.md @@ -11,10 +11,12 @@ All URIs are relative to *https://api.crowdstrike.com* | [**r_tr_delete_put_files**](RealTimeResponseAdminApi.md#r_tr_delete_put_files) | **DELETE** /real-time-response/entities/put-files/v1 | Delete a put-file based on the ID given. Can only delete one file at a time. | | [**r_tr_delete_scripts**](RealTimeResponseAdminApi.md#r_tr_delete_scripts) | **DELETE** /real-time-response/entities/scripts/v1 | Delete a custom-script based on the ID given. Can only delete one script at a time. | | [**r_tr_execute_admin_command**](RealTimeResponseAdminApi.md#r_tr_execute_admin_command) | **POST** /real-time-response/entities/admin-command/v1 | Execute a RTR administrator command on a single host. | +| [**r_tr_get_falcon_scripts**](RealTimeResponseAdminApi.md#r_tr_get_falcon_scripts) | **GET** /real-time-response/entities/falcon-scripts/v1 | Get Falcon scripts with metadata and content of script | | [**r_tr_get_put_files**](RealTimeResponseAdminApi.md#r_tr_get_put_files) | **GET** /real-time-response/entities/put-files/v1 | Get put-files based on the ID's given. These are used for the RTR `put` command. | | [**r_tr_get_put_files_v2**](RealTimeResponseAdminApi.md#r_tr_get_put_files_v2) | **GET** /real-time-response/entities/put-files/v2 | Get put-files based on the ID's given. These are used for the RTR `put` command. | | [**r_tr_get_scripts**](RealTimeResponseAdminApi.md#r_tr_get_scripts) | **GET** /real-time-response/entities/scripts/v1 | Get custom-scripts based on the ID's given. These are used for the RTR `runscript` command. | | [**r_tr_get_scripts_v2**](RealTimeResponseAdminApi.md#r_tr_get_scripts_v2) | **GET** /real-time-response/entities/scripts/v2 | Get custom-scripts based on the ID's given. These are used for the RTR `runscript` command. | +| [**r_tr_list_falcon_scripts**](RealTimeResponseAdminApi.md#r_tr_list_falcon_scripts) | **GET** /real-time-response/queries/falcon-scripts/v1 | Get a list of Falcon script IDs available to the user to run | | [**r_tr_list_put_files**](RealTimeResponseAdminApi.md#r_tr_list_put_files) | **GET** /real-time-response/queries/put-files/v1 | Get a list of put-file ID's that are available to the user for the `put` command. | | [**r_tr_list_scripts**](RealTimeResponseAdminApi.md#r_tr_list_scripts) | **GET** /real-time-response/queries/scripts/v1 | Get a list of custom-script ID's that are available to the user for the `runscript` command. | | [**r_tr_update_scripts**](RealTimeResponseAdminApi.md#r_tr_update_scripts) | **PATCH** /real-time-response/entities/scripts/v1 | Upload a new scripts to replace an existing one. | @@ -535,6 +537,75 @@ end - **Accept**: application/json +## r_tr_get_falcon_scripts + +> r_tr_get_falcon_scripts(ids) + +Get Falcon scripts with metadata and content of script + +### 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::RealTimeResponseAdminApi.new +ids = ['inner_example'] # Array | IDs of the Falcon scripts you want to retrieve + +begin + # Get Falcon scripts with metadata and content of script + result = api_instance.r_tr_get_falcon_scripts(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling RealTimeResponseAdminApi->r_tr_get_falcon_scripts: #{e}" +end +``` + +#### Using the r_tr_get_falcon_scripts_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> r_tr_get_falcon_scripts_with_http_info(ids) + +```ruby +begin + # Get Falcon scripts with metadata and content of script + data, status_code, headers = api_instance.r_tr_get_falcon_scripts_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling RealTimeResponseAdminApi->r_tr_get_falcon_scripts_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | IDs of the Falcon scripts you want to retrieve | | + +### Return type + +[**EmpowerapiMsaFalconScriptResponse**](EmpowerapiMsaFalconScriptResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## r_tr_get_put_files > r_tr_get_put_files(ids) @@ -811,6 +882,83 @@ end - **Accept**: application/json +## r_tr_list_falcon_scripts + +> r_tr_list_falcon_scripts(opts) + +Get a list of Falcon script IDs available to the user to run + +### 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::RealTimeResponseAdminApi.new +opts = { + filter: 'filter_example', # String | Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + offset: 56, # Integer | Starting index of overall result set from which to return ids. + limit: 56, # Integer | Number of ids to return. + sort: 'created_timestamp' # String | Sort by spec. Ex: 'created_at|asc'. +} + +begin + # Get a list of Falcon script IDs available to the user to run + result = api_instance.r_tr_list_falcon_scripts(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling RealTimeResponseAdminApi->r_tr_list_falcon_scripts: #{e}" +end +``` + +#### Using the r_tr_list_falcon_scripts_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> r_tr_list_falcon_scripts_with_http_info(opts) + +```ruby +begin + # Get a list of Falcon script IDs available to the user to run + data, status_code, headers = api_instance.r_tr_list_falcon_scripts_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling RealTimeResponseAdminApi->r_tr_list_falcon_scripts_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). | [optional] | +| **offset** | **Integer** | Starting index of overall result set from which to return ids. | [optional] | +| **limit** | **Integer** | Number of ids to return. | [optional] | +| **sort** | **String** | Sort by spec. Ex: 'created_at|asc'. | [optional] | + +### Return type + +[**EmpowerapiMsaIDListResponse**](EmpowerapiMsaIDListResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + ## r_tr_list_put_files > r_tr_list_put_files(opts) diff --git a/docs/RealTimeResponseAuditApi.md b/docs/RealTimeResponseAuditApi.md new file mode 100644 index 00000000..9ab97c1b --- /dev/null +++ b/docs/RealTimeResponseAuditApi.md @@ -0,0 +1,87 @@ +# Falcon::RealTimeResponseAuditApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**r_tr_audit_sessions**](RealTimeResponseAuditApi.md#r_tr_audit_sessions) | **GET** /real-time-response-audit/combined/sessions/v1 | Get all the RTR sessions created for a customer in a specified duration | + + +## r_tr_audit_sessions + +> r_tr_audit_sessions(opts) + +Get all the RTR sessions created for a customer in a specified duration + +### 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::RealTimeResponseAuditApi.new +opts = { + filter: 'filter_example', # String | Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + sort: 'created_at', # String | how to sort the session IDs. e.g. sort=created_at|desc will sort the results based on createdAt in descending order + limit: 'limit_example', # String | number of sessions to be returned + offset: 'offset_example', # String | offset value to be used for paginated results + with_command_info: true # Boolean | get sessions with command info included; by default sessions are returned without command info which include cloud_request_ids and logs fields +} + +begin + # Get all the RTR sessions created for a customer in a specified duration + result = api_instance.r_tr_audit_sessions(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling RealTimeResponseAuditApi->r_tr_audit_sessions: #{e}" +end +``` + +#### Using the r_tr_audit_sessions_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> r_tr_audit_sessions_with_http_info(opts) + +```ruby +begin + # Get all the RTR sessions created for a customer in a specified duration + data, status_code, headers = api_instance.r_tr_audit_sessions_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling RealTimeResponseAuditApi->r_tr_audit_sessions_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). | [optional] | +| **sort** | **String** | how to sort the session IDs. e.g. sort=created_at|desc will sort the results based on createdAt in descending order | [optional] | +| **limit** | **String** | number of sessions to be returned | [optional] | +| **offset** | **String** | offset value to be used for paginated results | [optional] | +| **with_command_info** | **Boolean** | get sessions with command info included; by default sessions are returned without command info which include cloud_request_ids and logs fields | [optional][default to false] | + +### Return type + +[**DomainSessionResponseWrapper**](DomainSessionResponseWrapper.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ReconApi.md b/docs/ReconApi.md index 18d14d34..9dd21662 100644 --- a/docs/ReconApi.md +++ b/docs/ReconApi.md @@ -4,7 +4,7 @@ All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**aggregate_notifications_exposed_data_records_v1**](ReconApi.md#aggregate_notifications_exposed_data_records_v1) | **POST** /recon/aggregates/notifications-exposed-data-records/GET/v1 | Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] | +| [**aggregate_notifications_exposed_data_records_v1**](ReconApi.md#aggregate_notifications_exposed_data_records_v1) | **POST** /recon/aggregates/notifications-exposed-data-records/GET/v1 | Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] | | [**aggregate_notifications_v1**](ReconApi.md#aggregate_notifications_v1) | **POST** /recon/aggregates/notifications/GET/v1 | Get notification aggregates as specified via JSON in request body. | | [**create_actions_v1**](ReconApi.md#create_actions_v1) | **POST** /recon/entities/actions/v1 | Create actions for a monitoring rule. Accepts a list of actions that will be attached to the monitoring rule. | | [**create_export_jobs_v1**](ReconApi.md#create_export_jobs_v1) | **POST** /recon/entities/exports/v1 | Launch asynchronous export job. Use the job ID to poll the status of the job using GET /entities/exports/v1. | @@ -36,7 +36,7 @@ All URIs are relative to *https://api.crowdstrike.com* > aggregate_notifications_exposed_data_records_v1(body) -Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] +Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] ### Examples @@ -55,7 +55,7 @@ api_instance = Falcon::ReconApi.new body = [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [Falcon::MsaAggregateQueryRequest.new({date_ranges: [Falcon::MsaDateRangeSpec.new({from: 'from_example', to: 'to_example'})], exclude: 'exclude_example', field: 'field_example', filter: 'filter_example', from: 37, include: 'include_example', interval: 'interval_example', missing: 'missing_example', name: 'name_example', q: 'q_example', ranges: [Falcon::MsaRangeSpec.new({from: 3.56, to: 3.56})], size: 37, sort: 'sort_example', sub_aggregates: [], time_zone: 'time_zone_example', type: 'type_example'})], time_zone: 'time_zone_example', type: 'type_example'})] # Array | begin - # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] + # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] result = api_instance.aggregate_notifications_exposed_data_records_v1(body) p result rescue Falcon::ApiError => e @@ -71,7 +71,7 @@ This returns an Array which contains the response data, status code and headers. ```ruby begin - # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] + # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] data, status_code, headers = api_instance.aggregate_notifications_exposed_data_records_v1_with_http_info(body) p status_code # => 2xx p headers # => { ... } @@ -1450,7 +1450,7 @@ opts = { offset: 56, # Integer | Starting index of overall result set from which to return ids. limit: 56, # Integer | Number of IDs to return. Offset + limit should NOT be above 10K. sort: 'sort_example', # String | Possible order by fields: created_date, updated_date. Ex: 'updated_date|desc'. - filter: 'filter_example', # String | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id _all] + filter: 'filter_example', # String | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id credential_status _all bot.operating_system.hardware_id bot.bot_id] q: 'q_example' # String | Free text search across all indexed fields. } @@ -1488,7 +1488,7 @@ end | **offset** | **Integer** | Starting index of overall result set from which to return ids. | [optional] | | **limit** | **Integer** | Number of IDs to return. Offset + limit should NOT be above 10K. | [optional] | | **sort** | **String** | Possible order by fields: created_date, updated_date. Ex: 'updated_date|desc'. | [optional] | -| **filter** | **String** | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id _all] | [optional] | +| **filter** | **String** | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id credential_status _all bot.operating_system.hardware_id bot.bot_id] | [optional] | | **q** | **String** | Free text search across all indexed fields. | [optional] | ### Return type @@ -1529,7 +1529,7 @@ opts = { offset: 56, # Integer | Starting index of overall result set from which to return IDs. limit: 56, # Integer | Number of IDs to return. Offset + limit should NOT be above 10K. sort: 'sort_example', # String | Possible order by fields: `created_date`, `updated_date`. Ex: `updated_date|desc`. - filter: 'filter_example', # String | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid] + filter: 'filter_example', # String | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid breach_summary.credential_statuses breach_summary.is_retroactively_deduped] q: 'q_example' # String | Free text search across all indexed fields. } @@ -1567,7 +1567,7 @@ end | **offset** | **Integer** | Starting index of overall result set from which to return IDs. | [optional] | | **limit** | **Integer** | Number of IDs to return. Offset + limit should NOT be above 10K. | [optional] | | **sort** | **String** | Possible order by fields: `created_date`, `updated_date`. Ex: `updated_date|desc`. | [optional] | -| **filter** | **String** | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid] | [optional] | +| **filter** | **String** | FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid breach_summary.credential_statuses breach_summary.is_retroactively_deduped] | [optional] | | **q** | **String** | Free text search across all indexed fields. | [optional] | ### Return type diff --git a/docs/RegistrationAWSAccountPatch.md b/docs/RegistrationAWSAccountPatch.md index b1c6ec3b..9aa040b6 100644 --- a/docs/RegistrationAWSAccountPatch.md +++ b/docs/RegistrationAWSAccountPatch.md @@ -7,6 +7,7 @@ | **account_id** | **String** | | | | **behavior_assessment_enabled** | **Boolean** | | [optional] | | **cloudtrail_region** | **String** | | [optional] | +| **environment** | **String** | | [optional] | | **iam_role_arn** | **String** | | | | **remediation_region** | **String** | | [optional] | | **remediation_tou_accepted** | **Time** | | [optional] | @@ -21,6 +22,7 @@ instance = Falcon::RegistrationAWSAccountPatch.new( account_id: null, behavior_assessment_enabled: null, cloudtrail_region: null, + environment: null, iam_role_arn: null, remediation_region: null, remediation_tou_accepted: null, diff --git a/docs/RegistrationAzureAccountPatch.md b/docs/RegistrationAzureAccountPatch.md new file mode 100644 index 00000000..d649d92a --- /dev/null +++ b/docs/RegistrationAzureAccountPatch.md @@ -0,0 +1,20 @@ +# Falcon::RegistrationAzureAccountPatch + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **environment** | **String** | | [optional] | +| **subscription_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationAzureAccountPatch.new( + environment: null, + subscription_id: null +) +``` + diff --git a/docs/RegistrationAzureAccountPatchRequest.md b/docs/RegistrationAzureAccountPatchRequest.md new file mode 100644 index 00000000..d76d279c --- /dev/null +++ b/docs/RegistrationAzureAccountPatchRequest.md @@ -0,0 +1,18 @@ +# Falcon::RegistrationAzureAccountPatchRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<RegistrationAzureAccountPatch>**](RegistrationAzureAccountPatch.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationAzureAccountPatchRequest.new( + resources: null +) +``` + diff --git a/docs/RegistrationAzureAccountV1Ext.md b/docs/RegistrationAzureAccountV1Ext.md index 196d02ce..2fcf8521 100644 --- a/docs/RegistrationAzureAccountV1Ext.md +++ b/docs/RegistrationAzureAccountV1Ext.md @@ -18,7 +18,10 @@ | **credentials_type** | **String** | | [optional] | | **default_subscription_id** | **String** | Default Azure Subscription ID to provision shared IOA infrastructure. | [optional] | | **environment** | **String** | | [optional] | +| **is_cspm_lite** | **Boolean** | Is CSPM Lite enabled. | [optional] | | **object_id** | **String** | | [optional] | +| **parent_management_group_id** | **String** | | [optional] | +| **parent_management_group_name** | **String** | | [optional] | | **public_certificate** | **String** | | [optional] | | **public_certificate_raw** | **String** | | [optional] | | **role_assignments** | [**Array<DomainAzureRoleAssignment>**](DomainAzureRoleAssignment.md) | | [optional] | @@ -49,7 +52,10 @@ instance = Falcon::RegistrationAzureAccountV1Ext.new( credentials_type: null, default_subscription_id: null, environment: null, + is_cspm_lite: null, object_id: null, + parent_management_group_id: null, + parent_management_group_name: null, public_certificate: null, public_certificate_raw: null, role_assignments: null, diff --git a/docs/RegistrationAzureManagementGroupCreateRequestExternalV1.md b/docs/RegistrationAzureManagementGroupCreateRequestExternalV1.md new file mode 100644 index 00000000..bbffeac7 --- /dev/null +++ b/docs/RegistrationAzureManagementGroupCreateRequestExternalV1.md @@ -0,0 +1,18 @@ +# Falcon::RegistrationAzureManagementGroupCreateRequestExternalV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<RegistrationAzureManagementGroupExternalV1>**](RegistrationAzureManagementGroupExternalV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationAzureManagementGroupCreateRequestExternalV1.new( + resources: null +) +``` + diff --git a/docs/RegistrationAzureManagementGroupExternalV1.md b/docs/RegistrationAzureManagementGroupExternalV1.md new file mode 100644 index 00000000..2d6e3391 --- /dev/null +++ b/docs/RegistrationAzureManagementGroupExternalV1.md @@ -0,0 +1,20 @@ +# Falcon::RegistrationAzureManagementGroupExternalV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **default_subscription_id** | **String** | | [optional] | +| **tenant_id** | **String** | Azure Tenant ID to use. | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationAzureManagementGroupExternalV1.new( + default_subscription_id: null, + tenant_id: null +) +``` + diff --git a/docs/RegistrationAzureManagementGroupResponseV1.md b/docs/RegistrationAzureManagementGroupResponseV1.md new file mode 100644 index 00000000..f64c008f --- /dev/null +++ b/docs/RegistrationAzureManagementGroupResponseV1.md @@ -0,0 +1,22 @@ +# Falcon::RegistrationAzureManagementGroupResponseV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<RegistrationAzureManagementGroupV1Ext>**](RegistrationAzureManagementGroupV1Ext.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationAzureManagementGroupResponseV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RegistrationAzureManagementGroupV1Ext.md b/docs/RegistrationAzureManagementGroupV1Ext.md new file mode 100644 index 00000000..228efd5a --- /dev/null +++ b/docs/RegistrationAzureManagementGroupV1Ext.md @@ -0,0 +1,56 @@ +# Falcon::RegistrationAzureManagementGroupV1Ext + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_at** | **Time** | | | +| **deleted_at** | **Time** | | | +| **id** | **Integer** | | | +| **updated_at** | **Time** | | | +| **azure_management_group_id** | **String** | Azure Management Group ID. | | +| **azure_management_group_name** | **String** | Azure Management Group Name. | [optional] | +| **azure_permissions_status** | [**Array<DomainPermission>**](DomainPermission.md) | Permissions status returned via API. | [optional] | +| **cid** | **String** | | | +| **client_id** | **String** | | [optional] | +| **conditions** | [**Array<DomainCondition>**](DomainCondition.md) | | [optional] | +| **credentials_end_date** | **Time** | | [optional] | +| **credentials_type** | **String** | | [optional] | +| **default_subscription_id** | **String** | Default Azure Subscription ID to provision shared IOA infrastructure. | [optional] | +| **object_id** | **String** | | [optional] | +| **public_certificate** | **String** | | [optional] | +| **public_certificate_raw** | **String** | | [optional] | +| **role_assignments** | [**Array<DomainAzureManagementGroupRoleAssignment>**](DomainAzureManagementGroupRoleAssignment.md) | | [optional] | +| **status** | **String** | Account registration status. | [optional] | +| **tenant_id** | **String** | Azure Tenant ID to use. | | +| **years_valid** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationAzureManagementGroupV1Ext.new( + created_at: null, + deleted_at: null, + id: null, + updated_at: null, + azure_management_group_id: null, + azure_management_group_name: null, + azure_permissions_status: null, + cid: null, + client_id: null, + conditions: null, + credentials_end_date: null, + credentials_type: null, + default_subscription_id: null, + object_id: null, + public_certificate: null, + public_certificate_raw: null, + role_assignments: null, + status: null, + tenant_id: null, + years_valid: null +) +``` + diff --git a/docs/RegistrationGCPAccountExtRequestV2.md b/docs/RegistrationGCPAccountExtRequestV2.md new file mode 100644 index 00000000..f8c75548 --- /dev/null +++ b/docs/RegistrationGCPAccountExtRequestV2.md @@ -0,0 +1,18 @@ +# Falcon::RegistrationGCPAccountExtRequestV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<RegistrationGCPAccountReqObjV2>**](RegistrationGCPAccountReqObjV2.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPAccountExtRequestV2.new( + resources: null +) +``` + diff --git a/docs/RegistrationGCPAccountPatch.md b/docs/RegistrationGCPAccountPatch.md new file mode 100644 index 00000000..6138ba0c --- /dev/null +++ b/docs/RegistrationGCPAccountPatch.md @@ -0,0 +1,20 @@ +# Falcon::RegistrationGCPAccountPatch + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **environment** | **String** | | [optional] | +| **parent_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPAccountPatch.new( + environment: null, + parent_id: null +) +``` + diff --git a/docs/RegistrationGCPAccountPatchRequest.md b/docs/RegistrationGCPAccountPatchRequest.md new file mode 100644 index 00000000..f14b7da4 --- /dev/null +++ b/docs/RegistrationGCPAccountPatchRequest.md @@ -0,0 +1,18 @@ +# Falcon::RegistrationGCPAccountPatchRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<RegistrationGCPAccountPatch>**](RegistrationGCPAccountPatch.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPAccountPatchRequest.new( + resources: null +) +``` + diff --git a/docs/RegistrationGCPAccountReqObjV2.md b/docs/RegistrationGCPAccountReqObjV2.md new file mode 100644 index 00000000..477bab76 --- /dev/null +++ b/docs/RegistrationGCPAccountReqObjV2.md @@ -0,0 +1,32 @@ +# Falcon::RegistrationGCPAccountReqObjV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **client_email** | **String** | | [optional] | +| **client_id** | **String** | | [optional] | +| **parent_id** | **String** | | | +| **parent_type** | **String** | | [optional] | +| **private_key** | **String** | | [optional] | +| **private_key_id** | **String** | | [optional] | +| **project_id** | **String** | | [optional] | +| **service_account_id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPAccountReqObjV2.new( + client_email: null, + client_id: null, + parent_id: null, + parent_type: null, + private_key: null, + private_key_id: null, + project_id: null, + service_account_id: null +) +``` + diff --git a/docs/RegistrationGCPAccountResponseExtV2.md b/docs/RegistrationGCPAccountResponseExtV2.md new file mode 100644 index 00000000..90858191 --- /dev/null +++ b/docs/RegistrationGCPAccountResponseExtV2.md @@ -0,0 +1,22 @@ +# Falcon::RegistrationGCPAccountResponseExtV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<RegistrationGCPAccountRspObjV2>**](RegistrationGCPAccountRspObjV2.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPAccountResponseExtV2.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RegistrationGCPAccountRspObjV2.md b/docs/RegistrationGCPAccountRspObjV2.md new file mode 100644 index 00000000..be2f07c8 --- /dev/null +++ b/docs/RegistrationGCPAccountRspObjV2.md @@ -0,0 +1,28 @@ +# Falcon::RegistrationGCPAccountRspObjV2 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **client_email** | **String** | | [optional] | +| **client_id** | **String** | | [optional] | +| **parent_id** | **String** | | | +| **parent_type** | **String** | | [optional] | +| **project_id** | **String** | | [optional] | +| **service_account_id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPAccountRspObjV2.new( + client_email: null, + client_id: null, + parent_id: null, + parent_type: null, + project_id: null, + service_account_id: null +) +``` + diff --git a/docs/RegistrationGCPServiceAccountExtV1.md b/docs/RegistrationGCPServiceAccountExtV1.md new file mode 100644 index 00000000..23ff62c4 --- /dev/null +++ b/docs/RegistrationGCPServiceAccountExtV1.md @@ -0,0 +1,24 @@ +# Falcon::RegistrationGCPServiceAccountExtV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **client_email** | **String** | | [optional] | +| **client_id** | **String** | | [optional] | +| **project_id** | **String** | | [optional] | +| **service_account_id** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPServiceAccountExtV1.new( + client_email: null, + client_id: null, + project_id: null, + service_account_id: null +) +``` + diff --git a/docs/RegistrationGCPServiceAccountResponseExtV1.md b/docs/RegistrationGCPServiceAccountResponseExtV1.md new file mode 100644 index 00000000..e5c750a0 --- /dev/null +++ b/docs/RegistrationGCPServiceAccountResponseExtV1.md @@ -0,0 +1,22 @@ +# Falcon::RegistrationGCPServiceAccountResponseExtV1 + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<RegistrationGCPServiceAccountExtV1>**](RegistrationGCPServiceAccountExtV1.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationGCPServiceAccountResponseExtV1.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RegistrationIOMEventIDResponseMeta.md b/docs/RegistrationIOMEventIDResponseMeta.md new file mode 100644 index 00000000..5facf3b1 --- /dev/null +++ b/docs/RegistrationIOMEventIDResponseMeta.md @@ -0,0 +1,24 @@ +# Falcon::RegistrationIOMEventIDResponseMeta + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **pagination** | [**RegistrationNextTokenPagination**](RegistrationNextTokenPagination.md) | | | +| **powered_by** | **String** | | | +| **query_time** | **Float** | | | +| **trace_id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationIOMEventIDResponseMeta.new( + pagination: null, + powered_by: null, + query_time: null, + trace_id: null +) +``` + diff --git a/docs/RegistrationIOMEventIDsResponseV2.md b/docs/RegistrationIOMEventIDsResponseV2.md index bf0bd223..478a85a8 100644 --- a/docs/RegistrationIOMEventIDsResponseV2.md +++ b/docs/RegistrationIOMEventIDsResponseV2.md @@ -5,7 +5,7 @@ | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | | -| **meta** | [**RegistrationMSASpecMetaInfoExtension**](RegistrationMSASpecMetaInfoExtension.md) | | | +| **meta** | [**RegistrationIOMEventIDResponseMeta**](RegistrationIOMEventIDResponseMeta.md) | | | | **resources** | **Array<String>** | | | ## Example diff --git a/docs/RegistrationIOMEventV2.md b/docs/RegistrationIOMEventV2.md index 31f48038..180b9ba1 100644 --- a/docs/RegistrationIOMEventV2.md +++ b/docs/RegistrationIOMEventV2.md @@ -14,6 +14,7 @@ | **cloud_scopes** | [**Array<DomainCloudScope>**](DomainCloudScope.md) | | [optional] | | **custom_policy_id** | **Integer** | | [optional] | | **finding** | **Object** | | | +| **findings** | **Array<Object>** | | | | **id** | **String** | | | | **is_managed** | **Boolean** | | [optional] | | **policy_id** | **Integer** | | [optional] | @@ -51,6 +52,7 @@ instance = Falcon::RegistrationIOMEventV2.new( cloud_scopes: null, custom_policy_id: null, finding: null, + findings: null, id: null, is_managed: null, policy_id: null, diff --git a/docs/RegistrationMSASpecMetaInfoExtension.md b/docs/RegistrationMSASpecMetaInfoExtension.md deleted file mode 100644 index eebf922a..00000000 --- a/docs/RegistrationMSASpecMetaInfoExtension.md +++ /dev/null @@ -1,20 +0,0 @@ -# Falcon::RegistrationMSASpecMetaInfoExtension - -## Properties - -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **meta_info** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | -| **pagination** | [**RegistrationMSAPagingExtension**](RegistrationMSAPagingExtension.md) | | [optional] | - -## Example - -```ruby -require 'crimson-falcon' - -instance = Falcon::RegistrationMSASpecMetaInfoExtension.new( - meta_info: null, - pagination: null -) -``` - diff --git a/docs/RegistrationNextTokenPagination.md b/docs/RegistrationNextTokenPagination.md new file mode 100644 index 00000000..dc2962b8 --- /dev/null +++ b/docs/RegistrationNextTokenPagination.md @@ -0,0 +1,24 @@ +# Falcon::RegistrationNextTokenPagination + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **limit** | **Integer** | | | +| **next_token** | **String** | | [optional] | +| **offset** | **Integer** | | [optional] | +| **total** | **Integer** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RegistrationNextTokenPagination.new( + limit: null, + next_token: null, + offset: null, + total: null +) +``` + diff --git a/docs/RulegroupsAssignedRule.md b/docs/RulegroupsAssignedRule.md new file mode 100644 index 00000000..fefcba38 --- /dev/null +++ b/docs/RulegroupsAssignedRule.md @@ -0,0 +1,20 @@ +# Falcon::RulegroupsAssignedRule + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **href** | **String** | | | +| **id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsAssignedRule.new( + href: null, + id: null +) +``` + diff --git a/docs/RulegroupsCreateRequest.md b/docs/RulegroupsCreateRequest.md new file mode 100644 index 00000000..dab6da02 --- /dev/null +++ b/docs/RulegroupsCreateRequest.md @@ -0,0 +1,22 @@ +# Falcon::RulegroupsCreateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **name** | **String** | | | +| **type** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsCreateRequest.new( + description: null, + name: null, + type: null +) +``` + diff --git a/docs/RulegroupsDeleteResponse.md b/docs/RulegroupsDeleteResponse.md new file mode 100644 index 00000000..404f81f5 --- /dev/null +++ b/docs/RulegroupsDeleteResponse.md @@ -0,0 +1,22 @@ +# Falcon::RulegroupsDeleteResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsDeleteResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RulegroupsPolicyAssignment.md b/docs/RulegroupsPolicyAssignment.md new file mode 100644 index 00000000..01784331 --- /dev/null +++ b/docs/RulegroupsPolicyAssignment.md @@ -0,0 +1,20 @@ +# Falcon::RulegroupsPolicyAssignment + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **href** | **String** | | | +| **id** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsPolicyAssignment.new( + href: null, + id: null +) +``` + diff --git a/docs/RulegroupsResponse.md b/docs/RulegroupsResponse.md new file mode 100644 index 00000000..0fd9ac1f --- /dev/null +++ b/docs/RulegroupsResponse.md @@ -0,0 +1,22 @@ +# Falcon::RulegroupsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<RulegroupsRuleGroup>**](RulegroupsRuleGroup.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RulegroupsRule.md b/docs/RulegroupsRule.md new file mode 100644 index 00000000..21915f07 --- /dev/null +++ b/docs/RulegroupsRule.md @@ -0,0 +1,86 @@ +# Falcon::RulegroupsRule + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **content_files** | **Array<String>** | | [optional] | +| **content_registry_values** | **Array<String>** | | [optional] | +| **created_timestamp** | **String** | | [optional] | +| **depth** | **String** | | | +| **description** | **String** | | [optional] | +| **enable_content_capture** | **Boolean** | | [optional] | +| **exclude** | **String** | | [optional] | +| **exclude_processes** | **String** | | [optional] | +| **exclude_users** | **String** | | [optional] | +| **id** | **String** | | | +| **include** | **String** | | | +| **include_processes** | **String** | | [optional] | +| **include_users** | **String** | | [optional] | +| **modified_timestamp** | **String** | | [optional] | +| **path** | **String** | | | +| **precedence** | **Integer** | | [optional] | +| **rule_group_id** | **String** | | | +| **severity** | **String** | | | +| **type** | **String** | | | +| **watch_attributes_directory_changes** | **Boolean** | | [optional] | +| **watch_attributes_file_changes** | **Boolean** | | [optional] | +| **watch_create_directory_changes** | **Boolean** | | [optional] | +| **watch_create_file_changes** | **Boolean** | | [optional] | +| **watch_create_key_changes** | **Boolean** | | [optional] | +| **watch_delete_directory_changes** | **Boolean** | | [optional] | +| **watch_delete_file_changes** | **Boolean** | | [optional] | +| **watch_delete_key_changes** | **Boolean** | | [optional] | +| **watch_delete_value_changes** | **Boolean** | | [optional] | +| **watch_permissions_directory_changes** | **Boolean** | | [optional] | +| **watch_permissions_file_changes** | **Boolean** | | [optional] | +| **watch_rename_directory_changes** | **Boolean** | | [optional] | +| **watch_rename_file_changes** | **Boolean** | | [optional] | +| **watch_rename_key_changes** | **Boolean** | | [optional] | +| **watch_set_value_changes** | **Boolean** | | [optional] | +| **watch_write_file_changes** | **Boolean** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsRule.new( + content_files: null, + content_registry_values: null, + created_timestamp: null, + depth: null, + description: null, + enable_content_capture: null, + exclude: null, + exclude_processes: null, + exclude_users: null, + id: null, + include: null, + include_processes: null, + include_users: null, + modified_timestamp: null, + path: null, + precedence: null, + rule_group_id: null, + severity: null, + type: null, + watch_attributes_directory_changes: null, + watch_attributes_file_changes: null, + watch_create_directory_changes: null, + watch_create_file_changes: null, + watch_create_key_changes: null, + watch_delete_directory_changes: null, + watch_delete_file_changes: null, + watch_delete_key_changes: null, + watch_delete_value_changes: null, + watch_permissions_directory_changes: null, + watch_permissions_file_changes: null, + watch_rename_directory_changes: null, + watch_rename_file_changes: null, + watch_rename_key_changes: null, + watch_set_value_changes: null, + watch_write_file_changes: null +) +``` + diff --git a/docs/RulegroupsRuleGroup.md b/docs/RulegroupsRuleGroup.md new file mode 100644 index 00000000..21bd510c --- /dev/null +++ b/docs/RulegroupsRuleGroup.md @@ -0,0 +1,36 @@ +# Falcon::RulegroupsRuleGroup + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **assigned_rules** | [**Array<RulegroupsAssignedRule>**](RulegroupsAssignedRule.md) | | [optional] | +| **created_by** | **String** | | [optional] | +| **created_timestamp** | **String** | | [optional] | +| **description** | **String** | | [optional] | +| **id** | **String** | | | +| **modified_by** | **String** | | [optional] | +| **modified_timestamp** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **policy_assignments** | [**Array<RulegroupsPolicyAssignment>**](RulegroupsPolicyAssignment.md) | | [optional] | +| **type** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsRuleGroup.new( + assigned_rules: null, + created_by: null, + created_timestamp: null, + description: null, + id: null, + modified_by: null, + modified_timestamp: null, + name: null, + policy_assignments: null, + type: null +) +``` + diff --git a/docs/RulegroupsRulesResponse.md b/docs/RulegroupsRulesResponse.md new file mode 100644 index 00000000..1e228b7e --- /dev/null +++ b/docs/RulegroupsRulesResponse.md @@ -0,0 +1,22 @@ +# Falcon::RulegroupsRulesResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<RulegroupsRule>**](RulegroupsRule.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsRulesResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/RulegroupsUpdateRequest.md b/docs/RulegroupsUpdateRequest.md new file mode 100644 index 00000000..be1ab9d4 --- /dev/null +++ b/docs/RulegroupsUpdateRequest.md @@ -0,0 +1,22 @@ +# Falcon::RulegroupsUpdateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **id** | **String** | | | +| **name** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RulegroupsUpdateRequest.new( + description: null, + id: null, + name: null +) +``` + diff --git a/docs/RuntimeDetectionsApi.md b/docs/RuntimeDetectionsApi.md new file mode 100644 index 00000000..dc96c43e --- /dev/null +++ b/docs/RuntimeDetectionsApi.md @@ -0,0 +1,85 @@ +# Falcon::RuntimeDetectionsApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**get_runtime_detections_combined_v2**](RuntimeDetectionsApi.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 + +> get_runtime_detections_combined_v2(opts) + +Retrieve container runtime detections by the provided search 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::RuntimeDetectionsApi.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 + 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. +} + +begin + # Retrieve container runtime detections by the provided search criteria + result = api_instance.get_runtime_detections_combined_v2(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling RuntimeDetectionsApi->get_runtime_detections_combined_v2: #{e}" +end +``` + +#### Using the get_runtime_detections_combined_v2_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_runtime_detections_combined_v2_with_http_info(opts) + +```ruby +begin + # Retrieve container runtime detections by the provided search criteria + data, status_code, headers = api_instance.get_runtime_detections_combined_v2_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling RuntimeDetectionsApi->get_runtime_detections_combined_v2_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **offset** | **Integer** | The offset from where to begin. | [optional] | +| **sort** | **String** | The field to sort the records on. | [optional] | + +### Return type + +[**RuntimedetectionsDetectionsEntityResponse**](RuntimedetectionsDetectionsEntityResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/RuntimedetectionsDetectionsEntityResponse.md b/docs/RuntimedetectionsDetectionsEntityResponse.md new file mode 100644 index 00000000..f783cb52 --- /dev/null +++ b/docs/RuntimedetectionsDetectionsEntityResponse.md @@ -0,0 +1,22 @@ +# Falcon::RuntimedetectionsDetectionsEntityResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIRuntimeDetection>**](ModelsAPIRuntimeDetection.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::RuntimedetectionsDetectionsEntityResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/SadomainSubmitForBlockingInfo.md b/docs/SadomainSubmissionInformation.md similarity index 75% rename from docs/SadomainSubmitForBlockingInfo.md rename to docs/SadomainSubmissionInformation.md index 9f80b8ae..ca4e0a3f 100644 --- a/docs/SadomainSubmitForBlockingInfo.md +++ b/docs/SadomainSubmissionInformation.md @@ -1,4 +1,4 @@ -# Falcon::SadomainSubmitForBlockingInfo +# Falcon::SadomainSubmissionInformation ## Properties @@ -13,7 +13,7 @@ ```ruby require 'crimson-falcon' -instance = Falcon::SadomainSubmitForBlockingInfo.new( +instance = Falcon::SadomainSubmissionInformation.new( date: null, status: null, user_uuid: null diff --git a/docs/SadomainTyposquattingComponent.md b/docs/SadomainTyposquattingComponent.md index ca412d79..f918aed4 100644 --- a/docs/SadomainTyposquattingComponent.md +++ b/docs/SadomainTyposquattingComponent.md @@ -8,7 +8,8 @@ | **id** | **String** | The ID of the infrastructure component | | | **parent_domain** | [**SadomainTyposquattingParentDomain**](SadomainTyposquattingParentDomain.md) | | | | **punycode_format** | **String** | The Punycode representation of the infrastructure component, i.e. starting with `xn--` | | -| **submit_for_blocking_info** | [**SadomainSubmitForBlockingInfo**](SadomainSubmitForBlockingInfo.md) | | [optional] | +| **submit_for_blocking_info** | [**SadomainSubmissionInformation**](SadomainSubmissionInformation.md) | | [optional] | +| **submit_for_takedown_info** | [**SadomainSubmissionInformation**](SadomainSubmissionInformation.md) | | [optional] | | **unicode_format** | **String** | The Unicode representation of the infrastructure component | | ## Example @@ -22,6 +23,7 @@ instance = Falcon::SadomainTyposquattingComponent.new( parent_domain: null, punycode_format: null, submit_for_blocking_info: null, + submit_for_takedown_info: null, unicode_format: null ) ``` diff --git a/docs/ScheduledexclusionsCreateRequest.md b/docs/ScheduledexclusionsCreateRequest.md new file mode 100644 index 00000000..84c3f0aa --- /dev/null +++ b/docs/ScheduledexclusionsCreateRequest.md @@ -0,0 +1,34 @@ +# Falcon::ScheduledexclusionsCreateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **name** | **String** | | | +| **policy_id** | **String** | | [optional] | +| **processes** | **String** | | [optional] | +| **repeated** | [**ScheduledexclusionsRepeated**](ScheduledexclusionsRepeated.md) | | [optional] | +| **schedule_end** | **String** | | [optional] | +| **schedule_start** | **String** | | [optional] | +| **timezone** | **String** | | | +| **users** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ScheduledexclusionsCreateRequest.new( + description: null, + name: null, + policy_id: null, + processes: null, + repeated: null, + schedule_end: null, + schedule_start: null, + timezone: null, + users: null +) +``` + diff --git a/docs/ScheduledexclusionsRepeated.md b/docs/ScheduledexclusionsRepeated.md new file mode 100644 index 00000000..787972df --- /dev/null +++ b/docs/ScheduledexclusionsRepeated.md @@ -0,0 +1,30 @@ +# Falcon::ScheduledexclusionsRepeated + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **all_day** | **Boolean** | | [optional] | +| **end_time** | **String** | | [optional] | +| **frequency** | **String** | | [optional] | +| **monthly_days** | **Array<Integer>** | | [optional] | +| **occurrence** | **String** | | [optional] | +| **start_time** | **String** | | [optional] | +| **weekly_days** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ScheduledexclusionsRepeated.new( + all_day: null, + end_time: null, + frequency: null, + monthly_days: null, + occurrence: null, + start_time: null, + weekly_days: null +) +``` + diff --git a/docs/ScheduledexclusionsResponse.md b/docs/ScheduledexclusionsResponse.md new file mode 100644 index 00000000..80f600b0 --- /dev/null +++ b/docs/ScheduledexclusionsResponse.md @@ -0,0 +1,22 @@ +# Falcon::ScheduledexclusionsResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ScheduledexclusionsScheduledExclusion>**](ScheduledexclusionsScheduledExclusion.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ScheduledexclusionsResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/ScheduledexclusionsScheduledExclusion.md b/docs/ScheduledexclusionsScheduledExclusion.md new file mode 100644 index 00000000..e367b9b3 --- /dev/null +++ b/docs/ScheduledexclusionsScheduledExclusion.md @@ -0,0 +1,40 @@ +# Falcon::ScheduledexclusionsScheduledExclusion + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **created_timestamp** | **String** | | [optional] | +| **description** | **String** | | [optional] | +| **id** | **String** | | | +| **modified_timestamp** | **String** | | [optional] | +| **name** | **String** | | | +| **policy_id** | **String** | | [optional] | +| **processes** | **String** | | [optional] | +| **repeated** | [**ScheduledexclusionsRepeated**](ScheduledexclusionsRepeated.md) | | [optional] | +| **schedule_end** | **String** | | [optional] | +| **schedule_start** | **String** | | [optional] | +| **timezone** | **String** | | | +| **users** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ScheduledexclusionsScheduledExclusion.new( + created_timestamp: null, + description: null, + id: null, + modified_timestamp: null, + name: null, + policy_id: null, + processes: null, + repeated: null, + schedule_end: null, + schedule_start: null, + timezone: null, + users: null +) +``` + diff --git a/docs/ScheduledexclusionsUpdateRequest.md b/docs/ScheduledexclusionsUpdateRequest.md new file mode 100644 index 00000000..37f29f11 --- /dev/null +++ b/docs/ScheduledexclusionsUpdateRequest.md @@ -0,0 +1,36 @@ +# Falcon::ScheduledexclusionsUpdateRequest + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **description** | **String** | | [optional] | +| **id** | **String** | | | +| **name** | **String** | | | +| **policy_id** | **String** | | [optional] | +| **processes** | **String** | | [optional] | +| **repeated** | [**ScheduledexclusionsRepeated**](ScheduledexclusionsRepeated.md) | | [optional] | +| **schedule_end** | **String** | | [optional] | +| **schedule_start** | **String** | | [optional] | +| **timezone** | **String** | | | +| **users** | **String** | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::ScheduledexclusionsUpdateRequest.new( + description: null, + id: null, + name: null, + policy_id: null, + processes: null, + repeated: null, + schedule_end: null, + schedule_start: null, + timezone: null, + users: null +) +``` + diff --git a/docs/VulnerabilitiesEvaluationLogicApi.md b/docs/SpotlightEvaluationLogicApi.md similarity index 82% rename from docs/VulnerabilitiesEvaluationLogicApi.md rename to docs/SpotlightEvaluationLogicApi.md index bcc38933..5b368d53 100644 --- a/docs/VulnerabilitiesEvaluationLogicApi.md +++ b/docs/SpotlightEvaluationLogicApi.md @@ -1,12 +1,12 @@ -# Falcon::VulnerabilitiesEvaluationLogicApi +# Falcon::SpotlightEvaluationLogicApi All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**combined_query_evaluation_logic**](VulnerabilitiesEvaluationLogicApi.md#combined_query_evaluation_logic) | **GET** /spotlight/combined/evaluation-logic/v1 | Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic entities which match the filter criteria. | -| [**get_evaluation_logic**](VulnerabilitiesEvaluationLogicApi.md#get_evaluation_logic) | **GET** /spotlight/entities/evaluation-logic/v1 | Get details on evaluation logic items by providing one or more IDs. | -| [**query_evaluation_logic**](VulnerabilitiesEvaluationLogicApi.md#query_evaluation_logic) | **GET** /spotlight/queries/evaluation-logic/v1 | Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic IDs which match the filter criteria. | +| [**combined_query_evaluation_logic**](SpotlightEvaluationLogicApi.md#combined_query_evaluation_logic) | **GET** /spotlight/combined/evaluation-logic/v1 | Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic entities which match the filter criteria. | +| [**get_evaluation_logic**](SpotlightEvaluationLogicApi.md#get_evaluation_logic) | **GET** /spotlight/entities/evaluation-logic/v1 | Get details on evaluation logic items by providing one or more IDs. | +| [**query_evaluation_logic**](SpotlightEvaluationLogicApi.md#query_evaluation_logic) | **GET** /spotlight/queries/evaluation-logic/v1 | Search for evaluation logic in your environment by providing a FQL filter and paging details. Returns a set of evaluation logic IDs which match the filter criteria. | ## combined_query_evaluation_logic @@ -28,7 +28,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::VulnerabilitiesEvaluationLogicApi.new +api_instance = Falcon::SpotlightEvaluationLogicApi.new filter = 'filter_example' # String | FQL query specifying the filter parameters. opts = { after: 'after_example', # String | 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. @@ -41,7 +41,7 @@ begin result = api_instance.combined_query_evaluation_logic(filter, opts) p result rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesEvaluationLogicApi->combined_query_evaluation_logic: #{e}" + puts "Error when calling SpotlightEvaluationLogicApi->combined_query_evaluation_logic: #{e}" end ``` @@ -59,7 +59,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesEvaluationLogicApi->combined_query_evaluation_logic_with_http_info: #{e}" + puts "Error when calling SpotlightEvaluationLogicApi->combined_query_evaluation_logic_with_http_info: #{e}" end ``` @@ -105,7 +105,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::VulnerabilitiesEvaluationLogicApi.new +api_instance = Falcon::SpotlightEvaluationLogicApi.new ids = ['inner_example'] # Array | One or more evaluation logic IDs. begin @@ -113,7 +113,7 @@ begin result = api_instance.get_evaluation_logic(ids) p result rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesEvaluationLogicApi->get_evaluation_logic: #{e}" + puts "Error when calling SpotlightEvaluationLogicApi->get_evaluation_logic: #{e}" end ``` @@ -131,7 +131,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesEvaluationLogicApi->get_evaluation_logic_with_http_info: #{e}" + puts "Error when calling SpotlightEvaluationLogicApi->get_evaluation_logic_with_http_info: #{e}" end ``` @@ -174,7 +174,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::VulnerabilitiesEvaluationLogicApi.new +api_instance = Falcon::SpotlightEvaluationLogicApi.new filter = 'filter_example' # String | FQL query specifying the filter parameters. opts = { after: 'after_example', # String | 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. @@ -187,7 +187,7 @@ begin result = api_instance.query_evaluation_logic(filter, opts) p result rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesEvaluationLogicApi->query_evaluation_logic: #{e}" + puts "Error when calling SpotlightEvaluationLogicApi->query_evaluation_logic: #{e}" end ``` @@ -205,7 +205,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesEvaluationLogicApi->query_evaluation_logic_with_http_info: #{e}" + puts "Error when calling SpotlightEvaluationLogicApi->query_evaluation_logic_with_http_info: #{e}" end ``` diff --git a/docs/VulnerabilitiesApi.md b/docs/SpotlightVulnerabilitiesApi.md similarity index 76% rename from docs/VulnerabilitiesApi.md rename to docs/SpotlightVulnerabilitiesApi.md index 6fcb0ad3..b50bbb86 100644 --- a/docs/VulnerabilitiesApi.md +++ b/docs/SpotlightVulnerabilitiesApi.md @@ -1,13 +1,13 @@ -# Falcon::VulnerabilitiesApi +# Falcon::SpotlightVulnerabilitiesApi All URIs are relative to *https://api.crowdstrike.com* | Method | HTTP request | Description | | ------ | ------------ | ----------- | -| [**combined_query_vulnerabilities**](VulnerabilitiesApi.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**](VulnerabilitiesApi.md#get_remediations_v2) | **GET** /spotlight/entities/remediations/v2 | Get details on remediation by providing one or more IDs | -| [**get_vulnerabilities**](VulnerabilitiesApi.md#get_vulnerabilities) | **GET** /spotlight/entities/vulnerabilities/v2 | Get details on vulnerabilities by providing one or more IDs | -| [**query_vulnerabilities**](VulnerabilitiesApi.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**](SpotlightVulnerabilitiesApi.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**](SpotlightVulnerabilitiesApi.md#get_remediations_v2) | **GET** /spotlight/entities/remediations/v2 | Get details on remediation by providing one or more IDs | +| [**get_vulnerabilities**](SpotlightVulnerabilitiesApi.md#get_vulnerabilities) | **GET** /spotlight/entities/vulnerabilities/v2 | Get details on vulnerabilities by providing one or more IDs | +| [**query_vulnerabilities**](SpotlightVulnerabilitiesApi.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 @@ -29,8 +29,8 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::VulnerabilitiesApi.new -filter = 'filter_example' # String | 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, 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 +api_instance = Falcon::SpotlightVulnerabilitiesApi.new +filter = 'filter_example' # String | 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 opts = { after: 'after_example', # String | 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. limit: 56, # Integer | The number of items to return in this response (default: 100, max: 5000). Use with the after parameter to manage pagination of results. @@ -43,7 +43,7 @@ begin result = api_instance.combined_query_vulnerabilities(filter, opts) p result rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->combined_query_vulnerabilities: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->combined_query_vulnerabilities: #{e}" end ``` @@ -61,7 +61,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->combined_query_vulnerabilities_with_http_info: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->combined_query_vulnerabilities_with_http_info: #{e}" end ``` @@ -69,7 +69,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | 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, 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 | | +| **filter** | **String** | 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 | | | **after** | **String** | 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. | [optional] | | **limit** | **Integer** | The number of items to return in this response (default: 100, max: 5000). Use with the after parameter to manage pagination of results. | [optional] | | **sort** | **String** | Sort vulnerabilities by their properties. Common sort options include: <ul><li>updated_timestamp|asc</li><li>closed_timestamp|asc</li></ul> | [optional] | @@ -108,7 +108,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::VulnerabilitiesApi.new +api_instance = Falcon::SpotlightVulnerabilitiesApi.new ids = ['inner_example'] # Array | One or more remediation IDs begin @@ -116,7 +116,7 @@ begin result = api_instance.get_remediations_v2(ids) p result rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->get_remediations_v2: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->get_remediations_v2: #{e}" end ``` @@ -134,7 +134,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->get_remediations_v2_with_http_info: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->get_remediations_v2_with_http_info: #{e}" end ``` @@ -177,7 +177,7 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::VulnerabilitiesApi.new +api_instance = Falcon::SpotlightVulnerabilitiesApi.new ids = ['inner_example'] # Array | One or more vulnerability IDs (max: 400). Find vulnerability IDs with GET /spotlight/queries/vulnerabilities/v1 begin @@ -185,7 +185,7 @@ begin result = api_instance.get_vulnerabilities(ids) p result rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->get_vulnerabilities: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->get_vulnerabilities: #{e}" end ``` @@ -203,7 +203,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->get_vulnerabilities_with_http_info: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->get_vulnerabilities_with_http_info: #{e}" end ``` @@ -246,8 +246,8 @@ Falcon.configure do |config| config.cloud = "us-1" # or "us-2", "eu-1", "us-gov1" end -api_instance = Falcon::VulnerabilitiesApi.new -filter = 'filter_example' # String | 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, 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 +api_instance = Falcon::SpotlightVulnerabilitiesApi.new +filter = 'filter_example' # String | 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 opts = { after: 'after_example', # String | 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. limit: 56, # Integer | The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. @@ -259,7 +259,7 @@ begin result = api_instance.query_vulnerabilities(filter, opts) p result rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->query_vulnerabilities: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->query_vulnerabilities: #{e}" end ``` @@ -277,7 +277,7 @@ begin p headers # => { ... } p data # => rescue Falcon::ApiError => e - puts "Error when calling VulnerabilitiesApi->query_vulnerabilities_with_http_info: #{e}" + puts "Error when calling SpotlightVulnerabilitiesApi->query_vulnerabilities_with_http_info: #{e}" end ``` @@ -285,7 +285,7 @@ end | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | -| **filter** | **String** | 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, 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 | | +| **filter** | **String** | 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 | | | **after** | **String** | 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. | [optional] | | **limit** | **Integer** | The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. | [optional] | | **sort** | **String** | 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. | [optional] | diff --git a/docs/SvExclusionsCreateReqV1.md b/docs/SvExclusionsCreateReqV1.md index adced569..5320dff8 100644 --- a/docs/SvExclusionsCreateReqV1.md +++ b/docs/SvExclusionsCreateReqV1.md @@ -6,6 +6,7 @@ | ---- | ---- | ----------- | ----- | | **comment** | **String** | | [optional] | | **groups** | **Array<String>** | | [optional] | +| **is_descendant_process** | **Boolean** | | [optional] | | **value** | **String** | | [optional] | ## Example @@ -16,6 +17,7 @@ require 'crimson-falcon' instance = Falcon::SvExclusionsCreateReqV1.new( comment: null, groups: null, + is_descendant_process: null, value: null ) ``` diff --git a/docs/SvExclusionsSVExclusionV1.md b/docs/SvExclusionsSVExclusionV1.md index 477d3293..d3dbdff1 100644 --- a/docs/SvExclusionsSVExclusionV1.md +++ b/docs/SvExclusionsSVExclusionV1.md @@ -9,6 +9,7 @@ | **created_on** | **Time** | | | | **groups** | [**Array<HostGroupsHostGroupV1>**](HostGroupsHostGroupV1.md) | | | | **id** | **String** | | | +| **is_descendant_process** | **Boolean** | | [optional] | | **last_modified** | **Time** | | | | **modified_by** | **String** | | | | **regexp_value** | **String** | | | @@ -26,6 +27,7 @@ instance = Falcon::SvExclusionsSVExclusionV1.new( created_on: null, groups: null, id: null, + is_descendant_process: null, last_modified: null, modified_by: null, regexp_value: null, diff --git a/docs/SvExclusionsUpdateReqV1.md b/docs/SvExclusionsUpdateReqV1.md index e70ce93c..2d10cb56 100644 --- a/docs/SvExclusionsUpdateReqV1.md +++ b/docs/SvExclusionsUpdateReqV1.md @@ -7,6 +7,7 @@ | **comment** | **String** | | [optional] | | **groups** | **Array<String>** | | [optional] | | **id** | **String** | | | +| **is_descendant_process** | **Boolean** | | [optional] | | **value** | **String** | | [optional] | ## Example @@ -18,6 +19,7 @@ instance = Falcon::SvExclusionsUpdateReqV1.new( comment: null, groups: null, id: null, + is_descendant_process: null, value: null ) ``` diff --git a/docs/UnidentifiedContainersApi.md b/docs/UnidentifiedContainersApi.md new file mode 100644 index 00000000..51156317 --- /dev/null +++ b/docs/UnidentifiedContainersApi.md @@ -0,0 +1,229 @@ +# Falcon::UnidentifiedContainersApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**read_unidentified_containers_by_date_range_count**](UnidentifiedContainersApi.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**](UnidentifiedContainersApi.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**](UnidentifiedContainersApi.md#search_and_read_unidentified_containers) | **GET** /container-security/combined/unidentified-containers/v1 | Search Unidentified Containers by the provided search criteria | + + +## read_unidentified_containers_by_date_range_count + +> read_unidentified_containers_by_date_range_count(opts) + +Returns the count of Unidentified Containers over the last 7 days + +### 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::UnidentifiedContainersApi.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 +} + +begin + # Returns the count of Unidentified Containers over the last 7 days + result = api_instance.read_unidentified_containers_by_date_range_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling UnidentifiedContainersApi->read_unidentified_containers_by_date_range_count: #{e}" +end +``` + +#### Using the read_unidentified_containers_by_date_range_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_unidentified_containers_by_date_range_count_with_http_info(opts) + +```ruby +begin + # Returns the count of Unidentified Containers over the last 7 days + data, status_code, headers = api_instance.read_unidentified_containers_by_date_range_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling UnidentifiedContainersApi->read_unidentified_containers_by_date_range_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**ModelsAggregateValuesByFieldResponse**](ModelsAggregateValuesByFieldResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## read_unidentified_containers_count + +> read_unidentified_containers_count(opts) + +Returns the total count of Unidentified Containers over a time period + +### 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::UnidentifiedContainersApi.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 +} + +begin + # Returns the total count of Unidentified Containers over a time period + result = api_instance.read_unidentified_containers_count(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling UnidentifiedContainersApi->read_unidentified_containers_count: #{e}" +end +``` + +#### Using the read_unidentified_containers_count_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> read_unidentified_containers_count_with_http_info(opts) + +```ruby +begin + # Returns the total count of Unidentified Containers over a time period + data, status_code, headers = api_instance.read_unidentified_containers_count_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling UnidentifiedContainersApi->read_unidentified_containers_count_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | + +### Return type + +[**UnidentifiedcontainersUnidentifiedContainersCountValue**](UnidentifiedcontainersUnidentifiedContainersCountValue.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## search_and_read_unidentified_containers + +> search_and_read_unidentified_containers(opts) + +Search Unidentified Containers by the provided search 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::UnidentifiedContainersApi.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 + 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 Unidentified Containers by the provided search criteria + result = api_instance.search_and_read_unidentified_containers(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling UnidentifiedContainersApi->search_and_read_unidentified_containers: #{e}" +end +``` + +#### Using the search_and_read_unidentified_containers_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_and_read_unidentified_containers_with_http_info(opts) + +```ruby +begin + # Search Unidentified Containers by the provided search criteria + data, status_code, headers = api_instance.search_and_read_unidentified_containers_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling UnidentifiedContainersApi->search_and_read_unidentified_containers_with_http_info: #{e}" +end +``` + +### Parameters + +| 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] | +| **sort** | **String** | The fields to sort the records on. | [optional] | + +### Return type + +[**UnidentifiedcontainersUnidentifiedContainerAPIResponse**](UnidentifiedcontainersUnidentifiedContainerAPIResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/UnidentifiedcontainersUnidentifiedContainerAPIResponse.md b/docs/UnidentifiedcontainersUnidentifiedContainerAPIResponse.md new file mode 100644 index 00000000..5d094d19 --- /dev/null +++ b/docs/UnidentifiedcontainersUnidentifiedContainerAPIResponse.md @@ -0,0 +1,22 @@ +# Falcon::UnidentifiedcontainersUnidentifiedContainerAPIResponse + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIUnidentifiedContainer>**](ModelsAPIUnidentifiedContainer.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::UnidentifiedcontainersUnidentifiedContainerAPIResponse.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/UnidentifiedcontainersUnidentifiedContainersCountValue.md b/docs/UnidentifiedcontainersUnidentifiedContainersCountValue.md new file mode 100644 index 00000000..2f146f84 --- /dev/null +++ b/docs/UnidentifiedcontainersUnidentifiedContainersCountValue.md @@ -0,0 +1,22 @@ +# Falcon::UnidentifiedcontainersUnidentifiedContainersCountValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **resources** | [**Array<CommonCountAsResource>**](CommonCountAsResource.md) | | | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::UnidentifiedcontainersUnidentifiedContainersCountValue.new( + resources: null, + errors: null, + meta: null +) +``` + diff --git a/docs/V2Activity.md b/docs/V2Activity.md new file mode 100644 index 00000000..801def0d --- /dev/null +++ b/docs/V2Activity.md @@ -0,0 +1,22 @@ +# Falcon::V2Activity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | | +| **_next** | **Array<String>** | | [optional] | +| **properties** | **Object** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2Activity.new( + id: null, + _next: null, + properties: null +) +``` + diff --git a/docs/V2ActivityParameters.md b/docs/V2ActivityParameters.md new file mode 100644 index 00000000..33504f78 --- /dev/null +++ b/docs/V2ActivityParameters.md @@ -0,0 +1,18 @@ +# Falcon::V2ActivityParameters + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **configuration** | [**Hash<String, V2ActivityProperties>**](V2ActivityProperties.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2ActivityParameters.new( + configuration: null +) +``` + diff --git a/docs/V2ActivityProperties.md b/docs/V2ActivityProperties.md new file mode 100644 index 00000000..c512f2db --- /dev/null +++ b/docs/V2ActivityProperties.md @@ -0,0 +1,18 @@ +# Falcon::V2ActivityProperties + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **properties** | [**Hash<String, ParameterActivityConfigParameterValue>**](ParameterActivityConfigParameterValue.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2ActivityProperties.new( + properties: null +) +``` + diff --git a/docs/V2Condition.md b/docs/V2Condition.md new file mode 100644 index 00000000..25dac5a4 --- /dev/null +++ b/docs/V2Condition.md @@ -0,0 +1,26 @@ +# Falcon::V2Condition + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **display** | **Array<String>** | | [optional] | +| **_else** | **Array<String>** | | [optional] | +| **else_if** | **String** | | [optional] | +| **expression** | **String** | | | +| **_next** | **Array<String>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2Condition.new( + display: null, + _else: null, + else_if: null, + expression: null, + _next: null +) +``` + diff --git a/docs/V2ConditionParameters.md b/docs/V2ConditionParameters.md new file mode 100644 index 00000000..94ffefcc --- /dev/null +++ b/docs/V2ConditionParameters.md @@ -0,0 +1,18 @@ +# Falcon::V2ConditionParameters + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **fields** | [**Hash<String, ParameterConditionFieldParameter>**](ParameterConditionFieldParameter.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2ConditionParameters.new( + fields: null +) +``` + diff --git a/docs/V2Definition.md b/docs/V2Definition.md new file mode 100644 index 00000000..47112950 --- /dev/null +++ b/docs/V2Definition.md @@ -0,0 +1,42 @@ +# Falcon::V2Definition + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **actions** | [**Hash<String, V2Activity>**](V2Activity.md) | | [optional] | +| **conditions** | [**Hash<String, V2Condition>**](V2Condition.md) | | [optional] | +| **description** | **String** | | [optional] | +| **labels** | **Array<String>** | | [optional] | +| **loops** | [**Hash<String, V2Loop>**](V2Loop.md) | | [optional] | +| **multi_instance** | **Boolean** | | [optional] | +| **name** | **String** | | | +| **node_registry** | **Hash<String, String>** | | | +| **parameters** | [**V2Parameters**](V2Parameters.md) | | [optional] | +| **provision_on_install** | **Boolean** | | [optional] | +| **trigger** | [**V2Trigger**](V2Trigger.md) | | | +| **type** | **String** | | [optional] | +| **uniq_node_seen** | **Hash<String, Boolean>** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2Definition.new( + actions: null, + conditions: null, + description: null, + labels: null, + loops: null, + multi_instance: null, + name: null, + node_registry: null, + parameters: null, + provision_on_install: null, + trigger: null, + type: null, + uniq_node_seen: null +) +``` + diff --git a/docs/V2ForLoop.md b/docs/V2ForLoop.md new file mode 100644 index 00000000..5fe3eb5c --- /dev/null +++ b/docs/V2ForLoop.md @@ -0,0 +1,20 @@ +# Falcon::V2ForLoop + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **continue_on_partial_execution** | **Boolean** | | | +| **input** | **String** | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2ForLoop.new( + continue_on_partial_execution: null, + input: null +) +``` + diff --git a/docs/V2Loop.md b/docs/V2Loop.md new file mode 100644 index 00000000..2b305729 --- /dev/null +++ b/docs/V2Loop.md @@ -0,0 +1,26 @@ +# Falcon::V2Loop + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **actions** | [**Hash<String, V2Activity>**](V2Activity.md) | | [optional] | +| **conditions** | [**Hash<String, V2Condition>**](V2Condition.md) | | [optional] | +| **_for** | [**V2ForLoop**](V2ForLoop.md) | | | +| **_next** | **Array<String>** | | [optional] | +| **trigger** | [**V2Trigger**](V2Trigger.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2Loop.new( + actions: null, + conditions: null, + _for: null, + _next: null, + trigger: null +) +``` + diff --git a/docs/V2Parameters.md b/docs/V2Parameters.md new file mode 100644 index 00000000..6ffc563c --- /dev/null +++ b/docs/V2Parameters.md @@ -0,0 +1,24 @@ +# Falcon::V2Parameters + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **actions** | [**V2ActivityParameters**](V2ActivityParameters.md) | | [optional] | +| **conditions** | [**Hash<String, V2ConditionParameters>**](V2ConditionParameters.md) | | [optional] | +| **install_instructions** | **String** | Installation instructions for the template. | [optional] | +| **trigger** | [**ParameterTriggerParameter**](ParameterTriggerParameter.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2Parameters.new( + actions: null, + conditions: null, + install_instructions: null, + trigger: null +) +``` + diff --git a/docs/V2Trigger.md b/docs/V2Trigger.md new file mode 100644 index 00000000..1cb01af8 --- /dev/null +++ b/docs/V2Trigger.md @@ -0,0 +1,26 @@ +# Falcon::V2Trigger + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **event** | **String** | | [optional] | +| **name** | **String** | | [optional] | +| **_next** | **Array<String>** | | | +| **parameters** | [**JsonschemaSchema**](JsonschemaSchema.md) | | [optional] | +| **schedule** | [**GraphTimerEventDefinition**](GraphTimerEventDefinition.md) | | [optional] | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::V2Trigger.new( + event: null, + name: null, + _next: null, + parameters: null, + schedule: null +) +``` + diff --git a/docs/VulnerabilitiesApiCombinedVulnerability.md b/docs/VulnerabilitiesApiCombinedVulnerability.md new file mode 100644 index 00000000..8e907426 --- /dev/null +++ b/docs/VulnerabilitiesApiCombinedVulnerability.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiCombinedVulnerability + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIVulnerabilityCombined>**](ModelsAPIVulnerabilityCombined.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiCombinedVulnerability.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiCombinedVulnerabilityDetails.md b/docs/VulnerabilitiesApiCombinedVulnerabilityDetails.md new file mode 100644 index 00000000..30de4c98 --- /dev/null +++ b/docs/VulnerabilitiesApiCombinedVulnerabilityDetails.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiCombinedVulnerabilityDetails + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIVulnerabilityDetails>**](ModelsAPIVulnerabilityDetails.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiCombinedVulnerabilityDetails.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiCombinedVulnerabilityInfo.md b/docs/VulnerabilitiesApiCombinedVulnerabilityInfo.md new file mode 100644 index 00000000..8be9eb90 --- /dev/null +++ b/docs/VulnerabilitiesApiCombinedVulnerabilityInfo.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiCombinedVulnerabilityInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIVulnerabilityInfo>**](ModelsAPIVulnerabilityInfo.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiCombinedVulnerabilityInfo.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiVulnByImageCount.md b/docs/VulnerabilitiesApiVulnByImageCount.md new file mode 100644 index 00000000..f6099a1a --- /dev/null +++ b/docs/VulnerabilitiesApiVulnByImageCount.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiVulnByImageCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIVulnByImageCount>**](ModelsAPIVulnByImageCount.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiVulnByImageCount.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiVulnByPublication.md b/docs/VulnerabilitiesApiVulnByPublication.md new file mode 100644 index 00000000..33eeb74e --- /dev/null +++ b/docs/VulnerabilitiesApiVulnByPublication.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiVulnByPublication + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIVulnByPublicationDate>**](ModelsAPIVulnByPublicationDate.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiVulnByPublication.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiVulnCount.md b/docs/VulnerabilitiesApiVulnCount.md new file mode 100644 index 00000000..12071c38 --- /dev/null +++ b/docs/VulnerabilitiesApiVulnCount.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiVulnCount + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIVulnCount>**](ModelsAPIVulnCount.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiVulnCount.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiVulnCountByActivelyExploited.md b/docs/VulnerabilitiesApiVulnCountByActivelyExploited.md new file mode 100644 index 00000000..4224459c --- /dev/null +++ b/docs/VulnerabilitiesApiVulnCountByActivelyExploited.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiVulnCountByActivelyExploited + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIVulnCount>**](ModelsAPIVulnCount.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiVulnCountByActivelyExploited.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiVulnCountByCSPRating.md b/docs/VulnerabilitiesApiVulnCountByCSPRating.md new file mode 100644 index 00000000..14708ca8 --- /dev/null +++ b/docs/VulnerabilitiesApiVulnCountByCSPRating.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiVulnCountByCSPRating + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiVulnCountByCSPRating.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiVulnCountByCVSSScore.md b/docs/VulnerabilitiesApiVulnCountByCVSSScore.md new file mode 100644 index 00000000..7565492c --- /dev/null +++ b/docs/VulnerabilitiesApiVulnCountByCVSSScore.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiVulnCountByCVSSScore + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiVulnCountByCVSSScore.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/VulnerabilitiesApiVulnCountBySeverity.md b/docs/VulnerabilitiesApiVulnCountBySeverity.md new file mode 100644 index 00000000..a1ece2b6 --- /dev/null +++ b/docs/VulnerabilitiesApiVulnCountBySeverity.md @@ -0,0 +1,22 @@ +# Falcon::VulnerabilitiesApiVulnCountBySeverity + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **errors** | [**Array<MsaspecError>**](MsaspecError.md) | | [optional] | +| **meta** | [**MsaspecMetaInfo**](MsaspecMetaInfo.md) | | | +| **resources** | [**Array<ModelsAPIFilterResponse>**](ModelsAPIFilterResponse.md) | | | + +## Example + +```ruby +require 'crimson-falcon' + +instance = Falcon::VulnerabilitiesApiVulnCountBySeverity.new( + errors: null, + meta: null, + resources: null +) +``` + diff --git a/docs/WorkflowsApi.md b/docs/WorkflowsApi.md new file mode 100644 index 00000000..7d3daced --- /dev/null +++ b/docs/WorkflowsApi.md @@ -0,0 +1,1035 @@ +# Falcon::WorkflowsApi + +All URIs are relative to *https://api.crowdstrike.com* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**workflow_definitions_combined**](WorkflowsApi.md#workflow_definitions_combined) | **GET** /workflows/combined/definitions/v1 | Search workflow definitions based on the provided filter | +| [**workflow_definitions_create**](WorkflowsApi.md#workflow_definitions_create) | **POST** /workflows/entities/definitions/v1 | Creates a workflow definition based on the provided model | +| [**workflow_definitions_export**](WorkflowsApi.md#workflow_definitions_export) | **GET** /workflows/entities/definitions/export/v1 | Exports a workflow definition for the given definition ID | +| [**workflow_definitions_import**](WorkflowsApi.md#workflow_definitions_import) | **POST** /workflows/entities/definitions/import/v1 | Imports a workflow definition based on the provided model | +| [**workflow_definitions_update**](WorkflowsApi.md#workflow_definitions_update) | **PUT** /workflows/entities/definitions/v1 | Updates a workflow definition based on the provided model | +| [**workflow_execute**](WorkflowsApi.md#workflow_execute) | **POST** /workflows/entities/execute/v1 | Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) | +| [**workflow_execution_results**](WorkflowsApi.md#workflow_execution_results) | **GET** /workflows/entities/execution-results/v1 | Get execution result of a given execution | +| [**workflow_executions_action**](WorkflowsApi.md#workflow_executions_action) | **POST** /workflows/entities/execution-actions/v1 | Allows a user to resume/retry a failed workflow execution. | +| [**workflow_executions_combined**](WorkflowsApi.md#workflow_executions_combined) | **GET** /workflows/combined/executions/v1 | Search workflow executions based on the provided filter | +| [**workflow_get_human_input_v1**](WorkflowsApi.md#workflow_get_human_input_v1) | **GET** /workflows/entities/human-inputs/v1 | Gets one or more specific human inputs by their IDs. | +| [**workflow_system_definitions_de_provision**](WorkflowsApi.md#workflow_system_definitions_de_provision) | **POST** /workflows/system-definitions/deprovision/v1 | Deprovisions a system definition that was previously provisioned on the target CID | +| [**workflow_system_definitions_promote**](WorkflowsApi.md#workflow_system_definitions_promote) | **POST** /workflows/system-definitions/promote/v1 | Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. | +| [**workflow_system_definitions_provision**](WorkflowsApi.md#workflow_system_definitions_provision) | **POST** /workflows/system-definitions/provision/v1 | Provisions a system definition onto the target CID by using the template and provided parameters | +| [**workflow_update_human_input_v1**](WorkflowsApi.md#workflow_update_human_input_v1) | **PATCH** /workflows/entities/human-inputs/v1 | Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. | + + +## workflow_definitions_combined + +> workflow_definitions_combined(opts) + +Search workflow definitions based on the provided 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::WorkflowsApi.new +opts = { + filter: 'filter_example', # String | FQL query specifying filter parameters. + offset: 'offset_example', # String | Starting pagination offset of records to return. + limit: 56, # Integer | Maximum number 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 + # Search workflow definitions based on the provided filter + result = api_instance.workflow_definitions_combined(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_combined: #{e}" +end +``` + +#### Using the workflow_definitions_combined_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_definitions_combined_with_http_info(opts) + +```ruby +begin + # Search workflow definitions based on the provided filter + data, status_code, headers = api_instance.workflow_definitions_combined_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_combined_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | FQL query specifying filter parameters. | [optional] | +| **offset** | **String** | Starting pagination offset of records to return. | [optional] | +| **limit** | **Integer** | Maximum number 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 + +[**DefinitionsDefinitionExternalResponse**](DefinitionsDefinitionExternalResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## workflow_definitions_create + +> workflow_definitions_create(body, opts) + +Creates a workflow definition based on the provided model + +### 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::WorkflowsApi.new +body = Falcon::ModelsDefinitionCreateRequestV2.new({definition: Falcon::V2Definition.new({name: 'name_example', node_registry: { key: 'inner_example'}, trigger: Falcon::V2Trigger.new({_next: ['_next_example']}), uniq_node_seen: { key: false}}), enabled: false}) # ModelsDefinitionCreateRequestV2 | +opts = { + validate_only: true # Boolean | When enabled, prevents saving workflow after validating +} + +begin + # Creates a workflow definition based on the provided model + result = api_instance.workflow_definitions_create(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_create: #{e}" +end +``` + +#### Using the workflow_definitions_create_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_definitions_create_with_http_info(body, opts) + +```ruby +begin + # Creates a workflow definition based on the provided model + data, status_code, headers = api_instance.workflow_definitions_create_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_create_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ModelsDefinitionCreateRequestV2**](ModelsDefinitionCreateRequestV2.md) | | | +| **validate_only** | **Boolean** | When enabled, prevents saving workflow after validating | [optional][default to false] | + +### Return type + +[**ApiResourceIDsResponse**](ApiResourceIDsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json, application/yaml +- **Accept**: application/json + + +## workflow_definitions_export + +> Array<Integer> workflow_definitions_export(id) + +Exports a workflow definition for the given definition ID + +### 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::WorkflowsApi.new +id = 'id_example' # String | ID of workflow definitions to return details for + +begin + # Exports a workflow definition for the given definition ID + result = api_instance.workflow_definitions_export(id) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_export: #{e}" +end +``` + +#### Using the workflow_definitions_export_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> workflow_definitions_export_with_http_info(id) + +```ruby +begin + # Exports a workflow definition for the given definition ID + data, status_code, headers = api_instance.workflow_definitions_export_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => Array<Integer> +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_export_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | ID of workflow definitions to return details for | | + +### Return type + +**Array<Integer>** + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/yaml + + +## workflow_definitions_import + +> workflow_definitions_import(data_file, opts) + +Imports a workflow definition based on the provided model + +### 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::WorkflowsApi.new +data_file = File.new('/path/to/some/file') # File | A workflow definition in YAML format to import +opts = { + name: 'name_example', # String | Workflow name to override + validate_only: true # Boolean | When enabled, prevents saving workflow after validating +} + +begin + # Imports a workflow definition based on the provided model + result = api_instance.workflow_definitions_import(data_file, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_import: #{e}" +end +``` + +#### Using the workflow_definitions_import_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_definitions_import_with_http_info(data_file, opts) + +```ruby +begin + # Imports a workflow definition based on the provided model + data, status_code, headers = api_instance.workflow_definitions_import_with_http_info(data_file, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_import_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **data_file** | **File** | A workflow definition in YAML format to import | | +| **name** | **String** | Workflow name to override | [optional] | +| **validate_only** | **Boolean** | When enabled, prevents saving workflow after validating | [optional][default to false] | + +### Return type + +[**DefinitionsDefinitionImportResponse**](DefinitionsDefinitionImportResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + + +## workflow_definitions_update + +> workflow_definitions_update(body, opts) + +Updates a workflow definition based on the provided model + +### 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::WorkflowsApi.new +body = Falcon::ModelsDefinitionUpdateRequestV2.new({definition: Falcon::V2Definition.new({name: 'name_example', node_registry: { key: 'inner_example'}, trigger: Falcon::V2Trigger.new({_next: ['_next_example']}), uniq_node_seen: { key: false}}), enabled: false, id: 'id_example'}) # ModelsDefinitionUpdateRequestV2 | +opts = { + validate_only: true # Boolean | When enabled, prevents saving workflow after validating +} + +begin + # Updates a workflow definition based on the provided model + result = api_instance.workflow_definitions_update(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_update: #{e}" +end +``` + +#### Using the workflow_definitions_update_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_definitions_update_with_http_info(body, opts) + +```ruby +begin + # Updates a workflow definition based on the provided model + data, status_code, headers = api_instance.workflow_definitions_update_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_definitions_update_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ModelsDefinitionUpdateRequestV2**](ModelsDefinitionUpdateRequestV2.md) | | | +| **validate_only** | **Boolean** | When enabled, prevents saving workflow after validating | [optional][default to false] | + +### Return type + +[**ApiResourceIDsResponse**](ApiResourceIDsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json, application/yaml +- **Accept**: application/json + + +## workflow_execute + +> workflow_execute(body, opts) + +Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) + +### 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::WorkflowsApi.new +body = { ... } # Object | +opts = { + execution_cid: ['inner_example'], # Array | CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used. + definition_id: ['inner_example'], # Array | Definition ID to execute, either a name or an ID can be specified. + name: 'name_example', # String | Workflow name to execute, either a name or an ID can be specified. + key: 'key_example', # String | Key used to help deduplicate executions, if unset a new UUID is used + depth: 56, # Integer | Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4. + source_event_url: 'source_event_url_example' # String | Used to record a URL to the source that led to triggering this workflow +} + +begin + # Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) + result = api_instance.workflow_execute(body, opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_execute: #{e}" +end +``` + +#### Using the workflow_execute_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_execute_with_http_info(body, opts) + +```ruby +begin + # Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) + data, status_code, headers = api_instance.workflow_execute_with_http_info(body, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_execute_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | **Object** | | | +| **execution_cid** | [**Array<String>**](String.md) | CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used. | [optional] | +| **definition_id** | [**Array<String>**](String.md) | Definition ID to execute, either a name or an ID can be specified. | [optional] | +| **name** | **String** | Workflow name to execute, either a name or an ID can be specified. | [optional] | +| **key** | **String** | Key used to help deduplicate executions, if unset a new UUID is used | [optional] | +| **depth** | **Integer** | Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4. | [optional] | +| **source_event_url** | **String** | Used to record a URL to the source that led to triggering this workflow | [optional] | + +### Return type + +[**ApiResourceIDsResponse**](ApiResourceIDsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## workflow_execution_results + +> workflow_execution_results(ids) + +Get execution result of a given execution + +### 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::WorkflowsApi.new +ids = ['inner_example'] # Array | workflow execution id to return results for. + +begin + # Get execution result of a given execution + result = api_instance.workflow_execution_results(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_execution_results: #{e}" +end +``` + +#### Using the workflow_execution_results_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_execution_results_with_http_info(ids) + +```ruby +begin + # Get execution result of a given execution + data, status_code, headers = api_instance.workflow_execution_results_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_execution_results_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | workflow execution id to return results for. | | + +### Return type + +[**ApiExecutionResultsResponse**](ApiExecutionResultsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## workflow_executions_action + +> workflow_executions_action(action_name, body) + +Allows a user to resume/retry a failed workflow execution. + +### 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::WorkflowsApi.new +action_name = 'resume' # String | Specify one of these actions: - `resume`: resume/retry the workflow execution(s) specified in ids +body = Falcon::ClientActionRequest.new({ids: ['ids_example']}) # ClientActionRequest | + +begin + # Allows a user to resume/retry a failed workflow execution. + result = api_instance.workflow_executions_action(action_name, body) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_executions_action: #{e}" +end +``` + +#### Using the workflow_executions_action_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_executions_action_with_http_info(action_name, body) + +```ruby +begin + # Allows a user to resume/retry a failed workflow execution. + data, status_code, headers = api_instance.workflow_executions_action_with_http_info(action_name, body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_executions_action_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **action_name** | **String** | Specify one of these actions: - `resume`: resume/retry the workflow execution(s) specified in ids | | +| **body** | [**ClientActionRequest**](ClientActionRequest.md) | | | + +### Return type + +[**DefinitionsDefinitionEntitiesResponse**](DefinitionsDefinitionEntitiesResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## workflow_executions_combined + +> workflow_executions_combined(opts) + +Search workflow executions based on the provided 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::WorkflowsApi.new +opts = { + filter: 'filter_example', # String | FQL query specifying filter parameters. + offset: 'offset_example', # String | Starting pagination offset of records to return. + limit: 56, # Integer | Maximum number 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 + # Search workflow executions based on the provided filter + result = api_instance.workflow_executions_combined(opts) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_executions_combined: #{e}" +end +``` + +#### Using the workflow_executions_combined_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_executions_combined_with_http_info(opts) + +```ruby +begin + # Search workflow executions based on the provided filter + data, status_code, headers = api_instance.workflow_executions_combined_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_executions_combined_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **filter** | **String** | FQL query specifying filter parameters. | [optional] | +| **offset** | **String** | Starting pagination offset of records to return. | [optional] | +| **limit** | **Integer** | Maximum number 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 + +[**ApiExecutionResultsResponse**](ApiExecutionResultsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## workflow_get_human_input_v1 + +> workflow_get_human_input_v1(ids) + +Gets one or more specific human inputs by 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::WorkflowsApi.new +ids = ['inner_example'] # Array | IDs of human inputs to read + +begin + # Gets one or more specific human inputs by their IDs. + result = api_instance.workflow_get_human_input_v1(ids) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_get_human_input_v1: #{e}" +end +``` + +#### Using the workflow_get_human_input_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_get_human_input_v1_with_http_info(ids) + +```ruby +begin + # Gets one or more specific human inputs by their IDs. + data, status_code, headers = api_instance.workflow_get_human_input_v1_with_http_info(ids) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_get_human_input_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **ids** | [**Array<String>**](String.md) | IDs of human inputs to read | | + +### Return type + +[**ModelUserInputReadResponse**](ModelUserInputReadResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## workflow_system_definitions_de_provision + +> workflow_system_definitions_de_provision(body) + +Deprovisions a system definition that was previously provisioned on the target CID + +### 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::WorkflowsApi.new +body = Falcon::ClientSystemDefinitionDeProvisionRequest.new({definition_id: 'definition_id_example', deprovision_all: false, template_id: 'template_id_example', template_name: 'template_name_example'}) # ClientSystemDefinitionDeProvisionRequest | + +begin + # Deprovisions a system definition that was previously provisioned on the target CID + result = api_instance.workflow_system_definitions_de_provision(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_system_definitions_de_provision: #{e}" +end +``` + +#### Using the workflow_system_definitions_de_provision_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_system_definitions_de_provision_with_http_info(body) + +```ruby +begin + # Deprovisions a system definition that was previously provisioned on the target CID + data, status_code, headers = api_instance.workflow_system_definitions_de_provision_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_system_definitions_de_provision_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ClientSystemDefinitionDeProvisionRequest**](ClientSystemDefinitionDeProvisionRequest.md) | | | + +### Return type + +[**ClientSystemDefinitionCreateResponse**](ClientSystemDefinitionCreateResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## workflow_system_definitions_promote + +> workflow_system_definitions_promote(body) + +Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. + +### 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::WorkflowsApi.new +body = Falcon::ClientSystemDefinitionPromoteRequest.new({customer_definition_id: 'customer_definition_id_example', name: 'name_example', parameters: Falcon::ParameterTemplateProvisionParameters.new, template_id: 'template_id_example', template_name: 'template_name_example', template_version: 'template_version_example'}) # ClientSystemDefinitionPromoteRequest | + +begin + # Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. + result = api_instance.workflow_system_definitions_promote(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_system_definitions_promote: #{e}" +end +``` + +#### Using the workflow_system_definitions_promote_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_system_definitions_promote_with_http_info(body) + +```ruby +begin + # Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. + data, status_code, headers = api_instance.workflow_system_definitions_promote_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_system_definitions_promote_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ClientSystemDefinitionPromoteRequest**](ClientSystemDefinitionPromoteRequest.md) | | | + +### Return type + +[**ClientSystemDefinitionCreateResponse**](ClientSystemDefinitionCreateResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## workflow_system_definitions_provision + +> workflow_system_definitions_provision(body) + +Provisions a system definition onto the target CID by using the template and provided parameters + +### 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::WorkflowsApi.new +body = Falcon::ClientSystemDefinitionProvisionRequest.new({name: 'name_example', parameters: Falcon::ParameterTemplateProvisionParameters.new, template_id: 'template_id_example', template_name: 'template_name_example', template_version: 'template_version_example'}) # ClientSystemDefinitionProvisionRequest | + +begin + # Provisions a system definition onto the target CID by using the template and provided parameters + result = api_instance.workflow_system_definitions_provision(body) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_system_definitions_provision: #{e}" +end +``` + +#### Using the workflow_system_definitions_provision_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_system_definitions_provision_with_http_info(body) + +```ruby +begin + # Provisions a system definition onto the target CID by using the template and provided parameters + data, status_code, headers = api_instance.workflow_system_definitions_provision_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_system_definitions_provision_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **body** | [**ClientSystemDefinitionProvisionRequest**](ClientSystemDefinitionProvisionRequest.md) | | | + +### Return type + +[**ClientSystemDefinitionCreateResponse**](ClientSystemDefinitionCreateResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## workflow_update_human_input_v1 + +> workflow_update_human_input_v1(id, body) + +Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. + +### 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::WorkflowsApi.new +id = 'id_example' # String | ID of human input to provide an input to +body = Falcon::ModelUserInputUpdateRequest.new({input: 'input_example', note: 'note_example'}) # ModelUserInputUpdateRequest | + +begin + # Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. + result = api_instance.workflow_update_human_input_v1(id, body) + p result +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_update_human_input_v1: #{e}" +end +``` + +#### Using the workflow_update_human_input_v1_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> workflow_update_human_input_v1_with_http_info(id, body) + +```ruby +begin + # Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. + data, status_code, headers = api_instance.workflow_update_human_input_v1_with_http_info(id, body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue Falcon::ApiError => e + puts "Error when calling WorkflowsApi->workflow_update_human_input_v1_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | ID of human input to provide an input to | | +| **body** | [**ModelUserInputUpdateRequest**](ModelUserInputUpdateRequest.md) | | | + +### Return type + +[**ApiResourceIDsResponse**](ApiResourceIDsResponse.md) + +### Authorization + +**oauth2** + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/lib/crimson-falcon.rb b/lib/crimson-falcon.rb index 5cb44c97..be74892a 100644 --- a/lib/crimson-falcon.rb +++ b/lib/crimson-falcon.rb @@ -35,9 +35,10 @@ require 'crimson-falcon/cloud' # Models +require 'crimson-falcon/models/alerts_container_alerts_count_value' +require 'crimson-falcon/models/alerts_container_alerts_entity_response' require 'crimson-falcon/models/api_action_resp_v1' require 'crimson-falcon/models/api_action_v1' -require 'crimson-falcon/models/api_aggregates_response' require 'crimson-falcon/models/api_audit_event_details_resource_v1' require 'crimson-falcon/models/api_audit_event_details_response_v1' require 'crimson-falcon/models/api_bulk_update_req_v1' @@ -45,7 +46,17 @@ require 'crimson-falcon/models/api_customer_settings_patch_request_v1' require 'crimson-falcon/models/api_customer_settings_resource_v1' require 'crimson-falcon/models/api_customer_settings_response_v1' +require 'crimson-falcon/models/api_detects_query_meta' +require 'crimson-falcon/models/api_detects_query_paging' +require 'crimson-falcon/models/api_device_count_resp_v1' +require 'crimson-falcon/models/api_device_count_v1' +require 'crimson-falcon/models/api_devices_ran_on_resp_v1' +require 'crimson-falcon/models/api_entities_response' +require 'crimson-falcon/models/api_execution_results_response' require 'crimson-falcon/models/api_exposed_data_file_details_v1' +require 'crimson-falcon/models/api_exposed_data_record_bot_location_v1' +require 'crimson-falcon/models/api_exposed_data_record_bot_operating_system_v1' +require 'crimson-falcon/models/api_exposed_data_record_bot_v1' 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' @@ -64,15 +75,20 @@ require 'crimson-falcon/models/api_message_center_activity_response' require 'crimson-falcon/models/api_message_center_attachment_upload_response' require 'crimson-falcon/models/api_message_center_cases_response' +require 'crimson-falcon/models/api_meta_info' require 'crimson-falcon/models/api_metadata_req_v1' require 'crimson-falcon/models/api_metadata_v1' 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_pattern_v1' require 'crimson-falcon/models/api_patterns_response' require 'crimson-falcon/models/api_platforms_response' require 'crimson-falcon/models/api_post_enrollment_details' require 'crimson-falcon/models/api_post_enrollment_details_response' +require 'crimson-falcon/models/api_processes_ran_on_resp_v1' +require 'crimson-falcon/models/api_resource_ids_response' +require 'crimson-falcon/models/api_response_pagination' 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' @@ -97,42 +113,124 @@ require 'crimson-falcon/models/api_validation_request_field_v1' require 'crimson-falcon/models/api_validation_request_v1' require 'crimson-falcon/models/api_validation_response_v1' +require 'crimson-falcon/models/apidomain_dynamic_execute_search_request_v1' +require 'crimson-falcon/models/apidomain_query_response_v1' +require 'crimson-falcon/models/apidomain_query_response_wrapper_v1' +require 'crimson-falcon/models/apidomain_repo_view_list_item_v1' +require 'crimson-falcon/models/apidomain_repo_view_list_item_wrapper_v1' +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/base_policy_members_resp_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' +require 'crimson-falcon/models/changes_acl_change' +require 'crimson-falcon/models/changes_after' +require 'crimson-falcon/models/changes_attribute' +require 'crimson-falcon/models/changes_basic' +require 'crimson-falcon/models/changes_before' +require 'crimson-falcon/models/changes_change' +require 'crimson-falcon/models/changes_dacl' +require 'crimson-falcon/models/changes_dacl_entity' +require 'crimson-falcon/models/changes_diff' +require 'crimson-falcon/models/changes_diff_hash' +require 'crimson-falcon/models/changes_diff_type' +require 'crimson-falcon/models/changes_get_changes_response' +require 'crimson-falcon/models/changes_group' +require 'crimson-falcon/models/changes_high_volume_query_meta' +require 'crimson-falcon/models/changes_high_volume_query_paging' +require 'crimson-falcon/models/changes_high_volume_query_response' +require 'crimson-falcon/models/changes_host' +require 'crimson-falcon/models/changes_host_group' +require 'crimson-falcon/models/changes_owner' +require 'crimson-falcon/models/changes_permissions' +require 'crimson-falcon/models/changes_permissions_lin' +require 'crimson-falcon/models/changes_policy' +require 'crimson-falcon/models/changes_policy_rule' +require 'crimson-falcon/models/changes_policy_rule_group' +require 'crimson-falcon/models/changes_prevalence' +require 'crimson-falcon/models/changes_tag' require 'crimson-falcon/models/classification_criteria' require 'crimson-falcon/models/classification_label' +require 'crimson-falcon/models/client_action_request' require 'crimson-falcon/models/client_archive_create_response_v1' require 'crimson-falcon/models/client_archive_list_files_response_v1' require 'crimson-falcon/models/client_archive_with_files_v1' +require 'crimson-falcon/models/client_cost' +require 'crimson-falcon/models/client_costs' +require 'crimson-falcon/models/client_data_ingest_response_v1' +require 'crimson-falcon/models/client_data_ingest_response_wrapper_v1' +require 'crimson-falcon/models/client_digest_flow' +require 'crimson-falcon/models/client_extra_in' +require 'crimson-falcon/models/client_extra_limit' +require 'crimson-falcon/models/client_extra_rename' +require 'crimson-falcon/models/client_extra_sort' require 'crimson-falcon/models/client_extraction_create_request_v1' require 'crimson-falcon/models/client_extraction_create_response_v1' require 'crimson-falcon/models/client_extraction_file_parameters_v1' 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_field' +require 'crimson-falcon/models/client_job_status' +require 'crimson-falcon/models/client_query_response_schemas_v1' +require 'crimson-falcon/models/client_query_result_metadata' require 'crimson-falcon/models/client_query_samples_request' +require 'crimson-falcon/models/client_repository' require 'crimson-falcon/models/client_sample_metadata_response_v2' require 'crimson-falcon/models/client_sample_metadata_v2' +require 'crimson-falcon/models/client_spent' +require 'crimson-falcon/models/client_system_definition_create_response' +require 'crimson-falcon/models/client_system_definition_de_provision_request' +require 'crimson-falcon/models/client_system_definition_promote_request' +require 'crimson-falcon/models/client_system_definition_provision_request' +require 'crimson-falcon/models/client_top_value' require 'crimson-falcon/models/common_cid_audit_result' -require 'crimson-falcon/models/common_entities_response' +require 'crimson-falcon/models/common_count_as_resource' +require 'crimson-falcon/models/common_count_response' +require 'crimson-falcon/models/common_generic_entity_response_string' require 'crimson-falcon/models/common_os_audit' require 'crimson-falcon/models/core_entities_response' +require 'crimson-falcon/models/custom_type1255839303' +require 'crimson-falcon/models/custom_type3191042536' +require 'crimson-falcon/models/definitions_definition_entities_response' +require 'crimson-falcon/models/definitions_definition_ext' +require 'crimson-falcon/models/definitions_definition_external_response' +require 'crimson-falcon/models/definitions_definition_import_response' +require 'crimson-falcon/models/definitions_definition_import_response_entity' +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/detection_aggregate_indicator' require 'crimson-falcon/models/detection_aggregate_threat_intel' require 'crimson-falcon/models/detection_enrichment' require 'crimson-falcon/models/detection_enrichment_host' require 'crimson-falcon/models/detection_host_network' require 'crimson-falcon/models/detection_inventory_enrichment' +require 'crimson-falcon/models/detections_api_assessment_detections' +require 'crimson-falcon/models/detections_api_combined_detections' +require 'crimson-falcon/models/detections_api_detections_by_severity' +require 'crimson-falcon/models/detections_api_detections_by_type' +require 'crimson-falcon/models/detections_api_detections_count' require 'crimson-falcon/models/detects_alert' require 'crimson-falcon/models/detects_behavior' require 'crimson-falcon/models/detects_device_detail_indexed' require 'crimson-falcon/models/detects_host_info' require 'crimson-falcon/models/detects_parent_details' require 'crimson-falcon/models/detects_quarantined_file' +require 'crimson-falcon/models/detectsapi_aggregate_alert_query_request' +require 'crimson-falcon/models/detectsapi_aggregates_response' +require 'crimson-falcon/models/detectsapi_aggregation_result' +require 'crimson-falcon/models/detectsapi_aggregation_result_item' +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_entities_alerts_v1_request' require 'crimson-falcon/models/detectsapi_post_entities_alerts_v1_response' +require 'crimson-falcon/models/detectsapi_post_entities_alerts_v2_request' +require 'crimson-falcon/models/detectsapi_post_entities_alerts_v2_response' +require 'crimson-falcon/models/detectsapi_response_fields' require 'crimson-falcon/models/device_control_create_policies_v1' require 'crimson-falcon/models/device_control_create_policy_req_v1' require 'crimson-falcon/models/device_control_exception_req_v1' @@ -195,6 +293,8 @@ require 'crimson-falcon/models/domain_api_query_paging_v1' require 'crimson-falcon/models/domain_api_remediation_ids' require 'crimson-falcon/models/domain_api_remediation_v2' +require 'crimson-falcon/models/domain_api_rule_details_response_v1' +require 'crimson-falcon/models/domain_api_rule_details_v1' require 'crimson-falcon/models/domain_api_vulnerability_app_v2' require 'crimson-falcon/models/domain_api_vulnerability_cvecisa_info' require 'crimson-falcon/models/domain_api_vulnerability_cve_details_facet_v2' @@ -204,7 +304,9 @@ require 'crimson-falcon/models/domain_api_vulnerability_remediation_facet_v2' require 'crimson-falcon/models/domain_api_vulnerability_suppression_info_v2' require 'crimson-falcon/models/domain_api_vulnerability_v2' +require 'crimson-falcon/models/domain_aws_account_input' require 'crimson-falcon/models/domain_aws_account_v2' +require 'crimson-falcon/models/domain_aws_batch_cluster_region' require 'crimson-falcon/models/domain_aws_configuration' require 'crimson-falcon/models/domain_awsd4_c_account_v1' require 'crimson-falcon/models/domain_awsd4_c_organization_account_v1' @@ -216,14 +318,19 @@ require 'crimson-falcon/models/domain_action_v1' require 'crimson-falcon/models/domain_activity_creation_request' require 'crimson-falcon/models/domain_actor_document' +require 'crimson-falcon/models/domain_actor_entity' +require 'crimson-falcon/models/domain_actor_news_document' require 'crimson-falcon/models/domain_actors_response' require 'crimson-falcon/models/domain_aggregates_response' require 'crimson-falcon/models/domain_assessment' require 'crimson-falcon/models/domain_assessment_items' require 'crimson-falcon/models/domain_assessments_by_score_response' require 'crimson-falcon/models/domain_assessments_response' +require 'crimson-falcon/models/domain_asset_criticality_info_v1' +require 'crimson-falcon/models/domain_attachment' require 'crimson-falcon/models/domain_audit_response' require 'crimson-falcon/models/domain_azure_client_service_principal_v1' +require 'crimson-falcon/models/domain_azure_management_group_role_assignment' require 'crimson-falcon/models/domain_azure_resource_permission' require 'crimson-falcon/models/domain_azure_role_assignment' require 'crimson-falcon/models/domain_base_api_vulnerability_v2' @@ -250,6 +357,7 @@ require 'crimson-falcon/models/domain_cid_policy_assignments' require 'crimson-falcon/models/domain_csix_label' require 'crimson-falcon/models/domain_csix_relation' +require 'crimson-falcon/models/domain_card' require 'crimson-falcon/models/domain_case_creation_request' require 'crimson-falcon/models/domain_case_creation_request_v2' require 'crimson-falcon/models/domain_child_link' @@ -268,6 +376,7 @@ require 'crimson-falcon/models/domain_detailed_notification_v1' require 'crimson-falcon/models/domain_detects_entities_patch_request' require 'crimson-falcon/models/domain_device' +require 'crimson-falcon/models/domain_device_policy' require 'crimson-falcon/models/domain_discover_api_account' require 'crimson-falcon/models/domain_discover_api_account_entities_response' require 'crimson-falcon/models/domain_discover_api_active_discovery_host' @@ -306,6 +415,9 @@ require 'crimson-falcon/models/domain_export_job_id_response_v1' require 'crimson-falcon/models/domain_export_job_metadata_v1' require 'crimson-falcon/models/domain_export_job_v1' +require 'crimson-falcon/models/domain_exposed_data_record_bot_location_v1' +require 'crimson-falcon/models/domain_exposed_data_record_bot_operating_system_v1' +require 'crimson-falcon/models/domain_exposed_data_record_bot_v1' require 'crimson-falcon/models/domain_exposed_data_record_financial_v1' require 'crimson-falcon/models/domain_exposed_data_record_location_v1' require 'crimson-falcon/models/domain_exposed_data_record_social_v1' @@ -319,14 +431,19 @@ require 'crimson-falcon/models/domain_field_value' require 'crimson-falcon/models/domain_file' require 'crimson-falcon/models/domain_file_count' +require 'crimson-falcon/models/domain_file_count_v2' require 'crimson-falcon/models/domain_file_details_v1' require 'crimson-falcon/models/domain_file_v2' +require 'crimson-falcon/models/domain_fragment_info' require 'crimson-falcon/models/domain_gcp_account_v1' +require 'crimson-falcon/models/domain_host' +require 'crimson-falcon/models/domain_ioc' require 'crimson-falcon/models/domain_image' require 'crimson-falcon/models/domain_incident' require 'crimson-falcon/models/domain_init_request' 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_key_value_pair' require 'crimson-falcon/models/domain_kill_chain' require 'crimson-falcon/models/domain_last_scheduled_execution' @@ -340,6 +457,8 @@ require 'crimson-falcon/models/domain_mssp_role_response_v1' require 'crimson-falcon/models/domain_mssp_roles' require 'crimson-falcon/models/domain_malicious_file' +require 'crimson-falcon/models/domain_mapped_device_policies' +require 'crimson-falcon/models/domain_marketplace_product' require 'crimson-falcon/models/domain_matched_breach_summary_v1' require 'crimson-falcon/models/domain_matched_rule' require 'crimson-falcon/models/domain_meta_info' @@ -349,7 +468,6 @@ require 'crimson-falcon/models/domain_msa_external_incident_response' require 'crimson-falcon/models/domain_msa_incident_perform_action_response' require 'crimson-falcon/models/domain_msa_incident_query_response' -require 'crimson-falcon/models/domain_msa_meta_info' require 'crimson-falcon/models/domain_msa_qf_response' require 'crimson-falcon/models/domain_multi_command_execute_response' require 'crimson-falcon/models/domain_multi_command_execute_response_wrapper' @@ -359,7 +477,6 @@ require 'crimson-falcon/models/domain_news_response' require 'crimson-falcon/models/domain_notification_config' require 'crimson-falcon/models/domain_notification_details_response_v1' -require 'crimson-falcon/models/domain_notification_details_v1' require 'crimson-falcon/models/domain_notification_entities_response_v1' require 'crimson-falcon/models/domain_notification_id_response' require 'crimson-falcon/models/domain_notification_v1' @@ -387,6 +504,7 @@ require 'crimson-falcon/models/domain_report_execution_summary_v1' require 'crimson-falcon/models/domain_report_execution_v1' require 'crimson-falcon/models/domain_report_executions_response_v1' +require 'crimson-falcon/models/domain_report_malware' require 'crimson-falcon/models/domain_report_metadata' require 'crimson-falcon/models/domain_report_params' require 'crimson-falcon/models/domain_result_metadata' @@ -414,6 +532,7 @@ require 'crimson-falcon/models/domain_scan_profile' require 'crimson-falcon/models/domain_scan_profile_metadata' require 'crimson-falcon/models/domain_scan_schedule_data_v1' +require 'crimson-falcon/models/domain_scan_v2' require 'crimson-falcon/models/domain_schedule' require 'crimson-falcon/models/domain_scheduled_report_v1' require 'crimson-falcon/models/domain_scheduled_reports_result_v1' @@ -429,6 +548,11 @@ require 'crimson-falcon/models/domain_simple_actor' require 'crimson-falcon/models/domain_status_response' require 'crimson-falcon/models/domain_status_response_wrapper' +require 'crimson-falcon/models/domain_telegram_channel_info' +require 'crimson-falcon/models/domain_telegram_info' +require 'crimson-falcon/models/domain_telegram_recipient_info' +require 'crimson-falcon/models/domain_telegram_sender_info' +require 'crimson-falcon/models/domain_threat_entity' require 'crimson-falcon/models/domain_tweet_source' require 'crimson-falcon/models/domain_update_action_request' require 'crimson-falcon/models/domain_update_notification_request_v1' @@ -459,6 +583,12 @@ require 'crimson-falcon/models/domain_xdr_data' require 'crimson-falcon/models/domain_xdr_params' require 'crimson-falcon/models/domain_zero_trust_simple_assessment' +require 'crimson-falcon/models/driftindicators_drift_entity_response' +require 'crimson-falcon/models/driftindicators_drift_indicators_count_value' +require 'crimson-falcon/models/driftindicators_drift_indicators_field_value' +require 'crimson-falcon/models/empowerapi_falcon_script' +require 'crimson-falcon/models/empowerapi_msa_falcon_script_response' +require 'crimson-falcon/models/empowerapi_msa_id_list_response' require 'crimson-falcon/models/empowerapi_msa_pf_response_v1' require 'crimson-falcon/models/empowerapi_msa_pf_response_v2' require 'crimson-falcon/models/empowerapi_remote_command_put_file_v1' @@ -468,11 +598,20 @@ require 'crimson-falcon/models/entities_ods_scan_malicious_file_response' require 'crimson-falcon/models/entities_ods_scan_request' require 'crimson-falcon/models/entities_ods_scan_response' +require 'crimson-falcon/models/entities_ods_scan_response_v2' require 'crimson-falcon/models/entities_ods_schedule_scan_request' require 'crimson-falcon/models/entities_ods_schedule_scan_response' require 'crimson-falcon/models/exclusions_create_req_v1' require 'crimson-falcon/models/exclusions_exclusion_v1' require 'crimson-falcon/models/exclusions_resp_v1' +require 'crimson-falcon/models/executions_activity_execution_result' +require 'crimson-falcon/models/executions_ancestor_execution' +require 'crimson-falcon/models/executions_child_execution_result' +require 'crimson-falcon/models/executions_execution_result' +require 'crimson-falcon/models/executions_iterations' +require 'crimson-falcon/models/executions_loop_result' +require 'crimson-falcon/models/executions_reference_link' +require 'crimson-falcon/models/executions_trigger_result' require 'crimson-falcon/models/falconx_amsi_call' require 'crimson-falcon/models/falconx_actor' require 'crimson-falcon/models/falconx_actor_summary' @@ -542,6 +681,7 @@ require 'crimson-falcon/models/flightcontrolapi_get_roles_response' require 'crimson-falcon/models/flightcontrolapi_user_grant_response' require 'crimson-falcon/models/flightcontrolapi_user_response' +require 'crimson-falcon/models/flows' require 'crimson-falcon/models/fwmgr_api_aggregates_response' require 'crimson-falcon/models/fwmgr_api_events_response' require 'crimson-falcon/models/fwmgr_api_filepath_test_request' @@ -609,6 +749,17 @@ require 'crimson-falcon/models/fwmgr_msaspec_query_response' require 'crimson-falcon/models/fwmgr_msaspec_response_fields' require 'crimson-falcon/models/fwmgr_msaspec_writes' +require 'crimson-falcon/models/graph_condition' +require 'crimson-falcon/models/graph_configured_activity' +require 'crimson-falcon/models/graph_configured_trigger' +require 'crimson-falcon/models/graph_definition_model' +require 'crimson-falcon/models/graph_end' +require 'crimson-falcon/models/graph_flow' +require 'crimson-falcon/models/graph_gateway' +require 'crimson-falcon/models/graph_multi' +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/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' @@ -616,6 +767,15 @@ require 'crimson-falcon/models/host_groups_resp_v1' require 'crimson-falcon/models/host_groups_update_group_req_v1' require 'crimson-falcon/models/host_groups_update_groups_req_v1' +require 'crimson-falcon/models/images_api_combined_image_export' +require 'crimson-falcon/models/images_api_customer_and_image' +require 'crimson-falcon/models/images_api_image_assessment_history' +require 'crimson-falcon/models/images_api_image_by_vulnerability_count' +require 'crimson-falcon/models/images_api_image_count' +require 'crimson-falcon/models/images_api_image_count_by_base_os' +require 'crimson-falcon/models/images_api_image_count_by_state' +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/internal_sensor_status' require 'crimson-falcon/models/ioa_cloud_account_id' @@ -632,6 +792,37 @@ require 'crimson-falcon/models/iocapi_msa_reply_processes_ran_on' require 'crimson-falcon/models/iocapi_pagination_meta' require 'crimson-falcon/models/iocapi_response_meta' +require 'crimson-falcon/models/jsonschema_authorization' +require 'crimson-falcon/models/jsonschema_collection_index_field' +require 'crimson-falcon/models/jsonschema_complex_permissions' +require 'crimson-falcon/models/jsonschema_complex_permissions_or' +require 'crimson-falcon/models/jsonschema_condition_group_fields' +require 'crimson-falcon/models/jsonschema_permission' +require 'crimson-falcon/models/jsonschema_pivot' +require 'crimson-falcon/models/jsonschema_reset_fields' +require 'crimson-falcon/models/jsonschema_schema' +require 'crimson-falcon/models/jsonschema_signals_extensions' +require 'crimson-falcon/models/jsonschema_sub_schema' +require 'crimson-falcon/models/jsonschema_workflow_extensions' +require 'crimson-falcon/models/k8sassets_cluster_enrichment_data' +require 'crimson-falcon/models/k8sassets_cluster_enrichment_entry' +require 'crimson-falcon/models/k8sassets_cluster_enrichment_response' +require 'crimson-falcon/models/k8sassets_container_enrichment_data' +require 'crimson-falcon/models/k8sassets_container_enrichment_entry' +require 'crimson-falcon/models/k8sassets_container_enrichment_response' +require 'crimson-falcon/models/k8sassets_container_info' +require 'crimson-falcon/models/k8sassets_deployment_enrichment_data' +require 'crimson-falcon/models/k8sassets_deployment_enrichment_entry' +require 'crimson-falcon/models/k8sassets_deployment_enrichment_response' +require 'crimson-falcon/models/k8sassets_node_enrichment_data' +require 'crimson-falcon/models/k8sassets_node_enrichment_entry' +require 'crimson-falcon/models/k8sassets_node_enrichment_response' +require 'crimson-falcon/models/k8sassets_pod_enrichment_data' +require 'crimson-falcon/models/k8sassets_pod_enrichment_entry' +require 'crimson-falcon/models/k8sassets_pod_enrichment_response' +require 'crimson-falcon/models/k8sioms_kubernetes_iom_count_value' +require 'crimson-falcon/models/k8sioms_kubernetes_iom_entity_response' +require 'crimson-falcon/models/k8sioms_kubernetes_iom_field_value' require 'crimson-falcon/models/k8sreg_api_key' require 'crimson-falcon/models/k8sreg_aws_account_resp' require 'crimson-falcon/models/k8sreg_aws_cluster_item_resp' @@ -702,27 +893,102 @@ require 'crimson-falcon/models/model_argument' require 'crimson-falcon/models/model_file' require 'crimson-falcon/models/model_session_log' +require 'crimson-falcon/models/model_user_input_read_response' +require 'crimson-falcon/models/model_user_input_update_request' +require 'crimson-falcon/models/model_user_input_view_model' +require 'crimson-falcon/models/models_api_assessment_detections' +require 'crimson-falcon/models/models_api_combined_detections' +require 'crimson-falcon/models/models_api_container_alert' +require 'crimson-falcon/models/models_api_customer_and_image' +require 'crimson-falcon/models/models_api_detection_count' +require 'crimson-falcon/models/models_api_detection_count_by_type' +require 'crimson-falcon/models/models_api_drift_indicators' +require 'crimson-falcon/models/models_api_filter_label' +require 'crimson-falcon/models/models_api_filter_response' +require 'crimson-falcon/models/models_api_image_assessment' +require 'crimson-falcon/models/models_api_image_assessment_history' +require 'crimson-falcon/models/models_api_image_by_vulnerability_count' +require 'crimson-falcon/models/models_api_image_combined_export' +require 'crimson-falcon/models/models_api_image_count' +require 'crimson-falcon/models/models_api_image_issues_summary' +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_vulnerability' +require 'crimson-falcon/models/models_api_packages_by_vuln_count' +require 'crimson-falcon/models/models_api_policy_count_by_action' +require 'crimson-falcon/models/models_api_policy_data' +require 'crimson-falcon/models/models_api_policy_entity' +require 'crimson-falcon/models/models_api_policy_exclusion' +require 'crimson-falcon/models/models_api_policy_group' +require 'crimson-falcon/models/models_api_policy_group_data' +require 'crimson-falcon/models/models_api_policy_rule' +require 'crimson-falcon/models/models_api_policy_rules_data' +require 'crimson-falcon/models/models_api_precedence_request' +require 'crimson-falcon/models/models_api_runtime_detection' +require 'crimson-falcon/models/models_api_unidentified_container' +require 'crimson-falcon/models/models_api_vuln_by_image_count' +require 'crimson-falcon/models/models_api_vuln_by_publication_date' +require 'crimson-falcon/models/models_api_vuln_count' +require 'crimson-falcon/models/models_api_vuln_count_by_severity' +require 'crimson-falcon/models/models_api_vulnerability_combined' +require 'crimson-falcon/models/models_api_vulnerability_details' +require 'crimson-falcon/models/models_api_vulnerability_info' require 'crimson-falcon/models/models_aws_account_request_v1' require 'crimson-falcon/models/models_aws_account_v1' require 'crimson-falcon/models/models_aws_accounts_v1' require 'crimson-falcon/models/models_aws_customer_settings_request_v1' require 'crimson-falcon/models/models_access_health_details' +require 'crimson-falcon/models/models_account_entities_input' +require 'crimson-falcon/models/models_account_status_response' +require 'crimson-falcon/models/models_aggregate_values_by_field_response' require 'crimson-falcon/models/models_application_library' require 'crimson-falcon/models/models_application_package_info_type' require 'crimson-falcon/models/models_aws_account_access_health' require 'crimson-falcon/models/models_base_response_v1' +require 'crimson-falcon/models/models_cluster' +require 'crimson-falcon/models/models_cluster_entity_response' +require 'crimson-falcon/models/models_container' +require 'crimson-falcon/models/models_container_coverage' +require 'crimson-falcon/models/models_container_coverage_response_entity' +require 'crimson-falcon/models/models_container_entity_response' +require 'crimson-falcon/models/models_container_image' +require 'crimson-falcon/models/models_container_information' +require 'crimson-falcon/models/models_container_runtime_pivot' +require 'crimson-falcon/models/models_container_runtime_pivot_response' require 'crimson-falcon/models/models_create_aws_accounts_v1' +require 'crimson-falcon/models/models_create_image_group_request' +require 'crimson-falcon/models/models_create_policy_request' require 'crimson-falcon/models/models_credentials' require 'crimson-falcon/models/models_customer_configurations_v1' +require 'crimson-falcon/models/models_definition_create_request_v2' +require 'crimson-falcon/models/models_definition_update_request_v2' +require 'crimson-falcon/models/models_deployment' +require 'crimson-falcon/models/models_deployment_entity_response' +require 'crimson-falcon/models/models_exclusion_condition' +require 'crimson-falcon/models/models_exclusion_condition_request' require 'crimson-falcon/models/models_ext_api_image_combined' -require 'crimson-falcon/models/models_job_meta_data' +require 'crimson-falcon/models/models_image_information' +require 'crimson-falcon/models/models_image_summary_packages_info' +require 'crimson-falcon/models/models_issues_summary_container_info' +require 'crimson-falcon/models/models_light_weight_config' require 'crimson-falcon/models/models_modify_aws_customer_settings_v1' +require 'crimson-falcon/models/models_node' +require 'crimson-falcon/models/models_node_entity_response' require 'crimson-falcon/models/models_package_info_type' +require 'crimson-falcon/models/models_package_name_version_type' +require 'crimson-falcon/models/models_patch_image_group_request' +require 'crimson-falcon/models/models_patch_policy_request' +require 'crimson-falcon/models/models_pod' +require 'crimson-falcon/models/models_pod_entity_response' +require 'crimson-falcon/models/models_policy_entity_response' +require 'crimson-falcon/models/models_policy_exclusion_entity_response' +require 'crimson-falcon/models/models_policy_group_entity_response' require 'crimson-falcon/models/models_registry_credentials_response' -require 'crimson-falcon/models/models_scan_results' -require 'crimson-falcon/models/models_snapshot_inventory_application' -require 'crimson-falcon/models/models_snapshot_inventory_payload' +require 'crimson-falcon/models/models_request_api_policy_data' +require 'crimson-falcon/models/models_snapshot_account_status' require 'crimson-falcon/models/models_update_aws_accounts_v1' +require 'crimson-falcon/models/models_update_exclusions_request' require 'crimson-falcon/models/models_verify_access_response_v1' require 'crimson-falcon/models/msa_api_error' require 'crimson-falcon/models/msa_affected_entity' @@ -755,7 +1021,29 @@ require 'crimson-falcon/models/msaspec_response_fields' require 'crimson-falcon/models/msaspec_writes' 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_packages_by_vuln_count' +require 'crimson-falcon/models/parameter_activity_config_parameter_value' +require 'crimson-falcon/models/parameter_activity_config_provision_parameter' +require 'crimson-falcon/models/parameter_activity_provision_parameters' +require 'crimson-falcon/models/parameter_activity_selection_parameter' +require 'crimson-falcon/models/parameter_condition_field_parameter' +require 'crimson-falcon/models/parameter_condition_field_provision_parameter' +require 'crimson-falcon/models/parameter_condition_provision_parameter' +require 'crimson-falcon/models/parameter_template_provision_parameters' +require 'crimson-falcon/models/parameter_trigger_field_parameter' +require 'crimson-falcon/models/parameter_trigger_parameter' +require 'crimson-falcon/models/parameter_trigger_provision_parameter' require 'crimson-falcon/models/patterndisposition_pattern_disposition' +require 'crimson-falcon/models/policies_assigned_host_group' +require 'crimson-falcon/models/policies_assigned_rule_group' +require 'crimson-falcon/models/policies_create_request' +require 'crimson-falcon/models/policies_delete_response' +require 'crimson-falcon/models/policies_policy' +require 'crimson-falcon/models/policies_precedence_response' +require 'crimson-falcon/models/policies_response' +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/prevention_category_resp_v1' @@ -769,30 +1057,6 @@ require 'crimson-falcon/models/prevention_update_policy_req_v1' require 'crimson-falcon/models/processesapi_msa_process_detail_response' require 'crimson-falcon/models/processesapi_process_detail' -require 'crimson-falcon/models/public_acl' -require 'crimson-falcon/models/public_acl_change' -require 'crimson-falcon/models/public_after' -require 'crimson-falcon/models/public_attribute' -require 'crimson-falcon/models/public_basic' -require 'crimson-falcon/models/public_before' -require 'crimson-falcon/models/public_change' -require 'crimson-falcon/models/public_dacl' -require 'crimson-falcon/models/public_dacl_entity' -require 'crimson-falcon/models/public_diff' -require 'crimson-falcon/models/public_diff_hash' -require 'crimson-falcon/models/public_diff_type' -require 'crimson-falcon/models/public_get_changes_response' -require 'crimson-falcon/models/public_group' -require 'crimson-falcon/models/public_host' -require 'crimson-falcon/models/public_host_group' -require 'crimson-falcon/models/public_owner' -require 'crimson-falcon/models/public_permissions' -require 'crimson-falcon/models/public_permissions_lin' -require 'crimson-falcon/models/public_policy' -require 'crimson-falcon/models/public_policy_rule' -require 'crimson-falcon/models/public_policy_rule_group' -require 'crimson-falcon/models/public_prevalence' -require 'crimson-falcon/models/public_tag' require 'crimson-falcon/models/quarantine_quarantined_file' require 'crimson-falcon/models/quarantine_quarantined_file_path' require 'crimson-falcon/models/reconmsa_api_error' @@ -809,10 +1073,16 @@ require 'crimson-falcon/models/registration_aws_provision_get_account_script_response_v2' require 'crimson-falcon/models/registration_azure_account_create_request_external_v1' require 'crimson-falcon/models/registration_azure_account_external_v1' +require 'crimson-falcon/models/registration_azure_account_patch' +require 'crimson-falcon/models/registration_azure_account_patch_request' require 'crimson-falcon/models/registration_azure_account_response_v1' require 'crimson-falcon/models/registration_azure_account_v1_ext' require 'crimson-falcon/models/registration_azure_download_certificate_response_v1' require 'crimson-falcon/models/registration_azure_key_v1' +require 'crimson-falcon/models/registration_azure_management_group_create_request_external_v1' +require 'crimson-falcon/models/registration_azure_management_group_external_v1' +require 'crimson-falcon/models/registration_azure_management_group_response_v1' +require 'crimson-falcon/models/registration_azure_management_group_v1_ext' require 'crimson-falcon/models/registration_azure_provision_get_user_script_response_v1' require 'crimson-falcon/models/registration_azure_tenant_configuration_response_v1' require 'crimson-falcon/models/registration_azure_tenant_default_subscription_id_response_v1' @@ -824,18 +1094,27 @@ require 'crimson-falcon/models/registration_external_iom_event_response' require 'crimson-falcon/models/registration_external_iom_event_response_v2' require 'crimson-falcon/models/registration_gcp_account_create_request_ext_v1' +require 'crimson-falcon/models/registration_gcp_account_ext_request_v2' require 'crimson-falcon/models/registration_gcp_account_ext_v1' +require 'crimson-falcon/models/registration_gcp_account_patch' +require 'crimson-falcon/models/registration_gcp_account_patch_request' +require 'crimson-falcon/models/registration_gcp_account_req_obj_v2' +require 'crimson-falcon/models/registration_gcp_account_response_ext_v2' require 'crimson-falcon/models/registration_gcp_account_response_v1' +require 'crimson-falcon/models/registration_gcp_account_rsp_obj_v2' require 'crimson-falcon/models/registration_gcp_provision_get_user_script_response_v1' +require 'crimson-falcon/models/registration_gcp_service_account_ext_v1' +require 'crimson-falcon/models/registration_gcp_service_account_response_ext_v1' require 'crimson-falcon/models/registration_gcp_user_script' require 'crimson-falcon/models/registration_ioa_event' require 'crimson-falcon/models/registration_iom_event' +require 'crimson-falcon/models/registration_iom_event_id_response_meta' require 'crimson-falcon/models/registration_iom_event_ids_response_v2' require 'crimson-falcon/models/registration_iom_event_v2' require 'crimson-falcon/models/registration_iom_resources' require 'crimson-falcon/models/registration_msa_meta_info_extension' require 'crimson-falcon/models/registration_msa_paging_extension' -require 'crimson-falcon/models/registration_msa_spec_meta_info_extension' +require 'crimson-falcon/models/registration_next_token_pagination' require 'crimson-falcon/models/registration_policy_ext_v1' require 'crimson-falcon/models/registration_policy_request_ext_v1' require 'crimson-falcon/models/registration_policy_response_v1' @@ -854,17 +1133,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/rulegroups_assigned_rule' +require 'crimson-falcon/models/rulegroups_create_request' +require 'crimson-falcon/models/rulegroups_delete_response' +require 'crimson-falcon/models/rulegroups_policy_assignment' +require 'crimson-falcon/models/rulegroups_response' +require 'crimson-falcon/models/rulegroups_rule' +require 'crimson-falcon/models/rulegroups_rule_group' +require 'crimson-falcon/models/rulegroups_rules_response' +require 'crimson-falcon/models/rulegroups_update_request' +require 'crimson-falcon/models/runtimedetections_detections_entity_response' require 'crimson-falcon/models/sadomain_create_rule_request_v1' require 'crimson-falcon/models/sadomain_customer_assets' require 'crimson-falcon/models/sadomain_notification_log' require 'crimson-falcon/models/sadomain_rule' -require 'crimson-falcon/models/sadomain_submit_for_blocking_info' +require 'crimson-falcon/models/sadomain_submission_information' require 'crimson-falcon/models/sadomain_typosquatting_base_domain' require 'crimson-falcon/models/sadomain_typosquatting_component' require 'crimson-falcon/models/sadomain_typosquatting_parent_domain' require 'crimson-falcon/models/sadomain_whois_record' require 'crimson-falcon/models/sadomain_whois_registrant' require 'crimson-falcon/models/sadomain_whois_registrar' +require 'crimson-falcon/models/scheduledexclusions_create_request' +require 'crimson-falcon/models/scheduledexclusions_repeated' +require 'crimson-falcon/models/scheduledexclusions_response' +require 'crimson-falcon/models/scheduledexclusions_scheduled_exclusion' +require 'crimson-falcon/models/scheduledexclusions_update_request' require 'crimson-falcon/models/schema_sensor_event' require 'crimson-falcon/models/schema_sensor_event_field' require 'crimson-falcon/models/schema_sensor_event_response_v1' @@ -898,23 +1192,53 @@ require 'crimson-falcon/models/sv_exclusions_resp_v1' require 'crimson-falcon/models/sv_exclusions_sv_exclusion_v1' require 'crimson-falcon/models/sv_exclusions_update_req_v1' +require 'crimson-falcon/models/unidentifiedcontainers_unidentified_container_api_response' +require 'crimson-falcon/models/unidentifiedcontainers_unidentified_containers_count_value' require 'crimson-falcon/models/uninstall_token_resp_v1' require 'crimson-falcon/models/uninstall_token_reveal_uninstall_token_req_v1' require 'crimson-falcon/models/uninstall_token_uninstall_token_v1' require 'crimson-falcon/models/upload_sample_v2_request' +require 'crimson-falcon/models/v2_activity' +require 'crimson-falcon/models/v2_activity_parameters' +require 'crimson-falcon/models/v2_activity_properties' +require 'crimson-falcon/models/v2_condition' +require 'crimson-falcon/models/v2_condition_parameters' +require 'crimson-falcon/models/v2_definition' +require 'crimson-falcon/models/v2_for_loop' +require 'crimson-falcon/models/v2_loop' +require 'crimson-falcon/models/v2_parameters' +require 'crimson-falcon/models/v2_trigger' +require 'crimson-falcon/models/vulnerabilities_api_combined_vulnerability' +require 'crimson-falcon/models/vulnerabilities_api_combined_vulnerability_details' +require 'crimson-falcon/models/vulnerabilities_api_combined_vulnerability_info' +require 'crimson-falcon/models/vulnerabilities_api_vuln_by_image_count' +require 'crimson-falcon/models/vulnerabilities_api_vuln_by_publication' +require 'crimson-falcon/models/vulnerabilities_api_vuln_count' +require 'crimson-falcon/models/vulnerabilities_api_vuln_count_by_actively_exploited' +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' # APIs require 'crimson-falcon/api/alerts_api' require 'crimson-falcon/api/cloud_connect_aws_api' +require 'crimson-falcon/api/cloud_snapshots_api' require 'crimson-falcon/api/configuration_assessment_api' require 'crimson-falcon/api/configuration_assessment_evaluation_logic_api' +require 'crimson-falcon/api/container_alerts_api' +require 'crimson-falcon/api/container_detections_api' +require 'crimson-falcon/api/container_images_api' +require 'crimson-falcon/api/container_packages_api' +require 'crimson-falcon/api/container_vulnerabilities_api' require 'crimson-falcon/api/cspm_registration_api' require 'crimson-falcon/api/custom_ioa_api' +require 'crimson-falcon/api/custom_storage_api' require 'crimson-falcon/api/d4c_registration_api' require 'crimson-falcon/api/detects_api' require 'crimson-falcon/api/device_control_policies_api' require 'crimson-falcon/api/discover_api' require 'crimson-falcon/api/discover_iot_api' +require 'crimson-falcon/api/drift_indicators_api' require 'crimson-falcon/api/event_schema_api' require 'crimson-falcon/api/event_streams_api' require 'crimson-falcon/api/falcon_complete_dashboard_api' @@ -926,15 +1250,16 @@ require 'crimson-falcon/api/filevantage_api' require 'crimson-falcon/api/firewall_management_api' require 'crimson-falcon/api/firewall_policies_api' +require 'crimson-falcon/api/foundry_logscale_api' require 'crimson-falcon/api/host_group_api' require 'crimson-falcon/api/hosts_api' require 'crimson-falcon/api/identity_entities_api' require 'crimson-falcon/api/identity_protection_api' +require 'crimson-falcon/api/image_assessment_policies_api' require 'crimson-falcon/api/incidents_api' require 'crimson-falcon/api/installation_tokens_api' require 'crimson-falcon/api/installation_tokens_settings_api' require 'crimson-falcon/api/intel_api' -require 'crimson-falcon/api/inventories_api' require 'crimson-falcon/api/ioa_exclusions_api' require 'crimson-falcon/api/ioc_api' require 'crimson-falcon/api/iocs_api' @@ -953,18 +1278,22 @@ require 'crimson-falcon/api/quick_scan_api' require 'crimson-falcon/api/real_time_response_api' require 'crimson-falcon/api/real_time_response_admin_api' +require 'crimson-falcon/api/real_time_response_audit_api' require 'crimson-falcon/api/recon_api' require 'crimson-falcon/api/report_executions_api' require 'crimson-falcon/api/response_policies_api' +require 'crimson-falcon/api/runtime_detections_api' require 'crimson-falcon/api/sample_uploads_api' require 'crimson-falcon/api/scheduled_reports_api' require 'crimson-falcon/api/sensor_download_api' require 'crimson-falcon/api/sensor_update_policies_api' require 'crimson-falcon/api/sensor_visibility_exclusions_api' +require 'crimson-falcon/api/spotlight_evaluation_logic_api' +require 'crimson-falcon/api/spotlight_vulnerabilities_api' require 'crimson-falcon/api/tailored_intelligence_api' +require 'crimson-falcon/api/unidentified_containers_api' require 'crimson-falcon/api/user_management_api' -require 'crimson-falcon/api/vulnerabilities_api' -require 'crimson-falcon/api/vulnerabilities_evaluation_logic_api' +require 'crimson-falcon/api/workflows_api' require 'crimson-falcon/api/zero_trust_assessment_api' module Falcon diff --git a/lib/crimson-falcon/api/alerts_api.rb b/lib/crimson-falcon/api/alerts_api.rb index 40353995..32a4582c 100644 --- a/lib/crimson-falcon/api/alerts_api.rb +++ b/lib/crimson-falcon/api/alerts_api.rb @@ -40,10 +40,10 @@ def initialize(api_client = ApiClient.default) # @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 [String] :sort Sort detections in either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. - # @option opts [String] :filter Filter detections using a query in Falcon Query Language (FQL). An asterisk wildcard `*` includes all results. 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] :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 detection metadata for the provided string - # @return [MsaspecQueryResponse] + # @return [DetectsapiAlertQueryResponse] def get_queries_alerts_v1(opts = {}) data, _status_code, _headers = get_queries_alerts_v1_with_http_info(opts) data @@ -53,10 +53,10 @@ def get_queries_alerts_v1(opts = {}) # @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 [String] :sort Sort detections in either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. - # @option opts [String] :filter Filter detections using a query in Falcon Query Language (FQL). An asterisk wildcard `*` includes all results. 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] :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 detection metadata for the provided string - # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + # @return [Array<(DetectsapiAlertQueryResponse, Integer, Hash)>] DetectsapiAlertQueryResponse data, response status code and response headers def get_queries_alerts_v1_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AlertsApi.get_queries_alerts_v1 ...' @@ -92,7 +92,7 @@ def get_queries_alerts_v1_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' + return_type = opts[:debug_return_type] || 'DetectsapiAlertQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -114,19 +114,100 @@ def get_queries_alerts_v1_with_http_info(opts = {}) return data, status_code, headers end - # Perform actions on detections identified by detection 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. + # retrieves all Alerts ids that match a given query + # @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 [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 detection metadata for the provided string + # @return [DetectsapiAlertQueryResponse] + def get_queries_alerts_v2(opts = {}) + data, _status_code, _headers = get_queries_alerts_v2_with_http_info(opts) + data + end + + # retrieves all Alerts ids that match a given query + # @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 [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 detection metadata for the provided string + # @return [Array<(DetectsapiAlertQueryResponse, Integer, Hash)>] DetectsapiAlertQueryResponse data, response status code and response headers + def get_queries_alerts_v2_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AlertsApi.get_queries_alerts_v2 ...' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AlertsApi.get_queries_alerts_v2, must be smaller than or equal to 10000.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AlertsApi.get_queries_alerts_v2, must be greater than or equal to 0.' + end + + # resource path + local_var_path = '/alerts/queries/alerts/v2' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].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? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'q'] = opts[:'q'] if !opts[:'q'].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] || 'DetectsapiAlertQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"AlertsApi.get_queries_alerts_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: AlertsApi#get_queries_alerts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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. # @param body [DetectsapiPatchEntitiesAlertsV2Request] request body takes a list of action parameter request that is applied against all \"ids\" provided # @param [Hash] opts the optional parameters - # @return [MsaspecResponseFields] + # @return [DetectsapiResponseFields] def patch_entities_alerts_v2(body, opts = {}) data, _status_code, _headers = patch_entities_alerts_v2_with_http_info(body, opts) data end - # Perform actions on detections identified by detection 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. + # 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. # @param body [DetectsapiPatchEntitiesAlertsV2Request] request body takes a list of action parameter request that is applied against all \"ids\" provided # @param [Hash] opts the optional parameters - # @return [Array<(MsaspecResponseFields, Integer, Hash)>] MsaspecResponseFields data, response status code and response headers + # @return [Array<(DetectsapiResponseFields, Integer, Hash)>] DetectsapiResponseFields data, response status code and response headers def patch_entities_alerts_v2_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AlertsApi.patch_entities_alerts_v2 ...' @@ -158,7 +239,7 @@ def patch_entities_alerts_v2_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MsaspecResponseFields' + return_type = opts[:debug_return_type] || 'DetectsapiResponseFields' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -180,19 +261,88 @@ def patch_entities_alerts_v2_with_http_info(body, opts = {}) return data, status_code, headers end - # retrieves aggregates for Alerts across all CIDs - # @param body [Array] request body takes a list of aggregation query requests + # 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. + # @param body [DetectsapiPatchEntitiesAlertsV3Request] request body takes a list of action parameter request that is applied against all \"ids\" provided + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) + # @return [DetectsapiResponseFields] + def patch_entities_alerts_v3(body, opts = {}) + data, _status_code, _headers = patch_entities_alerts_v3_with_http_info(body, opts) + data + end + + # 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. + # @param body [DetectsapiPatchEntitiesAlertsV3Request] request body takes a list of action parameter request that is applied against all \"ids\" provided + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) + # @return [Array<(DetectsapiResponseFields, Integer, Hash)>] DetectsapiResponseFields data, response status code and response headers + def patch_entities_alerts_v3_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AlertsApi.patch_entities_alerts_v3 ...' + 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 AlertsApi.patch_entities_alerts_v3" + end + # resource path + local_var_path = '/alerts/entities/alerts/v3' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].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 + + # 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] || 'DetectsapiResponseFields' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"AlertsApi.patch_entities_alerts_v3", + :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: AlertsApi#patch_entities_alerts_v3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # retrieves aggregate values for Alerts across all CIDs + # @param body [Array] request body takes a list of aggregate-alert query requests # @param [Hash] opts the optional parameters - # @return [ApiAggregatesResponse] + # @return [DetectsapiAggregatesResponse] def post_aggregates_alerts_v1(body, opts = {}) data, _status_code, _headers = post_aggregates_alerts_v1_with_http_info(body, opts) data end - # retrieves aggregates for Alerts across all CIDs - # @param body [Array] request body takes a list of aggregation query requests + # retrieves aggregate values for Alerts across all CIDs + # @param body [Array] request body takes a list of aggregate-alert query requests # @param [Hash] opts the optional parameters - # @return [Array<(ApiAggregatesResponse, Integer, Hash)>] ApiAggregatesResponse data, response status code and response headers + # @return [Array<(DetectsapiAggregatesResponse, Integer, Hash)>] DetectsapiAggregatesResponse data, response status code and response headers def post_aggregates_alerts_v1_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AlertsApi.post_aggregates_alerts_v1 ...' @@ -224,7 +374,7 @@ def post_aggregates_alerts_v1_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'ApiAggregatesResponse' + return_type = opts[:debug_return_type] || 'DetectsapiAggregatesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -246,6 +396,75 @@ def post_aggregates_alerts_v1_with_http_info(body, opts = {}) return data, status_code, headers end + # retrieves aggregate values for Alerts across all CIDs + # @param body [Array] request body takes a list of aggregate-alert query requests + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) + # @return [DetectsapiAggregatesResponse] + def post_aggregates_alerts_v2(body, opts = {}) + data, _status_code, _headers = post_aggregates_alerts_v2_with_http_info(body, opts) + data + end + + # retrieves aggregate values for Alerts across all CIDs + # @param body [Array] request body takes a list of aggregate-alert query requests + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) + # @return [Array<(DetectsapiAggregatesResponse, Integer, Hash)>] DetectsapiAggregatesResponse data, response status code and response headers + def post_aggregates_alerts_v2_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AlertsApi.post_aggregates_alerts_v2 ...' + 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 AlertsApi.post_aggregates_alerts_v2" + end + # resource path + local_var_path = '/alerts/aggregates/alerts/v2' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].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 + + # 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] || 'DetectsapiAggregatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"AlertsApi.post_aggregates_alerts_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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AlertsApi#post_aggregates_alerts_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # retrieves all Alerts given their ids # @param body [DetectsapiPostEntitiesAlertsV1Request] # @param [Hash] opts the optional parameters @@ -311,5 +530,74 @@ def post_entities_alerts_v1_with_http_info(body, opts = {}) end return data, status_code, headers end + + # retrieves all Alerts given their composite ids + # @param body [DetectsapiPostEntitiesAlertsV2Request] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) + # @return [DetectsapiPostEntitiesAlertsV2Response] + def post_entities_alerts_v2(body, opts = {}) + data, _status_code, _headers = post_entities_alerts_v2_with_http_info(body, opts) + data + end + + # retrieves all Alerts given their composite ids + # @param body [DetectsapiPostEntitiesAlertsV2Request] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved (default to true) + # @return [Array<(DetectsapiPostEntitiesAlertsV2Response, Integer, Hash)>] DetectsapiPostEntitiesAlertsV2Response data, response status code and response headers + def post_entities_alerts_v2_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: AlertsApi.post_entities_alerts_v2 ...' + 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 AlertsApi.post_entities_alerts_v2" + end + # resource path + local_var_path = '/alerts/entities/alerts/v2' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include_hidden'] = opts[:'include_hidden'] if !opts[:'include_hidden'].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 + + # 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] || 'DetectsapiPostEntitiesAlertsV2Response' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"AlertsApi.post_entities_alerts_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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AlertsApi#post_entities_alerts_v2\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/inventories_api.rb b/lib/crimson-falcon/api/cloud_snapshots_api.rb similarity index 70% rename from lib/crimson-falcon/api/inventories_api.rb rename to lib/crimson-falcon/api/cloud_snapshots_api.rb index b8081678..281be350 100644 --- a/lib/crimson-falcon/api/inventories_api.rb +++ b/lib/crimson-falcon/api/cloud_snapshots_api.rb @@ -30,35 +30,35 @@ require 'cgi' module Falcon - class InventoriesApi + class CloudSnapshotsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end - # Create inventory from data received from snapshot - # @param body [ModelsSnapshotInventoryPayload] + # Register customer cloud account for snapshot scanning + # @param body [ModelsAccountEntitiesInput] # @param [Hash] opts the optional parameters - # @return [CommonEntitiesResponse] - def create_inventory(body, opts = {}) - data, _status_code, _headers = create_inventory_with_http_info(body, opts) + # @return [ModelsAccountStatusResponse] + def register_cspm_snapshot_account(body, opts = {}) + data, _status_code, _headers = register_cspm_snapshot_account_with_http_info(body, opts) data end - # Create inventory from data received from snapshot - # @param body [ModelsSnapshotInventoryPayload] + # Register customer cloud account for snapshot scanning + # @param body [ModelsAccountEntitiesInput] # @param [Hash] opts the optional parameters - # @return [Array<(CommonEntitiesResponse, Integer, Hash)>] CommonEntitiesResponse data, response status code and response headers - def create_inventory_with_http_info(body, opts = {}) + # @return [Array<(ModelsAccountStatusResponse, Integer, Hash)>] ModelsAccountStatusResponse data, response status code and response headers + def register_cspm_snapshot_account_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: InventoriesApi.create_inventory ...' + @api_client.config.logger.debug 'Calling API: CloudSnapshotsApi.register_cspm_snapshot_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 InventoriesApi.create_inventory" + fail ArgumentError, "Missing the required parameter 'body' when calling CloudSnapshotsApi.register_cspm_snapshot_account" end # resource path - local_var_path = '/snapshots/entities/inventories/v1' + local_var_path = '/snapshots/entities/accounts/v1' # query parameters query_params = opts[:query_params] || {} @@ -80,13 +80,13 @@ def create_inventory_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CommonEntitiesResponse' + return_type = opts[:debug_return_type] || 'ModelsAccountStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"InventoriesApi.create_inventory", + :operation => :"CloudSnapshotsApi.register_cspm_snapshot_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -97,7 +97,7 @@ def create_inventory_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: InventoriesApi#create_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CloudSnapshotsApi#register_cspm_snapshot_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/configuration_assessment_api.rb b/lib/crimson-falcon/api/configuration_assessment_api.rb index e2c9358c..5596279b 100644 --- a/lib/crimson-falcon/api/configuration_assessment_api.rb +++ b/lib/crimson-falcon/api/configuration_assessment_api.rb @@ -117,5 +117,67 @@ def get_combined_assessments_query_with_http_info(filter, opts = {}) end return data, status_code, headers end + + # Get rules details for provided one or more rule IDs + # @param ids [Array] One or more rules IDs (max: 400) + # @param [Hash] opts the optional parameters + # @return [DomainAPIRuleDetailsResponseV1] + def get_rule_details(ids, opts = {}) + data, _status_code, _headers = get_rule_details_with_http_info(ids, opts) + data + end + + # Get rules details for provided one or more rule IDs + # @param ids [Array] One or more rules IDs (max: 400) + # @param [Hash] opts the optional parameters + # @return [Array<(DomainAPIRuleDetailsResponseV1, Integer, Hash)>] DomainAPIRuleDetailsResponseV1 data, response status code and response headers + def get_rule_details_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ConfigurationAssessmentApi.get_rule_details ...' + 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 ConfigurationAssessmentApi.get_rule_details" + end + # resource path + local_var_path = '/configuration-assessment/entities/rule-details/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] || 'DomainAPIRuleDetailsResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ConfigurationAssessmentApi.get_rule_details", + :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: ConfigurationAssessmentApi#get_rule_details\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_api.rb b/lib/crimson-falcon/api/container_alerts_api.rb new file mode 100644 index 00000000..a5d9ec3b --- /dev/null +++ b/lib/crimson-falcon/api/container_alerts_api.rb @@ -0,0 +1,222 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ContainerAlertsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + 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 + # @return [AlertsContainerAlertsCountValue] + def read_container_alerts_count(opts = {}) + data, _status_code, _headers = read_container_alerts_count_with_http_info(opts) + data + 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerAlertsApi.read_container_alerts_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/container-alerts/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'AlertsContainerAlertsCountValue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerAlertsApi.read_container_alerts_count", + :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: ContainerAlertsApi#read_container_alerts_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [AlertsContainerAlertsCountValue] + def read_container_alerts_count_by_severity(opts = {}) + data, _status_code, _headers = read_container_alerts_count_by_severity_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerAlertsApi.read_container_alerts_count_by_severity ...' + end + # resource path + local_var_path = '/container-security/aggregates/container-alerts/count-by-severity/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'AlertsContainerAlertsCountValue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerAlertsApi.read_container_alerts_count_by_severity", + :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: ContainerAlertsApi#read_container_alerts_count_by_severity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + 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,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. + # @return [AlertsContainerAlertsEntityResponse] + def search_and_read_container_alerts(opts = {}) + data, _status_code, _headers = search_and_read_container_alerts_with_http_info(opts) + data + 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,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. + # @return [Array<(AlertsContainerAlertsEntityResponse, Integer, Hash)>] AlertsContainerAlertsEntityResponse data, response status code and response headers + def search_and_read_container_alerts_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerAlertsApi.search_and_read_container_alerts ...' + end + # resource path + local_var_path = '/container-security/combined/container-alerts/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] || 'AlertsContainerAlertsEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerAlertsApi.search_and_read_container_alerts", + :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: ContainerAlertsApi#search_and_read_container_alerts\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_detections_api.rb b/lib/crimson-falcon/api/container_detections_api.rb new file mode 100644 index 00000000..303e7aa3 --- /dev/null +++ b/lib/crimson-falcon/api/container_detections_api.rb @@ -0,0 +1,408 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ContainerDetectionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve image assessment detections identified by the provided filter criteria + # @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 [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 + # @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 [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 + @api_client.config.logger.debug 'Calling API: ContainerDetectionsApi.read_combined_detections ...' + end + # resource path + local_var_path = '/container-security/combined/detections/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] || 'DetectionsApiCombinedDetections' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerDetectionsApi.read_combined_detections", + :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: ContainerDetectionsApi#read_combined_detections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve image assessment detection entities identified by the provided filter criteria + # @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 [Integer] :offset The offset from where to begin. + # @return [DetectionsApiAssessmentDetections] + def read_detections(opts = {}) + data, _status_code, _headers = read_detections_with_http_info(opts) + data + end + + # Retrieve image assessment detection entities identified by the provided filter criteria + # @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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerDetectionsApi.read_detections ...' + end + # resource path + local_var_path = '/container-security/entities/detections/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? + + # 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] || 'DetectionsApiAssessmentDetections' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerDetectionsApi.read_detections", + :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: ContainerDetectionsApi#read_detections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [DetectionsApiDetectionsCount] + def read_detections_count(opts = {}) + data, _status_code, _headers = read_detections_count_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerDetectionsApi.read_detections_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/detections/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'DetectionsApiDetectionsCount' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerDetectionsApi.read_detections_count", + :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: ContainerDetectionsApi#read_detections_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [DetectionsApiDetectionsBySeverity] + def read_detections_count_by_severity(opts = {}) + data, _status_code, _headers = read_detections_count_by_severity_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerDetectionsApi.read_detections_count_by_severity ...' + end + # resource path + local_var_path = '/container-security/aggregates/detections/count-by-severity/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'DetectionsApiDetectionsBySeverity' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerDetectionsApi.read_detections_count_by_severity", + :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: ContainerDetectionsApi#read_detections_count_by_severity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [DetectionsApiDetectionsByType] + def read_detections_count_by_type(opts = {}) + data, _status_code, _headers = read_detections_count_by_type_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerDetectionsApi.read_detections_count_by_type ...' + end + # resource path + local_var_path = '/container-security/aggregates/detections/count-by-type/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'DetectionsApiDetectionsByType' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerDetectionsApi.read_detections_count_by_type", + :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: ContainerDetectionsApi#read_detections_count_by_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve image assessment detection entities identified by the provided filter criteria + # @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 [Integer] :offset The offset from where to begin. + # @return [CommonGenericEntityResponseString] + def search_detections(opts = {}) + data, _status_code, _headers = search_detections_with_http_info(opts) + data + end + + # Retrieve image assessment detection entities identified by the provided filter criteria + # @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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerDetectionsApi.search_detections ...' + end + # resource path + local_var_path = '/container-security/queries/detections/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? + + # 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] || 'CommonGenericEntityResponseString' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerDetectionsApi.search_detections", + :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: ContainerDetectionsApi#search_detections\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_images_api.rb b/lib/crimson-falcon/api/container_images_api.rb new file mode 100644 index 00000000..f8f87c87 --- /dev/null +++ b/lib/crimson-falcon/api/container_images_api.rb @@ -0,0 +1,711 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ContainerImagesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + 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 + # @return [ImagesApiImageAssessmentHistory] + def aggregate_image_assessment_history(opts = {}) + data, _status_code, _headers = aggregate_image_assessment_history_with_http_info(opts) + data + 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.aggregate_image_assessment_history ...' + end + # resource path + local_var_path = '/container-security/aggregates/images/assessment-history/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ImagesApiImageAssessmentHistory' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.aggregate_image_assessment_history", + :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: ContainerImagesApi#aggregate_image_assessment_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,layer_digest,package_name_version,registry,repository,tag,vulnerability_count,vulnerability_severity + # @return [ImagesApiImageCount] + def aggregate_image_count(opts = {}) + data, _status_code, _headers = aggregate_image_count_with_http_info(opts) + data + end + + # 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,layer_digest,package_name_version,registry,repository,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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.aggregate_image_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/images/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ImagesApiImageCount' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.aggregate_image_count", + :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: ContainerImagesApi#aggregate_image_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [ImagesApiImageCountByBaseOS] + def aggregate_image_count_by_base_os(opts = {}) + data, _status_code, _headers = aggregate_image_count_by_base_os_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.aggregate_image_count_by_base_os ...' + end + # resource path + local_var_path = '/container-security/aggregates/images/count-by-os-distribution/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ImagesApiImageCountByBaseOS' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.aggregate_image_count_by_base_os", + :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: ContainerImagesApi#aggregate_image_count_by_base_os\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [ImagesApiImageCountByState] + def aggregate_image_count_by_state(opts = {}) + data, _status_code, _headers = aggregate_image_count_by_state_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.aggregate_image_count_by_state ...' + end + # resource path + local_var_path = '/container-security/aggregates/images/count-by-state/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ImagesApiImageCountByState' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.aggregate_image_count_by_state", + :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: ContainerImagesApi#aggregate_image_count_by_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [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. + # @return [ImagesApiImageByVulnerabilityCount] + def combined_image_by_vulnerability_count(opts = {}) + data, _status_code, _headers = combined_image_by_vulnerability_count_with_http_info(opts) + data + end + + # 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 [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. + # @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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.combined_image_by_vulnerability_count ...' + end + # resource path + local_var_path = '/container-security/combined/images/by-vulnerability-count/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? + + # 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] || 'ImagesApiImageByVulnerabilityCount' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.combined_image_by_vulnerability_count", + :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: ContainerImagesApi#combined_image_by_vulnerability_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve image entities identified by the provided filter criteria + # @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 [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. + # @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 + # @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 [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. + # @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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.combined_image_detail ...' + end + # resource path + local_var_path = '/container-security/combined/images/detail/v1' + + # query parameters + 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[:'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] || 'ImagesApiCustomerAndImage' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.combined_image_detail", + :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: ContainerImagesApi#combined_image_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + 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 [Hash] opts the optional parameters + # @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) + data + 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 [Hash] opts the optional parameters + # @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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.combined_image_issues_summary ...' + end + # verify the required parameter 'cid' is set + if @api_client.config.client_side_validation && cid.nil? + fail ArgumentError, "Missing the required parameter 'cid' when calling ContainerImagesApi.combined_image_issues_summary" + end + # verify the required parameter 'registry' is set + if @api_client.config.client_side_validation && registry.nil? + fail ArgumentError, "Missing the required parameter 'registry' when calling ContainerImagesApi.combined_image_issues_summary" + end + # verify the required parameter 'repository' is set + if @api_client.config.client_side_validation && repository.nil? + fail ArgumentError, "Missing the required parameter 'repository' when calling ContainerImagesApi.combined_image_issues_summary" + end + # verify the required parameter 'tag' is set + if @api_client.config.client_side_validation && tag.nil? + fail ArgumentError, "Missing the required parameter 'tag' when calling ContainerImagesApi.combined_image_issues_summary" + end + # resource path + local_var_path = '/container-security/combined/images/issues-summary/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'cid'] = cid + query_params[:'registry'] = registry + query_params[:'repository'] = repository + query_params[:'tag'] = tag + + # 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] || 'ImagesApiImageIssuesSummary' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.combined_image_issues_summary", + :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: ContainerImagesApi#combined_image_issues_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + 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 [Hash] opts the optional parameters + # @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) + data + 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 [Hash] opts the optional parameters + # @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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.combined_image_vulnerability_summary ...' + end + # verify the required parameter 'cid' is set + if @api_client.config.client_side_validation && cid.nil? + fail ArgumentError, "Missing the required parameter 'cid' when calling ContainerImagesApi.combined_image_vulnerability_summary" + end + # verify the required parameter 'registry' is set + if @api_client.config.client_side_validation && registry.nil? + fail ArgumentError, "Missing the required parameter 'registry' when calling ContainerImagesApi.combined_image_vulnerability_summary" + end + # verify the required parameter 'repository' is set + if @api_client.config.client_side_validation && repository.nil? + fail ArgumentError, "Missing the required parameter 'repository' when calling ContainerImagesApi.combined_image_vulnerability_summary" + end + # verify the required parameter 'tag' is set + if @api_client.config.client_side_validation && tag.nil? + fail ArgumentError, "Missing the required parameter 'tag' when calling ContainerImagesApi.combined_image_vulnerability_summary" + end + # resource path + local_var_path = '/container-security/combined/images/vulnerabilities-summary/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'cid'] = cid + query_params[:'registry'] = registry + query_params[:'repository'] = repository + query_params[:'tag'] = tag + + # 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] || 'ImagesApiImageVulnerabilitiesSummary' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.combined_image_vulnerability_summary", + :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: ContainerImagesApi#combined_image_vulnerability_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get image assessment results by providing an FQL filter and paging details + # @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 [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 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 + # @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 [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 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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.get_combined_images ...' + end + # resource path + local_var_path = '/container-security/combined/image-assessment/images/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] || 'ImagesExtCombinedImagesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.get_combined_images", + :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: ContainerImagesApi#get_combined_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve images with an option to expand aggregated vulnerabilities/detections + # @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,layer_digest,package_name_version,registry,repository,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 [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. Supported columns: [base_os cid containers detections firstScanned first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository 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 + # @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,layer_digest,package_name_version,registry,repository,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 [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. Supported columns: [base_os cid containers detections firstScanned first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository 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 + @api_client.config.logger.debug 'Calling API: ContainerImagesApi.read_combined_images_export ...' + end + # resource path + local_var_path = '/container-security/combined/images/export/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'expand_vulnerabilities'] = opts[:'expand_vulnerabilities'] if !opts[:'expand_vulnerabilities'].nil? + query_params[:'expand_detections'] = opts[:'expand_detections'] if !opts[:'expand_detections'].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] || 'ImagesApiCombinedImageExport' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerImagesApi.read_combined_images_export", + :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: ContainerImagesApi#read_combined_images_export\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_packages_api.rb b/lib/crimson-falcon/api/container_packages_api.rb new file mode 100644 index 00000000..8df8441a --- /dev/null +++ b/lib/crimson-falcon/api/container_packages_api.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 'cgi' + +module Falcon + class ContainerPackagesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve top x app packages with the most fixable vulnerabilities + # @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 [Integer] :offset The offset from where to begin. + # @return [PackagesApiPackagesByVulnCount] + def read_packages_by_fixable_vuln_count(opts = {}) + data, _status_code, _headers = read_packages_by_fixable_vuln_count_with_http_info(opts) + data + end + + # Retrieve top x app packages with the most fixable vulnerabilities + # @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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerPackagesApi.read_packages_by_fixable_vuln_count ...' + end + # resource path + local_var_path = '/container-security/combined/packages/app-by-fixable-vulnerability-count/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? + + # 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] || 'PackagesApiPackagesByVulnCount' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerPackagesApi.read_packages_by_fixable_vuln_count", + :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: ContainerPackagesApi#read_packages_by_fixable_vuln_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve top x packages with the most vulnerabilities + # @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 [Integer] :offset The offset from where to begin. + # @return [PackagesApiPackagesByVulnCount] + def read_packages_by_vuln_count(opts = {}) + data, _status_code, _headers = read_packages_by_vuln_count_with_http_info(opts) + data + end + + # Retrieve top x packages with the most vulnerabilities + # @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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerPackagesApi.read_packages_by_vuln_count ...' + end + # resource path + local_var_path = '/container-security/combined/packages/by-vulnerability-count/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? + + # 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] || 'PackagesApiPackagesByVulnCount' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerPackagesApi.read_packages_by_vuln_count", + :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: ContainerPackagesApi#read_packages_by_vuln_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve packages identified by the provided filter criteria + # @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 [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 + # @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 [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 + @api_client.config.logger.debug 'Calling API: ContainerPackagesApi.read_packages_combined ...' + end + # resource path + local_var_path = '/container-security/combined/packages/v1' + + # 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[:'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] || 'PackagesApiCombinedPackage' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerPackagesApi.read_packages_combined", + :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: ContainerPackagesApi#read_packages_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve packages identified by the provided filter criteria for the purpose of export + # @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 [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 + # @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 [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 + @api_client.config.logger.debug 'Calling API: ContainerPackagesApi.read_packages_combined_export ...' + end + # resource path + local_var_path = '/container-security/combined/packages/export/v1' + + # 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[:'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] || 'PackagesApiCombinedPackageExport' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerPackagesApi.read_packages_combined_export", + :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: ContainerPackagesApi#read_packages_combined_export\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 + # @return [CommonCountResponse] + def read_packages_count_by_zero_day(opts = {}) + data, _status_code, _headers = read_packages_count_by_zero_day_with_http_info(opts) + data + 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 + # @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 + @api_client.config.logger.debug 'Calling API: ContainerPackagesApi.read_packages_count_by_zero_day ...' + end + # resource path + local_var_path = '/container-security/aggregates/packages/count-by-zero-day/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'CommonCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerPackagesApi.read_packages_count_by_zero_day", + :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: ContainerPackagesApi#read_packages_count_by_zero_day\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_vulnerabilities_api.rb b/lib/crimson-falcon/api/container_vulnerabilities_api.rb new file mode 100644 index 00000000..ee535467 --- /dev/null +++ b/lib/crimson-falcon/api/container_vulnerabilities_api.rb @@ -0,0 +1,693 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ContainerVulnerabilitiesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve vulnerability and aggregate data filtered by the provided FQL + # @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,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] + # @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 + # @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,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] + # @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 + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_combined_vulnerabilities ...' + end + # resource path + local_var_path = '/container-security/combined/vulnerabilities/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] || 'VulnerabilitiesApiCombinedVulnerability' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_combined_vulnerabilities", + :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: ContainerVulnerabilitiesApi#read_combined_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve vulnerability details related to an image + # @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,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] + def read_combined_vulnerabilities_details(id, opts = {}) + data, _status_code, _headers = read_combined_vulnerabilities_details_with_http_info(id, opts) + data + end + + # Retrieve vulnerability details related to an image + # @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,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 [Array<(VulnerabilitiesApiCombinedVulnerabilityDetails, Integer, Hash)>] VulnerabilitiesApiCombinedVulnerabilityDetails data, response status code and response headers + def read_combined_vulnerabilities_details_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_combined_vulnerabilities_details ...' + 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 ContainerVulnerabilitiesApi.read_combined_vulnerabilities_details" + end + # resource path + local_var_path = '/container-security/combined/vulnerabilities/details/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = id + 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? + + # 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] || 'VulnerabilitiesApiCombinedVulnerabilityDetails' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_combined_vulnerabilities_details", + :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: ContainerVulnerabilitiesApi#read_combined_vulnerabilities_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve vulnerability and package related info for this customer + # @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] :offset The offset from where to begin. + # @return [VulnerabilitiesApiCombinedVulnerabilityInfo] + def read_combined_vulnerabilities_info(cve_id, opts = {}) + data, _status_code, _headers = read_combined_vulnerabilities_info_with_http_info(cve_id, opts) + data + end + + # Retrieve vulnerability and package related info for this customer + # @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] :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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_combined_vulnerabilities_info ...' + end + # verify the required parameter 'cve_id' is set + if @api_client.config.client_side_validation && cve_id.nil? + fail ArgumentError, "Missing the required parameter 'cve_id' when calling ContainerVulnerabilitiesApi.read_combined_vulnerabilities_info" + end + # resource path + local_var_path = '/container-security/combined/vulnerabilities/info/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'cve_id'] = cve_id + 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] || 'VulnerabilitiesApiCombinedVulnerabilityInfo' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_combined_vulnerabilities_info", + :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: ContainerVulnerabilitiesApi#read_combined_vulnerabilities_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve top x vulnerabilities with the most impacted images + # @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 [Integer] :offset The offset from where to begin. + # @return [VulnerabilitiesApiVulnByImageCount] + def read_vulnerabilities_by_image_count(opts = {}) + data, _status_code, _headers = read_vulnerabilities_by_image_count_with_http_info(opts) + data + end + + # Retrieve top x vulnerabilities with the most impacted images + # @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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerabilities_by_image_count ...' + end + # resource path + local_var_path = '/container-security/combined/vulnerabilities/by-image-count/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? + + # 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] || 'VulnerabilitiesApiVulnByImageCount' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_vulnerabilities_by_image_count", + :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: ContainerVulnerabilitiesApi#read_vulnerabilities_by_image_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve top x vulnerabilities with the most recent publication date + # @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 [Integer] :offset The offset from where to begin. + # @return [VulnerabilitiesApiVulnByPublication] + def read_vulnerabilities_publication_date(opts = {}) + data, _status_code, _headers = read_vulnerabilities_publication_date_with_http_info(opts) + data + end + + # Retrieve top x vulnerabilities with the most recent publication date + # @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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerabilities_publication_date ...' + end + # resource path + local_var_path = '/container-security/combined/vulnerabilities/by-published-date/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? + + # 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] || 'VulnerabilitiesApiVulnByPublication' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_vulnerabilities_publication_date", + :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: ContainerVulnerabilitiesApi#read_vulnerabilities_publication_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Aggregate count of vulnerabilities + # @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,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] + def read_vulnerability_count(opts = {}) + data, _status_code, _headers = read_vulnerability_count_with_http_info(opts) + data + end + + # Aggregate count of vulnerabilities + # @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,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 [Array<(VulnerabilitiesApiVulnCount, Integer, Hash)>] VulnerabilitiesApiVulnCount data, response status code and response headers + def read_vulnerability_count_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/vulnerabilities/count/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? + + # 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] || 'VulnerabilitiesApiVulnCount' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count", + :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: ContainerVulnerabilitiesApi#read_vulnerability_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Aggregate count of vulnerabilities grouped by actively exploited + # @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,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] + def read_vulnerability_count_by_actively_exploited(opts = {}) + data, _status_code, _headers = read_vulnerability_count_by_actively_exploited_with_http_info(opts) + data + end + + # Aggregate count of vulnerabilities grouped by actively exploited + # @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,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 [Array<(VulnerabilitiesApiVulnCountByActivelyExploited, Integer, Hash)>] VulnerabilitiesApiVulnCountByActivelyExploited data, response status code and response headers + def read_vulnerability_count_by_actively_exploited_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_actively_exploited ...' + end + # resource path + local_var_path = '/container-security/aggregates/vulnerabilities/count-by-actively-exploited/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? + + # 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] || 'VulnerabilitiesApiVulnCountByActivelyExploited' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_actively_exploited", + :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_actively_exploited\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Aggregate count of vulnerabilities grouped by csp_rating + # @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,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] + def read_vulnerability_count_by_cps_rating(opts = {}) + data, _status_code, _headers = read_vulnerability_count_by_cps_rating_with_http_info(opts) + data + end + + # Aggregate count of vulnerabilities grouped by csp_rating + # @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,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 [Array<(VulnerabilitiesApiVulnCountByCSPRating, Integer, Hash)>] VulnerabilitiesApiVulnCountByCSPRating data, response status code and response headers + def read_vulnerability_count_by_cps_rating_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_cps_rating ...' + end + # resource path + local_var_path = '/container-security/aggregates/vulnerabilities/count-by-cps-rating/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? + + # 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] || 'VulnerabilitiesApiVulnCountByCSPRating' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_cps_rating", + :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_cps_rating\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Aggregate count of vulnerabilities grouped by cvss score + # @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,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] + def read_vulnerability_count_by_cvss_score(opts = {}) + data, _status_code, _headers = read_vulnerability_count_by_cvss_score_with_http_info(opts) + data + end + + # Aggregate count of vulnerabilities grouped by cvss score + # @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,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 [Array<(VulnerabilitiesApiVulnCountByCVSSScore, Integer, Hash)>] VulnerabilitiesApiVulnCountByCVSSScore data, response status code and response headers + def read_vulnerability_count_by_cvss_score_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_cvss_score ...' + end + # resource path + local_var_path = '/container-security/aggregates/vulnerabilities/count-by-cvss-score/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? + + # 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] || 'VulnerabilitiesApiVulnCountByCVSSScore' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_cvss_score", + :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_cvss_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Aggregate count of vulnerabilities grouped by severity + # @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,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] + def read_vulnerability_count_by_severity(opts = {}) + data, _status_code, _headers = read_vulnerability_count_by_severity_with_http_info(opts) + data + end + + # Aggregate count of vulnerabilities grouped by severity + # @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,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 [Array<(VulnerabilitiesApiVulnCountBySeverity, Integer, Hash)>] VulnerabilitiesApiVulnCountBySeverity data, response status code and response headers + def read_vulnerability_count_by_severity_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ContainerVulnerabilitiesApi.read_vulnerability_count_by_severity ...' + end + # resource path + local_var_path = '/container-security/aggregates/vulnerabilities/count-by-severity/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? + + # 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] || 'VulnerabilitiesApiVulnCountBySeverity' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ContainerVulnerabilitiesApi.read_vulnerability_count_by_severity", + :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: ContainerVulnerabilitiesApi#read_vulnerability_count_by_severity\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_api.rb b/lib/crimson-falcon/api/cspm_registration_api.rb index 6554b986..eda15332 100644 --- a/lib/crimson-falcon/api/cspm_registration_api.rb +++ b/lib/crimson-falcon/api/cspm_registration_api.rb @@ -117,6 +117,72 @@ def azure_download_certificate_with_http_info(tenant_id, opts = {}) return data, status_code, headers end + # 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 [RegistrationGCPAccountExtRequestV2] + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseExtV2] + def connect_cspmgcp_account(body, opts = {}) + data, _status_code, _headers = connect_cspmgcp_account_with_http_info(body, opts) + data + end + + # 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 [RegistrationGCPAccountExtRequestV2] + # @param [Hash] opts the optional parameters + # @return [Array<(RegistrationGCPAccountResponseExtV2, Integer, Hash)>] RegistrationGCPAccountResponseExtV2 data, response status code and response headers + def connect_cspmgcp_account_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.connect_cspmgcp_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 CspmRegistrationApi.connect_cspmgcp_account" + end + # resource path + local_var_path = '/cloud-connect-cspm-gcp/entities/account/v2' + + # 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] || 'RegistrationGCPAccountResponseExtV2' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.connect_cspmgcp_account", + :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: CspmRegistrationApi#connect_cspmgcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # 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. # @param body [RegistrationAWSAccountCreateRequestExtV2] # @param [Hash] opts the optional parameters @@ -249,6 +315,138 @@ def create_cspm_azure_account_with_http_info(body, opts = {}) return data, status_code, headers end + # Creates a new management group in our system for a customer. + # @param body [RegistrationAzureManagementGroupCreateRequestExternalV1] + # @param [Hash] opts the optional parameters + # @return [RegistrationAzureAccountResponseV1] + def create_cspm_azure_management_group(body, opts = {}) + data, _status_code, _headers = create_cspm_azure_management_group_with_http_info(body, opts) + data + end + + # Creates a new management group in our system for a customer. + # @param body [RegistrationAzureManagementGroupCreateRequestExternalV1] + # @param [Hash] opts the optional parameters + # @return [Array<(RegistrationAzureAccountResponseV1, Integer, Hash)>] RegistrationAzureAccountResponseV1 data, response status code and response headers + def create_cspm_azure_management_group_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.create_cspm_azure_management_group ...' + 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 CspmRegistrationApi.create_cspm_azure_management_group" + end + # resource path + local_var_path = '/cloud-connect-cspm-azure/entities/management-group/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] || 'RegistrationAzureAccountResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.create_cspm_azure_management_group", + :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: CspmRegistrationApi#create_cspm_azure_management_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. + # @param body [RegistrationGCPAccountCreateRequestExtV1] + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseV1] + def create_cspmgcp_account(body, opts = {}) + data, _status_code, _headers = create_cspmgcp_account_with_http_info(body, opts) + data + end + + # Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. + # @param body [RegistrationGCPAccountCreateRequestExtV1] + # @param [Hash] opts the optional parameters + # @return [Array<(RegistrationGCPAccountResponseV1, Integer, Hash)>] RegistrationGCPAccountResponseV1 data, response status code and response headers + def create_cspmgcp_account_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.create_cspmgcp_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 CspmRegistrationApi.create_cspmgcp_account" + end + # resource path + local_var_path = '/cloud-connect-cspm-gcp/entities/account/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] || 'RegistrationGCPAccountResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.create_cspmgcp_account", + :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: CspmRegistrationApi#create_cspmgcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Deletes an existing AWS account or organization in our system. # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS account IDs to remove @@ -387,6 +585,64 @@ def delete_cspm_azure_account_with_http_info(opts = {}) return data, status_code, headers end + # Deletes a GCP account from the system. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [MsaBaseEntitiesResponse] + def delete_cspmgcp_account(opts = {}) + data, _status_code, _headers = delete_cspmgcp_account_with_http_info(opts) + data + end + + # Deletes a GCP account from the system. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [Array<(MsaBaseEntitiesResponse, Integer, Hash)>] MsaBaseEntitiesResponse data, response status code and response headers + def delete_cspmgcp_account_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.delete_cspmgcp_account ...' + end + # resource path + local_var_path = '/cloud-connect-cspm-gcp/entities/account/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] || 'MsaBaseEntitiesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.delete_cspmgcp_account", + :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: CspmRegistrationApi#delete_cspmgcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get list of detected behaviors # @param [Hash] opts the optional parameters # @option opts [String] :cloud_provider Cloud Provider (e.g.: aws|azure) @@ -654,7 +910,7 @@ def get_configuration_detection_ids_v2_with_http_info(opts = {}) return data, status_code, headers end - # Get list of active misconfigurations + # Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead # @param [Hash] opts the optional parameters # @option opts [String] :cloud_provider Cloud Provider (e.g.: aws|azure|gcp) # @option opts [String] :account_id AWS account ID or GCP Project Number or Azure subscription ID @@ -672,7 +928,7 @@ def get_configuration_detections(opts = {}) data end - # Get list of active misconfigurations + # Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead # @param [Hash] opts the optional parameters # @option opts [String] :cloud_provider Cloud Provider (e.g.: aws|azure|gcp) # @option opts [String] :account_id AWS account ID or GCP Project Number or Azure subscription ID @@ -773,6 +1029,7 @@ def get_configuration_detections_with_http_info(opts = {}) # @option opts [Array] :organization_ids AWS organization IDs # @option opts [String] :status Account status to filter results by. # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) + # @option opts [String] :cspm_lite Only return CSPM Lite accounts # @option opts [String] :migrated Only return migrated d4c accounts # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [String] :group_by Field to group by. @@ -790,6 +1047,7 @@ def get_cspm_aws_account(opts = {}) # @option opts [Array] :organization_ids AWS organization IDs # @option opts [String] :status Account status to filter results by. # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) + # @option opts [String] :cspm_lite Only return CSPM Lite accounts # @option opts [String] :migrated Only return migrated d4c accounts # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [String] :group_by Field to group by. @@ -798,33 +1056,22 @@ def get_cspm_aws_account_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_aws_account ...' end - if @api_client.config.client_side_validation && !opts[:'scan_type'].nil? && opts[:'scan_type'].to_s.length > 4 - fail ArgumentError, 'invalid value for "opts[:"scan_type"]" when calling CspmRegistrationApi.get_cspm_aws_account, the character length must be smaller than or equal to 4.' - end - - if @api_client.config.client_side_validation && !opts[:'scan_type'].nil? && opts[:'scan_type'].to_s.length < 3 - fail ArgumentError, 'invalid value for "opts[:"scan_type"]" when calling CspmRegistrationApi.get_cspm_aws_account, the character length must be great than or equal to 3.' + allowable_values = ["dry", "full"] + if @api_client.config.client_side_validation && opts[:'scan_type'] && !allowable_values.include?(opts[:'scan_type']) + fail ArgumentError, "invalid value for \"scan_type\", must be one of #{allowable_values}" end - - pattern = Regexp.new(/^(full|dry)$/) - if @api_client.config.client_side_validation && !opts[:'scan_type'].nil? && opts[:'scan_type'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"scan_type\"]' when calling CspmRegistrationApi.get_cspm_aws_account, must conform to the pattern #{pattern}." + allowable_values = ["provisioned", "operational"] + if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) + fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end - - pattern = Regexp.new(/^(provisioned|operational)$/) - if @api_client.config.client_side_validation && !opts[:'status'].nil? && opts[:'status'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"status\"]' when calling CspmRegistrationApi.get_cspm_aws_account, must conform to the pattern #{pattern}." + allowable_values = ["true", "false"] + if @api_client.config.client_side_validation && opts[:'cspm_lite'] && !allowable_values.include?(opts[:'cspm_lite']) + fail ArgumentError, "invalid value for \"cspm_lite\", must be one of #{allowable_values}" end - - allowable_values = ["false", "true"] + allowable_values = ["true", "false"] if @api_client.config.client_side_validation && opts[:'migrated'] && !allowable_values.include?(opts[:'migrated']) fail ArgumentError, "invalid value for \"migrated\", must be one of #{allowable_values}" end - pattern = Regexp.new(/^(true|false)$/) - if @api_client.config.client_side_validation && !opts[:'migrated'].nil? && opts[:'migrated'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"migrated\"]' when calling CspmRegistrationApi.get_cspm_aws_account, must conform to the pattern #{pattern}." - end - allowable_values = ["organization"] if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by']) fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}" @@ -840,6 +1087,7 @@ def get_cspm_aws_account_with_http_info(opts = {}) query_params[:'organization-ids'] = @api_client.build_collection_param(opts[:'organization_ids'], :multi) if !opts[:'organization_ids'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'cspm_lite'] = opts[:'cspm_lite'] if !opts[:'cspm_lite'].nil? query_params[:'migrated'] = opts[:'migrated'] if !opts[:'migrated'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].nil? @@ -957,15 +1205,10 @@ def get_cspm_aws_console_setup_urls_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_aws_console_setup_urls ...' end - allowable_values = ["false", "true"] + allowable_values = ["true", "false"] if @api_client.config.client_side_validation && opts[:'use_existing_cloudtrail'] && !allowable_values.include?(opts[:'use_existing_cloudtrail']) fail ArgumentError, "invalid value for \"use_existing_cloudtrail\", must be one of #{allowable_values}" end - pattern = Regexp.new(/^(true|false)$/) - if @api_client.config.client_side_validation && !opts[:'use_existing_cloudtrail'].nil? && opts[:'use_existing_cloudtrail'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"use_existing_cloudtrail\"]' when calling CspmRegistrationApi.get_cspm_aws_console_setup_urls, must conform to the pattern #{pattern}." - end - pattern = Regexp.new(/^[0-9a-z-]{2,}$/) if @api_client.config.client_side_validation && !opts[:'region'].nil? && opts[:'region'] !~ pattern fail ArgumentError, "invalid value for 'opts[:\"region\"]' when calling CspmRegistrationApi.get_cspm_aws_console_setup_urls, must conform to the pattern #{pattern}." @@ -1020,6 +1263,7 @@ def get_cspm_aws_console_setup_urls_with_http_info(opts = {}) # @option opts [Array] :tenant_ids Tenant ids to filter azure accounts # @option opts [String] :scan_type Type of scan, dry or full, to perform on selected accounts # @option opts [String] :status Account status to filter results by. + # @option opts [String] :cspm_lite Only return CSPM Lite accounts # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) # @option opts [Integer] :offset The offset to start retrieving records from # @return [RegistrationAzureAccountResponseV1] @@ -1034,6 +1278,7 @@ def get_cspm_azure_account(opts = {}) # @option opts [Array] :tenant_ids Tenant ids to filter azure accounts # @option opts [String] :scan_type Type of scan, dry or full, to perform on selected accounts # @option opts [String] :status Account status to filter results by. + # @option opts [String] :cspm_lite Only return CSPM Lite accounts # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) # @option opts [Integer] :offset The offset to start retrieving records from # @return [Array<(RegistrationAzureAccountResponseV1, Integer, Hash)>] RegistrationAzureAccountResponseV1 data, response status code and response headers @@ -1059,6 +1304,15 @@ def get_cspm_azure_account_with_http_info(opts = {}) fail ArgumentError, "invalid value for 'opts[:\"status\"]' when calling CspmRegistrationApi.get_cspm_azure_account, must conform to the pattern #{pattern}." end + allowable_values = ["false", "true"] + if @api_client.config.client_side_validation && opts[:'cspm_lite'] && !allowable_values.include?(opts[:'cspm_lite']) + fail ArgumentError, "invalid value for \"cspm_lite\", must be one of #{allowable_values}" + end + pattern = Regexp.new(/^(true|false)$/) + if @api_client.config.client_side_validation && !opts[:'cspm_lite'].nil? && opts[:'cspm_lite'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"cspm_lite\"]' when calling CspmRegistrationApi.get_cspm_azure_account, must conform to the pattern #{pattern}." + end + # resource path local_var_path = '/cloud-connect-cspm-azure/entities/account/v1' @@ -1068,6 +1322,7 @@ def get_cspm_azure_account_with_http_info(opts = {}) query_params[:'tenant_ids'] = @api_client.build_collection_param(opts[:'tenant_ids'], :multi) if !opts[:'tenant_ids'].nil? query_params[:'scan-type'] = opts[:'scan_type'] if !opts[:'scan_type'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'cspm_lite'] = opts[:'cspm_lite'] if !opts[:'cspm_lite'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? @@ -1105,34 +1360,100 @@ def get_cspm_azure_account_with_http_info(opts = {}) return data, status_code, headers end - # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment + # Return information about Azure management group registration # @param [Hash] opts the optional parameters - # @option opts [String] :tenant_id Tenant ID to generate script for. Defaults to most recently registered tenant. - # @option opts [Array] :subscription_ids Subscription IDs to generate script for. Defaults to all. - # @option opts [String] :account_type - # @option opts [String] :template Template to be rendered - # @return [RegistrationAzureProvisionGetUserScriptResponseV1] - def get_cspm_azure_user_scripts_attachment(opts = {}) - data, _status_code, _headers = get_cspm_azure_user_scripts_attachment_with_http_info(opts) + # @option opts [Array] :tenant_ids Tenant ids to filter azure accounts + # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) + # @option opts [Integer] :offset The offset to start retrieving records from + # @return [RegistrationAzureManagementGroupResponseV1] + def get_cspm_azure_management_group(opts = {}) + data, _status_code, _headers = get_cspm_azure_management_group_with_http_info(opts) data end - # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment + # Return information about Azure management group registration # @param [Hash] opts the optional parameters - # @option opts [String] :tenant_id Tenant ID to generate script for. Defaults to most recently registered tenant. - # @option opts [Array] :subscription_ids Subscription IDs to generate script for. Defaults to all. - # @option opts [String] :account_type - # @option opts [String] :template Template to be rendered - # @return [Array<(RegistrationAzureProvisionGetUserScriptResponseV1, Integer, Hash)>] RegistrationAzureProvisionGetUserScriptResponseV1 data, response status code and response headers - def get_cspm_azure_user_scripts_attachment_with_http_info(opts = {}) + # @option opts [Array] :tenant_ids Tenant ids to filter azure accounts + # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) + # @option opts [Integer] :offset The offset to start retrieving records from + # @return [Array<(RegistrationAzureManagementGroupResponseV1, Integer, Hash)>] RegistrationAzureManagementGroupResponseV1 data, response status code and response headers + def get_cspm_azure_management_group_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_azure_user_scripts_attachment ...' - end - if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length > 36 - fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.get_cspm_azure_user_scripts_attachment, the character length must be smaller than or equal to 36.' + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_azure_management_group ...' end + # resource path + local_var_path = '/cloud-connect-cspm-azure/entities/management-group/v1' - if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length < 36 + # query parameters + query_params = opts[:query_params] || {} + query_params[:'tenant_ids'] = @api_client.build_collection_param(opts[:'tenant_ids'], :multi) if !opts[:'tenant_ids'].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] || 'RegistrationAzureManagementGroupResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.get_cspm_azure_management_group", + :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: CspmRegistrationApi#get_cspm_azure_management_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :tenant_id Tenant ID to generate script for. Defaults to most recently registered tenant. + # @option opts [Array] :subscription_ids Subscription IDs to generate script for. Defaults to all. + # @option opts [String] :account_type + # @option opts [String] :template Template to be rendered + # @option opts [Boolean] :azure_management_group Use Azure Management Group + # @return [RegistrationAzureProvisionGetUserScriptResponseV1] + def get_cspm_azure_user_scripts_attachment(opts = {}) + data, _status_code, _headers = get_cspm_azure_user_scripts_attachment_with_http_info(opts) + data + end + + # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :tenant_id Tenant ID to generate script for. Defaults to most recently registered tenant. + # @option opts [Array] :subscription_ids Subscription IDs to generate script for. Defaults to all. + # @option opts [String] :account_type + # @option opts [String] :template Template to be rendered + # @option opts [Boolean] :azure_management_group Use Azure Management Group + # @return [Array<(RegistrationAzureProvisionGetUserScriptResponseV1, Integer, Hash)>] RegistrationAzureProvisionGetUserScriptResponseV1 data, response status code and response headers + def get_cspm_azure_user_scripts_attachment_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_azure_user_scripts_attachment ...' + end + if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length > 36 + fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.get_cspm_azure_user_scripts_attachment, the character length must be smaller than or equal to 36.' + end + + if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length < 36 fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.get_cspm_azure_user_scripts_attachment, the character length must be great than or equal to 36.' end @@ -1159,6 +1480,7 @@ def get_cspm_azure_user_scripts_attachment_with_http_info(opts = {}) query_params[:'subscription_ids'] = @api_client.build_collection_param(opts[:'subscription_ids'], :multi) if !opts[:'subscription_ids'].nil? query_params[:'account_type'] = opts[:'account_type'] if !opts[:'account_type'].nil? query_params[:'template'] = opts[:'template'] if !opts[:'template'].nil? + query_params[:'azure_management_group'] = opts[:'azure_management_group'] if !opts[:'azure_management_group'].nil? # header parameters header_params = opts[:header_params] || {} @@ -1463,6 +1785,222 @@ def get_cspm_scan_schedule_with_http_info(opts = {}) return data, status_code, headers end + # Returns information about the current status of an GCP account. + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @option opts [String] :scan_type Type of scan, dry or full, to perform on selected accounts + # @option opts [String] :status Account status to filter results by. + # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [String] :sort Order fields in ascending or descending order. Ex: parent_type|asc. + # @return [RegistrationGCPAccountResponseV1] + def get_cspmcgp_account(opts = {}) + data, _status_code, _headers = get_cspmcgp_account_with_http_info(opts) + data + end + + # Returns information about the current status of an GCP account. + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @option opts [String] :scan_type Type of scan, dry or full, to perform on selected accounts + # @option opts [String] :status Account status to filter results by. + # @option opts [Integer] :limit The maximum records to return. Defaults to 100. (default to 100) + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [String] :sort Order fields in ascending or descending order. Ex: parent_type|asc. + # @return [Array<(RegistrationGCPAccountResponseV1, Integer, Hash)>] RegistrationGCPAccountResponseV1 data, response status code and response headers + def get_cspmcgp_account_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspmcgp_account ...' + end + allowable_values = ["Folder", "Organization", "Project"] + if @api_client.config.client_side_validation && opts[:'parent_type'] && !allowable_values.include?(opts[:'parent_type']) + fail ArgumentError, "invalid value for \"parent_type\", must be one of #{allowable_values}" + end + allowable_values = ["dry", "full"] + if @api_client.config.client_side_validation && opts[:'scan_type'] && !allowable_values.include?(opts[:'scan_type']) + fail ArgumentError, "invalid value for \"scan_type\", must be one of #{allowable_values}" + end + allowable_values = ["operational", "provisioned"] + if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) + fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/cloud-connect-cspm-gcp/entities/account/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'parent_type'] = opts[:'parent_type'] if !opts[:'parent_type'].nil? + query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil? + query_params[:'scan-type'] = opts[:'scan_type'] if !opts[:'scan_type'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].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] || 'RegistrationGCPAccountResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.get_cspmcgp_account", + :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: CspmRegistrationApi#get_cspmcgp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns the service account id and client email for external clients. + # @param [Hash] opts the optional parameters + # @option opts [String] :id Service Account ID + # @return [RegistrationGCPServiceAccountResponseExtV1] + def get_cspmgcp_service_accounts_ext(opts = {}) + data, _status_code, _headers = get_cspmgcp_service_accounts_ext_with_http_info(opts) + data + end + + # Returns the service account id and client email for external clients. + # @param [Hash] opts the optional parameters + # @option opts [String] :id Service Account ID + # @return [Array<(RegistrationGCPServiceAccountResponseExtV1, Integer, Hash)>] RegistrationGCPServiceAccountResponseExtV1 data, response status code and response headers + def get_cspmgcp_service_accounts_ext_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspmgcp_service_accounts_ext ...' + end + pattern = Regexp.new(/^\d+$/) + if @api_client.config.client_side_validation && !opts[:'id'].nil? && opts[:'id'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"id\"]' when calling CspmRegistrationApi.get_cspmgcp_service_accounts_ext, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/cloud-connect-cspm-gcp/entities/service-accounts/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = opts[:'id'] if !opts[:'id'].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] || 'RegistrationGCPServiceAccountResponseExtV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.get_cspmgcp_service_accounts_ext", + :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: CspmRegistrationApi#get_cspmgcp_service_accounts_ext\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [RegistrationGCPProvisionGetUserScriptResponseV1] + def get_cspmgcp_user_scripts_attachment(opts = {}) + data, _status_code, _headers = get_cspmgcp_user_scripts_attachment_with_http_info(opts) + data + end + + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [Array<(RegistrationGCPProvisionGetUserScriptResponseV1, Integer, Hash)>] RegistrationGCPProvisionGetUserScriptResponseV1 data, response status code and response headers + def get_cspmgcp_user_scripts_attachment_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspmgcp_user_scripts_attachment ...' + end + allowable_values = ["Folder", "Organization", "Project"] + if @api_client.config.client_side_validation && opts[:'parent_type'] && !allowable_values.include?(opts[:'parent_type']) + fail ArgumentError, "invalid value for \"parent_type\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/cloud-connect-cspm-gcp/entities/user-scripts-download/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'parent_type'] = opts[:'parent_type'] if !opts[:'parent_type'].nil? + 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', '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] || 'RegistrationGCPProvisionGetUserScriptResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.get_cspmgcp_user_scripts_attachment", + :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: CspmRegistrationApi#get_cspmgcp_user_scripts_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Patches a existing account in our system for a customer. # @param body [RegistrationAWSAccountPatchRequest] # @param [Hash] opts the optional parameters @@ -1529,6 +2067,72 @@ def patch_cspm_aws_account_with_http_info(body, opts = {}) return data, status_code, headers end + # Patches a existing account in our system for a customer. + # @param body [RegistrationAzureAccountPatchRequest] + # @param [Hash] opts the optional parameters + # @return [RegistrationAzureAccountResponseV1] + def update_cspm_azure_account(body, opts = {}) + data, _status_code, _headers = update_cspm_azure_account_with_http_info(body, opts) + data + end + + # Patches a existing account in our system for a customer. + # @param body [RegistrationAzureAccountPatchRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(RegistrationAzureAccountResponseV1, Integer, Hash)>] RegistrationAzureAccountResponseV1 data, response status code and response headers + def update_cspm_azure_account_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspm_azure_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 CspmRegistrationApi.update_cspm_azure_account" + end + # resource path + local_var_path = '/cloud-connect-cspm-azure/entities/account/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] || 'RegistrationAzureAccountResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.update_cspm_azure_account", + :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: CspmRegistrationApi#update_cspm_azure_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update an Azure service account in our system by with the user-created client_id created with the public key we've provided # @param id [String] ClientID to use for the Service Principal associated with the customer's Azure account # @param [Hash] opts the optional parameters @@ -1842,5 +2446,71 @@ def update_cspm_scan_schedule_with_http_info(body, opts = {}) end return data, status_code, headers end + + # Patches a existing account in our system for a customer. + # @param body [RegistrationGCPAccountPatchRequest] + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseV1] + def update_cspmgcp_account(body, opts = {}) + data, _status_code, _headers = update_cspmgcp_account_with_http_info(body, opts) + data + end + + # Patches a existing account in our system for a customer. + # @param body [RegistrationGCPAccountPatchRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(RegistrationGCPAccountResponseV1, Integer, Hash)>] RegistrationGCPAccountResponseV1 data, response status code and response headers + def update_cspmgcp_account_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspmgcp_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 CspmRegistrationApi.update_cspmgcp_account" + end + # resource path + local_var_path = '/cloud-connect-cspm-gcp/entities/account/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] || 'RegistrationGCPAccountResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CspmRegistrationApi.update_cspmgcp_account", + :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: CspmRegistrationApi#update_cspmgcp_account\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/custom_ioa_api.rb b/lib/crimson-falcon/api/custom_ioa_api.rb index 05b14e11..e16e48c3 100644 --- a/lib/crimson-falcon/api/custom_ioa_api.rb +++ b/lib/crimson-falcon/api/custom_ioa_api.rb @@ -1014,7 +1014,7 @@ def query_rule_types_with_http_info(opts = {}) # Finds all rule IDs matching the query with optional filter. # @param [Hash] opts the optional parameters - # @option opts [String] :sort Possible order by fields: {rules.created_on, rules.current_version.name, rules.current_version.modified_by, rules.ruletype_name, rules.created_by, rules.current_version.description, rules.current_version.pattern_severity, rules.current_version.action_label, rules.current_version.modified_on, rules.enabled} + # @option opts [String] :sort Possible order by fields: {rules.current_version.description, rules.current_version.action_label, rules.current_version.modified_on, rules.created_on, rules.current_version.name, rules.created_by, rules.current_version.pattern_severity, rules.current_version.modified_by, rules.ruletype_name, rules.enabled} # @option opts [String] :filter FQL query specifying the filter parameters. Filter term criteria: [enabled platform name description rules.action_label rules.name rules.description rules.pattern_severity rules.ruletype_name rules.enabled]. Filter range criteria: created_on, modified_on; use any common date format, such as '2010-05-15T14:55:21.892315096Z'. # @option opts [String] :q Match query criteria, which includes all the filter string fields # @option opts [String] :offset Starting index of overall result set from which to return IDs @@ -1027,7 +1027,7 @@ def query_rules_mixin0(opts = {}) # Finds all rule IDs matching the query with optional filter. # @param [Hash] opts the optional parameters - # @option opts [String] :sort Possible order by fields: {rules.created_on, rules.current_version.name, rules.current_version.modified_by, rules.ruletype_name, rules.created_by, rules.current_version.description, rules.current_version.pattern_severity, rules.current_version.action_label, rules.current_version.modified_on, rules.enabled} + # @option opts [String] :sort Possible order by fields: {rules.current_version.description, rules.current_version.action_label, rules.current_version.modified_on, rules.created_on, rules.current_version.name, rules.created_by, rules.current_version.pattern_severity, rules.current_version.modified_by, rules.ruletype_name, rules.enabled} # @option opts [String] :filter FQL query specifying the filter parameters. Filter term criteria: [enabled platform name description rules.action_label rules.name rules.description rules.pattern_severity rules.ruletype_name rules.enabled]. Filter range criteria: created_on, modified_on; use any common date format, such as '2010-05-15T14:55:21.892315096Z'. # @option opts [String] :q Match query criteria, which includes all the filter string fields # @option opts [String] :offset Starting index of overall result set from which to return IDs diff --git a/lib/crimson-falcon/api/custom_storage_api.rb b/lib/crimson-falcon/api/custom_storage_api.rb new file mode 100644 index 00000000..1c222193 --- /dev/null +++ b/lib/crimson-falcon/api/custom_storage_api.rb @@ -0,0 +1,590 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 CustomStorageApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Delete the specified object + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :dry_run If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. + # @return [CustomType3191042536] + def delete_object(collection_name, object_key, opts = {}) + data, _status_code, _headers = delete_object_with_http_info(collection_name, object_key, opts) + data + end + + # Delete the specified object + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :dry_run If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. + # @return [Array<(CustomType3191042536, Integer, Hash)>] CustomType3191042536 data, response status code and response headers + def delete_object_with_http_info(collection_name, object_key, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomStorageApi.delete_object ...' + end + # verify the required parameter 'collection_name' is set + if @api_client.config.client_side_validation && collection_name.nil? + fail ArgumentError, "Missing the required parameter 'collection_name' when calling CustomStorageApi.delete_object" + end + if @api_client.config.client_side_validation && collection_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.delete_object, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && collection_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.delete_object, the character length must be great than or equal to 1.' + end + + # verify the required parameter 'object_key' is set + if @api_client.config.client_side_validation && object_key.nil? + fail ArgumentError, "Missing the required parameter 'object_key' when calling CustomStorageApi.delete_object" + end + if @api_client.config.client_side_validation && object_key.to_s.length > 1000 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.delete_object, the character length must be smaller than or equal to 1000.' + end + + if @api_client.config.client_side_validation && object_key.to_s.length < 1 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.delete_object, the character length must be great than or equal to 1.' + end + + # resource path + local_var_path = '/customobjects/v1/collections/{collection_name}/objects/{object_key}'.sub('{' + 'collection_name' + '}', CGI.escape(collection_name.to_s)).sub('{' + 'object_key' + '}', CGI.escape(object_key.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'dry_run'] = opts[:'dry_run'] if !opts[:'dry_run'].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] || 'CustomType3191042536' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CustomStorageApi.delete_object", + :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: CustomStorageApi#delete_object\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the bytes for the specified object + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param [Hash] opts the optional parameters + # @return [File] + def get_object(collection_name, object_key, opts = {}) + data, _status_code, _headers = get_object_with_http_info(collection_name, object_key, opts) + data + end + + # Get the bytes for the specified object + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param [Hash] opts the optional parameters + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def get_object_with_http_info(collection_name, object_key, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomStorageApi.get_object ...' + end + # verify the required parameter 'collection_name' is set + if @api_client.config.client_side_validation && collection_name.nil? + fail ArgumentError, "Missing the required parameter 'collection_name' when calling CustomStorageApi.get_object" + end + if @api_client.config.client_side_validation && collection_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.get_object, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && collection_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.get_object, the character length must be great than or equal to 1.' + end + + # verify the required parameter 'object_key' is set + if @api_client.config.client_side_validation && object_key.nil? + fail ArgumentError, "Missing the required parameter 'object_key' when calling CustomStorageApi.get_object" + end + if @api_client.config.client_side_validation && object_key.to_s.length > 1000 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.get_object, the character length must be smaller than or equal to 1000.' + end + + if @api_client.config.client_side_validation && object_key.to_s.length < 1 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.get_object, the character length must be great than or equal to 1.' + end + + # resource path + local_var_path = '/customobjects/v1/collections/{collection_name}/objects/{object_key}'.sub('{' + 'collection_name' + '}', CGI.escape(collection_name.to_s)).sub('{' + 'object_key' + '}', CGI.escape(object_key.to_s)) + + # 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/octet-stream', '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] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CustomStorageApi.get_object", + :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: CustomStorageApi#get_object\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the metadata for the specified object + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param [Hash] opts the optional parameters + # @return [CustomType3191042536] + def get_object_metadata(collection_name, object_key, opts = {}) + data, _status_code, _headers = get_object_metadata_with_http_info(collection_name, object_key, opts) + data + end + + # Get the metadata for the specified object + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param [Hash] opts the optional parameters + # @return [Array<(CustomType3191042536, Integer, Hash)>] CustomType3191042536 data, response status code and response headers + def get_object_metadata_with_http_info(collection_name, object_key, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomStorageApi.get_object_metadata ...' + end + # verify the required parameter 'collection_name' is set + if @api_client.config.client_side_validation && collection_name.nil? + fail ArgumentError, "Missing the required parameter 'collection_name' when calling CustomStorageApi.get_object_metadata" + end + if @api_client.config.client_side_validation && collection_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.get_object_metadata, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && collection_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.get_object_metadata, the character length must be great than or equal to 1.' + end + + # verify the required parameter 'object_key' is set + if @api_client.config.client_side_validation && object_key.nil? + fail ArgumentError, "Missing the required parameter 'object_key' when calling CustomStorageApi.get_object_metadata" + end + if @api_client.config.client_side_validation && object_key.to_s.length > 1000 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.get_object_metadata, the character length must be smaller than or equal to 1000.' + end + + if @api_client.config.client_side_validation && object_key.to_s.length < 1 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.get_object_metadata, the character length must be great than or equal to 1.' + end + + # resource path + local_var_path = '/customobjects/v1/collections/{collection_name}/objects/{object_key}/metadata'.sub('{' + 'collection_name' + '}', CGI.escape(collection_name.to_s)).sub('{' + 'object_key' + '}', CGI.escape(object_key.to_s)) + + # 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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CustomType3191042536' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CustomStorageApi.get_object_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: CustomStorageApi#get_object_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List the object keys in the specified collection in alphabetical order + # @param collection_name [String] The name of the collection + # @param [Hash] opts the optional parameters + # @option opts [String] :_end The end key to end listing to + # @option opts [Integer] :limit The limit of results to return + # @option opts [String] :start The start key to start listing from + # @return [CustomType1255839303] + def list_objects(collection_name, opts = {}) + data, _status_code, _headers = list_objects_with_http_info(collection_name, opts) + data + end + + # List the object keys in the specified collection in alphabetical order + # @param collection_name [String] The name of the collection + # @param [Hash] opts the optional parameters + # @option opts [String] :_end The end key to end listing to + # @option opts [Integer] :limit The limit of results to return + # @option opts [String] :start The start key to start listing from + # @return [Array<(CustomType1255839303, Integer, Hash)>] CustomType1255839303 data, response status code and response headers + def list_objects_with_http_info(collection_name, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomStorageApi.list_objects ...' + end + # verify the required parameter 'collection_name' is set + if @api_client.config.client_side_validation && collection_name.nil? + fail ArgumentError, "Missing the required parameter 'collection_name' when calling CustomStorageApi.list_objects" + end + if @api_client.config.client_side_validation && collection_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.list_objects, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && collection_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.list_objects, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'_end'].nil? && opts[:'_end'].to_s.length > 1000 + fail ArgumentError, 'invalid value for "opts[:"_end"]" when calling CustomStorageApi.list_objects, the character length must be smaller than or equal to 1000.' + end + + if @api_client.config.client_side_validation && !opts[:'_end'].nil? && opts[:'_end'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"_end"]" when calling CustomStorageApi.list_objects, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'start'].nil? && opts[:'start'].to_s.length > 1000 + fail ArgumentError, 'invalid value for "opts[:"start"]" when calling CustomStorageApi.list_objects, the character length must be smaller than or equal to 1000.' + end + + if @api_client.config.client_side_validation && !opts[:'start'].nil? && opts[:'start'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"start"]" when calling CustomStorageApi.list_objects, the character length must be great than or equal to 1.' + end + + # resource path + local_var_path = '/customobjects/v1/collections/{collection_name}/objects'.sub('{' + 'collection_name' + '}', CGI.escape(collection_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'start'] = opts[:'start'] if !opts[:'start'].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] || 'CustomType1255839303' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CustomStorageApi.list_objects", + :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: CustomStorageApi#list_objects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Put the specified new object at the given key or overwrite an existing object at the given key + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param body [File] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :dry_run If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. + # @option opts [String] :schema_version The version of the collection schema + # @return [CustomType3191042536] + def put_object(collection_name, object_key, body, opts = {}) + data, _status_code, _headers = put_object_with_http_info(collection_name, object_key, body, opts) + data + end + + # Put the specified new object at the given key or overwrite an existing object at the given key + # @param collection_name [String] The name of the collection + # @param object_key [String] The object key + # @param body [File] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :dry_run If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. + # @option opts [String] :schema_version The version of the collection schema + # @return [Array<(CustomType3191042536, Integer, Hash)>] CustomType3191042536 data, response status code and response headers + def put_object_with_http_info(collection_name, object_key, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomStorageApi.put_object ...' + end + # verify the required parameter 'collection_name' is set + if @api_client.config.client_side_validation && collection_name.nil? + fail ArgumentError, "Missing the required parameter 'collection_name' when calling CustomStorageApi.put_object" + end + if @api_client.config.client_side_validation && collection_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.put_object, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && collection_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.put_object, the character length must be great than or equal to 1.' + end + + # verify the required parameter 'object_key' is set + if @api_client.config.client_side_validation && object_key.nil? + fail ArgumentError, "Missing the required parameter 'object_key' when calling CustomStorageApi.put_object" + end + if @api_client.config.client_side_validation && object_key.to_s.length > 1000 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.put_object, the character length must be smaller than or equal to 1000.' + end + + if @api_client.config.client_side_validation && object_key.to_s.length < 1 + fail ArgumentError, 'invalid value for "object_key" when calling CustomStorageApi.put_object, the character length must be great than or equal to 1.' + 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 CustomStorageApi.put_object" + end + if @api_client.config.client_side_validation && !opts[:'schema_version'].nil? && opts[:'schema_version'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"schema_version"]" when calling CustomStorageApi.put_object, the character length must be great than or equal to 1.' + end + + # resource path + local_var_path = '/customobjects/v1/collections/{collection_name}/objects/{object_key}'.sub('{' + 'collection_name' + '}', CGI.escape(collection_name.to_s)).sub('{' + 'object_key' + '}', CGI.escape(object_key.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'dry_run'] = opts[:'dry_run'] if !opts[:'dry_run'].nil? + query_params[:'schema_version'] = opts[:'schema_version'] if !opts[:'schema_version'].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/octet-stream', '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] || 'CustomType3191042536' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CustomStorageApi.put_object", + :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(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CustomStorageApi#put_object\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search for objects that match the specified filter criteria (returns metadata, not actual objects) + # @param collection_name [String] The name of the collection + # @param filter [String] The filter to limit the returned results. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The limit of results to return + # @option opts [Integer] :offset The offset of results to return + # @option opts [String] :sort The sort order for the returned results. + # @return [CustomType3191042536] + def search_objects(collection_name, filter, opts = {}) + data, _status_code, _headers = search_objects_with_http_info(collection_name, filter, opts) + data + end + + # Search for objects that match the specified filter criteria (returns metadata, not actual objects) + # @param collection_name [String] The name of the collection + # @param filter [String] The filter to limit the returned results. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The limit of results to return + # @option opts [Integer] :offset The offset of results to return + # @option opts [String] :sort The sort order for the returned results. + # @return [Array<(CustomType3191042536, Integer, Hash)>] CustomType3191042536 data, response status code and response headers + def search_objects_with_http_info(collection_name, filter, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CustomStorageApi.search_objects ...' + end + # verify the required parameter 'collection_name' is set + if @api_client.config.client_side_validation && collection_name.nil? + fail ArgumentError, "Missing the required parameter 'collection_name' when calling CustomStorageApi.search_objects" + end + if @api_client.config.client_side_validation && collection_name.to_s.length > 255 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.search_objects, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && collection_name.to_s.length < 1 + fail ArgumentError, 'invalid value for "collection_name" when calling CustomStorageApi.search_objects, the character length must be great than or equal to 1.' + 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 CustomStorageApi.search_objects" + end + if @api_client.config.client_side_validation && filter.to_s.length > 255 + fail ArgumentError, 'invalid value for "filter" when calling CustomStorageApi.search_objects, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && filter.to_s.length < 1 + fail ArgumentError, 'invalid value for "filter" when calling CustomStorageApi.search_objects, the character length must be great than or equal to 1.' + end + + if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'].to_s.length > 255 + fail ArgumentError, 'invalid value for "opts[:"sort"]" when calling CustomStorageApi.search_objects, the character length must be smaller than or equal to 255.' + end + + if @api_client.config.client_side_validation && !opts[:'sort'].nil? && opts[:'sort'].to_s.length < 1 + fail ArgumentError, 'invalid value for "opts[:"sort"]" when calling CustomStorageApi.search_objects, the character length must be great than or equal to 1.' + end + + # resource path + local_var_path = '/customobjects/v1/collections/{collection_name}/objects'.sub('{' + 'collection_name' + '}', CGI.escape(collection_name.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = filter + 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] || 'CustomType3191042536' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"CustomStorageApi.search_objects", + :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: CustomStorageApi#search_objects\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/d4c_registration_api.rb b/lib/crimson-falcon/api/d4c_registration_api.rb index ea19b91e..3f88f609 100644 --- a/lib/crimson-falcon/api/d4c_registration_api.rb +++ b/lib/crimson-falcon/api/d4c_registration_api.rb @@ -36,6 +36,72 @@ class D4cRegistrationApi def initialize(api_client = ApiClient.default) @api_client = api_client end + # 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 [RegistrationGCPAccountExtRequestV2] + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseExtV2] + def connect_d4_cgcp_account(body, opts = {}) + data, _status_code, _headers = connect_d4_cgcp_account_with_http_info(body, opts) + data + end + + # 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 [RegistrationGCPAccountExtRequestV2] + # @param [Hash] opts the optional parameters + # @return [Array<(RegistrationGCPAccountResponseExtV2, Integer, Hash)>] RegistrationGCPAccountResponseExtV2 data, response status code and response headers + def connect_d4_cgcp_account_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: D4cRegistrationApi.connect_d4_cgcp_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 D4cRegistrationApi.connect_d4_cgcp_account" + end + # resource path + local_var_path = '/cloud-connect-gcp/entities/account/v2' + + # 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] || 'RegistrationGCPAccountResponseExtV2' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"D4cRegistrationApi.connect_d4_cgcp_account", + :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: D4cRegistrationApi#connect_d4_cgcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # 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. # @param body [RegistrationAWSAccountCreateRequestD4CExtV2] # @param [Hash] opts the optional parameters @@ -295,6 +361,64 @@ def delete_d4_c_aws_account_with_http_info(opts = {}) return data, status_code, headers end + # Deletes a GCP account from the system. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [MsaBaseEntitiesResponse] + def delete_d4_cgcp_account(opts = {}) + data, _status_code, _headers = delete_d4_cgcp_account_with_http_info(opts) + data + end + + # Deletes a GCP account from the system. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [Array<(MsaBaseEntitiesResponse, Integer, Hash)>] MsaBaseEntitiesResponse data, response status code and response headers + def delete_d4_cgcp_account_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: D4cRegistrationApi.delete_d4_cgcp_account ...' + end + # resource path + local_var_path = '/cloud-connect-gcp/entities/account/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] || 'MsaBaseEntitiesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"D4cRegistrationApi.delete_d4_cgcp_account", + :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: D4cRegistrationApi#delete_d4_cgcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + 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 @@ -423,15 +547,10 @@ def get_d4_c_aws_account_with_http_info(opts = {}) fail ArgumentError, "invalid value for 'opts[:\"status\"]' when calling D4cRegistrationApi.get_d4_c_aws_account, must conform to the pattern #{pattern}." end - allowable_values = ["false", "true"] + allowable_values = ["true", "false"] if @api_client.config.client_side_validation && opts[:'migrated'] && !allowable_values.include?(opts[:'migrated']) fail ArgumentError, "invalid value for \"migrated\", must be one of #{allowable_values}" end - pattern = Regexp.new(/^(true|false)$/) - if @api_client.config.client_side_validation && !opts[:'migrated'].nil? && opts[:'migrated'] !~ pattern - fail ArgumentError, "invalid value for 'opts[:\"migrated\"]' when calling D4cRegistrationApi.get_d4_c_aws_account, must conform to the pattern #{pattern}." - end - # resource path local_var_path = '/cloud-connect-aws/entities/account/v2' @@ -688,6 +807,69 @@ def get_d4_ccgp_account_with_http_info(opts = {}) return data, status_code, headers end + # Returns the service account id and client email for external clients. + # @param [Hash] opts the optional parameters + # @option opts [String] :id Service Account ID + # @return [RegistrationGCPServiceAccountResponseExtV1] + def get_d4_cgcp_service_accounts_ext(opts = {}) + data, _status_code, _headers = get_d4_cgcp_service_accounts_ext_with_http_info(opts) + data + end + + # Returns the service account id and client email for external clients. + # @param [Hash] opts the optional parameters + # @option opts [String] :id Service Account ID + # @return [Array<(RegistrationGCPServiceAccountResponseExtV1, Integer, Hash)>] RegistrationGCPServiceAccountResponseExtV1 data, response status code and response headers + def get_d4_cgcp_service_accounts_ext_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: D4cRegistrationApi.get_d4_cgcp_service_accounts_ext ...' + end + pattern = Regexp.new(/^\d+$/) + if @api_client.config.client_side_validation && !opts[:'id'].nil? && opts[:'id'] !~ pattern + fail ArgumentError, "invalid value for 'opts[:\"id\"]' when calling D4cRegistrationApi.get_d4_cgcp_service_accounts_ext, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/cloud-connect-gcp/entities/service-accounts/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = opts[:'id'] if !opts[:'id'].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] || 'RegistrationGCPServiceAccountResponseExtV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"D4cRegistrationApi.get_d4_cgcp_service_accounts_ext", + :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: D4cRegistrationApi#get_d4_cgcp_service_accounts_ext\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment # @param [Hash] opts the optional parameters # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project @@ -750,6 +932,78 @@ def get_d4_cgcp_user_scripts_with_http_info(opts = {}) return data, status_code, headers end + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @option opts [String] :status Account status to filter results by. + # @return [RegistrationGCPProvisionGetUserScriptResponseV1] + def get_d4_cgcp_user_scripts_attachment(opts = {}) + data, _status_code, _headers = get_d4_cgcp_user_scripts_attachment_with_http_info(opts) + data + end + + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @option opts [String] :status Account status to filter results by. + # @return [Array<(RegistrationGCPProvisionGetUserScriptResponseV1, Integer, Hash)>] RegistrationGCPProvisionGetUserScriptResponseV1 data, response status code and response headers + def get_d4_cgcp_user_scripts_attachment_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: D4cRegistrationApi.get_d4_cgcp_user_scripts_attachment ...' + end + allowable_values = ["Folder", "Organization", "Project"] + if @api_client.config.client_side_validation && opts[:'parent_type'] && !allowable_values.include?(opts[:'parent_type']) + fail ArgumentError, "invalid value for \"parent_type\", must be one of #{allowable_values}" + end + allowable_values = ["operational", "provisioned"] + if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) + fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/cloud-connect-gcp/entities/user-scripts-download/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'parent_type'] = opts[:'parent_type'] if !opts[:'parent_type'].nil? + query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].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] || 'RegistrationGCPProvisionGetUserScriptResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"D4cRegistrationApi.get_d4_cgcp_user_scripts_attachment", + :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: D4cRegistrationApi#get_d4_cgcp_user_scripts_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Return information about Azure account registration # @param [Hash] opts the optional parameters # @option opts [Array] :ids SubscriptionIDs of accounts to select for this status operation. If this is empty then all accounts are returned. @@ -956,6 +1210,7 @@ def get_discover_cloud_azure_user_scripts_with_http_info(opts = {}) # @param [Hash] opts the optional parameters # @option opts [Array] :subscription_ids Azure Subscription ID # @option opts [String] :template Template to be rendered + # @option opts [Boolean] :azure_management_group Use Azure Management Group # @return [RegistrationAzureProvisionGetUserScriptResponseV1] def get_discover_cloud_azure_user_scripts_attachment(tenant_id, opts = {}) data, _status_code, _headers = get_discover_cloud_azure_user_scripts_attachment_with_http_info(tenant_id, opts) @@ -967,6 +1222,7 @@ def get_discover_cloud_azure_user_scripts_attachment(tenant_id, opts = {}) # @param [Hash] opts the optional parameters # @option opts [Array] :subscription_ids Azure Subscription ID # @option opts [String] :template Template to be rendered + # @option opts [Boolean] :azure_management_group Use Azure Management Group # @return [Array<(RegistrationAzureProvisionGetUserScriptResponseV1, Integer, Hash)>] RegistrationAzureProvisionGetUserScriptResponseV1 data, response status code and response headers def get_discover_cloud_azure_user_scripts_attachment_with_http_info(tenant_id, opts = {}) if @api_client.config.debugging @@ -984,6 +1240,7 @@ def get_discover_cloud_azure_user_scripts_attachment_with_http_info(tenant_id, o query_params[:'tenant-id'] = @api_client.build_collection_param(tenant_id, :csv) query_params[:'subscription_ids'] = @api_client.build_collection_param(opts[:'subscription_ids'], :csv) if !opts[:'subscription_ids'].nil? query_params[:'template'] = opts[:'template'] if !opts[:'template'].nil? + query_params[:'azure_management_group'] = opts[:'azure_management_group'] if !opts[:'azure_management_group'].nil? # header parameters header_params = opts[:header_params] || {} diff --git a/lib/crimson-falcon/api/drift_indicators_api.rb b/lib/crimson-falcon/api/drift_indicators_api.rb new file mode 100644 index 00000000..b9c23517 --- /dev/null +++ b/lib/crimson-falcon/api/drift_indicators_api.rb @@ -0,0 +1,350 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DriftIndicatorsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + 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 [Integer] :limit The upper-bound on the number of records to retrieve. + # @return [DriftindicatorsDriftIndicatorsFieldValue] + def get_drift_indicators_values_by_date(opts = {}) + data, _status_code, _headers = get_drift_indicators_values_by_date_with_http_info(opts) + data + 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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DriftIndicatorsApi.get_drift_indicators_values_by_date ...' + end + # resource path + local_var_path = '/container-security/aggregates/drift-indicators/count-by-date/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? + + # 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] || 'DriftindicatorsDriftIndicatorsFieldValue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"DriftIndicatorsApi.get_drift_indicators_values_by_date", + :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: DriftIndicatorsApi#get_drift_indicators_values_by_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve Drift Indicator entities identified by the provided IDs + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Search Drift Indicators by ids - The maximum amount is 100 IDs + # @return [DriftindicatorsDriftEntityResponse] + def read_drift_indicator_entities(opts = {}) + data, _status_code, _headers = read_drift_indicator_entities_with_http_info(opts) + data + end + + # Retrieve Drift Indicator entities identified by the provided IDs + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Search Drift Indicators by ids - The maximum amount is 100 IDs + # @return [Array<(DriftindicatorsDriftEntityResponse, Integer, Hash)>] DriftindicatorsDriftEntityResponse data, response status code and response headers + def read_drift_indicator_entities_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DriftIndicatorsApi.read_drift_indicator_entities ...' + end + # resource path + local_var_path = '/container-security/entities/drift-indicators/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :csv) 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] || 'DriftindicatorsDriftEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"DriftIndicatorsApi.read_drift_indicator_entities", + :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: DriftIndicatorsApi#read_drift_indicator_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [DriftindicatorsDriftIndicatorsCountValue] + def read_drift_indicators_count(opts = {}) + data, _status_code, _headers = read_drift_indicators_count_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: DriftIndicatorsApi.read_drift_indicators_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/drift-indicators/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'DriftindicatorsDriftIndicatorsCountValue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"DriftIndicatorsApi.read_drift_indicators_count", + :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: DriftIndicatorsApi#read_drift_indicators_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve Drift Indicators by the provided search criteria + # @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] :sort The fields to sort the records on. + # @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 + # @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] :sort The fields to sort the records on. + # @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 + @api_client.config.logger.debug 'Calling API: DriftIndicatorsApi.search_and_read_drift_indicator_entities ...' + end + # resource path + local_var_path = '/container-security/combined/drift-indicators/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] || 'DriftindicatorsDriftEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"DriftIndicatorsApi.search_and_read_drift_indicator_entities", + :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: DriftIndicatorsApi#search_and_read_drift_indicator_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve all drift indicators that match the given query + # @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] :sort The fields to sort the records on. + # @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 + # @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] :sort The fields to sort the records on. + # @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 + @api_client.config.logger.debug 'Calling API: DriftIndicatorsApi.search_drift_indicators ...' + end + # resource path + local_var_path = '/container-security/queries/drift-indicators/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] || 'MsaspecQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"DriftIndicatorsApi.search_drift_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(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DriftIndicatorsApi#search_drift_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/falcon_complete_dashboard_api.rb b/lib/crimson-falcon/api/falcon_complete_dashboard_api.rb index ffaffe69..b8feda6c 100644 --- a/lib/crimson-falcon/api/falcon_complete_dashboard_api.rb +++ b/lib/crimson-falcon/api/falcon_complete_dashboard_api.rb @@ -36,6 +36,72 @@ class FalconCompleteDashboardApi def initialize(api_client = ApiClient.default) @api_client = api_client end + # Retrieve aggregate alerts values based on the matched filter + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + def aggregate_alerts(body, opts = {}) + data, _status_code, _headers = aggregate_alerts_with_http_info(body, opts) + data + end + + # Retrieve aggregate alerts values based on the matched filter + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(MsaAggregatesResponse, Integer, Hash)>] MsaAggregatesResponse data, response status code and response headers + def aggregate_alerts_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.aggregate_alerts ...' + 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 FalconCompleteDashboardApi.aggregate_alerts" + end + # resource path + local_var_path = '/falcon-complete-dashboards/aggregates/alerts/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 + + # 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] || 'MsaAggregatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FalconCompleteDashboardApi.aggregate_alerts", + :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: FalconCompleteDashboardApi#aggregate_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve aggregate allowlist ticket values based on the matched filter # @param body [Array] # @param [Hash] opts the optional parameters @@ -434,6 +500,72 @@ def aggregate_fc_incidents_with_http_info(body, opts = {}) return data, status_code, headers end + # Retrieve prevention policies aggregate values based on the matched filter + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + def aggregate_prevention_policy(body, opts = {}) + data, _status_code, _headers = aggregate_prevention_policy_with_http_info(body, opts) + data + end + + # Retrieve prevention policies aggregate values based on the matched filter + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(MsaAggregatesResponse, Integer, Hash)>] MsaAggregatesResponse data, response status code and response headers + def aggregate_prevention_policy_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.aggregate_prevention_policy ...' + 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 FalconCompleteDashboardApi.aggregate_prevention_policy" + end + # resource path + local_var_path = '/falcon-complete-dashboards/aggregates/prevention-policies/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] || 'MsaAggregatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FalconCompleteDashboardApi.aggregate_prevention_policy", + :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: FalconCompleteDashboardApi#aggregate_prevention_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve aggregate remediation ticket values based on the matched filter # @param body [Array] # @param [Hash] opts the optional parameters @@ -500,13 +632,145 @@ def aggregate_remediations_with_http_info(body, opts = {}) return data, status_code, headers end + # Retrieve sensor update policies aggregate values + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + def aggregate_sensor_update_policy(body, opts = {}) + data, _status_code, _headers = aggregate_sensor_update_policy_with_http_info(body, opts) + data + end + + # Retrieve sensor update policies aggregate values + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(MsaAggregatesResponse, Integer, Hash)>] MsaAggregatesResponse data, response status code and response headers + def aggregate_sensor_update_policy_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.aggregate_sensor_update_policy ...' + 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 FalconCompleteDashboardApi.aggregate_sensor_update_policy" + end + # resource path + local_var_path = '/falcon-complete-dashboards/aggregates/sensor-update-policies/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] || 'MsaAggregatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FalconCompleteDashboardApi.aggregate_sensor_update_policy", + :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: FalconCompleteDashboardApi#aggregate_sensor_update_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve aggregate total host/devices based on the matched filter + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + def aggregate_total_device_counts(body, opts = {}) + data, _status_code, _headers = aggregate_total_device_counts_with_http_info(body, opts) + data + end + + # Retrieve aggregate total host/devices based on the matched filter + # @param body [Array] + # @param [Hash] opts the optional parameters + # @return [Array<(MsaAggregatesResponse, Integer, Hash)>] MsaAggregatesResponse data, response status code and response headers + def aggregate_total_device_counts_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.aggregate_total_device_counts ...' + 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 FalconCompleteDashboardApi.aggregate_total_device_counts" + end + # resource path + local_var_path = '/falcon-complete-dashboards/aggregates/total-device-counts/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] || 'MsaAggregatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FalconCompleteDashboardApi.aggregate_total_device_counts", + :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: FalconCompleteDashboardApi#aggregate_total_device_counts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve device count collection Ids that match the provided FQL filter, criteria with scrolling enabled # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The maximum records to return. [1-500] # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def get_device_count_collection_queries_by_filter(opts = {}) data, _status_code, _headers = get_device_count_collection_queries_by_filter_with_http_info(opts) data @@ -518,7 +782,7 @@ def get_device_count_collection_queries_by_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def get_device_count_collection_queries_by_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.get_device_count_collection_queries_by_filter ...' @@ -545,7 +809,7 @@ def get_device_count_collection_queries_by_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -567,13 +831,80 @@ def get_device_count_collection_queries_by_filter_with_http_info(opts = {}) return data, status_code, headers end + # Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The maximum records to return. [1-500] + # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". + # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [String] :offset Starting index of overall result set from which to return ids. + # @return [MsaspecQueryResponse] + def query_alert_ids_by_filter(opts = {}) + data, _status_code, _headers = query_alert_ids_by_filter_with_http_info(opts) + data + end + + # Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The maximum records to return. [1-500] + # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". + # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [String] :offset Starting index of overall result set from which to return ids. + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def query_alert_ids_by_filter_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.query_alert_ids_by_filter ...' + end + # resource path + local_var_path = '/falcon-complete-dashboards/queries/alerts/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[:'filter'] = opts[:'filter'] if !opts[:'filter'].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] || 'MsaspecQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FalconCompleteDashboardApi.query_alert_ids_by_filter", + :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: FalconCompleteDashboardApi#query_alert_ids_by_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Retrieve allowlist tickets that match the provided filter criteria with scrolling enabled # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The maximum records to return. [1-500] # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_allow_list_filter(opts = {}) data, _status_code, _headers = query_allow_list_filter_with_http_info(opts) data @@ -585,7 +916,7 @@ def query_allow_list_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_allow_list_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.query_allow_list_filter ...' @@ -612,7 +943,7 @@ def query_allow_list_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -640,7 +971,7 @@ def query_allow_list_filter_with_http_info(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_block_list_filter(opts = {}) data, _status_code, _headers = query_block_list_filter_with_http_info(opts) data @@ -652,7 +983,7 @@ def query_block_list_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_block_list_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.query_block_list_filter ...' @@ -679,7 +1010,7 @@ def query_block_list_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -707,7 +1038,7 @@ def query_block_list_filter_with_http_info(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_detection_ids_by_filter(opts = {}) data, _status_code, _headers = query_detection_ids_by_filter_with_http_info(opts) data @@ -719,7 +1050,7 @@ def query_detection_ids_by_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_detection_ids_by_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.query_detection_ids_by_filter ...' @@ -746,7 +1077,7 @@ def query_detection_ids_by_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -774,7 +1105,7 @@ def query_detection_ids_by_filter_with_http_info(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_escalations_filter(opts = {}) data, _status_code, _headers = query_escalations_filter_with_http_info(opts) data @@ -786,7 +1117,7 @@ def query_escalations_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_escalations_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.query_escalations_filter ...' @@ -813,7 +1144,7 @@ def query_escalations_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -841,7 +1172,7 @@ def query_escalations_filter_with_http_info(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_incident_ids_by_filter(opts = {}) data, _status_code, _headers = query_incident_ids_by_filter_with_http_info(opts) data @@ -853,7 +1184,7 @@ def query_incident_ids_by_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_incident_ids_by_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.query_incident_ids_by_filter ...' @@ -880,7 +1211,7 @@ def query_incident_ids_by_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -908,7 +1239,7 @@ def query_incident_ids_by_filter_with_http_info(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_remediations_filter(opts = {}) data, _status_code, _headers = query_remediations_filter_with_http_info(opts) data @@ -920,7 +1251,7 @@ def query_remediations_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_remediations_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FalconCompleteDashboardApi.query_remediations_filter ...' @@ -947,7 +1278,7 @@ def query_remediations_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] diff --git a/lib/crimson-falcon/api/falcon_container_image_api.rb b/lib/crimson-falcon/api/falcon_container_image_api.rb index de21c86b..7b4489c7 100644 --- a/lib/crimson-falcon/api/falcon_container_image_api.rb +++ b/lib/crimson-falcon/api/falcon_container_image_api.rb @@ -164,73 +164,6 @@ def delete_registry_entities_with_http_info(ids, opts = {}) return data, status_code, headers end - # Get image assessment results by providing an FQL filter and paging details - # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: container_running_status, cve_id, first_seen, registry, repository, tag, vulnerability_severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve [1-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 registry repository tag vulnerability_severity] - # @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 - # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: container_running_status, cve_id, first_seen, registry, repository, tag, vulnerability_severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve [1-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 registry repository tag vulnerability_severity] - # @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 - @api_client.config.logger.debug 'Calling API: FalconContainerImageApi.get_combined_images ...' - end - # resource path - local_var_path = '/container-security/combined/image-assessment/images/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] || 'ImagesExtCombinedImagesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || ['oauth2'] - - new_options = opts.merge( - :operation => :"FalconContainerImageApi.get_combined_images", - :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: FalconContainerImageApi#get_combined_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Retrieve registry entities identified by the customer id # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The upper-bound on the number of records to retrieve. diff --git a/lib/crimson-falcon/api/falconx_sandbox_api.rb b/lib/crimson-falcon/api/falconx_sandbox_api.rb index 07e7c383..e7985e57 100644 --- a/lib/crimson-falcon/api/falconx_sandbox_api.rb +++ b/lib/crimson-falcon/api/falconx_sandbox_api.rb @@ -884,7 +884,7 @@ def query_submissions_with_http_info(opts = {}) end # Submit an uploaded file or a URL for sandbox analysis. Time required for analysis varies but is usually less than 15 minutes. - # @param body [FalconxSubmissionParametersV1] Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. + # @param body [FalconxSubmissionParametersV1] Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `400`: MacOS Catalina 10.15 - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `140`: Windows 11, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. # @param [Hash] opts the optional parameters # @return [FalconxSubmissionV1Response] def submit(body, opts = {}) @@ -893,7 +893,7 @@ def submit(body, opts = {}) end # Submit an uploaded file or a URL for sandbox analysis. Time required for analysis varies but is usually less than 15 minutes. - # @param body [FalconxSubmissionParametersV1] Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. + # @param body [FalconxSubmissionParametersV1] Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `400`: MacOS Catalina 10.15 - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `140`: Windows 11, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. # @param [Hash] opts the optional parameters # @return [Array<(FalconxSubmissionV1Response, Integer, Hash)>] FalconxSubmissionV1Response data, response status code and response headers def submit_with_http_info(body, opts = {}) diff --git a/lib/crimson-falcon/api/filevantage_api.rb b/lib/crimson-falcon/api/filevantage_api.rb index 45343725..295b2f6d 100644 --- a/lib/crimson-falcon/api/filevantage_api.rb +++ b/lib/crimson-falcon/api/filevantage_api.rb @@ -36,31 +36,303 @@ class FilevantageApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Retrieve information on changes - # Retrieve key attributes of Falcon FileVantage changes for the specified ids. - # @param ids [Array] One or more change ids in the form of ids=ID1&ids=ID2 + # 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 [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 [PublicGetChangesResponse] - def get_changes(ids, opts = {}) - data, _status_code, _headers = get_changes_with_http_info(ids, opts) + # @return [PoliciesResponse] + def create_policies(body, opts = {}) + data, _status_code, _headers = create_policies_with_http_info(body, opts) data end - # Retrieve information on changes - # Retrieve key attributes of Falcon FileVantage changes for the specified ids. - # @param ids [Array] One or more change ids in the form of ids=ID1&ids=ID2 + # 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 [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<(PublicGetChangesResponse, Integer, Hash)>] PublicGetChangesResponse data, response status code and response headers - def get_changes_with_http_info(ids, opts = {}) + # @return [Array<(PoliciesResponse, Integer, Hash)>] PoliciesResponse data, response status code and response headers + def create_policies_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FilevantageApi.get_changes ...' + @api_client.config.logger.debug 'Calling API: FilevantageApi.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 FilevantageApi.create_policies" + end + # resource path + local_var_path = '/filevantage/entities/policies/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] || 'PoliciesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.create_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: FilevantageApi#create_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Creates a new rule group of the specified type. + # Individual rules can be assigned to a rule group after it has been created. + # @param body [RulegroupsCreateRequest] Create a new rule group of a specific type. * `name` must be between 1 and 100 characters. * `type` must be one of `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. * `description` can be between 0 and 500 characters. Note: rules are added/removed from rule groups using their dedicated end-points. + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + def create_rule_groups(body, opts = {}) + data, _status_code, _headers = create_rule_groups_with_http_info(body, opts) + data + end + + # Creates a new rule group of the specified type. + # Individual rules can be assigned to a rule group after it has been created. + # @param body [RulegroupsCreateRequest] Create a new rule group of a specific type. * `name` must be between 1 and 100 characters. * `type` must be one of `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. * `description` can be between 0 and 500 characters. Note: rules are added/removed from rule groups using their dedicated end-points. + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsResponse, Integer, Hash)>] RulegroupsResponse data, response status code and response headers + def create_rule_groups_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.create_rule_groups ...' + 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 FilevantageApi.create_rule_groups" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups/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] || 'RulegroupsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.create_rule_groups", + :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: FilevantageApi#create_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Creates a new rule configuration within the specified rule group. + # Creates a new rule configuration within the specified rule group. + # @param body [RulegroupsRule] Create a new rule configuration for the specified rule group. * `id` is not supported for creation of a rule, the new id of the created rule will be included in the response. * `rule_group_id` to add the new rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` - is not supported for creation of a rule, new rules will be added last in precedence order. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files whose content will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + # @param [Hash] opts the optional parameters + # @return [RulegroupsRulesResponse] + def create_rules(body, opts = {}) + data, _status_code, _headers = create_rules_with_http_info(body, opts) + data + end + + # Creates a new rule configuration within the specified rule group. + # Creates a new rule configuration within the specified rule group. + # @param body [RulegroupsRule] Create a new rule configuration for the specified rule group. * `id` is not supported for creation of a rule, the new id of the created rule will be included in the response. * `rule_group_id` to add the new rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` - is not supported for creation of a rule, new rules will be added last in precedence order. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files whose content will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsRulesResponse, Integer, Hash)>] RulegroupsRulesResponse data, response status code and response headers + def create_rules_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.create_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 FilevantageApi.create_rules" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups-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] || 'RulegroupsRulesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.create_rules", + :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: FilevantageApi#create_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Creates a new scheduled exclusion configuration for the provided policy id. + # Creates a new scheduled exclusion configuration for the provided policy id. + # @param body [ScheduledexclusionsCreateRequest] Create a new scheduled exclusion configuration for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + # @param [Hash] opts the optional parameters + # @return [ScheduledexclusionsResponse] + def create_scheduled_exclusions(body, opts = {}) + data, _status_code, _headers = create_scheduled_exclusions_with_http_info(body, opts) + data + end + + # Creates a new scheduled exclusion configuration for the provided policy id. + # Creates a new scheduled exclusion configuration for the provided policy id. + # @param body [ScheduledexclusionsCreateRequest] Create a new scheduled exclusion configuration for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + # @param [Hash] opts the optional parameters + # @return [Array<(ScheduledexclusionsResponse, Integer, Hash)>] ScheduledexclusionsResponse data, response status code and response headers + def create_scheduled_exclusions_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.create_scheduled_exclusions ...' + 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 FilevantageApi.create_scheduled_exclusions" + end + # resource path + local_var_path = '/filevantage/entities/policy-scheduled-exclusions/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] || 'ScheduledexclusionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.create_scheduled_exclusions", + :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: FilevantageApi#create_scheduled_exclusions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deletes 1 or more policies. + # Only disabled policies are allowed to be deleted. + # @param ids [Array] One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [PoliciesDeleteResponse] + def delete_policies(ids, opts = {}) + data, _status_code, _headers = delete_policies_with_http_info(ids, opts) + data + end + + # Deletes 1 or more policies. + # Only disabled policies are allowed to be deleted. + # @param ids [Array] One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [Array<(PoliciesDeleteResponse, Integer, Hash)>] PoliciesDeleteResponse data, response status code and response headers + def delete_policies_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.delete_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 FilevantageApi.get_changes" + fail ArgumentError, "Missing the required parameter 'ids' when calling FilevantageApi.delete_policies" end # resource path - local_var_path = '/filevantage/entities/changes/v2' + local_var_path = '/filevantage/entities/policies/v1' # query parameters query_params = opts[:query_params] || {} @@ -78,13 +350,13 @@ def get_changes_with_http_info(ids, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'PublicGetChangesResponse' + return_type = opts[:debug_return_type] || 'PoliciesDeleteResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"FilevantageApi.get_changes", + :operation => :"FilevantageApi.delete_policies", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -93,51 +365,113 @@ def get_changes_with_http_info(ids, 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(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FilevantageApi#get_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FilevantageApi#delete_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deletes 1 or more rule groups + # The rule groups represented by the provided ids and all rules that they contain will be deleted. Rule groups can only be deleted if they are not assigned to a policy. + # @param ids [Array] One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [RulegroupsDeleteResponse] + def delete_rule_groups(ids, opts = {}) + data, _status_code, _headers = delete_rule_groups_with_http_info(ids, opts) + data + end + + # Deletes 1 or more rule groups + # The rule groups represented by the provided ids and all rules that they contain will be deleted. Rule groups can only be deleted if they are not assigned to a policy. + # @param ids [Array] One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsDeleteResponse, Integer, Hash)>] RulegroupsDeleteResponse data, response status code and response headers + def delete_rule_groups_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.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 FilevantageApi.delete_rule_groups" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups/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] || 'RulegroupsDeleteResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.delete_rule_groups", + :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: FilevantageApi#delete_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Returns one or more change IDs - # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided + # Deletes 1 or more rules from the specified rule group. + # Rules that match a provided id will be deleted from the provided rule group id. + # @param rule_group_id [String] The id of the rule group from which the rules will be deleted. + # @param ids [Array] One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2` # @param [Hash] opts the optional parameters - # @option opts [Integer] :offset The first change index to return in the response. If not provided it will default to '0'. Use with the `limit` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of changes to return in the response (default: 100; max: 500). Use with the `offset` parameter to manage pagination of results - # @option opts [String] :sort Sort changes using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. - # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.host_name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. # @return [MsaspecQueryResponse] - def query_changes(opts = {}) - data, _status_code, _headers = query_changes_with_http_info(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 - # Returns one or more change IDs - # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided + # Deletes 1 or more rules from the specified rule group. + # Rules that match a provided id will be deleted from the provided rule group id. + # @param rule_group_id [String] The id of the rule group from which the rules will be deleted. + # @param ids [Array] One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2` # @param [Hash] opts the optional parameters - # @option opts [Integer] :offset The first change index to return in the response. If not provided it will default to '0'. Use with the `limit` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of changes to return in the response (default: 100; max: 500). Use with the `offset` parameter to manage pagination of results - # @option opts [String] :sort Sort changes using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. - # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.host_name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers - def query_changes_with_http_info(opts = {}) + def delete_rules_with_http_info(rule_group_id, ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: FilevantageApi.query_changes ...' + @api_client.config.logger.debug 'Calling API: FilevantageApi.delete_rules ...' end - if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 - fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FilevantageApi.query_changes, must be greater than or equal to 0.' + # 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 FilevantageApi.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 FilevantageApi.delete_rules" end - # resource path - local_var_path = '/filevantage/queries/changes/v2' + local_var_path = '/filevantage/entities/rule-groups-rules/v1' # query parameters query_params = opts[:query_params] || {} - query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'rule_group_id'] = rule_group_id + query_params[:'ids'] = @api_client.build_collection_param(ids, :multi) # header parameters header_params = opts[:header_params] || {} @@ -157,7 +491,7 @@ def query_changes_with_http_info(opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"FilevantageApi.query_changes", + :operation => :"FilevantageApi.delete_rules", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -166,9 +500,1360 @@ def query_changes_with_http_info(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(:DELETE, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: FilevantageApi#query_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: FilevantageApi#delete_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deletes 1 or more scheduled exclusions from the provided policy id. + # Scheduled exclusions that match a provided id will be deleted from the provided policy id. + # @param policy_id [String] ID of the policy to delete the scheduled exclusions from. + # @param ids [Array] One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + def delete_scheduled_exclusions(policy_id, ids, opts = {}) + data, _status_code, _headers = delete_scheduled_exclusions_with_http_info(policy_id, ids, opts) + data + end + + # Deletes 1 or more scheduled exclusions from the provided policy id. + # Scheduled exclusions that match a provided id will be deleted from the provided policy id. + # @param policy_id [String] ID of the policy to delete the scheduled exclusions from. + # @param ids [Array] One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def delete_scheduled_exclusions_with_http_info(policy_id, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.delete_scheduled_exclusions ...' + end + # verify the required parameter 'policy_id' is set + if @api_client.config.client_side_validation && policy_id.nil? + fail ArgumentError, "Missing the required parameter 'policy_id' when calling FilevantageApi.delete_scheduled_exclusions" + 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 FilevantageApi.delete_scheduled_exclusions" + end + # resource path + local_var_path = '/filevantage/entities/policy-scheduled-exclusions/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'policy_id'] = policy_id + 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 => :"FilevantageApi.delete_scheduled_exclusions", + :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: FilevantageApi#delete_scheduled_exclusions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve information on changes + # Retrieve key attributes of Falcon FileVantage changes for the specified ids. + # @param ids [Array] One or more change ids in the form of `ids=ID1&ids=ID2`. The maximum number of ids that can be requested at once is `500`. + # @param [Hash] opts the optional parameters + # @return [ChangesGetChangesResponse] + def get_changes(ids, opts = {}) + data, _status_code, _headers = get_changes_with_http_info(ids, opts) + data + end + + # Retrieve information on changes + # Retrieve key attributes of Falcon FileVantage changes for the specified ids. + # @param ids [Array] One or more change ids in the form of `ids=ID1&ids=ID2`. The maximum number of ids that can be requested at once is `500`. + # @param [Hash] opts the optional parameters + # @return [Array<(ChangesGetChangesResponse, Integer, Hash)>] ChangesGetChangesResponse data, response status code and response headers + def get_changes_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.get_changes ...' + 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 FilevantageApi.get_changes" + end + if @api_client.config.client_side_validation && ids.length > 500 + fail ArgumentError, 'invalid value for "ids" when calling FilevantageApi.get_changes, number of items must be less than or equal to 500.' + end + + if @api_client.config.client_side_validation && ids.length < 1 + fail ArgumentError, 'invalid value for "ids" when calling FilevantageApi.get_changes, number of items must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/filevantage/entities/changes/v2' + + # 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] || 'ChangesGetChangesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.get_changes", + :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: FilevantageApi#get_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieves the configuration for 1 or more policies. + # The configuration of each policy that match the provided id will be returned. + # @param ids [Array] One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [PoliciesResponse] + def get_policies(ids, opts = {}) + data, _status_code, _headers = get_policies_with_http_info(ids, opts) + data + end + + # Retrieves the configuration for 1 or more policies. + # The configuration of each policy that match the provided id will be returned. + # @param ids [Array] One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [Array<(PoliciesResponse, Integer, Hash)>] PoliciesResponse data, response status code and response headers + def get_policies_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.get_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 FilevantageApi.get_policies" + end + # resource path + local_var_path = '/filevantage/entities/policies/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] || 'PoliciesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.get_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: FilevantageApi#get_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieves the rule group details for 1 or more rule groups. + # Full details of each rule group that matches a provided id will be returned in the response + # @param ids [Array] One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + def get_rule_groups(ids, opts = {}) + data, _status_code, _headers = get_rule_groups_with_http_info(ids, opts) + data + end + + # Retrieves the rule group details for 1 or more rule groups. + # Full details of each rule group that matches a provided id will be returned in the response + # @param ids [Array] One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsResponse, Integer, Hash)>] RulegroupsResponse data, response status code and response headers + def get_rule_groups_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.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 FilevantageApi.get_rule_groups" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups/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] || 'RulegroupsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.get_rule_groups", + :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: FilevantageApi#get_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieves the configuration for 1 or more rules. + # Rules within the provided rule group id that match a provided id will be returned within the response. + # @param rule_group_id [String] Rule group from which to retrieve the rule configuration. + # @param ids [Array] One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [RulegroupsRulesResponse] + def get_rules(rule_group_id, ids, opts = {}) + data, _status_code, _headers = get_rules_with_http_info(rule_group_id, ids, opts) + data + end + + # Retrieves the configuration for 1 or more rules. + # Rules within the provided rule group id that match a provided id will be returned within the response. + # @param rule_group_id [String] Rule group from which to retrieve the rule configuration. + # @param ids [Array] One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsRulesResponse, Integer, Hash)>] RulegroupsRulesResponse data, response status code and response headers + def get_rules_with_http_info(rule_group_id, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.get_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 FilevantageApi.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 FilevantageApi.get_rules" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups-rules/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'rule_group_id'] = rule_group_id + 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] || 'RulegroupsRulesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.get_rules", + :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: FilevantageApi#get_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. + # Full details of each each scheduled exclusion that match a provided id will be returned in the response. + # @param policy_id [String] The id of the policy to retrieve the scheduled exclusion configurations. + # @param ids [Array] One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [ScheduledexclusionsResponse] + def get_scheduled_exclusions(policy_id, ids, opts = {}) + data, _status_code, _headers = get_scheduled_exclusions_with_http_info(policy_id, ids, opts) + data + end + + # Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. + # Full details of each each scheduled exclusion that match a provided id will be returned in the response. + # @param policy_id [String] The id of the policy to retrieve the scheduled exclusion configurations. + # @param ids [Array] One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [Array<(ScheduledexclusionsResponse, Integer, Hash)>] ScheduledexclusionsResponse data, response status code and response headers + def get_scheduled_exclusions_with_http_info(policy_id, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.get_scheduled_exclusions ...' + end + # verify the required parameter 'policy_id' is set + if @api_client.config.client_side_validation && policy_id.nil? + fail ArgumentError, "Missing the required parameter 'policy_id' when calling FilevantageApi.get_scheduled_exclusions" + 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 FilevantageApi.get_scheduled_exclusions" + end + # resource path + local_var_path = '/filevantage/entities/policy-scheduled-exclusions/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'policy_id'] = policy_id + 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] || 'ScheduledexclusionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.get_scheduled_exclusions", + :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: FilevantageApi#get_scheduled_exclusions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns 1 or more change ids + # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. It can retrieve an unlimited number of results using multiple requests. + # @param [Hash] opts the optional parameters + # @option opts [String] :after A pagination token used with the `limit` parameter to manage pagination of results. On your first request don't provide a value for the `after` token. On subsequent requests provide the `after` token value from the previous response to continue pagination from where you left. If the response returns an empty `after` token it means there are no more results to return. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `5000`. (default to 100) + # @option opts [String] :sort Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. Defaults to `action_timestamp|desc` no value is specified. The full list of allowed sorting options can be reviewed in our API documentation. (default to 'action_timestamp|desc') + # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. + # @return [ChangesHighVolumeQueryResponse] + def high_volume_query_changes(opts = {}) + data, _status_code, _headers = high_volume_query_changes_with_http_info(opts) + data + end + + # Returns 1 or more change ids + # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. It can retrieve an unlimited number of results using multiple requests. + # @param [Hash] opts the optional parameters + # @option opts [String] :after A pagination token used with the `limit` parameter to manage pagination of results. On your first request don't provide a value for the `after` token. On subsequent requests provide the `after` token value from the previous response to continue pagination from where you left. If the response returns an empty `after` token it means there are no more results to return. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `5000`. (default to 100) + # @option opts [String] :sort Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. Defaults to `action_timestamp|desc` no value is specified. The full list of allowed sorting options can be reviewed in our API documentation. (default to 'action_timestamp|desc') + # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. + # @return [Array<(ChangesHighVolumeQueryResponse, Integer, Hash)>] ChangesHighVolumeQueryResponse data, response status code and response headers + def high_volume_query_changes_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.high_volume_query_changes ...' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FilevantageApi.high_volume_query_changes, must be smaller than or equal to 5000.' + end + + # resource path + local_var_path = '/filevantage/queries/changes/v3' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ChangesHighVolumeQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.high_volume_query_changes", + :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: FilevantageApi#high_volume_query_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Returns 1 or more change ids + # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. Using this endpoint you can retrieve up to `10000` results by using pagination with multiple requests. If you need to retrieve more than `10000` results consider using the `/queries/changes/v3` endpoint + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to `0` if not specified. (default to 0) + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `500`. (default to 100) + # @option opts [String] :sort Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. + # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. + # @return [MsaspecQueryResponse] + def query_changes(opts = {}) + data, _status_code, _headers = query_changes_with_http_info(opts) + data + end + + # Returns 1 or more change ids + # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. Using this endpoint you can retrieve up to `10000` results by using pagination with multiple requests. If you need to retrieve more than `10000` results consider using the `/queries/changes/v3` endpoint + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to `0` if not specified. (default to 0) + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `500`. (default to 100) + # @option opts [String] :sort Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. + # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def query_changes_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.query_changes ...' + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FilevantageApi.query_changes, must be greater than or equal to 0.' + end + + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling FilevantageApi.query_changes, must be smaller than or equal to 500.' + end + + # resource path + local_var_path = '/filevantage/queries/changes/v2' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # 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 => :"FilevantageApi.query_changes", + :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: FilevantageApi#query_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve the ids of all policies that are assigned the provided policy type. + # Policy ids will be returned sorted by a `precedence` order of ascending when a `sort` parameter is not provided. + # @param type [String] The types of policies to retrieve. Allowed values are: `Windows`, `Linux` or `Mac`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to 0 if not specified. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + # @option opts [String] :sort Sort the returned ids based on one of the following properties: `precedence`, `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `precedence|asc`. + # @return [MsaspecQueryResponse] + def query_policies(type, opts = {}) + data, _status_code, _headers = query_policies_with_http_info(type, opts) + data + end + + # Retrieve the ids of all policies that are assigned the provided policy type. + # Policy ids will be returned sorted by a `precedence` order of ascending when a `sort` parameter is not provided. + # @param type [String] The types of policies to retrieve. Allowed values are: `Windows`, `Linux` or `Mac`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to 0 if not specified. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + # @option opts [String] :sort Sort the returned ids based on one of the following properties: `precedence`, `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `precedence|asc`. + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def query_policies_with_http_info(type, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.query_policies ...' + 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 FilevantageApi.query_policies" + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FilevantageApi.query_policies, must be greater than or equal to 0.' + end + + # resource path + local_var_path = '/filevantage/queries/policies/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'type'] = type + 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] || 'MsaspecQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.query_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: FilevantageApi#query_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve the ids of all rule groups that are of the provided rule group type. + # Rule group ids will be returned sorted by `created_timestamp` order if a `sort` parameter is not provided + # @param type [String] The rule group type to retrieve the ids of. Allowed values are: `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to 0 if not specified. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + # @option opts [String] :sort Sort the returned ids based on one of the following properties: `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `created_timestamp|asc`. + # @return [MsaspecQueryResponse] + def query_rule_groups(type, opts = {}) + data, _status_code, _headers = query_rule_groups_with_http_info(type, opts) + data + end + + # Retrieve the ids of all rule groups that are of the provided rule group type. + # Rule group ids will be returned sorted by `created_timestamp` order if a `sort` parameter is not provided + # @param type [String] The rule group type to retrieve the ids of. Allowed values are: `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to 0 if not specified. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + # @option opts [String] :sort Sort the returned ids based on one of the following properties: `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `created_timestamp|asc`. + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def query_rule_groups_with_http_info(type, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.query_rule_groups ...' + 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 FilevantageApi.query_rule_groups" + end + if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 + fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling FilevantageApi.query_rule_groups, must be greater than or equal to 0.' + end + + # resource path + local_var_path = '/filevantage/queries/rule-groups/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'type'] = type + 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] || 'MsaspecQueryResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.query_rule_groups", + :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: FilevantageApi#query_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve the ids of all scheduled exclusions contained within the provided policy id. + # Retrieve the ids of all scheduled exclusions contained within the provided policy id + # @param policy_id [String] The id of the policy from which to retrieve the scheduled exclusion ids. + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + def query_scheduled_exclusions(policy_id, opts = {}) + data, _status_code, _headers = query_scheduled_exclusions_with_http_info(policy_id, opts) + data + end + + # Retrieve the ids of all scheduled exclusions contained within the provided policy id. + # Retrieve the ids of all scheduled exclusions contained within the provided policy id + # @param policy_id [String] The id of the policy from which to retrieve the scheduled exclusion ids. + # @param [Hash] opts the optional parameters + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers + def query_scheduled_exclusions_with_http_info(policy_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.query_scheduled_exclusions ...' + end + # verify the required parameter 'policy_id' is set + if @api_client.config.client_side_validation && policy_id.nil? + fail ArgumentError, "Missing the required parameter 'policy_id' when calling FilevantageApi.query_scheduled_exclusions" + end + # resource path + local_var_path = '/filevantage/queries/policy-scheduled-exclusions/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'policy_id'] = policy_id + + # 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 => :"FilevantageApi.query_scheduled_exclusions", + :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: FilevantageApi#query_scheduled_exclusions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [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(body, opts = {}) + data, _status_code, _headers = update_policies_with_http_info(body, opts) + data + end + + # 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 [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_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.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 FilevantageApi.update_policies" + end + # resource path + local_var_path = '/filevantage/entities/policies/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] || 'PoliciesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.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: FilevantageApi#update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Manage host groups assigned to a policy. + # Manage host groups assigned to a policy. + # @param policy_id [String] The id of the policy for which to perform the action. + # @param action [String] The action to perform with the provided ids, must be one of: `assign` or `unassign`. + # @param ids [Array] One or more host group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [PoliciesResponse] + def update_policy_host_groups(policy_id, action, ids, opts = {}) + data, _status_code, _headers = update_policy_host_groups_with_http_info(policy_id, action, ids, opts) + data + end + + # Manage host groups assigned to a policy. + # Manage host groups assigned to a policy. + # @param policy_id [String] The id of the policy for which to perform the action. + # @param action [String] The action to perform with the provided ids, must be one of: `assign` or `unassign`. + # @param ids [Array] One or more host group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [Array<(PoliciesResponse, Integer, Hash)>] PoliciesResponse data, response status code and response headers + def update_policy_host_groups_with_http_info(policy_id, action, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.update_policy_host_groups ...' + end + # verify the required parameter 'policy_id' is set + if @api_client.config.client_side_validation && policy_id.nil? + fail ArgumentError, "Missing the required parameter 'policy_id' when calling FilevantageApi.update_policy_host_groups" + end + # verify the required parameter 'action' is set + if @api_client.config.client_side_validation && action.nil? + fail ArgumentError, "Missing the required parameter 'action' when calling FilevantageApi.update_policy_host_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 FilevantageApi.update_policy_host_groups" + end + # resource path + local_var_path = '/filevantage/entities/policies-host-groups/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'policy_id'] = policy_id + query_params[:'action'] = action + 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] || 'PoliciesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.update_policy_host_groups", + :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: FilevantageApi#update_policy_host_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 [Array] Precedence of the policies for the provided type in the form of `ids=ID1&ids=ID2` + # @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(ids, type, opts = {}) + data, _status_code, _headers = update_policy_precedence_with_http_info(ids, type, opts) + data + end + + # 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 [Array] Precedence of the policies for the provided type in the form of `ids=ID1&ids=ID2` + # @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_with_http_info(ids, type, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.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 FilevantageApi.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 FilevantageApi.update_policy_precedence" + end + # resource path + local_var_path = '/filevantage/entities/policies-precedence/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ids'] = @api_client.build_collection_param(ids, :multi) + query_params[:'type'] = type + + # 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] || 'PoliciesPrecedenceResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.update_policy_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(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FilevantageApi#update_policy_precedence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. + # Manage the rule groups assigned to the policy. Rule groups must be of the same type as the policy they are being added: * `WindowsRegistry` and `WindowsFiles` groups can only be added to a `Windows` policy. * `LinuxFiles` groups can only be added to a `Linux` policy. * `MacFiles` groups can only be added to a `Mac` policy. When setting rule group precedence, the precedence for `all` rule group ids within the policy must be provided. + # @param policy_id [String] The id of the policy for which to perform the action. + # @param action [String] The action to perform with the provided ids, must be one of: `assign`, `unassign`, or `precedence`. + # @param ids [Array] One or more rule group ids in the form of ids=ID1&ids=ID2. Note, for the precedence action, precedence is controlled by the order of the ids as they are specified in the request. + # @param [Hash] opts the optional parameters + # @return [PoliciesResponse] + def update_policy_rule_groups(policy_id, action, ids, opts = {}) + data, _status_code, _headers = update_policy_rule_groups_with_http_info(policy_id, action, ids, opts) + data + end + + # Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. + # Manage the rule groups assigned to the policy. Rule groups must be of the same type as the policy they are being added: * `WindowsRegistry` and `WindowsFiles` groups can only be added to a `Windows` policy. * `LinuxFiles` groups can only be added to a `Linux` policy. * `MacFiles` groups can only be added to a `Mac` policy. When setting rule group precedence, the precedence for `all` rule group ids within the policy must be provided. + # @param policy_id [String] The id of the policy for which to perform the action. + # @param action [String] The action to perform with the provided ids, must be one of: `assign`, `unassign`, or `precedence`. + # @param ids [Array] One or more rule group ids in the form of ids=ID1&ids=ID2. Note, for the precedence action, precedence is controlled by the order of the ids as they are specified in the request. + # @param [Hash] opts the optional parameters + # @return [Array<(PoliciesResponse, Integer, Hash)>] PoliciesResponse data, response status code and response headers + def update_policy_rule_groups_with_http_info(policy_id, action, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.update_policy_rule_groups ...' + end + # verify the required parameter 'policy_id' is set + if @api_client.config.client_side_validation && policy_id.nil? + fail ArgumentError, "Missing the required parameter 'policy_id' when calling FilevantageApi.update_policy_rule_groups" + end + # verify the required parameter 'action' is set + if @api_client.config.client_side_validation && action.nil? + fail ArgumentError, "Missing the required parameter 'action' when calling FilevantageApi.update_policy_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 FilevantageApi.update_policy_rule_groups" + end + # resource path + local_var_path = '/filevantage/entities/policies-rule-groups/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'policy_id'] = policy_id + query_params[:'action'] = action + 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] || 'PoliciesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.update_policy_rule_groups", + :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: FilevantageApi#update_policy_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates the rule precedence for all rules in the identified rule group. + # The ids for `all` rules contained within the rule group must be specified in the desired precedence order. Requests that do not represent all ids will not be processed. + # @param rule_group_id [String] Rule group from which to set the precedence. + # @param ids [Array] One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + def update_rule_group_precedence(rule_group_id, ids, opts = {}) + data, _status_code, _headers = update_rule_group_precedence_with_http_info(rule_group_id, ids, opts) + data + end + + # Updates the rule precedence for all rules in the identified rule group. + # The ids for `all` rules contained within the rule group must be specified in the desired precedence order. Requests that do not represent all ids will not be processed. + # @param rule_group_id [String] Rule group from which to set the precedence. + # @param ids [Array] One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsResponse, Integer, Hash)>] RulegroupsResponse data, response status code and response headers + def update_rule_group_precedence_with_http_info(rule_group_id, ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.update_rule_group_precedence ...' + 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 FilevantageApi.update_rule_group_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 FilevantageApi.update_rule_group_precedence" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups-rule-precedence/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'rule_group_id'] = rule_group_id + 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] || 'RulegroupsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.update_rule_group_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(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: FilevantageApi#update_rule_group_precedence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates the provided rule group. + # Provides the ability to update the name and description of the rule group. + # @param body [RulegroupsUpdateRequest] Enables updates to the following fields for an existing rule group. * `id` of the rule group to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `type` may not be modified after the rule group is created. Note: rules are added/removed from rule groups using their dedicated end-points. + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + def update_rule_groups(body, opts = {}) + data, _status_code, _headers = update_rule_groups_with_http_info(body, opts) + data + end + + # Updates the provided rule group. + # Provides the ability to update the name and description of the rule group. + # @param body [RulegroupsUpdateRequest] Enables updates to the following fields for an existing rule group. * `id` of the rule group to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `type` may not be modified after the rule group is created. Note: rules are added/removed from rule groups using their dedicated end-points. + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsResponse, Integer, Hash)>] RulegroupsResponse data, response status code and response headers + def update_rule_groups_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.update_rule_groups ...' + 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 FilevantageApi.update_rule_groups" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups/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] || 'RulegroupsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.update_rule_groups", + :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: FilevantageApi#update_rule_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates the provided rule configuration within the specified rule group. + # The rule must currently exist within the specified rule group. + # @param body [RulegroupsRule] Update the rule configuration for the specified rule ID and group. * `id` of the rule to update. * `rule_group_id` that contains the rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` is the order in which rules will be evaluated starting with 1. Specifying a precedence value that is already set for another rule in the group will result this rule being placed before that existing rule. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files that will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + # @param [Hash] opts the optional parameters + # @return [RulegroupsRulesResponse] + def update_rules(body, opts = {}) + data, _status_code, _headers = update_rules_with_http_info(body, opts) + data + end + + # Updates the provided rule configuration within the specified rule group. + # The rule must currently exist within the specified rule group. + # @param body [RulegroupsRule] Update the rule configuration for the specified rule ID and group. * `id` of the rule to update. * `rule_group_id` that contains the rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` is the order in which rules will be evaluated starting with 1. Specifying a precedence value that is already set for another rule in the group will result this rule being placed before that existing rule. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files that will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + # @param [Hash] opts the optional parameters + # @return [Array<(RulegroupsRulesResponse, Integer, Hash)>] RulegroupsRulesResponse data, response status code and response headers + def update_rules_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.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 FilevantageApi.update_rules" + end + # resource path + local_var_path = '/filevantage/entities/rule-groups-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] || 'RulegroupsRulesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.update_rules", + :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: FilevantageApi#update_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates the provided scheduled exclusion configuration within the provided policy. + # Updates the provided scheduled exclusion configuration within the provided policy. + # @param body [ScheduledexclusionsUpdateRequest] Update an existing scheduled exclusion for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + # @param [Hash] opts the optional parameters + # @return [ScheduledexclusionsResponse] + def update_scheduled_exclusions(body, opts = {}) + data, _status_code, _headers = update_scheduled_exclusions_with_http_info(body, opts) + data + end + + # Updates the provided scheduled exclusion configuration within the provided policy. + # Updates the provided scheduled exclusion configuration within the provided policy. + # @param body [ScheduledexclusionsUpdateRequest] Update an existing scheduled exclusion for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + # @param [Hash] opts the optional parameters + # @return [Array<(ScheduledexclusionsResponse, Integer, Hash)>] ScheduledexclusionsResponse data, response status code and response headers + def update_scheduled_exclusions_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FilevantageApi.update_scheduled_exclusions ...' + 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 FilevantageApi.update_scheduled_exclusions" + end + # resource path + local_var_path = '/filevantage/entities/policy-scheduled-exclusions/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] || 'ScheduledexclusionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FilevantageApi.update_scheduled_exclusions", + :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: FilevantageApi#update_scheduled_exclusions\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_api.rb b/lib/crimson-falcon/api/foundry_logscale_api.rb new file mode 100644 index 00000000..531adbc8 --- /dev/null +++ b/lib/crimson-falcon/api/foundry_logscale_api.rb @@ -0,0 +1,959 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 FoundryLogscaleApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Execute a dynamic saved search + # @param body [ApidomainDynamicExecuteSearchRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :include_schema_generation Include generated schemas in the response (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :mode Mode to execute the query under. + # @return [ApidomainQueryResponseWrapperV1] + def create_saved_searches_dynamic_execute_alt_v1(body, opts = {}) + data, _status_code, _headers = create_saved_searches_dynamic_execute_alt_v1_with_http_info(body, opts) + data + end + + # Execute a dynamic saved search + # @param body [ApidomainDynamicExecuteSearchRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :include_schema_generation Include generated schemas in the response (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :mode Mode to execute the query under. + # @return [Array<(ApidomainQueryResponseWrapperV1, Integer, Hash)>] ApidomainQueryResponseWrapperV1 data, response status code and response headers + def create_saved_searches_dynamic_execute_alt_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.create_saved_searches_dynamic_execute_alt_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 FoundryLogscaleApi.create_saved_searches_dynamic_execute_alt_v1" + end + allowable_values = ["sync", "async"] + 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 + # resource path + local_var_path = '/loggingapi/entities/saved-searches-dynamic-execute/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'include_schema_generation'] = opts[:'include_schema_generation'] if !opts[:'include_schema_generation'].nil? + query_params[:'include_test_data'] = opts[:'include_test_data'] if !opts[:'include_test_data'].nil? + query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil? + query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].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 + + # 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] || 'ApidomainQueryResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.create_saved_searches_dynamic_execute_alt_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: FoundryLogscaleApi#create_saved_searches_dynamic_execute_alt_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Execute a dynamic saved search + # @param body [ApidomainDynamicExecuteSearchRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :include_schema_generation Include generated schemas in the response (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :mode Mode to execute the query under. + # @return [ApidomainQueryResponseWrapperV1] + def create_saved_searches_dynamic_execute_v1(body, opts = {}) + data, _status_code, _headers = create_saved_searches_dynamic_execute_v1_with_http_info(body, opts) + data + end + + # Execute a dynamic saved search + # @param body [ApidomainDynamicExecuteSearchRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :include_schema_generation Include generated schemas in the response (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :mode Mode to execute the query under. + # @return [Array<(ApidomainQueryResponseWrapperV1, Integer, Hash)>] ApidomainQueryResponseWrapperV1 data, response status code and response headers + def create_saved_searches_dynamic_execute_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.create_saved_searches_dynamic_execute_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 FoundryLogscaleApi.create_saved_searches_dynamic_execute_v1" + end + allowable_values = ["sync", "async"] + 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 + # resource path + local_var_path = '/loggingapi/entities/saved-searches/execute-dynamic/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'include_schema_generation'] = opts[:'include_schema_generation'] if !opts[:'include_schema_generation'].nil? + query_params[:'include_test_data'] = opts[:'include_test_data'] if !opts[:'include_test_data'].nil? + query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil? + query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].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 + + # 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] || 'ApidomainQueryResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.create_saved_searches_dynamic_execute_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: FoundryLogscaleApi#create_saved_searches_dynamic_execute_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Execute a saved search + # @param body [ApidomainSavedSearchExecuteRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :detailed Whether to include search field details (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @return [ApidomainQueryResponseWrapperV1] + def create_saved_searches_execute_alt_v1(body, opts = {}) + data, _status_code, _headers = create_saved_searches_execute_alt_v1_with_http_info(body, opts) + data + end + + # Execute a saved search + # @param body [ApidomainSavedSearchExecuteRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :detailed Whether to include search field details (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @return [Array<(ApidomainQueryResponseWrapperV1, Integer, Hash)>] ApidomainQueryResponseWrapperV1 data, response status code and response headers + def create_saved_searches_execute_alt_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.create_saved_searches_execute_alt_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 FoundryLogscaleApi.create_saved_searches_execute_alt_v1" + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches-execute/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'detailed'] = opts[:'detailed'] if !opts[:'detailed'].nil? + query_params[:'include_test_data'] = opts[:'include_test_data'] if !opts[:'include_test_data'].nil? + query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].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 + + # 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] || 'ApidomainQueryResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.create_saved_searches_execute_alt_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: FoundryLogscaleApi#create_saved_searches_execute_alt_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Execute a saved search + # @param body [ApidomainSavedSearchExecuteRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :detailed Whether to include search field details (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @return [ApidomainQueryResponseWrapperV1] + def create_saved_searches_execute_v1(body, opts = {}) + data, _status_code, _headers = create_saved_searches_execute_v1_with_http_info(body, opts) + data + end + + # Execute a saved search + # @param body [ApidomainSavedSearchExecuteRequestV1] + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :detailed Whether to include search field details (default to false) + # @option opts [Boolean] :include_test_data Include test data when executing searches (default to false) + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @return [Array<(ApidomainQueryResponseWrapperV1, Integer, Hash)>] ApidomainQueryResponseWrapperV1 data, response status code and response headers + def create_saved_searches_execute_v1_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.create_saved_searches_execute_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 FoundryLogscaleApi.create_saved_searches_execute_v1" + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches/execute/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'detailed'] = opts[:'detailed'] if !opts[:'detailed'].nil? + query_params[:'include_test_data'] = opts[:'include_test_data'] if !opts[:'include_test_data'].nil? + query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].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 + + # 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] || 'ApidomainQueryResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.create_saved_searches_execute_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: FoundryLogscaleApi#create_saved_searches_execute_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Populate a saved search + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @return [ClientDataIngestResponseWrapperV1] + def create_saved_searches_ingest_alt_v1(opts = {}) + data, _status_code, _headers = create_saved_searches_ingest_alt_v1_with_http_info(opts) + data + end + + # Populate a saved search + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @return [Array<(ClientDataIngestResponseWrapperV1, Integer, Hash)>] ClientDataIngestResponseWrapperV1 data, response status code and response headers + def create_saved_searches_ingest_alt_v1_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.create_saved_searches_ingest_alt_v1 ...' + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches-ingest/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].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] || 'ClientDataIngestResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.create_saved_searches_ingest_alt_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: FoundryLogscaleApi#create_saved_searches_ingest_alt_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Populate a saved search + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @return [ClientDataIngestResponseWrapperV1] + def create_saved_searches_ingest_v1(opts = {}) + data, _status_code, _headers = create_saved_searches_ingest_v1_with_http_info(opts) + data + end + + # Populate a saved search + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @return [Array<(ClientDataIngestResponseWrapperV1, Integer, Hash)>] ClientDataIngestResponseWrapperV1 data, response status code and response headers + def create_saved_searches_ingest_v1_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.create_saved_searches_ingest_v1 ...' + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches/ingest/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].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] || 'ClientDataIngestResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.create_saved_searches_ingest_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: FoundryLogscaleApi#create_saved_searches_ingest_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the results of a saved search + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [String] :limit Maximum number of records to return. + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :offset Starting pagination offset of records to return. + # @return [ApidomainQueryResponseWrapperV1] + def get_saved_searches_execute_alt_v1(job_id, opts = {}) + data, _status_code, _headers = get_saved_searches_execute_alt_v1_with_http_info(job_id, opts) + data + end + + # Get the results of a saved search + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [String] :limit Maximum number of records to return. + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :offset Starting pagination offset of records to return. + # @return [Array<(ApidomainQueryResponseWrapperV1, Integer, Hash)>] ApidomainQueryResponseWrapperV1 data, response status code and response headers + def get_saved_searches_execute_alt_v1_with_http_info(job_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.get_saved_searches_execute_alt_v1 ...' + end + # verify the required parameter 'job_id' is set + if @api_client.config.client_side_validation && job_id.nil? + fail ArgumentError, "Missing the required parameter 'job_id' when calling FoundryLogscaleApi.get_saved_searches_execute_alt_v1" + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches-execute/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'job_id'] = job_id + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].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] || 'ApidomainQueryResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.get_saved_searches_execute_alt_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: FoundryLogscaleApi#get_saved_searches_execute_alt_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the results of a saved search + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [String] :limit Maximum number of records to return. + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :offset Starting pagination offset of records to return. + # @return [ApidomainQueryResponseWrapperV1] + def get_saved_searches_execute_v1(job_id, opts = {}) + data, _status_code, _headers = get_saved_searches_execute_v1_with_http_info(job_id, opts) + data + end + + # Get the results of a saved search + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [String] :limit Maximum number of records to return. + # @option opts [Boolean] :metadata Whether to include metadata in the response (default to false) + # @option opts [String] :offset Starting pagination offset of records to return. + # @return [Array<(ApidomainQueryResponseWrapperV1, Integer, Hash)>] ApidomainQueryResponseWrapperV1 data, response status code and response headers + def get_saved_searches_execute_v1_with_http_info(job_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.get_saved_searches_execute_v1 ...' + end + # verify the required parameter 'job_id' is set + if @api_client.config.client_side_validation && job_id.nil? + fail ArgumentError, "Missing the required parameter 'job_id' when calling FoundryLogscaleApi.get_saved_searches_execute_v1" + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches/execute/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'job_id'] = job_id + query_params[:'app_id'] = opts[:'app_id'] if !opts[:'app_id'].nil? + query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? + query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].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] || 'ApidomainQueryResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.get_saved_searches_execute_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: FoundryLogscaleApi#get_saved_searches_execute_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the results of a saved search as a file + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :result_format Result Format + # @return [File] + def get_saved_searches_job_results_download_alt_v1(job_id, opts = {}) + data, _status_code, _headers = get_saved_searches_job_results_download_alt_v1_with_http_info(job_id, opts) + data + end + + # Get the results of a saved search as a file + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :result_format Result Format + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def get_saved_searches_job_results_download_alt_v1_with_http_info(job_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.get_saved_searches_job_results_download_alt_v1 ...' + end + # verify the required parameter 'job_id' is set + if @api_client.config.client_side_validation && job_id.nil? + fail ArgumentError, "Missing the required parameter 'job_id' when calling FoundryLogscaleApi.get_saved_searches_job_results_download_alt_v1" + end + allowable_values = ["json", "csv"] + if @api_client.config.client_side_validation && opts[:'result_format'] && !allowable_values.include?(opts[:'result_format']) + fail ArgumentError, "invalid value for \"result_format\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches-job-results-download/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'job_id'] = job_id + query_params[:'result_format'] = opts[:'result_format'] if !opts[:'result_format'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['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] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.get_saved_searches_job_results_download_alt_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: FoundryLogscaleApi#get_saved_searches_job_results_download_alt_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the results of a saved search as a file + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :result_format Result Format + # @return [File] + def get_saved_searches_job_results_download_v1(job_id, opts = {}) + data, _status_code, _headers = get_saved_searches_job_results_download_v1_with_http_info(job_id, opts) + data + end + + # Get the results of a saved search as a file + # @param job_id [String] Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :result_format Result Format + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def get_saved_searches_job_results_download_v1_with_http_info(job_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.get_saved_searches_job_results_download_v1 ...' + end + # verify the required parameter 'job_id' is set + if @api_client.config.client_side_validation && job_id.nil? + fail ArgumentError, "Missing the required parameter 'job_id' when calling FoundryLogscaleApi.get_saved_searches_job_results_download_v1" + end + allowable_values = ["json", "csv"] + if @api_client.config.client_side_validation && opts[:'result_format'] && !allowable_values.include?(opts[:'result_format']) + fail ArgumentError, "invalid value for \"result_format\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/loggingapi/entities/saved-searches/job-results-download/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'job_id'] = job_id + query_params[:'result_format'] = opts[:'result_format'] if !opts[:'result_format'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['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] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.get_saved_searches_job_results_download_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: FoundryLogscaleApi#get_saved_searches_job_results_download_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Ingest data into the application repository + # @param data_file [File] Data file to ingest + # @param [Hash] opts the optional parameters + # @option opts [Array] :tag Custom tag for ingested data in the form tag:value + # @option opts [String] :tag_source Tag the data with the specified source + # @option opts [Boolean] :test_data Tag the data with test-ingest (default to false) + # @return [ClientDataIngestResponseWrapperV1] + def ingest_data_v1(data_file, opts = {}) + data, _status_code, _headers = ingest_data_v1_with_http_info(data_file, opts) + data + end + + # Ingest data into the application repository + # @param data_file [File] Data file to ingest + # @param [Hash] opts the optional parameters + # @option opts [Array] :tag Custom tag for ingested data in the form tag:value + # @option opts [String] :tag_source Tag the data with the specified source + # @option opts [Boolean] :test_data Tag the data with test-ingest (default to false) + # @return [Array<(ClientDataIngestResponseWrapperV1, Integer, Hash)>] ClientDataIngestResponseWrapperV1 data, response status code and response headers + def ingest_data_v1_with_http_info(data_file, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.ingest_data_v1 ...' + end + # verify the required parameter 'data_file' is set + if @api_client.config.client_side_validation && data_file.nil? + fail ArgumentError, "Missing the required parameter 'data_file' when calling FoundryLogscaleApi.ingest_data_v1" + end + # resource path + local_var_path = '/loggingapi/entities/data-ingestion/ingest/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['data_file'] = data_file + form_params['tag'] = @api_client.build_collection_param(opts[:'tag'], :csv) if !opts[:'tag'].nil? + form_params['tag_source'] = opts[:'tag_source'] if !opts[:'tag_source'].nil? + form_params['test_data'] = opts[:'test_data'] if !opts[:'test_data'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ClientDataIngestResponseWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.ingest_data_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: FoundryLogscaleApi#ingest_data_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Lists available repositories and views + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :check_test_data Include whether test data is present in the application repository (default to false) + # @return [ApidomainRepoViewListItemWrapperV1] + def list_repos_v1(opts = {}) + data, _status_code, _headers = list_repos_v1_with_http_info(opts) + data + end + + # Lists available repositories and views + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :check_test_data Include whether test data is present in the application repository (default to false) + # @return [Array<(ApidomainRepoViewListItemWrapperV1, Integer, Hash)>] ApidomainRepoViewListItemWrapperV1 data, response status code and response headers + def list_repos_v1_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.list_repos_v1 ...' + end + # resource path + local_var_path = '/loggingapi/combined/repos/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'check_test_data'] = opts[:'check_test_data'] if !opts[:'check_test_data'].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] || 'ApidomainRepoViewListItemWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.list_repos_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: FoundryLogscaleApi#list_repos_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List views + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :check_test_data Include whether test data is present in the application repository (default to false) + # @return [ApidomainRepoViewListItemWrapperV1] + def list_view_v1(opts = {}) + data, _status_code, _headers = list_view_v1_with_http_info(opts) + data + end + + # List views + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :check_test_data Include whether test data is present in the application repository (default to false) + # @return [Array<(ApidomainRepoViewListItemWrapperV1, Integer, Hash)>] ApidomainRepoViewListItemWrapperV1 data, response status code and response headers + def list_view_v1_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: FoundryLogscaleApi.list_view_v1 ...' + end + # resource path + local_var_path = '/loggingapi/entities/views/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'check_test_data'] = opts[:'check_test_data'] if !opts[:'check_test_data'].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] || 'ApidomainRepoViewListItemWrapperV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"FoundryLogscaleApi.list_view_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: FoundryLogscaleApi#list_view_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/hosts_api.rb b/lib/crimson-falcon/api/hosts_api.rb index 0af43ac6..7c4128ef 100644 --- a/lib/crimson-falcon/api/hosts_api.rb +++ b/lib/crimson-falcon/api/hosts_api.rb @@ -36,7 +36,7 @@ class HostsApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Performs the specified action on the provided prevention policy IDs. + # Performs the specified action on the provided group IDs. # @param ids [Array] The group ids to act on # @param action_name [String] The action to perform. # @param body [MsaEntityActionRequest] @@ -48,7 +48,7 @@ def entities_perform_action(ids, action_name, body, opts = {}) data end - # Performs the specified action on the provided prevention policy IDs. + # Performs the specified action on the provided group IDs. # @param ids [Array] The group ids to act on # @param action_name [String] The action to perform. # @param body [MsaEntityActionRequest] @@ -124,68 +124,6 @@ def entities_perform_action_with_http_info(ids, action_name, body, opts = {}) return data, status_code, headers end - # Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API - # @param ids [Array] The host agentIDs used to get details on - # @param [Hash] opts the optional parameters - # @return [DeviceapiDeviceDetailsResponseSwagger] - def get_device_details(ids, opts = {}) - data, _status_code, _headers = get_device_details_with_http_info(ids, opts) - data - end - - # Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API - # @param ids [Array] The host agentIDs used to get details on - # @param [Hash] opts the optional parameters - # @return [Array<(DeviceapiDeviceDetailsResponseSwagger, Integer, Hash)>] DeviceapiDeviceDetailsResponseSwagger data, response status code and response headers - def get_device_details_with_http_info(ids, opts = {}) - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: HostsApi.get_device_details ...' - 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 HostsApi.get_device_details" - end - # resource path - local_var_path = '/devices/entities/devices/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] || 'DeviceapiDeviceDetailsResponseSwagger' - - # auth_names - auth_names = opts[:debug_auth_names] || ['oauth2'] - - new_options = opts.merge( - :operation => :"HostsApi.get_device_details", - :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: HostsApi#get_device_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # Get details on one or more hosts by providing host IDs as a query parameter. Supports up to a maximum 100 IDs. # @param ids [Array] The host agentIDs used to get details on # @param [Hash] opts the optional parameters @@ -519,6 +457,72 @@ def query_device_login_history_with_http_info(body, opts = {}) return data, status_code, headers end + # Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified + # @param body [MsaIdsRequest] + # @param [Hash] opts the optional parameters + # @return [DeviceapiLoginHistoryResponseV1] + def query_device_login_history_v2(body, opts = {}) + data, _status_code, _headers = query_device_login_history_v2_with_http_info(body, opts) + data + end + + # Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified + # @param body [MsaIdsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DeviceapiLoginHistoryResponseV1, Integer, Hash)>] DeviceapiLoginHistoryResponseV1 data, response status code and response headers + def query_device_login_history_v2_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: HostsApi.query_device_login_history_v2 ...' + 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 HostsApi.query_device_login_history_v2" + end + # resource path + local_var_path = '/devices/combined/devices/login-history/v2' + + # 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] || 'DeviceapiLoginHistoryResponseV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"HostsApi.query_device_login_history_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(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: HostsApi#query_device_login_history_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Search for hosts in your environment by platform, hostname, IP, and other criteria. # @param [Hash] opts the optional parameters # @option opts [Integer] :offset The offset to start retrieving records from diff --git a/lib/crimson-falcon/api/image_assessment_policies_api.rb b/lib/crimson-falcon/api/image_assessment_policies_api.rb new file mode 100644 index 00000000..93b451f2 --- /dev/null +++ b/lib/crimson-falcon/api/image_assessment_policies_api.rb @@ -0,0 +1,738 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ImageAssessmentPoliciesApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Create Image Assessment policies + # @param body [ModelsCreatePolicyRequest] + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + def create_policies(body, opts = {}) + data, _status_code, _headers = create_policies_with_http_info(body, opts) + data + end + + # Create Image Assessment policies + # @param body [ModelsCreatePolicyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyEntityResponse, Integer, Hash)>] ModelsPolicyEntityResponse data, response status code and response headers + def create_policies_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.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 ImageAssessmentPoliciesApi.create_policies" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policies/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] || 'ModelsPolicyEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.create_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: ImageAssessmentPoliciesApi#create_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create Image Assessment Policy Group entities + # @param body [ModelsCreateImageGroupRequest] + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyGroupEntityResponse] + def create_policy_groups(body, opts = {}) + data, _status_code, _headers = create_policy_groups_with_http_info(body, opts) + data + end + + # Create Image Assessment Policy Group entities + # @param body [ModelsCreateImageGroupRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyGroupEntityResponse, Integer, Hash)>] ModelsPolicyGroupEntityResponse data, response status code and response headers + def create_policy_groups_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.create_policy_groups ...' + 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 ImageAssessmentPoliciesApi.create_policy_groups" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policy-groups/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] || 'ModelsPolicyGroupEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.create_policy_groups", + :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: ImageAssessmentPoliciesApi#create_policy_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete Image Assessment Policy by policy UUID + # @param id [String] Image Assessment Policy entity UUID + # @param [Hash] opts the optional parameters + # @return [CoreEntitiesResponse] + def delete_policy(id, opts = {}) + data, _status_code, _headers = delete_policy_with_http_info(id, opts) + data + end + + # Delete Image Assessment Policy by policy UUID + # @param id [String] Image Assessment Policy entity UUID + # @param [Hash] opts the optional parameters + # @return [Array<(CoreEntitiesResponse, Integer, Hash)>] CoreEntitiesResponse data, response status code and response headers + def delete_policy_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.delete_policy ...' + 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 ImageAssessmentPoliciesApi.delete_policy" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policies/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = id + + # 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] || 'CoreEntitiesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.delete_policy", + :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: ImageAssessmentPoliciesApi#delete_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete Image Assessment Policy Group entities + # @param id [String] Policy Image Group entity UUID + # @param [Hash] opts the optional parameters + # @return [CoreEntitiesResponse] + def delete_policy_group(id, opts = {}) + data, _status_code, _headers = delete_policy_group_with_http_info(id, opts) + data + end + + # Delete Image Assessment Policy Group entities + # @param id [String] Policy Image Group entity UUID + # @param [Hash] opts the optional parameters + # @return [Array<(CoreEntitiesResponse, Integer, Hash)>] CoreEntitiesResponse data, response status code and response headers + def delete_policy_group_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.delete_policy_group ...' + 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 ImageAssessmentPoliciesApi.delete_policy_group" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policy-groups/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = id + + # 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] || 'CoreEntitiesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.delete_policy_group", + :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: ImageAssessmentPoliciesApi#delete_policy_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all Image Assessment policies + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + def read_policies(opts = {}) + data, _status_code, _headers = read_policies_with_http_info(opts) + data + end + + # Get all Image Assessment policies + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyEntityResponse, Integer, Hash)>] ModelsPolicyEntityResponse data, response status code and response headers + def read_policies_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.read_policies ...' + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policies/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelsPolicyEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.read_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: ImageAssessmentPoliciesApi#read_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve Image Assessment Policy Exclusion entities + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyExclusionEntityResponse] + def read_policy_exclusions(opts = {}) + data, _status_code, _headers = read_policy_exclusions_with_http_info(opts) + data + end + + # Retrieve Image Assessment Policy Exclusion entities + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyExclusionEntityResponse, Integer, Hash)>] ModelsPolicyExclusionEntityResponse data, response status code and response headers + def read_policy_exclusions_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.read_policy_exclusions ...' + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policy-exclusions/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelsPolicyExclusionEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.read_policy_exclusions", + :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: ImageAssessmentPoliciesApi#read_policy_exclusions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve Image Assessment Policy Group entities + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyGroupEntityResponse] + def read_policy_groups(opts = {}) + data, _status_code, _headers = read_policy_groups_with_http_info(opts) + data + end + + # Retrieve Image Assessment Policy Group entities + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyGroupEntityResponse, Integer, Hash)>] ModelsPolicyGroupEntityResponse data, response status code and response headers + def read_policy_groups_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.read_policy_groups ...' + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policy-groups/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelsPolicyGroupEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.read_policy_groups", + :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: ImageAssessmentPoliciesApi#read_policy_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Image Assessment Policy entities + # @param id [String] Image Assessment Policy entity UUID + # @param body [ModelsPatchPolicyRequest] + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + def update_policies(id, body, opts = {}) + data, _status_code, _headers = update_policies_with_http_info(id, body, opts) + data + end + + # Update Image Assessment Policy entities + # @param id [String] Image Assessment Policy entity UUID + # @param body [ModelsPatchPolicyRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyEntityResponse, Integer, Hash)>] ModelsPolicyEntityResponse data, response status code and response headers + def update_policies_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.update_policies ...' + 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 ImageAssessmentPoliciesApi.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 ImageAssessmentPoliciesApi.update_policies" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policies/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = id + + # 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] || 'ModelsPolicyEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.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: ImageAssessmentPoliciesApi#update_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Image Assessment Policy Exclusion entities + # @param body [ModelsUpdateExclusionsRequest] + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyExclusionEntityResponse] + def update_policy_exclusions(body, opts = {}) + data, _status_code, _headers = update_policy_exclusions_with_http_info(body, opts) + data + end + + # Update Image Assessment Policy Exclusion entities + # @param body [ModelsUpdateExclusionsRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyExclusionEntityResponse, Integer, Hash)>] ModelsPolicyExclusionEntityResponse data, response status code and response headers + def update_policy_exclusions_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.update_policy_exclusions ...' + 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 ImageAssessmentPoliciesApi.update_policy_exclusions" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policy-exclusions/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] || 'ModelsPolicyExclusionEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.update_policy_exclusions", + :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: ImageAssessmentPoliciesApi#update_policy_exclusions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Image Assessment Policy Group entities + # @param id [String] Policy Image Group entity UUID + # @param body [ModelsPatchImageGroupRequest] + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyGroupEntityResponse] + def update_policy_groups(id, body, opts = {}) + data, _status_code, _headers = update_policy_groups_with_http_info(id, body, opts) + data + end + + # Update Image Assessment Policy Group entities + # @param id [String] Policy Image Group entity UUID + # @param body [ModelsPatchImageGroupRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyGroupEntityResponse, Integer, Hash)>] ModelsPolicyGroupEntityResponse data, response status code and response headers + def update_policy_groups_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.update_policy_groups ...' + 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 ImageAssessmentPoliciesApi.update_policy_groups" + 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 ImageAssessmentPoliciesApi.update_policy_groups" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policy-groups/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = id + + # 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] || 'ModelsPolicyGroupEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.update_policy_groups", + :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: ImageAssessmentPoliciesApi#update_policy_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update Image Assessment Policy precedence + # @param body [ModelsAPIPrecedenceRequest] + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + def update_policy_precedence(body, opts = {}) + data, _status_code, _headers = update_policy_precedence_with_http_info(body, opts) + data + end + + # Update Image Assessment Policy precedence + # @param body [ModelsAPIPrecedenceRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsPolicyEntityResponse, Integer, Hash)>] ModelsPolicyEntityResponse data, response status code and response headers + def update_policy_precedence_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ImageAssessmentPoliciesApi.update_policy_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 ImageAssessmentPoliciesApi.update_policy_precedence" + end + # resource path + local_var_path = '/container-security/entities/image-assessment-policy-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] || 'ModelsPolicyEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"ImageAssessmentPoliciesApi.update_policy_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: ImageAssessmentPoliciesApi#update_policy_precedence\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/installation_tokens_api.rb b/lib/crimson-falcon/api/installation_tokens_api.rb index 58596e20..b05d3006 100644 --- a/lib/crimson-falcon/api/installation_tokens_api.rb +++ b/lib/crimson-falcon/api/installation_tokens_api.rb @@ -42,7 +42,7 @@ def initialize(api_client = ApiClient.default) # @option opts [Integer] :limit The maximum records to return. [1-1000]. Defaults to 50. # @option opts [String] :sort The property to sort by (e.g. timestamp.desc). # @option opts [String] :filter The filter expression that should be used to limit the results (e.g., `action:'token_create'`). - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def audit_events_query(opts = {}) data, _status_code, _headers = audit_events_query_with_http_info(opts) data @@ -54,7 +54,7 @@ def audit_events_query(opts = {}) # @option opts [Integer] :limit The maximum records to return. [1-1000]. Defaults to 50. # @option opts [String] :sort The property to sort by (e.g. timestamp.desc). # @option opts [String] :filter The filter expression that should be used to limit the results (e.g., `action:'token_create'`). - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def audit_events_query_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstallationTokensApi.audit_events_query ...' @@ -81,7 +81,7 @@ def audit_events_query_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -285,7 +285,7 @@ def tokens_create_with_http_info(body, opts = {}) # Deletes a token immediately. To revoke a token, use PATCH /installation-tokens/entities/tokens/v1 instead. # @param ids [Array] The token ids to delete. # @param [Hash] opts the optional parameters - # @return [MsaReplyMetaOnly] + # @return [MsaspecResponseFields] def tokens_delete(ids, opts = {}) data, _status_code, _headers = tokens_delete_with_http_info(ids, opts) data @@ -294,7 +294,7 @@ def tokens_delete(ids, opts = {}) # Deletes a token immediately. To revoke a token, use PATCH /installation-tokens/entities/tokens/v1 instead. # @param ids [Array] The token ids to delete. # @param [Hash] opts the optional parameters - # @return [Array<(MsaReplyMetaOnly, Integer, Hash)>] MsaReplyMetaOnly data, response status code and response headers + # @return [Array<(MsaspecResponseFields, Integer, Hash)>] MsaspecResponseFields data, response status code and response headers def tokens_delete_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstallationTokensApi.tokens_delete ...' @@ -322,7 +322,7 @@ def tokens_delete_with_http_info(ids, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaReplyMetaOnly' + return_type = opts[:debug_return_type] || 'MsaspecResponseFields' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -350,7 +350,7 @@ def tokens_delete_with_http_info(ids, opts = {}) # @option opts [Integer] :limit The maximum records to return. [1-1000]. Defaults to 50. # @option opts [String] :sort The property to sort by (e.g. created_timestamp.desc). # @option opts [String] :filter The filter expression that should be used to limit the results (e.g., `status:'valid'`). - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def tokens_query(opts = {}) data, _status_code, _headers = tokens_query_with_http_info(opts) data @@ -362,7 +362,7 @@ def tokens_query(opts = {}) # @option opts [Integer] :limit The maximum records to return. [1-1000]. Defaults to 50. # @option opts [String] :sort The property to sort by (e.g. created_timestamp.desc). # @option opts [String] :filter The filter expression that should be used to limit the results (e.g., `status:'valid'`). - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def tokens_query_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstallationTokensApi.tokens_query ...' @@ -389,7 +389,7 @@ def tokens_query_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -473,7 +473,7 @@ def tokens_read_with_http_info(opts = {}) # @param ids [Array] The token ids to update. # @param body [ApiTokenPatchRequestV1] # @param [Hash] opts the optional parameters - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def tokens_update(ids, body, opts = {}) data, _status_code, _headers = tokens_update_with_http_info(ids, body, opts) data @@ -483,7 +483,7 @@ def tokens_update(ids, body, opts = {}) # @param ids [Array] The token ids to update. # @param body [ApiTokenPatchRequestV1] # @param [Hash] opts the optional parameters - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def tokens_update_with_http_info(ids, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstallationTokensApi.tokens_update ...' @@ -520,7 +520,7 @@ def tokens_update_with_http_info(ids, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] diff --git a/lib/crimson-falcon/api/installation_tokens_settings_api.rb b/lib/crimson-falcon/api/installation_tokens_settings_api.rb index 81552b49..0a6231f5 100644 --- a/lib/crimson-falcon/api/installation_tokens_settings_api.rb +++ b/lib/crimson-falcon/api/installation_tokens_settings_api.rb @@ -39,7 +39,7 @@ def initialize(api_client = ApiClient.default) # Update installation token settings. # @param body [ApiCustomerSettingsPatchRequestV1] # @param [Hash] opts the optional parameters - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def customer_settings_update(body, opts = {}) data, _status_code, _headers = customer_settings_update_with_http_info(body, opts) data @@ -48,7 +48,7 @@ def customer_settings_update(body, opts = {}) # Update installation token settings. # @param body [ApiCustomerSettingsPatchRequestV1] # @param [Hash] opts the optional parameters - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def customer_settings_update_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InstallationTokensSettingsApi.customer_settings_update ...' @@ -80,7 +80,7 @@ def customer_settings_update_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] diff --git a/lib/crimson-falcon/api/intel_api.rb b/lib/crimson-falcon/api/intel_api.rb index e8b01370..ddb27d43 100644 --- a/lib/crimson-falcon/api/intel_api.rb +++ b/lib/crimson-falcon/api/intel_api.rb @@ -998,7 +998,7 @@ def query_intel_indicator_ids_with_http_info(opts = {}) # @option opts [Integer] :offset Set the starting row number to return reports from. Defaults to 0. # @option opts [Integer] :limit Set the number of reports to return. The value must be between 1 and 5000. # @option opts [String] :sort Order fields in ascending or descending order. Ex: created_date|asc. - # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. # @option opts [String] :q Perform a generic substring search across all fields. # @option opts [Array] :fields The fields to return, or a predefined set of fields in the form of the collection name surrounded by two underscores like: \\_\\_\\<collection\\>\\_\\_. Ex: slug \\_\\_full\\_\\_. Defaults to \\_\\_basic\\_\\_. # @return [DomainNewsResponse] @@ -1012,7 +1012,7 @@ def query_intel_report_entities(opts = {}) # @option opts [Integer] :offset Set the starting row number to return reports from. Defaults to 0. # @option opts [Integer] :limit Set the number of reports to return. The value must be between 1 and 5000. # @option opts [String] :sort Order fields in ascending or descending order. Ex: created_date|asc. - # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. # @option opts [String] :q Perform a generic substring search across all fields. # @option opts [Array] :fields The fields to return, or a predefined set of fields in the form of the collection name surrounded by two underscores like: \\_\\_\\<collection\\>\\_\\_. Ex: slug \\_\\_full\\_\\_. Defaults to \\_\\_basic\\_\\_. # @return [Array<(DomainNewsResponse, Integer, Hash)>] DomainNewsResponse data, response status code and response headers @@ -1071,7 +1071,7 @@ def query_intel_report_entities_with_http_info(opts = {}) # @option opts [Integer] :offset Set the starting row number to return report IDs from. Defaults to 0. # @option opts [Integer] :limit Set the number of report IDs to return. The value must be between 1 and 5000. # @option opts [String] :sort Order fields in ascending or descending order. Ex: created_date|asc. - # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. # @option opts [String] :q Perform a generic substring search across all fields. # @return [MsaQueryResponse] def query_intel_report_ids(opts = {}) @@ -1084,7 +1084,7 @@ def query_intel_report_ids(opts = {}) # @option opts [Integer] :offset Set the starting row number to return report IDs from. Defaults to 0. # @option opts [Integer] :limit Set the number of report IDs to return. The value must be between 1 and 5000. # @option opts [String] :sort Order fields in ascending or descending order. Ex: created_date|asc. - # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. # @option opts [String] :q Perform a generic substring search across all fields. # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers def query_intel_report_ids_with_http_info(opts = {}) diff --git a/lib/crimson-falcon/api/ioc_api.rb b/lib/crimson-falcon/api/ioc_api.rb index 974524e6..96d097f2 100644 --- a/lib/crimson-falcon/api/ioc_api.rb +++ b/lib/crimson-falcon/api/ioc_api.rb @@ -509,6 +509,232 @@ def indicator_delete_v1_with_http_info(opts = {}) return data, status_code, headers end + # Get the number of devices the indicator has run on + # @param type [String] The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value [String] The string representation of the indicator + # @param [Hash] opts the optional parameters + # @return [ApiDeviceCountRespV1] + def indicator_get_device_count_v1(type, value, opts = {}) + data, _status_code, _headers = indicator_get_device_count_v1_with_http_info(type, value, opts) + data + end + + # Get the number of devices the indicator has run on + # @param type [String] The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value [String] The string representation of the indicator + # @param [Hash] opts the optional parameters + # @return [Array<(ApiDeviceCountRespV1, Integer, Hash)>] ApiDeviceCountRespV1 data, response status code and response headers + def indicator_get_device_count_v1_with_http_info(type, value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IocApi.indicator_get_device_count_v1 ...' + 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 IocApi.indicator_get_device_count_v1" + end + # verify the required parameter 'value' is set + if @api_client.config.client_side_validation && value.nil? + fail ArgumentError, "Missing the required parameter 'value' when calling IocApi.indicator_get_device_count_v1" + end + # resource path + local_var_path = '/iocs/aggregates/indicators/device-count/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'type'] = type + query_params[:'value'] = value + + # 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] || 'ApiDeviceCountRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"IocApi.indicator_get_device_count_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: IocApi#indicator_get_device_count_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the IDs of devices the indicator has run on + # @param type [String] The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value [String] The string representation of the indicator + # @param [Hash] opts the optional parameters + # @option opts [String] :limit The maximum number of results to return. Use with the offset parameter to manage pagination of results. + # @option opts [String] :offset The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. + # @return [ApiDevicesRanOnRespV1] + def indicator_get_devices_ran_on_v1(type, value, opts = {}) + data, _status_code, _headers = indicator_get_devices_ran_on_v1_with_http_info(type, value, opts) + data + end + + # Get the IDs of devices the indicator has run on + # @param type [String] The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value [String] The string representation of the indicator + # @param [Hash] opts the optional parameters + # @option opts [String] :limit The maximum number of results to return. Use with the offset parameter to manage pagination of results. + # @option opts [String] :offset The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. + # @return [Array<(ApiDevicesRanOnRespV1, Integer, Hash)>] ApiDevicesRanOnRespV1 data, response status code and response headers + def indicator_get_devices_ran_on_v1_with_http_info(type, value, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IocApi.indicator_get_devices_ran_on_v1 ...' + 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 IocApi.indicator_get_devices_ran_on_v1" + end + # verify the required parameter 'value' is set + if @api_client.config.client_side_validation && value.nil? + fail ArgumentError, "Missing the required parameter 'value' when calling IocApi.indicator_get_devices_ran_on_v1" + end + # resource path + local_var_path = '/iocs/queries/indicators/devices/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'type'] = type + query_params[:'value'] = value + 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] || 'ApiDevicesRanOnRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"IocApi.indicator_get_devices_ran_on_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: IocApi#indicator_get_devices_ran_on_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get the number of processes the indicator has run on + # @param type [String] The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value [String] The string representation of the indicator + # @param device_id [String] Specify a host's ID to return only processes from that host. Get a host's ID from GET /devices/queries/devices/v1, the Falcon console, or the Streaming API. + # @param [Hash] opts the optional parameters + # @option opts [String] :limit The maximum number of results to return. Use with the offset parameter to manage pagination of results. + # @option opts [String] :offset The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. + # @return [ApiProcessesRanOnRespV1] + def indicator_get_processes_ran_on_v1(type, value, device_id, opts = {}) + data, _status_code, _headers = indicator_get_processes_ran_on_v1_with_http_info(type, value, device_id, opts) + data + end + + # Get the number of processes the indicator has run on + # @param type [String] The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value [String] The string representation of the indicator + # @param device_id [String] Specify a host's ID to return only processes from that host. Get a host's ID from GET /devices/queries/devices/v1, the Falcon console, or the Streaming API. + # @param [Hash] opts the optional parameters + # @option opts [String] :limit The maximum number of results to return. Use with the offset parameter to manage pagination of results. + # @option opts [String] :offset The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. + # @return [Array<(ApiProcessesRanOnRespV1, Integer, Hash)>] ApiProcessesRanOnRespV1 data, response status code and response headers + def indicator_get_processes_ran_on_v1_with_http_info(type, value, device_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IocApi.indicator_get_processes_ran_on_v1 ...' + 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 IocApi.indicator_get_processes_ran_on_v1" + end + # verify the required parameter 'value' is set + if @api_client.config.client_side_validation && value.nil? + fail ArgumentError, "Missing the required parameter 'value' when calling IocApi.indicator_get_processes_ran_on_v1" + end + # verify the required parameter 'device_id' is set + if @api_client.config.client_side_validation && device_id.nil? + fail ArgumentError, "Missing the required parameter 'device_id' when calling IocApi.indicator_get_processes_ran_on_v1" + end + # resource path + local_var_path = '/iocs/queries/indicators/processes/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'type'] = type + query_params[:'value'] = value + query_params[:'device_id'] = device_id + 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] || 'ApiProcessesRanOnRespV1' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"IocApi.indicator_get_processes_ran_on_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: IocApi#indicator_get_processes_ran_on_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get Indicators by ids. # @param ids [Array] The ids of the Indicators to retrieve # @param [Hash] opts the optional parameters diff --git a/lib/crimson-falcon/api/kubernetes_protection_api.rb b/lib/crimson-falcon/api/kubernetes_protection_api.rb index 12ed1c45..a34b6b30 100644 --- a/lib/crimson-falcon/api/kubernetes_protection_api.rb +++ b/lib/crimson-falcon/api/kubernetes_protection_api.rb @@ -288,6 +288,128 @@ def delete_azure_subscription_with_http_info(opts = {}) return data, status_code, headers end + # Retrieve containers by container_runtime_version + # @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,cluster_id,cluster_name,container_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,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 + # @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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.find_containers_by_container_run_time_version ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/find-by-runtimeversion/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? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelsContainerRuntimePivotResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.find_containers_by_container_run_time_version", + :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: KubernetesProtectionApi#find_containers_by_container_run_time_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve containers count affected by zero day vulnerabilities + # @param [Hash] opts the optional parameters + # @return [CommonCountResponse] + def find_containers_count_affected_by_zero_day_vulnerabilities(opts = {}) + data, _status_code, _headers = find_containers_count_affected_by_zero_day_vulnerabilities_with_http_info(opts) + data + end + + # Retrieve containers count affected by zero day vulnerabilities + # @param [Hash] opts the optional parameters + # @return [Array<(CommonCountResponse, Integer, Hash)>] CommonCountResponse data, response status code and response headers + def find_containers_count_affected_by_zero_day_vulnerabilities_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.find_containers_count_affected_by_zero_day_vulnerabilities ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/count-by-zero-day/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CommonCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.find_containers_count_affected_by_zero_day_vulnerabilities", + :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: KubernetesProtectionApi#find_containers_count_affected_by_zero_day_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Provides a list of AWS accounts. # @param [Hash] opts the optional parameters # @option opts [Array] :ids AWS Account IDs @@ -992,6 +1114,64 @@ def get_static_scripts_with_http_info(opts = {}) return data, status_code, headers end + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.group_containers_by_managed ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/group-by-managed/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsContainerCoverageResponseEntity' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.group_containers_by_managed", + :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: KubernetesProtectionApi#group_containers_by_managed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Provides the azure subscriptions registered to Kubernetes Protection # @param [Hash] opts the optional parameters # @option opts [Array] :ids Azure Tenant IDs @@ -1190,26 +1370,38 @@ def patch_azure_service_principal_with_http_info(id, client_id, opts = {}) return data, status_code, headers end - # Regenerate API key for docker registry integrations + # Retrieve kubernetes clusters identified by the provided filter criteria # @param [Hash] opts the optional parameters - # @return [K8sregRegenAPIKeyResp] - def regenerate_api_key(opts = {}) - data, _status_code, _headers = regenerate_api_key_with_http_info(opts) + # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 [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 - # Regenerate API key for docker registry integrations + # Retrieve kubernetes clusters identified by the provided filter criteria # @param [Hash] opts the optional parameters - # @return [Array<(K8sregRegenAPIKeyResp, Integer, Hash)>] K8sregRegenAPIKeyResp data, response status code and response headers - def regenerate_api_key_with_http_info(opts = {}) + # @option opts [String] :filter Search Kubernetes clusters using a query in Falcon Query Language (FQL). Supported filters: access,agent_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 [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 - @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.regenerate_api_key ...' + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_cluster_combined ...' end # resource path - local_var_path = '/kubernetes-protection/entities/integration/api-key/v1' + local_var_path = '/container-security/combined/clusters/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] || {} @@ -1223,13 +1415,13 @@ def regenerate_api_key_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'K8sregRegenAPIKeyResp' + return_type = opts[:debug_return_type] || 'ModelsClusterEntityResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"KubernetesProtectionApi.regenerate_api_key", + :operation => :"KubernetesProtectionApi.read_cluster_combined", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1238,9 +1430,2302 @@ def regenerate_api_key_with_http_info(opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + 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: KubernetesProtectionApi#regenerate_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: KubernetesProtectionApi#read_cluster_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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) + data + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_cluster_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/clusters/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'CommonCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_cluster_count", + :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: KubernetesProtectionApi#read_cluster_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [K8sassetsClusterEnrichmentResponse] + def read_cluster_enrichment(cluster_id, opts = {}) + data, _status_code, _headers = read_cluster_enrichment_with_http_info(cluster_id, opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_cluster_enrichment ...' + end + # verify the required parameter 'cluster_id' is set + if @api_client.config.client_side_validation && cluster_id.nil? + fail ArgumentError, "Missing the required parameter 'cluster_id' when calling KubernetesProtectionApi.read_cluster_enrichment" + end + # resource path + local_var_path = '/container-security/aggregates/enrichment/clusters/entities/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'cluster_id'] = @api_client.build_collection_param(cluster_id, :csv) + 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] || 'K8sassetsClusterEnrichmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_cluster_enrichment", + :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: KubernetesProtectionApi#read_cluster_enrichment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve clusters by date range counts + # @param [Hash] opts the optional parameters + # @return [ModelsAggregateValuesByFieldResponse] + def read_clusters_by_date_range_count(opts = {}) + data, _status_code, _headers = read_clusters_by_date_range_count_with_http_info(opts) + data + end + + # Retrieve clusters by date range counts + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers + def read_clusters_by_date_range_count_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_clusters_by_date_range_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/clusters/count-by-date/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_clusters_by_date_range_count", + :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: KubernetesProtectionApi#read_clusters_by_date_range_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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) + data + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_clusters_by_kubernetes_version_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/clusters/count-by-kubernetes-version/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_clusters_by_kubernetes_version_count", + :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: KubernetesProtectionApi#read_clusters_by_kubernetes_version_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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) + data + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_clusters_by_status_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/clusters/count-by-status/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_clusters_by_status_count", + :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: KubernetesProtectionApi#read_clusters_by_status_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve containers identified by the provided filter criteria + # @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,cluster_id,cluster_name,container_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,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 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 + # @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,cluster_id,cluster_name,container_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,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 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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_combined ...' + end + # resource path + local_var_path = '/container-security/combined/containers/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] || 'ModelsContainerEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_combined", + :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: KubernetesProtectionApi#read_container_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'CommonCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_count", + :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: KubernetesProtectionApi#read_container_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve top container image registries + # @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 [Integer] :limit The upper-bound on the number of records to retrieve. + # @return [ModelsAPIFilterResponse] + def read_container_count_by_registry(opts = {}) + data, _status_code, _headers = read_container_count_by_registry_with_http_info(opts) + data + end + + # Retrieve top container image registries + # @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 [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 = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_count_by_registry ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/count-by-registry/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'under_assessment'] = opts[:'under_assessment'] if !opts[:'under_assessment'].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] || 'ModelsAPIFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_count_by_registry", + :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: KubernetesProtectionApi#read_container_count_by_registry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [K8sassetsContainerEnrichmentResponse] + def read_container_enrichment(container_id, opts = {}) + data, _status_code, _headers = read_container_enrichment_with_http_info(container_id, opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_enrichment ...' + end + # verify the required parameter 'container_id' is set + if @api_client.config.client_side_validation && container_id.nil? + fail ArgumentError, "Missing the required parameter 'container_id' when calling KubernetesProtectionApi.read_container_enrichment" + end + # resource path + local_var_path = '/container-security/aggregates/enrichment/containers/entities/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'container_id'] = @api_client.build_collection_param(container_id, :csv) + 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] || 'K8sassetsContainerEnrichmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_enrichment", + :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: KubernetesProtectionApi#read_container_enrichment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_image_detections_count_by_date ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/image-detections-count-by-date/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAPIFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_image_detections_count_by_date", + :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: KubernetesProtectionApi#read_container_image_detections_count_by_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_images_by_most_used ...' + end + # resource path + local_var_path = '/container-security/aggregates/images/most-used/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_images_by_most_used", + :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: KubernetesProtectionApi#read_container_images_by_most_used\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [ModelsAPIFilterResponse] + def read_container_images_by_state(opts = {}) + data, _status_code, _headers = read_container_images_by_state_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_images_by_state ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/images-by-state/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAPIFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_images_by_state", + :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: KubernetesProtectionApi#read_container_images_by_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_container_vulnerabilities_by_severity_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/vulnerability-count-by-severity/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_container_vulnerabilities_by_severity_count", + :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: KubernetesProtectionApi#read_container_vulnerabilities_by_severity_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_containers_by_date_range_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/count-by-date/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_containers_by_date_range_count", + :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: KubernetesProtectionApi#read_containers_by_date_range_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_containers_sensor_coverage ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/sensor-coverage/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_containers_sensor_coverage", + :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: KubernetesProtectionApi#read_containers_sensor_coverage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve kubernetes deployments identified by the provided filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_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. + # @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 + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_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. + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_deployment_combined ...' + end + # resource path + local_var_path = '/container-security/combined/deployments/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] || 'ModelsDeploymentEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_deployment_combined", + :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: KubernetesProtectionApi#read_deployment_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_count + # @return [CommonCountResponse] + def read_deployment_count(opts = {}) + data, _status_code, _headers = read_deployment_count_with_http_info(opts) + data + end + + # 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: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_count + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_deployment_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/deployments/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'CommonCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_deployment_count", + :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: KubernetesProtectionApi#read_deployment_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [K8sassetsDeploymentEnrichmentResponse] + def read_deployment_enrichment(deployment_id, opts = {}) + data, _status_code, _headers = read_deployment_enrichment_with_http_info(deployment_id, opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_deployment_enrichment ...' + end + # verify the required parameter 'deployment_id' is set + if @api_client.config.client_side_validation && deployment_id.nil? + fail ArgumentError, "Missing the required parameter 'deployment_id' when calling KubernetesProtectionApi.read_deployment_enrichment" + end + # resource path + local_var_path = '/container-security/aggregates/enrichment/deployments/entities/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'deployment_id'] = @api_client.build_collection_param(deployment_id, :csv) + 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] || 'K8sassetsDeploymentEnrichmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_deployment_enrichment", + :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: KubernetesProtectionApi#read_deployment_enrichment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve deployments by date range counts + # @param [Hash] opts the optional parameters + # @return [ModelsAggregateValuesByFieldResponse] + def read_deployments_by_date_range_count(opts = {}) + data, _status_code, _headers = read_deployments_by_date_range_count_with_http_info(opts) + data + end + + # Retrieve deployments by date range counts + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers + def read_deployments_by_date_range_count_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_deployments_by_date_range_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/deployments/count-by-date/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_deployments_by_date_range_count", + :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: KubernetesProtectionApi#read_deployments_by_date_range_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_distinct_container_image_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/images/count-by-distinct/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAPIFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_distinct_container_image_count", + :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: KubernetesProtectionApi#read_distinct_container_image_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,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) + data + end + + # 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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_kubernetes_iom_by_date_range ...' + end + # resource path + local_var_path = '/container-security/aggregates/kubernetes-ioms/count-by-date/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'K8siomsKubernetesIOMFieldValue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_kubernetes_iom_by_date_range", + :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: KubernetesProtectionApi#read_kubernetes_iom_by_date_range\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,severity + # @return [K8siomsKubernetesIOMCountValue] + def read_kubernetes_iom_count(opts = {}) + data, _status_code, _headers = read_kubernetes_iom_count_with_http_info(opts) + data + end + + # 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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_kubernetes_iom_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/kubernetes-ioms/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'K8siomsKubernetesIOMCountValue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_kubernetes_iom_count", + :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: KubernetesProtectionApi#read_kubernetes_iom_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve Kubernetes IOM entities identified by the provided IDs + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Search Kubernetes IOMs by ids - The maximum amount is 100 IDs + # @return [K8siomsKubernetesIOMEntityResponse] + def read_kubernetes_iom_entities(opts = {}) + data, _status_code, _headers = read_kubernetes_iom_entities_with_http_info(opts) + data + end + + # Retrieve Kubernetes IOM entities identified by the provided IDs + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Search Kubernetes IOMs by ids - The maximum amount is 100 IDs + # @return [Array<(K8siomsKubernetesIOMEntityResponse, Integer, Hash)>] K8siomsKubernetesIOMEntityResponse data, response status code and response headers + def read_kubernetes_iom_entities_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_kubernetes_iom_entities ...' + end + # resource path + local_var_path = '/container-security/entities/kubernetes-ioms/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :csv) 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] || 'K8siomsKubernetesIOMEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_kubernetes_iom_entities", + :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: KubernetesProtectionApi#read_kubernetes_iom_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve kubernetes nodes identified by the provided filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_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. + # @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 + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_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. + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_node_combined ...' + end + # resource path + local_var_path = '/container-security/combined/nodes/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] || 'ModelsNodeEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_node_combined", + :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: KubernetesProtectionApi#read_node_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @return [CommonCountResponse] + def read_node_count(opts = {}) + data, _status_code, _headers = read_node_count_with_http_info(opts) + data + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_node_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/nodes/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'CommonCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_node_count", + :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: KubernetesProtectionApi#read_node_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [K8sassetsNodeEnrichmentResponse] + def read_node_enrichment(node_name, opts = {}) + data, _status_code, _headers = read_node_enrichment_with_http_info(node_name, opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_node_enrichment ...' + end + # verify the required parameter 'node_name' is set + if @api_client.config.client_side_validation && node_name.nil? + fail ArgumentError, "Missing the required parameter 'node_name' when calling KubernetesProtectionApi.read_node_enrichment" + end + # resource path + local_var_path = '/container-security/aggregates/enrichment/nodes/entities/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'node_name'] = @api_client.build_collection_param(node_name, :csv) + 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] || 'K8sassetsNodeEnrichmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_node_enrichment", + :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: KubernetesProtectionApi#read_node_enrichment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @return [ModelsAggregateValuesByFieldResponse] + def read_nodes_by_cloud_count(opts = {}) + data, _status_code, _headers = read_nodes_by_cloud_count_with_http_info(opts) + data + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_nodes_by_cloud_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/nodes/count-by-cloud/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_nodes_by_cloud_count", + :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: KubernetesProtectionApi#read_nodes_by_cloud_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @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) + data + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_nodes_by_container_engine_version_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/nodes/count-by-container-engine-version/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_nodes_by_container_engine_version_count", + :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: KubernetesProtectionApi#read_nodes_by_container_engine_version_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @return [ModelsAggregateValuesByFieldResponse] + def read_nodes_by_date_range_count(opts = {}) + data, _status_code, _headers = read_nodes_by_date_range_count_with_http_info(opts) + data + end + + # 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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_nodes_by_date_range_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/nodes/count-by-date/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_nodes_by_date_range_count", + :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: KubernetesProtectionApi#read_nodes_by_date_range_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve kubernetes pods identified by the provided filter criteria + # @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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,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 [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 + # @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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,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 [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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_pod_combined ...' + end + # resource path + local_var_path = '/container-security/combined/pods/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] || 'ModelsPodEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_pod_combined", + :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: KubernetesProtectionApi#read_pod_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,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) + data + end + + # 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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_pod_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/pods/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'CommonCountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_pod_count", + :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: KubernetesProtectionApi#read_pod_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [K8sassetsPodEnrichmentResponse] + def read_pod_enrichment(pod_id, opts = {}) + data, _status_code, _headers = read_pod_enrichment_with_http_info(pod_id, opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_pod_enrichment ...' + end + # verify the required parameter 'pod_id' is set + if @api_client.config.client_side_validation && pod_id.nil? + fail ArgumentError, "Missing the required parameter 'pod_id' when calling KubernetesProtectionApi.read_pod_enrichment" + end + # resource path + local_var_path = '/container-security/aggregates/enrichment/pods/entities/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'pod_id'] = @api_client.build_collection_param(pod_id, :csv) + 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] || 'K8sassetsPodEnrichmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_pod_enrichment", + :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: KubernetesProtectionApi#read_pod_enrichment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve pods by date range counts + # @param [Hash] opts the optional parameters + # @return [ModelsAggregateValuesByFieldResponse] + def read_pods_by_date_range_count(opts = {}) + data, _status_code, _headers = read_pods_by_date_range_count_with_http_info(opts) + data + end + + # Retrieve pods by date range counts + # @param [Hash] opts the optional parameters + # @return [Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>] ModelsAggregateValuesByFieldResponse data, response status code and response headers + def read_pods_by_date_range_count_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_pods_by_date_range_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/pods/count-by-date/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_pods_by_date_range_count", + :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: KubernetesProtectionApi#read_pods_by_date_range_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Retrieve images on running containers + # @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,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 [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 + # @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,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 [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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_running_container_images ...' + end + # resource path + local_var_path = '/container-security/combined/container-images/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] || 'ModelsContainerImage' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_running_container_images", + :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: KubernetesProtectionApi#read_running_container_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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,cluster_id,cluster_name,container_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,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) + data + end + + # 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,cluster_id,cluster_name,container_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,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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.read_vulnerable_container_image_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/containers/count-vulnerable-images/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAPIFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.read_vulnerable_container_image_count", + :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: KubernetesProtectionApi#read_vulnerable_container_image_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Regenerate API key for docker registry integrations + # @param [Hash] opts the optional parameters + # @return [K8sregRegenAPIKeyResp] + def regenerate_api_key(opts = {}) + data, _status_code, _headers = regenerate_api_key_with_http_info(opts) + data + end + + # Regenerate API key for docker registry integrations + # @param [Hash] opts the optional parameters + # @return [Array<(K8sregRegenAPIKeyResp, Integer, Hash)>] K8sregRegenAPIKeyResp data, response status code and response headers + def regenerate_api_key_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.regenerate_api_key ...' + end + # resource path + local_var_path = '/kubernetes-protection/entities/integration/api-key/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'K8sregRegenAPIKeyResp' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.regenerate_api_key", + :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: KubernetesProtectionApi#regenerate_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search Kubernetes IOM by the provided search criteria + # @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,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] :sort The fields to sort the records on. + # @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 + # @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,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] :sort The fields to sort the records on. + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.search_and_read_kubernetes_iom_entities ...' + end + # resource path + local_var_path = '/container-security/combined/kubernetes-ioms/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] || 'K8siomsKubernetesIOMEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.search_and_read_kubernetes_iom_entities", + :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: KubernetesProtectionApi#search_and_read_kubernetes_iom_entities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + 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 + # @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,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] :sort The fields to sort the records on. + # @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 + # @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,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] :sort The fields to sort the records on. + # @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 + @api_client.config.logger.debug 'Calling API: KubernetesProtectionApi.search_kubernetes_ioms ...' + end + # resource path + local_var_path = '/container-security/queries/kubernetes-ioms/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] || 'CommonGenericEntityResponseString' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"KubernetesProtectionApi.search_kubernetes_ioms", + :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: KubernetesProtectionApi#search_kubernetes_ioms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/message_center_api.rb b/lib/crimson-falcon/api/message_center_api.rb index 02e667ed..1be65404 100644 --- a/lib/crimson-falcon/api/message_center_api.rb +++ b/lib/crimson-falcon/api/message_center_api.rb @@ -105,7 +105,7 @@ def aggregate_cases_with_http_info(body, opts = {}) # Add an activity to case. Only activities of type comment are allowed via API # @param body [DomainActivityCreationRequest] # @param [Hash] opts the optional parameters - # @return [MsaReplyMetaOnly] + # @return [MsaspecResponseFields] def case_add_activity(body, opts = {}) data, _status_code, _headers = case_add_activity_with_http_info(body, opts) data @@ -114,7 +114,7 @@ def case_add_activity(body, opts = {}) # Add an activity to case. Only activities of type comment are allowed via API # @param body [DomainActivityCreationRequest] # @param [Hash] opts the optional parameters - # @return [Array<(MsaReplyMetaOnly, Integer, Hash)>] MsaReplyMetaOnly data, response status code and response headers + # @return [Array<(MsaspecResponseFields, Integer, Hash)>] MsaspecResponseFields data, response status code and response headers def case_add_activity_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MessageCenterApi.case_add_activity ...' @@ -146,7 +146,7 @@ def case_add_activity_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MsaReplyMetaOnly' + return_type = opts[:debug_return_type] || 'MsaspecResponseFields' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -584,7 +584,7 @@ def get_case_entities_by_ids_with_http_info(body, opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. Allowed filters are: activity.created_time activity.type # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_activity_by_case_id(case_id, opts = {}) data, _status_code, _headers = query_activity_by_case_id_with_http_info(case_id, opts) data @@ -597,7 +597,7 @@ def query_activity_by_case_id(case_id, opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. Allowed filters are: activity.created_time activity.type # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_activity_by_case_id_with_http_info(case_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MessageCenterApi.query_activity_by_case_id ...' @@ -606,7 +606,7 @@ def query_activity_by_case_id_with_http_info(case_id, opts = {}) if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling MessageCenterApi.query_activity_by_case_id" end - allowable_values = ["activity.created_time.asc", "activity.created_time.desc", "activity.type.asc", "activity.type.desc"] + allowable_values = ["activity.type.asc", "activity.type.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 @@ -633,7 +633,7 @@ def query_activity_by_case_id_with_http_info(case_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] @@ -661,7 +661,7 @@ def query_activity_by_case_id_with_http_info(case_id, opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. Allowed filters are: _all activity.body case.aids case.assigner.display_name case.assigner.first_name case.assigner.last_name case.assigner.uid case.assigner.uuid case.body case.created_time case.detections.id case.hosts case.id case.incidents.id case.ip_addresses case.key case.last_modified_time case.status case.title case.type # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] def query_cases_ids_by_filter(opts = {}) data, _status_code, _headers = query_cases_ids_by_filter_with_http_info(opts) data @@ -673,12 +673,12 @@ def query_cases_ids_by_filter(opts = {}) # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. Allowed filters are: _all activity.body case.aids case.assigner.display_name case.assigner.first_name case.assigner.last_name case.assigner.uid case.assigner.uuid case.body case.created_time case.detections.id case.hosts case.id case.incidents.id case.ip_addresses case.key case.last_modified_time case.status case.title case.type # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [Array<(MsaQueryResponse, Integer, Hash)>] MsaQueryResponse data, response status code and response headers + # @return [Array<(MsaspecQueryResponse, Integer, Hash)>] MsaspecQueryResponse data, response status code and response headers def query_cases_ids_by_filter_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: MessageCenterApi.query_cases_ids_by_filter ...' end - allowable_values = ["case.created_time.asc", "case.created_time.desc", "case.id.asc", "case.id.desc", "case.last_modified_time.asc", "case.last_modified_time.desc", "case.status.asc", "case.status.desc", "case.type.asc", "case.type.desc"] + allowable_values = ["case.id.asc", "case.id.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 @@ -704,7 +704,7 @@ def query_cases_ids_by_filter_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'MsaQueryResponse' + return_type = opts[:debug_return_type] || 'MsaspecQueryResponse' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] diff --git a/lib/crimson-falcon/api/ods_api.rb b/lib/crimson-falcon/api/ods_api.rb index d3f8ce0b..e6cbbc69 100644 --- a/lib/crimson-falcon/api/ods_api.rb +++ b/lib/crimson-falcon/api/ods_api.rb @@ -617,6 +617,68 @@ def get_scans_by_scan_ids_with_http_info(ids, opts = {}) return data, status_code, headers end + # Get Scans by IDs. + # @param ids [Array] The scan IDs to retrieve the scan entities + # @param [Hash] opts the optional parameters + # @return [EntitiesODSScanResponseV2] + def get_scans_by_scan_ids_v2(ids, opts = {}) + data, _status_code, _headers = get_scans_by_scan_ids_v2_with_http_info(ids, opts) + data + end + + # Get Scans by IDs. + # @param ids [Array] The scan IDs to retrieve the scan entities + # @param [Hash] opts the optional parameters + # @return [Array<(EntitiesODSScanResponseV2, Integer, Hash)>] EntitiesODSScanResponseV2 data, response status code and response headers + def get_scans_by_scan_ids_v2_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OdsApi.get_scans_by_scan_ids_v2 ...' + 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 OdsApi.get_scans_by_scan_ids_v2" + end + # resource path + local_var_path = '/ods/entities/scans/v2' + + # 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] || 'EntitiesODSScanResponseV2' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"OdsApi.get_scans_by_scan_ids_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: OdsApi#get_scans_by_scan_ids_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get ScheduledScans by IDs. # @param ids [Array] The scan IDs to retrieve the scan entities # @param [Hash] opts the optional parameters @@ -752,7 +814,7 @@ def query_malicious_files_with_http_info(opts = {}) # Query scan hosts. # @param [Hash] opts the optional parameters - # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated] + # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated scan_control_reason] # @option opts [Integer] :offset Index of the starting resource (default to 0) # @option opts [Integer] :limit The max number of resources to return (default to 500) # @option opts [String] :sort The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" (default to 'last_updated|desc') @@ -764,7 +826,7 @@ def query_scan_host_metadata(opts = {}) # Query scan hosts. # @param [Hash] opts the optional parameters - # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated] + # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated scan_control_reason] # @option opts [Integer] :offset Index of the starting resource (default to 0) # @option opts [Integer] :limit The max number of resources to return (default to 500) # @option opts [String] :sort The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" (default to 'last_updated|desc') @@ -773,7 +835,7 @@ def query_scan_host_metadata_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OdsApi.query_scan_host_metadata ...' end - allowable_values = ["id|asc", "id|desc", "scan_id|asc", "scan_id|desc", "host_id|asc", "host_id|desc", "filecount.scanned|asc", "filecount.scanned|desc", "filecount.malicious|asc", "filecount.malicious|desc", "filecount.quarantined|asc", "filecount.quarantined|desc", "filecount.skipped|asc", "filecount.skipped|desc", "status|asc", "status|desc", "severity|asc", "severity|desc", "started_on|asc", "started_on|desc", "completed_on|asc", "completed_on|desc", "last_updated|asc", "last_updated|desc"] + allowable_values = ["id|asc", "id|desc", "scan_id|asc", "scan_id|desc", "host_id|asc", "host_id|desc", "filecount.scanned|asc", "filecount.scanned|desc", "filecount.malicious|asc", "filecount.malicious|desc", "filecount.quarantined|asc", "filecount.quarantined|desc", "filecount.skipped|asc", "filecount.skipped|desc", "status|asc", "status|desc", "severity|asc", "severity|desc", "started_on|asc", "started_on|desc", "completed_on|asc", "completed_on|desc", "last_updated|asc", "last_updated|desc", "scan_control_reason.keyword|asc", "scan_control_reason.keyword|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 @@ -823,7 +885,7 @@ def query_scan_host_metadata_with_http_info(opts = {}) # Query Scans. # @param [Hash] opts the optional parameters - # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated] + # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated targeted_host_count missing_host_count] # @option opts [Integer] :offset Index of the starting resource (default to 0) # @option opts [Integer] :limit The max number of resources to return (default to 500) # @option opts [String] :sort The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" (default to 'created_on|desc') @@ -835,7 +897,7 @@ def query_scans(opts = {}) # Query Scans. # @param [Hash] opts the optional parameters - # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated] + # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated targeted_host_count missing_host_count] # @option opts [Integer] :offset Index of the starting resource (default to 0) # @option opts [Integer] :limit The max number of resources to return (default to 500) # @option opts [String] :sort The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" (default to 'created_on|desc') @@ -844,7 +906,7 @@ def query_scans_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OdsApi.query_scans ...' end - allowable_values = ["id|asc", "id|desc", "initiated_from|asc", "initiated_from|desc", "description.keyword|asc", "description.keyword|desc", "filecount.scanned|asc", "filecount.scanned|desc", "filecount.malicious|asc", "filecount.malicious|desc", "filecount.quarantined|asc", "filecount.quarantined|desc", "filecount.skipped|asc", "filecount.skipped|desc", "affected_hosts_count|asc", "affected_hosts_count|desc", "status|asc", "status|desc", "severity|asc", "severity|desc", "scan_started_on|asc", "scan_started_on|desc", "scan_completed_on|asc", "scan_completed_on|desc", "created_on|asc", "created_on|desc", "created_by|asc", "created_by|desc", "last_updated|asc", "last_updated|desc"] + allowable_values = ["id|asc", "id|desc", "initiated_from|asc", "initiated_from|desc", "description.keyword|asc", "description.keyword|desc", "filecount.scanned|asc", "filecount.scanned|desc", "filecount.malicious|asc", "filecount.malicious|desc", "filecount.quarantined|asc", "filecount.quarantined|desc", "filecount.skipped|asc", "filecount.skipped|desc", "affected_hosts_count|asc", "affected_hosts_count|desc", "status|asc", "status|desc", "severity|asc", "severity|desc", "scan_started_on|asc", "scan_started_on|desc", "scan_completed_on|asc", "scan_completed_on|desc", "created_on|asc", "created_on|desc", "created_by|asc", "created_by|desc", "last_updated|asc", "last_updated|desc", "targeted_host_count|asc", "targeted_host_count|desc", "missing_host_count|asc", "missing_host_count|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 diff --git a/lib/crimson-falcon/api/real_time_response_admin_api.rb b/lib/crimson-falcon/api/real_time_response_admin_api.rb index 3e9dc087..0e1d5da7 100644 --- a/lib/crimson-falcon/api/real_time_response_admin_api.rb +++ b/lib/crimson-falcon/api/real_time_response_admin_api.rb @@ -211,6 +211,10 @@ def r_tr_create_put_files_with_http_info(file, description, opts = {}) if @api_client.config.client_side_validation && description.nil? fail ArgumentError, "Missing the required parameter 'description' when calling RealTimeResponseAdminApi.r_tr_create_put_files" end + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766 + fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdminApi.r_tr_create_put_files, the character length must be smaller than or equal to 32766.' + end + if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096 fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdminApi.r_tr_create_put_files, the character length must be smaller than or equal to 4096.' end @@ -301,6 +305,10 @@ def r_tr_create_scripts_with_http_info(description, permission_type, opts = {}) if @api_client.config.client_side_validation && permission_type.nil? fail ArgumentError, "Missing the required parameter 'permission_type' when calling RealTimeResponseAdminApi.r_tr_create_scripts" end + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766 + fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdminApi.r_tr_create_scripts, the character length must be smaller than or equal to 32766.' + end + if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096 fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdminApi.r_tr_create_scripts, the character length must be smaller than or equal to 4096.' end @@ -547,6 +555,68 @@ def r_tr_execute_admin_command_with_http_info(body, opts = {}) return data, status_code, headers end + # Get Falcon scripts with metadata and content of script + # @param ids [Array] IDs of the Falcon scripts you want to retrieve + # @param [Hash] opts the optional parameters + # @return [EmpowerapiMsaFalconScriptResponse] + def r_tr_get_falcon_scripts(ids, opts = {}) + data, _status_code, _headers = r_tr_get_falcon_scripts_with_http_info(ids, opts) + data + end + + # Get Falcon scripts with metadata and content of script + # @param ids [Array] IDs of the Falcon scripts you want to retrieve + # @param [Hash] opts the optional parameters + # @return [Array<(EmpowerapiMsaFalconScriptResponse, Integer, Hash)>] EmpowerapiMsaFalconScriptResponse data, response status code and response headers + def r_tr_get_falcon_scripts_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RealTimeResponseAdminApi.r_tr_get_falcon_scripts ...' + 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 RealTimeResponseAdminApi.r_tr_get_falcon_scripts" + end + # resource path + local_var_path = '/real-time-response/entities/falcon-scripts/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] || 'EmpowerapiMsaFalconScriptResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"RealTimeResponseAdminApi.r_tr_get_falcon_scripts", + :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: RealTimeResponseAdminApi#r_tr_get_falcon_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get put-files based on the ID's given. These are used for the RTR `put` command. # @param ids [Array] File IDs # @param [Hash] opts the optional parameters @@ -795,6 +865,81 @@ def r_tr_get_scripts_v2_with_http_info(ids, opts = {}) return data, status_code, headers end + # Get a list of Falcon script IDs available to the user to run + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [Integer] :offset Starting index of overall result set from which to return ids. + # @option opts [Integer] :limit Number of ids to return. + # @option opts [String] :sort Sort by spec. Ex: 'created_at|asc'. + # @return [EmpowerapiMsaIDListResponse] + def r_tr_list_falcon_scripts(opts = {}) + data, _status_code, _headers = r_tr_list_falcon_scripts_with_http_info(opts) + data + end + + # Get a list of Falcon script IDs available to the user to run + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [Integer] :offset Starting index of overall result set from which to return ids. + # @option opts [Integer] :limit Number of ids to return. + # @option opts [String] :sort Sort by spec. Ex: 'created_at|asc'. + # @return [Array<(EmpowerapiMsaIDListResponse, Integer, Hash)>] EmpowerapiMsaIDListResponse data, response status code and response headers + def r_tr_list_falcon_scripts_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RealTimeResponseAdminApi.r_tr_list_falcon_scripts ...' + end + if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RealTimeResponseAdminApi.r_tr_list_falcon_scripts, must be smaller than or equal to 100.' + end + + allowable_values = ["created_timestamp", "modified_timestamp", "name"] + 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 = '/real-time-response/queries/falcon-scripts/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] || 'EmpowerapiMsaIDListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"RealTimeResponseAdminApi.r_tr_list_falcon_scripts", + :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: RealTimeResponseAdminApi#r_tr_list_falcon_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a list of put-file ID's that are available to the user for the `put` command. # @param [Hash] opts the optional parameters # @option opts [String] :filter Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). @@ -964,6 +1109,10 @@ def r_tr_update_scripts_with_http_info(id, opts = {}) if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RealTimeResponseAdminApi.r_tr_update_scripts" end + if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length > 32766 + fail ArgumentError, 'invalid value for "opts[:"name"]" when calling RealTimeResponseAdminApi.r_tr_update_scripts, the character length must be smaller than or equal to 32766.' + end + if @api_client.config.client_side_validation && !opts[:'comments_for_audit_log'].nil? && opts[:'comments_for_audit_log'].to_s.length > 4096 fail ArgumentError, 'invalid value for "opts[:"comments_for_audit_log"]" when calling RealTimeResponseAdminApi.r_tr_update_scripts, the character length must be smaller than or equal to 4096.' end diff --git a/lib/crimson-falcon/api/real_time_response_audit_api.rb b/lib/crimson-falcon/api/real_time_response_audit_api.rb new file mode 100644 index 00000000..83497869 --- /dev/null +++ b/lib/crimson-falcon/api/real_time_response_audit_api.rb @@ -0,0 +1,113 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 RealTimeResponseAuditApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get all the RTR sessions created for a customer in a specified duration + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [String] :sort how to sort the session IDs. e.g. sort=created_at|desc will sort the results based on createdAt in descending order + # @option opts [String] :limit number of sessions to be returned + # @option opts [String] :offset offset value to be used for paginated results + # @option opts [Boolean] :with_command_info get sessions with command info included; by default sessions are returned without command info which include cloud_request_ids and logs fields (default to false) + # @return [DomainSessionResponseWrapper] + def r_tr_audit_sessions(opts = {}) + data, _status_code, _headers = r_tr_audit_sessions_with_http_info(opts) + data + end + + # Get all the RTR sessions created for a customer in a specified duration + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [String] :sort how to sort the session IDs. e.g. sort=created_at|desc will sort the results based on createdAt in descending order + # @option opts [String] :limit number of sessions to be returned + # @option opts [String] :offset offset value to be used for paginated results + # @option opts [Boolean] :with_command_info get sessions with command info included; by default sessions are returned without command info which include cloud_request_ids and logs fields (default to false) + # @return [Array<(DomainSessionResponseWrapper, Integer, Hash)>] DomainSessionResponseWrapper data, response status code and response headers + def r_tr_audit_sessions_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: RealTimeResponseAuditApi.r_tr_audit_sessions ...' + end + allowable_values = ["created_at", "updated_at", "deleted_at"] + 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 = '/real-time-response-audit/combined/sessions/v1' + + # 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[:'with_command_info'] = opts[:'with_command_info'] if !opts[:'with_command_info'].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] || 'DomainSessionResponseWrapper' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"RealTimeResponseAuditApi.r_tr_audit_sessions", + :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: RealTimeResponseAuditApi#r_tr_audit_sessions\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/recon_api.rb b/lib/crimson-falcon/api/recon_api.rb index f3ed4017..d88476ff 100644 --- a/lib/crimson-falcon/api/recon_api.rb +++ b/lib/crimson-falcon/api/recon_api.rb @@ -36,7 +36,7 @@ class ReconApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] + # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] # @param body [Array] # @param [Hash] opts the optional parameters # @return [DomainAggregatesResponse] @@ -45,7 +45,7 @@ def aggregate_notifications_exposed_data_records_v1(body, opts = {}) data end - # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] + # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] # @param body [Array] # @param [Hash] opts the optional parameters # @return [Array<(DomainAggregatesResponse, Integer, Hash)>] DomainAggregatesResponse data, response status code and response headers @@ -1324,7 +1324,7 @@ def query_actions_v1_with_http_info(opts = {}) # @option opts [Integer] :offset Starting index of overall result set from which to return ids. # @option opts [Integer] :limit Number of IDs to return. Offset + limit should NOT be above 10K. # @option opts [String] :sort Possible order by fields: created_date, updated_date. Ex: 'updated_date|desc'. - # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id _all] + # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id credential_status _all bot.operating_system.hardware_id bot.bot_id] # @option opts [String] :q Free text search across all indexed fields. # @return [DomainQueryResponse] def query_notifications_exposed_data_records_v1(opts = {}) @@ -1337,7 +1337,7 @@ def query_notifications_exposed_data_records_v1(opts = {}) # @option opts [Integer] :offset Starting index of overall result set from which to return ids. # @option opts [Integer] :limit Number of IDs to return. Offset + limit should NOT be above 10K. # @option opts [String] :sort Possible order by fields: created_date, updated_date. Ex: 'updated_date|desc'. - # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id _all] + # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id credential_status _all bot.operating_system.hardware_id bot.bot_id] # @option opts [String] :q Free text search across all indexed fields. # @return [Array<(DomainQueryResponse, Integer, Hash)>] DomainQueryResponse data, response status code and response headers def query_notifications_exposed_data_records_v1_with_http_info(opts = {}) @@ -1402,7 +1402,7 @@ def query_notifications_exposed_data_records_v1_with_http_info(opts = {}) # @option opts [Integer] :offset Starting index of overall result set from which to return IDs. # @option opts [Integer] :limit Number of IDs to return. Offset + limit should NOT be above 10K. # @option opts [String] :sort Possible order by fields: `created_date`, `updated_date`. Ex: `updated_date|desc`. - # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid] + # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid breach_summary.credential_statuses breach_summary.is_retroactively_deduped] # @option opts [String] :q Free text search across all indexed fields. # @return [DomainQueryResponse] def query_notifications_v1(opts = {}) @@ -1415,7 +1415,7 @@ def query_notifications_v1(opts = {}) # @option opts [Integer] :offset Starting index of overall result set from which to return IDs. # @option opts [Integer] :limit Number of IDs to return. Offset + limit should NOT be above 10K. # @option opts [String] :sort Possible order by fields: `created_date`, `updated_date`. Ex: `updated_date|desc`. - # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid] + # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid breach_summary.credential_statuses breach_summary.is_retroactively_deduped] # @option opts [String] :q Free text search across all indexed fields. # @return [Array<(DomainQueryResponse, Integer, Hash)>] DomainQueryResponse data, response status code and response headers def query_notifications_v1_with_http_info(opts = {}) diff --git a/lib/crimson-falcon/api/runtime_detections_api.rb b/lib/crimson-falcon/api/runtime_detections_api.rb new file mode 100644 index 00000000..5a274a3e --- /dev/null +++ b/lib/crimson-falcon/api/runtime_detections_api.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 RuntimeDetectionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Retrieve container runtime detections by the provided search criteria + # @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 [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 + # @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 [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 + @api_client.config.logger.debug 'Calling API: RuntimeDetectionsApi.get_runtime_detections_combined_v2 ...' + end + # resource path + local_var_path = '/container-security/combined/runtime-detections/v2' + + # 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] || 'RuntimedetectionsDetectionsEntityResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"RuntimeDetectionsApi.get_runtime_detections_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: RuntimeDetectionsApi#get_runtime_detections_combined_v2\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/vulnerabilities_evaluation_logic_api.rb b/lib/crimson-falcon/api/spotlight_evaluation_logic_api.rb similarity index 88% rename from lib/crimson-falcon/api/vulnerabilities_evaluation_logic_api.rb rename to lib/crimson-falcon/api/spotlight_evaluation_logic_api.rb index 160f9114..e70e40a2 100644 --- a/lib/crimson-falcon/api/vulnerabilities_evaluation_logic_api.rb +++ b/lib/crimson-falcon/api/spotlight_evaluation_logic_api.rb @@ -30,7 +30,7 @@ require 'cgi' module Falcon - class VulnerabilitiesEvaluationLogicApi + class SpotlightEvaluationLogicApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @@ -57,11 +57,11 @@ def combined_query_evaluation_logic(filter, opts = {}) # @return [Array<(DomainSPAPIEvaluationLogicCombinedResponseV1, Integer, Hash)>] DomainSPAPIEvaluationLogicCombinedResponseV1 data, response status code and response headers def combined_query_evaluation_logic_with_http_info(filter, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VulnerabilitiesEvaluationLogicApi.combined_query_evaluation_logic ...' + @api_client.config.logger.debug 'Calling API: SpotlightEvaluationLogicApi.combined_query_evaluation_logic ...' 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 VulnerabilitiesEvaluationLogicApi.combined_query_evaluation_logic" + fail ArgumentError, "Missing the required parameter 'filter' when calling SpotlightEvaluationLogicApi.combined_query_evaluation_logic" end # resource path local_var_path = '/spotlight/combined/evaluation-logic/v1' @@ -91,7 +91,7 @@ def combined_query_evaluation_logic_with_http_info(filter, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"VulnerabilitiesEvaluationLogicApi.combined_query_evaluation_logic", + :operation => :"SpotlightEvaluationLogicApi.combined_query_evaluation_logic", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -102,7 +102,7 @@ def combined_query_evaluation_logic_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: VulnerabilitiesEvaluationLogicApi#combined_query_evaluation_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightEvaluationLogicApi#combined_query_evaluation_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -122,11 +122,11 @@ def get_evaluation_logic(ids, opts = {}) # @return [Array<(DomainSPAPIEvaluationLogicEntitiesResponseV1, Integer, Hash)>] DomainSPAPIEvaluationLogicEntitiesResponseV1 data, response status code and response headers def get_evaluation_logic_with_http_info(ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VulnerabilitiesEvaluationLogicApi.get_evaluation_logic ...' + @api_client.config.logger.debug 'Calling API: SpotlightEvaluationLogicApi.get_evaluation_logic ...' 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 VulnerabilitiesEvaluationLogicApi.get_evaluation_logic" + fail ArgumentError, "Missing the required parameter 'ids' when calling SpotlightEvaluationLogicApi.get_evaluation_logic" end # resource path local_var_path = '/spotlight/entities/evaluation-logic/v1' @@ -153,7 +153,7 @@ def get_evaluation_logic_with_http_info(ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"VulnerabilitiesEvaluationLogicApi.get_evaluation_logic", + :operation => :"SpotlightEvaluationLogicApi.get_evaluation_logic", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -164,7 +164,7 @@ def get_evaluation_logic_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: VulnerabilitiesEvaluationLogicApi#get_evaluation_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightEvaluationLogicApi#get_evaluation_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -190,11 +190,11 @@ def query_evaluation_logic(filter, opts = {}) # @return [Array<(DomainSPAPIQueryResponse, Integer, Hash)>] DomainSPAPIQueryResponse data, response status code and response headers def query_evaluation_logic_with_http_info(filter, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VulnerabilitiesEvaluationLogicApi.query_evaluation_logic ...' + @api_client.config.logger.debug 'Calling API: SpotlightEvaluationLogicApi.query_evaluation_logic ...' 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 VulnerabilitiesEvaluationLogicApi.query_evaluation_logic" + fail ArgumentError, "Missing the required parameter 'filter' when calling SpotlightEvaluationLogicApi.query_evaluation_logic" end # resource path local_var_path = '/spotlight/queries/evaluation-logic/v1' @@ -224,7 +224,7 @@ def query_evaluation_logic_with_http_info(filter, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"VulnerabilitiesEvaluationLogicApi.query_evaluation_logic", + :operation => :"SpotlightEvaluationLogicApi.query_evaluation_logic", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -235,7 +235,7 @@ def query_evaluation_logic_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: VulnerabilitiesEvaluationLogicApi#query_evaluation_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightEvaluationLogicApi#query_evaluation_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end diff --git a/lib/crimson-falcon/api/vulnerabilities_api.rb b/lib/crimson-falcon/api/spotlight_vulnerabilities_api.rb similarity index 81% rename from lib/crimson-falcon/api/vulnerabilities_api.rb rename to lib/crimson-falcon/api/spotlight_vulnerabilities_api.rb index 833a7742..d5b32fea 100644 --- a/lib/crimson-falcon/api/vulnerabilities_api.rb +++ b/lib/crimson-falcon/api/spotlight_vulnerabilities_api.rb @@ -30,14 +30,14 @@ require 'cgi' module Falcon - class VulnerabilitiesApi + class SpotlightVulnerabilitiesApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # 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 - # @param filter [String] 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, 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 filter [String] 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 # @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 The number of items to return in this response (default: 100, max: 5000). Use with the after parameter to manage pagination of results. @@ -50,7 +50,7 @@ def combined_query_vulnerabilities(filter, opts = {}) end # 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 - # @param filter [String] 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, 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 filter [String] 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 # @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 The number of items to return in this response (default: 100, max: 5000). Use with the after parameter to manage pagination of results. @@ -59,18 +59,18 @@ def combined_query_vulnerabilities(filter, opts = {}) # @return [Array<(DomainSPAPICombinedVulnerabilitiesResponse, Integer, Hash)>] DomainSPAPICombinedVulnerabilitiesResponse data, response status code and response headers def combined_query_vulnerabilities_with_http_info(filter, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VulnerabilitiesApi.combined_query_vulnerabilities ...' + @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilitiesApi.combined_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 VulnerabilitiesApi.combined_query_vulnerabilities" + fail ArgumentError, "Missing the required parameter 'filter' when calling SpotlightVulnerabilitiesApi.combined_query_vulnerabilities" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000 - fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VulnerabilitiesApi.combined_query_vulnerabilities, must be smaller than or equal to 5000.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilitiesApi.combined_query_vulnerabilities, 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 VulnerabilitiesApi.combined_query_vulnerabilities, must be greater than or equal to 1.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilitiesApi.combined_query_vulnerabilities, must be greater than or equal to 1.' end # resource path @@ -102,7 +102,7 @@ def combined_query_vulnerabilities_with_http_info(filter, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"VulnerabilitiesApi.combined_query_vulnerabilities", + :operation => :"SpotlightVulnerabilitiesApi.combined_query_vulnerabilities", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -113,7 +113,7 @@ def combined_query_vulnerabilities_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: VulnerabilitiesApi#combined_query_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightVulnerabilitiesApi#combined_query_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -133,11 +133,11 @@ def get_remediations_v2(ids, opts = {}) # @return [Array<(DomainSPAPIRemediationEntitiesResponseV2, Integer, Hash)>] DomainSPAPIRemediationEntitiesResponseV2 data, response status code and response headers def get_remediations_v2_with_http_info(ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VulnerabilitiesApi.get_remediations_v2 ...' + @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilitiesApi.get_remediations_v2 ...' 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 VulnerabilitiesApi.get_remediations_v2" + fail ArgumentError, "Missing the required parameter 'ids' when calling SpotlightVulnerabilitiesApi.get_remediations_v2" end # resource path local_var_path = '/spotlight/entities/remediations/v2' @@ -164,7 +164,7 @@ def get_remediations_v2_with_http_info(ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"VulnerabilitiesApi.get_remediations_v2", + :operation => :"SpotlightVulnerabilitiesApi.get_remediations_v2", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -175,7 +175,7 @@ def get_remediations_v2_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: VulnerabilitiesApi#get_remediations_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightVulnerabilitiesApi#get_remediations_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -195,11 +195,11 @@ def get_vulnerabilities(ids, opts = {}) # @return [Array<(DomainSPAPIVulnerabilitiesEntitiesResponseV2, Integer, Hash)>] DomainSPAPIVulnerabilitiesEntitiesResponseV2 data, response status code and response headers def get_vulnerabilities_with_http_info(ids, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VulnerabilitiesApi.get_vulnerabilities ...' + @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilitiesApi.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 VulnerabilitiesApi.get_vulnerabilities" + fail ArgumentError, "Missing the required parameter 'ids' when calling SpotlightVulnerabilitiesApi.get_vulnerabilities" end # resource path local_var_path = '/spotlight/entities/vulnerabilities/v2' @@ -226,7 +226,7 @@ def get_vulnerabilities_with_http_info(ids, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"VulnerabilitiesApi.get_vulnerabilities", + :operation => :"SpotlightVulnerabilitiesApi.get_vulnerabilities", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -237,13 +237,13 @@ def get_vulnerabilities_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: VulnerabilitiesApi#get_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightVulnerabilitiesApi#get_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # 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 [String] 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, 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 filter [String] 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 # @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 The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. @@ -255,7 +255,7 @@ def query_vulnerabilities(filter, opts = {}) end # 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 [String] 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, 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 filter [String] 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 # @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 The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. @@ -263,18 +263,18 @@ def query_vulnerabilities(filter, opts = {}) # @return [Array<(DomainSPAPIQueryResponse, Integer, Hash)>] DomainSPAPIQueryResponse data, response status code and response headers def query_vulnerabilities_with_http_info(filter, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: VulnerabilitiesApi.query_vulnerabilities ...' + @api_client.config.logger.debug 'Calling API: SpotlightVulnerabilitiesApi.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 VulnerabilitiesApi.query_vulnerabilities" + fail ArgumentError, "Missing the required parameter 'filter' when calling SpotlightVulnerabilitiesApi.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 VulnerabilitiesApi.query_vulnerabilities, must be smaller than or equal to 400.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilitiesApi.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 VulnerabilitiesApi.query_vulnerabilities, must be greater than or equal to 1.' + fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SpotlightVulnerabilitiesApi.query_vulnerabilities, must be greater than or equal to 1.' end # resource path @@ -305,7 +305,7 @@ def query_vulnerabilities_with_http_info(filter, opts = {}) auth_names = opts[:debug_auth_names] || ['oauth2'] new_options = opts.merge( - :operation => :"VulnerabilitiesApi.query_vulnerabilities", + :operation => :"SpotlightVulnerabilitiesApi.query_vulnerabilities", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -316,7 +316,7 @@ def query_vulnerabilities_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: VulnerabilitiesApi#query_vulnerabilities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: SpotlightVulnerabilitiesApi#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/unidentified_containers_api.rb b/lib/crimson-falcon/api/unidentified_containers_api.rb new file mode 100644 index 00000000..a64f9273 --- /dev/null +++ b/lib/crimson-falcon/api/unidentified_containers_api.rb @@ -0,0 +1,222 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 UnidentifiedContainersApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + 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 + # @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) + data + 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 + # @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 + @api_client.config.logger.debug 'Calling API: UnidentifiedContainersApi.read_unidentified_containers_by_date_range_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/unidentified-containers/count-by-date/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'ModelsAggregateValuesByFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"UnidentifiedContainersApi.read_unidentified_containers_by_date_range_count", + :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: UnidentifiedContainersApi#read_unidentified_containers_by_date_range_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # 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 + # @return [UnidentifiedcontainersUnidentifiedContainersCountValue] + def read_unidentified_containers_count(opts = {}) + data, _status_code, _headers = read_unidentified_containers_count_with_http_info(opts) + data + end + + # 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 + # @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 + @api_client.config.logger.debug 'Calling API: UnidentifiedContainersApi.read_unidentified_containers_count ...' + end + # resource path + local_var_path = '/container-security/aggregates/unidentified-containers/count/v1' + + # query parameters + query_params = opts[:query_params] || {} + 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] || 'UnidentifiedcontainersUnidentifiedContainersCountValue' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"UnidentifiedContainersApi.read_unidentified_containers_count", + :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: UnidentifiedContainersApi#read_unidentified_containers_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search Unidentified Containers by the provided search criteria + # @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] :sort The fields to sort the records on. + # @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 + # @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] :sort The fields to sort the records on. + # @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 + @api_client.config.logger.debug 'Calling API: UnidentifiedContainersApi.search_and_read_unidentified_containers ...' + end + # resource path + local_var_path = '/container-security/combined/unidentified-containers/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] || 'UnidentifiedcontainersUnidentifiedContainerAPIResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"UnidentifiedContainersApi.search_and_read_unidentified_containers", + :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: UnidentifiedContainersApi#search_and_read_unidentified_containers\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/workflows_api.rb b/lib/crimson-falcon/api/workflows_api.rb new file mode 100644 index 00000000..3db0cd86 --- /dev/null +++ b/lib/crimson-falcon/api/workflows_api.rb @@ -0,0 +1,1037 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 WorkflowsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Search workflow definitions based on the provided filter + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [Integer] :limit Maximum number 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 [DefinitionsDefinitionExternalResponse] + def workflow_definitions_combined(opts = {}) + data, _status_code, _headers = workflow_definitions_combined_with_http_info(opts) + data + end + + # Search workflow definitions based on the provided filter + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [Integer] :limit Maximum number 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<(DefinitionsDefinitionExternalResponse, Integer, Hash)>] DefinitionsDefinitionExternalResponse data, response status code and response headers + def workflow_definitions_combined_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_definitions_combined ...' + 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 WorkflowsApi.workflow_definitions_combined, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/workflows/combined/definitions/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] || 'DefinitionsDefinitionExternalResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_definitions_combined", + :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: WorkflowsApi#workflow_definitions_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Creates a workflow definition based on the provided model + # @param body [ModelsDefinitionCreateRequestV2] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating (default to false) + # @return [ApiResourceIDsResponse] + def workflow_definitions_create(body, opts = {}) + data, _status_code, _headers = workflow_definitions_create_with_http_info(body, opts) + data + end + + # Creates a workflow definition based on the provided model + # @param body [ModelsDefinitionCreateRequestV2] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating (default to false) + # @return [Array<(ApiResourceIDsResponse, Integer, Hash)>] ApiResourceIDsResponse data, response status code and response headers + def workflow_definitions_create_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_definitions_create ...' + 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 WorkflowsApi.workflow_definitions_create" + end + # resource path + local_var_path = '/workflows/entities/definitions/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'validate_only'] = opts[:'validate_only'] if !opts[:'validate_only'].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', 'application/yaml']) + 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] || 'ApiResourceIDsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_definitions_create", + :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: WorkflowsApi#workflow_definitions_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Exports a workflow definition for the given definition ID + # @param id [String] ID of workflow definitions to return details for + # @param [Hash] opts the optional parameters + # @return [Array] + def workflow_definitions_export(id, opts = {}) + data, _status_code, _headers = workflow_definitions_export_with_http_info(id, opts) + data + end + + # Exports a workflow definition for the given definition ID + # @param id [String] ID of workflow definitions to return details for + # @param [Hash] opts the optional parameters + # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers + def workflow_definitions_export_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_definitions_export ...' + 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 WorkflowsApi.workflow_definitions_export" + end + if @api_client.config.client_side_validation && id.to_s.length > 40 + fail ArgumentError, 'invalid value for "id" when calling WorkflowsApi.workflow_definitions_export, the character length must be smaller than or equal to 40.' + end + + if @api_client.config.client_side_validation && id.to_s.length < 32 + fail ArgumentError, 'invalid value for "id" when calling WorkflowsApi.workflow_definitions_export, the character length must be great than or equal to 32.' + end + + # resource path + local_var_path = '/workflows/entities/definitions/export/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = id + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/yaml']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'Array' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_definitions_export", + :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: WorkflowsApi#workflow_definitions_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Imports a workflow definition based on the provided model + # @param data_file [File] A workflow definition in YAML format to import + # @param [Hash] opts the optional parameters + # @option opts [String] :name Workflow name to override + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating (default to false) + # @return [DefinitionsDefinitionImportResponse] + def workflow_definitions_import(data_file, opts = {}) + data, _status_code, _headers = workflow_definitions_import_with_http_info(data_file, opts) + data + end + + # Imports a workflow definition based on the provided model + # @param data_file [File] A workflow definition in YAML format to import + # @param [Hash] opts the optional parameters + # @option opts [String] :name Workflow name to override + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating (default to false) + # @return [Array<(DefinitionsDefinitionImportResponse, Integer, Hash)>] DefinitionsDefinitionImportResponse data, response status code and response headers + def workflow_definitions_import_with_http_info(data_file, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_definitions_import ...' + end + # verify the required parameter 'data_file' is set + if @api_client.config.client_side_validation && data_file.nil? + fail ArgumentError, "Missing the required parameter 'data_file' when calling WorkflowsApi.workflow_definitions_import" + end + # resource path + local_var_path = '/workflows/entities/definitions/import/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'validate_only'] = opts[:'validate_only'] if !opts[:'validate_only'].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(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['data_file'] = data_file + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DefinitionsDefinitionImportResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_definitions_import", + :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: WorkflowsApi#workflow_definitions_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Updates a workflow definition based on the provided model + # @param body [ModelsDefinitionUpdateRequestV2] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating (default to false) + # @return [ApiResourceIDsResponse] + def workflow_definitions_update(body, opts = {}) + data, _status_code, _headers = workflow_definitions_update_with_http_info(body, opts) + data + end + + # Updates a workflow definition based on the provided model + # @param body [ModelsDefinitionUpdateRequestV2] + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating (default to false) + # @return [Array<(ApiResourceIDsResponse, Integer, Hash)>] ApiResourceIDsResponse data, response status code and response headers + def workflow_definitions_update_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_definitions_update ...' + 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 WorkflowsApi.workflow_definitions_update" + end + # resource path + local_var_path = '/workflows/entities/definitions/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'validate_only'] = opts[:'validate_only'] if !opts[:'validate_only'].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', 'application/yaml']) + 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] || 'ApiResourceIDsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_definitions_update", + :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(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WorkflowsApi#workflow_definitions_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) + # @param body [Object] + # @param [Hash] opts the optional parameters + # @option opts [Array] :execution_cid CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used. + # @option opts [Array] :definition_id Definition ID to execute, either a name or an ID can be specified. + # @option opts [String] :name Workflow name to execute, either a name or an ID can be specified. + # @option opts [String] :key Key used to help deduplicate executions, if unset a new UUID is used + # @option opts [Integer] :depth Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4. + # @option opts [String] :source_event_url Used to record a URL to the source that led to triggering this workflow + # @return [ApiResourceIDsResponse] + def workflow_execute(body, opts = {}) + data, _status_code, _headers = workflow_execute_with_http_info(body, opts) + data + end + + # Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) + # @param body [Object] + # @param [Hash] opts the optional parameters + # @option opts [Array] :execution_cid CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used. + # @option opts [Array] :definition_id Definition ID to execute, either a name or an ID can be specified. + # @option opts [String] :name Workflow name to execute, either a name or an ID can be specified. + # @option opts [String] :key Key used to help deduplicate executions, if unset a new UUID is used + # @option opts [Integer] :depth Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4. + # @option opts [String] :source_event_url Used to record a URL to the source that led to triggering this workflow + # @return [Array<(ApiResourceIDsResponse, Integer, Hash)>] ApiResourceIDsResponse data, response status code and response headers + def workflow_execute_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_execute ...' + 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 WorkflowsApi.workflow_execute" + end + # resource path + local_var_path = '/workflows/entities/execute/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'execution_cid'] = @api_client.build_collection_param(opts[:'execution_cid'], :csv) if !opts[:'execution_cid'].nil? + query_params[:'definition_id'] = @api_client.build_collection_param(opts[:'definition_id'], :csv) if !opts[:'definition_id'].nil? + query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? + query_params[:'key'] = opts[:'key'] if !opts[:'key'].nil? + query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil? + query_params[:'source_event_url'] = opts[:'source_event_url'] if !opts[:'source_event_url'].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 + + # 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] || 'ApiResourceIDsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_execute", + :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: WorkflowsApi#workflow_execute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get execution result of a given execution + # @param ids [Array] workflow execution id to return results for. + # @param [Hash] opts the optional parameters + # @return [ApiExecutionResultsResponse] + def workflow_execution_results(ids, opts = {}) + data, _status_code, _headers = workflow_execution_results_with_http_info(ids, opts) + data + end + + # Get execution result of a given execution + # @param ids [Array] workflow execution id to return results for. + # @param [Hash] opts the optional parameters + # @return [Array<(ApiExecutionResultsResponse, Integer, Hash)>] ApiExecutionResultsResponse data, response status code and response headers + def workflow_execution_results_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_execution_results ...' + 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 WorkflowsApi.workflow_execution_results" + end + if @api_client.config.client_side_validation && ids.length > 500 + fail ArgumentError, 'invalid value for "ids" when calling WorkflowsApi.workflow_execution_results, number of items must be less than or equal to 500.' + end + + if @api_client.config.client_side_validation && ids.length < 1 + fail ArgumentError, 'invalid value for "ids" when calling WorkflowsApi.workflow_execution_results, number of items must be greater than or equal to 1.' + end + + # resource path + local_var_path = '/workflows/entities/execution-results/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ApiExecutionResultsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_execution_results", + :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: WorkflowsApi#workflow_execution_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Allows a user to resume/retry a failed workflow execution. + # @param action_name [String] Specify one of these actions: - `resume`: resume/retry the workflow execution(s) specified in ids + # @param body [ClientActionRequest] + # @param [Hash] opts the optional parameters + # @return [DefinitionsDefinitionEntitiesResponse] + def workflow_executions_action(action_name, body, opts = {}) + data, _status_code, _headers = workflow_executions_action_with_http_info(action_name, body, opts) + data + end + + # Allows a user to resume/retry a failed workflow execution. + # @param action_name [String] Specify one of these actions: - `resume`: resume/retry the workflow execution(s) specified in ids + # @param body [ClientActionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(DefinitionsDefinitionEntitiesResponse, Integer, Hash)>] DefinitionsDefinitionEntitiesResponse data, response status code and response headers + def workflow_executions_action_with_http_info(action_name, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_executions_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 WorkflowsApi.workflow_executions_action" + end + # verify enum value + allowable_values = ["resume"] + 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 WorkflowsApi.workflow_executions_action" + end + # resource path + local_var_path = '/workflows/entities/execution-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] || 'DefinitionsDefinitionEntitiesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_executions_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: WorkflowsApi#workflow_executions_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search workflow executions based on the provided filter + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [Integer] :limit Maximum number 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 [ApiExecutionResultsResponse] + def workflow_executions_combined(opts = {}) + data, _status_code, _headers = workflow_executions_combined_with_http_info(opts) + data + end + + # Search workflow executions based on the provided filter + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [Integer] :limit Maximum number 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<(ApiExecutionResultsResponse, Integer, Hash)>] ApiExecutionResultsResponse data, response status code and response headers + def workflow_executions_combined_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_executions_combined ...' + 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 WorkflowsApi.workflow_executions_combined, must conform to the pattern #{pattern}." + end + + # resource path + local_var_path = '/workflows/combined/executions/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] || 'ApiExecutionResultsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_executions_combined", + :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: WorkflowsApi#workflow_executions_combined\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Gets one or more specific human inputs by their IDs. + # @param ids [Array] IDs of human inputs to read + # @param [Hash] opts the optional parameters + # @return [ModelUserInputReadResponse] + def workflow_get_human_input_v1(ids, opts = {}) + data, _status_code, _headers = workflow_get_human_input_v1_with_http_info(ids, opts) + data + end + + # Gets one or more specific human inputs by their IDs. + # @param ids [Array] IDs of human inputs to read + # @param [Hash] opts the optional parameters + # @return [Array<(ModelUserInputReadResponse, Integer, Hash)>] ModelUserInputReadResponse data, response status code and response headers + def workflow_get_human_input_v1_with_http_info(ids, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_get_human_input_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 WorkflowsApi.workflow_get_human_input_v1" + end + # resource path + local_var_path = '/workflows/entities/human-inputs/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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ModelUserInputReadResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_get_human_input_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: WorkflowsApi#workflow_get_human_input_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Deprovisions a system definition that was previously provisioned on the target CID + # @param body [ClientSystemDefinitionDeProvisionRequest] + # @param [Hash] opts the optional parameters + # @return [ClientSystemDefinitionCreateResponse] + def workflow_system_definitions_de_provision(body, opts = {}) + data, _status_code, _headers = workflow_system_definitions_de_provision_with_http_info(body, opts) + data + end + + # Deprovisions a system definition that was previously provisioned on the target CID + # @param body [ClientSystemDefinitionDeProvisionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ClientSystemDefinitionCreateResponse, Integer, Hash)>] ClientSystemDefinitionCreateResponse data, response status code and response headers + def workflow_system_definitions_de_provision_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_system_definitions_de_provision ...' + 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 WorkflowsApi.workflow_system_definitions_de_provision" + end + # resource path + local_var_path = '/workflows/system-definitions/deprovision/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] || 'ClientSystemDefinitionCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_system_definitions_de_provision", + :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: WorkflowsApi#workflow_system_definitions_de_provision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. + # @param body [ClientSystemDefinitionPromoteRequest] + # @param [Hash] opts the optional parameters + # @return [ClientSystemDefinitionCreateResponse] + def workflow_system_definitions_promote(body, opts = {}) + data, _status_code, _headers = workflow_system_definitions_promote_with_http_info(body, opts) + data + end + + # Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. + # @param body [ClientSystemDefinitionPromoteRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ClientSystemDefinitionCreateResponse, Integer, Hash)>] ClientSystemDefinitionCreateResponse data, response status code and response headers + def workflow_system_definitions_promote_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_system_definitions_promote ...' + 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 WorkflowsApi.workflow_system_definitions_promote" + end + # resource path + local_var_path = '/workflows/system-definitions/promote/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] || 'ClientSystemDefinitionCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_system_definitions_promote", + :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: WorkflowsApi#workflow_system_definitions_promote\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Provisions a system definition onto the target CID by using the template and provided parameters + # @param body [ClientSystemDefinitionProvisionRequest] + # @param [Hash] opts the optional parameters + # @return [ClientSystemDefinitionCreateResponse] + def workflow_system_definitions_provision(body, opts = {}) + data, _status_code, _headers = workflow_system_definitions_provision_with_http_info(body, opts) + data + end + + # Provisions a system definition onto the target CID by using the template and provided parameters + # @param body [ClientSystemDefinitionProvisionRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ClientSystemDefinitionCreateResponse, Integer, Hash)>] ClientSystemDefinitionCreateResponse data, response status code and response headers + def workflow_system_definitions_provision_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_system_definitions_provision ...' + 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 WorkflowsApi.workflow_system_definitions_provision" + end + # resource path + local_var_path = '/workflows/system-definitions/provision/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] || 'ClientSystemDefinitionCreateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_system_definitions_provision", + :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: WorkflowsApi#workflow_system_definitions_provision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. + # @param id [String] ID of human input to provide an input to + # @param body [ModelUserInputUpdateRequest] + # @param [Hash] opts the optional parameters + # @return [ApiResourceIDsResponse] + def workflow_update_human_input_v1(id, body, opts = {}) + data, _status_code, _headers = workflow_update_human_input_v1_with_http_info(id, body, opts) + data + end + + # Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. + # @param id [String] ID of human input to provide an input to + # @param body [ModelUserInputUpdateRequest] + # @param [Hash] opts the optional parameters + # @return [Array<(ApiResourceIDsResponse, Integer, Hash)>] ApiResourceIDsResponse data, response status code and response headers + def workflow_update_human_input_v1_with_http_info(id, body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WorkflowsApi.workflow_update_human_input_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 WorkflowsApi.workflow_update_human_input_v1" + end + if @api_client.config.client_side_validation && id.to_s.length > 32 + fail ArgumentError, 'invalid value for "id" when calling WorkflowsApi.workflow_update_human_input_v1, the character length must be smaller than or equal to 32.' + end + + if @api_client.config.client_side_validation && id.to_s.length < 32 + fail ArgumentError, 'invalid value for "id" when calling WorkflowsApi.workflow_update_human_input_v1, the character length must be great than or equal to 32.' + 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 WorkflowsApi.workflow_update_human_input_v1" + end + # resource path + local_var_path = '/workflows/entities/human-inputs/v1' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'id'] = id + + # 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] || 'ApiResourceIDsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || ['oauth2'] + + new_options = opts.merge( + :operation => :"WorkflowsApi.workflow_update_human_input_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: WorkflowsApi#workflow_update_human_input_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/models/alerts_container_alerts_count_value.rb b/lib/crimson-falcon/models/alerts_container_alerts_count_value.rb new file mode 100644 index 00000000..a830ca26 --- /dev/null +++ b/lib/crimson-falcon/models/alerts_container_alerts_count_value.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 AlertsContainerAlertsCountValue + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::AlertsContainerAlertsCountValue` 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::AlertsContainerAlertsCountValue`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/alerts_container_alerts_entity_response.rb b/lib/crimson-falcon/models/alerts_container_alerts_entity_response.rb new file mode 100644 index 00000000..53f8dff5 --- /dev/null +++ b/lib/crimson-falcon/models/alerts_container_alerts_entity_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 AlertsContainerAlertsEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::AlertsContainerAlertsEntityResponse` 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::AlertsContainerAlertsEntityResponse`. 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_detects_query_meta.rb b/lib/crimson-falcon/models/api_detects_query_meta.rb new file mode 100644 index 00000000..fa433168 --- /dev/null +++ b/lib/crimson-falcon/models/api_detects_query_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 ApiDetectsQueryMeta + 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' => :'ApiDetectsQueryPaging', + :'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::ApiDetectsQueryMeta` 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::ApiDetectsQueryMeta`. 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/api_detects_query_paging.rb b/lib/crimson-falcon/models/api_detects_query_paging.rb new file mode 100644 index 00000000..0a4213a0 --- /dev/null +++ b/lib/crimson-falcon/models/api_detects_query_paging.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 ApiDetectsQueryPaging + attr_accessor :after + + attr_accessor :limit + + attr_accessor :offset + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'after' => :'after', + :'limit' => :'limit', + :'offset' => :'offset' + } + 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', + :'offset' => :'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::ApiDetectsQueryPaging` 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::ApiDetectsQueryPaging`. 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?(:'offset') + self.offset = attributes[:'offset'] + 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 + + 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? + 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 && + offset == o.offset + 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, offset].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_device_count_resp_v1.rb b/lib/crimson-falcon/models/api_device_count_resp_v1.rb new file mode 100644 index 00000000..f5318f85 --- /dev/null +++ b/lib/crimson-falcon/models/api_device_count_resp_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 ApiDeviceCountRespV1 + 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' => :'MsaspecMetaInfo', + :'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::ApiDeviceCountRespV1` 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::ApiDeviceCountRespV1`. 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 @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 @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_device_count_v1.rb b/lib/crimson-falcon/models/api_device_count_v1.rb new file mode 100644 index 00000000..3c702bf1 --- /dev/null +++ b/lib/crimson-falcon/models/api_device_count_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 ApiDeviceCountV1 + attr_accessor :device_count + + attr_accessor :limit_exceeded + + attr_accessor :type + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'device_count' => :'device_count', + :'limit_exceeded' => :'limit_exceeded', + :'type' => :'type', + :'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 + { + :'device_count' => :'Integer', + :'limit_exceeded' => :'Boolean', + :'type' => :'String', + :'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::ApiDeviceCountV1` 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::ApiDeviceCountV1`. 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?(:'device_count') + self.device_count = attributes[:'device_count'] + end + + if attributes.key?(:'limit_exceeded') + self.limit_exceeded = attributes[:'limit_exceeded'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 + 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 && + device_count == o.device_count && + limit_exceeded == o.limit_exceeded && + type == o.type && + 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 + [device_count, limit_exceeded, type, 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/api_devices_ran_on_resp_v1.rb b/lib/crimson-falcon/models/api_devices_ran_on_resp_v1.rb new file mode 100644 index 00000000..03d01636 --- /dev/null +++ b/lib/crimson-falcon/models/api_devices_ran_on_resp_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 ApiDevicesRanOnRespV1 + 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' => :'ApiDetectsQueryMeta', + :'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::ApiDevicesRanOnRespV1` 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::ApiDevicesRanOnRespV1`. 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 @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 @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/common_entities_response.rb b/lib/crimson-falcon/models/api_entities_response.rb similarity index 95% rename from lib/crimson-falcon/models/common_entities_response.rb rename to lib/crimson-falcon/models/api_entities_response.rb index e6267d8f..2c04a489 100644 --- a/lib/crimson-falcon/models/common_entities_response.rb +++ b/lib/crimson-falcon/models/api_entities_response.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class CommonEntitiesResponse + class ApiEntitiesResponse attr_accessor :errors attr_accessor :meta @@ -71,13 +71,13 @@ 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::CommonEntitiesResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiEntitiesResponse` 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::CommonEntitiesResponse`. 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::ApiEntitiesResponse`. 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 } @@ -101,10 +101,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 @@ -119,7 +115,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/api_execution_results_response.rb b/lib/crimson-falcon/models/api_execution_results_response.rb new file mode 100644 index 00000000..18d3a2e3 --- /dev/null +++ b/lib/crimson-falcon/models/api_execution_results_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 ApiExecutionResultsResponse + 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' => :'MsaspecMetaInfo', + :'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::ApiExecutionResultsResponse` 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::ApiExecutionResultsResponse`. 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_exposed_data_record_bot_location_v1.rb b/lib/crimson-falcon/models/api_exposed_data_record_bot_location_v1.rb new file mode 100644 index 00000000..59aea176 --- /dev/null +++ b/lib/crimson-falcon/models/api_exposed_data_record_bot_location_v1.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 ApiExposedDataRecordBotLocationV1 + attr_accessor :country + + attr_accessor :zip_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'country' => :'country', + :'zip_code' => :'zip_code' + } + 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' => :'String', + :'zip_code' => :'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::ApiExposedDataRecordBotLocationV1` 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::ApiExposedDataRecordBotLocationV1`. 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') + self.country = attributes[:'country'] + end + + if attributes.key?(:'zip_code') + self.zip_code = attributes[:'zip_code'] + 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 == o.country && + zip_code == o.zip_code + 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, zip_code].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_exposed_data_record_bot_operating_system_v1.rb b/lib/crimson-falcon/models/api_exposed_data_record_bot_operating_system_v1.rb new file mode 100644 index 00000000..232ff48d --- /dev/null +++ b/lib/crimson-falcon/models/api_exposed_data_record_bot_operating_system_v1.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 ApiExposedDataRecordBotOperatingSystemV1 + attr_accessor :antivirus + + attr_accessor :computer_name + + attr_accessor :domain + + attr_accessor :hardware_id + + attr_accessor :installed_software + + attr_accessor :language + + attr_accessor :layouts + + attr_accessor :os_architecture + + attr_accessor :os_version + + attr_accessor :timezone + + attr_accessor :uac + + attr_accessor :username + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'antivirus' => :'antivirus', + :'computer_name' => :'computer_name', + :'domain' => :'domain', + :'hardware_id' => :'hardware_id', + :'installed_software' => :'installed_software', + :'language' => :'language', + :'layouts' => :'layouts', + :'os_architecture' => :'os_architecture', + :'os_version' => :'os_version', + :'timezone' => :'timezone', + :'uac' => :'uac', + :'username' => :'username' + } + 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 + { + :'antivirus' => :'Array', + :'computer_name' => :'String', + :'domain' => :'String', + :'hardware_id' => :'String', + :'installed_software' => :'Array', + :'language' => :'String', + :'layouts' => :'Array', + :'os_architecture' => :'String', + :'os_version' => :'String', + :'timezone' => :'String', + :'uac' => :'String', + :'username' => :'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::ApiExposedDataRecordBotOperatingSystemV1` 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::ApiExposedDataRecordBotOperatingSystemV1`. 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?(:'antivirus') + if (value = attributes[:'antivirus']).is_a?(Array) + self.antivirus = value + end + end + + if attributes.key?(:'computer_name') + self.computer_name = attributes[:'computer_name'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'hardware_id') + self.hardware_id = attributes[:'hardware_id'] + end + + if attributes.key?(:'installed_software') + if (value = attributes[:'installed_software']).is_a?(Array) + self.installed_software = value + end + end + + if attributes.key?(:'language') + self.language = attributes[:'language'] + end + + if attributes.key?(:'layouts') + if (value = attributes[:'layouts']).is_a?(Array) + self.layouts = value + end + end + + if attributes.key?(:'os_architecture') + self.os_architecture = attributes[:'os_architecture'] + end + + if attributes.key?(:'os_version') + self.os_version = attributes[:'os_version'] + end + + if attributes.key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.key?(:'uac') + self.uac = attributes[:'uac'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + 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 && + antivirus == o.antivirus && + computer_name == o.computer_name && + domain == o.domain && + hardware_id == o.hardware_id && + installed_software == o.installed_software && + language == o.language && + layouts == o.layouts && + os_architecture == o.os_architecture && + os_version == o.os_version && + timezone == o.timezone && + uac == o.uac && + username == o.username + 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 + [antivirus, computer_name, domain, hardware_id, installed_software, language, layouts, os_architecture, os_version, timezone, uac, username].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_exposed_data_record_bot_v1.rb b/lib/crimson-falcon/models/api_exposed_data_record_bot_v1.rb new file mode 100644 index 00000000..e6ed424e --- /dev/null +++ b/lib/crimson-falcon/models/api_exposed_data_record_bot_v1.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 ApiExposedDataRecordBotV1 + attr_accessor :bot_id + + attr_accessor :domain_detects + + attr_accessor :infection_build_id + + attr_accessor :infection_date + + attr_accessor :infection_path + + attr_accessor :ip + + attr_accessor :location + + attr_accessor :operating_system + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bot_id' => :'bot_id', + :'domain_detects' => :'domain_detects', + :'infection_build_id' => :'infection_build_id', + :'infection_date' => :'infection_date', + :'infection_path' => :'infection_path', + :'ip' => :'ip', + :'location' => :'location', + :'operating_system' => :'operating_system' + } + 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 + { + :'bot_id' => :'String', + :'domain_detects' => :'Array', + :'infection_build_id' => :'String', + :'infection_date' => :'Time', + :'infection_path' => :'String', + :'ip' => :'String', + :'location' => :'ApiExposedDataRecordBotLocationV1', + :'operating_system' => :'ApiExposedDataRecordBotOperatingSystemV1' + } + 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::ApiExposedDataRecordBotV1` 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::ApiExposedDataRecordBotV1`. 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?(:'bot_id') + self.bot_id = attributes[:'bot_id'] + end + + if attributes.key?(:'domain_detects') + if (value = attributes[:'domain_detects']).is_a?(Array) + self.domain_detects = value + end + end + + if attributes.key?(:'infection_build_id') + self.infection_build_id = attributes[:'infection_build_id'] + end + + if attributes.key?(:'infection_date') + self.infection_date = attributes[:'infection_date'] + end + + if attributes.key?(:'infection_path') + self.infection_path = attributes[:'infection_path'] + end + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + + if attributes.key?(:'operating_system') + self.operating_system = attributes[:'operating_system'] + 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 && + bot_id == o.bot_id && + domain_detects == o.domain_detects && + infection_build_id == o.infection_build_id && + infection_date == o.infection_date && + infection_path == o.infection_path && + ip == o.ip && + location == o.location && + operating_system == o.operating_system + 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 + [bot_id, domain_detects, infection_build_id, infection_date, infection_path, ip, location, operating_system].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_exposed_data_record_financial_v1.rb b/lib/crimson-falcon/models/api_exposed_data_record_financial_v1.rb index d136d1ec..61b45f89 100644 --- a/lib/crimson-falcon/models/api_exposed_data_record_financial_v1.rb +++ b/lib/crimson-falcon/models/api_exposed_data_record_financial_v1.rb @@ -32,10 +32,13 @@ module Falcon class ApiExposedDataRecordFinancialV1 + # Bank Account information attr_accessor :bank_account + # Credit Card information attr_accessor :credit_card + # A list of Crypto Currency addresses attr_accessor :crypto_currency_addresses # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/crimson-falcon/models/api_exposed_data_record_location_v1.rb b/lib/crimson-falcon/models/api_exposed_data_record_location_v1.rb index eda23acc..6139aa10 100644 --- a/lib/crimson-falcon/models/api_exposed_data_record_location_v1.rb +++ b/lib/crimson-falcon/models/api_exposed_data_record_location_v1.rb @@ -32,16 +32,22 @@ module Falcon class ApiExposedDataRecordLocationV1 + # City name attr_accessor :city + # The country code attr_accessor :country_code + # Federal Administrative Region attr_accessor :federal_admin_region + # Federal District attr_accessor :federal_district + # The postal code attr_accessor :postal_code + # State name attr_accessor :state # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/crimson-falcon/models/api_exposed_data_record_social_v1.rb b/lib/crimson-falcon/models/api_exposed_data_record_social_v1.rb index cdbe9017..92a00b3a 100644 --- a/lib/crimson-falcon/models/api_exposed_data_record_social_v1.rb +++ b/lib/crimson-falcon/models/api_exposed_data_record_social_v1.rb @@ -32,22 +32,31 @@ module Falcon class ApiExposedDataRecordSocialV1 + # AIM ID of the affected user attr_accessor :aim_id + # Facebook ID of the affected user attr_accessor :facebook_id + # ICQ ID of the affected user attr_accessor :icq_id + # Instagram ID of the affected user attr_accessor :instagram_id + # MSN ID of the affected user attr_accessor :msn_id + # Skype ID of the affected user attr_accessor :skype_id + # Twitter ID of the affected user attr_accessor :twitter_id + # VK ID of the affected user attr_accessor :vk_id + # VK Access Token of the affected user attr_accessor :vk_token # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/crimson-falcon/models/api_meta_info.rb b/lib/crimson-falcon/models/api_meta_info.rb new file mode 100644 index 00000000..d11e3936 --- /dev/null +++ b/lib/crimson-falcon/models/api_meta_info.rb @@ -0,0 +1,274 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ApiMetaInfo + attr_accessor :pagination + + # The alias of the service which handled the request + attr_accessor :powered_by + + # The duration (in seconds) that the service took to handle the request + attr_accessor :query_time + + # Identifier used to debug the request + 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' => :'ApiResponsePagination', + :'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::ApiMetaInfo` 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::ApiMetaInfo`. 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/api_notification_exposed_data_record_v1.rb b/lib/crimson-falcon/models/api_notification_exposed_data_record_v1.rb index cdcba1be..0a2a50c2 100644 --- a/lib/crimson-falcon/models/api_notification_exposed_data_record_v1.rb +++ b/lib/crimson-falcon/models/api_notification_exposed_data_record_v1.rb @@ -38,6 +38,8 @@ class ApiNotificationExposedDataRecordV1 # The ID of the author within Recon attr_accessor :author_id + attr_accessor :bot + # The customer ID attr_accessor :cid @@ -47,6 +49,9 @@ class ApiNotificationExposedDataRecordV1 # The date when this entity was created in Recon attr_accessor :created_date + # The status set after deduplication. Possible values: 'newly_detected', 'previously_reported', 'other' + attr_accessor :credential_status + # The domain where the credentials are valid attr_accessor :credentials_domain @@ -91,6 +96,9 @@ class ApiNotificationExposedDataRecordV1 attr_accessor :login_id + # Information of the bot malware family + attr_accessor :malware_family + # The ID of the parent notification associated with this entity attr_accessor :notification_id @@ -134,9 +142,11 @@ def self.attribute_map { :'author' => :'author', :'author_id' => :'author_id', + :'bot' => :'bot', :'cid' => :'cid', :'company' => :'company', :'created_date' => :'created_date', + :'credential_status' => :'credential_status', :'credentials_domain' => :'credentials_domain', :'credentials_ip' => :'credentials_ip', :'credentials_url' => :'credentials_url', @@ -153,6 +163,7 @@ def self.attribute_map :'job_position' => :'job_position', :'location' => :'location', :'login_id' => :'login_id', + :'malware_family' => :'malware_family', :'notification_id' => :'notification_id', :'password' => :'password', :'password_hash' => :'password_hash', @@ -180,9 +191,11 @@ def self.openapi_types { :'author' => :'String', :'author_id' => :'String', + :'bot' => :'ApiExposedDataRecordBotV1', :'cid' => :'String', :'company' => :'String', :'created_date' => :'Time', + :'credential_status' => :'String', :'credentials_domain' => :'String', :'credentials_ip' => :'String', :'credentials_url' => :'String', @@ -199,6 +212,7 @@ def self.openapi_types :'job_position' => :'String', :'location' => :'ApiExposedDataRecordLocationV1', :'login_id' => :'String', + :'malware_family' => :'String', :'notification_id' => :'String', :'password' => :'String', :'password_hash' => :'String', @@ -245,6 +259,10 @@ def initialize(attributes = {}) self.author_id = attributes[:'author_id'] end + if attributes.key?(:'bot') + self.bot = attributes[:'bot'] + end + if attributes.key?(:'cid') self.cid = attributes[:'cid'] end @@ -257,6 +275,10 @@ def initialize(attributes = {}) self.created_date = attributes[:'created_date'] end + if attributes.key?(:'credential_status') + self.credential_status = attributes[:'credential_status'] + end + if attributes.key?(:'credentials_domain') self.credentials_domain = attributes[:'credentials_domain'] end @@ -321,6 +343,10 @@ def initialize(attributes = {}) self.login_id = attributes[:'login_id'] end + if attributes.key?(:'malware_family') + self.malware_family = attributes[:'malware_family'] + end + if attributes.key?(:'notification_id') self.notification_id = attributes[:'notification_id'] end @@ -458,9 +484,11 @@ def ==(o) self.class == o.class && author == o.author && author_id == o.author_id && + bot == o.bot && cid == o.cid && company == o.company && created_date == o.created_date && + credential_status == o.credential_status && credentials_domain == o.credentials_domain && credentials_ip == o.credentials_ip && credentials_url == o.credentials_url && @@ -477,6 +505,7 @@ def ==(o) job_position == o.job_position && location == o.location && login_id == o.login_id && + malware_family == o.malware_family && notification_id == o.notification_id && password == o.password && password_hash == o.password_hash && @@ -502,7 +531,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [author, author_id, cid, company, created_date, credentials_domain, credentials_ip, credentials_url, display_name, domain, email, event_date, exposure_date, file, financial, full_name, hash_type, id, job_position, location, login_id, notification_id, password, password_hash, password_salt, phone_number, raw_intel_id, rule, site, site_id, social, source_category, user_id, user_ip, user_uuid].hash + [author, author_id, bot, cid, company, created_date, credential_status, credentials_domain, credentials_ip, credentials_url, display_name, domain, email, event_date, exposure_date, file, financial, full_name, hash_type, id, job_position, location, login_id, malware_family, notification_id, password, password_hash, password_salt, phone_number, raw_intel_id, rule, site, site_id, social, source_category, user_id, user_ip, user_uuid].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/api_object_metadata.rb b/lib/crimson-falcon/models/api_object_metadata.rb new file mode 100644 index 00000000..8e361fd3 --- /dev/null +++ b/lib/crimson-falcon/models/api_object_metadata.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 ApiObjectMetadata + attr_accessor :collection_name + + attr_accessor :last_modified_time + + attr_accessor :namespace + + attr_accessor :object_key + + attr_accessor :schema_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'collection_name' => :'collection_name', + :'last_modified_time' => :'last_modified_time', + :'namespace' => :'namespace', + :'object_key' => :'object_key', + :'schema_version' => :'schema_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 + { + :'collection_name' => :'String', + :'last_modified_time' => :'Time', + :'namespace' => :'String', + :'object_key' => :'String', + :'schema_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::ApiObjectMetadata` 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::ApiObjectMetadata`. 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?(:'collection_name') + self.collection_name = attributes[:'collection_name'] + end + + if attributes.key?(:'last_modified_time') + self.last_modified_time = attributes[:'last_modified_time'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'object_key') + self.object_key = attributes[:'object_key'] + end + + if attributes.key?(:'schema_version') + self.schema_version = attributes[:'schema_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 @collection_name.nil? + invalid_properties.push('invalid value for "collection_name", collection_name cannot be nil.') + end + + if @namespace.nil? + invalid_properties.push('invalid value for "namespace", namespace cannot be nil.') + end + + if @object_key.nil? + invalid_properties.push('invalid value for "object_key", object_key cannot be nil.') + end + + if @schema_version.nil? + invalid_properties.push('invalid value for "schema_version", schema_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 @collection_name.nil? + return false if @namespace.nil? + return false if @object_key.nil? + return false if @schema_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 && + collection_name == o.collection_name && + last_modified_time == o.last_modified_time && + namespace == o.namespace && + object_key == o.object_key && + schema_version == o.schema_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 + [collection_name, last_modified_time, namespace, object_key, schema_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/api_processes_ran_on_resp_v1.rb b/lib/crimson-falcon/models/api_processes_ran_on_resp_v1.rb new file mode 100644 index 00000000..3aa19b84 --- /dev/null +++ b/lib/crimson-falcon/models/api_processes_ran_on_resp_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 ApiProcessesRanOnRespV1 + 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' => :'ApiDetectsQueryMeta', + :'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::ApiProcessesRanOnRespV1` 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::ApiProcessesRanOnRespV1`. 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 @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 @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_aggregates_response.rb b/lib/crimson-falcon/models/api_resource_ids_response.rb similarity index 96% rename from lib/crimson-falcon/models/api_aggregates_response.rb rename to lib/crimson-falcon/models/api_resource_ids_response.rb index 80bc7cc1..e3cb1c7f 100644 --- a/lib/crimson-falcon/models/api_aggregates_response.rb +++ b/lib/crimson-falcon/models/api_resource_ids_response.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class ApiAggregatesResponse + class ApiResourceIDsResponse attr_accessor :errors attr_accessor :meta @@ -57,7 +57,7 @@ def self.openapi_types { :'errors' => :'Array', :'meta' => :'MsaspecMetaInfo', - :'resources' => :'Array' + :'resources' => :'Array' } end @@ -71,13 +71,13 @@ 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::ApiAggregatesResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ApiResourceIDsResponse` 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::ApiAggregatesResponse`. 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::ApiResourceIDsResponse`. 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 } diff --git a/lib/crimson-falcon/models/api_response_pagination.rb b/lib/crimson-falcon/models/api_response_pagination.rb new file mode 100644 index 00000000..0ddac45d --- /dev/null +++ b/lib/crimson-falcon/models/api_response_pagination.rb @@ -0,0 +1,249 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ApiResponsePagination + attr_accessor :offset + + # The total number of elements + attr_accessor :total + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'offset' => :'Object', + :'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::ApiResponsePagination` 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::ApiResponsePagination`. 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?(:'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 @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 @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 && + 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 + [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/apidomain_dynamic_execute_search_request_v1.rb b/lib/crimson-falcon/models/apidomain_dynamic_execute_search_request_v1.rb new file mode 100644 index 00000000..c7363f6f --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_dynamic_execute_search_request_v1.rb @@ -0,0 +1,285 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ApidomainDynamicExecuteSearchRequestV1 + attr_accessor :_end + + attr_accessor :repo_or_view + + attr_accessor :search_query + + attr_accessor :search_query_args + + attr_accessor :start + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_end' => :'end', + :'repo_or_view' => :'repo_or_view', + :'search_query' => :'search_query', + :'search_query_args' => :'search_query_args', + :'start' => :'start' + } + 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 + { + :'_end' => :'String', + :'repo_or_view' => :'String', + :'search_query' => :'String', + :'search_query_args' => :'Object', + :'start' => :'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::ApidomainDynamicExecuteSearchRequestV1` 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::ApidomainDynamicExecuteSearchRequestV1`. 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?(:'_end') + self._end = attributes[:'_end'] + end + + if attributes.key?(:'repo_or_view') + self.repo_or_view = attributes[:'repo_or_view'] + end + + if attributes.key?(:'search_query') + self.search_query = attributes[:'search_query'] + end + + if attributes.key?(:'search_query_args') + self.search_query_args = attributes[:'search_query_args'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] + 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 @repo_or_view.nil? + invalid_properties.push('invalid value for "repo_or_view", repo_or_view cannot be nil.') + end + + if @search_query.nil? + invalid_properties.push('invalid value for "search_query", search_query cannot be nil.') + end + + if @search_query_args.nil? + invalid_properties.push('invalid value for "search_query_args", search_query_args 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 @repo_or_view.nil? + return false if @search_query.nil? + return false if @search_query_args.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 && + _end == o._end && + repo_or_view == o.repo_or_view && + search_query == o.search_query && + search_query_args == o.search_query_args && + start == o.start + 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 + [_end, repo_or_view, search_query, search_query_args, start].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/apidomain_query_response_v1.rb b/lib/crimson-falcon/models/apidomain_query_response_v1.rb new file mode 100644 index 00000000..90b58540 --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_query_response_v1.rb @@ -0,0 +1,293 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ApidomainQueryResponseV1 + attr_accessor :event_count + + attr_accessor :events + + attr_accessor :fields + + attr_accessor :job_status + + attr_accessor :meta_data + + attr_accessor :schemas + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'event_count' => :'event_count', + :'events' => :'events', + :'fields' => :'fields', + :'job_status' => :'job_status', + :'meta_data' => :'meta_data', + :'schemas' => :'schemas' + } + 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 + { + :'event_count' => :'Integer', + :'events' => :'Array', + :'fields' => :'Array', + :'job_status' => :'ClientJobStatus', + :'meta_data' => :'ClientQueryResultMetadata', + :'schemas' => :'ClientQueryResponseSchemasV1' + } + 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::ApidomainQueryResponseV1` 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::ApidomainQueryResponseV1`. 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?(:'event_count') + self.event_count = attributes[:'event_count'] + end + + if attributes.key?(:'events') + if (value = attributes[:'events']).is_a?(Array) + self.events = value + end + end + + if attributes.key?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + end + + if attributes.key?(:'job_status') + self.job_status = attributes[:'job_status'] + end + + if attributes.key?(:'meta_data') + self.meta_data = attributes[:'meta_data'] + end + + if attributes.key?(:'schemas') + self.schemas = attributes[:'schemas'] + 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 @event_count.nil? + invalid_properties.push('invalid value for "event_count", event_count cannot be nil.') + end + + if @events.nil? + invalid_properties.push('invalid value for "events", events 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 @event_count.nil? + return false if @events.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 && + event_count == o.event_count && + events == o.events && + fields == o.fields && + job_status == o.job_status && + meta_data == o.meta_data && + schemas == o.schemas + 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 + [event_count, events, fields, job_status, meta_data, schemas].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/apidomain_query_response_wrapper_v1.rb b/lib/crimson-falcon/models/apidomain_query_response_wrapper_v1.rb new file mode 100644 index 00000000..763c7f47 --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_query_response_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 ApidomainQueryResponseWrapperV1 + 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' => :'MsaspecMetaInfo', + :'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::ApidomainQueryResponseWrapperV1` 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::ApidomainQueryResponseWrapperV1`. 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/apidomain_repo_view_list_item_v1.rb b/lib/crimson-falcon/models/apidomain_repo_view_list_item_v1.rb new file mode 100644 index 00000000..5c8d1d1b --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_repo_view_list_item_v1.rb @@ -0,0 +1,343 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ApidomainRepoViewListItemV1 + attr_accessor :connections + + attr_accessor :description + + attr_accessor :display_name + + attr_accessor :has_test_data + + attr_accessor :id + + attr_accessor :name + + attr_accessor :name_contracted + + attr_accessor :size + + attr_accessor :type_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'connections' => :'connections', + :'description' => :'description', + :'display_name' => :'display_name', + :'has_test_data' => :'has_test_data', + :'id' => :'id', + :'name' => :'name', + :'name_contracted' => :'name_contracted', + :'size' => :'size', + :'type_name' => :'type_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 + { + :'connections' => :'Array', + :'description' => :'String', + :'display_name' => :'String', + :'has_test_data' => :'Boolean', + :'id' => :'String', + :'name' => :'String', + :'name_contracted' => :'String', + :'size' => :'Integer', + :'type_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::ApidomainRepoViewListItemV1` 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::ApidomainRepoViewListItemV1`. 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?(:'connections') + if (value = attributes[:'connections']).is_a?(Array) + self.connections = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'has_test_data') + self.has_test_data = attributes[:'has_test_data'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'name_contracted') + self.name_contracted = attributes[:'name_contracted'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'type_name') + self.type_name = attributes[:'type_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 @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @display_name.nil? + invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') + end + + if @has_test_data.nil? + invalid_properties.push('invalid value for "has_test_data", has_test_data 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 @name_contracted.nil? + invalid_properties.push('invalid value for "name_contracted", name_contracted cannot be nil.') + end + + if @type_name.nil? + invalid_properties.push('invalid value for "type_name", type_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 @description.nil? + return false if @display_name.nil? + return false if @has_test_data.nil? + return false if @id.nil? + return false if @name.nil? + return false if @name_contracted.nil? + return false if @type_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 && + connections == o.connections && + description == o.description && + display_name == o.display_name && + has_test_data == o.has_test_data && + id == o.id && + name == o.name && + name_contracted == o.name_contracted && + size == o.size && + type_name == o.type_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 + [connections, description, display_name, has_test_data, id, name, name_contracted, size, type_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/apidomain_repo_view_list_item_wrapper_v1.rb b/lib/crimson-falcon/models/apidomain_repo_view_list_item_wrapper_v1.rb new file mode 100644 index 00000000..71cc2548 --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_repo_view_list_item_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 ApidomainRepoViewListItemWrapperV1 + 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' => :'MsaspecMetaInfo', + :'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::ApidomainRepoViewListItemWrapperV1` 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::ApidomainRepoViewListItemWrapperV1`. 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/apidomain_repository_v1.rb b/lib/crimson-falcon/models/apidomain_repository_v1.rb new file mode 100644 index 00000000..0d128bb3 --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_repository_v1.rb @@ -0,0 +1,295 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ApidomainRepositoryV1 + attr_accessor :description + + attr_accessor :display_name + + attr_accessor :id + + attr_accessor :name + + attr_accessor :size + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'display_name' => :'display_name', + :'id' => :'id', + :'name' => :'name', + :'size' => :'size' + } + 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', + :'display_name' => :'String', + :'id' => :'String', + :'name' => :'String', + :'size' => :'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::ApidomainRepositoryV1` 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::ApidomainRepositoryV1`. 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?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + 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 @display_name.nil? + invalid_properties.push('invalid value for "display_name", display_name 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 @size.nil? + invalid_properties.push('invalid value for "size", size 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 @display_name.nil? + return false if @id.nil? + return false if @name.nil? + return false if @size.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 && + display_name == o.display_name && + id == o.id && + name == o.name && + size == o.size + 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, display_name, id, name, size].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/apidomain_saved_search_execute_request_v1.rb b/lib/crimson-falcon/models/apidomain_saved_search_execute_request_v1.rb new file mode 100644 index 00000000..7ce1d266 --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_saved_search_execute_request_v1.rb @@ -0,0 +1,326 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ApidomainSavedSearchExecuteRequestV1 + attr_accessor :_end + + attr_accessor :id + + attr_accessor :mode + + attr_accessor :name + + attr_accessor :parameters + + attr_accessor :start + + attr_accessor :version + + attr_accessor :with_in + + attr_accessor :with_limit + + attr_accessor :with_renames + + attr_accessor :with_sort + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_end' => :'end', + :'id' => :'id', + :'mode' => :'mode', + :'name' => :'name', + :'parameters' => :'parameters', + :'start' => :'start', + :'version' => :'version', + :'with_in' => :'with_in', + :'with_limit' => :'with_limit', + :'with_renames' => :'with_renames', + :'with_sort' => :'with_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 + { + :'_end' => :'String', + :'id' => :'String', + :'mode' => :'String', + :'name' => :'String', + :'parameters' => :'Object', + :'start' => :'String', + :'version' => :'String', + :'with_in' => :'ClientExtraIn', + :'with_limit' => :'ClientExtraLimit', + :'with_renames' => :'Array', + :'with_sort' => :'ClientExtraSort' + } + 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::ApidomainSavedSearchExecuteRequestV1` 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::ApidomainSavedSearchExecuteRequestV1`. 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?(:'_end') + self._end = attributes[:'_end'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'start') + self.start = attributes[:'start'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'with_in') + self.with_in = attributes[:'with_in'] + end + + if attributes.key?(:'with_limit') + self.with_limit = attributes[:'with_limit'] + end + + if attributes.key?(:'with_renames') + if (value = attributes[:'with_renames']).is_a?(Array) + self.with_renames = value + end + end + + if attributes.key?(:'with_sort') + self.with_sort = attributes[:'with_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 && + _end == o._end && + id == o.id && + mode == o.mode && + name == o.name && + parameters == o.parameters && + start == o.start && + version == o.version && + with_in == o.with_in && + with_limit == o.with_limit && + with_renames == o.with_renames && + with_sort == o.with_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 + [_end, id, mode, name, parameters, start, version, with_in, with_limit, with_renames, with_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/apidomain_view_connection_v1.rb b/lib/crimson-falcon/models/apidomain_view_connection_v1.rb new file mode 100644 index 00000000..77c7c989 --- /dev/null +++ b/lib/crimson-falcon/models/apidomain_view_connection_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 ApidomainViewConnectionV1 + attr_accessor :filter + + attr_accessor :repository + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filter' => :'filter', + :'repository' => :'repository' + } + 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', + :'repository' => :'ApidomainRepositoryV1' + } + 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::ApidomainViewConnectionV1` 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::ApidomainViewConnectionV1`. 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?(:'repository') + self.repository = attributes[:'repository'] + 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 @repository.nil? + invalid_properties.push('invalid value for "repository", repository 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 @repository.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 && + repository == o.repository + 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, repository].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/public_acl.rb b/lib/crimson-falcon/models/changes_acl.rb similarity index 96% rename from lib/crimson-falcon/models/public_acl.rb rename to lib/crimson-falcon/models/changes_acl.rb index 09691088..84b1c694 100644 --- a/lib/crimson-falcon/models/public_acl.rb +++ b/lib/crimson-falcon/models/changes_acl.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicACL + class ChangesACL attr_accessor :acl_permission_change attr_accessor :entity @@ -58,7 +58,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'acl_permission_change' => :'Array', + :'acl_permission_change' => :'Array', :'entity' => :'String', :'entity_id' => :'String', :'entity_name' => :'String' @@ -75,13 +75,13 @@ 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::PublicACL` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesACL` 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::PublicACL`. 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::ChangesACL`. 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 } diff --git a/lib/crimson-falcon/models/public_acl_change.rb b/lib/crimson-falcon/models/changes_acl_change.rb similarity index 97% rename from lib/crimson-falcon/models/public_acl_change.rb rename to lib/crimson-falcon/models/changes_acl_change.rb index d07fa37c..bebeb110 100644 --- a/lib/crimson-falcon/models/public_acl_change.rb +++ b/lib/crimson-falcon/models/changes_acl_change.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicACLChange + class ChangesACLChange attr_accessor :operation attr_accessor :permissions @@ -67,13 +67,13 @@ 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::PublicACLChange` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesACLChange` 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::PublicACLChange`. 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::ChangesACLChange`. 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 } diff --git a/lib/crimson-falcon/models/public_before.rb b/lib/crimson-falcon/models/changes_after.rb similarity index 98% rename from lib/crimson-falcon/models/public_before.rb rename to lib/crimson-falcon/models/changes_after.rb index 5e5f84ba..f17b0271 100644 --- a/lib/crimson-falcon/models/public_before.rb +++ b/lib/crimson-falcon/models/changes_after.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicBefore + class ChangesAfter attr_accessor :id attr_accessor :name @@ -67,13 +67,13 @@ 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::PublicBefore` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesAfter` 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::PublicBefore`. 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::ChangesAfter`. 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 } diff --git a/lib/crimson-falcon/models/public_attribute.rb b/lib/crimson-falcon/models/changes_attribute.rb similarity index 97% rename from lib/crimson-falcon/models/public_attribute.rb rename to lib/crimson-falcon/models/changes_attribute.rb index 03418cb2..8a97d68b 100644 --- a/lib/crimson-falcon/models/public_attribute.rb +++ b/lib/crimson-falcon/models/changes_attribute.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicAttribute + class ChangesAttribute attr_accessor :attribute attr_accessor :change @@ -67,13 +67,13 @@ 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::PublicAttribute` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesAttribute` 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::PublicAttribute`. 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::ChangesAttribute`. 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 } diff --git a/lib/crimson-falcon/models/public_basic.rb b/lib/crimson-falcon/models/changes_basic.rb similarity index 97% rename from lib/crimson-falcon/models/public_basic.rb rename to lib/crimson-falcon/models/changes_basic.rb index 15ee6956..58079f28 100644 --- a/lib/crimson-falcon/models/public_basic.rb +++ b/lib/crimson-falcon/models/changes_basic.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicBasic + class ChangesBasic attr_accessor :entity attr_accessor :operation @@ -71,13 +71,13 @@ 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::PublicBasic` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesBasic` 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::PublicBasic`. 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::ChangesBasic`. 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 } diff --git a/lib/crimson-falcon/models/public_after.rb b/lib/crimson-falcon/models/changes_before.rb similarity index 97% rename from lib/crimson-falcon/models/public_after.rb rename to lib/crimson-falcon/models/changes_before.rb index 12042cf1..741a89c0 100644 --- a/lib/crimson-falcon/models/public_after.rb +++ b/lib/crimson-falcon/models/changes_before.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicAfter + class ChangesBefore attr_accessor :id attr_accessor :name @@ -67,13 +67,13 @@ 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::PublicAfter` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesBefore` 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::PublicAfter`. 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::ChangesBefore`. 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 } diff --git a/lib/crimson-falcon/models/public_change.rb b/lib/crimson-falcon/models/changes_change.rb similarity index 96% rename from lib/crimson-falcon/models/public_change.rb rename to lib/crimson-falcon/models/changes_change.rb index 427a41c7..f3996183 100644 --- a/lib/crimson-falcon/models/public_change.rb +++ b/lib/crimson-falcon/models/changes_change.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicChange + class ChangesChange attr_accessor :action_timestamp # Possible values: UNKNOWN, CREATE, WRITE, DELETE, SET, RENAME. @@ -142,31 +142,31 @@ def self.openapi_types :'action_timestamp' => :'String', :'action_type' => :'String', :'aid' => :'String', - :'attributes' => :'Array', + :'attributes' => :'Array', :'cid' => :'String', :'command_line' => :'String', - :'diff' => :'PublicDiff', + :'diff' => :'ChangesDiff', :'entity_path' => :'String', :'entity_path_new' => :'String', :'entity_type' => :'String', :'grandparent_process_image_file_name' => :'String', - :'host' => :'PublicHost', + :'host' => :'ChangesHost', :'id' => :'String', :'ingestion_timestamp' => :'String', :'is_from_different_mount_namespace' => :'Boolean', :'is_suppressed' => :'Boolean', :'oci_container_id' => :'String', :'parent_process_image_file_name' => :'String', - :'permissions' => :'PublicPermissions', - :'permissions_lin' => :'PublicPermissionsLin', + :'permissions' => :'ChangesPermissions', + :'permissions_lin' => :'ChangesPermissionsLin', :'platform_name' => :'String', - :'policy' => :'PublicPolicy', - :'prevalence' => :'PublicPrevalence', + :'policy' => :'ChangesPolicy', + :'prevalence' => :'ChangesPrevalence', :'process_id' => :'String', :'process_image_file_name' => :'String', :'real_user_id' => :'String', :'severity' => :'String', - :'tags' => :'Array', + :'tags' => :'Array', :'user_id' => :'String', :'user_name' => :'String' } @@ -182,13 +182,13 @@ 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::PublicChange` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesChange` 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::PublicChange`. 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::ChangesChange`. 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 } diff --git a/lib/crimson-falcon/models/public_dacl.rb b/lib/crimson-falcon/models/changes_dacl.rb similarity index 96% rename from lib/crimson-falcon/models/public_dacl.rb rename to lib/crimson-falcon/models/changes_dacl.rb index 3971ba47..ed713403 100644 --- a/lib/crimson-falcon/models/public_dacl.rb +++ b/lib/crimson-falcon/models/changes_dacl.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicDACL + class ChangesDACL # Possible values: 0 - MODIFIED, 1 - NULL, 2 - EMPTY, 3 - SAME attr_accessor :changes_type @@ -54,7 +54,7 @@ def self.acceptable_attributes def self.openapi_types { :'changes_type' => :'Integer', - :'entity_list' => :'Array' + :'entity_list' => :'Array' } end @@ -68,13 +68,13 @@ 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::PublicDACL` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesDACL` 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::PublicDACL`. 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::ChangesDACL`. 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 } diff --git a/lib/crimson-falcon/models/public_dacl_entity.rb b/lib/crimson-falcon/models/changes_dacl_entity.rb similarity index 91% rename from lib/crimson-falcon/models/public_dacl_entity.rb rename to lib/crimson-falcon/models/changes_dacl_entity.rb index 14ab5c70..262412ab 100644 --- a/lib/crimson-falcon/models/public_dacl_entity.rb +++ b/lib/crimson-falcon/models/changes_dacl_entity.rb @@ -31,13 +31,15 @@ require 'time' module Falcon - class PublicDACLEntity + class ChangesDACLEntity attr_accessor :acl_change_type attr_accessor :acl_permission_change attr_accessor :acl_principal + attr_accessor :acl_principal_id + # Possible values: 0 - ALLOW, 1 - DENY attr_accessor :acl_type @@ -47,6 +49,7 @@ def self.attribute_map :'acl_change_type' => :'acl_change_type', :'acl_permission_change' => :'acl_permission_change', :'acl_principal' => :'acl_principal', + :'acl_principal_id' => :'acl_principal_id', :'acl_type' => :'acl_type' } end @@ -60,8 +63,9 @@ def self.acceptable_attributes def self.openapi_types { :'acl_change_type' => :'Integer', - :'acl_permission_change' => :'Array', + :'acl_permission_change' => :'Array', :'acl_principal' => :'String', + :'acl_principal_id' => :'String', :'acl_type' => :'Integer' } end @@ -76,13 +80,13 @@ 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::PublicDACLEntity` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesDACLEntity` 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::PublicDACLEntity`. 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::ChangesDACLEntity`. 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 } @@ -101,6 +105,10 @@ def initialize(attributes = {}) self.acl_principal = attributes[:'acl_principal'] end + if attributes.key?(:'acl_principal_id') + self.acl_principal_id = attributes[:'acl_principal_id'] + end + if attributes.key?(:'acl_type') self.acl_type = attributes[:'acl_type'] end @@ -118,6 +126,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "acl_principal", acl_principal cannot be nil.') end + if @acl_principal_id.nil? + invalid_properties.push('invalid value for "acl_principal_id", acl_principal_id cannot be nil.') + end + if @acl_type.nil? invalid_properties.push('invalid value for "acl_type", acl_type cannot be nil.') end @@ -130,6 +142,7 @@ def list_invalid_properties def valid? return false if @acl_permission_change.nil? return false if @acl_principal.nil? + return false if @acl_principal_id.nil? return false if @acl_type.nil? true end @@ -142,6 +155,7 @@ def ==(o) acl_change_type == o.acl_change_type && acl_permission_change == o.acl_permission_change && acl_principal == o.acl_principal && + acl_principal_id == o.acl_principal_id && acl_type == o.acl_type end @@ -154,7 +168,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [acl_change_type, acl_permission_change, acl_principal, acl_type].hash + [acl_change_type, acl_permission_change, acl_principal, acl_principal_id, acl_type].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/public_diff.rb b/lib/crimson-falcon/models/changes_diff.rb similarity index 96% rename from lib/crimson-falcon/models/public_diff.rb rename to lib/crimson-falcon/models/changes_diff.rb index 5b74285b..64de72bd 100644 --- a/lib/crimson-falcon/models/public_diff.rb +++ b/lib/crimson-falcon/models/changes_diff.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicDiff + class ChangesDiff attr_accessor :after # Attribute mapping from ruby-style variable name to JSON key. @@ -49,7 +49,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'after' => :'PublicDiffType' + :'after' => :'ChangesDiffType' } end @@ -63,13 +63,13 @@ 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::PublicDiff` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesDiff` 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::PublicDiff`. 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::ChangesDiff`. 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 } diff --git a/lib/crimson-falcon/models/public_diff_hash.rb b/lib/crimson-falcon/models/changes_diff_hash.rb similarity index 96% rename from lib/crimson-falcon/models/public_diff_hash.rb rename to lib/crimson-falcon/models/changes_diff_hash.rb index 3f12ed0d..ab9abbe2 100644 --- a/lib/crimson-falcon/models/public_diff_hash.rb +++ b/lib/crimson-falcon/models/changes_diff_hash.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicDiffHash + class ChangesDiffHash attr_accessor :sha256 # Attribute mapping from ruby-style variable name to JSON key. @@ -63,13 +63,13 @@ 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::PublicDiffHash` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesDiffHash` 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::PublicDiffHash`. 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::ChangesDiffHash`. 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 } diff --git a/lib/crimson-falcon/models/public_diff_type.rb b/lib/crimson-falcon/models/changes_diff_type.rb similarity index 96% rename from lib/crimson-falcon/models/public_diff_type.rb rename to lib/crimson-falcon/models/changes_diff_type.rb index ffe8f4bc..48d284e6 100644 --- a/lib/crimson-falcon/models/public_diff_type.rb +++ b/lib/crimson-falcon/models/changes_diff_type.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicDiffType + class ChangesDiffType attr_accessor :hash # Attribute mapping from ruby-style variable name to JSON key. @@ -49,7 +49,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'hash' => :'PublicDiffHash' + :'hash' => :'ChangesDiffHash' } end @@ -63,13 +63,13 @@ 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::PublicDiffType` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesDiffType` 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::PublicDiffType`. 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::ChangesDiffType`. 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 } diff --git a/lib/crimson-falcon/models/changes_get_changes_response.rb b/lib/crimson-falcon/models/changes_get_changes_response.rb new file mode 100644 index 00000000..854aaab8 --- /dev/null +++ b/lib/crimson-falcon/models/changes_get_changes_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 ChangesGetChangesResponse + 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' => :'MsaspecMetaInfo', + :'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::ChangesGetChangesResponse` 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::ChangesGetChangesResponse`. 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/public_owner.rb b/lib/crimson-falcon/models/changes_group.rb similarity index 96% rename from lib/crimson-falcon/models/public_owner.rb rename to lib/crimson-falcon/models/changes_group.rb index 2f899ecb..c08a94da 100644 --- a/lib/crimson-falcon/models/public_owner.rb +++ b/lib/crimson-falcon/models/changes_group.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicOwner + class ChangesGroup attr_accessor :after attr_accessor :before @@ -52,8 +52,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'after' => :'PublicAfter', - :'before' => :'PublicBefore' + :'after' => :'ChangesAfter', + :'before' => :'ChangesBefore' } end @@ -67,13 +67,13 @@ 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::PublicOwner` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesGroup` 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::PublicOwner`. 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::ChangesGroup`. 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 } diff --git a/lib/crimson-falcon/models/changes_high_volume_query_meta.rb b/lib/crimson-falcon/models/changes_high_volume_query_meta.rb new file mode 100644 index 00000000..3923ee7f --- /dev/null +++ b/lib/crimson-falcon/models/changes_high_volume_query_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 ChangesHighVolumeQueryMeta + 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' => :'ChangesHighVolumeQueryPaging', + :'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::ChangesHighVolumeQueryMeta` 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::ChangesHighVolumeQueryMeta`. 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/changes_high_volume_query_paging.rb b/lib/crimson-falcon/models/changes_high_volume_query_paging.rb new file mode 100644 index 00000000..5425cc2a --- /dev/null +++ b/lib/crimson-falcon/models/changes_high_volume_query_paging.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 ChangesHighVolumeQueryPaging + 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::ChangesHighVolumeQueryPaging` 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::ChangesHighVolumeQueryPaging`. 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 @after.nil? + invalid_properties.push('invalid value for "after", after cannot be nil.') + end + + 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 @after.nil? + 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/changes_high_volume_query_response.rb b/lib/crimson-falcon/models/changes_high_volume_query_response.rb new file mode 100644 index 00000000..637ea752 --- /dev/null +++ b/lib/crimson-falcon/models/changes_high_volume_query_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 ChangesHighVolumeQueryResponse + 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' => :'ChangesHighVolumeQueryMeta', + :'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::ChangesHighVolumeQueryResponse` 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::ChangesHighVolumeQueryResponse`. 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/public_host.rb b/lib/crimson-falcon/models/changes_host.rb similarity index 97% rename from lib/crimson-falcon/models/public_host.rb rename to lib/crimson-falcon/models/changes_host.rb index 1af339ea..48fac3a3 100644 --- a/lib/crimson-falcon/models/public_host.rb +++ b/lib/crimson-falcon/models/changes_host.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicHost + class ChangesHost attr_accessor :agent_version attr_accessor :containment_status @@ -70,7 +70,7 @@ def self.openapi_types :'agent_version' => :'String', :'containment_status' => :'String', :'external_ip' => :'String', - :'groups' => :'Array', + :'groups' => :'Array', :'local_ip' => :'String', :'name' => :'String', :'os_version' => :'String' @@ -87,13 +87,13 @@ 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::PublicHost` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesHost` 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::PublicHost`. 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::ChangesHost`. 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 } diff --git a/lib/crimson-falcon/models/public_host_group.rb b/lib/crimson-falcon/models/changes_host_group.rb similarity index 96% rename from lib/crimson-falcon/models/public_host_group.rb rename to lib/crimson-falcon/models/changes_host_group.rb index 90f3dbf9..b4be68cb 100644 --- a/lib/crimson-falcon/models/public_host_group.rb +++ b/lib/crimson-falcon/models/changes_host_group.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicHostGroup + class ChangesHostGroup attr_accessor :name # Attribute mapping from ruby-style variable name to JSON key. @@ -63,13 +63,13 @@ 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::PublicHostGroup` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesHostGroup` 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::PublicHostGroup`. 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::ChangesHostGroup`. 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 } diff --git a/lib/crimson-falcon/models/public_group.rb b/lib/crimson-falcon/models/changes_owner.rb similarity index 96% rename from lib/crimson-falcon/models/public_group.rb rename to lib/crimson-falcon/models/changes_owner.rb index 56430cf3..0f80e755 100644 --- a/lib/crimson-falcon/models/public_group.rb +++ b/lib/crimson-falcon/models/changes_owner.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicGroup + class ChangesOwner attr_accessor :after attr_accessor :before @@ -52,8 +52,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'after' => :'PublicAfter', - :'before' => :'PublicBefore' + :'after' => :'ChangesAfter', + :'before' => :'ChangesBefore' } end @@ -67,13 +67,13 @@ 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::PublicGroup` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesOwner` 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::PublicGroup`. 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::ChangesOwner`. 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 } diff --git a/lib/crimson-falcon/models/public_permissions.rb b/lib/crimson-falcon/models/changes_permissions.rb similarity index 95% rename from lib/crimson-falcon/models/public_permissions.rb rename to lib/crimson-falcon/models/changes_permissions.rb index 3d8837b4..65f028c4 100644 --- a/lib/crimson-falcon/models/public_permissions.rb +++ b/lib/crimson-falcon/models/changes_permissions.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicPermissions + class ChangesPermissions attr_accessor :dacl attr_accessor :group @@ -59,9 +59,9 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'dacl' => :'PublicDACL', - :'group' => :'PublicGroup', - :'owner' => :'PublicOwner', + :'dacl' => :'ChangesDACL', + :'group' => :'ChangesGroup', + :'owner' => :'ChangesOwner', :'security_info' => :'Integer' } end @@ -76,13 +76,13 @@ 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::PublicPermissions` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesPermissions` 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::PublicPermissions`. 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::ChangesPermissions`. 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 } diff --git a/lib/crimson-falcon/models/public_permissions_lin.rb b/lib/crimson-falcon/models/changes_permissions_lin.rb similarity index 94% rename from lib/crimson-falcon/models/public_permissions_lin.rb rename to lib/crimson-falcon/models/changes_permissions_lin.rb index d1c37f07..332203cd 100644 --- a/lib/crimson-falcon/models/public_permissions_lin.rb +++ b/lib/crimson-falcon/models/changes_permissions_lin.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicPermissionsLin + class ChangesPermissionsLin attr_accessor :acl attr_accessor :basic @@ -64,11 +64,11 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'acl' => :'Array', - :'basic' => :'Array', - :'default_acl' => :'Array', - :'group' => :'PublicGroup', - :'owner' => :'PublicOwner', + :'acl' => :'Array', + :'basic' => :'Array', + :'default_acl' => :'Array', + :'group' => :'ChangesGroup', + :'owner' => :'ChangesOwner', :'security_info' => :'Integer' } end @@ -83,13 +83,13 @@ 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::PublicPermissionsLin` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesPermissionsLin` 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::PublicPermissionsLin`. 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::ChangesPermissionsLin`. 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 } diff --git a/lib/crimson-falcon/models/public_policy.rb b/lib/crimson-falcon/models/changes_policy.rb similarity index 96% rename from lib/crimson-falcon/models/public_policy.rb rename to lib/crimson-falcon/models/changes_policy.rb index 5fed4864..16f10d5d 100644 --- a/lib/crimson-falcon/models/public_policy.rb +++ b/lib/crimson-falcon/models/changes_policy.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicPolicy + class ChangesPolicy attr_accessor :name attr_accessor :rule_group @@ -53,7 +53,7 @@ def self.acceptable_attributes def self.openapi_types { :'name' => :'String', - :'rule_group' => :'PublicPolicyRuleGroup' + :'rule_group' => :'ChangesPolicyRuleGroup' } end @@ -67,13 +67,13 @@ 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::PublicPolicy` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesPolicy` 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::PublicPolicy`. 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::ChangesPolicy`. 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 } diff --git a/lib/crimson-falcon/models/public_policy_rule.rb b/lib/crimson-falcon/models/changes_policy_rule.rb similarity index 96% rename from lib/crimson-falcon/models/public_policy_rule.rb rename to lib/crimson-falcon/models/changes_policy_rule.rb index 86a94fa5..13a97374 100644 --- a/lib/crimson-falcon/models/public_policy_rule.rb +++ b/lib/crimson-falcon/models/changes_policy_rule.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicPolicyRule + class ChangesPolicyRule attr_accessor :base_path # Attribute mapping from ruby-style variable name to JSON key. @@ -63,13 +63,13 @@ 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::PublicPolicyRule` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesPolicyRule` 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::PublicPolicyRule`. 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::ChangesPolicyRule`. 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 } diff --git a/lib/crimson-falcon/models/public_policy_rule_group.rb b/lib/crimson-falcon/models/changes_policy_rule_group.rb similarity index 96% rename from lib/crimson-falcon/models/public_policy_rule_group.rb rename to lib/crimson-falcon/models/changes_policy_rule_group.rb index 4db1d8a2..3641a764 100644 --- a/lib/crimson-falcon/models/public_policy_rule_group.rb +++ b/lib/crimson-falcon/models/changes_policy_rule_group.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicPolicyRuleGroup + class ChangesPolicyRuleGroup attr_accessor :name attr_accessor :rule @@ -53,7 +53,7 @@ def self.acceptable_attributes def self.openapi_types { :'name' => :'String', - :'rule' => :'PublicPolicyRule' + :'rule' => :'ChangesPolicyRule' } end @@ -67,13 +67,13 @@ 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::PublicPolicyRuleGroup` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesPolicyRuleGroup` 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::PublicPolicyRuleGroup`. 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::ChangesPolicyRuleGroup`. 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 } diff --git a/lib/crimson-falcon/models/public_prevalence.rb b/lib/crimson-falcon/models/changes_prevalence.rb similarity index 97% rename from lib/crimson-falcon/models/public_prevalence.rb rename to lib/crimson-falcon/models/changes_prevalence.rb index 4f4ff3ee..6bd9a0bd 100644 --- a/lib/crimson-falcon/models/public_prevalence.rb +++ b/lib/crimson-falcon/models/changes_prevalence.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicPrevalence + class ChangesPrevalence attr_accessor :computed_timestamp # Possible values: PENDING, UNIQUE, LOW, COMMON. @@ -77,13 +77,13 @@ 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::PublicPrevalence` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesPrevalence` 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::PublicPrevalence`. 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::ChangesPrevalence`. 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 } diff --git a/lib/crimson-falcon/models/public_tag.rb b/lib/crimson-falcon/models/changes_tag.rb similarity index 97% rename from lib/crimson-falcon/models/public_tag.rb rename to lib/crimson-falcon/models/changes_tag.rb index 786f47b8..e0c0fcbf 100644 --- a/lib/crimson-falcon/models/public_tag.rb +++ b/lib/crimson-falcon/models/changes_tag.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicTag + class ChangesTag attr_accessor :name # Attribute mapping from ruby-style variable name to JSON key. @@ -63,13 +63,13 @@ 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::PublicTag` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ChangesTag` 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::PublicTag`. 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::ChangesTag`. 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 } diff --git a/lib/crimson-falcon/models/client_action_request.rb b/lib/crimson-falcon/models/client_action_request.rb new file mode 100644 index 00000000..d587e931 --- /dev/null +++ b/lib/crimson-falcon/models/client_action_request.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 ClientActionRequest + # Execution IDs to perform an action + 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::ClientActionRequest` 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::ClientActionRequest`. 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/client_cost.rb b/lib/crimson-falcon/models/client_cost.rb new file mode 100644 index 00000000..f57101aa --- /dev/null +++ b/lib/crimson-falcon/models/client_cost.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 ClientCost + attr_accessor :live_cost + + attr_accessor :query_count + + attr_accessor :static_cost + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'live_cost' => :'liveCost', + :'query_count' => :'queryCount', + :'static_cost' => :'staticCost' + } + 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 + { + :'live_cost' => :'Integer', + :'query_count' => :'Integer', + :'static_cost' => :'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::ClientCost` 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::ClientCost`. 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?(:'live_cost') + self.live_cost = attributes[:'live_cost'] + end + + if attributes.key?(:'query_count') + self.query_count = attributes[:'query_count'] + end + + if attributes.key?(:'static_cost') + self.static_cost = attributes[:'static_cost'] + 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 @live_cost.nil? + invalid_properties.push('invalid value for "live_cost", live_cost cannot be nil.') + end + + if @query_count.nil? + invalid_properties.push('invalid value for "query_count", query_count cannot be nil.') + end + + if @static_cost.nil? + invalid_properties.push('invalid value for "static_cost", static_cost 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 @live_cost.nil? + return false if @query_count.nil? + return false if @static_cost.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 && + live_cost == o.live_cost && + query_count == o.query_count && + static_cost == o.static_cost + 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 + [live_cost, query_count, static_cost].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_costs.rb b/lib/crimson-falcon/models/client_costs.rb new file mode 100644 index 00000000..b9422df3 --- /dev/null +++ b/lib/crimson-falcon/models/client_costs.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 ClientCosts + attr_accessor :live_cost + + attr_accessor :live_cost_rate + + attr_accessor :static_cost + + attr_accessor :static_cost_rate + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'live_cost' => :'liveCost', + :'live_cost_rate' => :'liveCostRate', + :'static_cost' => :'staticCost', + :'static_cost_rate' => :'staticCostRate' + } + 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 + { + :'live_cost' => :'Float', + :'live_cost_rate' => :'Float', + :'static_cost' => :'Float', + :'static_cost_rate' => :'Float' + } + 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::ClientCosts` 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::ClientCosts`. 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?(:'live_cost') + self.live_cost = attributes[:'live_cost'] + end + + if attributes.key?(:'live_cost_rate') + self.live_cost_rate = attributes[:'live_cost_rate'] + end + + if attributes.key?(:'static_cost') + self.static_cost = attributes[:'static_cost'] + end + + if attributes.key?(:'static_cost_rate') + self.static_cost_rate = attributes[:'static_cost_rate'] + 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 @live_cost.nil? + invalid_properties.push('invalid value for "live_cost", live_cost cannot be nil.') + end + + if @live_cost_rate.nil? + invalid_properties.push('invalid value for "live_cost_rate", live_cost_rate cannot be nil.') + end + + if @static_cost.nil? + invalid_properties.push('invalid value for "static_cost", static_cost cannot be nil.') + end + + if @static_cost_rate.nil? + invalid_properties.push('invalid value for "static_cost_rate", static_cost_rate 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 @live_cost.nil? + return false if @live_cost_rate.nil? + return false if @static_cost.nil? + return false if @static_cost_rate.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 && + live_cost == o.live_cost && + live_cost_rate == o.live_cost_rate && + static_cost == o.static_cost && + static_cost_rate == o.static_cost_rate + 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 + [live_cost, live_cost_rate, static_cost, static_cost_rate].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_data_ingest_response_v1.rb b/lib/crimson-falcon/models/client_data_ingest_response_v1.rb new file mode 100644 index 00000000..34aa1398 --- /dev/null +++ b/lib/crimson-falcon/models/client_data_ingest_response_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 ClientDataIngestResponseV1 + attr_accessor :repo + + attr_accessor :rows_written + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'repo' => :'repo', + :'rows_written' => :'rows_written' + } + 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 + { + :'repo' => :'ClientRepository', + :'rows_written' => :'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::ClientDataIngestResponseV1` 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::ClientDataIngestResponseV1`. 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?(:'repo') + self.repo = attributes[:'repo'] + end + + if attributes.key?(:'rows_written') + self.rows_written = attributes[:'rows_written'] + 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 @repo.nil? + invalid_properties.push('invalid value for "repo", repo cannot be nil.') + end + + if @rows_written.nil? + invalid_properties.push('invalid value for "rows_written", rows_written 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 @repo.nil? + return false if @rows_written.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 && + repo == o.repo && + rows_written == o.rows_written + 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 + [repo, rows_written].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_data_ingest_response_wrapper_v1.rb b/lib/crimson-falcon/models/client_data_ingest_response_wrapper_v1.rb new file mode 100644 index 00000000..fd9e5732 --- /dev/null +++ b/lib/crimson-falcon/models/client_data_ingest_response_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 ClientDataIngestResponseWrapperV1 + 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' => :'MsaspecMetaInfo', + :'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::ClientDataIngestResponseWrapperV1` 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::ClientDataIngestResponseWrapperV1`. 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/client_digest_flow.rb b/lib/crimson-falcon/models/client_digest_flow.rb new file mode 100644 index 00000000..992fd68a --- /dev/null +++ b/lib/crimson-falcon/models/client_digest_flow.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 ClientDigestFlow + attr_accessor :ingest_time_known_good + + attr_accessor :max_ingest_latency + + attr_accessor :min_ingest_time_included + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ingest_time_known_good' => :'ingestTimeKnownGood', + :'max_ingest_latency' => :'maxIngestLatency', + :'min_ingest_time_included' => :'minIngestTimeIncluded' + } + 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 + { + :'ingest_time_known_good' => :'Integer', + :'max_ingest_latency' => :'Integer', + :'min_ingest_time_included' => :'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::ClientDigestFlow` 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::ClientDigestFlow`. 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?(:'ingest_time_known_good') + self.ingest_time_known_good = attributes[:'ingest_time_known_good'] + end + + if attributes.key?(:'max_ingest_latency') + self.max_ingest_latency = attributes[:'max_ingest_latency'] + end + + if attributes.key?(:'min_ingest_time_included') + self.min_ingest_time_included = attributes[:'min_ingest_time_included'] + 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 @ingest_time_known_good.nil? + invalid_properties.push('invalid value for "ingest_time_known_good", ingest_time_known_good cannot be nil.') + end + + if @max_ingest_latency.nil? + invalid_properties.push('invalid value for "max_ingest_latency", max_ingest_latency cannot be nil.') + end + + if @min_ingest_time_included.nil? + invalid_properties.push('invalid value for "min_ingest_time_included", min_ingest_time_included 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 @ingest_time_known_good.nil? + return false if @max_ingest_latency.nil? + return false if @min_ingest_time_included.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 && + ingest_time_known_good == o.ingest_time_known_good && + max_ingest_latency == o.max_ingest_latency && + min_ingest_time_included == o.min_ingest_time_included + 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 + [ingest_time_known_good, max_ingest_latency, min_ingest_time_included].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_extra_in.rb b/lib/crimson-falcon/models/client_extra_in.rb new file mode 100644 index 00000000..359851ca --- /dev/null +++ b/lib/crimson-falcon/models/client_extra_in.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 ClientExtraIn + attr_accessor :field + + attr_accessor :values + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'values' => :'values' + } + 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', + :'values' => :'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::ClientExtraIn` 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::ClientExtraIn`. 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?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = 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 @field.nil? + invalid_properties.push('invalid value for "field", field cannot be nil.') + end + + if @values.nil? + invalid_properties.push('invalid value for "values", values 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 @values.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 && + values == o.values + 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, values].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_extra_limit.rb b/lib/crimson-falcon/models/client_extra_limit.rb new file mode 100644 index 00000000..bd7b8abb --- /dev/null +++ b/lib/crimson-falcon/models/client_extra_limit.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 ClientExtraLimit + attr_accessor :from + + attr_accessor :limit + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'from' => :'from', + :'limit' => :'limit' + } + 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 + { + :'from' => :'String', + :'limit' => :'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::ClientExtraLimit` 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::ClientExtraLimit`. 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + 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 @from.nil? + invalid_properties.push('invalid value for "from", from cannot be nil.') + end + + if @limit.nil? + invalid_properties.push('invalid value for "limit", limit 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 @from.nil? + return false if @limit.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 && + from == o.from && + limit == o.limit + 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 + [from, limit].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_msa_meta_info.rb b/lib/crimson-falcon/models/client_extra_rename.rb similarity index 89% rename from lib/crimson-falcon/models/domain_msa_meta_info.rb rename to lib/crimson-falcon/models/client_extra_rename.rb index a94c2673..35810890 100644 --- a/lib/crimson-falcon/models/domain_msa_meta_info.rb +++ b/lib/crimson-falcon/models/client_extra_rename.rb @@ -31,16 +31,16 @@ require 'time' module Falcon - class DomainMsaMetaInfo - attr_accessor :pagination + class ClientExtraRename + attr_accessor :as - attr_accessor :query_time + attr_accessor :field # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'pagination' => :'pagination', - :'query_time' => :'queryTime' + :'as' => :'as', + :'field' => :'field' } end @@ -52,8 +52,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'pagination' => :'MsaspecPaging', - :'query_time' => :'Float' + :'as' => :'String', + :'field' => :'String' } end @@ -67,23 +67,23 @@ 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::DomainMsaMetaInfo` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ClientExtraRename` 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::DomainMsaMetaInfo`. 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::ClientExtraRename`. 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'] + if attributes.key?(:'as') + self.as = attributes[:'as'] end - if attributes.key?(:'query_time') - self.query_time = attributes[:'query_time'] + if attributes.key?(:'field') + self.field = attributes[:'field'] end end @@ -91,8 +91,12 @@ def initialize(attributes = {}) # @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.') + if @as.nil? + invalid_properties.push('invalid value for "as", as cannot be nil.') + end + + if @field.nil? + invalid_properties.push('invalid value for "field", field cannot be nil.') end invalid_properties @@ -101,7 +105,8 @@ 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 @query_time.nil? + return false if @as.nil? + return false if @field.nil? true end @@ -110,8 +115,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - pagination == o.pagination && - query_time == o.query_time + as == o.as && + field == o.field end # @see the `==` method @@ -123,7 +128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [pagination, query_time].hash + [as, field].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/client_extra_sort.rb b/lib/crimson-falcon/models/client_extra_sort.rb new file mode 100644 index 00000000..3ecd105b --- /dev/null +++ b/lib/crimson-falcon/models/client_extra_sort.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 ClientExtraSort + attr_accessor :fields + + attr_accessor :limit + + attr_accessor :order + + attr_accessor :reverse + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fields' => :'fields', + :'limit' => :'limit', + :'order' => :'order', + :'reverse' => :'reverse', + :'type' => :'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 + { + :'fields' => :'Array', + :'limit' => :'Integer', + :'order' => :'Array', + :'reverse' => :'Boolean', + :'type' => :'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::ClientExtraSort` 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::ClientExtraSort`. 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?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'order') + if (value = attributes[:'order']).is_a?(Array) + self.order = value + end + end + + if attributes.key?(:'reverse') + self.reverse = attributes[:'reverse'] + end + + if attributes.key?(:'type') + if (value = attributes[:'type']).is_a?(Array) + self.type = 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 && + fields == o.fields && + limit == o.limit && + order == o.order && + reverse == o.reverse && + type == o.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 + [fields, limit, order, reverse, 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/client_field.rb b/lib/crimson-falcon/models/client_field.rb new file mode 100644 index 00000000..046c0e6e --- /dev/null +++ b/lib/crimson-falcon/models/client_field.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 ClientField + attr_accessor :count + + attr_accessor :name + + attr_accessor :top_values + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'name' => :'name', + :'top_values' => :'topValues' + } + 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', + :'name' => :'String', + :'top_values' => :'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::ClientField` 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::ClientField`. 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?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'top_values') + if (value = attributes[:'top_values']).is_a?(Array) + self.top_values = 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 @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @top_values.nil? + invalid_properties.push('invalid value for "top_values", top_values 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 @count.nil? + return false if @name.nil? + return false if @top_values.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 && + count == o.count && + name == o.name && + top_values == o.top_values + 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, name, top_values].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_job_meta_data.rb b/lib/crimson-falcon/models/client_job_status.rb similarity index 73% rename from lib/crimson-falcon/models/models_job_meta_data.rb rename to lib/crimson-falcon/models/client_job_status.rb index aeb606e5..6209657d 100644 --- a/lib/crimson-falcon/models/models_job_meta_data.rb +++ b/lib/crimson-falcon/models/client_job_status.rb @@ -31,33 +31,45 @@ require 'time' module Falcon - class ModelsJobMetaData - attr_accessor :cloud_provider + class ClientJobStatus + attr_accessor :content_length - attr_accessor :instance_id + attr_accessor :digest_algo - attr_accessor :job_end_time + attr_accessor :digest_hex + + attr_accessor :event_count + + attr_accessor :file_link attr_accessor :job_id - attr_accessor :job_start_time + attr_accessor :job_url attr_accessor :message - attr_accessor :scanner_version + attr_accessor :percent_complete + + attr_accessor :result_count + + attr_accessor :run_duration attr_accessor :status # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'cloud_provider' => :'cloud_provider', - :'instance_id' => :'instance_id', - :'job_end_time' => :'job_end_time', + :'content_length' => :'content_length', + :'digest_algo' => :'digest_algo', + :'digest_hex' => :'digest_hex', + :'event_count' => :'event_count', + :'file_link' => :'file_link', :'job_id' => :'job_id', - :'job_start_time' => :'job_start_time', + :'job_url' => :'job_url', :'message' => :'message', - :'scanner_version' => :'scanner_version', + :'percent_complete' => :'percent_complete', + :'result_count' => :'result_count', + :'run_duration' => :'run_duration', :'status' => :'status' } end @@ -70,13 +82,17 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'cloud_provider' => :'String', - :'instance_id' => :'String', - :'job_end_time' => :'Time', + :'content_length' => :'Integer', + :'digest_algo' => :'String', + :'digest_hex' => :'String', + :'event_count' => :'Integer', + :'file_link' => :'String', :'job_id' => :'String', - :'job_start_time' => :'Time', + :'job_url' => :'String', :'message' => :'String', - :'scanner_version' => :'String', + :'percent_complete' => :'Integer', + :'result_count' => :'Integer', + :'run_duration' => :'Float', :'status' => :'String' } end @@ -91,43 +107,59 @@ 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::ModelsJobMetaData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ClientJobStatus` 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::ModelsJobMetaData`. 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::ClientJobStatus`. 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?(:'cloud_provider') - self.cloud_provider = attributes[:'cloud_provider'] + if attributes.key?(:'content_length') + self.content_length = attributes[:'content_length'] end - if attributes.key?(:'instance_id') - self.instance_id = attributes[:'instance_id'] + if attributes.key?(:'digest_algo') + self.digest_algo = attributes[:'digest_algo'] end - if attributes.key?(:'job_end_time') - self.job_end_time = attributes[:'job_end_time'] + if attributes.key?(:'digest_hex') + self.digest_hex = attributes[:'digest_hex'] + end + + if attributes.key?(:'event_count') + self.event_count = attributes[:'event_count'] + end + + if attributes.key?(:'file_link') + self.file_link = attributes[:'file_link'] end if attributes.key?(:'job_id') self.job_id = attributes[:'job_id'] end - if attributes.key?(:'job_start_time') - self.job_start_time = attributes[:'job_start_time'] + if attributes.key?(:'job_url') + self.job_url = attributes[:'job_url'] end if attributes.key?(:'message') self.message = attributes[:'message'] end - if attributes.key?(:'scanner_version') - self.scanner_version = attributes[:'scanner_version'] + if attributes.key?(:'percent_complete') + self.percent_complete = attributes[:'percent_complete'] + end + + if attributes.key?(:'result_count') + self.result_count = attributes[:'result_count'] + end + + if attributes.key?(:'run_duration') + self.run_duration = attributes[:'run_duration'] end if attributes.key?(:'status') @@ -139,52 +171,17 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @cloud_provider.nil? - invalid_properties.push('invalid value for "cloud_provider", cloud_provider cannot be nil.') - end - - if @instance_id.nil? - invalid_properties.push('invalid value for "instance_id", instance_id cannot be nil.') - end - - if @job_end_time.nil? - invalid_properties.push('invalid value for "job_end_time", job_end_time cannot be nil.') - end - if @job_id.nil? invalid_properties.push('invalid value for "job_id", job_id cannot be nil.') end - if @job_start_time.nil? - invalid_properties.push('invalid value for "job_start_time", job_start_time cannot be nil.') - end - - if @message.nil? - invalid_properties.push('invalid value for "message", message cannot be nil.') - end - - if @scanner_version.nil? - invalid_properties.push('invalid value for "scanner_version", scanner_version 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 @cloud_provider.nil? - return false if @instance_id.nil? - return false if @job_end_time.nil? return false if @job_id.nil? - return false if @job_start_time.nil? - return false if @message.nil? - return false if @scanner_version.nil? - return false if @status.nil? true end @@ -193,13 +190,17 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - cloud_provider == o.cloud_provider && - instance_id == o.instance_id && - job_end_time == o.job_end_time && + content_length == o.content_length && + digest_algo == o.digest_algo && + digest_hex == o.digest_hex && + event_count == o.event_count && + file_link == o.file_link && job_id == o.job_id && - job_start_time == o.job_start_time && + job_url == o.job_url && message == o.message && - scanner_version == o.scanner_version && + percent_complete == o.percent_complete && + result_count == o.result_count && + run_duration == o.run_duration && status == o.status end @@ -212,7 +213,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [cloud_provider, instance_id, job_end_time, job_id, job_start_time, message, scanner_version, status].hash + [content_length, digest_algo, digest_hex, event_count, file_link, job_id, job_url, message, percent_complete, result_count, run_duration, status].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/client_query_response_schemas_v1.rb b/lib/crimson-falcon/models/client_query_response_schemas_v1.rb new file mode 100644 index 00000000..838d2ace --- /dev/null +++ b/lib/crimson-falcon/models/client_query_response_schemas_v1.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 ClientQueryResponseSchemasV1 + attr_accessor :request_schema + + attr_accessor :response_schema + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'request_schema' => :'request_schema', + :'response_schema' => :'response_schema' + } + 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 + { + :'request_schema' => :'String', + :'response_schema' => :'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::ClientQueryResponseSchemasV1` 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::ClientQueryResponseSchemasV1`. 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?(:'request_schema') + self.request_schema = attributes[:'request_schema'] + end + + if attributes.key?(:'response_schema') + self.response_schema = attributes[:'response_schema'] + 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 && + request_schema == o.request_schema && + response_schema == o.response_schema + 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 + [request_schema, response_schema].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_query_result_metadata.rb b/lib/crimson-falcon/models/client_query_result_metadata.rb new file mode 100644 index 00000000..f8d02d59 --- /dev/null +++ b/lib/crimson-falcon/models/client_query_result_metadata.rb @@ -0,0 +1,495 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ClientQueryResultMetadata + attr_accessor :costs + + attr_accessor :digest_flow + + attr_accessor :event_count + + attr_accessor :extra_data + + attr_accessor :field_order + + attr_accessor :is_aggregate + + attr_accessor :poll_after + + attr_accessor :processed_bytes + + attr_accessor :processed_events + + attr_accessor :query_end + + attr_accessor :query_spent + + attr_accessor :query_start + + attr_accessor :quota_total_spent + + attr_accessor :responder_v_host + + attr_accessor :result_buffer_size + + attr_accessor :time_millis + + attr_accessor :total_work + + attr_accessor :warnings + + attr_accessor :work_done + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'costs' => :'costs', + :'digest_flow' => :'digestFlow', + :'event_count' => :'eventCount', + :'extra_data' => :'extraData', + :'field_order' => :'fieldOrder', + :'is_aggregate' => :'isAggregate', + :'poll_after' => :'pollAfter', + :'processed_bytes' => :'processedBytes', + :'processed_events' => :'processedEvents', + :'query_end' => :'queryEnd', + :'query_spent' => :'querySpent', + :'query_start' => :'queryStart', + :'quota_total_spent' => :'quotaTotalSpent', + :'responder_v_host' => :'responderVHost', + :'result_buffer_size' => :'resultBufferSize', + :'time_millis' => :'timeMillis', + :'total_work' => :'totalWork', + :'warnings' => :'warnings', + :'work_done' => :'workDone' + } + 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 + { + :'costs' => :'ClientCosts', + :'digest_flow' => :'ClientDigestFlow', + :'event_count' => :'Integer', + :'extra_data' => :'Object', + :'field_order' => :'Array', + :'is_aggregate' => :'Boolean', + :'poll_after' => :'Integer', + :'processed_bytes' => :'Integer', + :'processed_events' => :'Integer', + :'query_end' => :'Integer', + :'query_spent' => :'ClientSpent', + :'query_start' => :'Integer', + :'quota_total_spent' => :'ClientSpent', + :'responder_v_host' => :'Integer', + :'result_buffer_size' => :'Integer', + :'time_millis' => :'Integer', + :'total_work' => :'Integer', + :'warnings' => :'Array', + :'work_done' => :'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::ClientQueryResultMetadata` 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::ClientQueryResultMetadata`. 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?(:'costs') + self.costs = attributes[:'costs'] + end + + if attributes.key?(:'digest_flow') + self.digest_flow = attributes[:'digest_flow'] + end + + if attributes.key?(:'event_count') + self.event_count = attributes[:'event_count'] + end + + if attributes.key?(:'extra_data') + self.extra_data = attributes[:'extra_data'] + end + + if attributes.key?(:'field_order') + if (value = attributes[:'field_order']).is_a?(Array) + self.field_order = value + end + end + + if attributes.key?(:'is_aggregate') + self.is_aggregate = attributes[:'is_aggregate'] + end + + if attributes.key?(:'poll_after') + self.poll_after = attributes[:'poll_after'] + end + + if attributes.key?(:'processed_bytes') + self.processed_bytes = attributes[:'processed_bytes'] + end + + if attributes.key?(:'processed_events') + self.processed_events = attributes[:'processed_events'] + end + + if attributes.key?(:'query_end') + self.query_end = attributes[:'query_end'] + end + + if attributes.key?(:'query_spent') + self.query_spent = attributes[:'query_spent'] + end + + if attributes.key?(:'query_start') + self.query_start = attributes[:'query_start'] + end + + if attributes.key?(:'quota_total_spent') + self.quota_total_spent = attributes[:'quota_total_spent'] + end + + if attributes.key?(:'responder_v_host') + self.responder_v_host = attributes[:'responder_v_host'] + end + + if attributes.key?(:'result_buffer_size') + self.result_buffer_size = attributes[:'result_buffer_size'] + end + + if attributes.key?(:'time_millis') + self.time_millis = attributes[:'time_millis'] + end + + if attributes.key?(:'total_work') + self.total_work = attributes[:'total_work'] + end + + if attributes.key?(:'warnings') + if (value = attributes[:'warnings']).is_a?(Array) + self.warnings = value + end + end + + if attributes.key?(:'work_done') + self.work_done = attributes[:'work_done'] + 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 @costs.nil? + invalid_properties.push('invalid value for "costs", costs cannot be nil.') + end + + if @digest_flow.nil? + invalid_properties.push('invalid value for "digest_flow", digest_flow cannot be nil.') + end + + if @event_count.nil? + invalid_properties.push('invalid value for "event_count", event_count cannot be nil.') + end + + if @extra_data.nil? + invalid_properties.push('invalid value for "extra_data", extra_data cannot be nil.') + end + + if @field_order.nil? + invalid_properties.push('invalid value for "field_order", field_order cannot be nil.') + end + + if @is_aggregate.nil? + invalid_properties.push('invalid value for "is_aggregate", is_aggregate cannot be nil.') + end + + if @poll_after.nil? + invalid_properties.push('invalid value for "poll_after", poll_after cannot be nil.') + end + + if @processed_bytes.nil? + invalid_properties.push('invalid value for "processed_bytes", processed_bytes cannot be nil.') + end + + if @processed_events.nil? + invalid_properties.push('invalid value for "processed_events", processed_events cannot be nil.') + end + + if @query_end.nil? + invalid_properties.push('invalid value for "query_end", query_end cannot be nil.') + end + + if @query_spent.nil? + invalid_properties.push('invalid value for "query_spent", query_spent cannot be nil.') + end + + if @query_start.nil? + invalid_properties.push('invalid value for "query_start", query_start cannot be nil.') + end + + if @quota_total_spent.nil? + invalid_properties.push('invalid value for "quota_total_spent", quota_total_spent cannot be nil.') + end + + if @responder_v_host.nil? + invalid_properties.push('invalid value for "responder_v_host", responder_v_host cannot be nil.') + end + + if @result_buffer_size.nil? + invalid_properties.push('invalid value for "result_buffer_size", result_buffer_size cannot be nil.') + end + + if @time_millis.nil? + invalid_properties.push('invalid value for "time_millis", time_millis cannot be nil.') + end + + if @total_work.nil? + invalid_properties.push('invalid value for "total_work", total_work cannot be nil.') + end + + if @warnings.nil? + invalid_properties.push('invalid value for "warnings", warnings cannot be nil.') + end + + if @work_done.nil? + invalid_properties.push('invalid value for "work_done", work_done 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 @costs.nil? + return false if @digest_flow.nil? + return false if @event_count.nil? + return false if @extra_data.nil? + return false if @field_order.nil? + return false if @is_aggregate.nil? + return false if @poll_after.nil? + return false if @processed_bytes.nil? + return false if @processed_events.nil? + return false if @query_end.nil? + return false if @query_spent.nil? + return false if @query_start.nil? + return false if @quota_total_spent.nil? + return false if @responder_v_host.nil? + return false if @result_buffer_size.nil? + return false if @time_millis.nil? + return false if @total_work.nil? + return false if @warnings.nil? + return false if @work_done.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 && + costs == o.costs && + digest_flow == o.digest_flow && + event_count == o.event_count && + extra_data == o.extra_data && + field_order == o.field_order && + is_aggregate == o.is_aggregate && + poll_after == o.poll_after && + processed_bytes == o.processed_bytes && + processed_events == o.processed_events && + query_end == o.query_end && + query_spent == o.query_spent && + query_start == o.query_start && + quota_total_spent == o.quota_total_spent && + responder_v_host == o.responder_v_host && + result_buffer_size == o.result_buffer_size && + time_millis == o.time_millis && + total_work == o.total_work && + warnings == o.warnings && + work_done == o.work_done + 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 + [costs, digest_flow, event_count, extra_data, field_order, is_aggregate, poll_after, processed_bytes, processed_events, query_end, query_spent, query_start, quota_total_spent, responder_v_host, result_buffer_size, time_millis, total_work, warnings, work_done].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_repository.rb b/lib/crimson-falcon/models/client_repository.rb new file mode 100644 index 00000000..427e4f43 --- /dev/null +++ b/lib/crimson-falcon/models/client_repository.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 ClientRepository + attr_accessor :description + + attr_accessor :id + + attr_accessor :name + + attr_accessor :space_used + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'id' => :'id', + :'name' => :'name', + :'space_used' => :'space_used' + } + 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', + :'space_used' => :'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::ClientRepository` 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::ClientRepository`. 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?(:'space_used') + self.space_used = attributes[:'space_used'] + 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 @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 @space_used.nil? + invalid_properties.push('invalid value for "space_used", space_used 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 @id.nil? + return false if @name.nil? + return false if @space_used.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 && + space_used == o.space_used + 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, space_used].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_spent.rb b/lib/crimson-falcon/models/client_spent.rb new file mode 100644 index 00000000..84cef371 --- /dev/null +++ b/lib/crimson-falcon/models/client_spent.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 ClientSpent + attr_accessor :day + + attr_accessor :hour + + attr_accessor :one_minute + + attr_accessor :ten_minutes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'day' => :'day', + :'hour' => :'hour', + :'one_minute' => :'oneMinute', + :'ten_minutes' => :'tenMinutes' + } + 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 + { + :'day' => :'ClientCost', + :'hour' => :'ClientCost', + :'one_minute' => :'ClientCost', + :'ten_minutes' => :'ClientCost' + } + 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::ClientSpent` 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::ClientSpent`. 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?(:'day') + self.day = attributes[:'day'] + end + + if attributes.key?(:'hour') + self.hour = attributes[:'hour'] + end + + if attributes.key?(:'one_minute') + self.one_minute = attributes[:'one_minute'] + end + + if attributes.key?(:'ten_minutes') + self.ten_minutes = attributes[:'ten_minutes'] + 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 @day.nil? + invalid_properties.push('invalid value for "day", day cannot be nil.') + end + + if @hour.nil? + invalid_properties.push('invalid value for "hour", hour cannot be nil.') + end + + if @one_minute.nil? + invalid_properties.push('invalid value for "one_minute", one_minute cannot be nil.') + end + + if @ten_minutes.nil? + invalid_properties.push('invalid value for "ten_minutes", ten_minutes 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 @day.nil? + return false if @hour.nil? + return false if @one_minute.nil? + return false if @ten_minutes.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 && + day == o.day && + hour == o.hour && + one_minute == o.one_minute && + ten_minutes == o.ten_minutes + 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 + [day, hour, one_minute, ten_minutes].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_system_definition_create_response.rb b/lib/crimson-falcon/models/client_system_definition_create_response.rb new file mode 100644 index 00000000..acb26ffb --- /dev/null +++ b/lib/crimson-falcon/models/client_system_definition_create_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 ClientSystemDefinitionCreateResponse + 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' => :'MsaspecMetaInfo', + :'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::ClientSystemDefinitionCreateResponse` 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::ClientSystemDefinitionCreateResponse`. 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/client_system_definition_de_provision_request.rb b/lib/crimson-falcon/models/client_system_definition_de_provision_request.rb new file mode 100644 index 00000000..5910b1b8 --- /dev/null +++ b/lib/crimson-falcon/models/client_system_definition_de_provision_request.rb @@ -0,0 +1,285 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ClientSystemDefinitionDeProvisionRequest + # Customer scoped definition ID that is being deprovisioned. This is required when the template is defined as multi-instance + attr_accessor :definition_id + + # When enabled, the CustomerDefinitionID property is ignored and all template workflows are deprovisioned + attr_accessor :deprovision_all + + # ID of the system definition template that is to be deprovisioned + attr_accessor :template_id + + # Name of the system definition template to deprovision + attr_accessor :template_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'definition_id' => :'definition_id', + :'deprovision_all' => :'deprovision_all', + :'template_id' => :'template_id', + :'template_name' => :'template_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_id' => :'String', + :'deprovision_all' => :'Boolean', + :'template_id' => :'String', + :'template_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::ClientSystemDefinitionDeProvisionRequest` 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::ClientSystemDefinitionDeProvisionRequest`. 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_id') + self.definition_id = attributes[:'definition_id'] + end + + if attributes.key?(:'deprovision_all') + self.deprovision_all = attributes[:'deprovision_all'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + + if attributes.key?(:'template_name') + self.template_name = attributes[:'template_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 @definition_id.nil? + invalid_properties.push('invalid value for "definition_id", definition_id cannot be nil.') + end + + if @deprovision_all.nil? + invalid_properties.push('invalid value for "deprovision_all", deprovision_all cannot be nil.') + end + + if @template_id.nil? + invalid_properties.push('invalid value for "template_id", template_id cannot be nil.') + end + + if @template_name.nil? + invalid_properties.push('invalid value for "template_name", template_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 @definition_id.nil? + return false if @deprovision_all.nil? + return false if @template_id.nil? + return false if @template_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 && + definition_id == o.definition_id && + deprovision_all == o.deprovision_all && + template_id == o.template_id && + template_name == o.template_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_id, deprovision_all, template_id, template_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/client_system_definition_promote_request.rb b/lib/crimson-falcon/models/client_system_definition_promote_request.rb new file mode 100644 index 00000000..d3abb631 --- /dev/null +++ b/lib/crimson-falcon/models/client_system_definition_promote_request.rb @@ -0,0 +1,314 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ClientSystemDefinitionPromoteRequest + # Customer scoped definition ID that is being promoted. This is required when the template is defined as multi-instance + attr_accessor :customer_definition_id + + # Optional name to be set on the customer scope definition. Must be unique within a given CID. + attr_accessor :name + + attr_accessor :parameters + + # ID of the system definition template that was previously created + attr_accessor :template_id + + # Name of the system definition template to provision + attr_accessor :template_name + + # Version of system definition template that was previously created, if omitted the latest version will be used. + attr_accessor :template_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'customer_definition_id' => :'customer_definition_id', + :'name' => :'name', + :'parameters' => :'parameters', + :'template_id' => :'template_id', + :'template_name' => :'template_name', + :'template_version' => :'template_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 + { + :'customer_definition_id' => :'String', + :'name' => :'String', + :'parameters' => :'ParameterTemplateProvisionParameters', + :'template_id' => :'String', + :'template_name' => :'String', + :'template_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::ClientSystemDefinitionPromoteRequest` 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::ClientSystemDefinitionPromoteRequest`. 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?(:'customer_definition_id') + self.customer_definition_id = attributes[:'customer_definition_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + + if attributes.key?(:'template_name') + self.template_name = attributes[:'template_name'] + end + + if attributes.key?(:'template_version') + self.template_version = attributes[:'template_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 @customer_definition_id.nil? + invalid_properties.push('invalid value for "customer_definition_id", customer_definition_id cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + if @template_id.nil? + invalid_properties.push('invalid value for "template_id", template_id cannot be nil.') + end + + if @template_name.nil? + invalid_properties.push('invalid value for "template_name", template_name cannot be nil.') + end + + if @template_version.nil? + invalid_properties.push('invalid value for "template_version", template_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 @customer_definition_id.nil? + return false if @name.nil? + return false if @parameters.nil? + return false if @template_id.nil? + return false if @template_name.nil? + return false if @template_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 && + customer_definition_id == o.customer_definition_id && + name == o.name && + parameters == o.parameters && + template_id == o.template_id && + template_name == o.template_name && + template_version == o.template_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 + [customer_definition_id, name, parameters, template_id, template_name, template_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/client_system_definition_provision_request.rb b/lib/crimson-falcon/models/client_system_definition_provision_request.rb new file mode 100644 index 00000000..63182d49 --- /dev/null +++ b/lib/crimson-falcon/models/client_system_definition_provision_request.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 ClientSystemDefinitionProvisionRequest + # Optional name to be set on the customer scope definition. Must be unique within a given CID. + attr_accessor :name + + attr_accessor :parameters + + # ID of the system definition template that was previously created + attr_accessor :template_id + + # Name of the system definition template to provision + attr_accessor :template_name + + # Version of system definition template that was previously created, if omitted the latest version will be used. + attr_accessor :template_version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'parameters' => :'parameters', + :'template_id' => :'template_id', + :'template_name' => :'template_name', + :'template_version' => :'template_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', + :'parameters' => :'ParameterTemplateProvisionParameters', + :'template_id' => :'String', + :'template_name' => :'String', + :'template_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::ClientSystemDefinitionProvisionRequest` 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::ClientSystemDefinitionProvisionRequest`. 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?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + + if attributes.key?(:'template_name') + self.template_name = attributes[:'template_name'] + end + + if attributes.key?(:'template_version') + self.template_version = attributes[:'template_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 @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + if @template_id.nil? + invalid_properties.push('invalid value for "template_id", template_id cannot be nil.') + end + + if @template_name.nil? + invalid_properties.push('invalid value for "template_name", template_name cannot be nil.') + end + + if @template_version.nil? + invalid_properties.push('invalid value for "template_version", template_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 @parameters.nil? + return false if @template_id.nil? + return false if @template_name.nil? + return false if @template_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 && + parameters == o.parameters && + template_id == o.template_id && + template_name == o.template_name && + template_version == o.template_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, parameters, template_id, template_name, template_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/client_top_value.rb b/lib/crimson-falcon/models/client_top_value.rb new file mode 100644 index 00000000..b75c1dc8 --- /dev/null +++ b/lib/crimson-falcon/models/client_top_value.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 ClientTopValue + attr_accessor :count + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'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 + { + :'count' => :'Integer', + :'value' => :'Object' + } + 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::ClientTopValue` 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::ClientTopValue`. 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?(:'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 @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value 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 @count.nil? + return false if @value.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 && + count == o.count && + 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 + [count, 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/common_count_as_resource.rb b/lib/crimson-falcon/models/common_count_as_resource.rb new file mode 100644 index 00000000..e5cc66ea --- /dev/null +++ b/lib/crimson-falcon/models/common_count_as_resource.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 CommonCountAsResource + attr_accessor :count + + attr_accessor :label + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'label' => :'label' + } + 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', + :'label' => :'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::CommonCountAsResource` 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::CommonCountAsResource`. 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?(:'label') + self.label = attributes[:'label'] + 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 @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + if @label.nil? + invalid_properties.push('invalid value for "label", label 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 @count.nil? + return false if @label.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 && + count == o.count && + label == o.label + 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, label].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/common_count_response.rb b/lib/crimson-falcon/models/common_count_response.rb new file mode 100644 index 00000000..71479810 --- /dev/null +++ b/lib/crimson-falcon/models/common_count_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 CommonCountResponse + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::CommonCountResponse` 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::CommonCountResponse`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/common_generic_entity_response_string.rb b/lib/crimson-falcon/models/common_generic_entity_response_string.rb new file mode 100644 index 00000000..0d378942 --- /dev/null +++ b/lib/crimson-falcon/models/common_generic_entity_response_string.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 CommonGenericEntityResponseString + 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' => :'MsaspecMetaInfo', + :'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::CommonGenericEntityResponseString` 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::CommonGenericEntityResponseString`. 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/custom_type1255839303.rb b/lib/crimson-falcon/models/custom_type1255839303.rb new file mode 100644 index 00000000..16beb568 --- /dev/null +++ b/lib/crimson-falcon/models/custom_type1255839303.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 CustomType1255839303 + 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' => :'ApiMetaInfo', + :'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::CustomType1255839303` 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::CustomType1255839303`. 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/custom_type3191042536.rb b/lib/crimson-falcon/models/custom_type3191042536.rb new file mode 100644 index 00000000..be9b3b65 --- /dev/null +++ b/lib/crimson-falcon/models/custom_type3191042536.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 CustomType3191042536 + 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' => :'ApiMetaInfo', + :'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::CustomType3191042536` 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::CustomType3191042536`. 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/definitions_definition_entities_response.rb b/lib/crimson-falcon/models/definitions_definition_entities_response.rb new file mode 100644 index 00000000..a428fdff --- /dev/null +++ b/lib/crimson-falcon/models/definitions_definition_entities_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 DefinitionsDefinitionEntitiesResponse + 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' => :'MsaspecMetaInfo', + :'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::DefinitionsDefinitionEntitiesResponse` 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::DefinitionsDefinitionEntitiesResponse`. 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/definitions_definition_ext.rb b/lib/crimson-falcon/models/definitions_definition_ext.rb new file mode 100644 index 00000000..55ad0f26 --- /dev/null +++ b/lib/crimson-falcon/models/definitions_definition_ext.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 DefinitionsDefinitionExt + attr_accessor :definition + + # Indicates whether the workflow is enabled and active or not. + attr_accessor :enabled + + # Unique identifier for the trigger. + attr_accessor :id + + # Timestamp of when this version of the workflow was created. + attr_accessor :last_modified_timestamp + + # Version of the workflow. A given definition ID can have many versions. Each time an update is applied a new version is generated. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'definition' => :'Definition', + :'enabled' => :'enabled', + :'id' => :'id', + :'last_modified_timestamp' => :'last_modified_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 + { + :'definition' => :'V2Definition', + :'enabled' => :'Boolean', + :'id' => :'String', + :'last_modified_timestamp' => :'Time', + :'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::DefinitionsDefinitionExt` 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::DefinitionsDefinitionExt`. 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'last_modified_timestamp') + self.last_modified_timestamp = attributes[:'last_modified_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 @definition.nil? + invalid_properties.push('invalid value for "definition", definition cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id 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 @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 @definition.nil? + return false if @enabled.nil? + return false if @id.nil? + return false if @last_modified_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 && + definition == o.definition && + enabled == o.enabled && + id == o.id && + last_modified_timestamp == o.last_modified_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 + [definition, enabled, id, last_modified_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/definitions_definition_external_response.rb b/lib/crimson-falcon/models/definitions_definition_external_response.rb new file mode 100644 index 00000000..cfe69da8 --- /dev/null +++ b/lib/crimson-falcon/models/definitions_definition_external_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 DefinitionsDefinitionExternalResponse + 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' => :'MsaspecMetaInfo', + :'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::DefinitionsDefinitionExternalResponse` 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::DefinitionsDefinitionExternalResponse`. 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/definitions_definition_import_response.rb b/lib/crimson-falcon/models/definitions_definition_import_response.rb new file mode 100644 index 00000000..a1b33f3c --- /dev/null +++ b/lib/crimson-falcon/models/definitions_definition_import_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 DefinitionsDefinitionImportResponse + 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' => :'MsaspecMetaInfo', + :'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::DefinitionsDefinitionImportResponse` 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::DefinitionsDefinitionImportResponse`. 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/definitions_definition_import_response_entity.rb b/lib/crimson-falcon/models/definitions_definition_import_response_entity.rb new file mode 100644 index 00000000..cc5d931c --- /dev/null +++ b/lib/crimson-falcon/models/definitions_definition_import_response_entity.rb @@ -0,0 +1,288 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DefinitionsDefinitionImportResponseEntity + attr_accessor :description + + attr_accessor :id + + attr_accessor :model + + attr_accessor :name + + attr_accessor :parameters + + attr_accessor :validation_errors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'id' => :'id', + :'model' => :'model', + :'name' => :'name', + :'parameters' => :'parameters', + :'validation_errors' => :'validation_errors' + } + 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', + :'model' => :'GraphDefinitionModel', + :'name' => :'String', + :'parameters' => :'Array', + :'validation_errors' => :'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::DefinitionsDefinitionImportResponseEntity` 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::DefinitionsDefinitionImportResponseEntity`. 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?(:'model') + self.model = attributes[:'model'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'parameters') + if (value = attributes[:'parameters']).is_a?(Array) + self.parameters = value + end + end + + if attributes.key?(:'validation_errors') + if (value = attributes[:'validation_errors']).is_a?(Array) + self.validation_errors = 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 @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters 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 @parameters.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 && + model == o.model && + name == o.name && + parameters == o.parameters && + validation_errors == o.validation_errors + 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, model, name, parameters, validation_errors].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/definitions_flight_control_request.rb b/lib/crimson-falcon/models/definitions_flight_control_request.rb new file mode 100644 index 00000000..591efb18 --- /dev/null +++ b/lib/crimson-falcon/models/definitions_flight_control_request.rb @@ -0,0 +1,279 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DefinitionsFlightControlRequest + # Flag to specify the workflow should apply to all child CIDs + attr_accessor :all_cids + + # Child CIDs that are excluded from workflow propagation used in conjunction with the all_cids flag + attr_accessor :excluded_cids + + # Flag to specify whether the workflow should apply to the current (parent) CID, in addition to specified child CIDs + attr_accessor :include_parent_cid + + # List of child CIDs that the workflow should apply to if not propagating to all CIDs + attr_accessor :selected_cids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'all_cids' => :'all_cids', + :'excluded_cids' => :'excluded_cids', + :'include_parent_cid' => :'include_parent_cid', + :'selected_cids' => :'selected_cids' + } + 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 + { + :'all_cids' => :'Boolean', + :'excluded_cids' => :'Array', + :'include_parent_cid' => :'Boolean', + :'selected_cids' => :'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::DefinitionsFlightControlRequest` 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::DefinitionsFlightControlRequest`. 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?(:'all_cids') + self.all_cids = attributes[:'all_cids'] + end + + if attributes.key?(:'excluded_cids') + if (value = attributes[:'excluded_cids']).is_a?(Array) + self.excluded_cids = value + end + end + + if attributes.key?(:'include_parent_cid') + self.include_parent_cid = attributes[:'include_parent_cid'] + end + + if attributes.key?(:'selected_cids') + if (value = attributes[:'selected_cids']).is_a?(Array) + self.selected_cids = 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 @all_cids.nil? + invalid_properties.push('invalid value for "all_cids", all_cids cannot be nil.') + end + + if @include_parent_cid.nil? + invalid_properties.push('invalid value for "include_parent_cid", include_parent_cid 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 @all_cids.nil? + return false if @include_parent_cid.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 && + all_cids == o.all_cids && + excluded_cids == o.excluded_cids && + include_parent_cid == o.include_parent_cid && + selected_cids == o.selected_cids + 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 + [all_cids, excluded_cids, include_parent_cid, selected_cids].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/definitions_parameter_property.rb b/lib/crimson-falcon/models/definitions_parameter_property.rb new file mode 100644 index 00000000..bf9593db --- /dev/null +++ b/lib/crimson-falcon/models/definitions_parameter_property.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 DefinitionsParameterProperty + 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::DefinitionsParameterProperty` 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::DefinitionsParameterProperty`. 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 + 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 && + 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/definitions_playbook_parameter.rb b/lib/crimson-falcon/models/definitions_playbook_parameter.rb new file mode 100644 index 00000000..d0a2f6db --- /dev/null +++ b/lib/crimson-falcon/models/definitions_playbook_parameter.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 DefinitionsPlaybookParameter + # id of the node in the model where the parameter needs to be applied + attr_accessor :node_id + + # list of properties that need to be parameterized + attr_accessor :properties + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'node_id' => :'node_id', + :'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 + { + :'node_id' => :'String', + :'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::DefinitionsPlaybookParameter` 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::DefinitionsPlaybookParameter`. 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?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'properties') + if (value = attributes[:'properties']).is_a?(Array) + self.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 + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id 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 @node_id.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 && + node_id == o.node_id && + 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 + [node_id, 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/detections_api_assessment_detections.rb b/lib/crimson-falcon/models/detections_api_assessment_detections.rb new file mode 100644 index 00000000..ff8f18c6 --- /dev/null +++ b/lib/crimson-falcon/models/detections_api_assessment_detections.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 DetectionsApiAssessmentDetections + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::DetectionsApiAssessmentDetections` 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::DetectionsApiAssessmentDetections`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/detections_api_combined_detections.rb b/lib/crimson-falcon/models/detections_api_combined_detections.rb new file mode 100644 index 00000000..148d7ccd --- /dev/null +++ b/lib/crimson-falcon/models/detections_api_combined_detections.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 DetectionsApiCombinedDetections + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::DetectionsApiCombinedDetections` 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::DetectionsApiCombinedDetections`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/detections_api_detections_by_severity.rb b/lib/crimson-falcon/models/detections_api_detections_by_severity.rb new file mode 100644 index 00000000..2f788a3c --- /dev/null +++ b/lib/crimson-falcon/models/detections_api_detections_by_severity.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 DetectionsApiDetectionsBySeverity + 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' => :'MsaspecMetaInfo', + :'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::DetectionsApiDetectionsBySeverity` 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::DetectionsApiDetectionsBySeverity`. 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/detections_api_detections_by_type.rb b/lib/crimson-falcon/models/detections_api_detections_by_type.rb new file mode 100644 index 00000000..eb5f4b26 --- /dev/null +++ b/lib/crimson-falcon/models/detections_api_detections_by_type.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 DetectionsApiDetectionsByType + 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' => :'MsaspecMetaInfo', + :'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::DetectionsApiDetectionsByType` 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::DetectionsApiDetectionsByType`. 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/detections_api_detections_count.rb b/lib/crimson-falcon/models/detections_api_detections_count.rb new file mode 100644 index 00000000..217cfffc --- /dev/null +++ b/lib/crimson-falcon/models/detections_api_detections_count.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 DetectionsApiDetectionsCount + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::DetectionsApiDetectionsCount` 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::DetectionsApiDetectionsCount`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/detects_alert.rb b/lib/crimson-falcon/models/detects_alert.rb index e56f4717..dd71096e 100644 --- a/lib/crimson-falcon/models/detects_alert.rb +++ b/lib/crimson-falcon/models/detects_alert.rb @@ -32,72 +32,126 @@ module Falcon class DetectsAlert + # Device or sensor ID for which the Alert was generated attr_accessor :agent_id + # Common linkage between multiple Alerts that belong so the same detection bouquet attr_accessor :aggregate_id + # Name of the person this Alert is assigned to attr_accessor :assigned_to_name + # UserID to which this Alert is assigned to attr_accessor :assigned_to_uid + # UUID to which this Alert is assigned to attr_accessor :assigned_to_uuid + # Unique ID of CrowdStrike customers attr_accessor :cid + # An opaque internal identifier that can uniquely identify an Alert attr_accessor :composite_id + # Confidence is a 1-100 integer value denoting the confidence that, when this Alert fires, it is indicative of malicious activity attr_accessor :confidence + # internal only attr_accessor :crawl_edge_ids + # internal only attr_accessor :crawl_vertex_ids + # indicates when ThreatGraph was crawled to gather info for this alert creation/update attr_accessor :crawled_timestamp + # indicates when the Alert was first written to backend store attr_accessor :created_timestamp + # Data Domains represents domains to which this alert belongs to + attr_accessor :data_domains + + # Short, customer-visible summary of the detected activity attr_accessor :description + # Customer visible name for the Alert's pattern attr_accessor :display_name + # Boolean to know if we sent email regarding this Alert attr_accessor :email_sent + # internal only + attr_accessor :es_doc_id + + # internal only + attr_accessor :es_doc_version + + # internal only + attr_accessor :es_routing_id + + # Boolean indicating if this Alert is internal or external attr_accessor :external + # Vertex key which triggers the formation of the Alert attr_accessor :id + # Pattern Name coming either from Taxonomy or directly from the ingested Alert attr_accessor :name + # End goal that an attack adversary intends to achieve according to MITRE attr_accessor :objective + # Taxonomy patternID for this Alert attr_accessor :pattern_id + # Platform that this Alert was triggered on e.g. Android, Windows, etc.. attr_accessor :platform + attr_accessor :poly_id + + # Product specifies the SKU that this Alert belongs to e.g. mobile, idp, epp attr_accessor :product + # Scenario was used pre-Handrails to display additional killchain context for UI alerts. With handrails, this field is mostly obsolete in favor of tactic/technique. Still, it can be useful for determining specific pattern types that are not straightforward to distinguish from other fields alone attr_accessor :scenario + # Severity is also a 1-100 integer value, but unlike confidence severity impacts how a Alert is displayed in the UI attr_accessor :severity + # Boolean indicating if this Alert will be shown in the UI or if it's hidden' attr_accessor :show_in_ui + # Source Products are products that produced events which contributed to this alert + attr_accessor :source_products + + # Source Vendors are vendors that produced events which contributed to this alert + attr_accessor :source_vendors + + # Could be one of the following - New, closed, in_progress, reopened attr_accessor :status + # Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures attr_accessor :tactic + # Unique ID for the tactic seen in the Alert attr_accessor :tactic_id + # Tags are string values associated with the alert that can be added or removed through the API attr_accessor :tags + # Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures attr_accessor :technique + # Unique ID for the technique seen in the Alert attr_accessor :technique_id + # stored value coming in directly from the ingested event or set by cloud in the absence of it attr_accessor :timestamp + # Type of definition Detections Extensibility use. Keyed-off of Pattern of the incoming events/Alerts attr_accessor :type + # indicates when the Alert was last modified attr_accessor :updated_timestamp # Attribute mapping from ruby-style variable name to JSON key. @@ -115,19 +169,26 @@ def self.attribute_map :'crawl_vertex_ids' => :'crawl_vertex_ids', :'crawled_timestamp' => :'crawled_timestamp', :'created_timestamp' => :'created_timestamp', + :'data_domains' => :'data_domains', :'description' => :'description', :'display_name' => :'display_name', :'email_sent' => :'email_sent', + :'es_doc_id' => :'es_doc_id', + :'es_doc_version' => :'es_doc_version', + :'es_routing_id' => :'es_routing_id', :'external' => :'external', :'id' => :'id', :'name' => :'name', :'objective' => :'objective', :'pattern_id' => :'pattern_id', :'platform' => :'platform', + :'poly_id' => :'poly_id', :'product' => :'product', :'scenario' => :'scenario', :'severity' => :'severity', :'show_in_ui' => :'show_in_ui', + :'source_products' => :'source_products', + :'source_vendors' => :'source_vendors', :'status' => :'status', :'tactic' => :'tactic', :'tactic_id' => :'tactic_id', @@ -160,19 +221,26 @@ def self.openapi_types :'crawl_vertex_ids' => :'Hash>', :'crawled_timestamp' => :'Time', :'created_timestamp' => :'Time', + :'data_domains' => :'Array', :'description' => :'String', :'display_name' => :'String', :'email_sent' => :'Boolean', + :'es_doc_id' => :'String', + :'es_doc_version' => :'Integer', + :'es_routing_id' => :'String', :'external' => :'Boolean', :'id' => :'String', :'name' => :'String', :'objective' => :'String', :'pattern_id' => :'Integer', :'platform' => :'String', + :'poly_id' => :'String', :'product' => :'String', :'scenario' => :'String', :'severity' => :'Integer', :'show_in_ui' => :'Boolean', + :'source_products' => :'Array', + :'source_vendors' => :'Array', :'status' => :'String', :'tactic' => :'String', :'tactic_id' => :'String', @@ -258,6 +326,12 @@ def initialize(attributes = {}) self.created_timestamp = attributes[:'created_timestamp'] end + if attributes.key?(:'data_domains') + if (value = attributes[:'data_domains']).is_a?(Array) + self.data_domains = value + end + end + if attributes.key?(:'description') self.description = attributes[:'description'] end @@ -270,6 +344,18 @@ def initialize(attributes = {}) self.email_sent = attributes[:'email_sent'] end + if attributes.key?(:'es_doc_id') + self.es_doc_id = attributes[:'es_doc_id'] + end + + if attributes.key?(:'es_doc_version') + self.es_doc_version = attributes[:'es_doc_version'] + end + + if attributes.key?(:'es_routing_id') + self.es_routing_id = attributes[:'es_routing_id'] + end + if attributes.key?(:'external') self.external = attributes[:'external'] end @@ -294,6 +380,10 @@ def initialize(attributes = {}) self.platform = attributes[:'platform'] end + if attributes.key?(:'poly_id') + self.poly_id = attributes[:'poly_id'] + end + if attributes.key?(:'product') self.product = attributes[:'product'] end @@ -310,6 +400,18 @@ def initialize(attributes = {}) self.show_in_ui = attributes[:'show_in_ui'] end + if attributes.key?(:'source_products') + if (value = attributes[:'source_products']).is_a?(Array) + self.source_products = value + end + end + + if attributes.key?(:'source_vendors') + if (value = attributes[:'source_vendors']).is_a?(Array) + self.source_vendors = value + end + end + if attributes.key?(:'status') self.status = attributes[:'status'] end @@ -353,10 +455,6 @@ def initialize(attributes = {}) # @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 @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end @@ -367,7 +465,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 @id.nil? return false if @type.nil? true end @@ -389,19 +486,26 @@ def ==(o) crawl_vertex_ids == o.crawl_vertex_ids && crawled_timestamp == o.crawled_timestamp && created_timestamp == o.created_timestamp && + data_domains == o.data_domains && description == o.description && display_name == o.display_name && email_sent == o.email_sent && + es_doc_id == o.es_doc_id && + es_doc_version == o.es_doc_version && + es_routing_id == o.es_routing_id && external == o.external && id == o.id && name == o.name && objective == o.objective && pattern_id == o.pattern_id && platform == o.platform && + poly_id == o.poly_id && product == o.product && scenario == o.scenario && severity == o.severity && show_in_ui == o.show_in_ui && + source_products == o.source_products && + source_vendors == o.source_vendors && status == o.status && tactic == o.tactic && tactic_id == o.tactic_id && @@ -422,7 +526,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_id, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, cid, composite_id, confidence, crawl_edge_ids, crawl_vertex_ids, crawled_timestamp, created_timestamp, description, display_name, email_sent, external, id, name, objective, pattern_id, platform, product, scenario, severity, show_in_ui, status, tactic, tactic_id, tags, technique, technique_id, timestamp, type, updated_timestamp].hash + [agent_id, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, cid, composite_id, confidence, crawl_edge_ids, crawl_vertex_ids, crawled_timestamp, created_timestamp, data_domains, description, display_name, email_sent, es_doc_id, es_doc_version, es_routing_id, external, id, name, objective, pattern_id, platform, poly_id, product, scenario, severity, show_in_ui, source_products, source_vendors, status, tactic, tactic_id, tags, technique, technique_id, timestamp, type, updated_timestamp].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/detectsapi_aggregate_alert_query_request.rb b/lib/crimson-falcon/models/detectsapi_aggregate_alert_query_request.rb new file mode 100644 index 00000000..bb7a5469 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_aggregate_alert_query_request.rb @@ -0,0 +1,491 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DetectsapiAggregateAlertQueryRequest + # DateRanges applies to date_range aggregations. + attr_accessor :date_ranges + + # Exclude Post-filtering on queried fields + attr_accessor :exclude + + # Field applies for example to date_histogram and range aggregations. + attr_accessor :field + + # FQL query specifying the filter parameters. + attr_accessor :filter + + # used in bucket sort aggregations as an offset + attr_accessor :from + + # Include Post-filtering on queried fields + attr_accessor :include + + # Interval applies for example to date_histogram aggregations (uses calendar_interval). Possible values: year, month, week, day, hour, minute. + attr_accessor :interval + + # only return terms that match less than a configured number of hits. + attr_accessor :max_doc_count + + # only return terms that match more than a configured number of hits. + attr_accessor :min_doc_count + + # Missing is a value for missing term field. The behavior that query should return if the document does not have the field in the query + attr_accessor :missing + + # Name of the aggregate query + attr_accessor :name + + # represents full text query + attr_accessor :q + + # Ranges applies to range aggregations. + attr_accessor :ranges + + # how many term buckets should be returned. + attr_accessor :size + + # Sort spec, ex: 'pattern_id|desc'. + attr_accessor :sort + + # sub aggregate alert query. + attr_accessor :sub_aggregates + + # TimeZone timezone to specify when bucketing results. + attr_accessor :time_zone + + # Datastore supported value types: term, terms, date_histogram, facet, range, cardinality. Exact allowed values specific to endpoint. + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'date_ranges' => :'date_ranges', + :'exclude' => :'exclude', + :'field' => :'field', + :'filter' => :'filter', + :'from' => :'from', + :'include' => :'include', + :'interval' => :'interval', + :'max_doc_count' => :'max_doc_count', + :'min_doc_count' => :'min_doc_count', + :'missing' => :'missing', + :'name' => :'name', + :'q' => :'q', + :'ranges' => :'ranges', + :'size' => :'size', + :'sort' => :'sort', + :'sub_aggregates' => :'sub_aggregates', + :'time_zone' => :'time_zone', + :'type' => :'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 + { + :'date_ranges' => :'Array', + :'exclude' => :'String', + :'field' => :'String', + :'filter' => :'String', + :'from' => :'Integer', + :'include' => :'String', + :'interval' => :'String', + :'max_doc_count' => :'Integer', + :'min_doc_count' => :'Integer', + :'missing' => :'String', + :'name' => :'String', + :'q' => :'String', + :'ranges' => :'Array', + :'size' => :'Integer', + :'sort' => :'String', + :'sub_aggregates' => :'Array', + :'time_zone' => :'String', + :'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::DetectsapiAggregateAlertQueryRequest` 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::DetectsapiAggregateAlertQueryRequest`. 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?(:'date_ranges') + if (value = attributes[:'date_ranges']).is_a?(Array) + self.date_ranges = value + end + end + + if attributes.key?(:'exclude') + self.exclude = attributes[:'exclude'] + end + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'interval') + self.interval = attributes[:'interval'] + end + + if attributes.key?(:'max_doc_count') + self.max_doc_count = attributes[:'max_doc_count'] + end + + if attributes.key?(:'min_doc_count') + self.min_doc_count = attributes[:'min_doc_count'] + end + + if attributes.key?(:'missing') + self.missing = attributes[:'missing'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'q') + self.q = attributes[:'q'] + end + + if attributes.key?(:'ranges') + if (value = attributes[:'ranges']).is_a?(Array) + self.ranges = value + end + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'sub_aggregates') + if (value = attributes[:'sub_aggregates']).is_a?(Array) + self.sub_aggregates = value + end + end + + if attributes.key?(:'time_zone') + self.time_zone = attributes[:'time_zone'] + end + + if attributes.key?(:'type') + self.type = attributes[:'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 + if @date_ranges.nil? + invalid_properties.push('invalid value for "date_ranges", date_ranges cannot be nil.') + end + + if @exclude.nil? + invalid_properties.push('invalid value for "exclude", exclude cannot be nil.') + end + + if @field.nil? + invalid_properties.push('invalid value for "field", field cannot be nil.') + end + + if @filter.nil? + invalid_properties.push('invalid value for "filter", filter cannot be nil.') + end + + if @from.nil? + invalid_properties.push('invalid value for "from", from cannot be nil.') + end + + if @include.nil? + invalid_properties.push('invalid value for "include", include cannot be nil.') + end + + if @interval.nil? + invalid_properties.push('invalid value for "interval", interval cannot be nil.') + end + + if @missing.nil? + invalid_properties.push('invalid value for "missing", missing cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @q.nil? + invalid_properties.push('invalid value for "q", q cannot be nil.') + end + + if @ranges.nil? + invalid_properties.push('invalid value for "ranges", ranges cannot be nil.') + end + + if @size.nil? + invalid_properties.push('invalid value for "size", size cannot be nil.') + end + + if @sort.nil? + invalid_properties.push('invalid value for "sort", sort cannot be nil.') + end + + if @sub_aggregates.nil? + invalid_properties.push('invalid value for "sub_aggregates", sub_aggregates cannot be nil.') + end + + if @time_zone.nil? + invalid_properties.push('invalid value for "time_zone", time_zone cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type 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 @date_ranges.nil? + return false if @exclude.nil? + return false if @field.nil? + return false if @filter.nil? + return false if @from.nil? + return false if @include.nil? + return false if @interval.nil? + return false if @missing.nil? + return false if @name.nil? + return false if @q.nil? + return false if @ranges.nil? + return false if @size.nil? + return false if @sort.nil? + return false if @sub_aggregates.nil? + return false if @time_zone.nil? + return false if @type.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 && + date_ranges == o.date_ranges && + exclude == o.exclude && + field == o.field && + filter == o.filter && + from == o.from && + include == o.include && + interval == o.interval && + max_doc_count == o.max_doc_count && + min_doc_count == o.min_doc_count && + missing == o.missing && + name == o.name && + q == o.q && + ranges == o.ranges && + size == o.size && + sort == o.sort && + sub_aggregates == o.sub_aggregates && + time_zone == o.time_zone && + type == o.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 + [date_ranges, exclude, field, filter, from, include, interval, max_doc_count, min_doc_count, missing, name, q, ranges, size, sort, sub_aggregates, time_zone, 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/detectsapi_aggregates_response.rb b/lib/crimson-falcon/models/detectsapi_aggregates_response.rb new file mode 100644 index 00000000..2c951a05 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_aggregates_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 DetectsapiAggregatesResponse + attr_accessor :errors + + attr_accessor :meta + + # collection of aggregate query results + 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' => :'MsaspecMetaInfo', + :'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::DetectsapiAggregatesResponse` 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::DetectsapiAggregatesResponse`. 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/detectsapi_aggregation_result.rb b/lib/crimson-falcon/models/detectsapi_aggregation_result.rb new file mode 100644 index 00000000..7240e1e3 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_aggregation_result.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 DetectsapiAggregationResult + # collection of aggregate results matching the criteria + attr_accessor :buckets + + # aggregate query name as provided in the request + attr_accessor :name + + # sum of the document counts for all buckets that are not part of the response + attr_accessor :sum_other_doc_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'buckets' => :'buckets', + :'name' => :'name', + :'sum_other_doc_count' => :'sum_other_doc_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 + { + :'buckets' => :'Array', + :'name' => :'String', + :'sum_other_doc_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::DetectsapiAggregationResult` 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::DetectsapiAggregationResult`. 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?(:'buckets') + if (value = attributes[:'buckets']).is_a?(Array) + self.buckets = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'sum_other_doc_count') + self.sum_other_doc_count = attributes[:'sum_other_doc_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 + if @buckets.nil? + invalid_properties.push('invalid value for "buckets", buckets 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 @buckets.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 && + buckets == o.buckets && + name == o.name && + sum_other_doc_count == o.sum_other_doc_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 + [buckets, name, sum_other_doc_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/detectsapi_aggregation_result_item.rb b/lib/crimson-falcon/models/detectsapi_aggregation_result_item.rb new file mode 100644 index 00000000..2b656733 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_aggregation_result_item.rb @@ -0,0 +1,331 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DetectsapiAggregationResultItem + # total count of items falling in this bucket + attr_accessor :count + + # used to determine the start of the range in aggregations + attr_accessor :from + + # the formatted string version using the format parameter specification + attr_accessor :key_as_string + + attr_accessor :label + + # string representation of 'From' date + attr_accessor :string_from + + # string representation of 'To' date + attr_accessor :string_to + + # nested aggregation result + attr_accessor :sub_aggregates + + # used to determine end of the range in aggregations + attr_accessor :to + + # numeric aggregations (Min, Max, Avg, Percentile...) + attr_accessor :value + + # string representation of Value + attr_accessor :value_as_string + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'from' => :'from', + :'key_as_string' => :'key_as_string', + :'label' => :'label', + :'string_from' => :'string_from', + :'string_to' => :'string_to', + :'sub_aggregates' => :'sub_aggregates', + :'to' => :'to', + :'value' => :'value', + :'value_as_string' => :'value_as_string' + } + 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', + :'from' => :'Float', + :'key_as_string' => :'String', + :'label' => :'Object', + :'string_from' => :'String', + :'string_to' => :'String', + :'sub_aggregates' => :'Array', + :'to' => :'Float', + :'value' => :'Float', + :'value_as_string' => :'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::DetectsapiAggregationResultItem` 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::DetectsapiAggregationResultItem`. 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'key_as_string') + self.key_as_string = attributes[:'key_as_string'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'string_from') + self.string_from = attributes[:'string_from'] + end + + if attributes.key?(:'string_to') + self.string_to = attributes[:'string_to'] + end + + if attributes.key?(:'sub_aggregates') + if (value = attributes[:'sub_aggregates']).is_a?(Array) + self.sub_aggregates = value + end + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'value_as_string') + self.value_as_string = attributes[:'value_as_string'] + 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 @count.nil? + invalid_properties.push('invalid value for "count", count 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 @count.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 && + count == o.count && + from == o.from && + key_as_string == o.key_as_string && + label == o.label && + string_from == o.string_from && + string_to == o.string_to && + sub_aggregates == o.sub_aggregates && + to == o.to && + value == o.value && + value_as_string == o.value_as_string + 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, from, key_as_string, label, string_from, string_to, sub_aggregates, to, value, value_as_string].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_alert_query_response.rb b/lib/crimson-falcon/models/detectsapi_alert_query_response.rb new file mode 100644 index 00000000..175b197a --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_alert_query_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 DetectsapiAlertQueryResponse + attr_accessor :errors + + attr_accessor :meta + + # Array of the Alerts requested + 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' => :'MsaspecMetaInfo', + :'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::DetectsapiAlertQueryResponse` 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::DetectsapiAlertQueryResponse`. 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/detectsapi_patch_entities_alerts_v3_request.rb b/lib/crimson-falcon/models/detectsapi_patch_entities_alerts_v3_request.rb new file mode 100644 index 00000000..1b697489 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_patch_entities_alerts_v3_request.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 DetectsapiPatchEntitiesAlertsV3Request + attr_accessor :action_parameters + + attr_accessor :composite_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action_parameters' => :'action_parameters', + :'composite_ids' => :'composite_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 + { + :'action_parameters' => :'Array', + :'composite_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::DetectsapiPatchEntitiesAlertsV3Request` 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::DetectsapiPatchEntitiesAlertsV3Request`. 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?(:'action_parameters') + if (value = attributes[:'action_parameters']).is_a?(Array) + self.action_parameters = value + end + end + + if attributes.key?(:'composite_ids') + if (value = attributes[:'composite_ids']).is_a?(Array) + self.composite_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 @composite_ids.nil? + invalid_properties.push('invalid value for "composite_ids", composite_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 @composite_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 && + action_parameters == o.action_parameters && + composite_ids == o.composite_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 + [action_parameters, composite_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/detectsapi_post_entities_alerts_v1_request.rb b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v1_request.rb index b8e2d0a6..9c37115e 100644 --- a/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v1_request.rb +++ b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v1_request.rb @@ -32,6 +32,7 @@ module Falcon class DetectsapiPostEntitiesAlertsV1Request + # IDs represent the slice of Alert IDs that would be looked up attr_accessor :ids # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v1_response.rb b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v1_response.rb index 89167572..c6256543 100644 --- a/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v1_response.rb +++ b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v1_response.rb @@ -36,6 +36,7 @@ class DetectsapiPostEntitiesAlertsV1Response attr_accessor :meta + # Resources represent the slice of Alerts that were retrieved for the given Alert IDs attr_accessor :resources # Attribute mapping from ruby-style variable name to JSON key. diff --git a/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v2_request.rb b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v2_request.rb new file mode 100644 index 00000000..a8f7eef9 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v2_request.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 DetectsapiPostEntitiesAlertsV2Request + # CompositeIDs represent the slice of Alert CompositeIDs that would be looked up + attr_accessor :composite_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'composite_ids' => :'composite_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 + { + :'composite_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::DetectsapiPostEntitiesAlertsV2Request` 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::DetectsapiPostEntitiesAlertsV2Request`. 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?(:'composite_ids') + if (value = attributes[:'composite_ids']).is_a?(Array) + self.composite_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 @composite_ids.nil? + invalid_properties.push('invalid value for "composite_ids", composite_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 @composite_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 && + composite_ids == o.composite_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 + [composite_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/detectsapi_post_entities_alerts_v2_response.rb b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v2_response.rb new file mode 100644 index 00000000..6cba619d --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_post_entities_alerts_v2_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 DetectsapiPostEntitiesAlertsV2Response + attr_accessor :errors + + attr_accessor :meta + + # Resources represent the slice of Alerts that were retrieved for the given Alert IDs + 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' => :'MsaspecMetaInfo', + :'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::DetectsapiPostEntitiesAlertsV2Response` 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::DetectsapiPostEntitiesAlertsV2Response`. 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/detectsapi_response_fields.rb b/lib/crimson-falcon/models/detectsapi_response_fields.rb new file mode 100644 index 00000000..48b1c112 --- /dev/null +++ b/lib/crimson-falcon/models/detectsapi_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 DetectsapiResponseFields + 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' => :'MsaspecMetaInfo' + } + 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::DetectsapiResponseFields` 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::DetectsapiResponseFields`. 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/device_device.rb b/lib/crimson-falcon/models/device_device.rb index db8d17e4..6013cd56 100644 --- a/lib/crimson-falcon/models/device_device.rb +++ b/lib/crimson-falcon/models/device_device.rb @@ -106,8 +106,12 @@ class DeviceDevice attr_accessor :last_login_timestamp + attr_accessor :last_login_uid + attr_accessor :last_login_user + attr_accessor :last_login_user_sid + attr_accessor :last_reboot attr_accessor :last_seen @@ -244,7 +248,9 @@ def self.attribute_map :'k8s_cluster_version' => :'k8s_cluster_version', :'kernel_version' => :'kernel_version', :'last_login_timestamp' => :'last_login_timestamp', + :'last_login_uid' => :'last_login_uid', :'last_login_user' => :'last_login_user', + :'last_login_user_sid' => :'last_login_user_sid', :'last_reboot' => :'last_reboot', :'last_seen' => :'last_seen', :'linux_sensor_mode' => :'linux_sensor_mode', @@ -341,7 +347,9 @@ def self.openapi_types :'k8s_cluster_version' => :'String', :'kernel_version' => :'String', :'last_login_timestamp' => :'String', + :'last_login_uid' => :'String', :'last_login_user' => :'String', + :'last_login_user_sid' => :'String', :'last_reboot' => :'String', :'last_seen' => :'String', :'linux_sensor_mode' => :'String', @@ -564,10 +572,18 @@ def initialize(attributes = {}) self.last_login_timestamp = attributes[:'last_login_timestamp'] end + if attributes.key?(:'last_login_uid') + self.last_login_uid = attributes[:'last_login_uid'] + end + if attributes.key?(:'last_login_user') self.last_login_user = attributes[:'last_login_user'] end + if attributes.key?(:'last_login_user_sid') + self.last_login_user_sid = attributes[:'last_login_user_sid'] + end + if attributes.key?(:'last_reboot') self.last_reboot = attributes[:'last_reboot'] end @@ -838,7 +854,9 @@ def ==(o) k8s_cluster_version == o.k8s_cluster_version && kernel_version == o.kernel_version && last_login_timestamp == o.last_login_timestamp && + last_login_uid == o.last_login_uid && last_login_user == o.last_login_user && + last_login_user_sid == o.last_login_user_sid && last_reboot == o.last_reboot && last_seen == o.last_seen && linux_sensor_mode == o.linux_sensor_mode && @@ -898,7 +916,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_load_flags, agent_local_time, agent_version, bios_manufacturer, bios_version, build_number, chassis_type, chassis_type_desc, cid, config_id_base, config_id_build, config_id_platform, connection_ip, connection_mac_address, cpu_signature, default_gateway_ip, deployment_type, detection_suppression_status, device_id, device_policies, email, external_ip, first_login_timestamp, first_login_user, first_seen, group_hash, groups, host_hidden_status, host_utc_offset, hostname, instance_id, internet_exposure, k8s_cluster_git_version, k8s_cluster_id, k8s_cluster_version, kernel_version, last_login_timestamp, last_login_user, last_reboot, last_seen, linux_sensor_mode, local_ip, mac_address, machine_domain, major_version, managed_apps, meta, minor_version, modified_timestamp, notes, os_build, os_product_name, os_version, ou, platform_id, platform_name, pod_annotations, pod_host_ip4, pod_host_ip6, pod_hostname, pod_id, pod_ip4, pod_ip6, pod_labels, pod_name, pod_namespace, pod_service_account_name, pointer_size, policies, product_type, product_type_desc, provision_status, reduced_functionality_mode, release_group, serial_number, service_pack_major, service_pack_minor, service_provider, service_provider_account_id, site_name, slow_changing_modified_timestamp, status, system_manufacturer, system_product_name, tags, zone_group].hash + [agent_load_flags, agent_local_time, agent_version, bios_manufacturer, bios_version, build_number, chassis_type, chassis_type_desc, cid, config_id_base, config_id_build, config_id_platform, connection_ip, connection_mac_address, cpu_signature, default_gateway_ip, deployment_type, detection_suppression_status, device_id, device_policies, email, external_ip, first_login_timestamp, first_login_user, first_seen, group_hash, groups, host_hidden_status, host_utc_offset, hostname, instance_id, internet_exposure, k8s_cluster_git_version, k8s_cluster_id, k8s_cluster_version, kernel_version, last_login_timestamp, last_login_uid, last_login_user, last_login_user_sid, last_reboot, last_seen, linux_sensor_mode, local_ip, mac_address, machine_domain, major_version, managed_apps, meta, minor_version, modified_timestamp, notes, os_build, os_product_name, os_version, ou, platform_id, platform_name, pod_annotations, pod_host_ip4, pod_host_ip6, pod_hostname, pod_id, pod_ip4, pod_ip6, pod_labels, pod_name, pod_namespace, pod_service_account_name, pointer_size, policies, product_type, product_type_desc, provision_status, reduced_functionality_mode, release_group, serial_number, service_pack_major, service_pack_minor, service_provider, service_provider_account_id, site_name, slow_changing_modified_timestamp, status, system_manufacturer, system_product_name, tags, zone_group].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/device_mapped_device_policies.rb b/lib/crimson-falcon/models/device_mapped_device_policies.rb index 053e1864..36533fb6 100644 --- a/lib/crimson-falcon/models/device_mapped_device_policies.rb +++ b/lib/crimson-falcon/models/device_mapped_device_policies.rb @@ -48,6 +48,8 @@ class DeviceMappedDevicePolicies attr_accessor :global_config + attr_accessor :host_retention + attr_accessor :identity_protection attr_accessor :jumpcloud @@ -81,6 +83,7 @@ def self.attribute_map :'fim' => :'fim', :'firewall' => :'firewall', :'global_config' => :'global_config', + :'host_retention' => :'host-retention', :'identity_protection' => :'identity-protection', :'jumpcloud' => :'jumpcloud', :'kubernetes_admission_control' => :'kubernetes-admission-control', @@ -111,6 +114,7 @@ def self.openapi_types :'fim' => :'DeviceDevicePolicy', :'firewall' => :'DeviceDevicePolicy', :'global_config' => :'DeviceDevicePolicy', + :'host_retention' => :'DeviceDevicePolicy', :'identity_protection' => :'DeviceDevicePolicy', :'jumpcloud' => :'DeviceDevicePolicy', :'kubernetes_admission_control' => :'DeviceDevicePolicy', @@ -178,6 +182,10 @@ def initialize(attributes = {}) self.global_config = attributes[:'global_config'] end + if attributes.key?(:'host_retention') + self.host_retention = attributes[:'host_retention'] + end + if attributes.key?(:'identity_protection') self.identity_protection = attributes[:'identity_protection'] end @@ -249,6 +257,7 @@ def ==(o) fim == o.fim && firewall == o.firewall && global_config == o.global_config && + host_retention == o.host_retention && identity_protection == o.identity_protection && jumpcloud == o.jumpcloud && kubernetes_admission_control == o.kubernetes_admission_control && @@ -271,7 +280,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [airlock, automox, aws_verified_access, data_protection, device_control, fim, firewall, global_config, identity_protection, jumpcloud, kubernetes_admission_control, mobile, netskope, prevention, remote_response, sca, sensor_update, system_tray, ztl].hash + [airlock, automox, aws_verified_access, data_protection, device_control, fim, firewall, global_config, host_retention, identity_protection, jumpcloud, kubernetes_admission_control, mobile, netskope, prevention, remote_response, sca, sensor_update, system_tray, ztl].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/deviceapi_device_swagger.rb b/lib/crimson-falcon/models/deviceapi_device_swagger.rb index fe0fafc1..c9f2363b 100644 --- a/lib/crimson-falcon/models/deviceapi_device_swagger.rb +++ b/lib/crimson-falcon/models/deviceapi_device_swagger.rb @@ -62,6 +62,8 @@ class DeviceapiDeviceSwagger attr_accessor :cpu_signature + attr_accessor :cpu_vendor + attr_accessor :default_gateway_ip attr_accessor :deployment_type @@ -104,6 +106,12 @@ class DeviceapiDeviceSwagger attr_accessor :last_login_timestamp + attr_accessor :last_login_uid + + attr_accessor :last_login_user + + attr_accessor :last_login_user_sid + attr_accessor :last_reboot attr_accessor :last_seen @@ -216,6 +224,7 @@ def self.attribute_map :'connection_ip' => :'connection_ip', :'connection_mac_address' => :'connection_mac_address', :'cpu_signature' => :'cpu_signature', + :'cpu_vendor' => :'cpu_vendor', :'default_gateway_ip' => :'default_gateway_ip', :'deployment_type' => :'deployment_type', :'detection_suppression_status' => :'detection_suppression_status', @@ -237,6 +246,9 @@ def self.attribute_map :'k8s_cluster_version' => :'k8s_cluster_version', :'kernel_version' => :'kernel_version', :'last_login_timestamp' => :'last_login_timestamp', + :'last_login_uid' => :'last_login_uid', + :'last_login_user' => :'last_login_user', + :'last_login_user_sid' => :'last_login_user_sid', :'last_reboot' => :'last_reboot', :'last_seen' => :'last_seen', :'linux_sensor_mode' => :'linux_sensor_mode', @@ -310,6 +322,7 @@ def self.openapi_types :'connection_ip' => :'String', :'connection_mac_address' => :'String', :'cpu_signature' => :'String', + :'cpu_vendor' => :'String', :'default_gateway_ip' => :'String', :'deployment_type' => :'String', :'detection_suppression_status' => :'String', @@ -331,6 +344,9 @@ def self.openapi_types :'k8s_cluster_version' => :'String', :'kernel_version' => :'String', :'last_login_timestamp' => :'String', + :'last_login_uid' => :'String', + :'last_login_user' => :'String', + :'last_login_user_sid' => :'String', :'last_reboot' => :'String', :'last_seen' => :'String', :'linux_sensor_mode' => :'String', @@ -462,6 +478,10 @@ def initialize(attributes = {}) self.cpu_signature = attributes[:'cpu_signature'] end + if attributes.key?(:'cpu_vendor') + self.cpu_vendor = attributes[:'cpu_vendor'] + end + if attributes.key?(:'default_gateway_ip') self.default_gateway_ip = attributes[:'default_gateway_ip'] end @@ -548,6 +568,18 @@ def initialize(attributes = {}) self.last_login_timestamp = attributes[:'last_login_timestamp'] end + if attributes.key?(:'last_login_uid') + self.last_login_uid = attributes[:'last_login_uid'] + end + + if attributes.key?(:'last_login_user') + self.last_login_user = attributes[:'last_login_user'] + end + + if attributes.key?(:'last_login_user_sid') + self.last_login_user_sid = attributes[:'last_login_user_sid'] + end + if attributes.key?(:'last_reboot') self.last_reboot = attributes[:'last_reboot'] end @@ -792,6 +824,7 @@ def ==(o) connection_ip == o.connection_ip && connection_mac_address == o.connection_mac_address && cpu_signature == o.cpu_signature && + cpu_vendor == o.cpu_vendor && default_gateway_ip == o.default_gateway_ip && deployment_type == o.deployment_type && detection_suppression_status == o.detection_suppression_status && @@ -813,6 +846,9 @@ def ==(o) k8s_cluster_version == o.k8s_cluster_version && kernel_version == o.kernel_version && last_login_timestamp == o.last_login_timestamp && + last_login_uid == o.last_login_uid && + last_login_user == o.last_login_user && + last_login_user_sid == o.last_login_user_sid && last_reboot == o.last_reboot && last_seen == o.last_seen && linux_sensor_mode == o.linux_sensor_mode && @@ -871,7 +907,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_load_flags, agent_local_time, agent_version, bios_manufacturer, bios_version, build_number, chassis_type, chassis_type_desc, cid, config_id_base, config_id_build, config_id_platform, connection_ip, connection_mac_address, cpu_signature, default_gateway_ip, deployment_type, detection_suppression_status, device_id, device_policies, email, external_ip, first_login_timestamp, first_seen, group_hash, groups, host_hidden_status, host_utc_offset, hostname, instance_id, internet_exposure, k8s_cluster_git_version, k8s_cluster_id, k8s_cluster_version, kernel_version, last_login_timestamp, last_reboot, last_seen, linux_sensor_mode, local_ip, mac_address, machine_domain, major_version, managed_apps, meta, minor_version, modified_timestamp, notes, os_build, os_product_name, os_version, ou, platform_id, platform_name, pod_annotations, pod_host_ip4, pod_host_ip6, pod_hostname, pod_id, pod_ip4, pod_ip6, pod_labels, pod_name, pod_namespace, pod_service_account_name, pointer_size, policies, product_type, product_type_desc, provision_status, reduced_functionality_mode, release_group, serial_number, service_pack_major, service_pack_minor, service_provider, service_provider_account_id, site_name, status, system_manufacturer, system_product_name, tags, zone_group].hash + [agent_load_flags, agent_local_time, agent_version, bios_manufacturer, bios_version, build_number, chassis_type, chassis_type_desc, cid, config_id_base, config_id_build, config_id_platform, connection_ip, connection_mac_address, cpu_signature, cpu_vendor, default_gateway_ip, deployment_type, detection_suppression_status, device_id, device_policies, email, external_ip, first_login_timestamp, first_seen, group_hash, groups, host_hidden_status, host_utc_offset, hostname, instance_id, internet_exposure, k8s_cluster_git_version, k8s_cluster_id, k8s_cluster_version, kernel_version, last_login_timestamp, last_login_uid, last_login_user, last_login_user_sid, last_reboot, last_seen, linux_sensor_mode, local_ip, mac_address, machine_domain, major_version, managed_apps, meta, minor_version, modified_timestamp, notes, os_build, os_product_name, os_version, ou, platform_id, platform_name, pod_annotations, pod_host_ip4, pod_host_ip6, pod_hostname, pod_id, pod_ip4, pod_ip6, pod_labels, pod_name, pod_namespace, pod_service_account_name, pointer_size, policies, product_type, product_type_desc, provision_status, reduced_functionality_mode, release_group, serial_number, service_pack_major, service_pack_minor, service_provider, service_provider_account_id, site_name, status, system_manufacturer, system_product_name, tags, zone_group].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_actor_document.rb b/lib/crimson-falcon/models/domain_actor_document.rb index 29a527c6..a14d6bfc 100644 --- a/lib/crimson-falcon/models/domain_actor_document.rb +++ b/lib/crimson-falcon/models/domain_actor_document.rb @@ -50,6 +50,12 @@ class DomainActorDocument # Actor's text description, partially containing structured data from other fields attr_accessor :description + attr_accessor :description_length + + attr_accessor :develops_threats + + attr_accessor :develops_threats_count + attr_accessor :ecrime_kill_chain # Field used to filter user's access to actor documents @@ -60,11 +66,35 @@ class DomainActorDocument attr_accessor :group + attr_accessor :has_subgroup + + attr_accessor :has_subgroup_actors_count + + attr_accessor :has_successor + + attr_accessor :has_successor_actors_count + # Numerical ID for the Actor attr_accessor :id attr_accessor :image + attr_accessor :in_reports + + attr_accessor :in_reports_count + + attr_accessor :is_subgroup_of + + attr_accessor :is_subgroup_of_actors_count + + attr_accessor :is_successor_of + + attr_accessor :is_successor_of_actors_count + + attr_accessor :is_supported_by + + attr_accessor :is_supported_by_actors_count + attr_accessor :kill_chain # Alternative names and community identifiers of an actor @@ -99,6 +129,10 @@ class DomainActorDocument # Rich text version of the description field attr_accessor :rich_text_description + attr_accessor :sells_threats + + attr_accessor :sells_threats_count + # Short version of the description field attr_accessor :short_description @@ -108,6 +142,10 @@ class DomainActorDocument # Status of an actor, one of: Active, Inactive, Retired attr_accessor :status + attr_accessor :supports + + attr_accessor :supports_actors_count + # Target countries of actor's activity and attacks, slug value is a 2 characters code for the country value, some examples: United States,United Kingdom,Germany,India,Japan,France,Australia,Canada,China attr_accessor :target_countries @@ -122,6 +160,23 @@ class DomainActorDocument # URL at which actor profile can be accessed attr_accessor :url + attr_accessor :uses_indicators_count + + attr_accessor :uses_mitre_attacks_count + + attr_accessor :uses_mitre_tactics_count + + attr_accessor :uses_mitre_techniques_count + + attr_accessor :uses_threats + + attr_accessor :uses_threats_count + + # Comma separated values of vulnerabilities by CVE codes that are exploited by actor + attr_accessor :uses_vulnerabilities + + attr_accessor :vulnerabilities_count + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -131,12 +186,27 @@ def self.attribute_map :'capability' => :'capability', :'created_date' => :'created_date', :'description' => :'description', + :'description_length' => :'description_length', + :'develops_threats' => :'develops_threats', + :'develops_threats_count' => :'develops_threats_count', :'ecrime_kill_chain' => :'ecrime_kill_chain', :'entitlements' => :'entitlements', :'first_activity_date' => :'first_activity_date', :'group' => :'group', + :'has_subgroup' => :'has_subgroup', + :'has_subgroup_actors_count' => :'has_subgroup_actors_count', + :'has_successor' => :'has_successor', + :'has_successor_actors_count' => :'has_successor_actors_count', :'id' => :'id', :'image' => :'image', + :'in_reports' => :'in_reports', + :'in_reports_count' => :'in_reports_count', + :'is_subgroup_of' => :'is_subgroup_of', + :'is_subgroup_of_actors_count' => :'is_subgroup_of_actors_count', + :'is_successor_of' => :'is_successor_of', + :'is_successor_of_actors_count' => :'is_successor_of_actors_count', + :'is_supported_by' => :'is_supported_by', + :'is_supported_by_actors_count' => :'is_supported_by_actors_count', :'kill_chain' => :'kill_chain', :'known_as' => :'known_as', :'last_activity_date' => :'last_activity_date', @@ -149,14 +219,26 @@ def self.attribute_map :'recent_alerting' => :'recent_alerting', :'region' => :'region', :'rich_text_description' => :'rich_text_description', + :'sells_threats' => :'sells_threats', + :'sells_threats_count' => :'sells_threats_count', :'short_description' => :'short_description', :'slug' => :'slug', :'status' => :'status', + :'supports' => :'supports', + :'supports_actors_count' => :'supports_actors_count', :'target_countries' => :'target_countries', :'target_industries' => :'target_industries', :'target_regions' => :'target_regions', :'thumbnail' => :'thumbnail', - :'url' => :'url' + :'url' => :'url', + :'uses_indicators_count' => :'uses_indicators_count', + :'uses_mitre_attacks_count' => :'uses_mitre_attacks_count', + :'uses_mitre_tactics_count' => :'uses_mitre_tactics_count', + :'uses_mitre_techniques_count' => :'uses_mitre_techniques_count', + :'uses_threats' => :'uses_threats', + :'uses_threats_count' => :'uses_threats_count', + :'uses_vulnerabilities' => :'uses_vulnerabilities', + :'vulnerabilities_count' => :'vulnerabilities_count' } end @@ -174,12 +256,27 @@ def self.openapi_types :'capability' => :'DomainEntity', :'created_date' => :'Integer', :'description' => :'String', + :'description_length' => :'Integer', + :'develops_threats' => :'Array', + :'develops_threats_count' => :'Integer', :'ecrime_kill_chain' => :'DomainECrimeKillChain', :'entitlements' => :'Array', :'first_activity_date' => :'Integer', :'group' => :'DomainEntity', + :'has_subgroup' => :'Array', + :'has_subgroup_actors_count' => :'Integer', + :'has_successor' => :'Array', + :'has_successor_actors_count' => :'Integer', :'id' => :'Integer', :'image' => :'DomainImage', + :'in_reports' => :'Array', + :'in_reports_count' => :'Integer', + :'is_subgroup_of' => :'Array', + :'is_subgroup_of_actors_count' => :'Integer', + :'is_successor_of' => :'Array', + :'is_successor_of_actors_count' => :'Integer', + :'is_supported_by' => :'Array', + :'is_supported_by_actors_count' => :'Integer', :'kill_chain' => :'DomainKillChain', :'known_as' => :'String', :'last_activity_date' => :'Integer', @@ -192,14 +289,26 @@ def self.openapi_types :'recent_alerting' => :'Integer', :'region' => :'DomainEntity', :'rich_text_description' => :'String', + :'sells_threats' => :'Array', + :'sells_threats_count' => :'Integer', :'short_description' => :'String', :'slug' => :'String', :'status' => :'String', + :'supports' => :'Array', + :'supports_actors_count' => :'Integer', :'target_countries' => :'Array', :'target_industries' => :'Array', :'target_regions' => :'Array', :'thumbnail' => :'DomainImage', - :'url' => :'String' + :'url' => :'String', + :'uses_indicators_count' => :'Integer', + :'uses_mitre_attacks_count' => :'Integer', + :'uses_mitre_tactics_count' => :'Integer', + :'uses_mitre_techniques_count' => :'Integer', + :'uses_threats' => :'Array', + :'uses_threats_count' => :'Integer', + :'uses_vulnerabilities' => :'Array', + :'vulnerabilities_count' => :'Integer' } end @@ -250,6 +359,20 @@ def initialize(attributes = {}) self.description = attributes[:'description'] end + if attributes.key?(:'description_length') + self.description_length = attributes[:'description_length'] + end + + if attributes.key?(:'develops_threats') + if (value = attributes[:'develops_threats']).is_a?(Array) + self.develops_threats = value + end + end + + if attributes.key?(:'develops_threats_count') + self.develops_threats_count = attributes[:'develops_threats_count'] + end + if attributes.key?(:'ecrime_kill_chain') self.ecrime_kill_chain = attributes[:'ecrime_kill_chain'] end @@ -268,6 +391,26 @@ def initialize(attributes = {}) self.group = attributes[:'group'] end + if attributes.key?(:'has_subgroup') + if (value = attributes[:'has_subgroup']).is_a?(Array) + self.has_subgroup = value + end + end + + if attributes.key?(:'has_subgroup_actors_count') + self.has_subgroup_actors_count = attributes[:'has_subgroup_actors_count'] + end + + if attributes.key?(:'has_successor') + if (value = attributes[:'has_successor']).is_a?(Array) + self.has_successor = value + end + end + + if attributes.key?(:'has_successor_actors_count') + self.has_successor_actors_count = attributes[:'has_successor_actors_count'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -276,6 +419,46 @@ def initialize(attributes = {}) self.image = attributes[:'image'] end + if attributes.key?(:'in_reports') + if (value = attributes[:'in_reports']).is_a?(Array) + self.in_reports = value + end + end + + if attributes.key?(:'in_reports_count') + self.in_reports_count = attributes[:'in_reports_count'] + end + + if attributes.key?(:'is_subgroup_of') + if (value = attributes[:'is_subgroup_of']).is_a?(Array) + self.is_subgroup_of = value + end + end + + if attributes.key?(:'is_subgroup_of_actors_count') + self.is_subgroup_of_actors_count = attributes[:'is_subgroup_of_actors_count'] + end + + if attributes.key?(:'is_successor_of') + if (value = attributes[:'is_successor_of']).is_a?(Array) + self.is_successor_of = value + end + end + + if attributes.key?(:'is_successor_of_actors_count') + self.is_successor_of_actors_count = attributes[:'is_successor_of_actors_count'] + end + + if attributes.key?(:'is_supported_by') + if (value = attributes[:'is_supported_by']).is_a?(Array) + self.is_supported_by = value + end + end + + if attributes.key?(:'is_supported_by_actors_count') + self.is_supported_by_actors_count = attributes[:'is_supported_by_actors_count'] + end + if attributes.key?(:'kill_chain') self.kill_chain = attributes[:'kill_chain'] end @@ -330,6 +513,16 @@ def initialize(attributes = {}) self.rich_text_description = attributes[:'rich_text_description'] end + if attributes.key?(:'sells_threats') + if (value = attributes[:'sells_threats']).is_a?(Array) + self.sells_threats = value + end + end + + if attributes.key?(:'sells_threats_count') + self.sells_threats_count = attributes[:'sells_threats_count'] + end + if attributes.key?(:'short_description') self.short_description = attributes[:'short_description'] end @@ -342,6 +535,16 @@ def initialize(attributes = {}) self.status = attributes[:'status'] end + if attributes.key?(:'supports') + if (value = attributes[:'supports']).is_a?(Array) + self.supports = value + end + end + + if attributes.key?(:'supports_actors_count') + self.supports_actors_count = attributes[:'supports_actors_count'] + end + if attributes.key?(:'target_countries') if (value = attributes[:'target_countries']).is_a?(Array) self.target_countries = value @@ -367,6 +570,42 @@ def initialize(attributes = {}) if attributes.key?(:'url') self.url = attributes[:'url'] end + + if attributes.key?(:'uses_indicators_count') + self.uses_indicators_count = attributes[:'uses_indicators_count'] + end + + if attributes.key?(:'uses_mitre_attacks_count') + self.uses_mitre_attacks_count = attributes[:'uses_mitre_attacks_count'] + end + + if attributes.key?(:'uses_mitre_tactics_count') + self.uses_mitre_tactics_count = attributes[:'uses_mitre_tactics_count'] + end + + if attributes.key?(:'uses_mitre_techniques_count') + self.uses_mitre_techniques_count = attributes[:'uses_mitre_techniques_count'] + end + + if attributes.key?(:'uses_threats') + if (value = attributes[:'uses_threats']).is_a?(Array) + self.uses_threats = value + end + end + + if attributes.key?(:'uses_threats_count') + self.uses_threats_count = attributes[:'uses_threats_count'] + end + + if attributes.key?(:'uses_vulnerabilities') + if (value = attributes[:'uses_vulnerabilities']).is_a?(Array) + self.uses_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? @@ -478,12 +717,27 @@ def ==(o) capability == o.capability && created_date == o.created_date && description == o.description && + description_length == o.description_length && + develops_threats == o.develops_threats && + develops_threats_count == o.develops_threats_count && ecrime_kill_chain == o.ecrime_kill_chain && entitlements == o.entitlements && first_activity_date == o.first_activity_date && group == o.group && + has_subgroup == o.has_subgroup && + has_subgroup_actors_count == o.has_subgroup_actors_count && + has_successor == o.has_successor && + has_successor_actors_count == o.has_successor_actors_count && id == o.id && image == o.image && + in_reports == o.in_reports && + in_reports_count == o.in_reports_count && + is_subgroup_of == o.is_subgroup_of && + is_subgroup_of_actors_count == o.is_subgroup_of_actors_count && + is_successor_of == o.is_successor_of && + is_successor_of_actors_count == o.is_successor_of_actors_count && + is_supported_by == o.is_supported_by && + is_supported_by_actors_count == o.is_supported_by_actors_count && kill_chain == o.kill_chain && known_as == o.known_as && last_activity_date == o.last_activity_date && @@ -496,14 +750,26 @@ def ==(o) recent_alerting == o.recent_alerting && region == o.region && rich_text_description == o.rich_text_description && + sells_threats == o.sells_threats && + sells_threats_count == o.sells_threats_count && short_description == o.short_description && slug == o.slug && status == o.status && + supports == o.supports && + supports_actors_count == o.supports_actors_count && target_countries == o.target_countries && target_industries == o.target_industries && target_regions == o.target_regions && thumbnail == o.thumbnail && - url == o.url + url == o.url && + uses_indicators_count == o.uses_indicators_count && + uses_mitre_attacks_count == o.uses_mitre_attacks_count && + uses_mitre_tactics_count == o.uses_mitre_tactics_count && + uses_mitre_techniques_count == o.uses_mitre_techniques_count && + uses_threats == o.uses_threats && + uses_threats_count == o.uses_threats_count && + uses_vulnerabilities == o.uses_vulnerabilities && + vulnerabilities_count == o.vulnerabilities_count end # @see the `==` method @@ -515,7 +781,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [active, actor_type, capabilities, capability, created_date, description, ecrime_kill_chain, entitlements, first_activity_date, group, id, image, kill_chain, known_as, last_activity_date, last_modified_date, motivations, name, notify_users, objectives, origins, recent_alerting, region, rich_text_description, short_description, slug, status, target_countries, target_industries, target_regions, thumbnail, url].hash + [active, actor_type, capabilities, capability, created_date, description, description_length, develops_threats, develops_threats_count, ecrime_kill_chain, entitlements, first_activity_date, group, has_subgroup, has_subgroup_actors_count, has_successor, has_successor_actors_count, id, image, in_reports, in_reports_count, is_subgroup_of, is_subgroup_of_actors_count, is_successor_of, is_successor_of_actors_count, is_supported_by, is_supported_by_actors_count, kill_chain, known_as, last_activity_date, last_modified_date, motivations, name, notify_users, objectives, origins, recent_alerting, region, rich_text_description, sells_threats, sells_threats_count, short_description, slug, status, supports, supports_actors_count, target_countries, target_industries, target_regions, thumbnail, url, uses_indicators_count, uses_mitre_attacks_count, uses_mitre_tactics_count, uses_mitre_techniques_count, uses_threats, uses_threats_count, uses_vulnerabilities, vulnerabilities_count].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_actor_entity.rb b/lib/crimson-falcon/models/domain_actor_entity.rb new file mode 100644 index 00000000..48c1ae80 --- /dev/null +++ b/lib/crimson-falcon/models/domain_actor_entity.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 DomainActorEntity + # id of the actor + attr_accessor :id + + # name of the actor + attr_accessor :name + + # set of publish flags + attr_accessor :publish_flags + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'publish_flags' => :'publish_flags' + } + 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', + :'publish_flags' => :'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::DomainActorEntity` 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::DomainActorEntity`. 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 + + if attributes.key?(:'publish_flags') + if (value = attributes[:'publish_flags']).is_a?(Array) + self.publish_flags = 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 && + id == o.id && + name == o.name && + publish_flags == o.publish_flags + 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, publish_flags].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_actor_news_document.rb b/lib/crimson-falcon/models/domain_actor_news_document.rb new file mode 100644 index 00000000..1adedfe2 --- /dev/null +++ b/lib/crimson-falcon/models/domain_actor_news_document.rb @@ -0,0 +1,285 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainActorNewsDocument + # Date of the news document creation, unix timestamp + attr_accessor :created_date + + # Integer ID of the News document + attr_accessor :id + + # News title + attr_accessor :name + + # News title in a url friendly way, which is title in lowercase and special characters including space replaced with dash + attr_accessor :slug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_date' => :'created_date', + :'id' => :'id', + :'name' => :'name', + :'slug' => :'slug' + } + 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_date' => :'Integer', + :'id' => :'Integer', + :'name' => :'String', + :'slug' => :'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::DomainActorNewsDocument` 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::DomainActorNewsDocument`. 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_date') + self.created_date = attributes[:'created_date'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'slug') + self.slug = attributes[:'slug'] + 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_date.nil? + invalid_properties.push('invalid value for "created_date", created_date 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 @slug.nil? + invalid_properties.push('invalid value for "slug", slug 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_date.nil? + return false if @id.nil? + return false if @name.nil? + return false if @slug.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_date == o.created_date && + id == o.id && + name == o.name && + slug == o.slug + 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_date, id, name, slug].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_api_finding_rule_v1.rb b/lib/crimson-falcon/models/domain_api_finding_rule_v1.rb index 739dd8f1..a5953381 100644 --- a/lib/crimson-falcon/models/domain_api_finding_rule_v1.rb +++ b/lib/crimson-falcon/models/domain_api_finding_rule_v1.rb @@ -34,6 +34,8 @@ module Falcon class DomainAPIFindingRuleV1 attr_accessor :authority + attr_accessor :benchmark_type + attr_accessor :cce attr_accessor :edited @@ -50,6 +52,8 @@ class DomainAPIFindingRuleV1 attr_accessor :name + attr_accessor :platform_name + attr_accessor :policy_id attr_accessor :policy_name @@ -62,6 +66,7 @@ class DomainAPIFindingRuleV1 def self.attribute_map { :'authority' => :'authority', + :'benchmark_type' => :'benchmark_type', :'cce' => :'cce', :'edited' => :'edited', :'group_id' => :'group_id', @@ -70,6 +75,7 @@ def self.attribute_map :'last_edited_timestamp' => :'last_edited_timestamp', :'mitre_attack_tactics' => :'mitre_attack_tactics', :'name' => :'name', + :'platform_name' => :'platform_name', :'policy_id' => :'policy_id', :'policy_name' => :'policy_name', :'recommendation_id' => :'recommendation_id', @@ -86,6 +92,7 @@ def self.acceptable_attributes def self.openapi_types { :'authority' => :'String', + :'benchmark_type' => :'String', :'cce' => :'String', :'edited' => :'Boolean', :'group_id' => :'String', @@ -94,6 +101,7 @@ def self.openapi_types :'last_edited_timestamp' => :'String', :'mitre_attack_tactics' => :'Array', :'name' => :'String', + :'platform_name' => :'String', :'policy_id' => :'String', :'policy_name' => :'String', :'recommendation_id' => :'String', @@ -126,6 +134,10 @@ def initialize(attributes = {}) self.authority = attributes[:'authority'] end + if attributes.key?(:'benchmark_type') + self.benchmark_type = attributes[:'benchmark_type'] + end + if attributes.key?(:'cce') self.cce = attributes[:'cce'] end @@ -160,6 +172,10 @@ def initialize(attributes = {}) self.name = attributes[:'name'] end + if attributes.key?(:'platform_name') + self.platform_name = attributes[:'platform_name'] + end + if attributes.key?(:'policy_id') self.policy_id = attributes[:'policy_id'] end @@ -206,6 +222,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && authority == o.authority && + benchmark_type == o.benchmark_type && cce == o.cce && edited == o.edited && group_id == o.group_id && @@ -214,6 +231,7 @@ def ==(o) last_edited_timestamp == o.last_edited_timestamp && mitre_attack_tactics == o.mitre_attack_tactics && name == o.name && + platform_name == o.platform_name && policy_id == o.policy_id && policy_name == o.policy_name && recommendation_id == o.recommendation_id && @@ -229,7 +247,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [authority, cce, edited, group_id, group_name, id, last_edited_timestamp, mitre_attack_tactics, name, policy_id, policy_name, recommendation_id, severity].hash + [authority, benchmark_type, cce, edited, group_id, group_name, id, last_edited_timestamp, mitre_attack_tactics, name, platform_name, policy_id, policy_name, recommendation_id, severity].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_api_finding_with_rule_v1.rb b/lib/crimson-falcon/models/domain_api_finding_with_rule_v1.rb index f16e2e80..ff07b33f 100644 --- a/lib/crimson-falcon/models/domain_api_finding_with_rule_v1.rb +++ b/lib/crimson-falcon/models/domain_api_finding_with_rule_v1.rb @@ -39,6 +39,8 @@ class DomainAPIFindingWithRuleV1 attr_accessor :host_id + attr_accessor :policy_host_groups + attr_accessor :rule attr_accessor :status @@ -51,6 +53,7 @@ def self.attribute_map :'evaluation_logic_type' => :'evaluation_logic_type', :'evaluation_reason' => :'evaluation_reason', :'host_id' => :'host_id', + :'policy_host_groups' => :'policy_host_groups', :'rule' => :'rule', :'status' => :'status', :'status_since_timestamp' => :'status_since_timestamp' @@ -68,6 +71,7 @@ def self.openapi_types :'evaluation_logic_type' => :'String', :'evaluation_reason' => :'String', :'host_id' => :'String', + :'policy_host_groups' => :'Array', :'rule' => :'DomainAPIFindingRuleV1', :'status' => :'String', :'status_since_timestamp' => :'String' @@ -107,6 +111,12 @@ def initialize(attributes = {}) self.host_id = attributes[:'host_id'] end + if attributes.key?(:'policy_host_groups') + if (value = attributes[:'policy_host_groups']).is_a?(Array) + self.policy_host_groups = value + end + end + if attributes.key?(:'rule') self.rule = attributes[:'rule'] end @@ -141,6 +151,7 @@ def ==(o) evaluation_logic_type == o.evaluation_logic_type && evaluation_reason == o.evaluation_reason && host_id == o.host_id && + policy_host_groups == o.policy_host_groups && rule == o.rule && status == o.status && status_since_timestamp == o.status_since_timestamp @@ -155,7 +166,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [evaluation_logic_type, evaluation_reason, host_id, rule, status, status_since_timestamp].hash + [evaluation_logic_type, evaluation_reason, host_id, policy_host_groups, rule, status, status_since_timestamp].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_api_host_info_facet_v1.rb b/lib/crimson-falcon/models/domain_api_host_info_facet_v1.rb index 1cb9a933..d9529683 100644 --- a/lib/crimson-falcon/models/domain_api_host_info_facet_v1.rb +++ b/lib/crimson-falcon/models/domain_api_host_info_facet_v1.rb @@ -32,6 +32,8 @@ module Falcon class DomainAPIHostInfoFacetV1 + attr_accessor :asset_criticality + attr_accessor :build_number attr_accessor :groups @@ -71,6 +73,7 @@ class DomainAPIHostInfoFacetV1 # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'asset_criticality' => :'asset_criticality', :'build_number' => :'build_number', :'groups' => :'groups', :'host_hidden_status' => :'host_hidden_status', @@ -100,6 +103,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'asset_criticality' => :'DomainAssetCriticalityInfoV1', :'build_number' => :'String', :'groups' => :'Array', :'host_hidden_status' => :'String', @@ -142,6 +146,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'asset_criticality') + self.asset_criticality = attributes[:'asset_criticality'] + end + if attributes.key?(:'build_number') self.build_number = attributes[:'build_number'] end @@ -247,6 +255,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + asset_criticality == o.asset_criticality && build_number == o.build_number && groups == o.groups && host_hidden_status == o.host_hidden_status && @@ -276,7 +285,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [build_number, groups, host_hidden_status, id, last_seen_timestamp, local_ip, mac_address, machine_domain, name, os_version, ou, platform_name, product_type_desc, serial_number, site_name, system_manufacturer, system_product_name, tags].hash + [asset_criticality, build_number, groups, host_hidden_status, id, last_seen_timestamp, local_ip, mac_address, machine_domain, name, os_version, ou, platform_name, product_type_desc, serial_number, site_name, system_manufacturer, system_product_name, tags].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_api_rule_details_response_v1.rb b/lib/crimson-falcon/models/domain_api_rule_details_response_v1.rb new file mode 100644 index 00000000..286cadec --- /dev/null +++ b/lib/crimson-falcon/models/domain_api_rule_details_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 DomainAPIRuleDetailsResponseV1 + 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' => :'MsaspecMetaInfo', + :'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::DomainAPIRuleDetailsResponseV1` 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::DomainAPIRuleDetailsResponseV1`. 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/domain_api_rule_details_v1.rb b/lib/crimson-falcon/models/domain_api_rule_details_v1.rb new file mode 100644 index 00000000..47b7dd21 --- /dev/null +++ b/lib/crimson-falcon/models/domain_api_rule_details_v1.rb @@ -0,0 +1,434 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainAPIRuleDetailsV1 + attr_accessor :additional_information + + attr_accessor :applicable_profiles + + attr_accessor :assessment_status + + attr_accessor :audit_procedure + + attr_accessor :authority + + attr_accessor :benchmark_title + + attr_accessor :description + + attr_accessor :id + + attr_accessor :impact_statement + + attr_accessor :platform + + attr_accessor :rationale_statement + + attr_accessor :recommendation_id + + attr_accessor :references + + attr_accessor :remediation_procedure + + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'additional_information' => :'additional_information', + :'applicable_profiles' => :'applicable_profiles', + :'assessment_status' => :'assessment_status', + :'audit_procedure' => :'audit_procedure', + :'authority' => :'authority', + :'benchmark_title' => :'benchmark_title', + :'description' => :'description', + :'id' => :'id', + :'impact_statement' => :'impact_statement', + :'platform' => :'platform', + :'rationale_statement' => :'rationale_statement', + :'recommendation_id' => :'recommendation_id', + :'references' => :'references', + :'remediation_procedure' => :'remediation_procedure', + :'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 + { + :'additional_information' => :'String', + :'applicable_profiles' => :'Array', + :'assessment_status' => :'String', + :'audit_procedure' => :'String', + :'authority' => :'String', + :'benchmark_title' => :'String', + :'description' => :'String', + :'id' => :'String', + :'impact_statement' => :'String', + :'platform' => :'String', + :'rationale_statement' => :'String', + :'recommendation_id' => :'String', + :'references' => :'Array', + :'remediation_procedure' => :'String', + :'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::DomainAPIRuleDetailsV1` 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::DomainAPIRuleDetailsV1`. 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?(:'additional_information') + self.additional_information = attributes[:'additional_information'] + end + + if attributes.key?(:'applicable_profiles') + if (value = attributes[:'applicable_profiles']).is_a?(Array) + self.applicable_profiles = value + end + end + + if attributes.key?(:'assessment_status') + self.assessment_status = attributes[:'assessment_status'] + end + + if attributes.key?(:'audit_procedure') + self.audit_procedure = attributes[:'audit_procedure'] + end + + if attributes.key?(:'authority') + self.authority = attributes[:'authority'] + end + + if attributes.key?(:'benchmark_title') + self.benchmark_title = attributes[:'benchmark_title'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'impact_statement') + self.impact_statement = attributes[:'impact_statement'] + end + + if attributes.key?(:'platform') + self.platform = attributes[:'platform'] + end + + if attributes.key?(:'rationale_statement') + self.rationale_statement = attributes[:'rationale_statement'] + end + + if attributes.key?(:'recommendation_id') + self.recommendation_id = attributes[:'recommendation_id'] + end + + if attributes.key?(:'references') + if (value = attributes[:'references']).is_a?(Array) + self.references = value + end + end + + if attributes.key?(:'remediation_procedure') + self.remediation_procedure = attributes[:'remediation_procedure'] + end + + 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 + if @additional_information.nil? + invalid_properties.push('invalid value for "additional_information", additional_information cannot be nil.') + end + + if @applicable_profiles.nil? + invalid_properties.push('invalid value for "applicable_profiles", applicable_profiles cannot be nil.') + end + + if @assessment_status.nil? + invalid_properties.push('invalid value for "assessment_status", assessment_status cannot be nil.') + end + + if @audit_procedure.nil? + invalid_properties.push('invalid value for "audit_procedure", audit_procedure cannot be nil.') + end + + if @authority.nil? + invalid_properties.push('invalid value for "authority", authority cannot be nil.') + end + + if @benchmark_title.nil? + invalid_properties.push('invalid value for "benchmark_title", benchmark_title cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @impact_statement.nil? + invalid_properties.push('invalid value for "impact_statement", impact_statement cannot be nil.') + end + + if @platform.nil? + invalid_properties.push('invalid value for "platform", platform cannot be nil.') + end + + if @rationale_statement.nil? + invalid_properties.push('invalid value for "rationale_statement", rationale_statement cannot be nil.') + end + + if @recommendation_id.nil? + invalid_properties.push('invalid value for "recommendation_id", recommendation_id cannot be nil.') + end + + if @remediation_procedure.nil? + invalid_properties.push('invalid value for "remediation_procedure", remediation_procedure cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title 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 @additional_information.nil? + return false if @applicable_profiles.nil? + return false if @assessment_status.nil? + return false if @audit_procedure.nil? + return false if @authority.nil? + return false if @benchmark_title.nil? + return false if @description.nil? + return false if @id.nil? + return false if @impact_statement.nil? + return false if @platform.nil? + return false if @rationale_statement.nil? + return false if @recommendation_id.nil? + return false if @remediation_procedure.nil? + return false if @title.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 && + additional_information == o.additional_information && + applicable_profiles == o.applicable_profiles && + assessment_status == o.assessment_status && + audit_procedure == o.audit_procedure && + authority == o.authority && + benchmark_title == o.benchmark_title && + description == o.description && + id == o.id && + impact_statement == o.impact_statement && + platform == o.platform && + rationale_statement == o.rationale_statement && + recommendation_id == o.recommendation_id && + references == o.references && + remediation_procedure == o.remediation_procedure && + 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 + [additional_information, applicable_profiles, assessment_status, audit_procedure, authority, benchmark_title, description, id, impact_statement, platform, rationale_statement, recommendation_id, references, remediation_procedure, 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/domain_api_vulnerability_app_v2.rb b/lib/crimson-falcon/models/domain_api_vulnerability_app_v2.rb index 19ad0619..3bfedfa3 100644 --- a/lib/crimson-falcon/models/domain_api_vulnerability_app_v2.rb +++ b/lib/crimson-falcon/models/domain_api_vulnerability_app_v2.rb @@ -32,11 +32,16 @@ module Falcon class DomainAPIVulnerabilityAppV2 + # Refers to the normalized product name of the product for which the vulnerability has been detected + attr_accessor :product_name_normalized + + # Refers to the un-normalized combination of product name and version of the product for which the vulnerability has been detected attr_accessor :product_name_version # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'product_name_normalized' => :'product_name_normalized', :'product_name_version' => :'product_name_version' } end @@ -49,6 +54,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'product_name_normalized' => :'String', :'product_name_version' => :'String' } end @@ -74,6 +80,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'product_name_normalized') + self.product_name_normalized = attributes[:'product_name_normalized'] + end + if attributes.key?(:'product_name_version') self.product_name_version = attributes[:'product_name_version'] end @@ -83,6 +93,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @product_name_normalized.nil? + invalid_properties.push('invalid value for "product_name_normalized", product_name_normalized cannot be nil.') + end + if @product_name_version.nil? invalid_properties.push('invalid value for "product_name_version", product_name_version cannot be nil.') end @@ -93,6 +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 @product_name_normalized.nil? return false if @product_name_version.nil? true end @@ -102,6 +117,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + product_name_normalized == o.product_name_normalized && product_name_version == o.product_name_version end @@ -114,7 +130,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [product_name_version].hash + [product_name_normalized, product_name_version].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_api_vulnerability_cve_details_facet_v2.rb b/lib/crimson-falcon/models/domain_api_vulnerability_cve_details_facet_v2.rb index c682bb83..e96b3ac3 100644 --- a/lib/crimson-falcon/models/domain_api_vulnerability_cve_details_facet_v2.rb +++ b/lib/crimson-falcon/models/domain_api_vulnerability_cve_details_facet_v2.rb @@ -75,6 +75,9 @@ class DomainAPIVulnerabilityCVEDetailsFacetV2 # Corresponds to a point in time when Spotlight offered support for detecting a specific vulnerability attr_accessor :spotlight_published_date + # The types of vulnerability. Can be of: Vulnerability, Misconfiguration, and Unsupported software + attr_accessor :types + # Refers to the vector of attack or the specific method or path through which an attacker can exploit a vulnerability attr_accessor :vector @@ -99,6 +102,7 @@ def self.attribute_map :'remediation_level' => :'remediation_level', :'severity' => :'severity', :'spotlight_published_date' => :'spotlight_published_date', + :'types' => :'types', :'vector' => :'vector', :'vendor_advisory' => :'vendor_advisory' } @@ -127,6 +131,7 @@ def self.openapi_types :'remediation_level' => :'String', :'severity' => :'String', :'spotlight_published_date' => :'String', + :'types' => :'Array', :'vector' => :'String', :'vendor_advisory' => :'Array' } @@ -217,6 +222,12 @@ def initialize(attributes = {}) self.spotlight_published_date = attributes[:'spotlight_published_date'] end + if attributes.key?(:'types') + if (value = attributes[:'types']).is_a?(Array) + self.types = value + end + end + if attributes.key?(:'vector') self.vector = attributes[:'vector'] end @@ -266,6 +277,7 @@ def ==(o) remediation_level == o.remediation_level && severity == o.severity && spotlight_published_date == o.spotlight_published_date && + types == o.types && vector == o.vector && vendor_advisory == o.vendor_advisory end @@ -279,7 +291,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [actors, base_score, cisa_info, description, exploit_status, exploitability_score, exprt_rating, id, impact_score, name, published_date, references, remediation_level, severity, spotlight_published_date, vector, vendor_advisory].hash + [actors, base_score, cisa_info, description, exploit_status, exploitability_score, exprt_rating, id, impact_score, name, published_date, references, remediation_level, severity, spotlight_published_date, types, vector, vendor_advisory].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_api_vulnerability_extended_app_v2.rb b/lib/crimson-falcon/models/domain_api_vulnerability_extended_app_v2.rb index 63afb042..a8290c2b 100644 --- a/lib/crimson-falcon/models/domain_api_vulnerability_extended_app_v2.rb +++ b/lib/crimson-falcon/models/domain_api_vulnerability_extended_app_v2.rb @@ -34,6 +34,10 @@ module Falcon class DomainAPIVulnerabilityExtendedAppV2 attr_accessor :evaluation_logic + # Refers to the normalized product name of the product for which the vulnerability has been detected + attr_accessor :product_name_normalized + + # Refers to the un-normalized combination of product name and version of the product for which the vulnerability has been detected attr_accessor :product_name_version attr_accessor :remediation @@ -45,6 +49,7 @@ class DomainAPIVulnerabilityExtendedAppV2 def self.attribute_map { :'evaluation_logic' => :'evaluation_logic', + :'product_name_normalized' => :'product_name_normalized', :'product_name_version' => :'product_name_version', :'remediation' => :'remediation', :'sub_status' => :'sub_status' @@ -60,6 +65,7 @@ def self.acceptable_attributes def self.openapi_types { :'evaluation_logic' => :'DomainAPIEvaluationLogicV1', + :'product_name_normalized' => :'String', :'product_name_version' => :'String', :'remediation' => :'DomainAPIRemediationIDs', :'sub_status' => :'String' @@ -91,6 +97,10 @@ def initialize(attributes = {}) self.evaluation_logic = attributes[:'evaluation_logic'] end + if attributes.key?(:'product_name_normalized') + self.product_name_normalized = attributes[:'product_name_normalized'] + end + if attributes.key?(:'product_name_version') self.product_name_version = attributes[:'product_name_version'] end @@ -108,6 +118,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @product_name_normalized.nil? + invalid_properties.push('invalid value for "product_name_normalized", product_name_normalized cannot be nil.') + end + if @product_name_version.nil? invalid_properties.push('invalid value for "product_name_version", product_name_version cannot be nil.') end @@ -118,6 +132,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 @product_name_normalized.nil? return false if @product_name_version.nil? true end @@ -128,6 +143,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && evaluation_logic == o.evaluation_logic && + product_name_normalized == o.product_name_normalized && product_name_version == o.product_name_version && remediation == o.remediation && sub_status == o.sub_status @@ -142,7 +158,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [evaluation_logic, product_name_version, remediation, sub_status].hash + [evaluation_logic, product_name_normalized, product_name_version, remediation, sub_status].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_api_vulnerability_host_facet_v2.rb b/lib/crimson-falcon/models/domain_api_vulnerability_host_facet_v2.rb index 68d6bff6..2d9351fd 100644 --- a/lib/crimson-falcon/models/domain_api_vulnerability_host_facet_v2.rb +++ b/lib/crimson-falcon/models/domain_api_vulnerability_host_facet_v2.rb @@ -38,9 +38,6 @@ class DomainAPIVulnerabilityHostFacetV2 # Refers to one or more roles that have been assigned to the assets attr_accessor :asset_roles - # A unique identifier assigned by entity graph - attr_accessor :entity_graph_id - # Refers to a logic grouping of assets attr_accessor :groups @@ -103,7 +100,6 @@ def self.attribute_map { :'asset_criticality' => :'asset_criticality', :'asset_roles' => :'asset_roles', - :'entity_graph_id' => :'entity_graph_id', :'groups' => :'groups', :'host_last_seen_timestamp' => :'host_last_seen_timestamp', :'hostname' => :'hostname', @@ -136,7 +132,6 @@ def self.openapi_types { :'asset_criticality' => :'String', :'asset_roles' => :'Array', - :'entity_graph_id' => :'String', :'groups' => :'Array', :'host_last_seen_timestamp' => :'String', :'hostname' => :'String', @@ -190,10 +185,6 @@ def initialize(attributes = {}) end end - if attributes.key?(:'entity_graph_id') - self.entity_graph_id = attributes[:'entity_graph_id'] - end - if attributes.key?(:'groups') if (value = attributes[:'groups']).is_a?(Array) self.groups = value @@ -332,7 +323,6 @@ def ==(o) self.class == o.class && asset_criticality == o.asset_criticality && asset_roles == o.asset_roles && - entity_graph_id == o.entity_graph_id && groups == o.groups && host_last_seen_timestamp == o.host_last_seen_timestamp && hostname == o.hostname && @@ -363,7 +353,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [asset_criticality, asset_roles, entity_graph_id, groups, host_last_seen_timestamp, hostname, instance_id, internet_exposure, local_ip, machine_domain, managed_by, os_build, os_version, ou, platform, product_type_desc, service_provider, service_provider_account_id, site_name, system_manufacturer, tags, third_party_asset_ids].hash + [asset_criticality, asset_roles, groups, host_last_seen_timestamp, hostname, instance_id, internet_exposure, local_ip, machine_domain, managed_by, os_build, os_version, ou, platform, product_type_desc, service_provider, service_provider_account_id, site_name, system_manufacturer, tags, third_party_asset_ids].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_api_vulnerability_v2.rb b/lib/crimson-falcon/models/domain_api_vulnerability_v2.rb index 4b34a1f5..e0236ac1 100644 --- a/lib/crimson-falcon/models/domain_api_vulnerability_v2.rb +++ b/lib/crimson-falcon/models/domain_api_vulnerability_v2.rb @@ -59,9 +59,6 @@ class DomainAPIVulnerabilityV2 # Vulnerability unique ID attr_accessor :id - # Contains ports that the vulnerability affects - attr_accessor :ports - attr_accessor :remediation # Current status of a vulnerability (open, closed, reopen) @@ -75,9 +72,6 @@ class DomainAPIVulnerabilityV2 # Dynamic label that contains the CVE ID if applicable, otherwise the vulnerability metadata ID or label from the provider attr_accessor :vulnerability_id - # Unique identifier for the vulnerability metadata - attr_accessor :vulnerability_metadata_id - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -91,13 +85,11 @@ def self.attribute_map :'data_providers' => :'data_providers', :'host_info' => :'host_info', :'id' => :'id', - :'ports' => :'ports', :'remediation' => :'remediation', :'status' => :'status', :'suppression_info' => :'suppression_info', :'updated_timestamp' => :'updated_timestamp', - :'vulnerability_id' => :'vulnerability_id', - :'vulnerability_metadata_id' => :'vulnerability_metadata_id' + :'vulnerability_id' => :'vulnerability_id' } end @@ -119,13 +111,11 @@ def self.openapi_types :'data_providers' => :'Array', :'host_info' => :'DomainAPIVulnerabilityHostFacetV2', :'id' => :'String', - :'ports' => :'Array', :'remediation' => :'DomainAPIVulnerabilityRemediationFacetV2', :'status' => :'String', :'suppression_info' => :'DomainAPIVulnerabilitySuppressionInfoV2', :'updated_timestamp' => :'String', - :'vulnerability_id' => :'String', - :'vulnerability_metadata_id' => :'String' + :'vulnerability_id' => :'String' } end @@ -194,12 +184,6 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end - if attributes.key?(:'ports') - if (value = attributes[:'ports']).is_a?(Array) - self.ports = value - end - end - if attributes.key?(:'remediation') self.remediation = attributes[:'remediation'] end @@ -219,10 +203,6 @@ def initialize(attributes = {}) if attributes.key?(:'vulnerability_id') self.vulnerability_id = attributes[:'vulnerability_id'] end - - if attributes.key?(:'vulnerability_metadata_id') - self.vulnerability_metadata_id = attributes[:'vulnerability_metadata_id'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -283,13 +263,11 @@ def ==(o) data_providers == o.data_providers && host_info == o.host_info && id == o.id && - ports == o.ports && remediation == o.remediation && status == o.status && suppression_info == o.suppression_info && updated_timestamp == o.updated_timestamp && - vulnerability_id == o.vulnerability_id && - vulnerability_metadata_id == o.vulnerability_metadata_id + vulnerability_id == o.vulnerability_id end # @see the `==` method @@ -301,7 +279,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [aid, app, apps, cid, closed_timestamp, created_timestamp, cve, data_providers, host_info, id, ports, remediation, status, suppression_info, updated_timestamp, vulnerability_id, vulnerability_metadata_id].hash + [aid, app, apps, cid, closed_timestamp, created_timestamp, cve, data_providers, host_info, id, remediation, status, suppression_info, updated_timestamp, vulnerability_id].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_asset_criticality_info_v1.rb b/lib/crimson-falcon/models/domain_asset_criticality_info_v1.rb new file mode 100644 index 00000000..6fcdca68 --- /dev/null +++ b/lib/crimson-falcon/models/domain_asset_criticality_info_v1.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 DomainAssetCriticalityInfoV1 + attr_accessor :criticality + + attr_accessor :internet_exposure + + attr_accessor :roles + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'criticality' => :'criticality', + :'internet_exposure' => :'internet_exposure', + :'roles' => :'roles' + } + 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 + { + :'criticality' => :'String', + :'internet_exposure' => :'String', + :'roles' => :'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::DomainAssetCriticalityInfoV1` 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::DomainAssetCriticalityInfoV1`. 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?(:'criticality') + self.criticality = attributes[:'criticality'] + end + + if attributes.key?(:'internet_exposure') + self.internet_exposure = attributes[:'internet_exposure'] + end + + if attributes.key?(:'roles') + if (value = attributes[:'roles']).is_a?(Array) + self.roles = 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 && + criticality == o.criticality && + internet_exposure == o.internet_exposure && + roles == o.roles + 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 + [criticality, internet_exposure, roles].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_attachment.rb b/lib/crimson-falcon/models/domain_attachment.rb new file mode 100644 index 00000000..f3603e38 --- /dev/null +++ b/lib/crimson-falcon/models/domain_attachment.rb @@ -0,0 +1,298 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainAttachment + attr_accessor :date + + attr_accessor :file_name + + attr_accessor :id + + attr_accessor :link + + attr_accessor :mime_type + + attr_accessor :sha256 + + attr_accessor :source_url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'date' => :'date', + :'file_name' => :'file_name', + :'id' => :'id', + :'link' => :'link', + :'mime_type' => :'mime_type', + :'sha256' => :'sha256', + :'source_url' => :'source_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 + { + :'date' => :'Time', + :'file_name' => :'String', + :'id' => :'String', + :'link' => :'String', + :'mime_type' => :'String', + :'sha256' => :'String', + :'source_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::DomainAttachment` 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::DomainAttachment`. 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?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'link') + self.link = attributes[:'link'] + end + + if attributes.key?(:'mime_type') + self.mime_type = attributes[:'mime_type'] + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + end + + if attributes.key?(:'source_url') + self.source_url = attributes[:'source_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 @link.nil? + invalid_properties.push('invalid value for "link", link cannot be nil.') + end + + if @mime_type.nil? + invalid_properties.push('invalid value for "mime_type", mime_type 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 @link.nil? + return false if @mime_type.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 && + date == o.date && + file_name == o.file_name && + id == o.id && + link == o.link && + mime_type == o.mime_type && + sha256 == o.sha256 && + source_url == o.source_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 + [date, file_name, id, link, mime_type, sha256, source_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/domain_aws_account_input.rb b/lib/crimson-falcon/models/domain_aws_account_input.rb new file mode 100644 index 00000000..50514488 --- /dev/null +++ b/lib/crimson-falcon/models/domain_aws_account_input.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 DomainAWSAccountInput + attr_accessor :account_number + + attr_accessor :batch_regions + + attr_accessor :iam_external_id + + attr_accessor :iam_role_arn + + attr_accessor :kms_alias + + attr_accessor :processing_account + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_number' => :'account_number', + :'batch_regions' => :'batch_regions', + :'iam_external_id' => :'iam_external_id', + :'iam_role_arn' => :'iam_role_arn', + :'kms_alias' => :'kms_alias', + :'processing_account' => :'processing_account' + } + 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_number' => :'String', + :'batch_regions' => :'Array', + :'iam_external_id' => :'String', + :'iam_role_arn' => :'String', + :'kms_alias' => :'String', + :'processing_account' => :'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::DomainAWSAccountInput` 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::DomainAWSAccountInput`. 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_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'batch_regions') + if (value = attributes[:'batch_regions']).is_a?(Array) + self.batch_regions = value + end + end + + if attributes.key?(:'iam_external_id') + self.iam_external_id = attributes[:'iam_external_id'] + end + + if attributes.key?(:'iam_role_arn') + self.iam_role_arn = attributes[:'iam_role_arn'] + end + + if attributes.key?(:'kms_alias') + self.kms_alias = attributes[:'kms_alias'] + end + + if attributes.key?(:'processing_account') + self.processing_account = attributes[:'processing_account'] + 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 @account_number.nil? + invalid_properties.push('invalid value for "account_number", account_number cannot be nil.') + end + + if @batch_regions.nil? + invalid_properties.push('invalid value for "batch_regions", batch_regions cannot be nil.') + end + + if @iam_external_id.nil? + invalid_properties.push('invalid value for "iam_external_id", iam_external_id cannot be nil.') + end + + if @iam_role_arn.nil? + invalid_properties.push('invalid value for "iam_role_arn", iam_role_arn cannot be nil.') + end + + if @kms_alias.nil? + invalid_properties.push('invalid value for "kms_alias", kms_alias cannot be nil.') + end + + if @processing_account.nil? + invalid_properties.push('invalid value for "processing_account", processing_account 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 @account_number.nil? + return false if @batch_regions.nil? + return false if @iam_external_id.nil? + return false if @iam_role_arn.nil? + return false if @kms_alias.nil? + return false if @processing_account.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 && + account_number == o.account_number && + batch_regions == o.batch_regions && + iam_external_id == o.iam_external_id && + iam_role_arn == o.iam_role_arn && + kms_alias == o.kms_alias && + processing_account == o.processing_account + 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_number, batch_regions, iam_external_id, iam_role_arn, kms_alias, processing_account].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_v2.rb b/lib/crimson-falcon/models/domain_aws_account_v2.rb index 1891291e..4be06f51 100644 --- a/lib/crimson-falcon/models/domain_aws_account_v2.rb +++ b/lib/crimson-falcon/models/domain_aws_account_v2.rb @@ -90,6 +90,9 @@ class DomainAWSAccountV2 attr_accessor :intermediate_role_arn + # Is CSPM Lite enabled. + attr_accessor :is_cspm_lite + attr_accessor :is_custom_rolename attr_accessor :is_master @@ -149,6 +152,7 @@ def self.attribute_map :'external_id' => :'external_id', :'iam_role_arn' => :'iam_role_arn', :'intermediate_role_arn' => :'intermediate_role_arn', + :'is_cspm_lite' => :'is_cspm_lite', :'is_custom_rolename' => :'is_custom_rolename', :'is_master' => :'is_master', :'organization_id' => :'organization_id', @@ -199,6 +203,7 @@ def self.openapi_types :'external_id' => :'String', :'iam_role_arn' => :'String', :'intermediate_role_arn' => :'String', + :'is_cspm_lite' => :'Boolean', :'is_custom_rolename' => :'Boolean', :'is_master' => :'Boolean', :'organization_id' => :'String', @@ -345,6 +350,10 @@ def initialize(attributes = {}) self.intermediate_role_arn = attributes[:'intermediate_role_arn'] end + if attributes.key?(:'is_cspm_lite') + self.is_cspm_lite = attributes[:'is_cspm_lite'] + end + if attributes.key?(:'is_custom_rolename') self.is_custom_rolename = attributes[:'is_custom_rolename'] end @@ -480,6 +489,7 @@ def ==(o) external_id == o.external_id && iam_role_arn == o.iam_role_arn && intermediate_role_arn == o.intermediate_role_arn && + is_cspm_lite == o.is_cspm_lite && is_custom_rolename == o.is_custom_rolename && is_master == o.is_master && organization_id == o.organization_id && @@ -505,7 +515,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, id, updated_at, account_id, account_name, account_type, active_regions, aws_cloudtrail_bucket_name, aws_cloudtrail_region, aws_eventbus_arn, aws_permissions_status, behavior_assessment_enabled, cid, cloud_scopes, cloudformation_url, conditions, cspm_enabled, d4c, d4c_migrated, environment, eventbus_name, external_id, iam_role_arn, intermediate_role_arn, is_custom_rolename, is_master, organization_id, remediation_cloudformation_url, remediation_region, remediation_tou_accepted, root_account_id, root_iam_role, secondary_role_arn, sensor_management_enabled, settings, status, use_existing_cloudtrail, valid].hash + [created_at, deleted_at, id, updated_at, account_id, account_name, account_type, active_regions, aws_cloudtrail_bucket_name, aws_cloudtrail_region, aws_eventbus_arn, aws_permissions_status, behavior_assessment_enabled, cid, cloud_scopes, cloudformation_url, conditions, cspm_enabled, d4c, d4c_migrated, environment, eventbus_name, external_id, iam_role_arn, intermediate_role_arn, is_cspm_lite, is_custom_rolename, is_master, organization_id, remediation_cloudformation_url, remediation_region, remediation_tou_accepted, root_account_id, root_iam_role, secondary_role_arn, sensor_management_enabled, settings, status, use_existing_cloudtrail, valid].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_aws_batch_cluster_region.rb b/lib/crimson-falcon/models/domain_aws_batch_cluster_region.rb new file mode 100644 index 00000000..b92cffc3 --- /dev/null +++ b/lib/crimson-falcon/models/domain_aws_batch_cluster_region.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 DomainAWSBatchClusterRegion + attr_accessor :job_definition_name + + attr_accessor :job_queue + + attr_accessor :region + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'job_definition_name' => :'job_definition_name', + :'job_queue' => :'job_queue', + :'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 + { + :'job_definition_name' => :'String', + :'job_queue' => :'String', + :'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::DomainAWSBatchClusterRegion` 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::DomainAWSBatchClusterRegion`. 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?(:'job_definition_name') + self.job_definition_name = attributes[:'job_definition_name'] + end + + if attributes.key?(:'job_queue') + self.job_queue = attributes[:'job_queue'] + 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 @job_definition_name.nil? + invalid_properties.push('invalid value for "job_definition_name", job_definition_name cannot be nil.') + end + + if @job_queue.nil? + invalid_properties.push('invalid value for "job_queue", job_queue 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 @job_definition_name.nil? + return false if @job_queue.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 && + job_definition_name == o.job_definition_name && + job_queue == o.job_queue && + 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 + [job_definition_name, job_queue, 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/domain_azure_management_group_role_assignment.rb b/lib/crimson-falcon/models/domain_azure_management_group_role_assignment.rb new file mode 100644 index 00000000..6ef96cd1 --- /dev/null +++ b/lib/crimson-falcon/models/domain_azure_management_group_role_assignment.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 DomainAzureManagementGroupRoleAssignment + attr_accessor :management_group_id + + attr_accessor :name + + attr_accessor :role_definition_id + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'management_group_id' => :'management_group_id', + :'name' => :'name', + :'role_definition_id' => :'role_definition_id', + :'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 + { + :'management_group_id' => :'String', + :'name' => :'String', + :'role_definition_id' => :'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::DomainAzureManagementGroupRoleAssignment` 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::DomainAzureManagementGroupRoleAssignment`. 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?(:'management_group_id') + self.management_group_id = attributes[:'management_group_id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'role_definition_id') + self.role_definition_id = attributes[:'role_definition_id'] + 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 @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 @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 && + management_group_id == o.management_group_id && + name == o.name && + role_definition_id == o.role_definition_id && + 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 + [management_group_id, name, role_definition_id, 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/domain_base_api_vulnerability_v2.rb b/lib/crimson-falcon/models/domain_base_api_vulnerability_v2.rb index 75f06ee9..af2122bc 100644 --- a/lib/crimson-falcon/models/domain_base_api_vulnerability_v2.rb +++ b/lib/crimson-falcon/models/domain_base_api_vulnerability_v2.rb @@ -59,9 +59,6 @@ class DomainBaseAPIVulnerabilityV2 # Vulnerability unique ID attr_accessor :id - # Contains ports that the vulnerability affects - attr_accessor :ports - attr_accessor :remediation # Current status of a vulnerability (open, closed, reopen) @@ -75,9 +72,6 @@ class DomainBaseAPIVulnerabilityV2 # Dynamic label that contains the CVE ID if applicable, otherwise the vulnerability metadata ID or label from the provider attr_accessor :vulnerability_id - # Unique identifier for the vulnerability metadata - attr_accessor :vulnerability_metadata_id - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -91,13 +85,11 @@ def self.attribute_map :'data_providers' => :'data_providers', :'host_info' => :'host_info', :'id' => :'id', - :'ports' => :'ports', :'remediation' => :'remediation', :'status' => :'status', :'suppression_info' => :'suppression_info', :'updated_timestamp' => :'updated_timestamp', - :'vulnerability_id' => :'vulnerability_id', - :'vulnerability_metadata_id' => :'vulnerability_metadata_id' + :'vulnerability_id' => :'vulnerability_id' } end @@ -119,13 +111,11 @@ def self.openapi_types :'data_providers' => :'Array', :'host_info' => :'DomainAPIVulnerabilityHostFacetV2', :'id' => :'String', - :'ports' => :'Array', :'remediation' => :'DomainAPIVulnerabilityRemediationFacetV2', :'status' => :'String', :'suppression_info' => :'DomainAPIVulnerabilitySuppressionInfoV2', :'updated_timestamp' => :'String', - :'vulnerability_id' => :'String', - :'vulnerability_metadata_id' => :'String' + :'vulnerability_id' => :'String' } end @@ -194,12 +184,6 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end - if attributes.key?(:'ports') - if (value = attributes[:'ports']).is_a?(Array) - self.ports = value - end - end - if attributes.key?(:'remediation') self.remediation = attributes[:'remediation'] end @@ -219,10 +203,6 @@ def initialize(attributes = {}) if attributes.key?(:'vulnerability_id') self.vulnerability_id = attributes[:'vulnerability_id'] end - - if attributes.key?(:'vulnerability_metadata_id') - self.vulnerability_metadata_id = attributes[:'vulnerability_metadata_id'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -283,13 +263,11 @@ def ==(o) data_providers == o.data_providers && host_info == o.host_info && id == o.id && - ports == o.ports && remediation == o.remediation && status == o.status && suppression_info == o.suppression_info && updated_timestamp == o.updated_timestamp && - vulnerability_id == o.vulnerability_id && - vulnerability_metadata_id == o.vulnerability_metadata_id + vulnerability_id == o.vulnerability_id end # @see the `==` method @@ -301,7 +279,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [aid, app, apps, cid, closed_timestamp, created_timestamp, cve, data_providers, host_info, id, ports, remediation, status, suppression_info, updated_timestamp, vulnerability_id, vulnerability_metadata_id].hash + [aid, app, apps, cid, closed_timestamp, created_timestamp, cve, data_providers, host_info, id, remediation, status, suppression_info, updated_timestamp, vulnerability_id].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_breached_item_v1.rb b/lib/crimson-falcon/models/domain_breached_item_v1.rb index bd8d3509..c2ba22a6 100644 --- a/lib/crimson-falcon/models/domain_breached_item_v1.rb +++ b/lib/crimson-falcon/models/domain_breached_item_v1.rb @@ -32,14 +32,24 @@ module Falcon class DomainBreachedItemV1 + attr_accessor :bot + + # The company of the user attr_accessor :company + # The status set after deduplication. Possible values: 'newly_detected', 'previously_reported', 'other' + attr_accessor :credential_status + + # The domain where the credentials are valid attr_accessor :credentials_domain + # The IP where the credentials are valid attr_accessor :credentials_ip + # The URL where the credentials are valid attr_accessor :credentials_url + # The nickname of the user on the impacted site attr_accessor :display_name # The domain associated with the breached account. @@ -53,6 +63,7 @@ class DomainBreachedItemV1 # The original hashing algorithm applied to the breached password. Possible values: 'plain', 'unknown', 'base64', 'md5', 'sha1', 'bcrypt', etc. The value 'plain' means that the password was originally found as plaintext. attr_accessor :hash_type + # The user's job at the company attr_accessor :job_position attr_accessor :location @@ -60,14 +71,19 @@ class DomainBreachedItemV1 # The username of the breached account. attr_accessor :login_id + # The stealer log bot malware family + attr_accessor :malware_family + # The name of the person associated with the breached account. attr_accessor :name # The breached password. Passwords are returned as salted hashes, generated using the SHA256 algorithm and the CID as the salt. attr_accessor :password + # The password hash attr_accessor :password_hash + # The password salt attr_accessor :password_salt # The phone number of the person associated with the breached account. @@ -75,14 +91,18 @@ class DomainBreachedItemV1 attr_accessor :social + # The ID of the user on the impacted site attr_accessor :user_id + # The IP of the user on the impacted site attr_accessor :user_ip # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'bot' => :'bot', :'company' => :'company', + :'credential_status' => :'credential_status', :'credentials_domain' => :'credentials_domain', :'credentials_ip' => :'credentials_ip', :'credentials_url' => :'credentials_url', @@ -94,6 +114,7 @@ def self.attribute_map :'job_position' => :'job_position', :'location' => :'location', :'login_id' => :'login_id', + :'malware_family' => :'malware_family', :'name' => :'name', :'password' => :'password', :'password_hash' => :'password_hash', @@ -113,7 +134,9 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'bot' => :'DomainExposedDataRecordBotV1', :'company' => :'String', + :'credential_status' => :'String', :'credentials_domain' => :'String', :'credentials_ip' => :'String', :'credentials_url' => :'String', @@ -125,6 +148,7 @@ def self.openapi_types :'job_position' => :'String', :'location' => :'DomainExposedDataRecordLocationV1', :'login_id' => :'String', + :'malware_family' => :'String', :'name' => :'String', :'password' => :'String', :'password_hash' => :'String', @@ -157,10 +181,18 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'bot') + self.bot = attributes[:'bot'] + end + if attributes.key?(:'company') self.company = attributes[:'company'] end + if attributes.key?(:'credential_status') + self.credential_status = attributes[:'credential_status'] + end + if attributes.key?(:'credentials_domain') self.credentials_domain = attributes[:'credentials_domain'] end @@ -205,6 +237,10 @@ def initialize(attributes = {}) self.login_id = attributes[:'login_id'] end + if attributes.key?(:'malware_family') + self.malware_family = attributes[:'malware_family'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -291,7 +327,9 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + bot == o.bot && company == o.company && + credential_status == o.credential_status && credentials_domain == o.credentials_domain && credentials_ip == o.credentials_ip && credentials_url == o.credentials_url && @@ -303,6 +341,7 @@ def ==(o) job_position == o.job_position && location == o.location && login_id == o.login_id && + malware_family == o.malware_family && name == o.name && password == o.password && password_hash == o.password_hash && @@ -322,7 +361,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [company, credentials_domain, credentials_ip, credentials_url, display_name, domain, email, financial, hash_type, job_position, location, login_id, name, password, password_hash, password_salt, phone, social, user_id, user_ip].hash + [bot, company, credential_status, credentials_domain, credentials_ip, credentials_url, display_name, domain, email, financial, hash_type, job_position, location, login_id, malware_family, name, password, password_hash, password_salt, phone, social, user_id, user_ip].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_card.rb b/lib/crimson-falcon/models/domain_card.rb new file mode 100644 index 00000000..f95f03aa --- /dev/null +++ b/lib/crimson-falcon/models/domain_card.rb @@ -0,0 +1,288 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainCard + attr_accessor :bin_code + + attr_accessor :cardholder_name + + attr_accessor :description + + attr_accessor :expiration + + attr_accessor :issuing_bank + + attr_accessor :last_transaction_at + + attr_accessor :servicecode + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bin_code' => :'bin_code', + :'cardholder_name' => :'cardholder_name', + :'description' => :'description', + :'expiration' => :'expiration', + :'issuing_bank' => :'issuing_bank', + :'last_transaction_at' => :'last_transaction_at', + :'servicecode' => :'servicecode' + } + 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 + { + :'bin_code' => :'String', + :'cardholder_name' => :'String', + :'description' => :'String', + :'expiration' => :'String', + :'issuing_bank' => :'String', + :'last_transaction_at' => :'Time', + :'servicecode' => :'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::DomainCard` 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::DomainCard`. 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?(:'bin_code') + self.bin_code = attributes[:'bin_code'] + end + + if attributes.key?(:'cardholder_name') + self.cardholder_name = attributes[:'cardholder_name'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'expiration') + self.expiration = attributes[:'expiration'] + end + + if attributes.key?(:'issuing_bank') + self.issuing_bank = attributes[:'issuing_bank'] + end + + if attributes.key?(:'last_transaction_at') + self.last_transaction_at = attributes[:'last_transaction_at'] + end + + if attributes.key?(:'servicecode') + self.servicecode = attributes[:'servicecode'] + 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 && + bin_code == o.bin_code && + cardholder_name == o.cardholder_name && + description == o.description && + expiration == o.expiration && + issuing_bank == o.issuing_bank && + last_transaction_at == o.last_transaction_at && + servicecode == o.servicecode + 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 + [bin_code, cardholder_name, description, expiration, issuing_bank, last_transaction_at, servicecode].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_cid_group.rb b/lib/crimson-falcon/models/domain_cid_group.rb index 7c11f883..c3f41e9c 100644 --- a/lib/crimson-falcon/models/domain_cid_group.rb +++ b/lib/crimson-falcon/models/domain_cid_group.rb @@ -32,17 +32,23 @@ module Falcon class DomainCIDGroup + attr_accessor :cid + attr_accessor :cid_group_id attr_accessor :description + attr_accessor :is_default + attr_accessor :name # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'cid' => :'cid', :'cid_group_id' => :'cid_group_id', :'description' => :'description', + :'is_default' => :'is_default', :'name' => :'name' } end @@ -55,8 +61,10 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'cid' => :'String', :'cid_group_id' => :'String', :'description' => :'String', + :'is_default' => :'Boolean', :'name' => :'String' } end @@ -82,6 +90,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + if attributes.key?(:'cid_group_id') self.cid_group_id = attributes[:'cid_group_id'] end @@ -90,6 +102,10 @@ def initialize(attributes = {}) self.description = attributes[:'description'] end + if attributes.key?(:'is_default') + self.is_default = attributes[:'is_default'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -123,8 +139,10 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + cid == o.cid && cid_group_id == o.cid_group_id && description == o.description && + is_default == o.is_default && name == o.name end @@ -137,7 +155,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [cid_group_id, description, name].hash + [cid, cid_group_id, description, is_default, name].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_cid_policy_assignments.rb b/lib/crimson-falcon/models/domain_cid_policy_assignments.rb index 87d681a0..e63b5d4a 100644 --- a/lib/crimson-falcon/models/domain_cid_policy_assignments.rb +++ b/lib/crimson-falcon/models/domain_cid_policy_assignments.rb @@ -60,6 +60,10 @@ class DomainCIDPolicyAssignments attr_accessor :fql_policy + attr_accessor :hipaa_benchmark + + attr_accessor :hitrust_benchmark + attr_accessor :is_remediable attr_accessor :iso_benchmark @@ -101,6 +105,8 @@ def self.attribute_map :'created_at' => :'created_at', :'default_severity' => :'default_severity', :'fql_policy' => :'fql_policy', + :'hipaa_benchmark' => :'hipaa_benchmark', + :'hitrust_benchmark' => :'hitrust_benchmark', :'is_remediable' => :'is_remediable', :'iso_benchmark' => :'iso_benchmark', :'name' => :'name', @@ -138,6 +144,8 @@ def self.openapi_types :'created_at' => :'Time', :'default_severity' => :'String', :'fql_policy' => :'String', + :'hipaa_benchmark' => :'Array', + :'hitrust_benchmark' => :'Array', :'is_remediable' => :'Boolean', :'iso_benchmark' => :'Array', :'name' => :'String', @@ -236,6 +244,18 @@ def initialize(attributes = {}) self.fql_policy = attributes[:'fql_policy'] end + if attributes.key?(:'hipaa_benchmark') + if (value = attributes[:'hipaa_benchmark']).is_a?(Array) + self.hipaa_benchmark = value + end + end + + if attributes.key?(:'hitrust_benchmark') + if (value = attributes[:'hitrust_benchmark']).is_a?(Array) + self.hitrust_benchmark = value + end + end + if attributes.key?(:'is_remediable') self.is_remediable = attributes[:'is_remediable'] end @@ -332,6 +352,8 @@ def ==(o) created_at == o.created_at && default_severity == o.default_severity && fql_policy == o.fql_policy && + hipaa_benchmark == o.hipaa_benchmark && + hitrust_benchmark == o.hitrust_benchmark && is_remediable == o.is_remediable && iso_benchmark == o.iso_benchmark && name == o.name && @@ -355,7 +377,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_scope, attack_types, cid, cis_benchmark, cisa_benchmark, cloud_asset_type, cloud_asset_type_id, cloud_provider, cloud_service, cloud_service_friendly, cloud_service_subtype, created_at, default_severity, fql_policy, is_remediable, iso_benchmark, name, nist_benchmark, pci_benchmark, policy_id, policy_settings, policy_timestamp, policy_type, remediation_summary, soc2_benchmark, updated_at].hash + [account_scope, attack_types, cid, cis_benchmark, cisa_benchmark, cloud_asset_type, cloud_asset_type_id, cloud_provider, cloud_service, cloud_service_friendly, cloud_service_subtype, created_at, default_severity, fql_policy, hipaa_benchmark, hitrust_benchmark, is_remediable, iso_benchmark, name, nist_benchmark, pci_benchmark, policy_id, policy_settings, policy_timestamp, policy_type, remediation_summary, soc2_benchmark, updated_at].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_cloud_scope.rb b/lib/crimson-falcon/models/domain_cloud_scope.rb index a556abdb..cf22af29 100644 --- a/lib/crimson-falcon/models/domain_cloud_scope.rb +++ b/lib/crimson-falcon/models/domain_cloud_scope.rb @@ -52,6 +52,8 @@ class DomainCloudScope attr_accessor :total_accounts + attr_accessor :updated_at + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -64,7 +66,8 @@ def self.attribute_map :'id' => :'id', :'name' => :'name', :'owners' => :'owners', - :'total_accounts' => :'total_accounts' + :'total_accounts' => :'total_accounts', + :'updated_at' => :'updated_at' } end @@ -85,7 +88,8 @@ def self.openapi_types :'id' => :'Integer', :'name' => :'String', :'owners' => :'Array', - :'total_accounts' => :'Integer' + :'total_accounts' => :'Integer', + :'updated_at' => :'Time' } end @@ -153,6 +157,10 @@ def initialize(attributes = {}) if attributes.key?(:'total_accounts') self.total_accounts = attributes[:'total_accounts'] end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -182,7 +190,8 @@ def ==(o) id == o.id && name == o.name && owners == o.owners && - total_accounts == o.total_accounts + total_accounts == o.total_accounts && + updated_at == o.updated_at end # @see the `==` method @@ -194,7 +203,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [accounts, business_impact, business_unit, cid, created_at, description, id, name, owners, total_accounts].hash + [accounts, business_impact, business_unit, cid, created_at, description, id, name, owners, total_accounts, updated_at].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_credentials.rb b/lib/crimson-falcon/models/domain_credentials.rb index 2663a984..fc5f031f 100644 --- a/lib/crimson-falcon/models/domain_credentials.rb +++ b/lib/crimson-falcon/models/domain_credentials.rb @@ -32,12 +32,18 @@ module Falcon class DomainCredentials - attr_accessor :token + attr_accessor :sites_all + + attr_accessor :sites_with_cookie_only + + attr_accessor :sites_with_password # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'token' => :'token' + :'sites_all' => :'sites_all', + :'sites_with_cookie_only' => :'sites_with_cookie_only', + :'sites_with_password' => :'sites_with_password' } end @@ -49,7 +55,9 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'token' => :'String' + :'sites_all' => :'Array', + :'sites_with_cookie_only' => :'Array', + :'sites_with_password' => :'Array' } end @@ -74,8 +82,22 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'token') - self.token = attributes[:'token'] + if attributes.key?(:'sites_all') + if (value = attributes[:'sites_all']).is_a?(Array) + self.sites_all = value + end + end + + if attributes.key?(:'sites_with_cookie_only') + if (value = attributes[:'sites_with_cookie_only']).is_a?(Array) + self.sites_with_cookie_only = value + end + end + + if attributes.key?(:'sites_with_password') + if (value = attributes[:'sites_with_password']).is_a?(Array) + self.sites_with_password = value + end end end @@ -83,17 +105,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @token.nil? - invalid_properties.push('invalid value for "token", token 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 @token.nil? true end @@ -102,7 +119,9 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - token == o.token + sites_all == o.sites_all && + sites_with_cookie_only == o.sites_with_cookie_only && + sites_with_password == o.sites_with_password end # @see the `==` method @@ -114,7 +133,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [token].hash + [sites_all, sites_with_cookie_only, sites_with_password].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_detailed_notification_v1.rb b/lib/crimson-falcon/models/domain_detailed_notification_v1.rb index 855c84f0..d0a3f3fe 100644 --- a/lib/crimson-falcon/models/domain_detailed_notification_v1.rb +++ b/lib/crimson-falcon/models/domain_detailed_notification_v1.rb @@ -59,7 +59,7 @@ def self.acceptable_attributes def self.openapi_types { :'breach_details' => :'DomainBreachDetailsV1', - :'details' => :'DomainNotificationDetailsV1', + :'details' => :'DomainItemDetailsV1', :'id' => :'String', :'notification' => :'DomainNotificationV1' } diff --git a/lib/crimson-falcon/models/domain_device.rb b/lib/crimson-falcon/models/domain_device.rb index 421b9c60..51d70b3e 100644 --- a/lib/crimson-falcon/models/domain_device.rb +++ b/lib/crimson-falcon/models/domain_device.rb @@ -44,6 +44,8 @@ class DomainDevice attr_accessor :device_id + attr_accessor :device_policies + attr_accessor :external_ip attr_accessor :first_login_timestamp @@ -109,6 +111,7 @@ def self.attribute_map :'config_id_build' => :'config_id_build', :'config_id_platform' => :'config_id_platform', :'device_id' => :'device_id', + :'device_policies' => :'device_policies', :'external_ip' => :'external_ip', :'first_login_timestamp' => :'first_login_timestamp', :'first_login_user' => :'first_login_user', @@ -154,6 +157,7 @@ def self.openapi_types :'config_id_build' => :'String', :'config_id_platform' => :'String', :'device_id' => :'String', + :'device_policies' => :'DomainMappedDevicePolicies', :'external_ip' => :'String', :'first_login_timestamp' => :'String', :'first_login_user' => :'String', @@ -230,6 +234,10 @@ def initialize(attributes = {}) self.device_id = attributes[:'device_id'] end + if attributes.key?(:'device_policies') + self.device_policies = attributes[:'device_policies'] + end + if attributes.key?(:'external_ip') self.external_ip = attributes[:'external_ip'] end @@ -383,6 +391,7 @@ def ==(o) config_id_build == o.config_id_build && config_id_platform == o.config_id_platform && device_id == o.device_id && + device_policies == o.device_policies && external_ip == o.external_ip && first_login_timestamp == o.first_login_timestamp && first_login_user == o.first_login_user && @@ -422,7 +431,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [platform_id_numeric, agent_version, config_id_base, config_id_build, config_id_platform, device_id, external_ip, first_login_timestamp, first_login_user, first_seen, hostname, last_login_timestamp, last_login_user, last_seen, last_seen_ago_seconds, local_ip, mac_address, machine_domain, major_version, minor_version, modified_timestamp, notes, os_version, ou, platform_id, platform_name, product_type, product_type_desc, release_group, site_name, status, system_manufacturer, system_product_name, tags].hash + [platform_id_numeric, agent_version, config_id_base, config_id_build, config_id_platform, device_id, device_policies, external_ip, first_login_timestamp, first_login_user, first_seen, hostname, last_login_timestamp, last_login_user, last_seen, last_seen_ago_seconds, local_ip, mac_address, machine_domain, major_version, minor_version, modified_timestamp, notes, os_version, ou, platform_id, platform_name, product_type, product_type_desc, release_group, site_name, status, system_manufacturer, system_product_name, tags].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_device_policy.rb b/lib/crimson-falcon/models/domain_device_policy.rb new file mode 100644 index 00000000..4de6b8b1 --- /dev/null +++ b/lib/crimson-falcon/models/domain_device_policy.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 DomainDevicePolicy + attr_accessor :policy_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'policy_id' => :'policy_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 + { + :'policy_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::DomainDevicePolicy` 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::DomainDevicePolicy`. 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?(:'policy_id') + self.policy_id = attributes[:'policy_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 @policy_id.nil? + invalid_properties.push('invalid value for "policy_id", policy_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 @policy_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 && + policy_id == o.policy_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 + [policy_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_discover_api_host.rb b/lib/crimson-falcon/models/domain_discover_api_host.rb index 24e2ef8d..cde736b3 100644 --- a/lib/crimson-falcon/models/domain_discover_api_host.rb +++ b/lib/crimson-falcon/models/domain_discover_api_host.rb @@ -110,9 +110,15 @@ class DomainDiscoverAPIHost # 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 - # Whether the asset is exposed to the internet as determined automatically (Yes, No, or Unknown). + # Whether the asset is exposed to the internet as determined automatically (Yes, No, or Pending). attr_accessor :computed_internet_exposure + # External IP exposed to the internet. + attr_accessor :computed_internet_exposure_external_ip + + # When the asset was last seen as internet exposed. + attr_accessor :computed_internet_exposure_last_seen + # The level of confidence that the asset is a corporate asset (25 = low confidence, 50 = medium confidence, 75 = high confidence). attr_accessor :confidence @@ -146,6 +152,9 @@ class DomainDiscoverAPIHost # The last seen local IPv4 address of the asset. attr_accessor :current_local_ip + # The last seen network prefix of the asset. + attr_accessor :current_network_prefix + # Where the data about the asset came from (such as CrowdStrike, ServiceNow, or Active Directory). attr_accessor :data_providers @@ -164,6 +173,9 @@ class DomainDiscoverAPIHost # The number of sources that discovered the asset. attr_accessor :discoverer_count + # The criticalities of the sources that discovered the asset + attr_accessor :discoverer_criticalities + # The hostnames of the sources that discovered the asset. attr_accessor :discoverer_hostnames @@ -224,7 +236,7 @@ class DomainDiscoverAPIHost # The unique ID of the asset. attr_accessor :id - # Whether the asset is exposed to the internet (Yes or Unknown). + # Whether the asset is exposed to the internet (Yes, No or Pending). attr_accessor :internet_exposure # The description the user entered when manually assigning a internet exposure level @@ -387,6 +399,12 @@ class DomainDiscoverAPIHost # What the asset is used for, such as production, staging, or QA. attr_accessor :used_for + # The asset role or roles manually assigned to the asset. + attr_accessor :user_asset_roles + + # The internet exposure manually assigned to the asset + attr_accessor :user_internet_exposure + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -417,6 +435,8 @@ def self.attribute_map :'cloud_resource_id' => :'cloud_resource_id', :'computed_asset_roles' => :'computed_asset_roles', :'computed_internet_exposure' => :'computed_internet_exposure', + :'computed_internet_exposure_external_ip' => :'computed_internet_exposure_external_ip', + :'computed_internet_exposure_last_seen' => :'computed_internet_exposure_last_seen', :'confidence' => :'confidence', :'country' => :'country', :'cpu_manufacturer' => :'cpu_manufacturer', @@ -428,12 +448,14 @@ def self.attribute_map :'criticality_timestamp' => :'criticality_timestamp', :'criticality_username' => :'criticality_username', :'current_local_ip' => :'current_local_ip', + :'current_network_prefix' => :'current_network_prefix', :'data_providers' => :'data_providers', :'data_providers_count' => :'data_providers_count', :'department' => :'department', :'descriptions' => :'descriptions', :'discoverer_aids' => :'discoverer_aids', :'discoverer_count' => :'discoverer_count', + :'discoverer_criticalities' => :'discoverer_criticalities', :'discoverer_hostnames' => :'discoverer_hostnames', :'discoverer_platform_names' => :'discoverer_platform_names', :'discoverer_product_type_descs' => :'discoverer_product_type_descs', @@ -508,7 +530,9 @@ def self.attribute_map :'unencrypted_drives_count' => :'unencrypted_drives_count', :'used_disk_space' => :'used_disk_space', :'used_disk_space_pct' => :'used_disk_space_pct', - :'used_for' => :'used_for' + :'used_for' => :'used_for', + :'user_asset_roles' => :'user_asset_roles', + :'user_internet_exposure' => :'user_internet_exposure' } end @@ -547,6 +571,8 @@ def self.openapi_types :'cloud_resource_id' => :'String', :'computed_asset_roles' => :'Array', :'computed_internet_exposure' => :'String', + :'computed_internet_exposure_external_ip' => :'String', + :'computed_internet_exposure_last_seen' => :'String', :'confidence' => :'Integer', :'country' => :'String', :'cpu_manufacturer' => :'String', @@ -558,12 +584,14 @@ def self.openapi_types :'criticality_timestamp' => :'String', :'criticality_username' => :'String', :'current_local_ip' => :'String', + :'current_network_prefix' => :'String', :'data_providers' => :'Array', :'data_providers_count' => :'Integer', :'department' => :'String', :'descriptions' => :'Array', :'discoverer_aids' => :'Array', :'discoverer_count' => :'Integer', + :'discoverer_criticalities' => :'Array', :'discoverer_hostnames' => :'Array', :'discoverer_platform_names' => :'Array', :'discoverer_product_type_descs' => :'Array', @@ -638,7 +666,9 @@ def self.openapi_types :'unencrypted_drives_count' => :'Integer', :'used_disk_space' => :'Integer', :'used_disk_space_pct' => :'Integer', - :'used_for' => :'String' + :'used_for' => :'String', + :'user_asset_roles' => :'Array', + :'user_internet_exposure' => :'String' } end @@ -777,6 +807,14 @@ def initialize(attributes = {}) self.computed_internet_exposure = attributes[:'computed_internet_exposure'] end + if attributes.key?(:'computed_internet_exposure_external_ip') + self.computed_internet_exposure_external_ip = attributes[:'computed_internet_exposure_external_ip'] + end + + if attributes.key?(:'computed_internet_exposure_last_seen') + self.computed_internet_exposure_last_seen = attributes[:'computed_internet_exposure_last_seen'] + end + if attributes.key?(:'confidence') self.confidence = attributes[:'confidence'] end @@ -821,6 +859,10 @@ def initialize(attributes = {}) self.current_local_ip = attributes[:'current_local_ip'] end + if attributes.key?(:'current_network_prefix') + self.current_network_prefix = attributes[:'current_network_prefix'] + end + if attributes.key?(:'data_providers') if (value = attributes[:'data_providers']).is_a?(Array) self.data_providers = value @@ -851,6 +893,12 @@ def initialize(attributes = {}) self.discoverer_count = attributes[:'discoverer_count'] end + if attributes.key?(:'discoverer_criticalities') + if (value = attributes[:'discoverer_criticalities']).is_a?(Array) + self.discoverer_criticalities = value + end + end + if attributes.key?(:'discoverer_hostnames') if (value = attributes[:'discoverer_hostnames']).is_a?(Array) self.discoverer_hostnames = value @@ -1180,6 +1228,16 @@ def initialize(attributes = {}) if attributes.key?(:'used_for') self.used_for = attributes[:'used_for'] end + + if attributes.key?(:'user_asset_roles') + if (value = attributes[:'user_asset_roles']).is_a?(Array) + self.user_asset_roles = value + end + end + + if attributes.key?(:'user_internet_exposure') + self.user_internet_exposure = attributes[:'user_internet_exposure'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -1237,6 +1295,8 @@ def ==(o) cloud_resource_id == o.cloud_resource_id && 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 && + computed_internet_exposure_last_seen == o.computed_internet_exposure_last_seen && confidence == o.confidence && country == o.country && cpu_manufacturer == o.cpu_manufacturer && @@ -1248,12 +1308,14 @@ def ==(o) criticality_timestamp == o.criticality_timestamp && criticality_username == o.criticality_username && current_local_ip == o.current_local_ip && + current_network_prefix == o.current_network_prefix && data_providers == o.data_providers && data_providers_count == o.data_providers_count && department == o.department && descriptions == o.descriptions && discoverer_aids == o.discoverer_aids && discoverer_count == o.discoverer_count && + discoverer_criticalities == o.discoverer_criticalities && discoverer_hostnames == o.discoverer_hostnames && discoverer_platform_names == o.discoverer_platform_names && discoverer_product_type_descs == o.discoverer_product_type_descs && @@ -1328,7 +1390,9 @@ def ==(o) unencrypted_drives_count == o.unencrypted_drives_count && used_disk_space == o.used_disk_space && used_disk_space_pct == o.used_disk_space_pct && - used_for == o.used_for + used_for == o.used_for && + user_asset_roles == o.user_asset_roles && + user_internet_exposure == o.user_internet_exposure end # @see the `==` method @@ -1340,7 +1404,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, cid, city, classification, cloud_account_id, cloud_instance_id, cloud_provider, cloud_region, cloud_registered, cloud_resource_id, computed_asset_roles, computed_internet_exposure, confidence, country, cpu_manufacturer, cpu_processor_name, creation_timestamp, criticality, criticality_description, criticality_rule_id, criticality_timestamp, criticality_username, current_local_ip, data_providers, data_providers_count, department, descriptions, discoverer_aids, discoverer_count, discoverer_hostnames, discoverer_platform_names, discoverer_product_type_descs, discoverer_tags, discovering_by, disk_sizes, 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, id, internet_exposure, internet_exposure_description, internet_exposure_timestamp, internet_exposure_username, kernel_version, last_discoverer_aid, last_discoverer_hostname, 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, mount_storage_info, network_interfaces, number_of_disk_drives, object_guid, object_sid, os_is_eol, os_security, os_service_pack, os_version, 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, reduced_functionality_mode, servicenow_id, site_name, state, 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].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, cid, city, 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, discoverer_aids, discoverer_count, discoverer_criticalities, discoverer_hostnames, discoverer_platform_names, discoverer_product_type_descs, discoverer_tags, discovering_by, disk_sizes, 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, id, internet_exposure, internet_exposure_description, internet_exposure_timestamp, internet_exposure_username, kernel_version, last_discoverer_aid, last_discoverer_hostname, 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, mount_storage_info, network_interfaces, number_of_disk_drives, object_guid, object_sid, os_is_eol, os_security, os_service_pack, os_version, 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, reduced_functionality_mode, servicenow_id, site_name, state, 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].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 5cbf221b..0c9f2a2d 100644 --- a/lib/crimson-falcon/models/domain_discover_apiio_t_host.rb +++ b/lib/crimson-falcon/models/domain_discover_apiio_t_host.rb @@ -69,6 +69,15 @@ class DomainDiscoverAPIIoTHost # The external ID of the IoT Device in 3rd Party System(Claroty). attr_accessor :claroty_id + # Whether the asset is exposed to the internet (Yes or Unknown) + attr_accessor :computed_internet_exposure + + # External IP that is exposed to the Internet + attr_accessor :computed_internet_exposure_external_ip + + # Timestamp when the asset was last seen as exposed to the Internet + attr_accessor :computed_internet_exposure_last_seen + # The level of confidence that the asset is a corporate asset (25 = low confidence, 50 = medium confidence, 75 = high confidence). attr_accessor :confidence @@ -117,6 +126,9 @@ class DomainDiscoverAPIIoTHost # The names and sizes of the disks on the asset attr_accessor :disk_sizes + # The ID generated by dragos asset discovery mechanism + attr_accessor :dragos_id + # The list of encrypted drives on the asset attr_accessor :encrypted_drives @@ -210,6 +222,12 @@ class DomainDiscoverAPIIoTHost # The OS version of the asset. attr_accessor :os_version + # A list of sources through which host is discovered + attr_accessor :ot_information_sources + + # A list of ot serial numbers that discovered with host + attr_accessor :ot_serial_numbers + # The organizational unit of the asset (applies only to Windows hosts). attr_accessor :ou @@ -312,6 +330,9 @@ def self.attribute_map :'cid' => :'cid', :'city' => :'city', :'claroty_id' => :'claroty_id', + :'computed_internet_exposure' => :'computed_internet_exposure', + :'computed_internet_exposure_external_ip' => :'computed_internet_exposure_external_ip', + :'computed_internet_exposure_last_seen' => :'computed_internet_exposure_last_seen', :'confidence' => :'confidence', :'country' => :'country', :'cpu_processor_name' => :'cpu_processor_name', @@ -328,6 +349,7 @@ def self.attribute_map :'discoverer_ics_collector_ids' => :'discoverer_ics_collector_ids', :'discoverer_product_type_descs' => :'discoverer_product_type_descs', :'disk_sizes' => :'disk_sizes', + :'dragos_id' => :'dragos_id', :'encrypted_drives' => :'encrypted_drives', :'encrypted_drives_count' => :'encrypted_drives_count', :'encryption_status' => :'encryption_status', @@ -359,6 +381,8 @@ def self.attribute_map :'number_of_disk_drives' => :'number_of_disk_drives', :'os_is_eol' => :'os_is_eol', :'os_version' => :'os_version', + :'ot_information_sources' => :'ot_information_sources', + :'ot_serial_numbers' => :'ot_serial_numbers', :'ou' => :'ou', :'physical_core_count' => :'physical_core_count', :'platform_name' => :'platform_name', @@ -411,6 +435,9 @@ def self.openapi_types :'cid' => :'String', :'city' => :'String', :'claroty_id' => :'String', + :'computed_internet_exposure' => :'String', + :'computed_internet_exposure_external_ip' => :'String', + :'computed_internet_exposure_last_seen' => :'String', :'confidence' => :'Integer', :'country' => :'String', :'cpu_processor_name' => :'String', @@ -427,6 +454,7 @@ def self.openapi_types :'discoverer_ics_collector_ids' => :'Array', :'discoverer_product_type_descs' => :'Array', :'disk_sizes' => :'Array', + :'dragos_id' => :'String', :'encrypted_drives' => :'Array', :'encrypted_drives_count' => :'Integer', :'encryption_status' => :'String', @@ -458,6 +486,8 @@ def self.openapi_types :'number_of_disk_drives' => :'Integer', :'os_is_eol' => :'String', :'os_version' => :'String', + :'ot_information_sources' => :'Array', + :'ot_serial_numbers' => :'Array', :'ou' => :'String', :'physical_core_count' => :'Integer', :'platform_name' => :'String', @@ -559,6 +589,18 @@ def initialize(attributes = {}) self.claroty_id = attributes[:'claroty_id'] end + if attributes.key?(:'computed_internet_exposure') + self.computed_internet_exposure = attributes[:'computed_internet_exposure'] + end + + if attributes.key?(:'computed_internet_exposure_external_ip') + self.computed_internet_exposure_external_ip = attributes[:'computed_internet_exposure_external_ip'] + end + + if attributes.key?(:'computed_internet_exposure_last_seen') + self.computed_internet_exposure_last_seen = attributes[:'computed_internet_exposure_last_seen'] + end + if attributes.key?(:'confidence') self.confidence = attributes[:'confidence'] end @@ -633,6 +675,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'dragos_id') + self.dragos_id = attributes[:'dragos_id'] + end + if attributes.key?(:'encrypted_drives') if (value = attributes[:'encrypted_drives']).is_a?(Array) self.encrypted_drives = value @@ -771,6 +817,18 @@ def initialize(attributes = {}) self.os_version = attributes[:'os_version'] end + if attributes.key?(:'ot_information_sources') + if (value = attributes[:'ot_information_sources']).is_a?(Array) + self.ot_information_sources = value + end + end + + if attributes.key?(:'ot_serial_numbers') + if (value = attributes[:'ot_serial_numbers']).is_a?(Array) + self.ot_serial_numbers = value + end + end + if attributes.key?(:'ou') self.ou = attributes[:'ou'] end @@ -908,6 +966,14 @@ def list_invalid_properties invalid_properties.push('invalid value for "id", id cannot be nil.') end + if @ot_information_sources.nil? + invalid_properties.push('invalid value for "ot_information_sources", ot_information_sources cannot be nil.') + end + + if @ot_serial_numbers.nil? + invalid_properties.push('invalid value for "ot_serial_numbers", ot_serial_numbers cannot be nil.') + end + invalid_properties end @@ -916,6 +982,8 @@ def list_invalid_properties def valid? return false if @cid.nil? return false if @id.nil? + return false if @ot_information_sources.nil? + return false if @ot_serial_numbers.nil? true end @@ -936,6 +1004,9 @@ def ==(o) cid == o.cid && city == o.city && claroty_id == o.claroty_id && + computed_internet_exposure == o.computed_internet_exposure && + computed_internet_exposure_external_ip == o.computed_internet_exposure_external_ip && + computed_internet_exposure_last_seen == o.computed_internet_exposure_last_seen && confidence == o.confidence && country == o.country && cpu_processor_name == o.cpu_processor_name && @@ -952,6 +1023,7 @@ def ==(o) discoverer_ics_collector_ids == o.discoverer_ics_collector_ids && discoverer_product_type_descs == o.discoverer_product_type_descs && disk_sizes == o.disk_sizes && + dragos_id == o.dragos_id && encrypted_drives == o.encrypted_drives && encrypted_drives_count == o.encrypted_drives_count && encryption_status == o.encryption_status && @@ -983,6 +1055,8 @@ def ==(o) number_of_disk_drives == o.number_of_disk_drives && os_is_eol == o.os_is_eol && os_version == o.os_version && + ot_information_sources == o.ot_information_sources && + ot_serial_numbers == o.ot_serial_numbers && ou == o.ou && physical_core_count == o.physical_core_count && platform_name == o.platform_name && @@ -1023,7 +1097,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_version, aid, available_disk_space, average_memory_usage, average_processor_usage, bios_id, bios_manufacturer, bios_version, business_criticality, cid, city, claroty_id, confidence, country, cpu_processor_name, credential_guard_status, current_local_ip, data_providers, data_providers_count, device_class, device_family, device_guard_status, device_slots, device_type, discoverer_count, discoverer_ics_collector_ids, discoverer_product_type_descs, disk_sizes, encrypted_drives, encrypted_drives_count, encryption_status, entity_type, external_ip, field_metadata, first_seen_timestamp, groups, hostname, ics_id, id, internet_exposure, iommu_protection_status, kernel_dma_protection_status, kernel_version, last_discoverer_ics_collector_id, last_seen_timestamp, local_ip_addresses, local_ips_count, logical_core_count, mac_addresses, machine_domain, max_memory_usage, max_processor_usage, memory_total, mount_storage_info, network_id, network_interfaces, number_of_disk_drives, os_is_eol, os_version, ou, physical_core_count, platform_name, processor_package_count, product_type, product_type_desc, protocols, purdue_level, reduced_functionality_mode, secure_boot_enabled_status, secure_boot_requested_status, secure_memory_overwrite_requested_status, site_name, subnet, system_guard_status, system_manufacturer, system_product_name, system_serial_number, tags, total_bios_files, total_disk_space, uefi_memory_protection_status, unencrypted_drives, unencrypted_drives_count, used_disk_space, virtual_zone, virtualization_based_security_status, vlan, xdome_id].hash + [agent_version, aid, available_disk_space, average_memory_usage, average_processor_usage, bios_id, bios_manufacturer, bios_version, business_criticality, cid, city, claroty_id, computed_internet_exposure, computed_internet_exposure_external_ip, computed_internet_exposure_last_seen, confidence, country, cpu_processor_name, credential_guard_status, current_local_ip, data_providers, data_providers_count, device_class, device_family, device_guard_status, device_slots, device_type, discoverer_count, discoverer_ics_collector_ids, discoverer_product_type_descs, disk_sizes, dragos_id, encrypted_drives, encrypted_drives_count, encryption_status, entity_type, external_ip, field_metadata, first_seen_timestamp, groups, hostname, ics_id, id, internet_exposure, iommu_protection_status, kernel_dma_protection_status, kernel_version, last_discoverer_ics_collector_id, last_seen_timestamp, local_ip_addresses, local_ips_count, logical_core_count, mac_addresses, machine_domain, max_memory_usage, max_processor_usage, memory_total, mount_storage_info, network_id, network_interfaces, number_of_disk_drives, os_is_eol, os_version, ot_information_sources, ot_serial_numbers, ou, physical_core_count, platform_name, processor_package_count, product_type, product_type_desc, protocols, purdue_level, reduced_functionality_mode, secure_boot_enabled_status, secure_boot_requested_status, secure_memory_overwrite_requested_status, site_name, subnet, system_guard_status, system_manufacturer, system_product_name, system_serial_number, tags, total_bios_files, total_disk_space, uefi_memory_protection_status, unencrypted_drives, unencrypted_drives_count, used_disk_space, virtual_zone, virtualization_based_security_status, vlan, xdome_id].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/registration_msa_spec_meta_info_extension.rb b/lib/crimson-falcon/models/domain_exposed_data_record_bot_location_v1.rb similarity index 88% rename from lib/crimson-falcon/models/registration_msa_spec_meta_info_extension.rb rename to lib/crimson-falcon/models/domain_exposed_data_record_bot_location_v1.rb index 0c227be3..aa8a3fe6 100644 --- a/lib/crimson-falcon/models/registration_msa_spec_meta_info_extension.rb +++ b/lib/crimson-falcon/models/domain_exposed_data_record_bot_location_v1.rb @@ -31,16 +31,16 @@ require 'time' module Falcon - class RegistrationMSASpecMetaInfoExtension - attr_accessor :meta_info + class DomainExposedDataRecordBotLocationV1 + attr_accessor :country - attr_accessor :pagination + attr_accessor :zip_code # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'meta_info' => :'MetaInfo', - :'pagination' => :'pagination' + :'country' => :'country', + :'zip_code' => :'zip_code' } end @@ -52,8 +52,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'meta_info' => :'MsaspecMetaInfo', - :'pagination' => :'RegistrationMSAPagingExtension' + :'country' => :'String', + :'zip_code' => :'String' } end @@ -67,23 +67,23 @@ 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::RegistrationMSASpecMetaInfoExtension` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainExposedDataRecordBotLocationV1` 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::RegistrationMSASpecMetaInfoExtension`. 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::DomainExposedDataRecordBotLocationV1`. 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?(:'meta_info') - self.meta_info = attributes[:'meta_info'] + if attributes.key?(:'country') + self.country = attributes[:'country'] end - if attributes.key?(:'pagination') - self.pagination = attributes[:'pagination'] + if attributes.key?(:'zip_code') + self.zip_code = attributes[:'zip_code'] end end @@ -91,8 +91,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @meta_info.nil? - invalid_properties.push('invalid value for "meta_info", meta_info cannot be nil.') + if @country.nil? + invalid_properties.push('invalid value for "country", country cannot be nil.') + end + + if @zip_code.nil? + invalid_properties.push('invalid value for "zip_code", zip_code cannot be nil.') end invalid_properties @@ -101,7 +105,8 @@ 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 @meta_info.nil? + return false if @country.nil? + return false if @zip_code.nil? true end @@ -110,8 +115,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - meta_info == o.meta_info && - pagination == o.pagination + country == o.country && + zip_code == o.zip_code end # @see the `==` method @@ -123,7 +128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [meta_info, pagination].hash + [country, zip_code].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_exposed_data_record_bot_operating_system_v1.rb b/lib/crimson-falcon/models/domain_exposed_data_record_bot_operating_system_v1.rb new file mode 100644 index 00000000..046deddc --- /dev/null +++ b/lib/crimson-falcon/models/domain_exposed_data_record_bot_operating_system_v1.rb @@ -0,0 +1,399 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainExposedDataRecordBotOperatingSystemV1 + attr_accessor :antivirus + + attr_accessor :computer_name + + attr_accessor :domain + + attr_accessor :hardware_id + + attr_accessor :installed_software + + attr_accessor :language + + attr_accessor :layouts + + attr_accessor :os_architecture + + attr_accessor :os_version + + attr_accessor :timezone + + attr_accessor :uac + + attr_accessor :username + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'antivirus' => :'antivirus', + :'computer_name' => :'computer_name', + :'domain' => :'domain', + :'hardware_id' => :'hardware_id', + :'installed_software' => :'installed_software', + :'language' => :'language', + :'layouts' => :'layouts', + :'os_architecture' => :'os_architecture', + :'os_version' => :'os_version', + :'timezone' => :'timezone', + :'uac' => :'uac', + :'username' => :'username' + } + 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 + { + :'antivirus' => :'Array', + :'computer_name' => :'String', + :'domain' => :'String', + :'hardware_id' => :'String', + :'installed_software' => :'Array', + :'language' => :'String', + :'layouts' => :'Array', + :'os_architecture' => :'String', + :'os_version' => :'String', + :'timezone' => :'String', + :'uac' => :'String', + :'username' => :'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::DomainExposedDataRecordBotOperatingSystemV1` 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::DomainExposedDataRecordBotOperatingSystemV1`. 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?(:'antivirus') + if (value = attributes[:'antivirus']).is_a?(Array) + self.antivirus = value + end + end + + if attributes.key?(:'computer_name') + self.computer_name = attributes[:'computer_name'] + end + + if attributes.key?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'hardware_id') + self.hardware_id = attributes[:'hardware_id'] + end + + if attributes.key?(:'installed_software') + if (value = attributes[:'installed_software']).is_a?(Array) + self.installed_software = value + end + end + + if attributes.key?(:'language') + self.language = attributes[:'language'] + end + + if attributes.key?(:'layouts') + if (value = attributes[:'layouts']).is_a?(Array) + self.layouts = value + end + end + + if attributes.key?(:'os_architecture') + self.os_architecture = attributes[:'os_architecture'] + end + + if attributes.key?(:'os_version') + self.os_version = attributes[:'os_version'] + end + + if attributes.key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.key?(:'uac') + self.uac = attributes[:'uac'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + 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 @antivirus.nil? + invalid_properties.push('invalid value for "antivirus", antivirus cannot be nil.') + end + + if @computer_name.nil? + invalid_properties.push('invalid value for "computer_name", computer_name cannot be nil.') + end + + if @domain.nil? + invalid_properties.push('invalid value for "domain", domain cannot be nil.') + end + + if @hardware_id.nil? + invalid_properties.push('invalid value for "hardware_id", hardware_id cannot be nil.') + end + + if @installed_software.nil? + invalid_properties.push('invalid value for "installed_software", installed_software cannot be nil.') + end + + if @language.nil? + invalid_properties.push('invalid value for "language", language cannot be nil.') + end + + if @layouts.nil? + invalid_properties.push('invalid value for "layouts", layouts cannot be nil.') + end + + if @os_architecture.nil? + invalid_properties.push('invalid value for "os_architecture", os_architecture cannot be nil.') + end + + if @os_version.nil? + invalid_properties.push('invalid value for "os_version", os_version cannot be nil.') + end + + if @timezone.nil? + invalid_properties.push('invalid value for "timezone", timezone cannot be nil.') + end + + if @uac.nil? + invalid_properties.push('invalid value for "uac", uac cannot be nil.') + end + + if @username.nil? + invalid_properties.push('invalid value for "username", username 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 @antivirus.nil? + return false if @computer_name.nil? + return false if @domain.nil? + return false if @hardware_id.nil? + return false if @installed_software.nil? + return false if @language.nil? + return false if @layouts.nil? + return false if @os_architecture.nil? + return false if @os_version.nil? + return false if @timezone.nil? + return false if @uac.nil? + return false if @username.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 && + antivirus == o.antivirus && + computer_name == o.computer_name && + domain == o.domain && + hardware_id == o.hardware_id && + installed_software == o.installed_software && + language == o.language && + layouts == o.layouts && + os_architecture == o.os_architecture && + os_version == o.os_version && + timezone == o.timezone && + uac == o.uac && + username == o.username + 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 + [antivirus, computer_name, domain, hardware_id, installed_software, language, layouts, os_architecture, os_version, timezone, uac, username].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_exposed_data_record_bot_v1.rb b/lib/crimson-falcon/models/domain_exposed_data_record_bot_v1.rb new file mode 100644 index 00000000..26df07ac --- /dev/null +++ b/lib/crimson-falcon/models/domain_exposed_data_record_bot_v1.rb @@ -0,0 +1,334 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainExposedDataRecordBotV1 + attr_accessor :bot_id + + attr_accessor :domain_detects + + attr_accessor :infection_build_id + + attr_accessor :infection_date + + attr_accessor :infection_path + + attr_accessor :ip + + attr_accessor :location + + attr_accessor :operating_system + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'bot_id' => :'bot_id', + :'domain_detects' => :'domain_detects', + :'infection_build_id' => :'infection_build_id', + :'infection_date' => :'infection_date', + :'infection_path' => :'infection_path', + :'ip' => :'ip', + :'location' => :'location', + :'operating_system' => :'operating_system' + } + 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 + { + :'bot_id' => :'String', + :'domain_detects' => :'Array', + :'infection_build_id' => :'String', + :'infection_date' => :'Time', + :'infection_path' => :'String', + :'ip' => :'String', + :'location' => :'DomainExposedDataRecordBotLocationV1', + :'operating_system' => :'DomainExposedDataRecordBotOperatingSystemV1' + } + 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::DomainExposedDataRecordBotV1` 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::DomainExposedDataRecordBotV1`. 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?(:'bot_id') + self.bot_id = attributes[:'bot_id'] + end + + if attributes.key?(:'domain_detects') + if (value = attributes[:'domain_detects']).is_a?(Array) + self.domain_detects = value + end + end + + if attributes.key?(:'infection_build_id') + self.infection_build_id = attributes[:'infection_build_id'] + end + + if attributes.key?(:'infection_date') + self.infection_date = attributes[:'infection_date'] + end + + if attributes.key?(:'infection_path') + self.infection_path = attributes[:'infection_path'] + end + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + + if attributes.key?(:'operating_system') + self.operating_system = attributes[:'operating_system'] + 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 @bot_id.nil? + invalid_properties.push('invalid value for "bot_id", bot_id cannot be nil.') + end + + if @domain_detects.nil? + invalid_properties.push('invalid value for "domain_detects", domain_detects cannot be nil.') + end + + if @infection_build_id.nil? + invalid_properties.push('invalid value for "infection_build_id", infection_build_id cannot be nil.') + end + + if @infection_date.nil? + invalid_properties.push('invalid value for "infection_date", infection_date cannot be nil.') + end + + if @infection_path.nil? + invalid_properties.push('invalid value for "infection_path", infection_path cannot be nil.') + end + + if @location.nil? + invalid_properties.push('invalid value for "location", location cannot be nil.') + end + + if @operating_system.nil? + invalid_properties.push('invalid value for "operating_system", operating_system 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 @bot_id.nil? + return false if @domain_detects.nil? + return false if @infection_build_id.nil? + return false if @infection_date.nil? + return false if @infection_path.nil? + return false if @location.nil? + return false if @operating_system.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 && + bot_id == o.bot_id && + domain_detects == o.domain_detects && + infection_build_id == o.infection_build_id && + infection_date == o.infection_date && + infection_path == o.infection_path && + ip == o.ip && + location == o.location && + operating_system == o.operating_system + 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 + [bot_id, domain_detects, infection_build_id, infection_date, infection_path, ip, location, operating_system].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_exposed_data_record_social_v1.rb b/lib/crimson-falcon/models/domain_exposed_data_record_social_v1.rb index 831e4fa0..05a2840a 100644 --- a/lib/crimson-falcon/models/domain_exposed_data_record_social_v1.rb +++ b/lib/crimson-falcon/models/domain_exposed_data_record_social_v1.rb @@ -48,6 +48,8 @@ class DomainExposedDataRecordSocialV1 attr_accessor :vk_id + attr_accessor :vk_token + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -58,7 +60,8 @@ def self.attribute_map :'msn_id' => :'msn_id', :'skype_id' => :'skype_id', :'twitter_id' => :'twitter_id', - :'vk_id' => :'vk_id' + :'vk_id' => :'vk_id', + :'vk_token' => :'vk_token' } end @@ -77,7 +80,8 @@ def self.openapi_types :'msn_id' => :'String', :'skype_id' => :'String', :'twitter_id' => :'String', - :'vk_id' => :'String' + :'vk_id' => :'String', + :'vk_token' => :'String' } end @@ -133,6 +137,10 @@ def initialize(attributes = {}) if attributes.key?(:'vk_id') self.vk_id = attributes[:'vk_id'] end + + if attributes.key?(:'vk_token') + self.vk_token = attributes[:'vk_token'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -171,6 +179,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "vk_id", vk_id cannot be nil.') end + if @vk_token.nil? + invalid_properties.push('invalid value for "vk_token", vk_token cannot be nil.') + end + invalid_properties end @@ -185,6 +197,7 @@ def valid? return false if @skype_id.nil? return false if @twitter_id.nil? return false if @vk_id.nil? + return false if @vk_token.nil? true end @@ -200,7 +213,8 @@ def ==(o) msn_id == o.msn_id && skype_id == o.skype_id && twitter_id == o.twitter_id && - vk_id == o.vk_id + vk_id == o.vk_id && + vk_token == o.vk_token end # @see the `==` method @@ -212,7 +226,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [aim_id, facebook_id, icq_id, instagram_id, msn_id, skype_id, twitter_id, vk_id].hash + [aim_id, facebook_id, icq_id, instagram_id, msn_id, skype_id, twitter_id, vk_id, vk_token].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_file_count_v2.rb b/lib/crimson-falcon/models/domain_file_count_v2.rb new file mode 100644 index 00000000..cf6d8bfa --- /dev/null +++ b/lib/crimson-falcon/models/domain_file_count_v2.rb @@ -0,0 +1,295 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainFileCountV2 + attr_accessor :malicious + + attr_accessor :quarantined + + attr_accessor :scanned + + attr_accessor :skipped + + attr_accessor :traversed + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'malicious' => :'malicious', + :'quarantined' => :'quarantined', + :'scanned' => :'scanned', + :'skipped' => :'skipped', + :'traversed' => :'traversed' + } + 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 + { + :'malicious' => :'Integer', + :'quarantined' => :'Integer', + :'scanned' => :'Integer', + :'skipped' => :'Integer', + :'traversed' => :'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::DomainFileCountV2` 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::DomainFileCountV2`. 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?(:'malicious') + self.malicious = attributes[:'malicious'] + end + + if attributes.key?(:'quarantined') + self.quarantined = attributes[:'quarantined'] + end + + if attributes.key?(:'scanned') + self.scanned = attributes[:'scanned'] + end + + if attributes.key?(:'skipped') + self.skipped = attributes[:'skipped'] + end + + if attributes.key?(:'traversed') + self.traversed = attributes[:'traversed'] + 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 @malicious.nil? + invalid_properties.push('invalid value for "malicious", malicious cannot be nil.') + end + + if @quarantined.nil? + invalid_properties.push('invalid value for "quarantined", quarantined cannot be nil.') + end + + if @scanned.nil? + invalid_properties.push('invalid value for "scanned", scanned cannot be nil.') + end + + if @skipped.nil? + invalid_properties.push('invalid value for "skipped", skipped cannot be nil.') + end + + if @traversed.nil? + invalid_properties.push('invalid value for "traversed", traversed 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 @malicious.nil? + return false if @quarantined.nil? + return false if @scanned.nil? + return false if @skipped.nil? + return false if @traversed.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 && + malicious == o.malicious && + quarantined == o.quarantined && + scanned == o.scanned && + skipped == o.skipped && + traversed == o.traversed + 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 + [malicious, quarantined, scanned, skipped, traversed].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_fragment_info.rb b/lib/crimson-falcon/models/domain_fragment_info.rb new file mode 100644 index 00000000..737a25b0 --- /dev/null +++ b/lib/crimson-falcon/models/domain_fragment_info.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 DomainFragmentInfo + # Offset of the content field from the start of data, in characters + attr_accessor :content_offset + + # Total number of fragments for this group + attr_accessor :count + + # List of fields that have been split, such as: content, iocs, translated_content, ... + attr_accessor :fragmented_fields + + # HEX string, similar to stream_id, ties all fragments together + attr_accessor :group_id + + # Zero-based index of fragment in the group + attr_accessor :index + + # Offset of the translated_content field from the start of data, in characters + attr_accessor :translated_content_offset + + # List of fields that have been truncated or deleted + attr_accessor :truncated_fields + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'content_offset' => :'content_offset', + :'count' => :'count', + :'fragmented_fields' => :'fragmented_fields', + :'group_id' => :'group_id', + :'index' => :'index', + :'translated_content_offset' => :'translated_content_offset', + :'truncated_fields' => :'truncated_fields' + } + 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_offset' => :'Integer', + :'count' => :'Integer', + :'fragmented_fields' => :'Array', + :'group_id' => :'String', + :'index' => :'Integer', + :'translated_content_offset' => :'Integer', + :'truncated_fields' => :'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::DomainFragmentInfo` 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::DomainFragmentInfo`. 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_offset') + self.content_offset = attributes[:'content_offset'] + end + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.key?(:'fragmented_fields') + if (value = attributes[:'fragmented_fields']).is_a?(Array) + self.fragmented_fields = value + end + end + + if attributes.key?(:'group_id') + self.group_id = attributes[:'group_id'] + end + + if attributes.key?(:'index') + self.index = attributes[:'index'] + end + + if attributes.key?(:'translated_content_offset') + self.translated_content_offset = attributes[:'translated_content_offset'] + end + + if attributes.key?(:'truncated_fields') + if (value = attributes[:'truncated_fields']).is_a?(Array) + self.truncated_fields = 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 && + content_offset == o.content_offset && + count == o.count && + fragmented_fields == o.fragmented_fields && + group_id == o.group_id && + index == o.index && + translated_content_offset == o.translated_content_offset && + truncated_fields == o.truncated_fields + 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_offset, count, fragmented_fields, group_id, index, translated_content_offset, truncated_fields].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_gcp_account_v1.rb b/lib/crimson-falcon/models/domain_gcp_account_v1.rb index 77ea872a..3f415447 100644 --- a/lib/crimson-falcon/models/domain_gcp_account_v1.rb +++ b/lib/crimson-falcon/models/domain_gcp_account_v1.rb @@ -84,6 +84,8 @@ class DomainGCPAccountV1 attr_accessor :service_account_private_key_id + attr_accessor :service_account_project_id + # Account registration status. attr_accessor :status @@ -111,6 +113,7 @@ def self.attribute_map :'service_account_client_id' => :'service_account_client_id', :'service_account_id' => :'service_account_id', :'service_account_private_key_id' => :'service_account_private_key_id', + :'service_account_project_id' => :'service_account_project_id', :'status' => :'status' } end @@ -144,6 +147,7 @@ def self.openapi_types :'service_account_client_id' => :'String', :'service_account_id' => :'Integer', :'service_account_private_key_id' => :'String', + :'service_account_project_id' => :'String', :'status' => :'String' } end @@ -257,6 +261,10 @@ def initialize(attributes = {}) self.service_account_private_key_id = attributes[:'service_account_private_key_id'] end + if attributes.key?(:'service_account_project_id') + self.service_account_project_id = attributes[:'service_account_project_id'] + end + if attributes.key?(:'status') self.status = attributes[:'status'] end @@ -298,6 +306,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "parent_id", parent_id cannot be nil.') end + if @service_account_project_id.nil? + invalid_properties.push('invalid value for "service_account_project_id", service_account_project_id cannot be nil.') + end + invalid_properties end @@ -312,6 +324,7 @@ def valid? return false if @cspm_enabled.nil? return false if @gcp_permissions_status.nil? return false if @parent_id.nil? + return false if @service_account_project_id.nil? true end @@ -341,6 +354,7 @@ def ==(o) service_account_client_id == o.service_account_client_id && service_account_id == o.service_account_id && service_account_private_key_id == o.service_account_private_key_id && + service_account_project_id == o.service_account_project_id && status == o.status end @@ -353,7 +367,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, id, updated_at, cid, cloud_scopes, cspm_enabled, display_name, environment, folder_id, folder_name, gcp_permissions_status, organization_id, organization_name, parent_id, parent_type, project_id, service_account_client_email, service_account_client_id, service_account_id, service_account_private_key_id, status].hash + [created_at, deleted_at, id, updated_at, cid, cloud_scopes, cspm_enabled, display_name, environment, folder_id, folder_name, gcp_permissions_status, organization_id, organization_name, parent_id, parent_type, project_id, service_account_client_email, service_account_client_id, service_account_id, service_account_private_key_id, service_account_project_id, status].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_host.rb b/lib/crimson-falcon/models/domain_host.rb new file mode 100644 index 00000000..b3c84be8 --- /dev/null +++ b/lib/crimson-falcon/models/domain_host.rb @@ -0,0 +1,342 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainHost + attr_accessor :admin_available + + attr_accessor :bandwidth_mbps + + attr_accessor :behind_nat + + attr_accessor :ip + + attr_accessor :ip_parsed + + attr_accessor :isp + + attr_accessor :os_banner + + attr_accessor :ping_ms + + attr_accessor :processor_banner + + attr_accessor :ram_gigs + + attr_accessor :ssl_available + + attr_accessor :tld + + attr_accessor :uptime_hours + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'admin_available' => :'admin_available', + :'bandwidth_mbps' => :'bandwidth_mbps', + :'behind_nat' => :'behind_nat', + :'ip' => :'ip', + :'ip_parsed' => :'ip_parsed', + :'isp' => :'isp', + :'os_banner' => :'os_banner', + :'ping_ms' => :'ping_ms', + :'processor_banner' => :'processor_banner', + :'ram_gigs' => :'ram_gigs', + :'ssl_available' => :'ssl_available', + :'tld' => :'tld', + :'uptime_hours' => :'uptime_hours' + } + 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_available' => :'Boolean', + :'bandwidth_mbps' => :'Float', + :'behind_nat' => :'Boolean', + :'ip' => :'String', + :'ip_parsed' => :'String', + :'isp' => :'String', + :'os_banner' => :'String', + :'ping_ms' => :'Integer', + :'processor_banner' => :'String', + :'ram_gigs' => :'Float', + :'ssl_available' => :'Boolean', + :'tld' => :'String', + :'uptime_hours' => :'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::DomainHost` 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::DomainHost`. 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_available') + self.admin_available = attributes[:'admin_available'] + end + + if attributes.key?(:'bandwidth_mbps') + self.bandwidth_mbps = attributes[:'bandwidth_mbps'] + end + + if attributes.key?(:'behind_nat') + self.behind_nat = attributes[:'behind_nat'] + end + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'ip_parsed') + self.ip_parsed = attributes[:'ip_parsed'] + end + + if attributes.key?(:'isp') + self.isp = attributes[:'isp'] + end + + if attributes.key?(:'os_banner') + self.os_banner = attributes[:'os_banner'] + end + + if attributes.key?(:'ping_ms') + self.ping_ms = attributes[:'ping_ms'] + end + + if attributes.key?(:'processor_banner') + self.processor_banner = attributes[:'processor_banner'] + end + + if attributes.key?(:'ram_gigs') + self.ram_gigs = attributes[:'ram_gigs'] + end + + if attributes.key?(:'ssl_available') + self.ssl_available = attributes[:'ssl_available'] + end + + if attributes.key?(:'tld') + self.tld = attributes[:'tld'] + end + + if attributes.key?(:'uptime_hours') + self.uptime_hours = attributes[:'uptime_hours'] + 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_available == o.admin_available && + bandwidth_mbps == o.bandwidth_mbps && + behind_nat == o.behind_nat && + ip == o.ip && + ip_parsed == o.ip_parsed && + isp == o.isp && + os_banner == o.os_banner && + ping_ms == o.ping_ms && + processor_banner == o.processor_banner && + ram_gigs == o.ram_gigs && + ssl_available == o.ssl_available && + tld == o.tld && + uptime_hours == o.uptime_hours + 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_available, bandwidth_mbps, behind_nat, ip, ip_parsed, isp, os_banner, ping_ms, processor_banner, ram_gigs, ssl_available, tld, uptime_hours].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_incident.rb b/lib/crimson-falcon/models/domain_incident.rb index 9a6cb8ad..c7c82ee1 100644 --- a/lib/crimson-falcon/models/domain_incident.rb +++ b/lib/crimson-falcon/models/domain_incident.rb @@ -88,8 +88,6 @@ class DomainIncident attr_accessor :users - attr_accessor :visibility - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -120,8 +118,7 @@ def self.attribute_map :'tactics' => :'tactics', :'tags' => :'tags', :'techniques' => :'techniques', - :'users' => :'users', - :'visibility' => :'visibility' + :'users' => :'users' } end @@ -160,8 +157,7 @@ def self.openapi_types :'tactics' => :'Array', :'tags' => :'Array', :'techniques' => :'Array', - :'users' => :'Array', - :'visibility' => :'Integer' + :'users' => :'Array' } end @@ -317,10 +313,6 @@ def initialize(attributes = {}) self.users = value end end - - if attributes.key?(:'visibility') - self.visibility = attributes[:'visibility'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -408,8 +400,7 @@ def ==(o) tactics == o.tactics && tags == o.tags && techniques == o.techniques && - users == o.users && - visibility == o.visibility + users == o.users end # @see the `==` method @@ -421,7 +412,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [assigned_to, assigned_to_name, cid, created, description, email_state, _end, events_histogram, fine_score, host_ids, hosts, incident_id, incident_type, lm_host_ids, lm_hosts_capped, lm_types, lmra_host_ids, lmra_hosts_capped, modified_timestamp, name, objectives, start, state, status, tactics, tags, techniques, users, visibility].hash + [assigned_to, assigned_to_name, cid, created, description, email_state, _end, events_histogram, fine_score, host_ids, hosts, incident_id, incident_type, lm_host_ids, lm_hosts_capped, lm_types, lmra_host_ids, lmra_hosts_capped, modified_timestamp, name, objectives, start, state, status, tactics, tags, techniques, users].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_ioc.rb b/lib/crimson-falcon/models/domain_ioc.rb new file mode 100644 index 00000000..6586bcdf --- /dev/null +++ b/lib/crimson-falcon/models/domain_ioc.rb @@ -0,0 +1,621 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainIOC + attr_accessor :at_accounts + + attr_accessor :aws_clis + + attr_accessor :aws_ids + + attr_accessor :aws_secrets + + attr_accessor :bitcoin_address + + attr_accessor :cves + + attr_accessor :discord_urls + + attr_accessor :domains + + attr_accessor :email_domains + + attr_accessor :emails + + attr_accessor :emails_local_part + + attr_accessor :ethereum_addresses + + attr_accessor :generic_apis + + attr_accessor :github_apis + + attr_accessor :google_apis + + attr_accessor :hashtags + + attr_accessor :i2p_urls + + attr_accessor :icq_urls + + attr_accessor :ips + + attr_accessor :magnet_urls + + attr_accessor :md5s + + attr_accessor :monero_addresses + + attr_accessor :onion_urls + + attr_accessor :paste_urls + + attr_accessor :phone_numbers + + attr_accessor :s3_buckets + + attr_accessor :sha1s + + attr_accessor :sha256s + + attr_accessor :sha512s + + attr_accessor :skype_urls + + attr_accessor :slack_apis + + attr_accessor :sqs_queues + + attr_accessor :telegram_urls + + attr_accessor :torrent_urls + + attr_accessor :urls + + attr_accessor :whatsapp_urls + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'at_accounts' => :'at_accounts', + :'aws_clis' => :'aws_clis', + :'aws_ids' => :'aws_ids', + :'aws_secrets' => :'aws_secrets', + :'bitcoin_address' => :'bitcoin_address', + :'cves' => :'cves', + :'discord_urls' => :'discord_urls', + :'domains' => :'domains', + :'email_domains' => :'email_domains', + :'emails' => :'emails', + :'emails_local_part' => :'emails_local_part', + :'ethereum_addresses' => :'ethereum_addresses', + :'generic_apis' => :'generic_apis', + :'github_apis' => :'github_apis', + :'google_apis' => :'google_apis', + :'hashtags' => :'hashtags', + :'i2p_urls' => :'i2p_urls', + :'icq_urls' => :'icq_urls', + :'ips' => :'ips', + :'magnet_urls' => :'magnet_urls', + :'md5s' => :'md5s', + :'monero_addresses' => :'monero_addresses', + :'onion_urls' => :'onion_urls', + :'paste_urls' => :'paste_urls', + :'phone_numbers' => :'phone_numbers', + :'s3_buckets' => :'s3_buckets', + :'sha1s' => :'sha1s', + :'sha256s' => :'sha256s', + :'sha512s' => :'sha512s', + :'skype_urls' => :'skype_urls', + :'slack_apis' => :'slack_apis', + :'sqs_queues' => :'sqs_queues', + :'telegram_urls' => :'telegram_urls', + :'torrent_urls' => :'torrent_urls', + :'urls' => :'urls', + :'whatsapp_urls' => :'whatsapp_urls' + } + 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 + { + :'at_accounts' => :'Array', + :'aws_clis' => :'Array', + :'aws_ids' => :'Array', + :'aws_secrets' => :'Array', + :'bitcoin_address' => :'Array', + :'cves' => :'Array', + :'discord_urls' => :'Array', + :'domains' => :'Array', + :'email_domains' => :'Array', + :'emails' => :'Array', + :'emails_local_part' => :'Array', + :'ethereum_addresses' => :'Array', + :'generic_apis' => :'Array', + :'github_apis' => :'Array', + :'google_apis' => :'Array', + :'hashtags' => :'Array', + :'i2p_urls' => :'Array', + :'icq_urls' => :'Array', + :'ips' => :'Array', + :'magnet_urls' => :'Array', + :'md5s' => :'Array', + :'monero_addresses' => :'Array', + :'onion_urls' => :'Array', + :'paste_urls' => :'Array', + :'phone_numbers' => :'Array', + :'s3_buckets' => :'Array', + :'sha1s' => :'Array', + :'sha256s' => :'Array', + :'sha512s' => :'Array', + :'skype_urls' => :'Array', + :'slack_apis' => :'Array', + :'sqs_queues' => :'Array', + :'telegram_urls' => :'Array', + :'torrent_urls' => :'Array', + :'urls' => :'Array', + :'whatsapp_urls' => :'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::DomainIOC` 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::DomainIOC`. 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?(:'at_accounts') + if (value = attributes[:'at_accounts']).is_a?(Array) + self.at_accounts = value + end + end + + if attributes.key?(:'aws_clis') + if (value = attributes[:'aws_clis']).is_a?(Array) + self.aws_clis = value + end + end + + if attributes.key?(:'aws_ids') + if (value = attributes[:'aws_ids']).is_a?(Array) + self.aws_ids = value + end + end + + if attributes.key?(:'aws_secrets') + if (value = attributes[:'aws_secrets']).is_a?(Array) + self.aws_secrets = value + end + end + + if attributes.key?(:'bitcoin_address') + if (value = attributes[:'bitcoin_address']).is_a?(Array) + self.bitcoin_address = value + end + end + + if attributes.key?(:'cves') + if (value = attributes[:'cves']).is_a?(Array) + self.cves = value + end + end + + if attributes.key?(:'discord_urls') + if (value = attributes[:'discord_urls']).is_a?(Array) + self.discord_urls = value + end + end + + if attributes.key?(:'domains') + if (value = attributes[:'domains']).is_a?(Array) + self.domains = value + end + end + + if attributes.key?(:'email_domains') + if (value = attributes[:'email_domains']).is_a?(Array) + self.email_domains = value + end + end + + if attributes.key?(:'emails') + if (value = attributes[:'emails']).is_a?(Array) + self.emails = value + end + end + + if attributes.key?(:'emails_local_part') + if (value = attributes[:'emails_local_part']).is_a?(Array) + self.emails_local_part = value + end + end + + if attributes.key?(:'ethereum_addresses') + if (value = attributes[:'ethereum_addresses']).is_a?(Array) + self.ethereum_addresses = value + end + end + + if attributes.key?(:'generic_apis') + if (value = attributes[:'generic_apis']).is_a?(Array) + self.generic_apis = value + end + end + + if attributes.key?(:'github_apis') + if (value = attributes[:'github_apis']).is_a?(Array) + self.github_apis = value + end + end + + if attributes.key?(:'google_apis') + if (value = attributes[:'google_apis']).is_a?(Array) + self.google_apis = value + end + end + + if attributes.key?(:'hashtags') + if (value = attributes[:'hashtags']).is_a?(Array) + self.hashtags = value + end + end + + if attributes.key?(:'i2p_urls') + if (value = attributes[:'i2p_urls']).is_a?(Array) + self.i2p_urls = value + end + end + + if attributes.key?(:'icq_urls') + if (value = attributes[:'icq_urls']).is_a?(Array) + self.icq_urls = value + end + end + + if attributes.key?(:'ips') + if (value = attributes[:'ips']).is_a?(Array) + self.ips = value + end + end + + if attributes.key?(:'magnet_urls') + if (value = attributes[:'magnet_urls']).is_a?(Array) + self.magnet_urls = value + end + end + + if attributes.key?(:'md5s') + if (value = attributes[:'md5s']).is_a?(Array) + self.md5s = value + end + end + + if attributes.key?(:'monero_addresses') + if (value = attributes[:'monero_addresses']).is_a?(Array) + self.monero_addresses = value + end + end + + if attributes.key?(:'onion_urls') + if (value = attributes[:'onion_urls']).is_a?(Array) + self.onion_urls = value + end + end + + if attributes.key?(:'paste_urls') + if (value = attributes[:'paste_urls']).is_a?(Array) + self.paste_urls = value + end + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + + if attributes.key?(:'s3_buckets') + if (value = attributes[:'s3_buckets']).is_a?(Array) + self.s3_buckets = value + end + end + + if attributes.key?(:'sha1s') + if (value = attributes[:'sha1s']).is_a?(Array) + self.sha1s = value + end + end + + if attributes.key?(:'sha256s') + if (value = attributes[:'sha256s']).is_a?(Array) + self.sha256s = value + end + end + + if attributes.key?(:'sha512s') + if (value = attributes[:'sha512s']).is_a?(Array) + self.sha512s = value + end + end + + if attributes.key?(:'skype_urls') + if (value = attributes[:'skype_urls']).is_a?(Array) + self.skype_urls = value + end + end + + if attributes.key?(:'slack_apis') + if (value = attributes[:'slack_apis']).is_a?(Array) + self.slack_apis = value + end + end + + if attributes.key?(:'sqs_queues') + if (value = attributes[:'sqs_queues']).is_a?(Array) + self.sqs_queues = value + end + end + + if attributes.key?(:'telegram_urls') + if (value = attributes[:'telegram_urls']).is_a?(Array) + self.telegram_urls = value + end + end + + if attributes.key?(:'torrent_urls') + if (value = attributes[:'torrent_urls']).is_a?(Array) + self.torrent_urls = value + end + end + + if attributes.key?(:'urls') + if (value = attributes[:'urls']).is_a?(Array) + self.urls = value + end + end + + if attributes.key?(:'whatsapp_urls') + if (value = attributes[:'whatsapp_urls']).is_a?(Array) + self.whatsapp_urls = 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 && + at_accounts == o.at_accounts && + aws_clis == o.aws_clis && + aws_ids == o.aws_ids && + aws_secrets == o.aws_secrets && + bitcoin_address == o.bitcoin_address && + cves == o.cves && + discord_urls == o.discord_urls && + domains == o.domains && + email_domains == o.email_domains && + emails == o.emails && + emails_local_part == o.emails_local_part && + ethereum_addresses == o.ethereum_addresses && + generic_apis == o.generic_apis && + github_apis == o.github_apis && + google_apis == o.google_apis && + hashtags == o.hashtags && + i2p_urls == o.i2p_urls && + icq_urls == o.icq_urls && + ips == o.ips && + magnet_urls == o.magnet_urls && + md5s == o.md5s && + monero_addresses == o.monero_addresses && + onion_urls == o.onion_urls && + paste_urls == o.paste_urls && + phone_numbers == o.phone_numbers && + s3_buckets == o.s3_buckets && + sha1s == o.sha1s && + sha256s == o.sha256s && + sha512s == o.sha512s && + skype_urls == o.skype_urls && + slack_apis == o.slack_apis && + sqs_queues == o.sqs_queues && + telegram_urls == o.telegram_urls && + torrent_urls == o.torrent_urls && + urls == o.urls && + whatsapp_urls == o.whatsapp_urls + 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 + [at_accounts, aws_clis, aws_ids, aws_secrets, bitcoin_address, cves, discord_urls, domains, email_domains, emails, emails_local_part, ethereum_addresses, generic_apis, github_apis, google_apis, hashtags, i2p_urls, icq_urls, ips, magnet_urls, md5s, monero_addresses, onion_urls, paste_urls, phone_numbers, s3_buckets, sha1s, sha256s, sha512s, skype_urls, slack_apis, sqs_queues, telegram_urls, torrent_urls, urls, whatsapp_urls].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_item_details_v1.rb b/lib/crimson-falcon/models/domain_item_details_v1.rb new file mode 100644 index 00000000..84619b1c --- /dev/null +++ b/lib/crimson-falcon/models/domain_item_details_v1.rb @@ -0,0 +1,527 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainItemDetailsV1 + # Threat actor associated with the raw intelligence item, if available + attr_accessor :actor_slug + + # Pointers to attachments items linked to this item + attr_accessor :attachments + + # The raw intelligence item author username + attr_accessor :author + + # The raw intelligence item author identifier in our system + attr_accessor :author_id + + # Category of the source where the item was found + attr_accessor :category + + # The date when the raw intelligence item was scraped from the original source + attr_accessor :collection_date + + # Highlighted content based on the rule that generated the notifications. Highlights are surrounded with a `` tag + attr_accessor :content + + # The date when the raw intelligence item was created + attr_accessor :created_date + + # Mime type of the file for file type items + attr_accessor :file_type + + attr_accessor :fragment_info + + # IOC types available in the raw intelligence item. List of keys populated in the iocs field + attr_accessor :ioc_types + + attr_accessor :iocs + + # The raw intelligence item labels. These contain hints around what is actually included in the item (malware, IPs, emails, etc). + attr_accessor :labels + + # The raw intelligence item language + attr_accessor :language + + attr_accessor :marketplace_product + + # Mime type of the file for file type items + attr_accessor :mime_type + + # SHA256 of the file contents for file type items + attr_accessor :sha256 + + # The site where the raw intelligence item was found + attr_accessor :site + + # The ID of the site where the raw intelligence item was found + attr_accessor :site_id + + # Size of the item's content in bytes, if available + attr_accessor :size + + attr_accessor :telegram_info + + # Identifier that groups all raw intelligence items belonging to the same 'conversation stream', i.e. chatroom, forum thread, etc. + attr_accessor :thread_id + + # The raw intelligence item title + attr_accessor :title + + # The type of the raw intelligence item + attr_accessor :type + + # The date when the raw intelligence item was updated + attr_accessor :updated_date + + # The raw intelligence item URL + attr_accessor :url + + # The raw intelligence item author identifier in the original site + attr_accessor :user_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'actor_slug' => :'actor_slug', + :'attachments' => :'attachments', + :'author' => :'author', + :'author_id' => :'author_id', + :'category' => :'category', + :'collection_date' => :'collection_date', + :'content' => :'content', + :'created_date' => :'created_date', + :'file_type' => :'file_type', + :'fragment_info' => :'fragment_info', + :'ioc_types' => :'ioc_types', + :'iocs' => :'iocs', + :'labels' => :'labels', + :'language' => :'language', + :'marketplace_product' => :'marketplace_product', + :'mime_type' => :'mime_type', + :'sha256' => :'sha256', + :'site' => :'site', + :'site_id' => :'site_id', + :'size' => :'size', + :'telegram_info' => :'telegram_info', + :'thread_id' => :'thread_id', + :'title' => :'title', + :'type' => :'type', + :'updated_date' => :'updated_date', + :'url' => :'url', + :'user_id' => :'user_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 + { + :'actor_slug' => :'String', + :'attachments' => :'Array', + :'author' => :'String', + :'author_id' => :'String', + :'category' => :'String', + :'collection_date' => :'Time', + :'content' => :'String', + :'created_date' => :'Time', + :'file_type' => :'String', + :'fragment_info' => :'DomainFragmentInfo', + :'ioc_types' => :'Array', + :'iocs' => :'DomainIOC', + :'labels' => :'Array', + :'language' => :'String', + :'marketplace_product' => :'DomainMarketplaceProduct', + :'mime_type' => :'String', + :'sha256' => :'String', + :'site' => :'String', + :'site_id' => :'String', + :'size' => :'Integer', + :'telegram_info' => :'DomainTelegramInfo', + :'thread_id' => :'String', + :'title' => :'String', + :'type' => :'String', + :'updated_date' => :'Time', + :'url' => :'String', + :'user_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::DomainItemDetailsV1` 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::DomainItemDetailsV1`. 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?(:'actor_slug') + self.actor_slug = attributes[:'actor_slug'] + end + + if attributes.key?(:'attachments') + if (value = attributes[:'attachments']).is_a?(Array) + self.attachments = value + end + end + + if attributes.key?(:'author') + self.author = attributes[:'author'] + end + + if attributes.key?(:'author_id') + self.author_id = attributes[:'author_id'] + end + + if attributes.key?(:'category') + self.category = attributes[:'category'] + end + + if attributes.key?(:'collection_date') + self.collection_date = attributes[:'collection_date'] + end + + if attributes.key?(:'content') + self.content = attributes[:'content'] + end + + if attributes.key?(:'created_date') + self.created_date = attributes[:'created_date'] + end + + if attributes.key?(:'file_type') + self.file_type = attributes[:'file_type'] + end + + if attributes.key?(:'fragment_info') + self.fragment_info = attributes[:'fragment_info'] + end + + if attributes.key?(:'ioc_types') + if (value = attributes[:'ioc_types']).is_a?(Array) + self.ioc_types = value + end + end + + if attributes.key?(:'iocs') + self.iocs = attributes[:'iocs'] + end + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Array) + self.labels = value + end + end + + if attributes.key?(:'language') + self.language = attributes[:'language'] + end + + if attributes.key?(:'marketplace_product') + self.marketplace_product = attributes[:'marketplace_product'] + end + + if attributes.key?(:'mime_type') + self.mime_type = attributes[:'mime_type'] + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + end + + if attributes.key?(:'site') + self.site = attributes[:'site'] + end + + if attributes.key?(:'site_id') + self.site_id = attributes[:'site_id'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'telegram_info') + self.telegram_info = attributes[:'telegram_info'] + end + + if attributes.key?(:'thread_id') + self.thread_id = attributes[:'thread_id'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'updated_date') + self.updated_date = attributes[:'updated_date'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_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 @category.nil? + invalid_properties.push('invalid value for "category", category cannot be nil.') + end + + if @content.nil? + invalid_properties.push('invalid value for "content", content cannot be nil.') + end + + if @created_date.nil? + invalid_properties.push('invalid value for "created_date", created_date cannot be nil.') + end + + if @site_id.nil? + invalid_properties.push('invalid value for "site_id", site_id cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @updated_date.nil? + invalid_properties.push('invalid value for "updated_date", updated_date 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 @category.nil? + return false if @content.nil? + return false if @created_date.nil? + return false if @site_id.nil? + return false if @type.nil? + return false if @updated_date.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 && + actor_slug == o.actor_slug && + attachments == o.attachments && + author == o.author && + author_id == o.author_id && + category == o.category && + collection_date == o.collection_date && + content == o.content && + created_date == o.created_date && + file_type == o.file_type && + fragment_info == o.fragment_info && + ioc_types == o.ioc_types && + iocs == o.iocs && + labels == o.labels && + language == o.language && + marketplace_product == o.marketplace_product && + mime_type == o.mime_type && + sha256 == o.sha256 && + site == o.site && + site_id == o.site_id && + size == o.size && + telegram_info == o.telegram_info && + thread_id == o.thread_id && + title == o.title && + type == o.type && + updated_date == o.updated_date && + url == o.url && + user_id == o.user_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 + [actor_slug, attachments, author, author_id, category, collection_date, content, created_date, file_type, fragment_info, ioc_types, iocs, labels, language, marketplace_product, mime_type, sha256, site, site_id, size, telegram_info, thread_id, title, type, updated_date, url, user_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_launch_export_job_request_v1.rb b/lib/crimson-falcon/models/domain_launch_export_job_request_v1.rb index d734fb0f..341181f9 100644 --- a/lib/crimson-falcon/models/domain_launch_export_job_request_v1.rb +++ b/lib/crimson-falcon/models/domain_launch_export_job_request_v1.rb @@ -32,7 +32,7 @@ module Falcon class DomainLaunchExportJobRequestV1 - # The entity type. This can be one of: [`notification-exposed-data-record`] + # The entity type. This can be one of: [`notification-exposed-data-record`, `historical-search-exposed-data-record`] attr_accessor :entity # The file type of the export. This can be one of: [`json`, `csv`] diff --git a/lib/crimson-falcon/models/domain_mapped_device_policies.rb b/lib/crimson-falcon/models/domain_mapped_device_policies.rb new file mode 100644 index 00000000..06aad568 --- /dev/null +++ b/lib/crimson-falcon/models/domain_mapped_device_policies.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 DomainMappedDevicePolicies + attr_accessor :remote_response + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'remote_response' => :'remote_response' + } + 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 + { + :'remote_response' => :'DomainDevicePolicy' + } + 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::DomainMappedDevicePolicies` 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::DomainMappedDevicePolicies`. 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?(:'remote_response') + self.remote_response = attributes[:'remote_response'] + 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 && + remote_response == o.remote_response + 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 + [remote_response].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_marketplace_product.rb b/lib/crimson-falcon/models/domain_marketplace_product.rb new file mode 100644 index 00000000..8d18f1c9 --- /dev/null +++ b/lib/crimson-falcon/models/domain_marketplace_product.rb @@ -0,0 +1,288 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainMarketplaceProduct + attr_accessor :card + + attr_accessor :country_code + + attr_accessor :credentials + + attr_accessor :host + + attr_accessor :location + + attr_accessor :price + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'card' => :'card', + :'country_code' => :'country_code', + :'credentials' => :'credentials', + :'host' => :'host', + :'location' => :'location', + :'price' => :'price', + :'type' => :'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 + { + :'card' => :'DomainCard', + :'country_code' => :'String', + :'credentials' => :'DomainCredentials', + :'host' => :'DomainHost', + :'location' => :'String', + :'price' => :'String', + :'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::DomainMarketplaceProduct` 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::DomainMarketplaceProduct`. 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?(:'card') + self.card = attributes[:'card'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + + if attributes.key?(:'credentials') + self.credentials = attributes[:'credentials'] + end + + if attributes.key?(:'host') + self.host = attributes[:'host'] + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + + if attributes.key?(:'price') + self.price = attributes[:'price'] + end + + if attributes.key?(:'type') + self.type = attributes[:'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 && + card == o.card && + country_code == o.country_code && + credentials == o.credentials && + host == o.host && + location == o.location && + price == o.price && + type == o.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 + [card, country_code, credentials, host, location, price, 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/domain_matched_breach_summary_v1.rb b/lib/crimson-falcon/models/domain_matched_breach_summary_v1.rb index 36b2f5c8..017c16e5 100644 --- a/lib/crimson-falcon/models/domain_matched_breach_summary_v1.rb +++ b/lib/crimson-falcon/models/domain_matched_breach_summary_v1.rb @@ -38,6 +38,9 @@ class DomainMatchedBreachSummaryV1 # The level of confidence regarding data veridicality. Options for likely authentic, confirmed authentic (default: unverified). attr_accessor :confidence_level + # A list of statuses for the exposed data records contained in the notification. Possible values: 'newly_detected', 'previously_reported' and/or 'other' + attr_accessor :credential_statuses + attr_accessor :credentials_domains attr_accessor :credentials_ips @@ -64,6 +67,9 @@ class DomainMatchedBreachSummaryV1 attr_accessor :idp_send_status + # (Boolean) If the notification was processed before the introduction of exposed data deduplication + attr_accessor :is_retroactively_deduped + # The name of the breach attr_accessor :name @@ -78,6 +84,7 @@ def self.attribute_map { :'community_name' => :'community_name', :'confidence_level' => :'confidence_level', + :'credential_statuses' => :'credential_statuses', :'credentials_domains' => :'credentials_domains', :'credentials_ips' => :'credentials_ips', :'description' => :'description', @@ -88,6 +95,7 @@ def self.attribute_map :'files' => :'files', :'idp_send_date' => :'idp_send_date', :'idp_send_status' => :'idp_send_status', + :'is_retroactively_deduped' => :'is_retroactively_deduped', :'name' => :'name', :'obtained_by' => :'obtained_by', :'url' => :'url' @@ -104,6 +112,7 @@ def self.openapi_types { :'community_name' => :'String', :'confidence_level' => :'String', + :'credential_statuses' => :'Array', :'credentials_domains' => :'Array', :'credentials_ips' => :'Array', :'description' => :'String', @@ -114,6 +123,7 @@ def self.openapi_types :'files' => :'Array', :'idp_send_date' => :'Time', :'idp_send_status' => :'String', + :'is_retroactively_deduped' => :'Boolean', :'name' => :'String', :'obtained_by' => :'String', :'url' => :'String' @@ -149,6 +159,12 @@ def initialize(attributes = {}) self.confidence_level = attributes[:'confidence_level'] end + if attributes.key?(:'credential_statuses') + if (value = attributes[:'credential_statuses']).is_a?(Array) + self.credential_statuses = value + end + end + if attributes.key?(:'credentials_domains') if (value = attributes[:'credentials_domains']).is_a?(Array) self.credentials_domains = value @@ -197,6 +213,10 @@ def initialize(attributes = {}) self.idp_send_status = attributes[:'idp_send_status'] end + if attributes.key?(:'is_retroactively_deduped') + self.is_retroactively_deduped = attributes[:'is_retroactively_deduped'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -222,6 +242,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "fields", fields cannot be nil.') end + if @is_retroactively_deduped.nil? + invalid_properties.push('invalid value for "is_retroactively_deduped", is_retroactively_deduped cannot be nil.') + end + if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end @@ -234,6 +258,7 @@ def list_invalid_properties def valid? return false if @description.nil? return false if @fields.nil? + return false if @is_retroactively_deduped.nil? return false if @name.nil? true end @@ -245,6 +270,7 @@ def ==(o) self.class == o.class && community_name == o.community_name && confidence_level == o.confidence_level && + credential_statuses == o.credential_statuses && credentials_domains == o.credentials_domains && credentials_ips == o.credentials_ips && description == o.description && @@ -255,6 +281,7 @@ def ==(o) files == o.files && idp_send_date == o.idp_send_date && idp_send_status == o.idp_send_status && + is_retroactively_deduped == o.is_retroactively_deduped && name == o.name && obtained_by == o.obtained_by && url == o.url @@ -269,7 +296,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [community_name, confidence_level, credentials_domains, credentials_ips, description, event_date, event_id, exposure_date, fields, files, idp_send_date, idp_send_status, name, obtained_by, url].hash + [community_name, confidence_level, credential_statuses, credentials_domains, credentials_ips, description, event_date, event_id, exposure_date, fields, files, idp_send_date, idp_send_status, is_retroactively_deduped, name, obtained_by, url].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_meta_info.rb b/lib/crimson-falcon/models/domain_meta_info.rb index db4d2301..a23704b8 100644 --- a/lib/crimson-falcon/models/domain_meta_info.rb +++ b/lib/crimson-falcon/models/domain_meta_info.rb @@ -32,15 +32,27 @@ module Falcon class DomainMetaInfo - attr_accessor :msa_meta_info + attr_accessor :pagination + + attr_accessor :powered_by + + attr_accessor :query_time attr_accessor :quota + attr_accessor :trace_id + + attr_accessor :writes + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'msa_meta_info' => :'MsaMetaInfo', - :'quota' => :'quota' + :'pagination' => :'pagination', + :'powered_by' => :'powered_by', + :'query_time' => :'query_time', + :'quota' => :'quota', + :'trace_id' => :'trace_id', + :'writes' => :'writes' } end @@ -52,8 +64,12 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'msa_meta_info' => :'MsaspecMetaInfo', - :'quota' => :'DomainQuota' + :'pagination' => :'MsaspecPaging', + :'powered_by' => :'String', + :'query_time' => :'Float', + :'quota' => :'DomainQuota', + :'trace_id' => :'String', + :'writes' => :'MsaspecWrites' } end @@ -78,21 +94,41 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'msa_meta_info') - self.msa_meta_info = attributes[:'msa_meta_info'] + 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?(:'quota') self.quota = attributes[:'quota'] 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 @msa_meta_info.nil? - invalid_properties.push('invalid value for "msa_meta_info", msa_meta_info cannot be nil.') + 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 @@ -101,7 +137,8 @@ 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 @msa_meta_info.nil? + return false if @query_time.nil? + return false if @trace_id.nil? true end @@ -110,8 +147,12 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - msa_meta_info == o.msa_meta_info && - quota == o.quota + pagination == o.pagination && + powered_by == o.powered_by && + query_time == o.query_time && + quota == o.quota && + trace_id == o.trace_id && + writes == o.writes end # @see the `==` method @@ -123,7 +164,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [msa_meta_info, quota].hash + [pagination, powered_by, query_time, quota, trace_id, writes].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_news_document.rb b/lib/crimson-falcon/models/domain_news_document.rb index e86fb78b..da3254f0 100644 --- a/lib/crimson-falcon/models/domain_news_document.rb +++ b/lib/crimson-falcon/models/domain_news_document.rb @@ -58,6 +58,9 @@ class DomainNewsDocument # Date of the news document last modification, unix timestampt attr_accessor :last_modified_date + # Malware mentioned, related or referenced in the news/report + attr_accessor :malware + # News mentioned motivation or motivation of related actors and malware families attr_accessor :motivations @@ -108,6 +111,7 @@ def self.attribute_map :'id' => :'id', :'image' => :'image', :'last_modified_date' => :'last_modified_date', + :'malware' => :'malware', :'motivations' => :'motivations', :'name' => :'name', :'notify_users' => :'notify_users', @@ -142,6 +146,7 @@ def self.openapi_types :'id' => :'Integer', :'image' => :'DomainImage', :'last_modified_date' => :'Integer', + :'malware' => :'Array', :'motivations' => :'Array', :'name' => :'String', :'notify_users' => :'Boolean', @@ -222,6 +227,12 @@ def initialize(attributes = {}) self.last_modified_date = attributes[:'last_modified_date'] end + if attributes.key?(:'malware') + if (value = attributes[:'malware']).is_a?(Array) + self.malware = value + end + end + if attributes.key?(:'motivations') if (value = attributes[:'motivations']).is_a?(Array) self.motivations = value @@ -369,6 +380,7 @@ def ==(o) id == o.id && image == o.image && last_modified_date == o.last_modified_date && + malware == o.malware && motivations == o.motivations && name == o.name && notify_users == o.notify_users && @@ -394,7 +406,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [active, actors, attachments, created_date, description, entitlements, id, image, last_modified_date, motivations, name, notify_users, rich_text_description, short_description, slug, sub_type, tags, target_countries, target_industries, thumbnail, topic, type, url].hash + [active, actors, attachments, created_date, description, entitlements, id, image, last_modified_date, malware, motivations, name, notify_users, rich_text_description, short_description, slug, sub_type, tags, target_countries, target_industries, thumbnail, topic, type, url].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_notification_v1.rb b/lib/crimson-falcon/models/domain_notification_v1.rb index 4d920134..a8b91ab3 100644 --- a/lib/crimson-falcon/models/domain_notification_v1.rb +++ b/lib/crimson-falcon/models/domain_notification_v1.rb @@ -32,6 +32,8 @@ module Falcon class DomainNotificationV1 + attr_accessor :actor_slug + # The email of the user who is assigned to this notification attr_accessor :assigned_to_uid @@ -106,6 +108,7 @@ class DomainNotificationV1 # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'actor_slug' => :'actor_slug', :'assigned_to_uid' => :'assigned_to_uid', :'assigned_to_username' => :'assigned_to_username', :'assigned_to_uuid' => :'assigned_to_uuid', @@ -142,6 +145,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'actor_slug' => :'String', :'assigned_to_uid' => :'String', :'assigned_to_username' => :'String', :'assigned_to_uuid' => :'String', @@ -191,6 +195,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'actor_slug') + self.actor_slug = attributes[:'actor_slug'] + end + if attributes.key?(:'assigned_to_uid') self.assigned_to_uid = attributes[:'assigned_to_uid'] end @@ -300,6 +308,10 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new + if @actor_slug.nil? + invalid_properties.push('invalid value for "actor_slug", actor_slug cannot be nil.') + end + if @cid.nil? invalid_properties.push('invalid value for "cid", cid cannot be nil.') end @@ -358,6 +370,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 @actor_slug.nil? return false if @cid.nil? return false if @created_date.nil? return false if @id.nil? @@ -379,6 +392,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + actor_slug == o.actor_slug && assigned_to_uid == o.assigned_to_uid && assigned_to_username == o.assigned_to_username && assigned_to_uuid == o.assigned_to_uuid && @@ -415,7 +429,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [assigned_to_uid, assigned_to_username, assigned_to_uuid, breach_summary, cid, created_date, highlights, id, item_author, item_author_id, item_date, item_id, item_site, item_site_id, item_type, logs, raw_intel_id, rule_id, rule_name, rule_priority, rule_topic, source_category, status, typosquatting, updated_date].hash + [actor_slug, assigned_to_uid, assigned_to_username, assigned_to_uuid, breach_summary, cid, created_date, highlights, id, item_author, item_author_id, item_date, item_id, item_site, item_site_id, item_type, logs, raw_intel_id, rule_id, rule_name, rule_priority, rule_topic, source_category, status, typosquatting, updated_date].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_policy_info.rb b/lib/crimson-falcon/models/domain_policy_info.rb index bdb8d1f7..09b21217 100644 --- a/lib/crimson-falcon/models/domain_policy_info.rb +++ b/lib/crimson-falcon/models/domain_policy_info.rb @@ -86,6 +86,10 @@ class DomainPolicyInfo attr_accessor :fql_policy + attr_accessor :hipaa_benchmark_ids + + attr_accessor :hitrust_benchmark_ids + attr_accessor :internal_only attr_accessor :is_enabled @@ -164,6 +168,8 @@ def self.attribute_map :'description' => :'description', :'event_type' => :'event_type', :'fql_policy' => :'fql_policy', + :'hipaa_benchmark_ids' => :'hipaa_benchmark_ids', + :'hitrust_benchmark_ids' => :'hitrust_benchmark_ids', :'internal_only' => :'internal_only', :'is_enabled' => :'is_enabled', :'is_remediable' => :'is_remediable', @@ -226,6 +232,8 @@ def self.openapi_types :'description' => :'String', :'event_type' => :'String', :'fql_policy' => :'String', + :'hipaa_benchmark_ids' => :'Array', + :'hitrust_benchmark_ids' => :'Array', :'internal_only' => :'Boolean', :'is_enabled' => :'Boolean', :'is_remediable' => :'Boolean', @@ -388,6 +396,18 @@ def initialize(attributes = {}) self.fql_policy = attributes[:'fql_policy'] end + if attributes.key?(:'hipaa_benchmark_ids') + if (value = attributes[:'hipaa_benchmark_ids']).is_a?(Array) + self.hipaa_benchmark_ids = value + end + end + + if attributes.key?(:'hitrust_benchmark_ids') + if (value = attributes[:'hitrust_benchmark_ids']).is_a?(Array) + self.hitrust_benchmark_ids = value + end + end + if attributes.key?(:'internal_only') self.internal_only = attributes[:'internal_only'] end @@ -573,6 +593,8 @@ def ==(o) description == o.description && event_type == o.event_type && fql_policy == o.fql_policy && + hipaa_benchmark_ids == o.hipaa_benchmark_ids && + hitrust_benchmark_ids == o.hitrust_benchmark_ids && internal_only == o.internal_only && is_enabled == o.is_enabled && is_remediable == o.is_remediable && @@ -608,7 +630,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, id, updated_at, account_scope, alert_logic, api_command, asset_type_id, attack_tool, attack_tool_command, attack_types, cis_benchmark_ids, cisa_benchmark_ids, cli_command, cloud_asset_type, cloud_document, cloud_platform, cloud_platform_type, cloud_service, cloud_service_friendly, cloud_service_subtype, cloud_service_type, confidence, default_severity, description, event_type, fql_policy, internal_only, is_enabled, is_remediable, iso_benchmark_ids, mitre_attack_cloud_matrix, mitre_attack_cloud_subtype, nist_benchmark_ids, pci_benchmark_ids, policy_confidence_score, policy_fail_query, policy_pass_query, policy_remediation, policy_severity, policy_severity_score, policy_statement, policy_type, remediation_summary, soc2_benchmark_ids, tactic, tactic_id, tactic_url, technique, technique_id, technique_url].hash + [created_at, deleted_at, id, updated_at, account_scope, alert_logic, api_command, asset_type_id, attack_tool, attack_tool_command, attack_types, cis_benchmark_ids, cisa_benchmark_ids, cli_command, cloud_asset_type, cloud_document, cloud_platform, cloud_platform_type, cloud_service, cloud_service_friendly, cloud_service_subtype, cloud_service_type, confidence, default_severity, description, event_type, fql_policy, hipaa_benchmark_ids, hitrust_benchmark_ids, internal_only, is_enabled, is_remediable, iso_benchmark_ids, mitre_attack_cloud_matrix, mitre_attack_cloud_subtype, nist_benchmark_ids, pci_benchmark_ids, policy_confidence_score, policy_fail_query, policy_pass_query, policy_remediation, policy_severity, policy_severity_score, policy_statement, policy_type, remediation_summary, soc2_benchmark_ids, tactic, tactic_id, tactic_url, technique, technique_id, technique_url].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_query_response.rb b/lib/crimson-falcon/models/domain_query_response.rb index 856b84d6..bcad9b12 100644 --- a/lib/crimson-falcon/models/domain_query_response.rb +++ b/lib/crimson-falcon/models/domain_query_response.rb @@ -55,8 +55,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'errors' => :'Array', - :'meta' => :'DomainMsaMetaInfo', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo', :'resources' => :'Array' } end @@ -103,6 +103,10 @@ 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 @@ -117,6 +121,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 @errors.nil? return false if @meta.nil? return false if @resources.nil? true diff --git a/lib/crimson-falcon/models/domain_report_malware.rb b/lib/crimson-falcon/models/domain_report_malware.rb new file mode 100644 index 00000000..619aa2d2 --- /dev/null +++ b/lib/crimson-falcon/models/domain_report_malware.rb @@ -0,0 +1,264 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainReportMalware + attr_accessor :community_identifiers + + attr_accessor :family_name + + attr_accessor :slug + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'community_identifiers' => :'community_identifiers', + :'family_name' => :'family_name', + :'slug' => :'slug' + } + 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 + { + :'community_identifiers' => :'Array', + :'family_name' => :'String', + :'slug' => :'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::DomainReportMalware` 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::DomainReportMalware`. 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?(:'community_identifiers') + if (value = attributes[:'community_identifiers']).is_a?(Array) + self.community_identifiers = value + end + end + + if attributes.key?(:'family_name') + self.family_name = attributes[:'family_name'] + end + + if attributes.key?(:'slug') + self.slug = attributes[:'slug'] + 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 @family_name.nil? + invalid_properties.push('invalid value for "family_name", family_name cannot be nil.') + end + + if @slug.nil? + invalid_properties.push('invalid value for "slug", slug 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 @family_name.nil? + return false if @slug.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 && + community_identifiers == o.community_identifiers && + family_name == o.family_name && + slug == o.slug + 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 + [community_identifiers, family_name, slug].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_rule.rb b/lib/crimson-falcon/models/domain_rule.rb index d4f89a75..16ba4f9b 100644 --- a/lib/crimson-falcon/models/domain_rule.rb +++ b/lib/crimson-falcon/models/domain_rule.rb @@ -32,36 +32,41 @@ module Falcon class DomainRule + # The categories associated with the rule + attr_accessor :categories + + # UTC timestamp when rule was created attr_accessor :created_date - attr_accessor :description + # The ID of the customer + attr_accessor :customer_id + # The ID of the rule attr_accessor :id - attr_accessor :last_modified_date - + # The name of the rule attr_accessor :name - attr_accessor :rich_text_description - - attr_accessor :short_description + # The type of the rule + attr_accessor :rule_type - attr_accessor :tags + # UTC timestamp when rule was last updated + attr_accessor :updated_date - attr_accessor :type + # The value of the rule + attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'categories' => :'categories', :'created_date' => :'created_date', - :'description' => :'description', + :'customer_id' => :'customer_id', :'id' => :'id', - :'last_modified_date' => :'last_modified_date', :'name' => :'name', - :'rich_text_description' => :'rich_text_description', - :'short_description' => :'short_description', - :'tags' => :'tags', - :'type' => :'type' + :'rule_type' => :'rule_type', + :'updated_date' => :'updated_date', + :'value' => :'value' } end @@ -73,15 +78,14 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'created_date' => :'Integer', - :'description' => :'String', - :'id' => :'Integer', - :'last_modified_date' => :'Integer', + :'categories' => :'Array', + :'created_date' => :'String', + :'customer_id' => :'String', + :'id' => :'String', :'name' => :'String', - :'rich_text_description' => :'String', - :'short_description' => :'String', - :'tags' => :'Array', - :'type' => :'String' + :'rule_type' => :'String', + :'updated_date' => :'String', + :'value' => :'String' } end @@ -106,42 +110,38 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'categories') + if (value = attributes[:'categories']).is_a?(Array) + self.categories = value + end + end + if attributes.key?(:'created_date') self.created_date = attributes[:'created_date'] end - if attributes.key?(:'description') - self.description = attributes[:'description'] + if attributes.key?(:'customer_id') + self.customer_id = attributes[:'customer_id'] end if attributes.key?(:'id') self.id = attributes[:'id'] end - if attributes.key?(:'last_modified_date') - self.last_modified_date = attributes[:'last_modified_date'] - end - if attributes.key?(:'name') self.name = attributes[:'name'] end - if attributes.key?(:'rich_text_description') - self.rich_text_description = attributes[:'rich_text_description'] + if attributes.key?(:'rule_type') + self.rule_type = attributes[:'rule_type'] end - if attributes.key?(:'short_description') - self.short_description = attributes[:'short_description'] + if attributes.key?(:'updated_date') + self.updated_date = attributes[:'updated_date'] end - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'value') + self.value = attributes[:'value'] end end @@ -149,40 +149,36 @@ def initialize(attributes = {}) # @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 @created_date.nil? invalid_properties.push('invalid value for "created_date", created_date cannot be nil.') end - if @description.nil? - invalid_properties.push('invalid value for "description", description cannot be nil.') + if @customer_id.nil? + invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end - if @last_modified_date.nil? - invalid_properties.push('invalid value for "last_modified_date", last_modified_date cannot be nil.') - end - if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end - if @rich_text_description.nil? - invalid_properties.push('invalid value for "rich_text_description", rich_text_description cannot be nil.') - end - - if @short_description.nil? - invalid_properties.push('invalid value for "short_description", short_description cannot be nil.') + if @rule_type.nil? + invalid_properties.push('invalid value for "rule_type", rule_type cannot be nil.') end - if @tags.nil? - invalid_properties.push('invalid value for "tags", tags cannot be nil.') + if @updated_date.nil? + invalid_properties.push('invalid value for "updated_date", updated_date cannot be nil.') end - if @type.nil? - invalid_properties.push('invalid value for "type", type cannot be nil.') + if @value.nil? + invalid_properties.push('invalid value for "value", value cannot be nil.') end invalid_properties @@ -191,15 +187,14 @@ 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 @categories.nil? return false if @created_date.nil? - return false if @description.nil? + return false if @customer_id.nil? return false if @id.nil? - return false if @last_modified_date.nil? return false if @name.nil? - return false if @rich_text_description.nil? - return false if @short_description.nil? - return false if @tags.nil? - return false if @type.nil? + return false if @rule_type.nil? + return false if @updated_date.nil? + return false if @value.nil? true end @@ -208,15 +203,14 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && + categories == o.categories && created_date == o.created_date && - description == o.description && + customer_id == o.customer_id && id == o.id && - last_modified_date == o.last_modified_date && name == o.name && - rich_text_description == o.rich_text_description && - short_description == o.short_description && - tags == o.tags && - type == o.type + rule_type == o.rule_type && + updated_date == o.updated_date && + value == o.value end # @see the `==` method @@ -228,7 +222,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_date, description, id, last_modified_date, name, rich_text_description, short_description, tags, type].hash + [categories, created_date, customer_id, id, name, rule_type, updated_date, value].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_scan.rb b/lib/crimson-falcon/models/domain_scan.rb index a97dd66c..62104e9a 100644 --- a/lib/crimson-falcon/models/domain_scan.rb +++ b/lib/crimson-falcon/models/domain_scan.rb @@ -40,6 +40,8 @@ class DomainScan attr_accessor :cloud_ml_level_prevention + attr_accessor :completed_host_count + attr_accessor :cpu_priority attr_accessor :created_by @@ -60,6 +62,8 @@ class DomainScan attr_accessor :id + attr_accessor :incomplete_host_count + attr_accessor :initiated_from attr_accessor :last_updated @@ -70,6 +74,10 @@ class DomainScan attr_accessor :metadata + attr_accessor :missing_host_count + + attr_accessor :not_started_host_count + attr_accessor :pause_duration attr_accessor :policy_setting @@ -86,6 +94,8 @@ class DomainScan attr_accessor :scan_inclusions + attr_accessor :scan_scheduled_on + attr_accessor :scan_started_on attr_accessor :sensor_ml_level_detection @@ -94,8 +104,12 @@ class DomainScan attr_accessor :severity + attr_accessor :started_host_count + attr_accessor :status + attr_accessor :targeted_host_count + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -103,6 +117,7 @@ def self.attribute_map :'cid' => :'cid', :'cloud_ml_level_detection' => :'cloud_ml_level_detection', :'cloud_ml_level_prevention' => :'cloud_ml_level_prevention', + :'completed_host_count' => :'completed_host_count', :'cpu_priority' => :'cpu_priority', :'created_by' => :'created_by', :'created_on' => :'created_on', @@ -113,11 +128,14 @@ def self.attribute_map :'host_groups' => :'host_groups', :'hosts' => :'hosts', :'id' => :'id', + :'incomplete_host_count' => :'incomplete_host_count', :'initiated_from' => :'initiated_from', :'last_updated' => :'last_updated', :'max_duration' => :'max_duration', :'max_file_size' => :'max_file_size', :'metadata' => :'metadata', + :'missing_host_count' => :'missing_host_count', + :'not_started_host_count' => :'not_started_host_count', :'pause_duration' => :'pause_duration', :'policy_setting' => :'policy_setting', :'preemption_priority' => :'preemption_priority', @@ -126,11 +144,14 @@ def self.attribute_map :'scan_completed_on' => :'scan_completed_on', :'scan_exclusions' => :'scan_exclusions', :'scan_inclusions' => :'scan_inclusions', + :'scan_scheduled_on' => :'scan_scheduled_on', :'scan_started_on' => :'scan_started_on', :'sensor_ml_level_detection' => :'sensor_ml_level_detection', :'sensor_ml_level_prevention' => :'sensor_ml_level_prevention', :'severity' => :'severity', - :'status' => :'status' + :'started_host_count' => :'started_host_count', + :'status' => :'status', + :'targeted_host_count' => :'targeted_host_count' } end @@ -146,6 +167,7 @@ def self.openapi_types :'cid' => :'String', :'cloud_ml_level_detection' => :'Integer', :'cloud_ml_level_prevention' => :'Integer', + :'completed_host_count' => :'Integer', :'cpu_priority' => :'Integer', :'created_by' => :'String', :'created_on' => :'Time', @@ -156,11 +178,14 @@ def self.openapi_types :'host_groups' => :'Array', :'hosts' => :'Array', :'id' => :'String', + :'incomplete_host_count' => :'Integer', :'initiated_from' => :'String', :'last_updated' => :'Time', :'max_duration' => :'Integer', :'max_file_size' => :'Integer', :'metadata' => :'Array', + :'missing_host_count' => :'Integer', + :'not_started_host_count' => :'Integer', :'pause_duration' => :'Integer', :'policy_setting' => :'Array', :'preemption_priority' => :'Integer', @@ -169,11 +194,14 @@ def self.openapi_types :'scan_completed_on' => :'Time', :'scan_exclusions' => :'Array', :'scan_inclusions' => :'Array', + :'scan_scheduled_on' => :'Time', :'scan_started_on' => :'Time', :'sensor_ml_level_detection' => :'Integer', :'sensor_ml_level_prevention' => :'Integer', :'severity' => :'Integer', - :'status' => :'String' + :'started_host_count' => :'Integer', + :'status' => :'String', + :'targeted_host_count' => :'Integer' } end @@ -214,6 +242,10 @@ def initialize(attributes = {}) self.cloud_ml_level_prevention = attributes[:'cloud_ml_level_prevention'] end + if attributes.key?(:'completed_host_count') + self.completed_host_count = attributes[:'completed_host_count'] + end + if attributes.key?(:'cpu_priority') self.cpu_priority = attributes[:'cpu_priority'] end @@ -260,6 +292,10 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'incomplete_host_count') + self.incomplete_host_count = attributes[:'incomplete_host_count'] + end + if attributes.key?(:'initiated_from') self.initiated_from = attributes[:'initiated_from'] end @@ -282,6 +318,14 @@ def initialize(attributes = {}) end end + if attributes.key?(:'missing_host_count') + self.missing_host_count = attributes[:'missing_host_count'] + end + + if attributes.key?(:'not_started_host_count') + self.not_started_host_count = attributes[:'not_started_host_count'] + end + if attributes.key?(:'pause_duration') self.pause_duration = attributes[:'pause_duration'] end @@ -320,6 +364,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'scan_scheduled_on') + self.scan_scheduled_on = attributes[:'scan_scheduled_on'] + end + if attributes.key?(:'scan_started_on') self.scan_started_on = attributes[:'scan_started_on'] end @@ -336,9 +384,17 @@ def initialize(attributes = {}) self.severity = attributes[:'severity'] end + if attributes.key?(:'started_host_count') + self.started_host_count = attributes[:'started_host_count'] + end + if attributes.key?(:'status') self.status = attributes[:'status'] end + + if attributes.key?(:'targeted_host_count') + self.targeted_host_count = attributes[:'targeted_host_count'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -368,6 +424,7 @@ def ==(o) cid == o.cid && cloud_ml_level_detection == o.cloud_ml_level_detection && cloud_ml_level_prevention == o.cloud_ml_level_prevention && + completed_host_count == o.completed_host_count && cpu_priority == o.cpu_priority && created_by == o.created_by && created_on == o.created_on && @@ -378,11 +435,14 @@ def ==(o) host_groups == o.host_groups && hosts == o.hosts && id == o.id && + incomplete_host_count == o.incomplete_host_count && initiated_from == o.initiated_from && last_updated == o.last_updated && max_duration == o.max_duration && max_file_size == o.max_file_size && metadata == o.metadata && + missing_host_count == o.missing_host_count && + not_started_host_count == o.not_started_host_count && pause_duration == o.pause_duration && policy_setting == o.policy_setting && preemption_priority == o.preemption_priority && @@ -391,11 +451,14 @@ def ==(o) scan_completed_on == o.scan_completed_on && scan_exclusions == o.scan_exclusions && scan_inclusions == o.scan_inclusions && + scan_scheduled_on == o.scan_scheduled_on && scan_started_on == o.scan_started_on && sensor_ml_level_detection == o.sensor_ml_level_detection && sensor_ml_level_prevention == o.sensor_ml_level_prevention && severity == o.severity && - status == o.status + started_host_count == o.started_host_count && + status == o.status && + targeted_host_count == o.targeted_host_count end # @see the `==` method @@ -407,7 +470,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [affected_hosts_count, cid, cloud_ml_level_detection, cloud_ml_level_prevention, cpu_priority, created_by, created_on, description, endpoint_notification, file_paths, filecount, host_groups, hosts, id, initiated_from, last_updated, max_duration, max_file_size, metadata, pause_duration, policy_setting, preemption_priority, profile_id, quarantine, scan_completed_on, scan_exclusions, scan_inclusions, scan_started_on, sensor_ml_level_detection, sensor_ml_level_prevention, severity, status].hash + [affected_hosts_count, cid, cloud_ml_level_detection, cloud_ml_level_prevention, completed_host_count, cpu_priority, created_by, created_on, description, endpoint_notification, file_paths, filecount, host_groups, hosts, id, incomplete_host_count, initiated_from, last_updated, max_duration, max_file_size, metadata, missing_host_count, not_started_host_count, pause_duration, policy_setting, preemption_priority, profile_id, quarantine, scan_completed_on, scan_exclusions, scan_inclusions, scan_scheduled_on, scan_started_on, sensor_ml_level_detection, sensor_ml_level_prevention, severity, started_host_count, status, targeted_host_count].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_scan_profile.rb b/lib/crimson-falcon/models/domain_scan_profile.rb index d8454cc0..ae22ac78 100644 --- a/lib/crimson-falcon/models/domain_scan_profile.rb +++ b/lib/crimson-falcon/models/domain_scan_profile.rb @@ -88,6 +88,8 @@ class DomainScanProfile attr_accessor :status + attr_accessor :targeted_host_count + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -118,7 +120,8 @@ def self.attribute_map :'schedule' => :'schedule', :'sensor_ml_level_detection' => :'sensor_ml_level_detection', :'sensor_ml_level_prevention' => :'sensor_ml_level_prevention', - :'status' => :'status' + :'status' => :'status', + :'targeted_host_count' => :'targeted_host_count' } end @@ -157,7 +160,8 @@ def self.openapi_types :'schedule' => :'DomainSchedule', :'sensor_ml_level_detection' => :'Integer', :'sensor_ml_level_prevention' => :'Integer', - :'status' => :'String' + :'status' => :'String', + :'targeted_host_count' => :'Integer' } end @@ -307,6 +311,10 @@ def initialize(attributes = {}) if attributes.key?(:'status') self.status = attributes[:'status'] end + + if attributes.key?(:'targeted_host_count') + self.targeted_host_count = attributes[:'targeted_host_count'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -364,7 +372,8 @@ def ==(o) schedule == o.schedule && sensor_ml_level_detection == o.sensor_ml_level_detection && sensor_ml_level_prevention == o.sensor_ml_level_prevention && - status == o.status + status == o.status && + targeted_host_count == o.targeted_host_count end # @see the `==` method @@ -376,7 +385,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [cid, cloud_ml_level_detection, cloud_ml_level_prevention, cpu_priority, created_by, created_on, deleted, description, endpoint_notification, file_paths, host_groups, hosts, id, initiated_from, last_updated, max_duration, max_file_size, metadata, pause_duration, policy_setting, preemption_priority, quarantine, scan_exclusions, scan_inclusions, schedule, sensor_ml_level_detection, sensor_ml_level_prevention, status].hash + [cid, cloud_ml_level_detection, cloud_ml_level_prevention, cpu_priority, created_by, created_on, deleted, description, endpoint_notification, file_paths, host_groups, hosts, id, initiated_from, last_updated, max_duration, max_file_size, metadata, pause_duration, policy_setting, preemption_priority, quarantine, scan_exclusions, scan_inclusions, schedule, sensor_ml_level_detection, sensor_ml_level_prevention, status, targeted_host_count].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_scan_v2.rb b/lib/crimson-falcon/models/domain_scan_v2.rb new file mode 100644 index 00000000..09338628 --- /dev/null +++ b/lib/crimson-falcon/models/domain_scan_v2.rb @@ -0,0 +1,621 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainScanV2 + attr_accessor :affected_hosts_count + + attr_accessor :cid + + attr_accessor :cloud_ml_level_detection + + attr_accessor :cloud_ml_level_prevention + + attr_accessor :completed_host_count + + attr_accessor :cpu_priority + + attr_accessor :created_by + + attr_accessor :created_on + + attr_accessor :description + + attr_accessor :endpoint_notification + + attr_accessor :file_paths + + attr_accessor :filecount + + attr_accessor :host_groups + + attr_accessor :hosts + + attr_accessor :id + + attr_accessor :incomplete_host_count + + attr_accessor :initiated_from + + attr_accessor :last_updated + + attr_accessor :max_duration + + attr_accessor :max_file_size + + attr_accessor :metadata + + attr_accessor :missing_host_count + + attr_accessor :not_started_host_count + + attr_accessor :pause_duration + + attr_accessor :policy_setting + + attr_accessor :preemption_priority + + attr_accessor :profile_id + + attr_accessor :quarantine + + attr_accessor :scan_completed_on + + attr_accessor :scan_exclusions + + attr_accessor :scan_inclusions + + attr_accessor :scan_started_on + + attr_accessor :sensor_ml_level_detection + + attr_accessor :sensor_ml_level_prevention + + attr_accessor :severity + + attr_accessor :started_host_count + + attr_accessor :status + + attr_accessor :targeted_host_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'affected_hosts_count' => :'affected_hosts_count', + :'cid' => :'cid', + :'cloud_ml_level_detection' => :'cloud_ml_level_detection', + :'cloud_ml_level_prevention' => :'cloud_ml_level_prevention', + :'completed_host_count' => :'completed_host_count', + :'cpu_priority' => :'cpu_priority', + :'created_by' => :'created_by', + :'created_on' => :'created_on', + :'description' => :'description', + :'endpoint_notification' => :'endpoint_notification', + :'file_paths' => :'file_paths', + :'filecount' => :'filecount', + :'host_groups' => :'host_groups', + :'hosts' => :'hosts', + :'id' => :'id', + :'incomplete_host_count' => :'incomplete_host_count', + :'initiated_from' => :'initiated_from', + :'last_updated' => :'last_updated', + :'max_duration' => :'max_duration', + :'max_file_size' => :'max_file_size', + :'metadata' => :'metadata', + :'missing_host_count' => :'missing_host_count', + :'not_started_host_count' => :'not_started_host_count', + :'pause_duration' => :'pause_duration', + :'policy_setting' => :'policy_setting', + :'preemption_priority' => :'preemption_priority', + :'profile_id' => :'profile_id', + :'quarantine' => :'quarantine', + :'scan_completed_on' => :'scan_completed_on', + :'scan_exclusions' => :'scan_exclusions', + :'scan_inclusions' => :'scan_inclusions', + :'scan_started_on' => :'scan_started_on', + :'sensor_ml_level_detection' => :'sensor_ml_level_detection', + :'sensor_ml_level_prevention' => :'sensor_ml_level_prevention', + :'severity' => :'severity', + :'started_host_count' => :'started_host_count', + :'status' => :'status', + :'targeted_host_count' => :'targeted_host_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 + { + :'affected_hosts_count' => :'Integer', + :'cid' => :'String', + :'cloud_ml_level_detection' => :'Integer', + :'cloud_ml_level_prevention' => :'Integer', + :'completed_host_count' => :'Integer', + :'cpu_priority' => :'Integer', + :'created_by' => :'String', + :'created_on' => :'Time', + :'description' => :'String', + :'endpoint_notification' => :'Boolean', + :'file_paths' => :'Array', + :'filecount' => :'DomainFileCountV2', + :'host_groups' => :'Array', + :'hosts' => :'Array', + :'id' => :'String', + :'incomplete_host_count' => :'Integer', + :'initiated_from' => :'String', + :'last_updated' => :'Time', + :'max_duration' => :'Integer', + :'max_file_size' => :'Integer', + :'metadata' => :'Array', + :'missing_host_count' => :'Integer', + :'not_started_host_count' => :'Integer', + :'pause_duration' => :'Integer', + :'policy_setting' => :'Array', + :'preemption_priority' => :'Integer', + :'profile_id' => :'String', + :'quarantine' => :'Boolean', + :'scan_completed_on' => :'Time', + :'scan_exclusions' => :'Array', + :'scan_inclusions' => :'Array', + :'scan_started_on' => :'Time', + :'sensor_ml_level_detection' => :'Integer', + :'sensor_ml_level_prevention' => :'Integer', + :'severity' => :'Integer', + :'started_host_count' => :'Integer', + :'status' => :'String', + :'targeted_host_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::DomainScanV2` 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::DomainScanV2`. 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?(:'affected_hosts_count') + self.affected_hosts_count = attributes[:'affected_hosts_count'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cloud_ml_level_detection') + self.cloud_ml_level_detection = attributes[:'cloud_ml_level_detection'] + end + + if attributes.key?(:'cloud_ml_level_prevention') + self.cloud_ml_level_prevention = attributes[:'cloud_ml_level_prevention'] + end + + if attributes.key?(:'completed_host_count') + self.completed_host_count = attributes[:'completed_host_count'] + end + + if attributes.key?(:'cpu_priority') + self.cpu_priority = attributes[:'cpu_priority'] + 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 + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'endpoint_notification') + self.endpoint_notification = attributes[:'endpoint_notification'] + end + + if attributes.key?(:'file_paths') + if (value = attributes[:'file_paths']).is_a?(Array) + self.file_paths = value + end + end + + if attributes.key?(:'filecount') + self.filecount = attributes[:'filecount'] + end + + if attributes.key?(:'host_groups') + if (value = attributes[:'host_groups']).is_a?(Array) + self.host_groups = value + end + end + + if attributes.key?(:'hosts') + if (value = attributes[:'hosts']).is_a?(Array) + self.hosts = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'incomplete_host_count') + self.incomplete_host_count = attributes[:'incomplete_host_count'] + end + + if attributes.key?(:'initiated_from') + self.initiated_from = attributes[:'initiated_from'] + end + + if attributes.key?(:'last_updated') + self.last_updated = attributes[:'last_updated'] + end + + if attributes.key?(:'max_duration') + self.max_duration = attributes[:'max_duration'] + end + + if attributes.key?(:'max_file_size') + self.max_file_size = attributes[:'max_file_size'] + end + + if attributes.key?(:'metadata') + if (value = attributes[:'metadata']).is_a?(Array) + self.metadata = value + end + end + + if attributes.key?(:'missing_host_count') + self.missing_host_count = attributes[:'missing_host_count'] + end + + if attributes.key?(:'not_started_host_count') + self.not_started_host_count = attributes[:'not_started_host_count'] + end + + if attributes.key?(:'pause_duration') + self.pause_duration = attributes[:'pause_duration'] + end + + if attributes.key?(:'policy_setting') + if (value = attributes[:'policy_setting']).is_a?(Array) + self.policy_setting = value + end + end + + if attributes.key?(:'preemption_priority') + self.preemption_priority = attributes[:'preemption_priority'] + end + + if attributes.key?(:'profile_id') + self.profile_id = attributes[:'profile_id'] + end + + if attributes.key?(:'quarantine') + self.quarantine = attributes[:'quarantine'] + end + + if attributes.key?(:'scan_completed_on') + self.scan_completed_on = attributes[:'scan_completed_on'] + end + + if attributes.key?(:'scan_exclusions') + if (value = attributes[:'scan_exclusions']).is_a?(Array) + self.scan_exclusions = value + end + end + + if attributes.key?(:'scan_inclusions') + if (value = attributes[:'scan_inclusions']).is_a?(Array) + self.scan_inclusions = value + end + end + + if attributes.key?(:'scan_started_on') + self.scan_started_on = attributes[:'scan_started_on'] + end + + if attributes.key?(:'sensor_ml_level_detection') + self.sensor_ml_level_detection = attributes[:'sensor_ml_level_detection'] + end + + if attributes.key?(:'sensor_ml_level_prevention') + self.sensor_ml_level_prevention = attributes[:'sensor_ml_level_prevention'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'started_host_count') + self.started_host_count = attributes[:'started_host_count'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'targeted_host_count') + self.targeted_host_count = attributes[:'targeted_host_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 + if @affected_hosts_count.nil? + invalid_properties.push('invalid value for "affected_hosts_count", affected_hosts_count cannot be nil.') + end + + if @completed_host_count.nil? + invalid_properties.push('invalid value for "completed_host_count", completed_host_count cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @incomplete_host_count.nil? + invalid_properties.push('invalid value for "incomplete_host_count", incomplete_host_count cannot be nil.') + end + + if @missing_host_count.nil? + invalid_properties.push('invalid value for "missing_host_count", missing_host_count cannot be nil.') + end + + if @not_started_host_count.nil? + invalid_properties.push('invalid value for "not_started_host_count", not_started_host_count cannot be nil.') + end + + if @started_host_count.nil? + invalid_properties.push('invalid value for "started_host_count", started_host_count cannot be nil.') + end + + if @targeted_host_count.nil? + invalid_properties.push('invalid value for "targeted_host_count", targeted_host_count 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 @affected_hosts_count.nil? + return false if @completed_host_count.nil? + return false if @id.nil? + return false if @incomplete_host_count.nil? + return false if @missing_host_count.nil? + return false if @not_started_host_count.nil? + return false if @started_host_count.nil? + return false if @targeted_host_count.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 && + affected_hosts_count == o.affected_hosts_count && + cid == o.cid && + cloud_ml_level_detection == o.cloud_ml_level_detection && + cloud_ml_level_prevention == o.cloud_ml_level_prevention && + completed_host_count == o.completed_host_count && + cpu_priority == o.cpu_priority && + created_by == o.created_by && + created_on == o.created_on && + description == o.description && + endpoint_notification == o.endpoint_notification && + file_paths == o.file_paths && + filecount == o.filecount && + host_groups == o.host_groups && + hosts == o.hosts && + id == o.id && + incomplete_host_count == o.incomplete_host_count && + initiated_from == o.initiated_from && + last_updated == o.last_updated && + max_duration == o.max_duration && + max_file_size == o.max_file_size && + metadata == o.metadata && + missing_host_count == o.missing_host_count && + not_started_host_count == o.not_started_host_count && + pause_duration == o.pause_duration && + policy_setting == o.policy_setting && + preemption_priority == o.preemption_priority && + profile_id == o.profile_id && + quarantine == o.quarantine && + scan_completed_on == o.scan_completed_on && + scan_exclusions == o.scan_exclusions && + scan_inclusions == o.scan_inclusions && + scan_started_on == o.scan_started_on && + sensor_ml_level_detection == o.sensor_ml_level_detection && + sensor_ml_level_prevention == o.sensor_ml_level_prevention && + severity == o.severity && + started_host_count == o.started_host_count && + status == o.status && + targeted_host_count == o.targeted_host_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 + [affected_hosts_count, cid, cloud_ml_level_detection, cloud_ml_level_prevention, completed_host_count, cpu_priority, created_by, created_on, description, endpoint_notification, file_paths, filecount, host_groups, hosts, id, incomplete_host_count, initiated_from, last_updated, max_duration, max_file_size, metadata, missing_host_count, not_started_host_count, pause_duration, policy_setting, preemption_priority, profile_id, quarantine, scan_completed_on, scan_exclusions, scan_inclusions, scan_started_on, sensor_ml_level_detection, sensor_ml_level_prevention, severity, started_host_count, status, targeted_host_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/domain_schedule.rb b/lib/crimson-falcon/models/domain_schedule.rb index ff849805..60d88b2c 100644 --- a/lib/crimson-falcon/models/domain_schedule.rb +++ b/lib/crimson-falcon/models/domain_schedule.rb @@ -32,18 +32,18 @@ module Falcon class DomainSchedule - attr_accessor :can_stagger + attr_accessor :ignored_by_channelfile - attr_accessor :definition + attr_accessor :interval - attr_accessor :display + attr_accessor :start_timestamp # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'can_stagger' => :'can_stagger', - :'definition' => :'definition', - :'display' => :'display' + :'ignored_by_channelfile' => :'ignored_by_channelfile', + :'interval' => :'interval', + :'start_timestamp' => :'start_timestamp' } end @@ -55,9 +55,9 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'can_stagger' => :'Boolean', - :'definition' => :'String', - :'display' => :'String' + :'ignored_by_channelfile' => :'Boolean', + :'interval' => :'Integer', + :'start_timestamp' => :'String' } end @@ -82,16 +82,16 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'can_stagger') - self.can_stagger = attributes[:'can_stagger'] + if attributes.key?(:'ignored_by_channelfile') + self.ignored_by_channelfile = attributes[:'ignored_by_channelfile'] end - if attributes.key?(:'definition') - self.definition = attributes[:'definition'] + if attributes.key?(:'interval') + self.interval = attributes[:'interval'] end - if attributes.key?(:'display') - self.display = attributes[:'display'] + if attributes.key?(:'start_timestamp') + self.start_timestamp = attributes[:'start_timestamp'] end end @@ -99,27 +99,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @can_stagger.nil? - invalid_properties.push('invalid value for "can_stagger", can_stagger cannot be nil.') - end - - if @definition.nil? - invalid_properties.push('invalid value for "definition", definition cannot be nil.') - end - - if @display.nil? - invalid_properties.push('invalid value for "display", display 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 @can_stagger.nil? - return false if @definition.nil? - return false if @display.nil? true end @@ -128,9 +113,9 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - can_stagger == o.can_stagger && - definition == o.definition && - display == o.display + ignored_by_channelfile == o.ignored_by_channelfile && + interval == o.interval && + start_timestamp == o.start_timestamp end # @see the `==` method @@ -142,7 +127,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [can_stagger, definition, display].hash + [ignored_by_channelfile, interval, start_timestamp].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_session.rb b/lib/crimson-falcon/models/domain_session.rb index 403f01ba..3fe3962c 100644 --- a/lib/crimson-falcon/models/domain_session.rb +++ b/lib/crimson-falcon/models/domain_session.rb @@ -249,10 +249,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "cloud_request_ids", cloud_request_ids cannot be nil.') end - if @commands.nil? - invalid_properties.push('invalid value for "commands", commands cannot be nil.') - end - if @commands_queued.nil? invalid_properties.push('invalid value for "commands_queued", commands_queued cannot be nil.') end @@ -265,10 +261,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "deleted_at", deleted_at cannot be nil.') end - if @device_details.nil? - invalid_properties.push('invalid value for "device_details", device_details cannot be nil.') - end - if @device_id.nil? invalid_properties.push('invalid value for "device_id", device_id cannot be nil.') end @@ -297,18 +289,6 @@ def list_invalid_properties invalid_properties.push('invalid value for "origin", origin 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 @pwd.nil? - invalid_properties.push('invalid value for "pwd", pwd cannot be nil.') - end - if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end @@ -329,11 +309,9 @@ def list_invalid_properties def valid? return false if @cid.nil? return false if @cloud_request_ids.nil? - return false if @commands.nil? return false if @commands_queued.nil? return false if @created_at.nil? return false if @deleted_at.nil? - return false if @device_details.nil? return false if @device_id.nil? return false if @duration.nil? return false if @hostname.nil? @@ -341,9 +319,6 @@ def valid? return false if @logs.nil? return false if @offline_queued.nil? return false if @origin.nil? - return false if @platform_id.nil? - return false if @platform_name.nil? - return false if @pwd.nil? return false if @updated_at.nil? return false if @user_id.nil? return false if @user_uuid.nil? diff --git a/lib/crimson-falcon/models/domain_telegram_channel_info.rb b/lib/crimson-falcon/models/domain_telegram_channel_info.rb new file mode 100644 index 00000000..1aedabd0 --- /dev/null +++ b/lib/crimson-falcon/models/domain_telegram_channel_info.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 DomainTelegramChannelInfo + attr_accessor :title + + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'title' => :'title', + :'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 + { + :'title' => :'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::DomainTelegramChannelInfo` 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::DomainTelegramChannelInfo`. 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 + + 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 + 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 && + 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 + [title, 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/models_snapshot_inventory_payload.rb b/lib/crimson-falcon/models/domain_telegram_info.rb similarity index 86% rename from lib/crimson-falcon/models/models_snapshot_inventory_payload.rb rename to lib/crimson-falcon/models/domain_telegram_info.rb index dd16d075..029948d1 100644 --- a/lib/crimson-falcon/models/models_snapshot_inventory_payload.rb +++ b/lib/crimson-falcon/models/domain_telegram_info.rb @@ -31,16 +31,19 @@ require 'time' module Falcon - class ModelsSnapshotInventoryPayload - attr_accessor :job_metadata + class DomainTelegramInfo + attr_accessor :channel_info - attr_accessor :results + attr_accessor :recipient_info + + attr_accessor :sender_info # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'job_metadata' => :'job_metadata', - :'results' => :'results' + :'channel_info' => :'channel_info', + :'recipient_info' => :'recipient_info', + :'sender_info' => :'sender_info' } end @@ -52,8 +55,9 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'job_metadata' => :'ModelsJobMetaData', - :'results' => :'ModelsScanResults' + :'channel_info' => :'DomainTelegramChannelInfo', + :'recipient_info' => :'DomainTelegramRecipientInfo', + :'sender_info' => :'DomainTelegramSenderInfo' } end @@ -67,23 +71,27 @@ 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::ModelsSnapshotInventoryPayload` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainTelegramInfo` 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::ModelsSnapshotInventoryPayload`. 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::DomainTelegramInfo`. 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?(:'job_metadata') - self.job_metadata = attributes[:'job_metadata'] + if attributes.key?(:'channel_info') + self.channel_info = attributes[:'channel_info'] + end + + if attributes.key?(:'recipient_info') + self.recipient_info = attributes[:'recipient_info'] end - if attributes.key?(:'results') - self.results = attributes[:'results'] + if attributes.key?(:'sender_info') + self.sender_info = attributes[:'sender_info'] end end @@ -91,22 +99,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @job_metadata.nil? - invalid_properties.push('invalid value for "job_metadata", job_metadata cannot be nil.') - end - - if @results.nil? - invalid_properties.push('invalid value for "results", results 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 @job_metadata.nil? - return false if @results.nil? true end @@ -115,8 +113,9 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - job_metadata == o.job_metadata && - results == o.results + channel_info == o.channel_info && + recipient_info == o.recipient_info && + sender_info == o.sender_info end # @see the `==` method @@ -128,7 +127,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [job_metadata, results].hash + [channel_info, recipient_info, sender_info].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_telegram_recipient_info.rb b/lib/crimson-falcon/models/domain_telegram_recipient_info.rb new file mode 100644 index 00000000..93eedf61 --- /dev/null +++ b/lib/crimson-falcon/models/domain_telegram_recipient_info.rb @@ -0,0 +1,279 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainTelegramRecipientInfo + attr_accessor :first_name + + attr_accessor :id + + attr_accessor :last_name + + attr_accessor :name + + attr_accessor :type + + attr_accessor :username + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'first_name', + :'id' => :'id', + :'last_name' => :'last_name', + :'name' => :'name', + :'type' => :'type', + :'username' => :'username' + } + 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 + { + :'first_name' => :'String', + :'id' => :'Integer', + :'last_name' => :'String', + :'name' => :'String', + :'type' => :'String', + :'username' => :'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::DomainTelegramRecipientInfo` 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::DomainTelegramRecipientInfo`. 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?(:'first_name') + self.first_name = attributes[:'first_name'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'last_name') + self.last_name = attributes[:'last_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + 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 && + first_name == o.first_name && + id == o.id && + last_name == o.last_name && + name == o.name && + type == o.type && + username == o.username + 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 + [first_name, id, last_name, name, type, username].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_telegram_sender_info.rb b/lib/crimson-falcon/models/domain_telegram_sender_info.rb new file mode 100644 index 00000000..c886592e --- /dev/null +++ b/lib/crimson-falcon/models/domain_telegram_sender_info.rb @@ -0,0 +1,279 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 DomainTelegramSenderInfo + attr_accessor :first_name + + attr_accessor :id + + attr_accessor :last_name + + attr_accessor :name + + attr_accessor :type + + attr_accessor :username + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'first_name', + :'id' => :'id', + :'last_name' => :'last_name', + :'name' => :'name', + :'type' => :'type', + :'username' => :'username' + } + 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 + { + :'first_name' => :'String', + :'id' => :'Integer', + :'last_name' => :'String', + :'name' => :'String', + :'type' => :'String', + :'username' => :'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::DomainTelegramSenderInfo` 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::DomainTelegramSenderInfo`. 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?(:'first_name') + self.first_name = attributes[:'first_name'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'last_name') + self.last_name = attributes[:'last_name'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + 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 && + first_name == o.first_name && + id == o.id && + last_name == o.last_name && + name == o.name && + type == o.type && + username == o.username + 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 + [first_name, id, last_name, name, type, username].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_threat_entity.rb b/lib/crimson-falcon/models/domain_threat_entity.rb new file mode 100644 index 00000000..732d47e0 --- /dev/null +++ b/lib/crimson-falcon/models/domain_threat_entity.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 DomainThreatEntity + # family name of the threat + attr_accessor :family_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'family_name' => :'family_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 + { + :'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::DomainThreatEntity` 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::DomainThreatEntity`. 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/domain_user.rb b/lib/crimson-falcon/models/domain_user.rb index 144b3c10..9e063e1c 100644 --- a/lib/crimson-falcon/models/domain_user.rb +++ b/lib/crimson-falcon/models/domain_user.rb @@ -34,27 +34,21 @@ module Falcon class DomainUser attr_accessor :cid - attr_accessor :created_at + attr_accessor :email attr_accessor :first_name - attr_accessor :last_login_at - attr_accessor :last_name - attr_accessor :uid - attr_accessor :uuid # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'cid' => :'cid', - :'created_at' => :'created_at', - :'first_name' => :'first_name', - :'last_login_at' => :'last_login_at', - :'last_name' => :'last_name', - :'uid' => :'uid', + :'email' => :'email', + :'first_name' => :'firstName', + :'last_name' => :'lastName', :'uuid' => :'uuid' } end @@ -68,11 +62,9 @@ def self.acceptable_attributes def self.openapi_types { :'cid' => :'String', - :'created_at' => :'Time', + :'email' => :'String', :'first_name' => :'String', - :'last_login_at' => :'Time', :'last_name' => :'String', - :'uid' => :'String', :'uuid' => :'String' } end @@ -102,26 +94,18 @@ def initialize(attributes = {}) self.cid = attributes[:'cid'] end - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] + if attributes.key?(:'email') + self.email = attributes[:'email'] end if attributes.key?(:'first_name') self.first_name = attributes[:'first_name'] end - if attributes.key?(:'last_login_at') - self.last_login_at = attributes[:'last_login_at'] - end - if attributes.key?(:'last_name') self.last_name = attributes[:'last_name'] end - if attributes.key?(:'uid') - self.uid = attributes[:'uid'] - end - if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end @@ -146,11 +130,9 @@ def ==(o) return true if self.equal?(o) self.class == o.class && cid == o.cid && - created_at == o.created_at && + email == o.email && first_name == o.first_name && - last_login_at == o.last_login_at && last_name == o.last_name && - uid == o.uid && uuid == o.uuid end @@ -163,7 +145,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [cid, created_at, first_name, last_login_at, last_name, uid, uuid].hash + [cid, email, first_name, last_name, uuid].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/domain_user_grants.rb b/lib/crimson-falcon/models/domain_user_grants.rb index eb2b5b0e..66827866 100644 --- a/lib/crimson-falcon/models/domain_user_grants.rb +++ b/lib/crimson-falcon/models/domain_user_grants.rb @@ -155,37 +155,17 @@ def initialize(attributes = {}) # @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 @grant_type.nil? - invalid_properties.push('invalid value for "grant_type", grant_type cannot be nil.') - end - if @role_id.nil? invalid_properties.push('invalid value for "role_id", role_id cannot be nil.') end - if @role_name.nil? - invalid_properties.push('invalid value for "role_name", role_name cannot be nil.') - end - - if @uuid.nil? - invalid_properties.push('invalid value for "uuid", uuid 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 @grant_type.nil? return false if @role_id.nil? - return false if @role_name.nil? - return false if @uuid.nil? true end diff --git a/lib/crimson-falcon/models/driftindicators_drift_entity_response.rb b/lib/crimson-falcon/models/driftindicators_drift_entity_response.rb new file mode 100644 index 00000000..8a39de06 --- /dev/null +++ b/lib/crimson-falcon/models/driftindicators_drift_entity_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 DriftindicatorsDriftEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::DriftindicatorsDriftEntityResponse` 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::DriftindicatorsDriftEntityResponse`. 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/driftindicators_drift_indicators_count_value.rb b/lib/crimson-falcon/models/driftindicators_drift_indicators_count_value.rb new file mode 100644 index 00000000..239057ed --- /dev/null +++ b/lib/crimson-falcon/models/driftindicators_drift_indicators_count_value.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 DriftindicatorsDriftIndicatorsCountValue + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::DriftindicatorsDriftIndicatorsCountValue` 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::DriftindicatorsDriftIndicatorsCountValue`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/driftindicators_drift_indicators_field_value.rb b/lib/crimson-falcon/models/driftindicators_drift_indicators_field_value.rb new file mode 100644 index 00000000..9d0c5071 --- /dev/null +++ b/lib/crimson-falcon/models/driftindicators_drift_indicators_field_value.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 DriftindicatorsDriftIndicatorsFieldValue + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::DriftindicatorsDriftIndicatorsFieldValue` 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::DriftindicatorsDriftIndicatorsFieldValue`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/empowerapi_falcon_script.rb b/lib/crimson-falcon/models/empowerapi_falcon_script.rb new file mode 100644 index 00000000..d5f0634e --- /dev/null +++ b/lib/crimson-falcon/models/empowerapi_falcon_script.rb @@ -0,0 +1,521 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 EmpowerapiFalconScript + attr_accessor :access_roles + + attr_accessor :categories + + attr_accessor :content + + attr_accessor :created_by + + attr_accessor :created_timestamp + + attr_accessor :description + + attr_accessor :id + + attr_accessor :is_disruptive + + attr_accessor :modified_by + + attr_accessor :modified_timestamp + + attr_accessor :modifies_system + + attr_accessor :name + + attr_accessor :platform + + attr_accessor :required_skus + + attr_accessor :revision + + attr_accessor :sha256 + + attr_accessor :size + + attr_accessor :use_case + + attr_accessor :workflow_enabled + + attr_accessor :workflow_input_schema + + attr_accessor :workflow_output_schema + + attr_accessor :workflow_tags + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'access_roles' => :'access_roles', + :'categories' => :'categories', + :'content' => :'content', + :'created_by' => :'created_by', + :'created_timestamp' => :'created_timestamp', + :'description' => :'description', + :'id' => :'id', + :'is_disruptive' => :'is_disruptive', + :'modified_by' => :'modified_by', + :'modified_timestamp' => :'modified_timestamp', + :'modifies_system' => :'modifies_system', + :'name' => :'name', + :'platform' => :'platform', + :'required_skus' => :'required_skus', + :'revision' => :'revision', + :'sha256' => :'sha256', + :'size' => :'size', + :'use_case' => :'use_case', + :'workflow_enabled' => :'workflow_enabled', + :'workflow_input_schema' => :'workflow_input_schema', + :'workflow_output_schema' => :'workflow_output_schema', + :'workflow_tags' => :'workflow_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 + { + :'access_roles' => :'Array', + :'categories' => :'Array', + :'content' => :'String', + :'created_by' => :'String', + :'created_timestamp' => :'Time', + :'description' => :'String', + :'id' => :'String', + :'is_disruptive' => :'Boolean', + :'modified_by' => :'String', + :'modified_timestamp' => :'Time', + :'modifies_system' => :'Boolean', + :'name' => :'String', + :'platform' => :'String', + :'required_skus' => :'Array', + :'revision' => :'Integer', + :'sha256' => :'String', + :'size' => :'Integer', + :'use_case' => :'String', + :'workflow_enabled' => :'Boolean', + :'workflow_input_schema' => :'String', + :'workflow_output_schema' => :'String', + :'workflow_tags' => :'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::EmpowerapiFalconScript` 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::EmpowerapiFalconScript`. 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?(:'access_roles') + if (value = attributes[:'access_roles']).is_a?(Array) + self.access_roles = value + end + end + + if attributes.key?(:'categories') + if (value = attributes[:'categories']).is_a?(Array) + self.categories = value + end + end + + if attributes.key?(:'content') + self.content = attributes[:'content'] + 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?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'is_disruptive') + self.is_disruptive = attributes[:'is_disruptive'] + 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?(:'modifies_system') + self.modifies_system = attributes[:'modifies_system'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'platform') + self.platform = attributes[:'platform'] + end + + if attributes.key?(:'required_skus') + if (value = attributes[:'required_skus']).is_a?(Array) + self.required_skus = value + end + end + + if attributes.key?(:'revision') + self.revision = attributes[:'revision'] + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'use_case') + self.use_case = attributes[:'use_case'] + end + + if attributes.key?(:'workflow_enabled') + self.workflow_enabled = attributes[:'workflow_enabled'] + end + + if attributes.key?(:'workflow_input_schema') + self.workflow_input_schema = attributes[:'workflow_input_schema'] + end + + if attributes.key?(:'workflow_output_schema') + self.workflow_output_schema = attributes[:'workflow_output_schema'] + end + + if attributes.key?(:'workflow_tags') + if (value = attributes[:'workflow_tags']).is_a?(Array) + self.workflow_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 @access_roles.nil? + invalid_properties.push('invalid value for "access_roles", access_roles cannot be nil.') + end + + if @categories.nil? + invalid_properties.push('invalid value for "categories", categories 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 @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @is_disruptive.nil? + invalid_properties.push('invalid value for "is_disruptive", is_disruptive 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 @modifies_system.nil? + invalid_properties.push('invalid value for "modifies_system", modifies_system cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @platform.nil? + invalid_properties.push('invalid value for "platform", platform cannot be nil.') + end + + if @revision.nil? + invalid_properties.push('invalid value for "revision", revision cannot be nil.') + end + + if @use_case.nil? + invalid_properties.push('invalid value for "use_case", use_case cannot be nil.') + end + + if @workflow_enabled.nil? + invalid_properties.push('invalid value for "workflow_enabled", workflow_enabled cannot be nil.') + end + + if @workflow_input_schema.nil? + invalid_properties.push('invalid value for "workflow_input_schema", workflow_input_schema cannot be nil.') + end + + if @workflow_output_schema.nil? + invalid_properties.push('invalid value for "workflow_output_schema", workflow_output_schema cannot be nil.') + end + + if @workflow_tags.nil? + invalid_properties.push('invalid value for "workflow_tags", workflow_tags 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 @access_roles.nil? + return false if @categories.nil? + return false if @created_by.nil? + return false if @created_timestamp.nil? + return false if @description.nil? + return false if @id.nil? + return false if @is_disruptive.nil? + return false if @modified_by.nil? + return false if @modified_timestamp.nil? + return false if @modifies_system.nil? + return false if @name.nil? + return false if @platform.nil? + return false if @revision.nil? + return false if @use_case.nil? + return false if @workflow_enabled.nil? + return false if @workflow_input_schema.nil? + return false if @workflow_output_schema.nil? + return false if @workflow_tags.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 && + access_roles == o.access_roles && + categories == o.categories && + content == o.content && + created_by == o.created_by && + created_timestamp == o.created_timestamp && + description == o.description && + id == o.id && + is_disruptive == o.is_disruptive && + modified_by == o.modified_by && + modified_timestamp == o.modified_timestamp && + modifies_system == o.modifies_system && + name == o.name && + platform == o.platform && + required_skus == o.required_skus && + revision == o.revision && + sha256 == o.sha256 && + size == o.size && + use_case == o.use_case && + workflow_enabled == o.workflow_enabled && + workflow_input_schema == o.workflow_input_schema && + workflow_output_schema == o.workflow_output_schema && + workflow_tags == o.workflow_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 + [access_roles, categories, content, created_by, created_timestamp, description, id, is_disruptive, modified_by, modified_timestamp, modifies_system, name, platform, required_skus, revision, sha256, size, use_case, workflow_enabled, workflow_input_schema, workflow_output_schema, workflow_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/empowerapi_msa_falcon_script_response.rb b/lib/crimson-falcon/models/empowerapi_msa_falcon_script_response.rb new file mode 100644 index 00000000..0b1d0040 --- /dev/null +++ b/lib/crimson-falcon/models/empowerapi_msa_falcon_script_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 EmpowerapiMsaFalconScriptResponse + 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' => :'MsaspecMetaInfo', + :'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::EmpowerapiMsaFalconScriptResponse` 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::EmpowerapiMsaFalconScriptResponse`. 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/empowerapi_msa_id_list_response.rb b/lib/crimson-falcon/models/empowerapi_msa_id_list_response.rb new file mode 100644 index 00000000..1dbc48a3 --- /dev/null +++ b/lib/crimson-falcon/models/empowerapi_msa_id_list_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 EmpowerapiMsaIDListResponse + 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' => :'MsaspecMetaInfo', + :'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::EmpowerapiMsaIDListResponse` 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::EmpowerapiMsaIDListResponse`. 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/entities_ods_scan_response_v2.rb b/lib/crimson-falcon/models/entities_ods_scan_response_v2.rb new file mode 100644 index 00000000..4c49aaa5 --- /dev/null +++ b/lib/crimson-falcon/models/entities_ods_scan_response_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 EntitiesODSScanResponseV2 + 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' => :'MsaspecMetaInfo', + :'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::EntitiesODSScanResponseV2` 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::EntitiesODSScanResponseV2`. 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/executions_activity_execution_result.rb b/lib/crimson-falcon/models/executions_activity_execution_result.rb new file mode 100644 index 00000000..fa64e429 --- /dev/null +++ b/lib/crimson-falcon/models/executions_activity_execution_result.rb @@ -0,0 +1,377 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ExecutionsActivityExecutionResult + # Timestamp of when the execution completed. Only present when status is an end state. + attr_accessor :end_timestamp + + # When a node execution is in an error status this field is present and provides an error code that can be used to determine details why the failure occurred. + attr_accessor :error_code + + # When a node execution is in an error status this field is present and provides a user friendly error message. + attr_accessor :error_message + + # The unique identifier of the selected activity that is being configured. + attr_accessor :id + + # Whether this node's result is mocked + attr_accessor :mocked + + # Optional user provided name for the activity, if not specified a default of the name for that activity will be used. + attr_accessor :name + + # Unique id of the node as specified in the definition. + attr_accessor :node_id + + # A set of objects which provide references to other URLs related to the activity execution. + attr_accessor :references + + # Result fields of activity execution. + attr_accessor :result + + # Timestamp of when the execution first started. + attr_accessor :start_timestamp + + # Current status of execution for the activity. + attr_accessor :status + + # Root element of the execution route of the activity + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'end_timestamp' => :'end_timestamp', + :'error_code' => :'error_code', + :'error_message' => :'error_message', + :'id' => :'id', + :'mocked' => :'mocked', + :'name' => :'name', + :'node_id' => :'node_id', + :'references' => :'references', + :'result' => :'result', + :'start_timestamp' => :'start_timestamp', + :'status' => :'status', + :'type' => :'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 + { + :'end_timestamp' => :'Time', + :'error_code' => :'Integer', + :'error_message' => :'String', + :'id' => :'String', + :'mocked' => :'Boolean', + :'name' => :'String', + :'node_id' => :'String', + :'references' => :'Array', + :'result' => :'Object', + :'start_timestamp' => :'Time', + :'status' => :'String', + :'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::ExecutionsActivityExecutionResult` 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::ExecutionsActivityExecutionResult`. 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?(:'end_timestamp') + self.end_timestamp = attributes[:'end_timestamp'] + end + + if attributes.key?(:'error_code') + self.error_code = attributes[:'error_code'] + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'mocked') + self.mocked = attributes[:'mocked'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'references') + if (value = attributes[:'references']).is_a?(Array) + self.references = value + end + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + 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?(:'type') + self.type = attributes[:'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 + 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 @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id cannot be nil.') + end + + if @start_timestamp.nil? + invalid_properties.push('invalid value for "start_timestamp", start_timestamp cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type 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? + return false if @node_id.nil? + return false if @start_timestamp.nil? + return false if @status.nil? + return false if @type.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 && + end_timestamp == o.end_timestamp && + error_code == o.error_code && + error_message == o.error_message && + id == o.id && + mocked == o.mocked && + name == o.name && + node_id == o.node_id && + references == o.references && + result == o.result && + start_timestamp == o.start_timestamp && + status == o.status && + type == o.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 + [end_timestamp, error_code, error_message, id, mocked, name, node_id, references, result, start_timestamp, status, 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/executions_ancestor_execution.rb b/lib/crimson-falcon/models/executions_ancestor_execution.rb new file mode 100644 index 00000000..c04d590e --- /dev/null +++ b/lib/crimson-falcon/models/executions_ancestor_execution.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 ExecutionsAncestorExecution + # Display name of the input field to the parent execution loop node. + attr_accessor :field + + # Unique id of the ancestor execution id. + attr_accessor :id + + # Index number indicating what iteration of the parent execution this given execution is associated with. + attr_accessor :iteration + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'id' => :'id', + :'iteration' => :'iteration' + } + 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', + :'id' => :'String', + :'iteration' => :'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::ExecutionsAncestorExecution` 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::ExecutionsAncestorExecution`. 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?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'iteration') + self.iteration = attributes[:'iteration'] + 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 @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @iteration.nil? + invalid_properties.push('invalid value for "iteration", iteration 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 @id.nil? + return false if @iteration.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 && + id == o.id && + iteration == o.iteration + 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, id, iteration].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/executions_child_execution_result.rb b/lib/crimson-falcon/models/executions_child_execution_result.rb new file mode 100644 index 00000000..c8a99c46 --- /dev/null +++ b/lib/crimson-falcon/models/executions_child_execution_result.rb @@ -0,0 +1,295 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ExecutionsChildExecutionResult + # Timestamp of when the execution completed. Only present when status is an end state. + attr_accessor :end_timestamp + + # Unique id of the child execution id. + attr_accessor :id + + # Index number indicating what iteration of the parent execution this given execution is associated with. + attr_accessor :iteration + + # Timestamp of when the execution first started. + attr_accessor :start_timestamp + + # Current status of execution. + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'end_timestamp' => :'end_timestamp', + :'id' => :'id', + :'iteration' => :'iteration', + :'start_timestamp' => :'start_timestamp', + :'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 + { + :'end_timestamp' => :'Time', + :'id' => :'String', + :'iteration' => :'Integer', + :'start_timestamp' => :'Time', + :'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::ExecutionsChildExecutionResult` 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::ExecutionsChildExecutionResult`. 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?(:'end_timestamp') + self.end_timestamp = attributes[:'end_timestamp'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'iteration') + self.iteration = attributes[:'iteration'] + end + + if attributes.key?(:'start_timestamp') + self.start_timestamp = attributes[:'start_timestamp'] + 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 @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @iteration.nil? + invalid_properties.push('invalid value for "iteration", iteration cannot be nil.') + end + + if @start_timestamp.nil? + invalid_properties.push('invalid value for "start_timestamp", start_timestamp 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 @iteration.nil? + return false if @start_timestamp.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 && + end_timestamp == o.end_timestamp && + id == o.id && + iteration == o.iteration && + start_timestamp == o.start_timestamp && + 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 + [end_timestamp, id, iteration, start_timestamp, 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/executions_execution_result.rb b/lib/crimson-falcon/models/executions_execution_result.rb new file mode 100644 index 00000000..2d9bc53a --- /dev/null +++ b/lib/crimson-falcon/models/executions_execution_result.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 ExecutionsExecutionResult + # Details for the result of each activity node. + attr_accessor :activities + + # Populated when the execution origin is from a sub model. + attr_accessor :ancestor_executions + + # Unique id of the workflow the execution is associated with. + attr_accessor :definition_id + + # Version of the definition that executed. + attr_accessor :definition_version + + # Timestamp of when the execution completed. Only present when status is an end state. + attr_accessor :end_timestamp + + # Unique id generated for the execution. + attr_accessor :execution_id + + # Details for the results of each loop in the workflow definition. + attr_accessor :loops + + # A boolean value indicating whether the failed workflow execution is retryable + attr_accessor :retryable + + # Timestamp of when the execution first started. + attr_accessor :start_timestamp + + # Overall status for the execution. + attr_accessor :status + + attr_accessor :trigger + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'activities' => :'activities', + :'ancestor_executions' => :'ancestor_executions', + :'definition_id' => :'definition_id', + :'definition_version' => :'definition_version', + :'end_timestamp' => :'end_timestamp', + :'execution_id' => :'execution_id', + :'loops' => :'loops', + :'retryable' => :'retryable', + :'start_timestamp' => :'start_timestamp', + :'status' => :'status', + :'trigger' => :'trigger' + } + 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 + { + :'activities' => :'Array', + :'ancestor_executions' => :'Array', + :'definition_id' => :'String', + :'definition_version' => :'Integer', + :'end_timestamp' => :'Time', + :'execution_id' => :'String', + :'loops' => :'Array', + :'retryable' => :'Boolean', + :'start_timestamp' => :'Time', + :'status' => :'String', + :'trigger' => :'ExecutionsTriggerResult' + } + 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::ExecutionsExecutionResult` 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::ExecutionsExecutionResult`. 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?(:'activities') + if (value = attributes[:'activities']).is_a?(Array) + self.activities = value + end + end + + if attributes.key?(:'ancestor_executions') + if (value = attributes[:'ancestor_executions']).is_a?(Array) + self.ancestor_executions = value + end + end + + if attributes.key?(:'definition_id') + self.definition_id = attributes[:'definition_id'] + end + + if attributes.key?(:'definition_version') + self.definition_version = attributes[:'definition_version'] + end + + if attributes.key?(:'end_timestamp') + self.end_timestamp = attributes[:'end_timestamp'] + end + + if attributes.key?(:'execution_id') + self.execution_id = attributes[:'execution_id'] + end + + if attributes.key?(:'loops') + if (value = attributes[:'loops']).is_a?(Array) + self.loops = value + end + end + + if attributes.key?(:'retryable') + self.retryable = attributes[:'retryable'] + 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?(:'trigger') + self.trigger = attributes[:'trigger'] + 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 @activities.nil? + invalid_properties.push('invalid value for "activities", activities cannot be nil.') + end + + if @ancestor_executions.nil? + invalid_properties.push('invalid value for "ancestor_executions", ancestor_executions cannot be nil.') + end + + if @definition_id.nil? + invalid_properties.push('invalid value for "definition_id", definition_id cannot be nil.') + end + + if @definition_version.nil? + invalid_properties.push('invalid value for "definition_version", definition_version cannot be nil.') + end + + if @execution_id.nil? + invalid_properties.push('invalid value for "execution_id", execution_id cannot be nil.') + end + + if @loops.nil? + invalid_properties.push('invalid value for "loops", loops cannot be nil.') + end + + if @retryable.nil? + invalid_properties.push('invalid value for "retryable", retryable cannot be nil.') + end + + if @start_timestamp.nil? + invalid_properties.push('invalid value for "start_timestamp", start_timestamp cannot be nil.') + end + + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + if @trigger.nil? + invalid_properties.push('invalid value for "trigger", trigger 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 @activities.nil? + return false if @ancestor_executions.nil? + return false if @definition_id.nil? + return false if @definition_version.nil? + return false if @execution_id.nil? + return false if @loops.nil? + return false if @retryable.nil? + return false if @start_timestamp.nil? + return false if @status.nil? + return false if @trigger.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 && + activities == o.activities && + ancestor_executions == o.ancestor_executions && + definition_id == o.definition_id && + definition_version == o.definition_version && + end_timestamp == o.end_timestamp && + execution_id == o.execution_id && + loops == o.loops && + retryable == o.retryable && + start_timestamp == o.start_timestamp && + status == o.status && + trigger == o.trigger + 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 + [activities, ancestor_executions, definition_id, definition_version, end_timestamp, execution_id, loops, retryable, start_timestamp, status, trigger].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/executions_iterations.rb b/lib/crimson-falcon/models/executions_iterations.rb new file mode 100644 index 00000000..b623d800 --- /dev/null +++ b/lib/crimson-falcon/models/executions_iterations.rb @@ -0,0 +1,315 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ExecutionsIterations + # count of executions with completed status. + attr_accessor :completed + + # count of executions with failed status. + attr_accessor :failed + + # count of executions with in progress status + attr_accessor :in_progress + + # true when sub-model has non recoverable status + attr_accessor :is_nonrecoverable + + # count of executions that are pending + attr_accessor :pending + + # count of total executions. + attr_accessor :total + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'completed' => :'completed', + :'failed' => :'failed', + :'in_progress' => :'in_progress', + :'is_nonrecoverable' => :'is_nonrecoverable', + :'pending' => :'pending', + :'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 + { + :'completed' => :'Integer', + :'failed' => :'Integer', + :'in_progress' => :'Integer', + :'is_nonrecoverable' => :'Boolean', + :'pending' => :'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::ExecutionsIterations` 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::ExecutionsIterations`. 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?(:'completed') + self.completed = attributes[:'completed'] + end + + if attributes.key?(:'failed') + self.failed = attributes[:'failed'] + end + + if attributes.key?(:'in_progress') + self.in_progress = attributes[:'in_progress'] + end + + if attributes.key?(:'is_nonrecoverable') + self.is_nonrecoverable = attributes[:'is_nonrecoverable'] + end + + if attributes.key?(:'pending') + self.pending = attributes[:'pending'] + 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 @completed.nil? + invalid_properties.push('invalid value for "completed", completed cannot be nil.') + end + + if @failed.nil? + invalid_properties.push('invalid value for "failed", failed cannot be nil.') + end + + if @in_progress.nil? + invalid_properties.push('invalid value for "in_progress", in_progress cannot be nil.') + end + + if @is_nonrecoverable.nil? + invalid_properties.push('invalid value for "is_nonrecoverable", is_nonrecoverable cannot be nil.') + end + + if @pending.nil? + invalid_properties.push('invalid value for "pending", pending 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 @completed.nil? + return false if @failed.nil? + return false if @in_progress.nil? + return false if @is_nonrecoverable.nil? + return false if @pending.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 && + completed == o.completed && + failed == o.failed && + in_progress == o.in_progress && + is_nonrecoverable == o.is_nonrecoverable && + pending == o.pending && + 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 + [completed, failed, in_progress, is_nonrecoverable, pending, 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/executions_loop_result.rb b/lib/crimson-falcon/models/executions_loop_result.rb new file mode 100644 index 00000000..50188e3f --- /dev/null +++ b/lib/crimson-falcon/models/executions_loop_result.rb @@ -0,0 +1,356 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ExecutionsLoopResult + # Details of all child executions associated with the loop. A child execution is generated for each iteration of the input data. + attr_accessor :child_executions + + # Timestamp of when the execution completed. Only present when status is an end state. + attr_accessor :end_timestamp + + # When a node execution is in an error status this field is present and provides an error code that can be used to determine details why the failure occurred. + attr_accessor :error_code + + # When a node execution is in an error status this field is present and provides a user friendly error message. + attr_accessor :error_message + + # Display name of the input field that the sub model is iterating over. + attr_accessor :input_field + + attr_accessor :iterations + + # Whether this node's result is mocked + attr_accessor :mocked + + # Unique id of the node as specified in the definition. + attr_accessor :node_id + + # Timestamp of when the execution first started. + attr_accessor :start_timestamp + + # Current status of execution for the activity. + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'child_executions' => :'child_executions', + :'end_timestamp' => :'end_timestamp', + :'error_code' => :'error_code', + :'error_message' => :'error_message', + :'input_field' => :'input_field', + :'iterations' => :'iterations', + :'mocked' => :'mocked', + :'node_id' => :'node_id', + :'start_timestamp' => :'start_timestamp', + :'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 + { + :'child_executions' => :'Array', + :'end_timestamp' => :'Time', + :'error_code' => :'Integer', + :'error_message' => :'String', + :'input_field' => :'String', + :'iterations' => :'ExecutionsIterations', + :'mocked' => :'Boolean', + :'node_id' => :'String', + :'start_timestamp' => :'Time', + :'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::ExecutionsLoopResult` 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::ExecutionsLoopResult`. 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?(:'child_executions') + if (value = attributes[:'child_executions']).is_a?(Array) + self.child_executions = value + end + end + + if attributes.key?(:'end_timestamp') + self.end_timestamp = attributes[:'end_timestamp'] + end + + if attributes.key?(:'error_code') + self.error_code = attributes[:'error_code'] + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'input_field') + self.input_field = attributes[:'input_field'] + end + + if attributes.key?(:'iterations') + self.iterations = attributes[:'iterations'] + end + + if attributes.key?(:'mocked') + self.mocked = attributes[:'mocked'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'start_timestamp') + self.start_timestamp = attributes[:'start_timestamp'] + 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 @child_executions.nil? + invalid_properties.push('invalid value for "child_executions", child_executions cannot be nil.') + end + + if @input_field.nil? + invalid_properties.push('invalid value for "input_field", input_field cannot be nil.') + end + + if @iterations.nil? + invalid_properties.push('invalid value for "iterations", iterations cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id cannot be nil.') + end + + if @start_timestamp.nil? + invalid_properties.push('invalid value for "start_timestamp", start_timestamp 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 @child_executions.nil? + return false if @input_field.nil? + return false if @iterations.nil? + return false if @node_id.nil? + return false if @start_timestamp.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 && + child_executions == o.child_executions && + end_timestamp == o.end_timestamp && + error_code == o.error_code && + error_message == o.error_message && + input_field == o.input_field && + iterations == o.iterations && + mocked == o.mocked && + node_id == o.node_id && + start_timestamp == o.start_timestamp && + 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 + [child_executions, end_timestamp, error_code, error_message, input_field, iterations, mocked, node_id, start_timestamp, 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/executions_reference_link.rb b/lib/crimson-falcon/models/executions_reference_link.rb new file mode 100644 index 00000000..9db4d7eb --- /dev/null +++ b/lib/crimson-falcon/models/executions_reference_link.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 ExecutionsReferenceLink + # Descriptive name of the reference + attr_accessor :display + + # URL path to the reference + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'display' => :'display', + :'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 + { + :'display' => :'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::ExecutionsReferenceLink` 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::ExecutionsReferenceLink`. 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?(:'display') + self.display = attributes[:'display'] + 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 @display.nil? + invalid_properties.push('invalid value for "display", display 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 @display.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 && + display == o.display && + 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 + [display, 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/executions_trigger_result.rb b/lib/crimson-falcon/models/executions_trigger_result.rb new file mode 100644 index 00000000..c9b7f52c --- /dev/null +++ b/lib/crimson-falcon/models/executions_trigger_result.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 ExecutionsTriggerResult + # Unique identifier for the selected trigger as provided by the triggers API + attr_accessor :id + + # Whether this node's result is mocked + attr_accessor :mocked + + # Display name of the trigger + attr_accessor :name + + # Opaque blob for result of trigger. Structured according to the trigger's JSON schema'. + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'mocked' => :'mocked', + :'name' => :'name', + :'result' => :'result' + } + 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', + :'mocked' => :'Boolean', + :'name' => :'String', + :'result' => :'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::ExecutionsTriggerResult` 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::ExecutionsTriggerResult`. 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?(:'mocked') + self.mocked = attributes[:'mocked'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + 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 && + id == o.id && + mocked == o.mocked && + name == o.name && + result == o.result + 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, mocked, name, result].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/falconx_sandbox_parameters_v1.rb b/lib/crimson-falcon/models/falconx_sandbox_parameters_v1.rb index 6aba794f..b3bc3694 100644 --- a/lib/crimson-falcon/models/falconx_sandbox_parameters_v1.rb +++ b/lib/crimson-falcon/models/falconx_sandbox_parameters_v1.rb @@ -32,8 +32,6 @@ module Falcon class FalconxSandboxParametersV1 - attr_accessor :interactivity - attr_accessor :action_script attr_accessor :command_line @@ -44,6 +42,8 @@ class FalconxSandboxParametersV1 attr_accessor :environment_id + attr_accessor :interactivity + attr_accessor :network_settings attr_accessor :sha256 @@ -59,12 +59,12 @@ class FalconxSandboxParametersV1 # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'interactivity' => :'Interactivity', :'action_script' => :'action_script', :'command_line' => :'command_line', :'document_password' => :'document_password', :'enable_tor' => :'enable_tor', :'environment_id' => :'environment_id', + :'interactivity' => :'interactivity', :'network_settings' => :'network_settings', :'sha256' => :'sha256', :'submit_name' => :'submit_name', @@ -82,12 +82,12 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'interactivity' => :'Boolean', :'action_script' => :'String', :'command_line' => :'String', :'document_password' => :'String', :'enable_tor' => :'Boolean', :'environment_id' => :'Integer', + :'interactivity' => :'Boolean', :'network_settings' => :'String', :'sha256' => :'String', :'submit_name' => :'String', @@ -118,10 +118,6 @@ def initialize(attributes = {}) h[k.to_sym] = v } - if attributes.key?(:'interactivity') - self.interactivity = attributes[:'interactivity'] - end - if attributes.key?(:'action_script') self.action_script = attributes[:'action_script'] end @@ -142,6 +138,10 @@ def initialize(attributes = {}) self.environment_id = attributes[:'environment_id'] end + if attributes.key?(:'interactivity') + self.interactivity = attributes[:'interactivity'] + end + if attributes.key?(:'network_settings') self.network_settings = attributes[:'network_settings'] end @@ -171,17 +171,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @interactivity.nil? - invalid_properties.push('invalid value for "interactivity", interactivity 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 @interactivity.nil? true end @@ -190,12 +185,12 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - interactivity == o.interactivity && action_script == o.action_script && command_line == o.command_line && document_password == o.document_password && enable_tor == o.enable_tor && environment_id == o.environment_id && + interactivity == o.interactivity && network_settings == o.network_settings && sha256 == o.sha256 && submit_name == o.submit_name && @@ -213,7 +208,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [interactivity, action_script, command_line, document_password, enable_tor, environment_id, network_settings, sha256, submit_name, system_date, system_time, url].hash + [action_script, command_line, document_password, enable_tor, environment_id, interactivity, network_settings, sha256, submit_name, system_date, system_time, url].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/falconx_submission_v1.rb b/lib/crimson-falcon/models/falconx_submission_v1.rb index 7e8d8dfa..31936662 100644 --- a/lib/crimson-falcon/models/falconx_submission_v1.rb +++ b/lib/crimson-falcon/models/falconx_submission_v1.rb @@ -36,10 +36,18 @@ class FalconxSubmissionV1 attr_accessor :created_timestamp + attr_accessor :error_message + + attr_accessor :error_origin + + attr_accessor :error_type + attr_accessor :id attr_accessor :index_timestamp + attr_accessor :interactive_phase + attr_accessor :origin attr_accessor :sandbox @@ -61,8 +69,12 @@ def self.attribute_map { :'cid' => :'cid', :'created_timestamp' => :'created_timestamp', + :'error_message' => :'error_message', + :'error_origin' => :'error_origin', + :'error_type' => :'error_type', :'id' => :'id', :'index_timestamp' => :'index_timestamp', + :'interactive_phase' => :'interactive_phase', :'origin' => :'origin', :'sandbox' => :'sandbox', :'send_email_notification' => :'send_email_notification', @@ -84,8 +96,12 @@ def self.openapi_types { :'cid' => :'String', :'created_timestamp' => :'String', + :'error_message' => :'String', + :'error_origin' => :'String', + :'error_type' => :'String', :'id' => :'String', :'index_timestamp' => :'String', + :'interactive_phase' => :'String', :'origin' => :'String', :'sandbox' => :'Array', :'send_email_notification' => :'Boolean', @@ -126,6 +142,18 @@ def initialize(attributes = {}) self.created_timestamp = attributes[:'created_timestamp'] end + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'error_origin') + self.error_origin = attributes[:'error_origin'] + end + + if attributes.key?(:'error_type') + self.error_type = attributes[:'error_type'] + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -134,6 +162,10 @@ def initialize(attributes = {}) self.index_timestamp = attributes[:'index_timestamp'] end + if attributes.key?(:'interactive_phase') + self.interactive_phase = attributes[:'interactive_phase'] + end + if attributes.key?(:'origin') self.origin = attributes[:'origin'] end @@ -191,8 +223,12 @@ def ==(o) self.class == o.class && cid == o.cid && created_timestamp == o.created_timestamp && + error_message == o.error_message && + error_origin == o.error_origin && + error_type == o.error_type && id == o.id && index_timestamp == o.index_timestamp && + interactive_phase == o.interactive_phase && origin == o.origin && sandbox == o.sandbox && send_email_notification == o.send_email_notification && @@ -212,7 +248,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [cid, created_timestamp, id, index_timestamp, origin, sandbox, send_email_notification, state, user_id, user_name, user_tags, user_uuid].hash + [cid, created_timestamp, error_message, error_origin, error_type, id, index_timestamp, interactive_phase, origin, sandbox, send_email_notification, state, user_id, user_name, user_tags, user_uuid].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/flows.rb b/lib/crimson-falcon/models/flows.rb new file mode 100644 index 00000000..a5063a69 --- /dev/null +++ b/lib/crimson-falcon/models/flows.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 Flows + # Reference to the ID of the sequence flow node which acts as the default path. + attr_accessor :default + + # References to the IDs of the sequence flow nodes inbound to the gateway. + attr_accessor :incoming + + # References to the IDs of the sequence flow nodes outbound from the gateway. + attr_accessor :outgoing + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'default' => :'default', + :'incoming' => :'incoming', + :'outgoing' => :'outgoing' + } + 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' => :'String', + :'incoming' => :'Array', + :'outgoing' => :'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::Flows` 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::Flows`. 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') + self.default = attributes[:'default'] + end + + if attributes.key?(:'incoming') + if (value = attributes[:'incoming']).is_a?(Array) + self.incoming = value + end + end + + if attributes.key?(:'outgoing') + if (value = attributes[:'outgoing']).is_a?(Array) + self.outgoing = 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 @incoming.nil? + invalid_properties.push('invalid value for "incoming", incoming cannot be nil.') + end + + if @outgoing.nil? + invalid_properties.push('invalid value for "outgoing", outgoing 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 @incoming.nil? + return false if @outgoing.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 == o.default && + incoming == o.incoming && + outgoing == o.outgoing + 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, incoming, outgoing].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/fwmgr_msa_aggregation_result.rb b/lib/crimson-falcon/models/fwmgr_msa_aggregation_result.rb index 50f2f553..7e40b4f7 100644 --- a/lib/crimson-falcon/models/fwmgr_msa_aggregation_result.rb +++ b/lib/crimson-falcon/models/fwmgr_msa_aggregation_result.rb @@ -34,6 +34,8 @@ module Falcon class FwmgrMsaAggregationResult attr_accessor :buckets + attr_accessor :doc_count_error_upper_bound + attr_accessor :name attr_accessor :sum_other_doc_count @@ -42,6 +44,7 @@ class FwmgrMsaAggregationResult def self.attribute_map { :'buckets' => :'buckets', + :'doc_count_error_upper_bound' => :'doc_count_error_upper_bound', :'name' => :'name', :'sum_other_doc_count' => :'sum_other_doc_count' } @@ -56,6 +59,7 @@ def self.acceptable_attributes def self.openapi_types { :'buckets' => :'Array', + :'doc_count_error_upper_bound' => :'Integer', :'name' => :'String', :'sum_other_doc_count' => :'Integer' } @@ -88,6 +92,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'doc_count_error_upper_bound') + self.doc_count_error_upper_bound = attributes[:'doc_count_error_upper_bound'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -126,6 +134,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && buckets == o.buckets && + doc_count_error_upper_bound == o.doc_count_error_upper_bound && name == o.name && sum_other_doc_count == o.sum_other_doc_count end @@ -139,7 +148,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [buckets, name, sum_other_doc_count].hash + [buckets, doc_count_error_upper_bound, name, sum_other_doc_count].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/graph_condition.rb b/lib/crimson-falcon/models/graph_condition.rb new file mode 100644 index 00000000..69af0386 --- /dev/null +++ b/lib/crimson-falcon/models/graph_condition.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 GraphCondition + # User friendly description of the FQL expression. This would be supplied by the UI/caller and is not set by the API. + 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 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'display' => :'display', + :'evaluated' => :'evaluated', + :'expression' => :'expression' + } + 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 + { + :'display' => :'Array', + :'evaluated' => :'Boolean', + :'expression' => :'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::GraphCondition` 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::GraphCondition`. 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?(:'display') + if (value = attributes[:'display']).is_a?(Array) + self.display = value + end + end + + if attributes.key?(:'evaluated') + self.evaluated = attributes[:'evaluated'] + end + + if attributes.key?(:'expression') + self.expression = attributes[:'expression'] + 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 && + display == o.display && + evaluated == o.evaluated && + expression == o.expression + 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 + [display, evaluated, expression].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_configured_activity.rb b/lib/crimson-falcon/models/graph_configured_activity.rb new file mode 100644 index 00000000..204e8d10 --- /dev/null +++ b/lib/crimson-falcon/models/graph_configured_activity.rb @@ -0,0 +1,308 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 GraphConfiguredActivity + attr_accessor :flows + + # The unique identifier of the selected activity that is being configured. + attr_accessor :id + + # Maximum seconds to wait for an async process to finish. Overrides default async_max_seconds on Activity seed. + attr_accessor :max_seconds + + # Optional user provided name for the activity, if not specified a default of the name for that Activity will be used. + attr_accessor :name + + attr_accessor :node_id + + # Dynamic payload providing values needed to configure the activity for execution. The structure of this data is dictated by the JSON Schema defined for the selected Activity. + attr_accessor :properties + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'flows' => :'flows', + :'id' => :'id', + :'max_seconds' => :'max_seconds', + :'name' => :'name', + :'node_id' => :'nodeID', + :'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 + { + :'flows' => :'Flows', + :'id' => :'String', + :'max_seconds' => :'String', + :'name' => :'String', + :'node_id' => :'String', + :'properties' => :'Object' + } + 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::GraphConfiguredActivity` 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::GraphConfiguredActivity`. 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?(:'flows') + self.flows = attributes[:'flows'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'max_seconds') + self.max_seconds = attributes[:'max_seconds'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + 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 @flows.nil? + invalid_properties.push('invalid value for "flows", flows 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 @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id 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 @flows.nil? + return false if @id.nil? + return false if @name.nil? + return false if @node_id.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 && + flows == o.flows && + id == o.id && + max_seconds == o.max_seconds && + name == o.name && + node_id == o.node_id && + 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 + [flows, id, max_seconds, name, node_id, 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/graph_configured_trigger.rb b/lib/crimson-falcon/models/graph_configured_trigger.rb new file mode 100644 index 00000000..0fb0a856 --- /dev/null +++ b/lib/crimson-falcon/models/graph_configured_trigger.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 GraphConfiguredTrigger + # Unique identifier for the selected trigger as provided by the triggers API + attr_accessor :id + + # Display name of the trigger + attr_accessor :name + + attr_accessor :node_id + + # Reference to the ID of the flow node outbound from the trigger. + attr_accessor :outgoing_flow + + attr_accessor :parameters + + attr_accessor :timer_event_definition + + # Denotes the type of trigger, signal based, scheduled, on demand, etc + attr_accessor :trigger_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'node_id' => :'nodeID', + :'outgoing_flow' => :'outgoing_flow', + :'parameters' => :'parameters', + :'timer_event_definition' => :'timer_event_definition', + :'trigger_type' => :'trigger_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 + { + :'id' => :'String', + :'name' => :'String', + :'node_id' => :'String', + :'outgoing_flow' => :'String', + :'parameters' => :'JsonschemaSchema', + :'timer_event_definition' => :'GraphTimerEventDefinition', + :'trigger_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::GraphConfiguredTrigger` 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::GraphConfiguredTrigger`. 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 + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'outgoing_flow') + self.outgoing_flow = attributes[:'outgoing_flow'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'timer_event_definition') + self.timer_event_definition = attributes[:'timer_event_definition'] + end + + if attributes.key?(:'trigger_type') + self.trigger_type = attributes[:'trigger_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 + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id cannot be nil.') + end + + if @outgoing_flow.nil? + invalid_properties.push('invalid value for "outgoing_flow", outgoing_flow 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 @node_id.nil? + return false if @outgoing_flow.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 && + name == o.name && + node_id == o.node_id && + outgoing_flow == o.outgoing_flow && + parameters == o.parameters && + timer_event_definition == o.timer_event_definition && + trigger_type == o.trigger_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 + [id, name, node_id, outgoing_flow, parameters, timer_event_definition, trigger_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/graph_definition_model.rb b/lib/crimson-falcon/models/graph_definition_model.rb new file mode 100644 index 00000000..9f3d2268 --- /dev/null +++ b/lib/crimson-falcon/models/graph_definition_model.rb @@ -0,0 +1,315 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 GraphDefinitionModel + # Details of all the activities within the model. Each activity has a unique node ID as the key, that is set by the caller. + attr_accessor :activities + + attr_accessor :_end + + # Details all the sequence flows within the model. Each flow has a unique node ID as the key, that is set by the caller. + attr_accessor :flows + + # Details all the gateways within the model. Each gateway has a unique node ID as the key, that is set by the caller. + attr_accessor :gateways + + attr_accessor :node_registry + + # Details of all sub-models within the model. Each sub-model has a unique node ID as the key set by the caller. + attr_accessor :sub_models + + attr_accessor :trigger + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'activities' => :'activities', + :'_end' => :'end', + :'flows' => :'flows', + :'gateways' => :'gateways', + :'node_registry' => :'nodeRegistry', + :'sub_models' => :'sub_models', + :'trigger' => :'trigger' + } + 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 + { + :'activities' => :'Hash', + :'_end' => :'GraphEnd', + :'flows' => :'Hash', + :'gateways' => :'Hash', + :'node_registry' => :'Object', + :'sub_models' => :'Hash', + :'trigger' => :'GraphConfiguredTrigger' + } + 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::GraphDefinitionModel` 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::GraphDefinitionModel`. 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?(:'activities') + if (value = attributes[:'activities']).is_a?(Hash) + self.activities = value + end + end + + if attributes.key?(:'_end') + self._end = attributes[:'_end'] + end + + if attributes.key?(:'flows') + if (value = attributes[:'flows']).is_a?(Hash) + self.flows = value + end + end + + if attributes.key?(:'gateways') + if (value = attributes[:'gateways']).is_a?(Hash) + self.gateways = value + end + end + + if attributes.key?(:'node_registry') + self.node_registry = attributes[:'node_registry'] + end + + if attributes.key?(:'sub_models') + if (value = attributes[:'sub_models']).is_a?(Hash) + self.sub_models = value + end + end + + if attributes.key?(:'trigger') + self.trigger = attributes[:'trigger'] + 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 @flows.nil? + invalid_properties.push('invalid value for "flows", flows cannot be nil.') + end + + if @node_registry.nil? + invalid_properties.push('invalid value for "node_registry", node_registry cannot be nil.') + end + + if @trigger.nil? + invalid_properties.push('invalid value for "trigger", trigger 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 @flows.nil? + return false if @node_registry.nil? + return false if @trigger.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 && + activities == o.activities && + _end == o._end && + flows == o.flows && + gateways == o.gateways && + node_registry == o.node_registry && + sub_models == o.sub_models && + trigger == o.trigger + 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 + [activities, _end, flows, gateways, node_registry, sub_models, trigger].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_scan_results.rb b/lib/crimson-falcon/models/graph_end.rb similarity index 85% rename from lib/crimson-falcon/models/models_scan_results.rb rename to lib/crimson-falcon/models/graph_end.rb index b5fbb467..19c7ec5f 100644 --- a/lib/crimson-falcon/models/models_scan_results.rb +++ b/lib/crimson-falcon/models/graph_end.rb @@ -31,16 +31,17 @@ require 'time' module Falcon - class ModelsScanResults - attr_accessor :applications + class GraphEnd + # Reference to the ID of the flow nodes inbound to the end node. + attr_accessor :incoming_flows - attr_accessor :os_version + attr_accessor :node_id # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'applications' => :'applications', - :'os_version' => :'os_version' + :'incoming_flows' => :'incoming_flows', + :'node_id' => :'nodeID' } end @@ -52,8 +53,8 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'applications' => :'Array', - :'os_version' => :'String' + :'incoming_flows' => :'Array', + :'node_id' => :'String' } end @@ -67,25 +68,25 @@ 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::ModelsScanResults` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::GraphEnd` 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::ModelsScanResults`. 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::GraphEnd`. 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?(:'applications') - if (value = attributes[:'applications']).is_a?(Array) - self.applications = value + if attributes.key?(:'incoming_flows') + if (value = attributes[:'incoming_flows']).is_a?(Array) + self.incoming_flows = value end end - if attributes.key?(:'os_version') - self.os_version = attributes[:'os_version'] + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] end end @@ -93,12 +94,12 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @applications.nil? - invalid_properties.push('invalid value for "applications", applications cannot be nil.') + if @incoming_flows.nil? + invalid_properties.push('invalid value for "incoming_flows", incoming_flows cannot be nil.') end - if @os_version.nil? - invalid_properties.push('invalid value for "os_version", os_version cannot be nil.') + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id cannot be nil.') end invalid_properties @@ -107,8 +108,8 @@ 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 @applications.nil? - return false if @os_version.nil? + return false if @incoming_flows.nil? + return false if @node_id.nil? true end @@ -117,8 +118,8 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - applications == o.applications && - os_version == o.os_version + incoming_flows == o.incoming_flows && + node_id == o.node_id end # @see the `==` method @@ -130,7 +131,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [applications, os_version].hash + [incoming_flows, node_id].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/graph_flow.rb b/lib/crimson-falcon/models/graph_flow.rb new file mode 100644 index 00000000..3fb6f5de --- /dev/null +++ b/lib/crimson-falcon/models/graph_flow.rb @@ -0,0 +1,274 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 GraphFlow + attr_accessor :condition + + # Reference to the ID of the node that is the source of the flow. + attr_accessor :source + + # Alias for the source of the flow. + attr_accessor :source_alias + + # Reference to the ID of the node that is the target of the flow. + attr_accessor :target + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'condition' => :'condition', + :'source' => :'source', + :'source_alias' => :'source_alias', + :'target' => :'target' + } + 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 + { + :'condition' => :'GraphCondition', + :'source' => :'String', + :'source_alias' => :'String', + :'target' => :'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::GraphFlow` 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::GraphFlow`. 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'source_alias') + self.source_alias = attributes[:'source_alias'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + 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.nil? + invalid_properties.push('invalid value for "source", source cannot be nil.') + end + + if @target.nil? + invalid_properties.push('invalid value for "target", target 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.nil? + return false if @target.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 && + condition == o.condition && + source == o.source && + source_alias == o.source_alias && + target == o.target + 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 + [condition, source, source_alias, target].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_gateway.rb b/lib/crimson-falcon/models/graph_gateway.rb new file mode 100644 index 00000000..af9e8168 --- /dev/null +++ b/lib/crimson-falcon/models/graph_gateway.rb @@ -0,0 +1,268 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 GraphGateway + attr_accessor :flows + + attr_accessor :node_id + + # The type of gateway being specified, allowed values are; exclusive, inclusive and parallel. + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'flows' => :'flows', + :'node_id' => :'nodeID', + :'type' => :'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 + { + :'flows' => :'Flows', + :'node_id' => :'String', + :'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::GraphGateway` 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::GraphGateway`. 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?(:'flows') + self.flows = attributes[:'flows'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'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 + if @flows.nil? + invalid_properties.push('invalid value for "flows", flows cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type 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 @flows.nil? + return false if @node_id.nil? + return false if @type.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 && + flows == o.flows && + node_id == o.node_id && + type == o.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 + [flows, node_id, 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/graph_multi.rb b/lib/crimson-falcon/models/graph_multi.rb new file mode 100644 index 00000000..6b30a5ae --- /dev/null +++ b/lib/crimson-falcon/models/graph_multi.rb @@ -0,0 +1,285 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 GraphMulti + # Name of the field that contains the array in input data + attr_accessor :array_field + + # Display name of the field that contains the array in input data + attr_accessor :array_field_display_name + + # If true will allow the workflow to continue execution even if some loop iterations fail or when there are no iterations to execute + attr_accessor :continue_on_partial_execution + + # Maximum number of iterations allowed in sub model + attr_accessor :max_iteration_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'array_field' => :'array_field', + :'array_field_display_name' => :'array_field_display_name', + :'continue_on_partial_execution' => :'continue_on_partial_execution', + :'max_iteration_count' => :'max_iteration_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 + { + :'array_field' => :'String', + :'array_field_display_name' => :'String', + :'continue_on_partial_execution' => :'Boolean', + :'max_iteration_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::GraphMulti` 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::GraphMulti`. 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?(:'array_field') + self.array_field = attributes[:'array_field'] + end + + if attributes.key?(:'array_field_display_name') + self.array_field_display_name = attributes[:'array_field_display_name'] + end + + if attributes.key?(:'continue_on_partial_execution') + self.continue_on_partial_execution = attributes[:'continue_on_partial_execution'] + end + + if attributes.key?(:'max_iteration_count') + self.max_iteration_count = attributes[:'max_iteration_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 + if @array_field.nil? + invalid_properties.push('invalid value for "array_field", array_field cannot be nil.') + end + + if @array_field_display_name.nil? + invalid_properties.push('invalid value for "array_field_display_name", array_field_display_name cannot be nil.') + end + + if @continue_on_partial_execution.nil? + invalid_properties.push('invalid value for "continue_on_partial_execution", continue_on_partial_execution cannot be nil.') + end + + if @max_iteration_count.nil? + invalid_properties.push('invalid value for "max_iteration_count", max_iteration_count 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 @array_field.nil? + return false if @array_field_display_name.nil? + return false if @continue_on_partial_execution.nil? + return false if @max_iteration_count.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 && + array_field == o.array_field && + array_field_display_name == o.array_field_display_name && + continue_on_partial_execution == o.continue_on_partial_execution && + max_iteration_count == o.max_iteration_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 + [array_field, array_field_display_name, continue_on_partial_execution, max_iteration_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/graph_sub_model.rb b/lib/crimson-falcon/models/graph_sub_model.rb new file mode 100644 index 00000000..764ce367 --- /dev/null +++ b/lib/crimson-falcon/models/graph_sub_model.rb @@ -0,0 +1,301 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 GraphSubModel + attr_accessor :flows + + attr_accessor :model + + attr_accessor :multi + + # Optional user provided name for the activity, if not specified a name based on the array field is used. + attr_accessor :name + + attr_accessor :node_id + + # Name of the output field that contains the result from sub-model. + attr_accessor :output_field + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'flows' => :'flows', + :'model' => :'model', + :'multi' => :'multi', + :'name' => :'name', + :'node_id' => :'nodeID', + :'output_field' => :'output_field' + } + 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 + { + :'flows' => :'Flows', + :'model' => :'GraphDefinitionModel', + :'multi' => :'GraphMulti', + :'name' => :'String', + :'node_id' => :'String', + :'output_field' => :'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::GraphSubModel` 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::GraphSubModel`. 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?(:'flows') + self.flows = attributes[:'flows'] + end + + if attributes.key?(:'model') + self.model = attributes[:'model'] + end + + if attributes.key?(:'multi') + self.multi = attributes[:'multi'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'output_field') + self.output_field = attributes[:'output_field'] + 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 @flows.nil? + invalid_properties.push('invalid value for "flows", flows cannot be nil.') + end + + if @model.nil? + invalid_properties.push('invalid value for "model", model cannot be nil.') + end + + if @multi.nil? + invalid_properties.push('invalid value for "multi", multi cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_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 @flows.nil? + return false if @model.nil? + return false if @multi.nil? + return false if @node_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 && + flows == o.flows && + model == o.model && + multi == o.multi && + name == o.name && + node_id == o.node_id && + output_field == o.output_field + 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 + [flows, model, multi, name, node_id, output_field].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_timer_event_definition.rb b/lib/crimson-falcon/models/graph_timer_event_definition.rb new file mode 100644 index 00000000..749278de --- /dev/null +++ b/lib/crimson-falcon/models/graph_timer_event_definition.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 GraphTimerEventDefinition + # End date in mm-dd-yyyy format + attr_accessor :end_date + + # Flag indicating if concurrent execution of scheduled workflow should be skipped or not + attr_accessor :skip_concurrent + + # Start date in mm-dd-yyyy format + attr_accessor :start_date + + # A time cycle element specifies repeating intervals, and can be specified using using cron expressions. + attr_accessor :time_cycle + + # Timezone label from IANA timezone database, for example, America/Los_Angeles + attr_accessor :tz + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'end_date' => :'end_date', + :'skip_concurrent' => :'skip_concurrent', + :'start_date' => :'start_date', + :'time_cycle' => :'time_cycle', + :'tz' => :'tz' + } + 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 + { + :'end_date' => :'String', + :'skip_concurrent' => :'Boolean', + :'start_date' => :'String', + :'time_cycle' => :'String', + :'tz' => :'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::GraphTimerEventDefinition` 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::GraphTimerEventDefinition`. 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?(:'end_date') + self.end_date = attributes[:'end_date'] + end + + if attributes.key?(:'skip_concurrent') + self.skip_concurrent = attributes[:'skip_concurrent'] + end + + if attributes.key?(:'start_date') + self.start_date = attributes[:'start_date'] + end + + if attributes.key?(:'time_cycle') + self.time_cycle = attributes[:'time_cycle'] + end + + if attributes.key?(:'tz') + self.tz = attributes[:'tz'] + 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 @skip_concurrent.nil? + invalid_properties.push('invalid value for "skip_concurrent", skip_concurrent cannot be nil.') + end + + if @time_cycle.nil? + invalid_properties.push('invalid value for "time_cycle", time_cycle cannot be nil.') + end + + if @tz.nil? + invalid_properties.push('invalid value for "tz", tz 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 @skip_concurrent.nil? + return false if @time_cycle.nil? + return false if @tz.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 && + end_date == o.end_date && + skip_concurrent == o.skip_concurrent && + start_date == o.start_date && + time_cycle == o.time_cycle && + tz == o.tz + 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 + [end_date, skip_concurrent, start_date, time_cycle, tz].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_validation_error.rb b/lib/crimson-falcon/models/graph_validation_error.rb new file mode 100644 index 00000000..c425940d --- /dev/null +++ b/lib/crimson-falcon/models/graph_validation_error.rb @@ -0,0 +1,300 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 GraphValidationError + # The cid the validation error applies to if it is not the CID managing the workflow + attr_accessor :cid + + # identifier for UI to indicate reason for node being invalid. + attr_accessor :code + + # Display name for the property if it exists in a trigger or activity + attr_accessor :display_name + + # Detail of why the node is invalid. + attr_accessor :message + + # ID of the node in the graph that has been invalidated. + attr_accessor :node_id + + # ID of the parent node in the graph that resulted in a child node being invalidated. + attr_accessor :parent_node_id + + # Used to specify an exact property that is invalid for fql evaluation + attr_accessor :property + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cid' => :'cid', + :'code' => :'code', + :'display_name' => :'display_name', + :'message' => :'message', + :'node_id' => :'node_id', + :'parent_node_id' => :'parent_node_id', + :'property' => :'property' + } + 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', + :'code' => :'Integer', + :'display_name' => :'String', + :'message' => :'String', + :'node_id' => :'String', + :'parent_node_id' => :'String', + :'property' => :'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::GraphValidationError` 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::GraphValidationError`. 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?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'parent_node_id') + self.parent_node_id = attributes[:'parent_node_id'] + end + + if attributes.key?(:'property') + self.property = attributes[:'property'] + 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 && + cid == o.cid && + code == o.code && + display_name == o.display_name && + message == o.message && + node_id == o.node_id && + parent_node_id == o.parent_node_id && + property == o.property + 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, code, display_name, message, node_id, parent_node_id, property].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/images_api_combined_image_export.rb b/lib/crimson-falcon/models/images_api_combined_image_export.rb new file mode 100644 index 00000000..49474221 --- /dev/null +++ b/lib/crimson-falcon/models/images_api_combined_image_export.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 ImagesApiCombinedImageExport + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiCombinedImageExport` 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::ImagesApiCombinedImageExport`. 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/images_api_customer_and_image.rb b/lib/crimson-falcon/models/images_api_customer_and_image.rb new file mode 100644 index 00000000..3b56a161 --- /dev/null +++ b/lib/crimson-falcon/models/images_api_customer_and_image.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 ImagesApiCustomerAndImage + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiCustomerAndImage` 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::ImagesApiCustomerAndImage`. 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/images_api_image_assessment_history.rb b/lib/crimson-falcon/models/images_api_image_assessment_history.rb new file mode 100644 index 00000000..465049d7 --- /dev/null +++ b/lib/crimson-falcon/models/images_api_image_assessment_history.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 ImagesApiImageAssessmentHistory + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiImageAssessmentHistory` 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::ImagesApiImageAssessmentHistory`. 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/images_api_image_by_vulnerability_count.rb b/lib/crimson-falcon/models/images_api_image_by_vulnerability_count.rb new file mode 100644 index 00000000..2a9f49c3 --- /dev/null +++ b/lib/crimson-falcon/models/images_api_image_by_vulnerability_count.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 ImagesApiImageByVulnerabilityCount + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiImageByVulnerabilityCount` 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::ImagesApiImageByVulnerabilityCount`. 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/images_api_image_count.rb b/lib/crimson-falcon/models/images_api_image_count.rb new file mode 100644 index 00000000..17a4df9a --- /dev/null +++ b/lib/crimson-falcon/models/images_api_image_count.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 ImagesApiImageCount + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiImageCount` 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::ImagesApiImageCount`. 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/images_api_image_count_by_base_os.rb b/lib/crimson-falcon/models/images_api_image_count_by_base_os.rb new file mode 100644 index 00000000..8a8ee4fe --- /dev/null +++ b/lib/crimson-falcon/models/images_api_image_count_by_base_os.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 ImagesApiImageCountByBaseOS + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiImageCountByBaseOS` 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::ImagesApiImageCountByBaseOS`. 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/images_api_image_count_by_state.rb b/lib/crimson-falcon/models/images_api_image_count_by_state.rb new file mode 100644 index 00000000..d181236e --- /dev/null +++ b/lib/crimson-falcon/models/images_api_image_count_by_state.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 ImagesApiImageCountByState + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiImageCountByState` 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::ImagesApiImageCountByState`. 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/images_api_image_issues_summary.rb b/lib/crimson-falcon/models/images_api_image_issues_summary.rb new file mode 100644 index 00000000..28638aa4 --- /dev/null +++ b/lib/crimson-falcon/models/images_api_image_issues_summary.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 ImagesApiImageIssuesSummary + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiImageIssuesSummary` 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::ImagesApiImageIssuesSummary`. 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/images_api_image_vulnerabilities_summary.rb b/lib/crimson-falcon/models/images_api_image_vulnerabilities_summary.rb new file mode 100644 index 00000000..366b38c0 --- /dev/null +++ b/lib/crimson-falcon/models/images_api_image_vulnerabilities_summary.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 ImagesApiImageVulnerabilitiesSummary + 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' => :'MsaspecMetaInfo', + :'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::ImagesApiImageVulnerabilitiesSummary` 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::ImagesApiImageVulnerabilitiesSummary`. 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/internal_sensor_status.rb b/lib/crimson-falcon/models/internal_sensor_status.rb index 7362c1d4..c35e72b2 100644 --- a/lib/crimson-falcon/models/internal_sensor_status.rb +++ b/lib/crimson-falcon/models/internal_sensor_status.rb @@ -44,12 +44,28 @@ class InternalSensorStatus attr_accessor :idp_policy_name + attr_accessor :kerberos_config + + attr_accessor :ldap_config + + attr_accessor :ldaps_config + attr_accessor :local_ip attr_accessor :machine_domain + attr_accessor :ntlm_config + attr_accessor :os_version + attr_accessor :rdp_to_dc_config + + attr_accessor :smb_to_dc_config + + attr_accessor :status + + attr_accessor :status_causes + attr_accessor :ti_enabled # Attribute mapping from ruby-style variable name to JSON key. @@ -61,9 +77,17 @@ def self.attribute_map :'hostname' => :'hostname', :'idp_policy_id' => :'idp_policy_id', :'idp_policy_name' => :'idp_policy_name', + :'kerberos_config' => :'kerberos_config', + :'ldap_config' => :'ldap_config', + :'ldaps_config' => :'ldaps_config', :'local_ip' => :'local_ip', :'machine_domain' => :'machine_domain', + :'ntlm_config' => :'ntlm_config', :'os_version' => :'os_version', + :'rdp_to_dc_config' => :'rdp_to_dc_config', + :'smb_to_dc_config' => :'smb_to_dc_config', + :'status' => :'status', + :'status_causes' => :'status_causes', :'ti_enabled' => :'ti_enabled' } end @@ -82,9 +106,17 @@ def self.openapi_types :'hostname' => :'String', :'idp_policy_id' => :'String', :'idp_policy_name' => :'String', + :'kerberos_config' => :'String', + :'ldap_config' => :'String', + :'ldaps_config' => :'String', :'local_ip' => :'String', :'machine_domain' => :'String', + :'ntlm_config' => :'String', :'os_version' => :'String', + :'rdp_to_dc_config' => :'String', + :'smb_to_dc_config' => :'String', + :'status' => :'String', + :'status_causes' => :'Array', :'ti_enabled' => :'String' } end @@ -134,6 +166,18 @@ def initialize(attributes = {}) self.idp_policy_name = attributes[:'idp_policy_name'] end + if attributes.key?(:'kerberos_config') + self.kerberos_config = attributes[:'kerberos_config'] + end + + if attributes.key?(:'ldap_config') + self.ldap_config = attributes[:'ldap_config'] + end + + if attributes.key?(:'ldaps_config') + self.ldaps_config = attributes[:'ldaps_config'] + end + if attributes.key?(:'local_ip') self.local_ip = attributes[:'local_ip'] end @@ -142,10 +186,32 @@ def initialize(attributes = {}) self.machine_domain = attributes[:'machine_domain'] end + if attributes.key?(:'ntlm_config') + self.ntlm_config = attributes[:'ntlm_config'] + end + if attributes.key?(:'os_version') self.os_version = attributes[:'os_version'] end + if attributes.key?(:'rdp_to_dc_config') + self.rdp_to_dc_config = attributes[:'rdp_to_dc_config'] + end + + if attributes.key?(:'smb_to_dc_config') + self.smb_to_dc_config = attributes[:'smb_to_dc_config'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'status_causes') + if (value = attributes[:'status_causes']).is_a?(Array) + self.status_causes = value + end + end + if attributes.key?(:'ti_enabled') self.ti_enabled = attributes[:'ti_enabled'] end @@ -185,9 +251,17 @@ def ==(o) hostname == o.hostname && idp_policy_id == o.idp_policy_id && idp_policy_name == o.idp_policy_name && + kerberos_config == o.kerberos_config && + ldap_config == o.ldap_config && + ldaps_config == o.ldaps_config && local_ip == o.local_ip && machine_domain == o.machine_domain && + ntlm_config == o.ntlm_config && os_version == o.os_version && + rdp_to_dc_config == o.rdp_to_dc_config && + smb_to_dc_config == o.smb_to_dc_config && + status == o.status && + status_causes == o.status_causes && ti_enabled == o.ti_enabled end @@ -200,7 +274,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [agent_version, cid, device_id, hostname, idp_policy_id, idp_policy_name, local_ip, machine_domain, os_version, ti_enabled].hash + [agent_version, cid, device_id, hostname, idp_policy_id, idp_policy_name, kerberos_config, ldap_config, ldaps_config, local_ip, machine_domain, ntlm_config, os_version, rdp_to_dc_config, smb_to_dc_config, status, status_causes, ti_enabled].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/jsonschema_authorization.rb b/lib/crimson-falcon/models/jsonschema_authorization.rb new file mode 100644 index 00000000..7a1cfbbf --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_authorization.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 JsonschemaAuthorization + attr_accessor :api_scope + + attr_accessor :complex_permissions + + attr_accessor :feature_flag + + attr_accessor :permissions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'api_scope' => :'apiScope', + :'complex_permissions' => :'complexPermissions', + :'feature_flag' => :'featureFlag', + :'permissions' => :'permissions' + } + 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 + { + :'api_scope' => :'String', + :'complex_permissions' => :'JsonschemaComplexPermissions', + :'feature_flag' => :'String', + :'permissions' => :'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::JsonschemaAuthorization` 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::JsonschemaAuthorization`. 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?(:'api_scope') + self.api_scope = attributes[:'api_scope'] + end + + if attributes.key?(:'complex_permissions') + self.complex_permissions = attributes[:'complex_permissions'] + end + + if attributes.key?(:'feature_flag') + self.feature_flag = attributes[:'feature_flag'] + end + + if attributes.key?(:'permissions') + if (value = attributes[:'permissions']).is_a?(Array) + self.permissions = 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 @complex_permissions.nil? + invalid_properties.push('invalid value for "complex_permissions", complex_permissions cannot be nil.') + end + + if @feature_flag.nil? + invalid_properties.push('invalid value for "feature_flag", feature_flag cannot be nil.') + end + + if @permissions.nil? + invalid_properties.push('invalid value for "permissions", permissions 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 @complex_permissions.nil? + return false if @feature_flag.nil? + return false if @permissions.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 && + api_scope == o.api_scope && + complex_permissions == o.complex_permissions && + feature_flag == o.feature_flag && + permissions == o.permissions + 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 + [api_scope, complex_permissions, feature_flag, permissions].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_collection_index_field.rb b/lib/crimson-falcon/models/jsonschema_collection_index_field.rb new file mode 100644 index 00000000..2f73dfc0 --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_collection_index_field.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 JsonschemaCollectionIndexField + attr_accessor :field + + attr_accessor :fql_name + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'field' => :'field', + :'fql_name' => :'fql_name', + :'type' => :'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 + { + :'field' => :'String', + :'fql_name' => :'String', + :'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::JsonschemaCollectionIndexField` 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::JsonschemaCollectionIndexField`. 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?(:'fql_name') + self.fql_name = attributes[:'fql_name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'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 + if @field.nil? + invalid_properties.push('invalid value for "field", field cannot be nil.') + end + + if @fql_name.nil? + invalid_properties.push('invalid value for "fql_name", fql_name cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type 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 @fql_name.nil? + return false if @type.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 && + fql_name == o.fql_name && + type == o.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 + [field, fql_name, 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/jsonschema_complex_permissions.rb b/lib/crimson-falcon/models/jsonschema_complex_permissions.rb new file mode 100644 index 00000000..8893872f --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_complex_permissions.rb @@ -0,0 +1,236 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 JsonschemaComplexPermissions + attr_accessor :_or + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_or' => :'OR' + } + 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 + { + :'_or' => :'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::JsonschemaComplexPermissions` 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::JsonschemaComplexPermissions`. 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?(:'_or') + if (value = attributes[:'_or']).is_a?(Array) + self._or = 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 && + _or == o._or + 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 + [_or].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_complex_permissions_or.rb b/lib/crimson-falcon/models/jsonschema_complex_permissions_or.rb new file mode 100644 index 00000000..82169da2 --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_complex_permissions_or.rb @@ -0,0 +1,236 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 JsonschemaComplexPermissionsOR + attr_accessor :_and + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_and' => :'AND' + } + 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 + { + :'_and' => :'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::JsonschemaComplexPermissionsOR` 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::JsonschemaComplexPermissionsOR`. 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?(:'_and') + if (value = attributes[:'_and']).is_a?(Array) + self._and = 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 && + _and == o._and + 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 + [_and].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_condition_group_fields.rb b/lib/crimson-falcon/models/jsonschema_condition_group_fields.rb new file mode 100644 index 00000000..1063a4ac --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_condition_group_fields.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 JsonschemaConditionGroupFields + attr_accessor :condition_control + + attr_accessor :control_name + + attr_accessor :controller + + attr_accessor :dependent_control + + attr_accessor :reset_fields + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'condition_control' => :'condition_control', + :'control_name' => :'control_name', + :'controller' => :'controller', + :'dependent_control' => :'dependent_control', + :'reset_fields' => :'reset_fields' + } + 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 + { + :'condition_control' => :'Boolean', + :'control_name' => :'String', + :'controller' => :'Boolean', + :'dependent_control' => :'String', + :'reset_fields' => :'JsonschemaResetFields' + } + 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::JsonschemaConditionGroupFields` 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::JsonschemaConditionGroupFields`. 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?(:'condition_control') + self.condition_control = attributes[:'condition_control'] + end + + if attributes.key?(:'control_name') + self.control_name = attributes[:'control_name'] + end + + if attributes.key?(:'controller') + self.controller = attributes[:'controller'] + end + + if attributes.key?(:'dependent_control') + self.dependent_control = attributes[:'dependent_control'] + end + + if attributes.key?(:'reset_fields') + self.reset_fields = attributes[:'reset_fields'] + 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 && + condition_control == o.condition_control && + control_name == o.control_name && + controller == o.controller && + dependent_control == o.dependent_control && + reset_fields == o.reset_fields + 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 + [condition_control, control_name, controller, dependent_control, reset_fields].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_permission.rb b/lib/crimson-falcon/models/jsonschema_permission.rb new file mode 100644 index 00000000..e002f91b --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_permission.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 JsonschemaPermission + attr_accessor :action + + attr_accessor :resource + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action' => :'action', + :'resource' => :'resource' + } + 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 + { + :'action' => :'String', + :'resource' => :'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::JsonschemaPermission` 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::JsonschemaPermission`. 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?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'resource') + self.resource = attributes[:'resource'] + 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 @action.nil? + invalid_properties.push('invalid value for "action", action cannot be nil.') + end + + if @resource.nil? + invalid_properties.push('invalid value for "resource", resource 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 @action.nil? + return false if @resource.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 && + action == o.action && + resource == o.resource + 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 + [action, resource].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 new file mode 100644 index 00000000..815a54e8 --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_pivot.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 JsonschemaPivot + attr_accessor :case_sensitive + + attr_accessor :entity + + attr_accessor :entity_value + + attr_accessor :query_string + + attr_accessor :searchable + + attr_accessor :sort_by_display + + attr_accessor :sort_by_value + + attr_accessor :sort_desc + + attr_accessor :strict + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'case_sensitive' => :'caseSensitive', + :'entity' => :'entity', + :'entity_value' => :'entityValue', + :'query_string' => :'queryString', + :'searchable' => :'searchable', + :'sort_by_display' => :'sortByDisplay', + :'sort_by_value' => :'sortByValue', + :'sort_desc' => :'sortDesc', + :'strict' => :'strict' + } + 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 + { + :'case_sensitive' => :'Boolean', + :'entity' => :'String', + :'entity_value' => :'String', + :'query_string' => :'String', + :'searchable' => :'Boolean', + :'sort_by_display' => :'Boolean', + :'sort_by_value' => :'Boolean', + :'sort_desc' => :'Boolean', + :'strict' => :'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::JsonschemaPivot` 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::JsonschemaPivot`. 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?(:'case_sensitive') + self.case_sensitive = attributes[:'case_sensitive'] + end + + if attributes.key?(:'entity') + self.entity = attributes[:'entity'] + end + + if attributes.key?(:'entity_value') + self.entity_value = attributes[:'entity_value'] + end + + if attributes.key?(:'query_string') + self.query_string = attributes[:'query_string'] + end + + if attributes.key?(:'searchable') + self.searchable = attributes[:'searchable'] + end + + if attributes.key?(:'sort_by_display') + self.sort_by_display = attributes[:'sort_by_display'] + end + + if attributes.key?(:'sort_by_value') + self.sort_by_value = attributes[:'sort_by_value'] + end + + if attributes.key?(:'sort_desc') + self.sort_desc = attributes[:'sort_desc'] + end + + if attributes.key?(:'strict') + self.strict = attributes[:'strict'] + 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 && + case_sensitive == o.case_sensitive && + entity == o.entity && + entity_value == o.entity_value && + query_string == o.query_string && + searchable == o.searchable && + sort_by_display == o.sort_by_display && + sort_by_value == o.sort_by_value && + sort_desc == o.sort_desc && + strict == o.strict + 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 + [case_sensitive, entity, entity_value, query_string, searchable, sort_by_display, sort_by_value, sort_desc, strict].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_reset_fields.rb b/lib/crimson-falcon/models/jsonschema_reset_fields.rb new file mode 100644 index 00000000..16a420cd --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_reset_fields.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 JsonschemaResetFields + attr_accessor :fields + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fields' => :'fields' + } + 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 + { + :'fields' => :'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::JsonschemaResetFields` 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::JsonschemaResetFields`. 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?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = 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 @fields.nil? + invalid_properties.push('invalid value for "fields", fields 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 @fields.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 && + fields == o.fields + 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 + [fields].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_schema.rb b/lib/crimson-falcon/models/jsonschema_schema.rb new file mode 100644 index 00000000..73efd9af --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_schema.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 JsonschemaSchema + attr_accessor :sub_schema + + attr_accessor :definitions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'sub_schema' => :'SubSchema', + :'definitions' => :'definitions' + } + 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 + { + :'sub_schema' => :'JsonschemaSubSchema', + :'definitions' => :'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::JsonschemaSchema` 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::JsonschemaSchema`. 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?(:'sub_schema') + self.sub_schema = attributes[:'sub_schema'] + end + + if attributes.key?(:'definitions') + if (value = attributes[:'definitions']).is_a?(Hash) + self.definitions = 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 @sub_schema.nil? + invalid_properties.push('invalid value for "sub_schema", sub_schema 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 @sub_schema.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 && + sub_schema == o.sub_schema && + definitions == o.definitions + 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 + [sub_schema, definitions].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_signals_extensions.rb b/lib/crimson-falcon/models/jsonschema_signals_extensions.rb new file mode 100644 index 00000000..fffeb3ab --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_signals_extensions.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 JsonschemaSignalsExtensions + attr_accessor :enum_wrapper + + attr_accessor :example_display_map + + attr_accessor :path_name + + # 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' + } + 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 + { + :'enum_wrapper' => :'Boolean', + :'example_display_map' => :'Hash', + :'path_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::JsonschemaSignalsExtensions` 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::JsonschemaSignalsExtensions`. 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?(:'enum_wrapper') + self.enum_wrapper = attributes[:'enum_wrapper'] + end + + if attributes.key?(:'example_display_map') + if (value = attributes[:'example_display_map']).is_a?(Hash) + self.example_display_map = value + end + end + + if attributes.key?(:'path_name') + self.path_name = attributes[:'path_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 && + enum_wrapper == o.enum_wrapper && + example_display_map == o.example_display_map && + path_name == o.path_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 + [enum_wrapper, example_display_map, path_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_sub_schema.rb b/lib/crimson-falcon/models/jsonschema_sub_schema.rb new file mode 100644 index 00000000..db23cfdd --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_sub_schema.rb @@ -0,0 +1,782 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 JsonschemaSubSchema + attr_accessor :ref + + attr_accessor :schema + + attr_accessor :additional_items + + attr_accessor :additional_properties + + attr_accessor :all_of + + attr_accessor :any_of + + attr_accessor :binary_encoding + + attr_accessor :const + + attr_accessor :default + + attr_accessor :dependencies + + attr_accessor :deprecated + + attr_accessor :description + + attr_accessor :_else + + attr_accessor :enum + + attr_accessor :error_message + + attr_accessor :examples + + attr_accessor :exclusive_maximum + + attr_accessor :exclusive_minimum + + attr_accessor :format + + attr_accessor :_if + + attr_accessor :items + + attr_accessor :max_items + + attr_accessor :max_length + + attr_accessor :max_properties + + attr_accessor :maximum + + attr_accessor :media + + attr_accessor :min_items + + attr_accessor :min_length + + attr_accessor :min_properties + + attr_accessor :minimum + + attr_accessor :multiple_of + + attr_accessor :_not + + attr_accessor :one_of + + attr_accessor :pattern + + attr_accessor :pattern_properties + + attr_accessor :properties + + attr_accessor :required + + attr_accessor :_then + + attr_accessor :title + + attr_accessor :type + + attr_accessor :uicomponent + + attr_accessor :unique_items + + attr_accessor :x_cs_authorization + + attr_accessor :x_cs_can_create + + attr_accessor :x_cs_condition_group_fields + + attr_accessor :x_cs_do_not_hide + + attr_accessor :x_cs_indexable + + attr_accessor :x_cs_indexable_fields + + attr_accessor :x_cs_max_duration + + attr_accessor :x_cs_min_duration + + attr_accessor :x_cs_not_parameterizable + + attr_accessor :x_cs_order + + attr_accessor :x_cs_pivot + + attr_accessor :x_cs_signals + + attr_accessor :x_cs_signals_category + + attr_accessor :x_cs_signals_operators + + attr_accessor :x_cs_signals_sub_category + + attr_accessor :x_cs_tags + + attr_accessor :x_cs_workflow + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'ref' => :'$ref', + :'schema' => :'$schema', + :'additional_items' => :'additionalItems', + :'additional_properties' => :'additionalProperties', + :'all_of' => :'allOf', + :'any_of' => :'anyOf', + :'binary_encoding' => :'binaryEncoding', + :'const' => :'const', + :'default' => :'default', + :'dependencies' => :'dependencies', + :'deprecated' => :'deprecated', + :'description' => :'description', + :'_else' => :'else', + :'enum' => :'enum', + :'error_message' => :'errorMessage', + :'examples' => :'examples', + :'exclusive_maximum' => :'exclusiveMaximum', + :'exclusive_minimum' => :'exclusiveMinimum', + :'format' => :'format', + :'_if' => :'if', + :'items' => :'items', + :'max_items' => :'maxItems', + :'max_length' => :'maxLength', + :'max_properties' => :'maxProperties', + :'maximum' => :'maximum', + :'media' => :'media', + :'min_items' => :'minItems', + :'min_length' => :'minLength', + :'min_properties' => :'minProperties', + :'minimum' => :'minimum', + :'multiple_of' => :'multipleOf', + :'_not' => :'not', + :'one_of' => :'oneOf', + :'pattern' => :'pattern', + :'pattern_properties' => :'patternProperties', + :'properties' => :'properties', + :'required' => :'required', + :'_then' => :'then', + :'title' => :'title', + :'type' => :'type', + :'uicomponent' => :'ui:component', + :'unique_items' => :'uniqueItems', + :'x_cs_authorization' => :'x-cs-authorization', + :'x_cs_can_create' => :'x-cs-can-create', + :'x_cs_condition_group_fields' => :'x-cs-condition-group-fields', + :'x_cs_do_not_hide' => :'x-cs-do-not-hide', + :'x_cs_indexable' => :'x-cs-indexable', + :'x_cs_indexable_fields' => :'x-cs-indexable-fields', + :'x_cs_max_duration' => :'x-cs-max-duration', + :'x_cs_min_duration' => :'x-cs-min-duration', + :'x_cs_not_parameterizable' => :'x-cs-not-parameterizable', + :'x_cs_order' => :'x-cs-order', + :'x_cs_pivot' => :'x-cs-pivot', + :'x_cs_signals' => :'x-cs-signals', + :'x_cs_signals_category' => :'x-cs-signals-category', + :'x_cs_signals_operators' => :'x-cs-signals-operators', + :'x_cs_signals_sub_category' => :'x-cs-signals-subCategory', + :'x_cs_tags' => :'x-cs-tags', + :'x_cs_workflow' => :'x-cs-workflow' + } + 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 + { + :'ref' => :'String', + :'schema' => :'String', + :'additional_items' => :'String', + :'additional_properties' => :'String', + :'all_of' => :'Array', + :'any_of' => :'Array', + :'binary_encoding' => :'String', + :'const' => :'Object', + :'default' => :'Object', + :'dependencies' => :'Hash', + :'deprecated' => :'Boolean', + :'description' => :'String', + :'_else' => :'JsonschemaSubSchema', + :'enum' => :'Array', + :'error_message' => :'String', + :'examples' => :'Array', + :'exclusive_maximum' => :'Boolean', + :'exclusive_minimum' => :'Boolean', + :'format' => :'String', + :'_if' => :'JsonschemaSubSchema', + :'items' => :'JsonschemaSubSchema', + :'max_items' => :'Integer', + :'max_length' => :'Integer', + :'max_properties' => :'Integer', + :'maximum' => :'Integer', + :'media' => :'JsonschemaSubSchema', + :'min_items' => :'Integer', + :'min_length' => :'Integer', + :'min_properties' => :'Integer', + :'minimum' => :'Integer', + :'multiple_of' => :'Integer', + :'_not' => :'JsonschemaSubSchema', + :'one_of' => :'Array', + :'pattern' => :'String', + :'pattern_properties' => :'Hash', + :'properties' => :'Hash', + :'required' => :'Array', + :'_then' => :'JsonschemaSubSchema', + :'title' => :'String', + :'type' => :'String', + :'uicomponent' => :'String', + :'unique_items' => :'Boolean', + :'x_cs_authorization' => :'JsonschemaAuthorization', + :'x_cs_can_create' => :'Boolean', + :'x_cs_condition_group_fields' => :'JsonschemaConditionGroupFields', + :'x_cs_do_not_hide' => :'Boolean', + :'x_cs_indexable' => :'Boolean', + :'x_cs_indexable_fields' => :'Array', + :'x_cs_max_duration' => :'Integer', + :'x_cs_min_duration' => :'Integer', + :'x_cs_not_parameterizable' => :'Boolean', + :'x_cs_order' => :'Array', + :'x_cs_pivot' => :'JsonschemaPivot', + :'x_cs_signals' => :'JsonschemaSignalsExtensions', + :'x_cs_signals_category' => :'String', + :'x_cs_signals_operators' => :'Array', + :'x_cs_signals_sub_category' => :'String', + :'x_cs_tags' => :'Array', + :'x_cs_workflow' => :'JsonschemaWorkflowExtensions' + } + 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::JsonschemaSubSchema` 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::JsonschemaSubSchema`. 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?(:'ref') + self.ref = attributes[:'ref'] + end + + if attributes.key?(:'schema') + self.schema = attributes[:'schema'] + end + + if attributes.key?(:'additional_items') + self.additional_items = attributes[:'additional_items'] + end + + if attributes.key?(:'additional_properties') + self.additional_properties = attributes[:'additional_properties'] + end + + if attributes.key?(:'all_of') + if (value = attributes[:'all_of']).is_a?(Array) + self.all_of = value + end + end + + if attributes.key?(:'any_of') + if (value = attributes[:'any_of']).is_a?(Array) + self.any_of = value + end + end + + if attributes.key?(:'binary_encoding') + self.binary_encoding = attributes[:'binary_encoding'] + end + + if attributes.key?(:'const') + self.const = attributes[:'const'] + end + + if attributes.key?(:'default') + self.default = attributes[:'default'] + end + + if attributes.key?(:'dependencies') + if (value = attributes[:'dependencies']).is_a?(Hash) + self.dependencies = value + end + end + + if attributes.key?(:'deprecated') + self.deprecated = attributes[:'deprecated'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'_else') + self._else = attributes[:'_else'] + end + + if attributes.key?(:'enum') + if (value = attributes[:'enum']).is_a?(Array) + self.enum = value + end + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'examples') + if (value = attributes[:'examples']).is_a?(Array) + self.examples = value + end + end + + if attributes.key?(:'exclusive_maximum') + self.exclusive_maximum = attributes[:'exclusive_maximum'] + end + + if attributes.key?(:'exclusive_minimum') + self.exclusive_minimum = attributes[:'exclusive_minimum'] + end + + if attributes.key?(:'format') + self.format = attributes[:'format'] + end + + if attributes.key?(:'_if') + self._if = attributes[:'_if'] + end + + if attributes.key?(:'items') + self.items = attributes[:'items'] + end + + if attributes.key?(:'max_items') + self.max_items = attributes[:'max_items'] + end + + if attributes.key?(:'max_length') + self.max_length = attributes[:'max_length'] + end + + if attributes.key?(:'max_properties') + self.max_properties = attributes[:'max_properties'] + end + + if attributes.key?(:'maximum') + self.maximum = attributes[:'maximum'] + end + + if attributes.key?(:'media') + self.media = attributes[:'media'] + end + + if attributes.key?(:'min_items') + self.min_items = attributes[:'min_items'] + end + + if attributes.key?(:'min_length') + self.min_length = attributes[:'min_length'] + end + + if attributes.key?(:'min_properties') + self.min_properties = attributes[:'min_properties'] + end + + if attributes.key?(:'minimum') + self.minimum = attributes[:'minimum'] + end + + if attributes.key?(:'multiple_of') + self.multiple_of = attributes[:'multiple_of'] + end + + if attributes.key?(:'_not') + self._not = attributes[:'_not'] + end + + if attributes.key?(:'one_of') + if (value = attributes[:'one_of']).is_a?(Array) + self.one_of = value + end + end + + if attributes.key?(:'pattern') + self.pattern = attributes[:'pattern'] + end + + if attributes.key?(:'pattern_properties') + if (value = attributes[:'pattern_properties']).is_a?(Hash) + self.pattern_properties = value + end + end + + if attributes.key?(:'properties') + if (value = attributes[:'properties']).is_a?(Hash) + self.properties = value + end + end + + if attributes.key?(:'required') + if (value = attributes[:'required']).is_a?(Array) + self.required = value + end + end + + if attributes.key?(:'_then') + self._then = attributes[:'_then'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'uicomponent') + self.uicomponent = attributes[:'uicomponent'] + end + + if attributes.key?(:'unique_items') + self.unique_items = attributes[:'unique_items'] + end + + if attributes.key?(:'x_cs_authorization') + self.x_cs_authorization = attributes[:'x_cs_authorization'] + end + + if attributes.key?(:'x_cs_can_create') + self.x_cs_can_create = attributes[:'x_cs_can_create'] + end + + if attributes.key?(:'x_cs_condition_group_fields') + self.x_cs_condition_group_fields = attributes[:'x_cs_condition_group_fields'] + end + + if attributes.key?(:'x_cs_do_not_hide') + self.x_cs_do_not_hide = attributes[:'x_cs_do_not_hide'] + end + + if attributes.key?(:'x_cs_indexable') + self.x_cs_indexable = attributes[:'x_cs_indexable'] + end + + if attributes.key?(:'x_cs_indexable_fields') + if (value = attributes[:'x_cs_indexable_fields']).is_a?(Array) + self.x_cs_indexable_fields = value + end + end + + if attributes.key?(:'x_cs_max_duration') + self.x_cs_max_duration = attributes[:'x_cs_max_duration'] + end + + if attributes.key?(:'x_cs_min_duration') + self.x_cs_min_duration = attributes[:'x_cs_min_duration'] + end + + if attributes.key?(:'x_cs_not_parameterizable') + self.x_cs_not_parameterizable = attributes[:'x_cs_not_parameterizable'] + end + + if attributes.key?(:'x_cs_order') + if (value = attributes[:'x_cs_order']).is_a?(Array) + self.x_cs_order = value + end + end + + if attributes.key?(:'x_cs_pivot') + self.x_cs_pivot = attributes[:'x_cs_pivot'] + end + + if attributes.key?(:'x_cs_signals') + self.x_cs_signals = attributes[:'x_cs_signals'] + end + + if attributes.key?(:'x_cs_signals_category') + self.x_cs_signals_category = attributes[:'x_cs_signals_category'] + end + + if attributes.key?(:'x_cs_signals_operators') + if (value = attributes[:'x_cs_signals_operators']).is_a?(Array) + self.x_cs_signals_operators = value + end + end + + if attributes.key?(:'x_cs_signals_sub_category') + self.x_cs_signals_sub_category = attributes[:'x_cs_signals_sub_category'] + end + + if attributes.key?(:'x_cs_tags') + if (value = attributes[:'x_cs_tags']).is_a?(Array) + self.x_cs_tags = value + end + end + + if attributes.key?(:'x_cs_workflow') + self.x_cs_workflow = attributes[:'x_cs_workflow'] + 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 && + ref == o.ref && + schema == o.schema && + additional_items == o.additional_items && + additional_properties == o.additional_properties && + all_of == o.all_of && + any_of == o.any_of && + binary_encoding == o.binary_encoding && + const == o.const && + default == o.default && + dependencies == o.dependencies && + deprecated == o.deprecated && + description == o.description && + _else == o._else && + enum == o.enum && + error_message == o.error_message && + examples == o.examples && + exclusive_maximum == o.exclusive_maximum && + exclusive_minimum == o.exclusive_minimum && + format == o.format && + _if == o._if && + items == o.items && + max_items == o.max_items && + max_length == o.max_length && + max_properties == o.max_properties && + maximum == o.maximum && + media == o.media && + min_items == o.min_items && + min_length == o.min_length && + min_properties == o.min_properties && + minimum == o.minimum && + multiple_of == o.multiple_of && + _not == o._not && + one_of == o.one_of && + pattern == o.pattern && + pattern_properties == o.pattern_properties && + properties == o.properties && + required == o.required && + _then == o._then && + title == o.title && + type == o.type && + uicomponent == o.uicomponent && + unique_items == o.unique_items && + x_cs_authorization == o.x_cs_authorization && + x_cs_can_create == o.x_cs_can_create && + x_cs_condition_group_fields == o.x_cs_condition_group_fields && + x_cs_do_not_hide == o.x_cs_do_not_hide && + x_cs_indexable == o.x_cs_indexable && + x_cs_indexable_fields == o.x_cs_indexable_fields && + x_cs_max_duration == o.x_cs_max_duration && + x_cs_min_duration == o.x_cs_min_duration && + x_cs_not_parameterizable == o.x_cs_not_parameterizable && + x_cs_order == o.x_cs_order && + x_cs_pivot == o.x_cs_pivot && + x_cs_signals == o.x_cs_signals && + x_cs_signals_category == o.x_cs_signals_category && + x_cs_signals_operators == o.x_cs_signals_operators && + x_cs_signals_sub_category == o.x_cs_signals_sub_category && + x_cs_tags == o.x_cs_tags && + x_cs_workflow == o.x_cs_workflow + 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 + [ref, schema, additional_items, additional_properties, all_of, any_of, binary_encoding, const, default, dependencies, deprecated, description, _else, enum, error_message, examples, exclusive_maximum, exclusive_minimum, format, _if, items, max_items, max_length, max_properties, maximum, media, min_items, min_length, min_properties, minimum, multiple_of, _not, one_of, pattern, pattern_properties, properties, required, _then, title, type, uicomponent, unique_items, x_cs_authorization, x_cs_can_create, x_cs_condition_group_fields, x_cs_do_not_hide, x_cs_indexable, x_cs_indexable_fields, x_cs_max_duration, x_cs_min_duration, x_cs_not_parameterizable, x_cs_order, x_cs_pivot, x_cs_signals, x_cs_signals_category, x_cs_signals_operators, x_cs_signals_sub_category, x_cs_tags, x_cs_workflow].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_workflow_extensions.rb b/lib/crimson-falcon/models/jsonschema_workflow_extensions.rb new file mode 100644 index 00000000..51d9b49b --- /dev/null +++ b/lib/crimson-falcon/models/jsonschema_workflow_extensions.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 JsonschemaWorkflowExtensions + attr_accessor :description + + attr_accessor :name + + attr_accessor :node_id + + attr_accessor :system + + attr_accessor :tags + + attr_accessor :x_cs_no_variable_injection + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'node_id' => :'node_id', + :'system' => :'system', + :'tags' => :'tags', + :'x_cs_no_variable_injection' => :'x-cs-no-variable-injection' + } + 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', + :'node_id' => :'String', + :'system' => :'Boolean', + :'tags' => :'Array', + :'x_cs_no_variable_injection' => :'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::JsonschemaWorkflowExtensions` 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::JsonschemaWorkflowExtensions`. 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?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'system') + self.system = attributes[:'system'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'x_cs_no_variable_injection') + self.x_cs_no_variable_injection = attributes[:'x_cs_no_variable_injection'] + 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 && + description == o.description && + name == o.name && + node_id == o.node_id && + system == o.system && + tags == o.tags && + x_cs_no_variable_injection == o.x_cs_no_variable_injection + 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, node_id, system, tags, x_cs_no_variable_injection].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/k8sassets_cluster_enrichment_data.rb b/lib/crimson-falcon/models/k8sassets_cluster_enrichment_data.rb new file mode 100644 index 00000000..820f8686 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_cluster_enrichment_data.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 K8sassetsClusterEnrichmentData + attr_accessor :container_count + + attr_accessor :node_count + + attr_accessor :pod_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'container_count' => :'container_count', + :'node_count' => :'node_count', + :'pod_count' => :'pod_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 + { + :'container_count' => :'Integer', + :'node_count' => :'Integer', + :'pod_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::K8sassetsClusterEnrichmentData` 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::K8sassetsClusterEnrichmentData`. 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?(:'container_count') + self.container_count = attributes[:'container_count'] + end + + if attributes.key?(:'node_count') + self.node_count = attributes[:'node_count'] + end + + if attributes.key?(:'pod_count') + self.pod_count = attributes[:'pod_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 + if @container_count.nil? + invalid_properties.push('invalid value for "container_count", container_count cannot be nil.') + end + + if @node_count.nil? + invalid_properties.push('invalid value for "node_count", node_count cannot be nil.') + end + + if @pod_count.nil? + invalid_properties.push('invalid value for "pod_count", pod_count 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 @container_count.nil? + return false if @node_count.nil? + return false if @pod_count.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 && + container_count == o.container_count && + node_count == o.node_count && + pod_count == o.pod_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 + [container_count, node_count, pod_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/k8sassets_cluster_enrichment_entry.rb b/lib/crimson-falcon/models/k8sassets_cluster_enrichment_entry.rb new file mode 100644 index 00000000..1ba88613 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_cluster_enrichment_entry.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 K8sassetsClusterEnrichmentEntry + attr_accessor :cluster_id + + attr_accessor :enrichment_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cluster_id' => :'cluster_id', + :'enrichment_data' => :'enrichment_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 + { + :'cluster_id' => :'String', + :'enrichment_data' => :'K8sassetsClusterEnrichmentData' + } + 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::K8sassetsClusterEnrichmentEntry` 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::K8sassetsClusterEnrichmentEntry`. 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?(:'cluster_id') + self.cluster_id = attributes[:'cluster_id'] + end + + if attributes.key?(:'enrichment_data') + self.enrichment_data = attributes[:'enrichment_data'] + 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 @cluster_id.nil? + invalid_properties.push('invalid value for "cluster_id", cluster_id cannot be nil.') + end + + if @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_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 @cluster_id.nil? + return false if @enrichment_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 && + cluster_id == o.cluster_id && + enrichment_data == o.enrichment_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 + [cluster_id, enrichment_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/k8sassets_cluster_enrichment_response.rb b/lib/crimson-falcon/models/k8sassets_cluster_enrichment_response.rb new file mode 100644 index 00000000..49b235f3 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_cluster_enrichment_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 K8sassetsClusterEnrichmentResponse + attr_accessor :enrichment_data + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enrichment_data' => :'EnrichmentData', + :'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 + { + :'enrichment_data' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::K8sassetsClusterEnrichmentResponse` 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::K8sassetsClusterEnrichmentResponse`. 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?(:'enrichment_data') + if (value = attributes[:'enrichment_data']).is_a?(Array) + self.enrichment_data = value + end + end + + 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 @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_data cannot be nil.') + end + + 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 @enrichment_data.nil? + 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 && + enrichment_data == o.enrichment_data && + 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 + [enrichment_data, 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/k8sassets_container_enrichment_data.rb b/lib/crimson-falcon/models/k8sassets_container_enrichment_data.rb new file mode 100644 index 00000000..0a78b2b1 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_container_enrichment_data.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 K8sassetsContainerEnrichmentData + attr_accessor :agents + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'agents' => :'agents' + } + 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 + { + :'agents' => :'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::K8sassetsContainerEnrichmentData` 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::K8sassetsContainerEnrichmentData`. 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?(:'agents') + if (value = attributes[:'agents']).is_a?(Array) + self.agents = 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 @agents.nil? + invalid_properties.push('invalid value for "agents", agents 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 @agents.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 && + agents == o.agents + 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 + [agents].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/k8sassets_container_enrichment_entry.rb b/lib/crimson-falcon/models/k8sassets_container_enrichment_entry.rb new file mode 100644 index 00000000..e2dc4783 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_container_enrichment_entry.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 K8sassetsContainerEnrichmentEntry + attr_accessor :container_id + + attr_accessor :enrichment_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'container_id' => :'container_id', + :'enrichment_data' => :'enrichment_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 + { + :'container_id' => :'String', + :'enrichment_data' => :'K8sassetsContainerEnrichmentData' + } + 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::K8sassetsContainerEnrichmentEntry` 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::K8sassetsContainerEnrichmentEntry`. 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?(:'container_id') + self.container_id = attributes[:'container_id'] + end + + if attributes.key?(:'enrichment_data') + self.enrichment_data = attributes[:'enrichment_data'] + 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 @container_id.nil? + invalid_properties.push('invalid value for "container_id", container_id cannot be nil.') + end + + if @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_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 @container_id.nil? + return false if @enrichment_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 && + container_id == o.container_id && + enrichment_data == o.enrichment_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 + [container_id, enrichment_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/k8sassets_container_enrichment_response.rb b/lib/crimson-falcon/models/k8sassets_container_enrichment_response.rb new file mode 100644 index 00000000..2a3411f1 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_container_enrichment_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 K8sassetsContainerEnrichmentResponse + attr_accessor :enrichment_data + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enrichment_data' => :'EnrichmentData', + :'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 + { + :'enrichment_data' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::K8sassetsContainerEnrichmentResponse` 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::K8sassetsContainerEnrichmentResponse`. 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?(:'enrichment_data') + if (value = attributes[:'enrichment_data']).is_a?(Array) + self.enrichment_data = value + end + end + + 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 @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_data cannot be nil.') + end + + 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 @enrichment_data.nil? + 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 && + enrichment_data == o.enrichment_data && + 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 + [enrichment_data, 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/k8sassets_container_info.rb b/lib/crimson-falcon/models/k8sassets_container_info.rb new file mode 100644 index 00000000..c8422004 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_container_info.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 K8sassetsContainerInfo + attr_accessor :id + + 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::K8sassetsContainerInfo` 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::K8sassetsContainerInfo`. 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 + 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 && + 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/k8sassets_deployment_enrichment_data.rb b/lib/crimson-falcon/models/k8sassets_deployment_enrichment_data.rb new file mode 100644 index 00000000..0c2740ad --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_deployment_enrichment_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 K8sassetsDeploymentEnrichmentData + attr_accessor :pod_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'pod_count' => :'pod_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 + { + :'pod_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::K8sassetsDeploymentEnrichmentData` 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::K8sassetsDeploymentEnrichmentData`. 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?(:'pod_count') + self.pod_count = attributes[:'pod_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 + if @pod_count.nil? + invalid_properties.push('invalid value for "pod_count", pod_count 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 @pod_count.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 && + pod_count == o.pod_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 + [pod_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/k8sassets_deployment_enrichment_entry.rb b/lib/crimson-falcon/models/k8sassets_deployment_enrichment_entry.rb new file mode 100644 index 00000000..c1939f23 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_deployment_enrichment_entry.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 K8sassetsDeploymentEnrichmentEntry + attr_accessor :deployment_id + + attr_accessor :enrichment_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deployment_id', + :'enrichment_data' => :'enrichment_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 + { + :'deployment_id' => :'String', + :'enrichment_data' => :'K8sassetsDeploymentEnrichmentData' + } + 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::K8sassetsDeploymentEnrichmentEntry` 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::K8sassetsDeploymentEnrichmentEntry`. 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?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + + if attributes.key?(:'enrichment_data') + self.enrichment_data = attributes[:'enrichment_data'] + 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 @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + if @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_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 @deployment_id.nil? + return false if @enrichment_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 && + deployment_id == o.deployment_id && + enrichment_data == o.enrichment_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 + [deployment_id, enrichment_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/k8sassets_deployment_enrichment_response.rb b/lib/crimson-falcon/models/k8sassets_deployment_enrichment_response.rb new file mode 100644 index 00000000..74521172 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_deployment_enrichment_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 K8sassetsDeploymentEnrichmentResponse + attr_accessor :enrichment_data + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enrichment_data' => :'EnrichmentData', + :'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 + { + :'enrichment_data' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::K8sassetsDeploymentEnrichmentResponse` 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::K8sassetsDeploymentEnrichmentResponse`. 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?(:'enrichment_data') + if (value = attributes[:'enrichment_data']).is_a?(Array) + self.enrichment_data = value + end + end + + 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 @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_data cannot be nil.') + end + + 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 @enrichment_data.nil? + 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 && + enrichment_data == o.enrichment_data && + 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 + [enrichment_data, 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/k8sassets_node_enrichment_data.rb b/lib/crimson-falcon/models/k8sassets_node_enrichment_data.rb new file mode 100644 index 00000000..87dc47c2 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_node_enrichment_data.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 K8sassetsNodeEnrichmentData + attr_accessor :container_count + + attr_accessor :pod_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'container_count' => :'container_count', + :'pod_count' => :'pod_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 + { + :'container_count' => :'Integer', + :'pod_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::K8sassetsNodeEnrichmentData` 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::K8sassetsNodeEnrichmentData`. 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?(:'container_count') + self.container_count = attributes[:'container_count'] + end + + if attributes.key?(:'pod_count') + self.pod_count = attributes[:'pod_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 + if @container_count.nil? + invalid_properties.push('invalid value for "container_count", container_count cannot be nil.') + end + + if @pod_count.nil? + invalid_properties.push('invalid value for "pod_count", pod_count 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 @container_count.nil? + return false if @pod_count.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 && + container_count == o.container_count && + pod_count == o.pod_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 + [container_count, pod_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/k8sassets_node_enrichment_entry.rb b/lib/crimson-falcon/models/k8sassets_node_enrichment_entry.rb new file mode 100644 index 00000000..48bd93bb --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_node_enrichment_entry.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 K8sassetsNodeEnrichmentEntry + attr_accessor :enrichment_data + + attr_accessor :node_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enrichment_data' => :'enrichment_data', + :'node_name' => :'node_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 + { + :'enrichment_data' => :'K8sassetsNodeEnrichmentData', + :'node_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::K8sassetsNodeEnrichmentEntry` 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::K8sassetsNodeEnrichmentEntry`. 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?(:'enrichment_data') + self.enrichment_data = attributes[:'enrichment_data'] + end + + if attributes.key?(:'node_name') + self.node_name = attributes[:'node_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 @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_data cannot be nil.') + end + + if @node_name.nil? + invalid_properties.push('invalid value for "node_name", node_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 @enrichment_data.nil? + return false if @node_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 && + enrichment_data == o.enrichment_data && + node_name == o.node_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 + [enrichment_data, node_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/k8sassets_node_enrichment_response.rb b/lib/crimson-falcon/models/k8sassets_node_enrichment_response.rb new file mode 100644 index 00000000..41108a32 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_node_enrichment_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 K8sassetsNodeEnrichmentResponse + attr_accessor :enrichment_data + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enrichment_data' => :'EnrichmentData', + :'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 + { + :'enrichment_data' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::K8sassetsNodeEnrichmentResponse` 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::K8sassetsNodeEnrichmentResponse`. 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?(:'enrichment_data') + if (value = attributes[:'enrichment_data']).is_a?(Array) + self.enrichment_data = value + end + end + + 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 @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_data cannot be nil.') + end + + 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 @enrichment_data.nil? + 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 && + enrichment_data == o.enrichment_data && + 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 + [enrichment_data, 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/k8sassets_pod_enrichment_data.rb b/lib/crimson-falcon/models/k8sassets_pod_enrichment_data.rb new file mode 100644 index 00000000..fa375443 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_pod_enrichment_data.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 K8sassetsPodEnrichmentData + attr_accessor :container_count + + attr_accessor :container_info + + attr_accessor :deployment_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'container_count' => :'container_count', + :'container_info' => :'container_info', + :'deployment_id' => :'deployment_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 + { + :'container_count' => :'Integer', + :'container_info' => :'Array', + :'deployment_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::K8sassetsPodEnrichmentData` 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::K8sassetsPodEnrichmentData`. 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?(:'container_count') + self.container_count = attributes[:'container_count'] + end + + if attributes.key?(:'container_info') + if (value = attributes[:'container_info']).is_a?(Array) + self.container_info = value + end + end + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_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 @container_count.nil? + invalid_properties.push('invalid value for "container_count", container_count cannot be nil.') + end + + if @container_info.nil? + invalid_properties.push('invalid value for "container_info", container_info cannot be nil.') + end + + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_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 @container_count.nil? + return false if @container_info.nil? + return false if @deployment_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 && + container_count == o.container_count && + container_info == o.container_info && + deployment_id == o.deployment_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 + [container_count, container_info, deployment_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/k8sassets_pod_enrichment_entry.rb b/lib/crimson-falcon/models/k8sassets_pod_enrichment_entry.rb new file mode 100644 index 00000000..bd4c838e --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_pod_enrichment_entry.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 K8sassetsPodEnrichmentEntry + attr_accessor :enrichment_data + + attr_accessor :pod_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enrichment_data' => :'enrichment_data', + :'pod_id' => :'pod_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 + { + :'enrichment_data' => :'K8sassetsPodEnrichmentData', + :'pod_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::K8sassetsPodEnrichmentEntry` 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::K8sassetsPodEnrichmentEntry`. 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?(:'enrichment_data') + self.enrichment_data = attributes[:'enrichment_data'] + end + + if attributes.key?(:'pod_id') + self.pod_id = attributes[:'pod_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 @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_data cannot be nil.') + end + + if @pod_id.nil? + invalid_properties.push('invalid value for "pod_id", pod_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 @enrichment_data.nil? + return false if @pod_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 && + enrichment_data == o.enrichment_data && + pod_id == o.pod_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 + [enrichment_data, pod_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/k8sassets_pod_enrichment_response.rb b/lib/crimson-falcon/models/k8sassets_pod_enrichment_response.rb new file mode 100644 index 00000000..edacc252 --- /dev/null +++ b/lib/crimson-falcon/models/k8sassets_pod_enrichment_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 K8sassetsPodEnrichmentResponse + attr_accessor :enrichment_data + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enrichment_data' => :'EnrichmentData', + :'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 + { + :'enrichment_data' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::K8sassetsPodEnrichmentResponse` 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::K8sassetsPodEnrichmentResponse`. 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?(:'enrichment_data') + if (value = attributes[:'enrichment_data']).is_a?(Array) + self.enrichment_data = value + end + end + + 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 @enrichment_data.nil? + invalid_properties.push('invalid value for "enrichment_data", enrichment_data cannot be nil.') + end + + 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 @enrichment_data.nil? + 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 && + enrichment_data == o.enrichment_data && + 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 + [enrichment_data, 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/k8sioms_kubernetes_iom_count_value.rb b/lib/crimson-falcon/models/k8sioms_kubernetes_iom_count_value.rb new file mode 100644 index 00000000..1c4dee11 --- /dev/null +++ b/lib/crimson-falcon/models/k8sioms_kubernetes_iom_count_value.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 K8siomsKubernetesIOMCountValue + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::K8siomsKubernetesIOMCountValue` 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::K8siomsKubernetesIOMCountValue`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/k8sioms_kubernetes_iom_entity_response.rb b/lib/crimson-falcon/models/k8sioms_kubernetes_iom_entity_response.rb new file mode 100644 index 00000000..7592f401 --- /dev/null +++ b/lib/crimson-falcon/models/k8sioms_kubernetes_iom_entity_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 K8siomsKubernetesIOMEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::K8siomsKubernetesIOMEntityResponse` 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::K8siomsKubernetesIOMEntityResponse`. 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/k8sioms_kubernetes_iom_field_value.rb b/lib/crimson-falcon/models/k8sioms_kubernetes_iom_field_value.rb new file mode 100644 index 00000000..c2c75d6d --- /dev/null +++ b/lib/crimson-falcon/models/k8sioms_kubernetes_iom_field_value.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 K8siomsKubernetesIOMFieldValue + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::K8siomsKubernetesIOMFieldValue` 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::K8siomsKubernetesIOMFieldValue`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/model_user_input_read_response.rb b/lib/crimson-falcon/models/model_user_input_read_response.rb new file mode 100644 index 00000000..0bbf0eb3 --- /dev/null +++ b/lib/crimson-falcon/models/model_user_input_read_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 ModelUserInputReadResponse + attr_accessor :errors + + attr_accessor :meta + + # user inputs returned + 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' => :'MsaspecMetaInfo', + :'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::ModelUserInputReadResponse` 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::ModelUserInputReadResponse`. 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/model_user_input_update_request.rb b/lib/crimson-falcon/models/model_user_input_update_request.rb new file mode 100644 index 00000000..33123b92 --- /dev/null +++ b/lib/crimson-falcon/models/model_user_input_update_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 ModelUserInputUpdateRequest + # input to provide to the user input activity + attr_accessor :input + + # note added to user input at the time an input is provided + attr_accessor :note + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'input' => :'input', + :'note' => :'note' + } + 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 + { + :'input' => :'String', + :'note' => :'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::ModelUserInputUpdateRequest` 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::ModelUserInputUpdateRequest`. 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?(:'input') + self.input = attributes[:'input'] + end + + if attributes.key?(:'note') + self.note = attributes[:'note'] + 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 @input.nil? + invalid_properties.push('invalid value for "input", input cannot be nil.') + end + + if @note.nil? + invalid_properties.push('invalid value for "note", note 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 @input.nil? + return false if @note.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 && + input == o.input && + note == o.note + 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 + [input, note].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/model_user_input_view_model.rb b/lib/crimson-falcon/models/model_user_input_view_model.rb new file mode 100644 index 00000000..4d566582 --- /dev/null +++ b/lib/crimson-falcon/models/model_user_input_view_model.rb @@ -0,0 +1,379 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelUserInputViewModel + # if not empty, only listed inputs are allowed + attr_accessor :allowed_inputs + + # if not empty, only listed responders are allowed to provide input + attr_accessor :allowed_responders + + # whether or not the user input is completed yet + attr_accessor :completed + + # time at which the user input was modified + attr_accessor :completed_at + + # time at which the user input was created + attr_accessor :created_at + + # ID of the user input + attr_accessor :id + + # input provided by a responder user + attr_accessor :input + + # note added to user input at the time an input is provided + attr_accessor :note + + # user responding to the user input request + attr_accessor :responder + + # time after which the user input may be expired and no longer actionable + attr_accessor :timeout_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'allowed_inputs' => :'allowed_inputs', + :'allowed_responders' => :'allowed_responders', + :'completed' => :'completed', + :'completed_at' => :'completed_at', + :'created_at' => :'created_at', + :'id' => :'id', + :'input' => :'input', + :'note' => :'note', + :'responder' => :'responder', + :'timeout_at' => :'timeout_at' + } + 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 + { + :'allowed_inputs' => :'Array', + :'allowed_responders' => :'Array', + :'completed' => :'Boolean', + :'completed_at' => :'Time', + :'created_at' => :'Time', + :'id' => :'String', + :'input' => :'String', + :'note' => :'String', + :'responder' => :'String', + :'timeout_at' => :'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::ModelUserInputViewModel` 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::ModelUserInputViewModel`. 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?(:'allowed_inputs') + if (value = attributes[:'allowed_inputs']).is_a?(Array) + self.allowed_inputs = value + end + end + + if attributes.key?(:'allowed_responders') + if (value = attributes[:'allowed_responders']).is_a?(Array) + self.allowed_responders = value + end + end + + if attributes.key?(:'completed') + self.completed = attributes[:'completed'] + end + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'input') + self.input = attributes[:'input'] + end + + if attributes.key?(:'note') + self.note = attributes[:'note'] + end + + if attributes.key?(:'responder') + self.responder = attributes[:'responder'] + end + + if attributes.key?(:'timeout_at') + self.timeout_at = attributes[:'timeout_at'] + 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 @allowed_inputs.nil? + invalid_properties.push('invalid value for "allowed_inputs", allowed_inputs cannot be nil.') + end + + if @allowed_responders.nil? + invalid_properties.push('invalid value for "allowed_responders", allowed_responders cannot be nil.') + end + + if @completed.nil? + invalid_properties.push('invalid value for "completed", completed cannot be nil.') + end + + if @completed_at.nil? + invalid_properties.push('invalid value for "completed_at", completed_at cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @input.nil? + invalid_properties.push('invalid value for "input", input cannot be nil.') + end + + if @note.nil? + invalid_properties.push('invalid value for "note", note cannot be nil.') + end + + if @responder.nil? + invalid_properties.push('invalid value for "responder", responder cannot be nil.') + end + + if @timeout_at.nil? + invalid_properties.push('invalid value for "timeout_at", timeout_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 @allowed_inputs.nil? + return false if @allowed_responders.nil? + return false if @completed.nil? + return false if @completed_at.nil? + return false if @created_at.nil? + return false if @id.nil? + return false if @input.nil? + return false if @note.nil? + return false if @responder.nil? + return false if @timeout_at.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 && + allowed_inputs == o.allowed_inputs && + allowed_responders == o.allowed_responders && + completed == o.completed && + completed_at == o.completed_at && + created_at == o.created_at && + id == o.id && + input == o.input && + note == o.note && + responder == o.responder && + timeout_at == o.timeout_at + 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 + [allowed_inputs, allowed_responders, completed, completed_at, created_at, id, input, note, responder, timeout_at].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_account_entities_input.rb b/lib/crimson-falcon/models/models_account_entities_input.rb new file mode 100644 index 00000000..a80f6b7a --- /dev/null +++ b/lib/crimson-falcon/models/models_account_entities_input.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 ModelsAccountEntitiesInput + attr_accessor :aws_accounts + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'aws_accounts' => :'aws_accounts' + } + 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 + { + :'aws_accounts' => :'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::ModelsAccountEntitiesInput` 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::ModelsAccountEntitiesInput`. 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?(:'aws_accounts') + if (value = attributes[:'aws_accounts']).is_a?(Array) + self.aws_accounts = 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 @aws_accounts.nil? + invalid_properties.push('invalid value for "aws_accounts", aws_accounts 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 @aws_accounts.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 && + aws_accounts == o.aws_accounts + 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 + [aws_accounts].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_account_status_response.rb b/lib/crimson-falcon/models/models_account_status_response.rb new file mode 100644 index 00000000..194a44a6 --- /dev/null +++ b/lib/crimson-falcon/models/models_account_status_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 ModelsAccountStatusResponse + 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' => :'MsaspecMetaInfo', + :'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::ModelsAccountStatusResponse` 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::ModelsAccountStatusResponse`. 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/models_aggregate_values_by_field_response.rb b/lib/crimson-falcon/models/models_aggregate_values_by_field_response.rb new file mode 100644 index 00000000..5cd3cf29 --- /dev/null +++ b/lib/crimson-falcon/models/models_aggregate_values_by_field_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 ModelsAggregateValuesByFieldResponse + 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' => :'MsaspecMetaInfo', + :'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::ModelsAggregateValuesByFieldResponse` 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::ModelsAggregateValuesByFieldResponse`. 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/models_api_assessment_detections.rb b/lib/crimson-falcon/models/models_api_assessment_detections.rb new file mode 100644 index 00000000..39bf6363 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_assessment_detections.rb @@ -0,0 +1,477 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIAssessmentDetections + attr_accessor :description + + attr_accessor :details + + attr_accessor :detection_type + + attr_accessor :id + + attr_accessor :image_architecture + + attr_accessor :image_created_at + + attr_accessor :image_digest + + attr_accessor :image_id + + attr_accessor :image_registry + + attr_accessor :image_repository + + attr_accessor :image_size + + attr_accessor :image_tag + + attr_accessor :name + + attr_accessor :os_name + + attr_accessor :os_version + + attr_accessor :remediation + + attr_accessor :severity + + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'details' => :'details', + :'detection_type' => :'detection_type', + :'id' => :'id', + :'image_architecture' => :'image_architecture', + :'image_created_at' => :'image_created_at', + :'image_digest' => :'image_digest', + :'image_id' => :'image_id', + :'image_registry' => :'image_registry', + :'image_repository' => :'image_repository', + :'image_size' => :'image_size', + :'image_tag' => :'image_tag', + :'name' => :'name', + :'os_name' => :'os_name', + :'os_version' => :'os_version', + :'remediation' => :'remediation', + :'severity' => :'severity', + :'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 + { + :'description' => :'String', + :'details' => :'String', + :'detection_type' => :'String', + :'id' => :'String', + :'image_architecture' => :'String', + :'image_created_at' => :'String', + :'image_digest' => :'String', + :'image_id' => :'String', + :'image_registry' => :'String', + :'image_repository' => :'String', + :'image_size' => :'String', + :'image_tag' => :'String', + :'name' => :'String', + :'os_name' => :'String', + :'os_version' => :'String', + :'remediation' => :'String', + :'severity' => :'String', + :'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::ModelsAPIAssessmentDetections` 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::ModelsAPIAssessmentDetections`. 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?(:'details') + self.details = attributes[:'details'] + end + + if attributes.key?(:'detection_type') + self.detection_type = attributes[:'detection_type'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'image_architecture') + self.image_architecture = attributes[:'image_architecture'] + end + + if attributes.key?(:'image_created_at') + self.image_created_at = attributes[:'image_created_at'] + end + + if attributes.key?(:'image_digest') + self.image_digest = attributes[:'image_digest'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'image_registry') + self.image_registry = attributes[:'image_registry'] + end + + if attributes.key?(:'image_repository') + self.image_repository = attributes[:'image_repository'] + end + + if attributes.key?(:'image_size') + self.image_size = attributes[:'image_size'] + end + + if attributes.key?(:'image_tag') + self.image_tag = attributes[:'image_tag'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'os_name') + self.os_name = attributes[:'os_name'] + end + + if attributes.key?(:'os_version') + self.os_version = attributes[:'os_version'] + end + + if attributes.key?(:'remediation') + self.remediation = attributes[:'remediation'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + 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 + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @details.nil? + invalid_properties.push('invalid value for "details", details cannot be nil.') + end + + if @detection_type.nil? + invalid_properties.push('invalid value for "detection_type", detection_type cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @image_architecture.nil? + invalid_properties.push('invalid value for "image_architecture", image_architecture cannot be nil.') + end + + if @image_created_at.nil? + invalid_properties.push('invalid value for "image_created_at", image_created_at cannot be nil.') + end + + if @image_digest.nil? + invalid_properties.push('invalid value for "image_digest", image_digest cannot be nil.') + end + + if @image_id.nil? + invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') + end + + if @image_registry.nil? + invalid_properties.push('invalid value for "image_registry", image_registry cannot be nil.') + end + + if @image_repository.nil? + invalid_properties.push('invalid value for "image_repository", image_repository cannot be nil.') + end + + if @image_size.nil? + invalid_properties.push('invalid value for "image_size", image_size cannot be nil.') + end + + if @image_tag.nil? + invalid_properties.push('invalid value for "image_tag", image_tag cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @os_name.nil? + invalid_properties.push('invalid value for "os_name", os_name cannot be nil.') + end + + if @os_version.nil? + invalid_properties.push('invalid value for "os_version", os_version cannot be nil.') + end + + if @remediation.nil? + invalid_properties.push('invalid value for "remediation", remediation cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title 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 @details.nil? + return false if @detection_type.nil? + return false if @id.nil? + return false if @image_architecture.nil? + return false if @image_created_at.nil? + return false if @image_digest.nil? + return false if @image_id.nil? + return false if @image_registry.nil? + return false if @image_repository.nil? + return false if @image_size.nil? + return false if @image_tag.nil? + return false if @name.nil? + return false if @os_name.nil? + return false if @os_version.nil? + return false if @remediation.nil? + return false if @severity.nil? + return false if @title.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 && + details == o.details && + detection_type == o.detection_type && + id == o.id && + image_architecture == o.image_architecture && + image_created_at == o.image_created_at && + image_digest == o.image_digest && + image_id == o.image_id && + image_registry == o.image_registry && + image_repository == o.image_repository && + image_size == o.image_size && + image_tag == o.image_tag && + name == o.name && + os_name == o.os_name && + os_version == o.os_version && + remediation == o.remediation && + severity == o.severity && + 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 + [description, details, detection_type, id, image_architecture, image_created_at, image_digest, image_id, image_registry, image_repository, image_size, image_tag, name, os_name, os_version, remediation, severity, 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/models_api_combined_detections.rb b/lib/crimson-falcon/models/models_api_combined_detections.rb new file mode 100644 index 00000000..91cf8481 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_combined_detections.rb @@ -0,0 +1,395 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPICombinedDetections + attr_accessor :cid + + attr_accessor :containers_impacted + + attr_accessor :description + + attr_accessor :details + + attr_accessor :detection_id + + attr_accessor :detection_name + + attr_accessor :detection_severity + + attr_accessor :detection_type + + attr_accessor :images_impacted + + attr_accessor :last_detected + + attr_accessor :remediation + + attr_accessor :title + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cid' => :'cid', + :'containers_impacted' => :'containers_impacted', + :'description' => :'description', + :'details' => :'details', + :'detection_id' => :'detection_id', + :'detection_name' => :'detection_name', + :'detection_severity' => :'detection_severity', + :'detection_type' => :'detection_type', + :'images_impacted' => :'images_impacted', + :'last_detected' => :'last_detected', + :'remediation' => :'remediation', + :'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 + { + :'cid' => :'String', + :'containers_impacted' => :'Integer', + :'description' => :'String', + :'details' => :'Array', + :'detection_id' => :'String', + :'detection_name' => :'String', + :'detection_severity' => :'String', + :'detection_type' => :'String', + :'images_impacted' => :'Integer', + :'last_detected' => :'String', + :'remediation' => :'String', + :'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::ModelsAPICombinedDetections` 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::ModelsAPICombinedDetections`. 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?(:'containers_impacted') + self.containers_impacted = attributes[:'containers_impacted'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'details') + if (value = attributes[:'details']).is_a?(Array) + self.details = value + end + end + + if attributes.key?(:'detection_id') + self.detection_id = attributes[:'detection_id'] + end + + if attributes.key?(:'detection_name') + self.detection_name = attributes[:'detection_name'] + end + + if attributes.key?(:'detection_severity') + self.detection_severity = attributes[:'detection_severity'] + end + + if attributes.key?(:'detection_type') + self.detection_type = attributes[:'detection_type'] + end + + if attributes.key?(:'images_impacted') + self.images_impacted = attributes[:'images_impacted'] + end + + if attributes.key?(:'last_detected') + self.last_detected = attributes[:'last_detected'] + end + + if attributes.key?(:'remediation') + self.remediation = attributes[:'remediation'] + end + + 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 + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @containers_impacted.nil? + invalid_properties.push('invalid value for "containers_impacted", containers_impacted cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @details.nil? + invalid_properties.push('invalid value for "details", details cannot be nil.') + end + + if @detection_id.nil? + invalid_properties.push('invalid value for "detection_id", detection_id cannot be nil.') + end + + if @detection_name.nil? + invalid_properties.push('invalid value for "detection_name", detection_name cannot be nil.') + end + + if @detection_severity.nil? + invalid_properties.push('invalid value for "detection_severity", detection_severity cannot be nil.') + end + + if @detection_type.nil? + invalid_properties.push('invalid value for "detection_type", detection_type cannot be nil.') + end + + if @images_impacted.nil? + invalid_properties.push('invalid value for "images_impacted", images_impacted cannot be nil.') + end + + if @last_detected.nil? + invalid_properties.push('invalid value for "last_detected", last_detected cannot be nil.') + end + + if @remediation.nil? + invalid_properties.push('invalid value for "remediation", remediation cannot be nil.') + end + + if @title.nil? + invalid_properties.push('invalid value for "title", title 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 @containers_impacted.nil? + return false if @description.nil? + return false if @details.nil? + return false if @detection_id.nil? + return false if @detection_name.nil? + return false if @detection_severity.nil? + return false if @detection_type.nil? + return false if @images_impacted.nil? + return false if @last_detected.nil? + return false if @remediation.nil? + return false if @title.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 && + containers_impacted == o.containers_impacted && + description == o.description && + details == o.details && + detection_id == o.detection_id && + detection_name == o.detection_name && + detection_severity == o.detection_severity && + detection_type == o.detection_type && + images_impacted == o.images_impacted && + last_detected == o.last_detected && + remediation == o.remediation && + 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 + [cid, containers_impacted, description, details, detection_id, detection_name, detection_severity, detection_type, images_impacted, last_detected, remediation, 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/models_api_container_alert.rb b/lib/crimson-falcon/models/models_api_container_alert.rb new file mode 100644 index 00000000..48b70d40 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_container_alert.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 ModelsAPIContainerAlert + attr_accessor :containers_impacted_count + + attr_accessor :containers_impacted_ids + + attr_accessor :detection_description + + attr_accessor :detection_event_simple_name + + attr_accessor :detection_name + + attr_accessor :first_seen_timestamp + + attr_accessor :last_seen_timestamp + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'containers_impacted_count' => :'containers_impacted_count', + :'containers_impacted_ids' => :'containers_impacted_ids', + :'detection_description' => :'detection_description', + :'detection_event_simple_name' => :'detection_event_simple_name', + :'detection_name' => :'detection_name', + :'first_seen_timestamp' => :'first_seen_timestamp', + :'last_seen_timestamp' => :'last_seen_timestamp', + :'severity' => :'severity' + } + 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 + { + :'containers_impacted_count' => :'String', + :'containers_impacted_ids' => :'Array', + :'detection_description' => :'String', + :'detection_event_simple_name' => :'String', + :'detection_name' => :'String', + :'first_seen_timestamp' => :'String', + :'last_seen_timestamp' => :'String', + :'severity' => :'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::ModelsAPIContainerAlert` 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::ModelsAPIContainerAlert`. 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?(:'containers_impacted_count') + self.containers_impacted_count = attributes[:'containers_impacted_count'] + end + + if attributes.key?(:'containers_impacted_ids') + if (value = attributes[:'containers_impacted_ids']).is_a?(Array) + self.containers_impacted_ids = value + end + end + + if attributes.key?(:'detection_description') + self.detection_description = attributes[:'detection_description'] + end + + if attributes.key?(:'detection_event_simple_name') + self.detection_event_simple_name = attributes[:'detection_event_simple_name'] + end + + if attributes.key?(:'detection_name') + self.detection_name = attributes[:'detection_name'] + end + + if attributes.key?(:'first_seen_timestamp') + self.first_seen_timestamp = attributes[:'first_seen_timestamp'] + end + + if attributes.key?(:'last_seen_timestamp') + self.last_seen_timestamp = attributes[:'last_seen_timestamp'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + 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 @containers_impacted_count.nil? + invalid_properties.push('invalid value for "containers_impacted_count", containers_impacted_count cannot be nil.') + end + + if @containers_impacted_ids.nil? + invalid_properties.push('invalid value for "containers_impacted_ids", containers_impacted_ids cannot be nil.') + end + + if @detection_description.nil? + invalid_properties.push('invalid value for "detection_description", detection_description cannot be nil.') + end + + if @detection_event_simple_name.nil? + invalid_properties.push('invalid value for "detection_event_simple_name", detection_event_simple_name cannot be nil.') + end + + if @detection_name.nil? + invalid_properties.push('invalid value for "detection_name", detection_name 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 @last_seen_timestamp.nil? + invalid_properties.push('invalid value for "last_seen_timestamp", last_seen_timestamp cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity 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 @containers_impacted_count.nil? + return false if @containers_impacted_ids.nil? + return false if @detection_description.nil? + return false if @detection_event_simple_name.nil? + return false if @detection_name.nil? + return false if @first_seen_timestamp.nil? + return false if @last_seen_timestamp.nil? + return false if @severity.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 && + containers_impacted_count == o.containers_impacted_count && + containers_impacted_ids == o.containers_impacted_ids && + detection_description == o.detection_description && + detection_event_simple_name == o.detection_event_simple_name && + detection_name == o.detection_name && + first_seen_timestamp == o.first_seen_timestamp && + last_seen_timestamp == o.last_seen_timestamp && + severity == o.severity + 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 + [containers_impacted_count, containers_impacted_ids, detection_description, detection_event_simple_name, detection_name, first_seen_timestamp, last_seen_timestamp, severity].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_customer_and_image.rb b/lib/crimson-falcon/models/models_api_customer_and_image.rb new file mode 100644 index 00000000..9e2812d2 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_customer_and_image.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 ModelsAPICustomerAndImage + attr_accessor :base_os + + attr_accessor :base_os_version + + attr_accessor :cid + + attr_accessor :config + + attr_accessor :created_at + + attr_accessor :crowdstrike_user + + attr_accessor :digest + + attr_accessor :eol_date + + attr_accessor :first_scanned + + attr_accessor :image_id + + attr_accessor :image_scanning_active + + attr_accessor :image_size + + attr_accessor :registry + + attr_accessor :repository + + attr_accessor :tag + + attr_accessor :updated_at + + attr_accessor :uuid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'base_os' => :'base_os', + :'base_os_version' => :'base_os_version', + :'cid' => :'cid', + :'config' => :'config', + :'created_at' => :'created_at', + :'crowdstrike_user' => :'crowdstrike_user', + :'digest' => :'digest', + :'eol_date' => :'eol_date', + :'first_scanned' => :'first_scanned', + :'image_id' => :'image_id', + :'image_scanning_active' => :'image_scanning_active', + :'image_size' => :'image_size', + :'registry' => :'registry', + :'repository' => :'repository', + :'tag' => :'tag', + :'updated_at' => :'updated_at', + :'uuid' => :'uuid' + } + 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 + { + :'base_os' => :'String', + :'base_os_version' => :'String', + :'cid' => :'String', + :'config' => :'ModelsLightWeightConfig', + :'created_at' => :'String', + :'crowdstrike_user' => :'String', + :'digest' => :'String', + :'eol_date' => :'String', + :'first_scanned' => :'String', + :'image_id' => :'String', + :'image_scanning_active' => :'Boolean', + :'image_size' => :'Integer', + :'registry' => :'String', + :'repository' => :'String', + :'tag' => :'String', + :'updated_at' => :'String', + :'uuid' => :'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::ModelsAPICustomerAndImage` 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::ModelsAPICustomerAndImage`. 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?(:'base_os') + self.base_os = attributes[:'base_os'] + end + + if attributes.key?(:'base_os_version') + self.base_os_version = attributes[:'base_os_version'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'config') + self.config = attributes[:'config'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'crowdstrike_user') + self.crowdstrike_user = attributes[:'crowdstrike_user'] + end + + if attributes.key?(:'digest') + self.digest = attributes[:'digest'] + end + + if attributes.key?(:'eol_date') + self.eol_date = attributes[:'eol_date'] + end + + if attributes.key?(:'first_scanned') + self.first_scanned = attributes[:'first_scanned'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'image_scanning_active') + self.image_scanning_active = attributes[:'image_scanning_active'] + end + + if attributes.key?(:'image_size') + self.image_size = attributes[:'image_size'] + end + + if attributes.key?(:'registry') + self.registry = attributes[:'registry'] + end + + if attributes.key?(:'repository') + self.repository = attributes[:'repository'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + 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 @base_os.nil? + invalid_properties.push('invalid value for "base_os", base_os cannot be nil.') + end + + if @base_os_version.nil? + invalid_properties.push('invalid value for "base_os_version", base_os_version cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @crowdstrike_user.nil? + invalid_properties.push('invalid value for "crowdstrike_user", crowdstrike_user cannot be nil.') + end + + if @digest.nil? + invalid_properties.push('invalid value for "digest", digest cannot be nil.') + end + + if @eol_date.nil? + invalid_properties.push('invalid value for "eol_date", eol_date cannot be nil.') + end + + if @first_scanned.nil? + invalid_properties.push('invalid value for "first_scanned", first_scanned cannot be nil.') + end + + if @image_id.nil? + invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') + end + + if @image_scanning_active.nil? + invalid_properties.push('invalid value for "image_scanning_active", image_scanning_active cannot be nil.') + end + + if @image_size.nil? + invalid_properties.push('invalid value for "image_size", image_size cannot be nil.') + end + + if @registry.nil? + invalid_properties.push('invalid value for "registry", registry cannot be nil.') + end + + if @repository.nil? + invalid_properties.push('invalid value for "repository", repository cannot be nil.') + end + + if @tag.nil? + invalid_properties.push('invalid value for "tag", tag cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + if @uuid.nil? + invalid_properties.push('invalid value for "uuid", uuid 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 @base_os.nil? + return false if @base_os_version.nil? + return false if @cid.nil? + return false if @created_at.nil? + return false if @crowdstrike_user.nil? + return false if @digest.nil? + return false if @eol_date.nil? + return false if @first_scanned.nil? + return false if @image_id.nil? + return false if @image_scanning_active.nil? + return false if @image_size.nil? + return false if @registry.nil? + return false if @repository.nil? + return false if @tag.nil? + return false if @updated_at.nil? + return false if @uuid.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 && + base_os == o.base_os && + base_os_version == o.base_os_version && + cid == o.cid && + config == o.config && + created_at == o.created_at && + crowdstrike_user == o.crowdstrike_user && + digest == o.digest && + eol_date == o.eol_date && + first_scanned == o.first_scanned && + image_id == o.image_id && + image_scanning_active == o.image_scanning_active && + image_size == o.image_size && + registry == o.registry && + repository == o.repository && + tag == o.tag && + updated_at == o.updated_at && + uuid == o.uuid + 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 + [base_os, base_os_version, cid, config, created_at, crowdstrike_user, digest, eol_date, first_scanned, image_id, image_scanning_active, image_size, registry, repository, tag, updated_at, uuid].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_detection_count.rb b/lib/crimson-falcon/models/models_api_detection_count.rb new file mode 100644 index 00000000..2c1deabe --- /dev/null +++ b/lib/crimson-falcon/models/models_api_detection_count.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 ModelsAPIDetectionCount + attr_accessor :count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'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 + { + :'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::ModelsAPIDetectionCount` 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::ModelsAPIDetectionCount`. 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 + 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 @count.nil? + invalid_properties.push('invalid value for "count", count 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 @count.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 && + count == o.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 + [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/models_api_detection_count_by_type.rb b/lib/crimson-falcon/models/models_api_detection_count_by_type.rb new file mode 100644 index 00000000..b054ec81 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_detection_count_by_type.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 ModelsAPIDetectionCountByType + attr_accessor :count + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'type' => :'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 + { + :'count' => :'Integer', + :'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::ModelsAPIDetectionCountByType` 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::ModelsAPIDetectionCountByType`. 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?(:'type') + self.type = attributes[:'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 + if @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type 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 @count.nil? + return false if @type.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 && + count == o.count && + type == o.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 + [count, 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/models_api_drift_indicators.rb b/lib/crimson-falcon/models/models_api_drift_indicators.rb new file mode 100644 index 00000000..246a64f4 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_drift_indicators.rb @@ -0,0 +1,577 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIDriftIndicators + attr_accessor :agent_id + + attr_accessor :aid + + attr_accessor :cid + + attr_accessor :cloud_name + + attr_accessor :command_line + + attr_accessor :computer_name + + attr_accessor :container_id + + attr_accessor :detection_description + + attr_accessor :detection_id + + attr_accessor :detection_name + + attr_accessor :file_name + + attr_accessor :host_id + + attr_accessor :indicator_process_id + + attr_accessor :namespace + + attr_accessor :occurred_at + + attr_accessor :parent_process_id + + attr_accessor :pod_id + + attr_accessor :pod_name + + attr_accessor :prevented + + attr_accessor :prevention_status + + attr_accessor :prevention_status_string + + attr_accessor :scheduler_name + + attr_accessor :severity + + attr_accessor :sha256 + + attr_accessor :timestamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'agent_id' => :'agent_id', + :'aid' => :'aid', + :'cid' => :'cid', + :'cloud_name' => :'cloud_name', + :'command_line' => :'command_line', + :'computer_name' => :'computer_name', + :'container_id' => :'container_id', + :'detection_description' => :'detection_description', + :'detection_id' => :'detection_id', + :'detection_name' => :'detection_name', + :'file_name' => :'file_name', + :'host_id' => :'host_id', + :'indicator_process_id' => :'indicator_process_id', + :'namespace' => :'namespace', + :'occurred_at' => :'occurred_at', + :'parent_process_id' => :'parent_process_id', + :'pod_id' => :'pod_id', + :'pod_name' => :'pod_name', + :'prevented' => :'prevented', + :'prevention_status' => :'prevention_status', + :'prevention_status_string' => :'prevention_status_string', + :'scheduler_name' => :'scheduler_name', + :'severity' => :'severity', + :'sha256' => :'sha256', + :'timestamp' => :'timestamp' + } + 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 + { + :'agent_id' => :'String', + :'aid' => :'String', + :'cid' => :'String', + :'cloud_name' => :'String', + :'command_line' => :'String', + :'computer_name' => :'String', + :'container_id' => :'String', + :'detection_description' => :'String', + :'detection_id' => :'String', + :'detection_name' => :'String', + :'file_name' => :'String', + :'host_id' => :'String', + :'indicator_process_id' => :'String', + :'namespace' => :'String', + :'occurred_at' => :'String', + :'parent_process_id' => :'String', + :'pod_id' => :'String', + :'pod_name' => :'String', + :'prevented' => :'Boolean', + :'prevention_status' => :'Array', + :'prevention_status_string' => :'String', + :'scheduler_name' => :'String', + :'severity' => :'String', + :'sha256' => :'String', + :'timestamp' => :'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::ModelsAPIDriftIndicators` 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::ModelsAPIDriftIndicators`. 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?(:'agent_id') + self.agent_id = attributes[:'agent_id'] + end + + if attributes.key?(:'aid') + self.aid = attributes[:'aid'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cloud_name') + self.cloud_name = attributes[:'cloud_name'] + end + + if attributes.key?(:'command_line') + self.command_line = attributes[:'command_line'] + end + + if attributes.key?(:'computer_name') + self.computer_name = attributes[:'computer_name'] + end + + if attributes.key?(:'container_id') + self.container_id = attributes[:'container_id'] + end + + if attributes.key?(:'detection_description') + self.detection_description = attributes[:'detection_description'] + end + + if attributes.key?(:'detection_id') + self.detection_id = attributes[:'detection_id'] + end + + if attributes.key?(:'detection_name') + self.detection_name = attributes[:'detection_name'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'host_id') + self.host_id = attributes[:'host_id'] + end + + if attributes.key?(:'indicator_process_id') + self.indicator_process_id = attributes[:'indicator_process_id'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'occurred_at') + self.occurred_at = attributes[:'occurred_at'] + end + + if attributes.key?(:'parent_process_id') + self.parent_process_id = attributes[:'parent_process_id'] + end + + if attributes.key?(:'pod_id') + self.pod_id = attributes[:'pod_id'] + end + + if attributes.key?(:'pod_name') + self.pod_name = attributes[:'pod_name'] + end + + if attributes.key?(:'prevented') + self.prevented = attributes[:'prevented'] + end + + if attributes.key?(:'prevention_status') + if (value = attributes[:'prevention_status']).is_a?(Array) + self.prevention_status = value + end + end + + if attributes.key?(:'prevention_status_string') + self.prevention_status_string = attributes[:'prevention_status_string'] + end + + if attributes.key?(:'scheduler_name') + self.scheduler_name = attributes[:'scheduler_name'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'sha256') + self.sha256 = attributes[:'sha256'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + 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 @agent_id.nil? + invalid_properties.push('invalid value for "agent_id", agent_id cannot be nil.') + end + + if @aid.nil? + invalid_properties.push('invalid value for "aid", aid cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cloud_name.nil? + invalid_properties.push('invalid value for "cloud_name", cloud_name cannot be nil.') + end + + if @command_line.nil? + invalid_properties.push('invalid value for "command_line", command_line cannot be nil.') + end + + if @computer_name.nil? + invalid_properties.push('invalid value for "computer_name", computer_name cannot be nil.') + end + + if @container_id.nil? + invalid_properties.push('invalid value for "container_id", container_id cannot be nil.') + end + + if @detection_description.nil? + invalid_properties.push('invalid value for "detection_description", detection_description cannot be nil.') + end + + if @detection_id.nil? + invalid_properties.push('invalid value for "detection_id", detection_id cannot be nil.') + end + + if @detection_name.nil? + invalid_properties.push('invalid value for "detection_name", detection_name cannot be nil.') + end + + if @file_name.nil? + invalid_properties.push('invalid value for "file_name", file_name cannot be nil.') + end + + if @host_id.nil? + invalid_properties.push('invalid value for "host_id", host_id cannot be nil.') + end + + if @indicator_process_id.nil? + invalid_properties.push('invalid value for "indicator_process_id", indicator_process_id cannot be nil.') + end + + if @namespace.nil? + invalid_properties.push('invalid value for "namespace", namespace cannot be nil.') + end + + if @occurred_at.nil? + invalid_properties.push('invalid value for "occurred_at", occurred_at cannot be nil.') + end + + if @parent_process_id.nil? + invalid_properties.push('invalid value for "parent_process_id", parent_process_id cannot be nil.') + end + + if @pod_id.nil? + invalid_properties.push('invalid value for "pod_id", pod_id cannot be nil.') + end + + if @pod_name.nil? + invalid_properties.push('invalid value for "pod_name", pod_name cannot be nil.') + end + + if @prevented.nil? + invalid_properties.push('invalid value for "prevented", prevented cannot be nil.') + end + + if @prevention_status.nil? + invalid_properties.push('invalid value for "prevention_status", prevention_status cannot be nil.') + end + + if @prevention_status_string.nil? + invalid_properties.push('invalid value for "prevention_status_string", prevention_status_string cannot be nil.') + end + + if @scheduler_name.nil? + invalid_properties.push('invalid value for "scheduler_name", scheduler_name cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @sha256.nil? + invalid_properties.push('invalid value for "sha256", sha256 cannot be nil.') + end + + if @timestamp.nil? + invalid_properties.push('invalid value for "timestamp", timestamp 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 @agent_id.nil? + return false if @aid.nil? + return false if @cid.nil? + return false if @cloud_name.nil? + return false if @command_line.nil? + return false if @computer_name.nil? + return false if @container_id.nil? + return false if @detection_description.nil? + return false if @detection_id.nil? + return false if @detection_name.nil? + return false if @file_name.nil? + return false if @host_id.nil? + return false if @indicator_process_id.nil? + return false if @namespace.nil? + return false if @occurred_at.nil? + return false if @parent_process_id.nil? + return false if @pod_id.nil? + return false if @pod_name.nil? + return false if @prevented.nil? + return false if @prevention_status.nil? + return false if @prevention_status_string.nil? + return false if @scheduler_name.nil? + return false if @severity.nil? + return false if @sha256.nil? + return false if @timestamp.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 && + agent_id == o.agent_id && + aid == o.aid && + cid == o.cid && + cloud_name == o.cloud_name && + command_line == o.command_line && + computer_name == o.computer_name && + container_id == o.container_id && + detection_description == o.detection_description && + detection_id == o.detection_id && + detection_name == o.detection_name && + file_name == o.file_name && + host_id == o.host_id && + indicator_process_id == o.indicator_process_id && + namespace == o.namespace && + occurred_at == o.occurred_at && + parent_process_id == o.parent_process_id && + pod_id == o.pod_id && + pod_name == o.pod_name && + prevented == o.prevented && + prevention_status == o.prevention_status && + prevention_status_string == o.prevention_status_string && + scheduler_name == o.scheduler_name && + severity == o.severity && + sha256 == o.sha256 && + timestamp == o.timestamp + 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 + [agent_id, aid, cid, cloud_name, command_line, computer_name, container_id, detection_description, detection_id, detection_name, file_name, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_id, pod_name, prevented, prevention_status, prevention_status_string, scheduler_name, severity, sha256, timestamp].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_filter_label.rb b/lib/crimson-falcon/models/models_api_filter_label.rb new file mode 100644 index 00000000..754e93da --- /dev/null +++ b/lib/crimson-falcon/models/models_api_filter_label.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 ModelsAPIFilterLabel + attr_accessor :count + + attr_accessor :label + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'label' => :'label' + } + 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', + :'label' => :'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::ModelsAPIFilterLabel` 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::ModelsAPIFilterLabel`. 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?(:'label') + self.label = attributes[:'label'] + 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 @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + if @label.nil? + invalid_properties.push('invalid value for "label", label 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 @count.nil? + return false if @label.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 && + count == o.count && + label == o.label + 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, label].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_filter_response.rb b/lib/crimson-falcon/models/models_api_filter_response.rb new file mode 100644 index 00000000..5302a3ec --- /dev/null +++ b/lib/crimson-falcon/models/models_api_filter_response.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 ModelsAPIFilterResponse + attr_accessor :buckets + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'buckets' => :'buckets', + :'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 + { + :'buckets' => :'Array', + :'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::ModelsAPIFilterResponse` 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::ModelsAPIFilterResponse`. 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?(:'buckets') + if (value = attributes[:'buckets']).is_a?(Array) + self.buckets = value + end + 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 + if @buckets.nil? + invalid_properties.push('invalid value for "buckets", buckets 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 @buckets.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 && + buckets == o.buckets && + 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 + [buckets, 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/models_api_image_assessment.rb b/lib/crimson-falcon/models/models_api_image_assessment.rb new file mode 100644 index 00000000..8ce97eed --- /dev/null +++ b/lib/crimson-falcon/models/models_api_image_assessment.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 ModelsAPIImageAssessment + attr_accessor :assessed + + attr_accessor :error_image_pull + + attr_accessor :error_image_push + + attr_accessor :error_missing_config + + attr_accessor :error_unsupported_schema_version + + attr_accessor :time_stamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assessed' => :'assessed', + :'error_image_pull' => :'error_image_pull', + :'error_image_push' => :'error_image_push', + :'error_missing_config' => :'error_missing_config', + :'error_unsupported_schema_version' => :'error_unsupported_schema_version', + :'time_stamp' => :'time_stamp' + } + 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 + { + :'assessed' => :'Integer', + :'error_image_pull' => :'Integer', + :'error_image_push' => :'Integer', + :'error_missing_config' => :'Integer', + :'error_unsupported_schema_version' => :'Integer', + :'time_stamp' => :'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::ModelsAPIImageAssessment` 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::ModelsAPIImageAssessment`. 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?(:'assessed') + self.assessed = attributes[:'assessed'] + end + + if attributes.key?(:'error_image_pull') + self.error_image_pull = attributes[:'error_image_pull'] + end + + if attributes.key?(:'error_image_push') + self.error_image_push = attributes[:'error_image_push'] + end + + if attributes.key?(:'error_missing_config') + self.error_missing_config = attributes[:'error_missing_config'] + end + + if attributes.key?(:'error_unsupported_schema_version') + self.error_unsupported_schema_version = attributes[:'error_unsupported_schema_version'] + end + + if attributes.key?(:'time_stamp') + self.time_stamp = attributes[:'time_stamp'] + 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 @assessed.nil? + invalid_properties.push('invalid value for "assessed", assessed cannot be nil.') + end + + if @error_image_pull.nil? + invalid_properties.push('invalid value for "error_image_pull", error_image_pull cannot be nil.') + end + + if @error_image_push.nil? + invalid_properties.push('invalid value for "error_image_push", error_image_push cannot be nil.') + end + + if @error_missing_config.nil? + invalid_properties.push('invalid value for "error_missing_config", error_missing_config cannot be nil.') + end + + if @error_unsupported_schema_version.nil? + invalid_properties.push('invalid value for "error_unsupported_schema_version", error_unsupported_schema_version cannot be nil.') + end + + if @time_stamp.nil? + invalid_properties.push('invalid value for "time_stamp", time_stamp 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 @assessed.nil? + return false if @error_image_pull.nil? + return false if @error_image_push.nil? + return false if @error_missing_config.nil? + return false if @error_unsupported_schema_version.nil? + return false if @time_stamp.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 && + assessed == o.assessed && + error_image_pull == o.error_image_pull && + error_image_push == o.error_image_push && + error_missing_config == o.error_missing_config && + error_unsupported_schema_version == o.error_unsupported_schema_version && + time_stamp == o.time_stamp + 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 + [assessed, error_image_pull, error_image_push, error_missing_config, error_unsupported_schema_version, time_stamp].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_image_assessment_history.rb b/lib/crimson-falcon/models/models_api_image_assessment_history.rb new file mode 100644 index 00000000..b660b202 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_image_assessment_history.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 ModelsAPIImageAssessmentHistory + attr_accessor :buckets + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'buckets' => :'buckets', + :'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 + { + :'buckets' => :'Array', + :'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::ModelsAPIImageAssessmentHistory` 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::ModelsAPIImageAssessmentHistory`. 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?(:'buckets') + if (value = attributes[:'buckets']).is_a?(Array) + self.buckets = value + end + 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 + if @buckets.nil? + invalid_properties.push('invalid value for "buckets", buckets 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 @buckets.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 && + buckets == o.buckets && + 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 + [buckets, 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/models_api_image_by_vulnerability_count.rb b/lib/crimson-falcon/models/models_api_image_by_vulnerability_count.rb new file mode 100644 index 00000000..b2040ee6 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_image_by_vulnerability_count.rb @@ -0,0 +1,295 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIImageByVulnerabilityCount + attr_accessor :image_id + + attr_accessor :registry + + attr_accessor :repository + + attr_accessor :tag + + attr_accessor :vulnerability_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'image_id' => :'image_id', + :'registry' => :'registry', + :'repository' => :'repository', + :'tag' => :'tag', + :'vulnerability_count' => :'vulnerability_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 + { + :'image_id' => :'String', + :'registry' => :'String', + :'repository' => :'String', + :'tag' => :'String', + :'vulnerability_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::ModelsAPIImageByVulnerabilityCount` 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::ModelsAPIImageByVulnerabilityCount`. 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?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'registry') + self.registry = attributes[:'registry'] + end + + if attributes.key?(:'repository') + self.repository = attributes[:'repository'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'vulnerability_count') + self.vulnerability_count = attributes[:'vulnerability_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 + if @image_id.nil? + invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') + end + + if @registry.nil? + invalid_properties.push('invalid value for "registry", registry cannot be nil.') + end + + if @repository.nil? + invalid_properties.push('invalid value for "repository", repository cannot be nil.') + end + + if @tag.nil? + invalid_properties.push('invalid value for "tag", tag cannot be nil.') + end + + if @vulnerability_count.nil? + invalid_properties.push('invalid value for "vulnerability_count", vulnerability_count 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 @image_id.nil? + return false if @registry.nil? + return false if @repository.nil? + return false if @tag.nil? + return false if @vulnerability_count.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 && + image_id == o.image_id && + registry == o.registry && + repository == o.repository && + tag == o.tag && + vulnerability_count == o.vulnerability_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 + [image_id, registry, repository, tag, vulnerability_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/models_api_image_combined_export.rb b/lib/crimson-falcon/models/models_api_image_combined_export.rb new file mode 100644 index 00000000..287336df --- /dev/null +++ b/lib/crimson-falcon/models/models_api_image_combined_export.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 'date' +require 'time' + +module Falcon + class ModelsAPIImageCombinedExport + attr_accessor :base_os + + attr_accessor :cid + + attr_accessor :cve_id + + attr_accessor :cvss_score + + attr_accessor :detection_name + + attr_accessor :detection_severity + + attr_accessor :detection_type + + attr_accessor :first_seen + + attr_accessor :image_digest + + attr_accessor :image_id + + attr_accessor :last_seen + + attr_accessor :packages_impacted + + attr_accessor :registry + + attr_accessor :repository + + attr_accessor :started_containers + + attr_accessor :stopped_containers + + attr_accessor :tag + + attr_accessor :vulnerability_cps_rating + + attr_accessor :vulnerability_description + + attr_accessor :vulnerability_severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'base_os' => :'base_os', + :'cid' => :'cid', + :'cve_id' => :'cve_id', + :'cvss_score' => :'cvss_score', + :'detection_name' => :'detection_name', + :'detection_severity' => :'detection_severity', + :'detection_type' => :'detection_type', + :'first_seen' => :'first_seen', + :'image_digest' => :'image_digest', + :'image_id' => :'image_id', + :'last_seen' => :'last_seen', + :'packages_impacted' => :'packages_impacted', + :'registry' => :'registry', + :'repository' => :'repository', + :'started_containers' => :'started_containers', + :'stopped_containers' => :'stopped_containers', + :'tag' => :'tag', + :'vulnerability_cps_rating' => :'vulnerability_cps_rating', + :'vulnerability_description' => :'vulnerability_description', + :'vulnerability_severity' => :'vulnerability_severity' + } + 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 + { + :'base_os' => :'String', + :'cid' => :'String', + :'cve_id' => :'String', + :'cvss_score' => :'String', + :'detection_name' => :'String', + :'detection_severity' => :'String', + :'detection_type' => :'String', + :'first_seen' => :'String', + :'image_digest' => :'String', + :'image_id' => :'String', + :'last_seen' => :'String', + :'packages_impacted' => :'Integer', + :'registry' => :'String', + :'repository' => :'String', + :'started_containers' => :'Integer', + :'stopped_containers' => :'Integer', + :'tag' => :'String', + :'vulnerability_cps_rating' => :'String', + :'vulnerability_description' => :'String', + :'vulnerability_severity' => :'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::ModelsAPIImageCombinedExport` 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::ModelsAPIImageCombinedExport`. 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?(:'base_os') + self.base_os = attributes[:'base_os'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cve_id') + self.cve_id = attributes[:'cve_id'] + end + + if attributes.key?(:'cvss_score') + self.cvss_score = attributes[:'cvss_score'] + end + + if attributes.key?(:'detection_name') + self.detection_name = attributes[:'detection_name'] + end + + if attributes.key?(:'detection_severity') + self.detection_severity = attributes[:'detection_severity'] + end + + if attributes.key?(:'detection_type') + self.detection_type = attributes[:'detection_type'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'image_digest') + self.image_digest = attributes[:'image_digest'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'packages_impacted') + self.packages_impacted = attributes[:'packages_impacted'] + end + + if attributes.key?(:'registry') + self.registry = attributes[:'registry'] + end + + if attributes.key?(:'repository') + self.repository = attributes[:'repository'] + end + + if attributes.key?(:'started_containers') + self.started_containers = attributes[:'started_containers'] + end + + if attributes.key?(:'stopped_containers') + self.stopped_containers = attributes[:'stopped_containers'] + end + + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] + end + + if attributes.key?(:'vulnerability_cps_rating') + self.vulnerability_cps_rating = attributes[:'vulnerability_cps_rating'] + end + + if attributes.key?(:'vulnerability_description') + self.vulnerability_description = attributes[:'vulnerability_description'] + end + + if attributes.key?(:'vulnerability_severity') + self.vulnerability_severity = attributes[:'vulnerability_severity'] + 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 @base_os.nil? + invalid_properties.push('invalid value for "base_os", base_os cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cve_id.nil? + invalid_properties.push('invalid value for "cve_id", cve_id cannot be nil.') + end + + if @cvss_score.nil? + invalid_properties.push('invalid value for "cvss_score", cvss_score cannot be nil.') + end + + if @detection_name.nil? + invalid_properties.push('invalid value for "detection_name", detection_name cannot be nil.') + end + + if @detection_severity.nil? + invalid_properties.push('invalid value for "detection_severity", detection_severity cannot be nil.') + end + + if @detection_type.nil? + invalid_properties.push('invalid value for "detection_type", detection_type cannot be nil.') + end + + if @first_seen.nil? + invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.') + end + + if @image_digest.nil? + invalid_properties.push('invalid value for "image_digest", image_digest cannot be nil.') + end + + if @image_id.nil? + invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @packages_impacted.nil? + invalid_properties.push('invalid value for "packages_impacted", packages_impacted cannot be nil.') + end + + if @registry.nil? + invalid_properties.push('invalid value for "registry", registry cannot be nil.') + end + + if @repository.nil? + invalid_properties.push('invalid value for "repository", repository cannot be nil.') + end + + if @started_containers.nil? + invalid_properties.push('invalid value for "started_containers", started_containers cannot be nil.') + end + + if @stopped_containers.nil? + invalid_properties.push('invalid value for "stopped_containers", stopped_containers cannot be nil.') + end + + if @tag.nil? + invalid_properties.push('invalid value for "tag", tag cannot be nil.') + end + + if @vulnerability_cps_rating.nil? + invalid_properties.push('invalid value for "vulnerability_cps_rating", vulnerability_cps_rating cannot be nil.') + end + + if @vulnerability_description.nil? + invalid_properties.push('invalid value for "vulnerability_description", vulnerability_description cannot be nil.') + end + + if @vulnerability_severity.nil? + invalid_properties.push('invalid value for "vulnerability_severity", vulnerability_severity 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 @base_os.nil? + return false if @cid.nil? + return false if @cve_id.nil? + return false if @cvss_score.nil? + return false if @detection_name.nil? + return false if @detection_severity.nil? + return false if @detection_type.nil? + return false if @first_seen.nil? + return false if @image_digest.nil? + return false if @image_id.nil? + return false if @last_seen.nil? + return false if @packages_impacted.nil? + return false if @registry.nil? + return false if @repository.nil? + return false if @started_containers.nil? + return false if @stopped_containers.nil? + return false if @tag.nil? + return false if @vulnerability_cps_rating.nil? + return false if @vulnerability_description.nil? + return false if @vulnerability_severity.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 && + base_os == o.base_os && + cid == o.cid && + cve_id == o.cve_id && + cvss_score == o.cvss_score && + detection_name == o.detection_name && + detection_severity == o.detection_severity && + detection_type == o.detection_type && + first_seen == o.first_seen && + image_digest == o.image_digest && + image_id == o.image_id && + last_seen == o.last_seen && + packages_impacted == o.packages_impacted && + registry == o.registry && + repository == o.repository && + started_containers == o.started_containers && + stopped_containers == o.stopped_containers && + tag == o.tag && + vulnerability_cps_rating == o.vulnerability_cps_rating && + vulnerability_description == o.vulnerability_description && + vulnerability_severity == o.vulnerability_severity + 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 + [base_os, cid, cve_id, cvss_score, detection_name, detection_severity, detection_type, first_seen, image_digest, image_id, last_seen, packages_impacted, registry, repository, started_containers, stopped_containers, tag, vulnerability_cps_rating, vulnerability_description, vulnerability_severity].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_image_count.rb b/lib/crimson-falcon/models/models_api_image_count.rb new file mode 100644 index 00000000..76b42aff --- /dev/null +++ b/lib/crimson-falcon/models/models_api_image_count.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 ModelsAPIImageCount + attr_accessor :count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'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 + { + :'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::ModelsAPIImageCount` 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::ModelsAPIImageCount`. 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 + 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 @count.nil? + invalid_properties.push('invalid value for "count", count 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 @count.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 && + count == o.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 + [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/models_api_image_issues_summary.rb b/lib/crimson-falcon/models/models_api_image_issues_summary.rb new file mode 100644 index 00000000..6fb592cf --- /dev/null +++ b/lib/crimson-falcon/models/models_api_image_issues_summary.rb @@ -0,0 +1,359 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIImageIssuesSummary + attr_accessor :image_container_info + + attr_accessor :image_detections + + attr_accessor :is_dca_run + + attr_accessor :known_issues + + attr_accessor :packages_info + + attr_accessor :policies_summary + + attr_accessor :runtime_detections + + attr_accessor :vulnerabilities_summary + + attr_accessor :zero_day_impacted + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'image_container_info' => :'image_container_info', + :'image_detections' => :'image_detections', + :'is_dca_run' => :'is_dca_run', + :'known_issues' => :'known_issues', + :'packages_info' => :'packages_info', + :'policies_summary' => :'policies_summary', + :'runtime_detections' => :'runtime_detections', + :'vulnerabilities_summary' => :'vulnerabilities_summary', + :'zero_day_impacted' => :'zero_day_impacted' + } + 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 + { + :'image_container_info' => :'ModelsIssuesSummaryContainerInfo', + :'image_detections' => :'Array', + :'is_dca_run' => :'Boolean', + :'known_issues' => :'Integer', + :'packages_info' => :'ModelsImageSummaryPackagesInfo', + :'policies_summary' => :'Array', + :'runtime_detections' => :'Array', + :'vulnerabilities_summary' => :'Array', + :'zero_day_impacted' => :'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::ModelsAPIImageIssuesSummary` 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::ModelsAPIImageIssuesSummary`. 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?(:'image_container_info') + self.image_container_info = attributes[:'image_container_info'] + end + + if attributes.key?(:'image_detections') + if (value = attributes[:'image_detections']).is_a?(Array) + self.image_detections = value + end + end + + if attributes.key?(:'is_dca_run') + self.is_dca_run = attributes[:'is_dca_run'] + end + + if attributes.key?(:'known_issues') + self.known_issues = attributes[:'known_issues'] + end + + if attributes.key?(:'packages_info') + self.packages_info = attributes[:'packages_info'] + end + + if attributes.key?(:'policies_summary') + if (value = attributes[:'policies_summary']).is_a?(Array) + self.policies_summary = value + end + end + + if attributes.key?(:'runtime_detections') + if (value = attributes[:'runtime_detections']).is_a?(Array) + self.runtime_detections = value + end + end + + if attributes.key?(:'vulnerabilities_summary') + if (value = attributes[:'vulnerabilities_summary']).is_a?(Array) + self.vulnerabilities_summary = value + end + end + + if attributes.key?(:'zero_day_impacted') + self.zero_day_impacted = attributes[:'zero_day_impacted'] + 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 @image_container_info.nil? + invalid_properties.push('invalid value for "image_container_info", image_container_info cannot be nil.') + end + + if @image_detections.nil? + invalid_properties.push('invalid value for "image_detections", image_detections cannot be nil.') + end + + if @is_dca_run.nil? + invalid_properties.push('invalid value for "is_dca_run", is_dca_run cannot be nil.') + end + + if @known_issues.nil? + invalid_properties.push('invalid value for "known_issues", known_issues cannot be nil.') + end + + if @packages_info.nil? + invalid_properties.push('invalid value for "packages_info", packages_info cannot be nil.') + end + + if @policies_summary.nil? + invalid_properties.push('invalid value for "policies_summary", policies_summary cannot be nil.') + end + + if @runtime_detections.nil? + invalid_properties.push('invalid value for "runtime_detections", runtime_detections cannot be nil.') + end + + if @vulnerabilities_summary.nil? + invalid_properties.push('invalid value for "vulnerabilities_summary", vulnerabilities_summary cannot be nil.') + end + + if @zero_day_impacted.nil? + invalid_properties.push('invalid value for "zero_day_impacted", zero_day_impacted 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 @image_container_info.nil? + return false if @image_detections.nil? + return false if @is_dca_run.nil? + return false if @known_issues.nil? + return false if @packages_info.nil? + return false if @policies_summary.nil? + return false if @runtime_detections.nil? + return false if @vulnerabilities_summary.nil? + return false if @zero_day_impacted.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 && + image_container_info == o.image_container_info && + image_detections == o.image_detections && + is_dca_run == o.is_dca_run && + known_issues == o.known_issues && + packages_info == o.packages_info && + policies_summary == o.policies_summary && + runtime_detections == o.runtime_detections && + vulnerabilities_summary == o.vulnerabilities_summary && + zero_day_impacted == o.zero_day_impacted + 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 + [image_container_info, image_detections, is_dca_run, known_issues, packages_info, policies_summary, runtime_detections, vulnerabilities_summary, zero_day_impacted].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_image_vulnerabilities_summary.rb b/lib/crimson-falcon/models/models_api_image_vulnerabilities_summary.rb new file mode 100644 index 00000000..1a6bb59d --- /dev/null +++ b/lib/crimson-falcon/models/models_api_image_vulnerabilities_summary.rb @@ -0,0 +1,357 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIImageVulnerabilitiesSummary + attr_accessor :app_packages_with_vulnerabilities + + attr_accessor :app_vuln_by_severity + + attr_accessor :image_vuln_by_severity + + attr_accessor :layers_with_vulnerabilities + + attr_accessor :os_packages_with_vulnerabilities + + attr_accessor :os_vuln_by_severity + + attr_accessor :total_app_packages + + attr_accessor :total_os_packages + + attr_accessor :total_vulnerabilities + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_packages_with_vulnerabilities' => :'app_packages_with_vulnerabilities', + :'app_vuln_by_severity' => :'app_vuln_by_severity', + :'image_vuln_by_severity' => :'image_vuln_by_severity', + :'layers_with_vulnerabilities' => :'layers_with_vulnerabilities', + :'os_packages_with_vulnerabilities' => :'os_packages_with_vulnerabilities', + :'os_vuln_by_severity' => :'os_vuln_by_severity', + :'total_app_packages' => :'total_app_packages', + :'total_os_packages' => :'total_os_packages', + :'total_vulnerabilities' => :'total_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 + { + :'app_packages_with_vulnerabilities' => :'Integer', + :'app_vuln_by_severity' => :'Array', + :'image_vuln_by_severity' => :'Array', + :'layers_with_vulnerabilities' => :'Integer', + :'os_packages_with_vulnerabilities' => :'Integer', + :'os_vuln_by_severity' => :'Array', + :'total_app_packages' => :'Integer', + :'total_os_packages' => :'Integer', + :'total_vulnerabilities' => :'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::ModelsAPIImageVulnerabilitiesSummary` 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::ModelsAPIImageVulnerabilitiesSummary`. 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_packages_with_vulnerabilities') + self.app_packages_with_vulnerabilities = attributes[:'app_packages_with_vulnerabilities'] + end + + if attributes.key?(:'app_vuln_by_severity') + if (value = attributes[:'app_vuln_by_severity']).is_a?(Array) + self.app_vuln_by_severity = value + end + end + + if attributes.key?(:'image_vuln_by_severity') + if (value = attributes[:'image_vuln_by_severity']).is_a?(Array) + self.image_vuln_by_severity = value + end + end + + if attributes.key?(:'layers_with_vulnerabilities') + self.layers_with_vulnerabilities = attributes[:'layers_with_vulnerabilities'] + end + + if attributes.key?(:'os_packages_with_vulnerabilities') + self.os_packages_with_vulnerabilities = attributes[:'os_packages_with_vulnerabilities'] + end + + if attributes.key?(:'os_vuln_by_severity') + if (value = attributes[:'os_vuln_by_severity']).is_a?(Array) + self.os_vuln_by_severity = value + end + end + + if attributes.key?(:'total_app_packages') + self.total_app_packages = attributes[:'total_app_packages'] + end + + if attributes.key?(:'total_os_packages') + self.total_os_packages = attributes[:'total_os_packages'] + end + + if attributes.key?(:'total_vulnerabilities') + self.total_vulnerabilities = attributes[:'total_vulnerabilities'] + 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 @app_packages_with_vulnerabilities.nil? + invalid_properties.push('invalid value for "app_packages_with_vulnerabilities", app_packages_with_vulnerabilities cannot be nil.') + end + + if @app_vuln_by_severity.nil? + invalid_properties.push('invalid value for "app_vuln_by_severity", app_vuln_by_severity cannot be nil.') + end + + if @image_vuln_by_severity.nil? + invalid_properties.push('invalid value for "image_vuln_by_severity", image_vuln_by_severity cannot be nil.') + end + + if @layers_with_vulnerabilities.nil? + invalid_properties.push('invalid value for "layers_with_vulnerabilities", layers_with_vulnerabilities cannot be nil.') + end + + if @os_packages_with_vulnerabilities.nil? + invalid_properties.push('invalid value for "os_packages_with_vulnerabilities", os_packages_with_vulnerabilities cannot be nil.') + end + + if @os_vuln_by_severity.nil? + invalid_properties.push('invalid value for "os_vuln_by_severity", os_vuln_by_severity cannot be nil.') + end + + if @total_app_packages.nil? + invalid_properties.push('invalid value for "total_app_packages", total_app_packages cannot be nil.') + end + + if @total_os_packages.nil? + invalid_properties.push('invalid value for "total_os_packages", total_os_packages cannot be nil.') + end + + if @total_vulnerabilities.nil? + invalid_properties.push('invalid value for "total_vulnerabilities", total_vulnerabilities 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 @app_packages_with_vulnerabilities.nil? + return false if @app_vuln_by_severity.nil? + return false if @image_vuln_by_severity.nil? + return false if @layers_with_vulnerabilities.nil? + return false if @os_packages_with_vulnerabilities.nil? + return false if @os_vuln_by_severity.nil? + return false if @total_app_packages.nil? + return false if @total_os_packages.nil? + return false if @total_vulnerabilities.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_packages_with_vulnerabilities == o.app_packages_with_vulnerabilities && + app_vuln_by_severity == o.app_vuln_by_severity && + image_vuln_by_severity == o.image_vuln_by_severity && + layers_with_vulnerabilities == o.layers_with_vulnerabilities && + os_packages_with_vulnerabilities == o.os_packages_with_vulnerabilities && + os_vuln_by_severity == o.os_vuln_by_severity && + total_app_packages == o.total_app_packages && + total_os_packages == o.total_os_packages && + total_vulnerabilities == o.total_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 + [app_packages_with_vulnerabilities, app_vuln_by_severity, image_vuln_by_severity, layers_with_vulnerabilities, os_packages_with_vulnerabilities, os_vuln_by_severity, total_app_packages, total_os_packages, total_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/models_api_kubernetes_iom.rb b/lib/crimson-falcon/models/models_api_kubernetes_iom.rb new file mode 100644 index 00000000..113a62b7 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_kubernetes_iom.rb @@ -0,0 +1,796 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIKubernetesIOM + attr_accessor :admission_review_action + + attr_accessor :admission_review_id + + attr_accessor :admission_review_msg + + attr_accessor :admission_review_operation + + attr_accessor :cid + + attr_accessor :cis_id + + attr_accessor :cluster_id + + attr_accessor :cluster_name + + attr_accessor :containers_impacted_count + + attr_accessor :containers_impacted_ids + + attr_accessor :description + + attr_accessor :detect_timestamp + + attr_accessor :detection_id + + attr_accessor :detection_name + + attr_accessor :detection_type + + attr_accessor :image_assessment_matched_cves + + attr_accessor :image_assessment_policy_description + + attr_accessor :image_assessment_policy_id + + attr_accessor :image_assessment_policy_name + + attr_accessor :image_digest + + attr_accessor :image_has_been_assessed + + attr_accessor :image_id + + attr_accessor :image_registry + + attr_accessor :image_repository + + attr_accessor :image_tag + + attr_accessor :last_seen_timestamp + + attr_accessor :mitigation_id + + attr_accessor :mitigation_name + + attr_accessor :namespace + + attr_accessor :nist_id + + attr_accessor :pod_label + + attr_accessor :pods_impacted_count + + attr_accessor :policy_id + + attr_accessor :policy_name + + attr_accessor :ports + + attr_accessor :prevented + + attr_accessor :remediation + + attr_accessor :resource_creation_timestamp + + attr_accessor :resource_group_name + + attr_accessor :resource_id + + attr_accessor :resource_name + + attr_accessor :resource_type + + attr_accessor :sensitive_env_vars + + attr_accessor :service_type + + attr_accessor :severity + + attr_accessor :tactic_id + + attr_accessor :tactic_name + + attr_accessor :technique_id + + attr_accessor :technique_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'admission_review_action' => :'admission_review_action', + :'admission_review_id' => :'admission_review_id', + :'admission_review_msg' => :'admission_review_msg', + :'admission_review_operation' => :'admission_review_operation', + :'cid' => :'cid', + :'cis_id' => :'cis_id', + :'cluster_id' => :'cluster_id', + :'cluster_name' => :'cluster_name', + :'containers_impacted_count' => :'containers_impacted_count', + :'containers_impacted_ids' => :'containers_impacted_ids', + :'description' => :'description', + :'detect_timestamp' => :'detect_timestamp', + :'detection_id' => :'detection_id', + :'detection_name' => :'detection_name', + :'detection_type' => :'detection_type', + :'image_assessment_matched_cves' => :'image_assessment_matched_cves', + :'image_assessment_policy_description' => :'image_assessment_policy_description', + :'image_assessment_policy_id' => :'image_assessment_policy_id', + :'image_assessment_policy_name' => :'image_assessment_policy_name', + :'image_digest' => :'image_digest', + :'image_has_been_assessed' => :'image_has_been_assessed', + :'image_id' => :'image_id', + :'image_registry' => :'image_registry', + :'image_repository' => :'image_repository', + :'image_tag' => :'image_tag', + :'last_seen_timestamp' => :'last_seen_timestamp', + :'mitigation_id' => :'mitigation_id', + :'mitigation_name' => :'mitigation_name', + :'namespace' => :'namespace', + :'nist_id' => :'nist_id', + :'pod_label' => :'pod_label', + :'pods_impacted_count' => :'pods_impacted_count', + :'policy_id' => :'policy_id', + :'policy_name' => :'policy_name', + :'ports' => :'ports', + :'prevented' => :'prevented', + :'remediation' => :'remediation', + :'resource_creation_timestamp' => :'resource_creation_timestamp', + :'resource_group_name' => :'resource_group_name', + :'resource_id' => :'resource_id', + :'resource_name' => :'resource_name', + :'resource_type' => :'resource_type', + :'sensitive_env_vars' => :'sensitive_env_vars', + :'service_type' => :'service_type', + :'severity' => :'severity', + :'tactic_id' => :'tactic_id', + :'tactic_name' => :'tactic_name', + :'technique_id' => :'technique_id', + :'technique_name' => :'technique_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 + { + :'admission_review_action' => :'String', + :'admission_review_id' => :'String', + :'admission_review_msg' => :'String', + :'admission_review_operation' => :'String', + :'cid' => :'String', + :'cis_id' => :'Array', + :'cluster_id' => :'String', + :'cluster_name' => :'String', + :'containers_impacted_count' => :'String', + :'containers_impacted_ids' => :'Array', + :'description' => :'String', + :'detect_timestamp' => :'String', + :'detection_id' => :'String', + :'detection_name' => :'String', + :'detection_type' => :'String', + :'image_assessment_matched_cves' => :'Array', + :'image_assessment_policy_description' => :'String', + :'image_assessment_policy_id' => :'String', + :'image_assessment_policy_name' => :'String', + :'image_digest' => :'String', + :'image_has_been_assessed' => :'Boolean', + :'image_id' => :'String', + :'image_registry' => :'String', + :'image_repository' => :'String', + :'image_tag' => :'String', + :'last_seen_timestamp' => :'String', + :'mitigation_id' => :'String', + :'mitigation_name' => :'String', + :'namespace' => :'String', + :'nist_id' => :'String', + :'pod_label' => :'String', + :'pods_impacted_count' => :'String', + :'policy_id' => :'String', + :'policy_name' => :'String', + :'ports' => :'Array', + :'prevented' => :'String', + :'remediation' => :'String', + :'resource_creation_timestamp' => :'String', + :'resource_group_name' => :'String', + :'resource_id' => :'String', + :'resource_name' => :'String', + :'resource_type' => :'String', + :'sensitive_env_vars' => :'Array', + :'service_type' => :'String', + :'severity' => :'String', + :'tactic_id' => :'String', + :'tactic_name' => :'String', + :'technique_id' => :'String', + :'technique_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::ModelsAPIKubernetesIOM` 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::ModelsAPIKubernetesIOM`. 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?(:'admission_review_action') + self.admission_review_action = attributes[:'admission_review_action'] + end + + if attributes.key?(:'admission_review_id') + self.admission_review_id = attributes[:'admission_review_id'] + end + + if attributes.key?(:'admission_review_msg') + self.admission_review_msg = attributes[:'admission_review_msg'] + end + + if attributes.key?(:'admission_review_operation') + self.admission_review_operation = attributes[:'admission_review_operation'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cis_id') + if (value = attributes[:'cis_id']).is_a?(Array) + self.cis_id = value + end + 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?(:'containers_impacted_count') + self.containers_impacted_count = attributes[:'containers_impacted_count'] + end + + if attributes.key?(:'containers_impacted_ids') + if (value = attributes[:'containers_impacted_ids']).is_a?(Array) + self.containers_impacted_ids = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'detect_timestamp') + self.detect_timestamp = attributes[:'detect_timestamp'] + end + + if attributes.key?(:'detection_id') + self.detection_id = attributes[:'detection_id'] + end + + if attributes.key?(:'detection_name') + self.detection_name = attributes[:'detection_name'] + end + + if attributes.key?(:'detection_type') + self.detection_type = attributes[:'detection_type'] + end + + if attributes.key?(:'image_assessment_matched_cves') + if (value = attributes[:'image_assessment_matched_cves']).is_a?(Array) + self.image_assessment_matched_cves = value + end + end + + if attributes.key?(:'image_assessment_policy_description') + self.image_assessment_policy_description = attributes[:'image_assessment_policy_description'] + end + + if attributes.key?(:'image_assessment_policy_id') + self.image_assessment_policy_id = attributes[:'image_assessment_policy_id'] + end + + if attributes.key?(:'image_assessment_policy_name') + self.image_assessment_policy_name = attributes[:'image_assessment_policy_name'] + end + + if attributes.key?(:'image_digest') + self.image_digest = attributes[:'image_digest'] + end + + if attributes.key?(:'image_has_been_assessed') + self.image_has_been_assessed = attributes[:'image_has_been_assessed'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'image_registry') + self.image_registry = attributes[:'image_registry'] + end + + if attributes.key?(:'image_repository') + self.image_repository = attributes[:'image_repository'] + end + + if attributes.key?(:'image_tag') + self.image_tag = attributes[:'image_tag'] + end + + if attributes.key?(:'last_seen_timestamp') + self.last_seen_timestamp = attributes[:'last_seen_timestamp'] + end + + if attributes.key?(:'mitigation_id') + self.mitigation_id = attributes[:'mitigation_id'] + end + + if attributes.key?(:'mitigation_name') + self.mitigation_name = attributes[:'mitigation_name'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'nist_id') + self.nist_id = attributes[:'nist_id'] + end + + if attributes.key?(:'pod_label') + self.pod_label = attributes[:'pod_label'] + end + + if attributes.key?(:'pods_impacted_count') + self.pods_impacted_count = attributes[:'pods_impacted_count'] + end + + if attributes.key?(:'policy_id') + self.policy_id = attributes[:'policy_id'] + end + + if attributes.key?(:'policy_name') + self.policy_name = attributes[:'policy_name'] + end + + if attributes.key?(:'ports') + if (value = attributes[:'ports']).is_a?(Array) + self.ports = value + end + end + + if attributes.key?(:'prevented') + self.prevented = attributes[:'prevented'] + end + + if attributes.key?(:'remediation') + self.remediation = attributes[:'remediation'] + end + + if attributes.key?(:'resource_creation_timestamp') + self.resource_creation_timestamp = attributes[:'resource_creation_timestamp'] + end + + if attributes.key?(:'resource_group_name') + self.resource_group_name = attributes[:'resource_group_name'] + 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_type') + self.resource_type = attributes[:'resource_type'] + end + + if attributes.key?(:'sensitive_env_vars') + if (value = attributes[:'sensitive_env_vars']).is_a?(Array) + self.sensitive_env_vars = value + end + end + + if attributes.key?(:'service_type') + self.service_type = attributes[:'service_type'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'tactic_id') + self.tactic_id = attributes[:'tactic_id'] + end + + if attributes.key?(:'tactic_name') + self.tactic_name = attributes[:'tactic_name'] + end + + if attributes.key?(:'technique_id') + self.technique_id = attributes[:'technique_id'] + end + + if attributes.key?(:'technique_name') + self.technique_name = attributes[:'technique_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 @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cis_id.nil? + invalid_properties.push('invalid value for "cis_id", cis_id cannot be nil.') + end + + if @cluster_id.nil? + invalid_properties.push('invalid value for "cluster_id", cluster_id cannot be nil.') + end + + if @cluster_name.nil? + invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') + end + + if @containers_impacted_count.nil? + invalid_properties.push('invalid value for "containers_impacted_count", containers_impacted_count cannot be nil.') + end + + if @containers_impacted_ids.nil? + invalid_properties.push('invalid value for "containers_impacted_ids", containers_impacted_ids cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @detect_timestamp.nil? + invalid_properties.push('invalid value for "detect_timestamp", detect_timestamp cannot be nil.') + end + + if @detection_id.nil? + invalid_properties.push('invalid value for "detection_id", detection_id cannot be nil.') + end + + if @detection_name.nil? + invalid_properties.push('invalid value for "detection_name", detection_name cannot be nil.') + end + + if @detection_type.nil? + invalid_properties.push('invalid value for "detection_type", detection_type cannot be nil.') + end + + if @namespace.nil? + invalid_properties.push('invalid value for "namespace", namespace cannot be nil.') + end + + if @prevented.nil? + invalid_properties.push('invalid value for "prevented", prevented cannot be nil.') + end + + if @remediation.nil? + invalid_properties.push('invalid value for "remediation", remediation cannot be nil.') + end + + if @resource_creation_timestamp.nil? + invalid_properties.push('invalid value for "resource_creation_timestamp", resource_creation_timestamp cannot be nil.') + end + + if @resource_id.nil? + invalid_properties.push('invalid value for "resource_id", resource_id cannot be nil.') + end + + if @resource_name.nil? + invalid_properties.push('invalid value for "resource_name", resource_name cannot be nil.') + end + + if @resource_type.nil? + invalid_properties.push('invalid value for "resource_type", resource_type cannot be nil.') + end + + if @sensitive_env_vars.nil? + invalid_properties.push('invalid value for "sensitive_env_vars", sensitive_env_vars cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @tactic_id.nil? + invalid_properties.push('invalid value for "tactic_id", tactic_id cannot be nil.') + end + + if @tactic_name.nil? + invalid_properties.push('invalid value for "tactic_name", tactic_name cannot be nil.') + end + + if @technique_id.nil? + invalid_properties.push('invalid value for "technique_id", technique_id cannot be nil.') + end + + if @technique_name.nil? + invalid_properties.push('invalid value for "technique_name", technique_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 @cid.nil? + return false if @cis_id.nil? + return false if @cluster_id.nil? + return false if @cluster_name.nil? + return false if @containers_impacted_count.nil? + return false if @containers_impacted_ids.nil? + return false if @description.nil? + return false if @detect_timestamp.nil? + return false if @detection_id.nil? + return false if @detection_name.nil? + return false if @detection_type.nil? + return false if @namespace.nil? + return false if @prevented.nil? + return false if @remediation.nil? + return false if @resource_creation_timestamp.nil? + return false if @resource_id.nil? + return false if @resource_name.nil? + return false if @resource_type.nil? + return false if @sensitive_env_vars.nil? + return false if @severity.nil? + return false if @tactic_id.nil? + return false if @tactic_name.nil? + return false if @technique_id.nil? + return false if @technique_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 && + admission_review_action == o.admission_review_action && + admission_review_id == o.admission_review_id && + admission_review_msg == o.admission_review_msg && + admission_review_operation == o.admission_review_operation && + cid == o.cid && + cis_id == o.cis_id && + cluster_id == o.cluster_id && + cluster_name == o.cluster_name && + containers_impacted_count == o.containers_impacted_count && + containers_impacted_ids == o.containers_impacted_ids && + description == o.description && + detect_timestamp == o.detect_timestamp && + detection_id == o.detection_id && + detection_name == o.detection_name && + detection_type == o.detection_type && + image_assessment_matched_cves == o.image_assessment_matched_cves && + image_assessment_policy_description == o.image_assessment_policy_description && + image_assessment_policy_id == o.image_assessment_policy_id && + image_assessment_policy_name == o.image_assessment_policy_name && + image_digest == o.image_digest && + image_has_been_assessed == o.image_has_been_assessed && + image_id == o.image_id && + image_registry == o.image_registry && + image_repository == o.image_repository && + image_tag == o.image_tag && + last_seen_timestamp == o.last_seen_timestamp && + mitigation_id == o.mitigation_id && + mitigation_name == o.mitigation_name && + namespace == o.namespace && + nist_id == o.nist_id && + pod_label == o.pod_label && + pods_impacted_count == o.pods_impacted_count && + policy_id == o.policy_id && + policy_name == o.policy_name && + ports == o.ports && + prevented == o.prevented && + remediation == o.remediation && + resource_creation_timestamp == o.resource_creation_timestamp && + resource_group_name == o.resource_group_name && + resource_id == o.resource_id && + resource_name == o.resource_name && + resource_type == o.resource_type && + sensitive_env_vars == o.sensitive_env_vars && + service_type == o.service_type && + severity == o.severity && + tactic_id == o.tactic_id && + tactic_name == o.tactic_name && + technique_id == o.technique_id && + technique_name == o.technique_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 + [admission_review_action, admission_review_id, admission_review_msg, admission_review_operation, cid, cis_id, cluster_id, cluster_name, containers_impacted_count, containers_impacted_ids, description, detect_timestamp, detection_id, detection_name, detection_type, image_assessment_matched_cves, image_assessment_policy_description, image_assessment_policy_id, image_assessment_policy_name, image_digest, image_has_been_assessed, image_id, image_registry, image_repository, image_tag, last_seen_timestamp, mitigation_id, mitigation_name, namespace, nist_id, pod_label, pods_impacted_count, policy_id, policy_name, ports, prevented, remediation, resource_creation_timestamp, resource_group_name, resource_id, resource_name, resource_type, sensitive_env_vars, service_type, severity, tactic_id, tactic_name, technique_id, technique_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/domain_notification_details_v1.rb b/lib/crimson-falcon/models/models_api_package_combined.rb similarity index 68% rename from lib/crimson-falcon/models/domain_notification_details_v1.rb rename to lib/crimson-falcon/models/models_api_package_combined.rb index b319c756..8992547d 100644 --- a/lib/crimson-falcon/models/domain_notification_details_v1.rb +++ b/lib/crimson-falcon/models/models_api_package_combined.rb @@ -31,50 +31,34 @@ require 'time' module Falcon - class DomainNotificationDetailsV1 - # The raw intelligence item author username - attr_accessor :author + class ModelsAPIPackageCombined + attr_accessor :all_images - # Highlighted content based on the rule that generated the notifications. Highlights are surrounded with a `` tag - attr_accessor :content + attr_accessor :cid - # The date when the raw intelligence item was created - attr_accessor :created_date + attr_accessor :license - # The raw intelligence item labels. These contain hints around what is actually included in the item (malware, IPs, emails, etc). - attr_accessor :labels + attr_accessor :package_name_version - # The raw intelligence item language - attr_accessor :language + attr_accessor :running_images - # The site where the raw intelligence item was found - attr_accessor :site - - # The raw intelligence item title - attr_accessor :title - - # The type of the raw intelligence item attr_accessor :type - # The date when the raw intelligence item was updated - attr_accessor :updated_date + attr_accessor :vulnerabilities - # The raw intelligence item URL - attr_accessor :url + attr_accessor :vulnerability_count # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'author' => :'author', - :'content' => :'content', - :'created_date' => :'created_date', - :'labels' => :'labels', - :'language' => :'language', - :'site' => :'site', - :'title' => :'title', + :'all_images' => :'all_images', + :'cid' => :'cid', + :'license' => :'license', + :'package_name_version' => :'package_name_version', + :'running_images' => :'running_images', :'type' => :'type', - :'updated_date' => :'updated_date', - :'url' => :'url' + :'vulnerabilities' => :'vulnerabilities', + :'vulnerability_count' => :'vulnerability_count' } end @@ -86,16 +70,14 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'author' => :'String', - :'content' => :'String', - :'created_date' => :'Time', - :'labels' => :'Array', - :'language' => :'String', - :'site' => :'String', - :'title' => :'String', + :'all_images' => :'Integer', + :'cid' => :'String', + :'license' => :'String', + :'package_name_version' => :'String', + :'running_images' => :'Integer', :'type' => :'String', - :'updated_date' => :'Time', - :'url' => :'String' + :'vulnerabilities' => :'Array', + :'vulnerability_count' => :'Integer' } end @@ -109,57 +91,49 @@ 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::DomainNotificationDetailsV1` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsAPIPackageCombined` 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::DomainNotificationDetailsV1`. 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::ModelsAPIPackageCombined`. 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?(:'author') - self.author = attributes[:'author'] - end - - if attributes.key?(:'content') - self.content = attributes[:'content'] + if attributes.key?(:'all_images') + self.all_images = attributes[:'all_images'] end - if attributes.key?(:'created_date') - self.created_date = attributes[:'created_date'] + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] end - if attributes.key?(:'labels') - if (value = attributes[:'labels']).is_a?(Array) - self.labels = value - end - end - - if attributes.key?(:'language') - self.language = attributes[:'language'] + if attributes.key?(:'license') + self.license = attributes[:'license'] end - if attributes.key?(:'site') - self.site = attributes[:'site'] + if attributes.key?(:'package_name_version') + self.package_name_version = attributes[:'package_name_version'] end - if attributes.key?(:'title') - self.title = attributes[:'title'] + if attributes.key?(:'running_images') + self.running_images = attributes[:'running_images'] end if attributes.key?(:'type') self.type = attributes[:'type'] end - if attributes.key?(:'updated_date') - self.updated_date = attributes[:'updated_date'] + if attributes.key?(:'vulnerabilities') + if (value = attributes[:'vulnerabilities']).is_a?(Array) + self.vulnerabilities = value + end end - if attributes.key?(:'url') - self.url = attributes[:'url'] + if attributes.key?(:'vulnerability_count') + self.vulnerability_count = attributes[:'vulnerability_count'] end end @@ -167,20 +141,36 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @content.nil? - invalid_properties.push('invalid value for "content", content cannot be nil.') + if @all_images.nil? + invalid_properties.push('invalid value for "all_images", all_images cannot be nil.') end - if @created_date.nil? - invalid_properties.push('invalid value for "created_date", created_date cannot be nil.') + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid 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 @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end - if @updated_date.nil? - invalid_properties.push('invalid value for "updated_date", updated_date cannot be nil.') + if @vulnerabilities.nil? + invalid_properties.push('invalid value for "vulnerabilities", vulnerabilities cannot be nil.') + end + + if @vulnerability_count.nil? + invalid_properties.push('invalid value for "vulnerability_count", vulnerability_count cannot be nil.') end invalid_properties @@ -189,10 +179,14 @@ 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 @content.nil? - return false if @created_date.nil? + return false if @all_images.nil? + return false if @cid.nil? + return false if @license.nil? + return false if @package_name_version.nil? + return false if @running_images.nil? return false if @type.nil? - return false if @updated_date.nil? + return false if @vulnerabilities.nil? + return false if @vulnerability_count.nil? true end @@ -201,16 +195,14 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - author == o.author && - content == o.content && - created_date == o.created_date && - labels == o.labels && - language == o.language && - site == o.site && - title == o.title && + all_images == o.all_images && + cid == o.cid && + license == o.license && + package_name_version == o.package_name_version && + running_images == o.running_images && type == o.type && - updated_date == o.updated_date && - url == o.url + vulnerabilities == o.vulnerabilities && + vulnerability_count == o.vulnerability_count end # @see the `==` method @@ -222,7 +214,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [author, content, created_date, labels, language, site, title, type, updated_date, url].hash + [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_vulnerability.rb b/lib/crimson-falcon/models/models_api_package_vulnerability.rb new file mode 100644 index 00000000..77a6b2f6 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_package_vulnerability.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 ModelsAPIPackageVulnerability + attr_accessor :cveid + + attr_accessor :description + + attr_accessor :fix_resolution + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cveid' => :'cveid', + :'description' => :'description', + :'fix_resolution' => :'fix_resolution', + :'severity' => :'severity' + } + 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 + { + :'cveid' => :'String', + :'description' => :'String', + :'fix_resolution' => :'Array', + :'severity' => :'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::ModelsAPIPackageVulnerability` 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::ModelsAPIPackageVulnerability`. 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?(:'cveid') + self.cveid = attributes[:'cveid'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'fix_resolution') + if (value = attributes[:'fix_resolution']).is_a?(Array) + self.fix_resolution = value + end + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + 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 @cveid.nil? + invalid_properties.push('invalid value for "cveid", cveid cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @fix_resolution.nil? + invalid_properties.push('invalid value for "fix_resolution", fix_resolution cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity 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 @cveid.nil? + return false if @description.nil? + return false if @fix_resolution.nil? + return false if @severity.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 && + cveid == o.cveid && + description == o.description && + fix_resolution == o.fix_resolution && + severity == o.severity + 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 + [cveid, description, fix_resolution, severity].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_packages_by_vuln_count.rb b/lib/crimson-falcon/models/models_api_packages_by_vuln_count.rb new file mode 100644 index 00000000..4711c3e7 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_packages_by_vuln_count.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 ModelsAPIPackagesByVulnCount + attr_accessor :images + + attr_accessor :package + + attr_accessor :packages_type + + attr_accessor :running_images + + attr_accessor :version + + attr_accessor :vulnerabilities + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'images' => :'images', + :'package' => :'package', + :'packages_type' => :'packages_type', + :'running_images' => :'running_images', + :'version' => :'version', + :'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 + { + :'images' => :'Integer', + :'package' => :'String', + :'packages_type' => :'String', + :'running_images' => :'Integer', + :'version' => :'String', + :'vulnerabilities' => :'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::ModelsAPIPackagesByVulnCount` 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::ModelsAPIPackagesByVulnCount`. 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?(:'images') + self.images = attributes[:'images'] + end + + if attributes.key?(:'package') + self.package = attributes[:'package'] + end + + if attributes.key?(:'packages_type') + self.packages_type = attributes[:'packages_type'] + end + + if attributes.key?(:'running_images') + self.running_images = attributes[:'running_images'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + + if attributes.key?(:'vulnerabilities') + self.vulnerabilities = attributes[:'vulnerabilities'] + 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 @images.nil? + invalid_properties.push('invalid value for "images", images cannot be nil.') + end + + if @package.nil? + invalid_properties.push('invalid value for "package", package cannot be nil.') + end + + if @packages_type.nil? + invalid_properties.push('invalid value for "packages_type", packages_type cannot be nil.') + end + + if @running_images.nil? + invalid_properties.push('invalid value for "running_images", running_images cannot be nil.') + end + + if @version.nil? + invalid_properties.push('invalid value for "version", version cannot be nil.') + end + + if @vulnerabilities.nil? + invalid_properties.push('invalid value for "vulnerabilities", vulnerabilities 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 @images.nil? + return false if @package.nil? + return false if @packages_type.nil? + return false if @running_images.nil? + return false if @version.nil? + return false if @vulnerabilities.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 && + images == o.images && + package == o.package && + packages_type == o.packages_type && + running_images == o.running_images && + version == o.version && + 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 + [images, package, packages_type, running_images, version, 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/models_api_policy_count_by_action.rb b/lib/crimson-falcon/models/models_api_policy_count_by_action.rb new file mode 100644 index 00000000..45f300c2 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_count_by_action.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 ModelsAPIPolicyCountByAction + attr_accessor :action + + attr_accessor :count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action' => :'action', + :'count' => :'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 + { + :'action' => :'String', + :'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::ModelsAPIPolicyCountByAction` 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::ModelsAPIPolicyCountByAction`. 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?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'count') + self.count = attributes[:'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 + if @action.nil? + invalid_properties.push('invalid value for "action", action cannot be nil.') + end + + if @count.nil? + invalid_properties.push('invalid value for "count", count 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 @action.nil? + return false if @count.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 && + action == o.action && + count == o.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 + [action, 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/models_api_policy_data.rb b/lib/crimson-falcon/models/models_api_policy_data.rb new file mode 100644 index 00000000..3583b682 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_data.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 ModelsAPIPolicyData + attr_accessor :groups + + attr_accessor :rules + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'groups' => :'groups', + :'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 + { + :'groups' => :'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::ModelsAPIPolicyData` 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::ModelsAPIPolicyData`. 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?(:'groups') + if (value = attributes[:'groups']).is_a?(Array) + self.groups = 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 @groups.nil? + invalid_properties.push('invalid value for "groups", groups cannot be nil.') + end + + if @rules.nil? + invalid_properties.push('invalid value for "rules", rules 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 @groups.nil? + return false if @rules.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 && + groups == o.groups && + 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 + [groups, 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/models_api_policy_entity.rb b/lib/crimson-falcon/models/models_api_policy_entity.rb new file mode 100644 index 00000000..5ee9c66e --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_entity.rb @@ -0,0 +1,332 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIPolicyEntity + attr_accessor :created_at + + attr_accessor :description + + attr_accessor :is_enabled + + attr_accessor :name + + attr_accessor :policy_data + + attr_accessor :policy_id + + attr_accessor :precedence + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_at' => :'created_at', + :'description' => :'description', + :'is_enabled' => :'is_enabled', + :'name' => :'name', + :'policy_data' => :'policy_data', + :'policy_id' => :'policy_id', + :'precedence' => :'precedence', + :'updated_at' => :'updated_at' + } + 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_at' => :'String', + :'description' => :'String', + :'is_enabled' => :'Boolean', + :'name' => :'String', + :'policy_data' => :'ModelsAPIPolicyData', + :'policy_id' => :'String', + :'precedence' => :'Integer', + :'updated_at' => :'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::ModelsAPIPolicyEntity` 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::ModelsAPIPolicyEntity`. 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_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'policy_data') + self.policy_data = attributes[:'policy_data'] + end + + if attributes.key?(:'policy_id') + self.policy_id = attributes[:'policy_id'] + end + + if attributes.key?(:'precedence') + self.precedence = attributes[:'precedence'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + 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_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @is_enabled.nil? + invalid_properties.push('invalid value for "is_enabled", is_enabled cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @policy_id.nil? + invalid_properties.push('invalid value for "policy_id", policy_id cannot be nil.') + end + + if @precedence.nil? + invalid_properties.push('invalid value for "precedence", precedence 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 @description.nil? + return false if @is_enabled.nil? + return false if @name.nil? + return false if @policy_id.nil? + return false if @precedence.nil? + return false if @updated_at.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_at == o.created_at && + description == o.description && + is_enabled == o.is_enabled && + name == o.name && + policy_data == o.policy_data && + policy_id == o.policy_id && + precedence == o.precedence && + updated_at == o.updated_at + 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_at, description, is_enabled, name, policy_data, policy_id, precedence, updated_at].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_policy_exclusion.rb b/lib/crimson-falcon/models/models_api_policy_exclusion.rb new file mode 100644 index 00000000..9b385d59 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_exclusion.rb @@ -0,0 +1,301 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIPolicyExclusion + attr_accessor :conditions + + attr_accessor :created_at + + attr_accessor :description + + attr_accessor :name + + attr_accessor :policy_type_uuid + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'conditions' => :'conditions', + :'created_at' => :'created_at', + :'description' => :'description', + :'name' => :'name', + :'policy_type_uuid' => :'policy_type_uuid', + :'updated_at' => :'updated_at' + } + 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 + { + :'conditions' => :'Array', + :'created_at' => :'String', + :'description' => :'String', + :'name' => :'String', + :'policy_type_uuid' => :'String', + :'updated_at' => :'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::ModelsAPIPolicyExclusion` 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::ModelsAPIPolicyExclusion`. 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?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'policy_type_uuid') + self.policy_type_uuid = attributes[:'policy_type_uuid'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + 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 @conditions.nil? + invalid_properties.push('invalid value for "conditions", conditions cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @policy_type_uuid.nil? + invalid_properties.push('invalid value for "policy_type_uuid", policy_type_uuid 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 @conditions.nil? + return false if @description.nil? + return false if @name.nil? + return false if @policy_type_uuid.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 && + conditions == o.conditions && + created_at == o.created_at && + description == o.description && + name == o.name && + policy_type_uuid == o.policy_type_uuid && + updated_at == o.updated_at + 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 + [conditions, created_at, description, name, policy_type_uuid, updated_at].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_policy_group.rb b/lib/crimson-falcon/models/models_api_policy_group.rb new file mode 100644 index 00000000..cc4f2b97 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_group.rb @@ -0,0 +1,313 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIPolicyGroup + attr_accessor :created_at + + attr_accessor :description + + attr_accessor :name + + attr_accessor :policy_group_data + + attr_accessor :policy_uuid + + attr_accessor :updated_at + + attr_accessor :uuid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_at' => :'created_at', + :'description' => :'description', + :'name' => :'name', + :'policy_group_data' => :'policy_group_data', + :'policy_uuid' => :'policy_uuid', + :'updated_at' => :'updated_at', + :'uuid' => :'uuid' + } + 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_at' => :'String', + :'description' => :'String', + :'name' => :'String', + :'policy_group_data' => :'ModelsAPIPolicyGroupData', + :'policy_uuid' => :'String', + :'updated_at' => :'String', + :'uuid' => :'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::ModelsAPIPolicyGroup` 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::ModelsAPIPolicyGroup`. 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_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'policy_group_data') + self.policy_group_data = attributes[:'policy_group_data'] + end + + if attributes.key?(:'policy_uuid') + self.policy_uuid = attributes[:'policy_uuid'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + 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_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + if @uuid.nil? + invalid_properties.push('invalid value for "uuid", uuid 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 @description.nil? + return false if @name.nil? + return false if @updated_at.nil? + return false if @uuid.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_at == o.created_at && + description == o.description && + name == o.name && + policy_group_data == o.policy_group_data && + policy_uuid == o.policy_uuid && + updated_at == o.updated_at && + uuid == o.uuid + 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_at, description, name, policy_group_data, policy_uuid, updated_at, uuid].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_policy_group_data.rb b/lib/crimson-falcon/models/models_api_policy_group_data.rb new file mode 100644 index 00000000..d20a07dd --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_group_data.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 ModelsAPIPolicyGroupData + attr_accessor :conditions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'conditions' => :'conditions' + } + 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 + { + :'conditions' => :'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::ModelsAPIPolicyGroupData` 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::ModelsAPIPolicyGroupData`. 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?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = 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 @conditions.nil? + invalid_properties.push('invalid value for "conditions", conditions 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 @conditions.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 && + conditions == o.conditions + 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 + [conditions].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_policy_rule.rb b/lib/crimson-falcon/models/models_api_policy_rule.rb new file mode 100644 index 00000000..9568ff12 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_rule.rb @@ -0,0 +1,248 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIPolicyRule + attr_accessor :action + + attr_accessor :policy_rules_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action' => :'action', + :'policy_rules_data' => :'policy_rules_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 + { + :'action' => :'String', + :'policy_rules_data' => :'ModelsAPIPolicyRulesData' + } + 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::ModelsAPIPolicyRule` 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::ModelsAPIPolicyRule`. 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?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'policy_rules_data') + self.policy_rules_data = attributes[:'policy_rules_data'] + 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 @action.nil? + invalid_properties.push('invalid value for "action", action 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 @action.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 && + action == o.action && + policy_rules_data == o.policy_rules_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 + [action, policy_rules_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/models_api_policy_rules_data.rb b/lib/crimson-falcon/models/models_api_policy_rules_data.rb new file mode 100644 index 00000000..6f4e14e1 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_policy_rules_data.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 ModelsAPIPolicyRulesData + attr_accessor :conditions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'conditions' => :'conditions' + } + 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 + { + :'conditions' => :'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::ModelsAPIPolicyRulesData` 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::ModelsAPIPolicyRulesData`. 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?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = 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 @conditions.nil? + invalid_properties.push('invalid value for "conditions", conditions 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 @conditions.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 && + conditions == o.conditions + 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 + [conditions].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_precedence_request.rb b/lib/crimson-falcon/models/models_api_precedence_request.rb new file mode 100644 index 00000000..fec4b0d2 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_precedence_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 ModelsAPIPrecedenceRequest + attr_accessor :precedence + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'precedence' => :'precedence' + } + 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 + { + :'precedence' => :'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::ModelsAPIPrecedenceRequest` 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::ModelsAPIPrecedenceRequest`. 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?(:'precedence') + if (value = attributes[:'precedence']).is_a?(Array) + self.precedence = 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 @precedence.nil? + invalid_properties.push('invalid value for "precedence", precedence 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 @precedence.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 && + precedence == o.precedence + 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 + [precedence].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_runtime_detection.rb b/lib/crimson-falcon/models/models_api_runtime_detection.rb new file mode 100644 index 00000000..66db6353 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_runtime_detection.rb @@ -0,0 +1,987 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIRuntimeDetection + attr_accessor :action_taken + + attr_accessor :agent_type + + attr_accessor :aid + + attr_accessor :assigned_to + + attr_accessor :cid + + attr_accessor :cloud + + attr_accessor :cloud_account_id + + attr_accessor :cloud_id + + attr_accessor :cloud_instance_id + + attr_accessor :cloud_name + + attr_accessor :cluster_name + + attr_accessor :command_line + + attr_accessor :computer_name + + attr_accessor :container_devices + + attr_accessor :container_id + + attr_accessor :container_interactive_mode + + attr_accessor :container_name + + attr_accessor :container_network_ip_address + + attr_accessor :container_privileged + + attr_accessor :container_read_only_root_fs + + attr_accessor :container_user_info + + attr_accessor :containers_impacted_count + + attr_accessor :detect_timestamp + + attr_accessor :detection_description + + attr_accessor :detection_id + + attr_accessor :detection_name + + attr_accessor :executable_sha_256 + + attr_accessor :file_name + + attr_accessor :file_path + + attr_accessor :host_containers_count + + attr_accessor :host_detections_count + + attr_accessor :host_detections_ids + + attr_accessor :host_id + + attr_accessor :host_last_seen_timestamp + + attr_accessor :host_type + + attr_accessor :image_digest + + attr_accessor :image_first_seen_timestamp + + attr_accessor :image_id + + attr_accessor :image_label + + attr_accessor :image_last_seen_timestamp + + attr_accessor :image_maintainer + + attr_accessor :image_name + + attr_accessor :images_container_count + + attr_accessor :namespace + + attr_accessor :network_ip_address + + attr_accessor :os_version + + attr_accessor :pod_id + + attr_accessor :pod_name + + attr_accessor :pod_namespace + + attr_accessor :sensor_version + + attr_accessor :severity + + attr_accessor :tactic_and_technique + + attr_accessor :type + + attr_accessor :vulnerabilities_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action_taken' => :'action_taken', + :'agent_type' => :'agent_type', + :'aid' => :'aid', + :'assigned_to' => :'assigned_to', + :'cid' => :'cid', + :'cloud' => :'cloud', + :'cloud_account_id' => :'cloud_account_id', + :'cloud_id' => :'cloud_id', + :'cloud_instance_id' => :'cloud_instance_id', + :'cloud_name' => :'cloud_name', + :'cluster_name' => :'cluster_name', + :'command_line' => :'command_line', + :'computer_name' => :'computer_name', + :'container_devices' => :'container_devices', + :'container_id' => :'container_id', + :'container_interactive_mode' => :'container_interactive_mode', + :'container_name' => :'container_name', + :'container_network_ip_address' => :'container_network_ip_address', + :'container_privileged' => :'container_privileged', + :'container_read_only_root_fs' => :'container_read_only_root_fs', + :'container_user_info' => :'container_user_info', + :'containers_impacted_count' => :'containers_impacted_count', + :'detect_timestamp' => :'detect_timestamp', + :'detection_description' => :'detection_description', + :'detection_id' => :'detection_id', + :'detection_name' => :'detection_name', + :'executable_sha_256' => :'executable_sha_256', + :'file_name' => :'file_name', + :'file_path' => :'file_path', + :'host_containers_count' => :'host_containers_count', + :'host_detections_count' => :'host_detections_count', + :'host_detections_ids' => :'host_detections_ids', + :'host_id' => :'host_id', + :'host_last_seen_timestamp' => :'host_last_seen_timestamp', + :'host_type' => :'host_type', + :'image_digest' => :'image_digest', + :'image_first_seen_timestamp' => :'image_first_seen_timestamp', + :'image_id' => :'image_id', + :'image_label' => :'image_label', + :'image_last_seen_timestamp' => :'image_last_seen_timestamp', + :'image_maintainer' => :'image_maintainer', + :'image_name' => :'image_name', + :'images_container_count' => :'images_container_count', + :'namespace' => :'namespace', + :'network_ip_address' => :'network_ip_address', + :'os_version' => :'os_version', + :'pod_id' => :'pod_id', + :'pod_name' => :'pod_name', + :'pod_namespace' => :'pod_namespace', + :'sensor_version' => :'sensor_version', + :'severity' => :'severity', + :'tactic_and_technique' => :'tactic_and_technique', + :'type' => :'type', + :'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 + { + :'action_taken' => :'String', + :'agent_type' => :'String', + :'aid' => :'String', + :'assigned_to' => :'String', + :'cid' => :'String', + :'cloud' => :'String', + :'cloud_account_id' => :'String', + :'cloud_id' => :'String', + :'cloud_instance_id' => :'String', + :'cloud_name' => :'String', + :'cluster_name' => :'String', + :'command_line' => :'String', + :'computer_name' => :'String', + :'container_devices' => :'Array', + :'container_id' => :'String', + :'container_interactive_mode' => :'String', + :'container_name' => :'String', + :'container_network_ip_address' => :'String', + :'container_privileged' => :'String', + :'container_read_only_root_fs' => :'String', + :'container_user_info' => :'String', + :'containers_impacted_count' => :'String', + :'detect_timestamp' => :'String', + :'detection_description' => :'String', + :'detection_id' => :'String', + :'detection_name' => :'Array', + :'executable_sha_256' => :'String', + :'file_name' => :'String', + :'file_path' => :'String', + :'host_containers_count' => :'String', + :'host_detections_count' => :'String', + :'host_detections_ids' => :'Array', + :'host_id' => :'String', + :'host_last_seen_timestamp' => :'String', + :'host_type' => :'String', + :'image_digest' => :'String', + :'image_first_seen_timestamp' => :'String', + :'image_id' => :'String', + :'image_label' => :'String', + :'image_last_seen_timestamp' => :'String', + :'image_maintainer' => :'String', + :'image_name' => :'String', + :'images_container_count' => :'String', + :'namespace' => :'String', + :'network_ip_address' => :'String', + :'os_version' => :'String', + :'pod_id' => :'String', + :'pod_name' => :'String', + :'pod_namespace' => :'String', + :'sensor_version' => :'String', + :'severity' => :'String', + :'tactic_and_technique' => :'String', + :'type' => :'String', + :'vulnerabilities_count' => :'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::ModelsAPIRuntimeDetection` 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::ModelsAPIRuntimeDetection`. 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?(:'action_taken') + self.action_taken = attributes[:'action_taken'] + end + + if attributes.key?(:'agent_type') + self.agent_type = attributes[:'agent_type'] + end + + if attributes.key?(:'aid') + self.aid = attributes[:'aid'] + end + + if attributes.key?(:'assigned_to') + self.assigned_to = attributes[:'assigned_to'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cloud') + self.cloud = attributes[:'cloud'] + end + + if attributes.key?(:'cloud_account_id') + self.cloud_account_id = attributes[:'cloud_account_id'] + end + + if attributes.key?(:'cloud_id') + self.cloud_id = attributes[:'cloud_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 + + if attributes.key?(:'cluster_name') + self.cluster_name = attributes[:'cluster_name'] + end + + if attributes.key?(:'command_line') + self.command_line = attributes[:'command_line'] + end + + if attributes.key?(:'computer_name') + self.computer_name = attributes[:'computer_name'] + end + + if attributes.key?(:'container_devices') + if (value = attributes[:'container_devices']).is_a?(Array) + self.container_devices = value + end + end + + if attributes.key?(:'container_id') + self.container_id = attributes[:'container_id'] + end + + if attributes.key?(:'container_interactive_mode') + self.container_interactive_mode = attributes[:'container_interactive_mode'] + end + + if attributes.key?(:'container_name') + self.container_name = attributes[:'container_name'] + end + + if attributes.key?(:'container_network_ip_address') + self.container_network_ip_address = attributes[:'container_network_ip_address'] + end + + if attributes.key?(:'container_privileged') + self.container_privileged = attributes[:'container_privileged'] + end + + if attributes.key?(:'container_read_only_root_fs') + self.container_read_only_root_fs = attributes[:'container_read_only_root_fs'] + end + + if attributes.key?(:'container_user_info') + self.container_user_info = attributes[:'container_user_info'] + end + + if attributes.key?(:'containers_impacted_count') + self.containers_impacted_count = attributes[:'containers_impacted_count'] + end + + if attributes.key?(:'detect_timestamp') + self.detect_timestamp = attributes[:'detect_timestamp'] + end + + if attributes.key?(:'detection_description') + self.detection_description = attributes[:'detection_description'] + end + + if attributes.key?(:'detection_id') + self.detection_id = attributes[:'detection_id'] + end + + if attributes.key?(:'detection_name') + if (value = attributes[:'detection_name']).is_a?(Array) + self.detection_name = value + end + end + + if attributes.key?(:'executable_sha_256') + self.executable_sha_256 = attributes[:'executable_sha_256'] + end + + if attributes.key?(:'file_name') + self.file_name = attributes[:'file_name'] + end + + if attributes.key?(:'file_path') + self.file_path = attributes[:'file_path'] + end + + if attributes.key?(:'host_containers_count') + self.host_containers_count = attributes[:'host_containers_count'] + end + + if attributes.key?(:'host_detections_count') + self.host_detections_count = attributes[:'host_detections_count'] + end + + if attributes.key?(:'host_detections_ids') + if (value = attributes[:'host_detections_ids']).is_a?(Array) + self.host_detections_ids = value + end + end + + if attributes.key?(:'host_id') + self.host_id = attributes[:'host_id'] + end + + if attributes.key?(:'host_last_seen_timestamp') + self.host_last_seen_timestamp = attributes[:'host_last_seen_timestamp'] + end + + if attributes.key?(:'host_type') + self.host_type = attributes[:'host_type'] + end + + if attributes.key?(:'image_digest') + self.image_digest = attributes[:'image_digest'] + end + + if attributes.key?(:'image_first_seen_timestamp') + self.image_first_seen_timestamp = attributes[:'image_first_seen_timestamp'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'image_label') + self.image_label = attributes[:'image_label'] + end + + if attributes.key?(:'image_last_seen_timestamp') + self.image_last_seen_timestamp = attributes[:'image_last_seen_timestamp'] + end + + if attributes.key?(:'image_maintainer') + self.image_maintainer = attributes[:'image_maintainer'] + end + + if attributes.key?(:'image_name') + self.image_name = attributes[:'image_name'] + end + + if attributes.key?(:'images_container_count') + self.images_container_count = attributes[:'images_container_count'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'network_ip_address') + self.network_ip_address = attributes[:'network_ip_address'] + end + + if attributes.key?(:'os_version') + self.os_version = attributes[:'os_version'] + end + + if attributes.key?(:'pod_id') + self.pod_id = attributes[:'pod_id'] + end + + if attributes.key?(:'pod_name') + self.pod_name = attributes[:'pod_name'] + end + + if attributes.key?(:'pod_namespace') + self.pod_namespace = attributes[:'pod_namespace'] + end + + if attributes.key?(:'sensor_version') + self.sensor_version = attributes[:'sensor_version'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'tactic_and_technique') + self.tactic_and_technique = attributes[:'tactic_and_technique'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + 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 + if @action_taken.nil? + invalid_properties.push('invalid value for "action_taken", action_taken cannot be nil.') + end + + if @agent_type.nil? + invalid_properties.push('invalid value for "agent_type", agent_type cannot be nil.') + end + + if @aid.nil? + invalid_properties.push('invalid value for "aid", aid cannot be nil.') + end + + if @assigned_to.nil? + invalid_properties.push('invalid value for "assigned_to", assigned_to cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cloud.nil? + invalid_properties.push('invalid value for "cloud", cloud 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_id.nil? + invalid_properties.push('invalid value for "cloud_id", cloud_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 + + if @cluster_name.nil? + invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') + end + + if @command_line.nil? + invalid_properties.push('invalid value for "command_line", command_line cannot be nil.') + end + + if @computer_name.nil? + invalid_properties.push('invalid value for "computer_name", computer_name cannot be nil.') + end + + if @container_devices.nil? + invalid_properties.push('invalid value for "container_devices", container_devices cannot be nil.') + end + + if @container_id.nil? + invalid_properties.push('invalid value for "container_id", container_id cannot be nil.') + end + + if @container_interactive_mode.nil? + invalid_properties.push('invalid value for "container_interactive_mode", container_interactive_mode cannot be nil.') + end + + if @container_name.nil? + invalid_properties.push('invalid value for "container_name", container_name cannot be nil.') + end + + if @container_network_ip_address.nil? + invalid_properties.push('invalid value for "container_network_ip_address", container_network_ip_address cannot be nil.') + end + + if @container_privileged.nil? + invalid_properties.push('invalid value for "container_privileged", container_privileged cannot be nil.') + end + + if @container_read_only_root_fs.nil? + invalid_properties.push('invalid value for "container_read_only_root_fs", container_read_only_root_fs cannot be nil.') + end + + if @container_user_info.nil? + invalid_properties.push('invalid value for "container_user_info", container_user_info cannot be nil.') + end + + if @containers_impacted_count.nil? + invalid_properties.push('invalid value for "containers_impacted_count", containers_impacted_count cannot be nil.') + end + + if @detect_timestamp.nil? + invalid_properties.push('invalid value for "detect_timestamp", detect_timestamp cannot be nil.') + end + + if @detection_description.nil? + invalid_properties.push('invalid value for "detection_description", detection_description cannot be nil.') + end + + if @detection_id.nil? + invalid_properties.push('invalid value for "detection_id", detection_id cannot be nil.') + end + + if @detection_name.nil? + invalid_properties.push('invalid value for "detection_name", detection_name cannot be nil.') + end + + if @executable_sha_256.nil? + invalid_properties.push('invalid value for "executable_sha_256", executable_sha_256 cannot be nil.') + end + + if @file_name.nil? + invalid_properties.push('invalid value for "file_name", file_name cannot be nil.') + end + + if @file_path.nil? + invalid_properties.push('invalid value for "file_path", file_path cannot be nil.') + end + + if @host_containers_count.nil? + invalid_properties.push('invalid value for "host_containers_count", host_containers_count cannot be nil.') + end + + if @host_detections_count.nil? + invalid_properties.push('invalid value for "host_detections_count", host_detections_count cannot be nil.') + end + + if @host_detections_ids.nil? + invalid_properties.push('invalid value for "host_detections_ids", host_detections_ids cannot be nil.') + end + + if @host_id.nil? + invalid_properties.push('invalid value for "host_id", host_id cannot be nil.') + end + + if @host_last_seen_timestamp.nil? + invalid_properties.push('invalid value for "host_last_seen_timestamp", host_last_seen_timestamp cannot be nil.') + end + + if @host_type.nil? + invalid_properties.push('invalid value for "host_type", host_type cannot be nil.') + end + + if @image_digest.nil? + invalid_properties.push('invalid value for "image_digest", image_digest cannot be nil.') + end + + if @image_first_seen_timestamp.nil? + invalid_properties.push('invalid value for "image_first_seen_timestamp", image_first_seen_timestamp cannot be nil.') + end + + if @image_id.nil? + invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') + end + + if @image_label.nil? + invalid_properties.push('invalid value for "image_label", image_label cannot be nil.') + end + + if @image_last_seen_timestamp.nil? + invalid_properties.push('invalid value for "image_last_seen_timestamp", image_last_seen_timestamp cannot be nil.') + end + + if @image_maintainer.nil? + invalid_properties.push('invalid value for "image_maintainer", image_maintainer cannot be nil.') + end + + if @image_name.nil? + invalid_properties.push('invalid value for "image_name", image_name cannot be nil.') + end + + if @images_container_count.nil? + invalid_properties.push('invalid value for "images_container_count", images_container_count cannot be nil.') + end + + if @namespace.nil? + invalid_properties.push('invalid value for "namespace", namespace cannot be nil.') + end + + if @network_ip_address.nil? + invalid_properties.push('invalid value for "network_ip_address", network_ip_address cannot be nil.') + end + + if @os_version.nil? + invalid_properties.push('invalid value for "os_version", os_version cannot be nil.') + end + + if @pod_id.nil? + invalid_properties.push('invalid value for "pod_id", pod_id cannot be nil.') + end + + if @pod_name.nil? + invalid_properties.push('invalid value for "pod_name", pod_name cannot be nil.') + end + + if @pod_namespace.nil? + invalid_properties.push('invalid value for "pod_namespace", pod_namespace cannot be nil.') + end + + if @sensor_version.nil? + invalid_properties.push('invalid value for "sensor_version", sensor_version cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @tactic_and_technique.nil? + invalid_properties.push('invalid value for "tactic_and_technique", tactic_and_technique cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @vulnerabilities_count.nil? + invalid_properties.push('invalid value for "vulnerabilities_count", vulnerabilities_count 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 @action_taken.nil? + return false if @agent_type.nil? + return false if @aid.nil? + return false if @assigned_to.nil? + return false if @cid.nil? + return false if @cloud.nil? + return false if @cloud_account_id.nil? + return false if @cloud_id.nil? + return false if @cloud_instance_id.nil? + return false if @cloud_name.nil? + return false if @cluster_name.nil? + return false if @command_line.nil? + return false if @computer_name.nil? + return false if @container_devices.nil? + return false if @container_id.nil? + return false if @container_interactive_mode.nil? + return false if @container_name.nil? + return false if @container_network_ip_address.nil? + return false if @container_privileged.nil? + return false if @container_read_only_root_fs.nil? + return false if @container_user_info.nil? + return false if @containers_impacted_count.nil? + return false if @detect_timestamp.nil? + return false if @detection_description.nil? + return false if @detection_id.nil? + return false if @detection_name.nil? + return false if @executable_sha_256.nil? + return false if @file_name.nil? + return false if @file_path.nil? + return false if @host_containers_count.nil? + return false if @host_detections_count.nil? + return false if @host_detections_ids.nil? + return false if @host_id.nil? + return false if @host_last_seen_timestamp.nil? + return false if @host_type.nil? + return false if @image_digest.nil? + return false if @image_first_seen_timestamp.nil? + return false if @image_id.nil? + return false if @image_label.nil? + return false if @image_last_seen_timestamp.nil? + return false if @image_maintainer.nil? + return false if @image_name.nil? + return false if @images_container_count.nil? + return false if @namespace.nil? + return false if @network_ip_address.nil? + return false if @os_version.nil? + return false if @pod_id.nil? + return false if @pod_name.nil? + return false if @pod_namespace.nil? + return false if @sensor_version.nil? + return false if @severity.nil? + return false if @tactic_and_technique.nil? + return false if @type.nil? + return false if @vulnerabilities_count.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 && + action_taken == o.action_taken && + agent_type == o.agent_type && + aid == o.aid && + assigned_to == o.assigned_to && + cid == o.cid && + cloud == o.cloud && + cloud_account_id == o.cloud_account_id && + cloud_id == o.cloud_id && + cloud_instance_id == o.cloud_instance_id && + cloud_name == o.cloud_name && + cluster_name == o.cluster_name && + command_line == o.command_line && + computer_name == o.computer_name && + container_devices == o.container_devices && + container_id == o.container_id && + container_interactive_mode == o.container_interactive_mode && + container_name == o.container_name && + container_network_ip_address == o.container_network_ip_address && + container_privileged == o.container_privileged && + container_read_only_root_fs == o.container_read_only_root_fs && + container_user_info == o.container_user_info && + containers_impacted_count == o.containers_impacted_count && + detect_timestamp == o.detect_timestamp && + detection_description == o.detection_description && + detection_id == o.detection_id && + detection_name == o.detection_name && + executable_sha_256 == o.executable_sha_256 && + file_name == o.file_name && + file_path == o.file_path && + host_containers_count == o.host_containers_count && + host_detections_count == o.host_detections_count && + host_detections_ids == o.host_detections_ids && + host_id == o.host_id && + host_last_seen_timestamp == o.host_last_seen_timestamp && + host_type == o.host_type && + image_digest == o.image_digest && + image_first_seen_timestamp == o.image_first_seen_timestamp && + image_id == o.image_id && + image_label == o.image_label && + image_last_seen_timestamp == o.image_last_seen_timestamp && + image_maintainer == o.image_maintainer && + image_name == o.image_name && + images_container_count == o.images_container_count && + namespace == o.namespace && + network_ip_address == o.network_ip_address && + os_version == o.os_version && + pod_id == o.pod_id && + pod_name == o.pod_name && + pod_namespace == o.pod_namespace && + sensor_version == o.sensor_version && + severity == o.severity && + tactic_and_technique == o.tactic_and_technique && + type == o.type && + 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 + [action_taken, agent_type, aid, assigned_to, cid, cloud, cloud_account_id, cloud_id, cloud_instance_id, cloud_name, cluster_name, command_line, computer_name, container_devices, container_id, container_interactive_mode, container_name, container_network_ip_address, container_privileged, container_read_only_root_fs, container_user_info, containers_impacted_count, detect_timestamp, detection_description, detection_id, detection_name, executable_sha_256, file_name, file_path, host_containers_count, host_detections_count, host_detections_ids, host_id, host_last_seen_timestamp, host_type, image_digest, image_first_seen_timestamp, image_id, image_label, image_last_seen_timestamp, image_maintainer, image_name, images_container_count, namespace, network_ip_address, os_version, pod_id, pod_name, pod_namespace, sensor_version, severity, tactic_and_technique, type, 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/models_api_unidentified_container.rb b/lib/crimson-falcon/models/models_api_unidentified_container.rb new file mode 100644 index 00000000..57a8194c --- /dev/null +++ b/lib/crimson-falcon/models/models_api_unidentified_container.rb @@ -0,0 +1,525 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIUnidentifiedContainer + attr_accessor :assessed_images + + attr_accessor :assessed_images_count + + attr_accessor :cid + + attr_accessor :cluster_name + + attr_accessor :containers_impacted + + attr_accessor :containers_impacted_count + + attr_accessor :detect_timestamp + + attr_accessor :detections_count + + attr_accessor :first_seen + + attr_accessor :host_id + + attr_accessor :image_assessment_detections_count + + attr_accessor :last_seen + + attr_accessor :namespace + + attr_accessor :node_name + + attr_accessor :pod_id + + attr_accessor :pod_name + + attr_accessor :runtime_detections_count + + attr_accessor :severity + + attr_accessor :unassessed_images + + attr_accessor :unassessed_images_count + + attr_accessor :visible_to_k8s + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assessed_images' => :'assessed_images', + :'assessed_images_count' => :'assessed_images_count', + :'cid' => :'cid', + :'cluster_name' => :'cluster_name', + :'containers_impacted' => :'containers_impacted', + :'containers_impacted_count' => :'containers_impacted_count', + :'detect_timestamp' => :'detect_timestamp', + :'detections_count' => :'detections_count', + :'first_seen' => :'first_seen', + :'host_id' => :'host_id', + :'image_assessment_detections_count' => :'image_assessment_detections_count', + :'last_seen' => :'last_seen', + :'namespace' => :'namespace', + :'node_name' => :'node_name', + :'pod_id' => :'pod_id', + :'pod_name' => :'pod_name', + :'runtime_detections_count' => :'runtime_detections_count', + :'severity' => :'severity', + :'unassessed_images' => :'unassessed_images', + :'unassessed_images_count' => :'unassessed_images_count', + :'visible_to_k8s' => :'visible_to_k8s' + } + 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 + { + :'assessed_images' => :'Array', + :'assessed_images_count' => :'String', + :'cid' => :'String', + :'cluster_name' => :'String', + :'containers_impacted' => :'Array', + :'containers_impacted_count' => :'String', + :'detect_timestamp' => :'String', + :'detections_count' => :'String', + :'first_seen' => :'String', + :'host_id' => :'String', + :'image_assessment_detections_count' => :'String', + :'last_seen' => :'String', + :'namespace' => :'String', + :'node_name' => :'String', + :'pod_id' => :'String', + :'pod_name' => :'String', + :'runtime_detections_count' => :'String', + :'severity' => :'String', + :'unassessed_images' => :'Array', + :'unassessed_images_count' => :'String', + :'visible_to_k8s' => :'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::ModelsAPIUnidentifiedContainer` 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::ModelsAPIUnidentifiedContainer`. 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?(:'assessed_images') + if (value = attributes[:'assessed_images']).is_a?(Array) + self.assessed_images = value + end + end + + if attributes.key?(:'assessed_images_count') + self.assessed_images_count = attributes[:'assessed_images_count'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cluster_name') + self.cluster_name = attributes[:'cluster_name'] + end + + if attributes.key?(:'containers_impacted') + if (value = attributes[:'containers_impacted']).is_a?(Array) + self.containers_impacted = value + end + end + + if attributes.key?(:'containers_impacted_count') + self.containers_impacted_count = attributes[:'containers_impacted_count'] + end + + if attributes.key?(:'detect_timestamp') + self.detect_timestamp = attributes[:'detect_timestamp'] + end + + if attributes.key?(:'detections_count') + self.detections_count = attributes[:'detections_count'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'host_id') + self.host_id = attributes[:'host_id'] + end + + if attributes.key?(:'image_assessment_detections_count') + self.image_assessment_detections_count = attributes[:'image_assessment_detections_count'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'node_name') + self.node_name = attributes[:'node_name'] + end + + if attributes.key?(:'pod_id') + self.pod_id = attributes[:'pod_id'] + end + + if attributes.key?(:'pod_name') + self.pod_name = attributes[:'pod_name'] + end + + if attributes.key?(:'runtime_detections_count') + self.runtime_detections_count = attributes[:'runtime_detections_count'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'unassessed_images') + if (value = attributes[:'unassessed_images']).is_a?(Array) + self.unassessed_images = value + end + end + + if attributes.key?(:'unassessed_images_count') + self.unassessed_images_count = attributes[:'unassessed_images_count'] + end + + if attributes.key?(:'visible_to_k8s') + self.visible_to_k8s = attributes[:'visible_to_k8s'] + 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 @assessed_images.nil? + invalid_properties.push('invalid value for "assessed_images", assessed_images cannot be nil.') + end + + if @assessed_images_count.nil? + invalid_properties.push('invalid value for "assessed_images_count", assessed_images_count cannot be nil.') + end + + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cluster_name.nil? + invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') + end + + if @containers_impacted.nil? + invalid_properties.push('invalid value for "containers_impacted", containers_impacted cannot be nil.') + end + + if @containers_impacted_count.nil? + invalid_properties.push('invalid value for "containers_impacted_count", containers_impacted_count cannot be nil.') + end + + if @detect_timestamp.nil? + invalid_properties.push('invalid value for "detect_timestamp", detect_timestamp cannot be nil.') + end + + if @detections_count.nil? + invalid_properties.push('invalid value for "detections_count", detections_count cannot be nil.') + end + + if @first_seen.nil? + invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.') + end + + if @host_id.nil? + invalid_properties.push('invalid value for "host_id", host_id cannot be nil.') + end + + if @image_assessment_detections_count.nil? + invalid_properties.push('invalid value for "image_assessment_detections_count", image_assessment_detections_count cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @namespace.nil? + invalid_properties.push('invalid value for "namespace", namespace cannot be nil.') + end + + if @node_name.nil? + invalid_properties.push('invalid value for "node_name", node_name cannot be nil.') + end + + if @pod_id.nil? + invalid_properties.push('invalid value for "pod_id", pod_id cannot be nil.') + end + + if @pod_name.nil? + invalid_properties.push('invalid value for "pod_name", pod_name cannot be nil.') + end + + if @runtime_detections_count.nil? + invalid_properties.push('invalid value for "runtime_detections_count", runtime_detections_count cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @unassessed_images.nil? + invalid_properties.push('invalid value for "unassessed_images", unassessed_images cannot be nil.') + end + + if @unassessed_images_count.nil? + invalid_properties.push('invalid value for "unassessed_images_count", unassessed_images_count cannot be nil.') + end + + if @visible_to_k8s.nil? + invalid_properties.push('invalid value for "visible_to_k8s", visible_to_k8s 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 @assessed_images.nil? + return false if @assessed_images_count.nil? + return false if @cid.nil? + return false if @cluster_name.nil? + return false if @containers_impacted.nil? + return false if @containers_impacted_count.nil? + return false if @detect_timestamp.nil? + return false if @detections_count.nil? + return false if @first_seen.nil? + return false if @host_id.nil? + return false if @image_assessment_detections_count.nil? + return false if @last_seen.nil? + return false if @namespace.nil? + return false if @node_name.nil? + return false if @pod_id.nil? + return false if @pod_name.nil? + return false if @runtime_detections_count.nil? + return false if @severity.nil? + return false if @unassessed_images.nil? + return false if @unassessed_images_count.nil? + return false if @visible_to_k8s.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 && + assessed_images == o.assessed_images && + assessed_images_count == o.assessed_images_count && + cid == o.cid && + cluster_name == o.cluster_name && + containers_impacted == o.containers_impacted && + containers_impacted_count == o.containers_impacted_count && + detect_timestamp == o.detect_timestamp && + detections_count == o.detections_count && + first_seen == o.first_seen && + host_id == o.host_id && + image_assessment_detections_count == o.image_assessment_detections_count && + last_seen == o.last_seen && + namespace == o.namespace && + node_name == o.node_name && + pod_id == o.pod_id && + pod_name == o.pod_name && + runtime_detections_count == o.runtime_detections_count && + severity == o.severity && + unassessed_images == o.unassessed_images && + unassessed_images_count == o.unassessed_images_count && + visible_to_k8s == o.visible_to_k8s + 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 + [assessed_images, assessed_images_count, cid, cluster_name, containers_impacted, containers_impacted_count, detect_timestamp, detections_count, first_seen, host_id, image_assessment_detections_count, last_seen, namespace, node_name, pod_id, pod_name, runtime_detections_count, severity, unassessed_images, unassessed_images_count, visible_to_k8s].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_vuln_by_image_count.rb b/lib/crimson-falcon/models/models_api_vuln_by_image_count.rb new file mode 100644 index 00000000..6246fe0b --- /dev/null +++ b/lib/crimson-falcon/models/models_api_vuln_by_image_count.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 ModelsAPIVulnByImageCount + attr_accessor :cve_id + + attr_accessor :images_impacted + + attr_accessor :product + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cve_id' => :'cve_id', + :'images_impacted' => :'images_impacted', + :'product' => :'product', + :'severity' => :'severity' + } + 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 + { + :'cve_id' => :'String', + :'images_impacted' => :'Integer', + :'product' => :'Array', + :'severity' => :'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::ModelsAPIVulnByImageCount` 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::ModelsAPIVulnByImageCount`. 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?(:'cve_id') + self.cve_id = attributes[:'cve_id'] + end + + if attributes.key?(:'images_impacted') + self.images_impacted = attributes[:'images_impacted'] + end + + if attributes.key?(:'product') + if (value = attributes[:'product']).is_a?(Array) + self.product = value + end + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + 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 @images_impacted.nil? + invalid_properties.push('invalid value for "images_impacted", images_impacted cannot be nil.') + end + + if @product.nil? + invalid_properties.push('invalid value for "product", product cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity 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 @images_impacted.nil? + return false if @product.nil? + return false if @severity.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 && + cve_id == o.cve_id && + images_impacted == o.images_impacted && + product == o.product && + severity == o.severity + 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 + [cve_id, images_impacted, product, severity].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_vuln_by_publication_date.rb b/lib/crimson-falcon/models/models_api_vuln_by_publication_date.rb new file mode 100644 index 00000000..ccec23c2 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_vuln_by_publication_date.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 ModelsAPIVulnByPublicationDate + attr_accessor :containers_impacted + + attr_accessor :cve_id + + attr_accessor :cvss_score + + attr_accessor :images_impacted + + attr_accessor :published_date + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'containers_impacted' => :'containers_impacted', + :'cve_id' => :'cve_id', + :'cvss_score' => :'cvss_score', + :'images_impacted' => :'images_impacted', + :'published_date' => :'published_date', + :'severity' => :'severity' + } + 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 + { + :'containers_impacted' => :'Integer', + :'cve_id' => :'String', + :'cvss_score' => :'Float', + :'images_impacted' => :'Integer', + :'published_date' => :'String', + :'severity' => :'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::ModelsAPIVulnByPublicationDate` 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::ModelsAPIVulnByPublicationDate`. 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?(:'containers_impacted') + self.containers_impacted = attributes[:'containers_impacted'] + end + + if attributes.key?(:'cve_id') + self.cve_id = attributes[:'cve_id'] + end + + if attributes.key?(:'cvss_score') + self.cvss_score = attributes[:'cvss_score'] + end + + if attributes.key?(:'images_impacted') + self.images_impacted = attributes[:'images_impacted'] + end + + if attributes.key?(:'published_date') + self.published_date = attributes[:'published_date'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + 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 @containers_impacted.nil? + invalid_properties.push('invalid value for "containers_impacted", containers_impacted cannot be nil.') + end + + if @cve_id.nil? + invalid_properties.push('invalid value for "cve_id", cve_id cannot be nil.') + end + + if @cvss_score.nil? + invalid_properties.push('invalid value for "cvss_score", cvss_score cannot be nil.') + end + + if @images_impacted.nil? + invalid_properties.push('invalid value for "images_impacted", images_impacted cannot be nil.') + end + + if @published_date.nil? + invalid_properties.push('invalid value for "published_date", published_date cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity 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 @containers_impacted.nil? + return false if @cve_id.nil? + return false if @cvss_score.nil? + return false if @images_impacted.nil? + return false if @published_date.nil? + return false if @severity.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 && + containers_impacted == o.containers_impacted && + cve_id == o.cve_id && + cvss_score == o.cvss_score && + images_impacted == o.images_impacted && + published_date == o.published_date && + severity == o.severity + 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 + [containers_impacted, cve_id, cvss_score, images_impacted, published_date, severity].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_vuln_count.rb b/lib/crimson-falcon/models/models_api_vuln_count.rb new file mode 100644 index 00000000..b5240ac5 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_vuln_count.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 ModelsAPIVulnCount + attr_accessor :count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'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 + { + :'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::ModelsAPIVulnCount` 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::ModelsAPIVulnCount`. 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 + 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 @count.nil? + invalid_properties.push('invalid value for "count", count 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 @count.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 && + count == o.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 + [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/models_api_vuln_count_by_severity.rb b/lib/crimson-falcon/models/models_api_vuln_count_by_severity.rb new file mode 100644 index 00000000..e9c812c0 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_vuln_count_by_severity.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 ModelsAPIVulnCountBySeverity + attr_accessor :count + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count' => :'count', + :'severity' => :'severity' + } + 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', + :'severity' => :'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::ModelsAPIVulnCountBySeverity` 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::ModelsAPIVulnCountBySeverity`. 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?(:'severity') + self.severity = attributes[:'severity'] + 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 @count.nil? + invalid_properties.push('invalid value for "count", count cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity 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 @count.nil? + return false if @severity.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 && + count == o.count && + severity == o.severity + 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, severity].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 new file mode 100644 index 00000000..8acfa142 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_vulnerability_combined.rb @@ -0,0 +1,407 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIVulnerabilityCombined + attr_accessor :containers_impacted + + attr_accessor :cps_current_rating + + attr_accessor :cve_id + + attr_accessor :cvss_score + + attr_accessor :description + + attr_accessor :exploit_found + + attr_accessor :exploited_status + + attr_accessor :exploited_status_string + + attr_accessor :images_impacted + + attr_accessor :packages_impacted + + attr_accessor :published_date + + attr_accessor :remediation_available + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'containers_impacted' => :'containers_impacted', + :'cps_current_rating' => :'cps_current_rating', + :'cve_id' => :'cve_id', + :'cvss_score' => :'cvss_score', + :'description' => :'description', + :'exploit_found' => :'exploit_found', + :'exploited_status' => :'exploited_status', + :'exploited_status_string' => :'exploited_status_string', + :'images_impacted' => :'images_impacted', + :'packages_impacted' => :'packages_impacted', + :'published_date' => :'published_date', + :'remediation_available' => :'remediation_available', + :'severity' => :'severity' + } + 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 + { + :'containers_impacted' => :'Integer', + :'cps_current_rating' => :'String', + :'cve_id' => :'String', + :'cvss_score' => :'Float', + :'description' => :'String', + :'exploit_found' => :'Boolean', + :'exploited_status' => :'Integer', + :'exploited_status_string' => :'String', + :'images_impacted' => :'Integer', + :'packages_impacted' => :'Integer', + :'published_date' => :'String', + :'remediation_available' => :'Boolean', + :'severity' => :'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::ModelsAPIVulnerabilityCombined` 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::ModelsAPIVulnerabilityCombined`. 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?(:'containers_impacted') + self.containers_impacted = attributes[:'containers_impacted'] + end + + if attributes.key?(:'cps_current_rating') + self.cps_current_rating = attributes[:'cps_current_rating'] + end + + if attributes.key?(:'cve_id') + self.cve_id = attributes[:'cve_id'] + end + + if attributes.key?(:'cvss_score') + self.cvss_score = attributes[:'cvss_score'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'exploit_found') + self.exploit_found = attributes[:'exploit_found'] + end + + if attributes.key?(:'exploited_status') + self.exploited_status = attributes[:'exploited_status'] + end + + if attributes.key?(:'exploited_status_string') + self.exploited_status_string = attributes[:'exploited_status_string'] + end + + if attributes.key?(:'images_impacted') + self.images_impacted = attributes[:'images_impacted'] + end + + if attributes.key?(:'packages_impacted') + self.packages_impacted = attributes[:'packages_impacted'] + end + + if attributes.key?(:'published_date') + self.published_date = attributes[:'published_date'] + end + + if attributes.key?(:'remediation_available') + self.remediation_available = attributes[:'remediation_available'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + 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 @containers_impacted.nil? + invalid_properties.push('invalid value for "containers_impacted", containers_impacted cannot be nil.') + end + + if @cps_current_rating.nil? + invalid_properties.push('invalid value for "cps_current_rating", cps_current_rating cannot be nil.') + end + + if @cve_id.nil? + invalid_properties.push('invalid value for "cve_id", cve_id cannot be nil.') + end + + if @cvss_score.nil? + invalid_properties.push('invalid value for "cvss_score", cvss_score cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @exploit_found.nil? + invalid_properties.push('invalid value for "exploit_found", exploit_found cannot be nil.') + end + + if @exploited_status.nil? + invalid_properties.push('invalid value for "exploited_status", exploited_status cannot be nil.') + end + + if @exploited_status_string.nil? + invalid_properties.push('invalid value for "exploited_status_string", exploited_status_string cannot be nil.') + end + + if @images_impacted.nil? + invalid_properties.push('invalid value for "images_impacted", images_impacted cannot be nil.') + end + + if @packages_impacted.nil? + invalid_properties.push('invalid value for "packages_impacted", packages_impacted cannot be nil.') + end + + if @published_date.nil? + invalid_properties.push('invalid value for "published_date", published_date cannot be nil.') + end + + if @remediation_available.nil? + invalid_properties.push('invalid value for "remediation_available", remediation_available cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity 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 @containers_impacted.nil? + return false if @cps_current_rating.nil? + return false if @cve_id.nil? + return false if @cvss_score.nil? + return false if @description.nil? + return false if @exploit_found.nil? + return false if @exploited_status.nil? + return false if @exploited_status_string.nil? + return false if @images_impacted.nil? + return false if @packages_impacted.nil? + return false if @published_date.nil? + return false if @remediation_available.nil? + return false if @severity.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 && + containers_impacted == o.containers_impacted && + cps_current_rating == o.cps_current_rating && + cve_id == o.cve_id && + cvss_score == o.cvss_score && + description == o.description && + exploit_found == o.exploit_found && + exploited_status == o.exploited_status && + exploited_status_string == o.exploited_status_string && + images_impacted == o.images_impacted && + packages_impacted == o.packages_impacted && + published_date == o.published_date && + remediation_available == o.remediation_available && + severity == o.severity + 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 + [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 + # @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_details.rb b/lib/crimson-falcon/models/models_api_vulnerability_details.rb new file mode 100644 index 00000000..2baacec1 --- /dev/null +++ b/lib/crimson-falcon/models/models_api_vulnerability_details.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 ModelsAPIVulnerabilityDetails + attr_accessor :cps_current_rating + + attr_accessor :cve_id + + attr_accessor :cvss_score + + attr_accessor :exploited_status + + attr_accessor :layer_command + + attr_accessor :layer_index + + attr_accessor :package_name_version + + attr_accessor :package_path + + attr_accessor :remediation_available + + attr_accessor :severity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cps_current_rating' => :'cps_current_rating', + :'cve_id' => :'cve_id', + :'cvss_score' => :'cvss_score', + :'exploited_status' => :'exploited_status', + :'layer_command' => :'layer_command', + :'layer_index' => :'layer_index', + :'package_name_version' => :'package_name_version', + :'package_path' => :'package_path', + :'remediation_available' => :'remediation_available', + :'severity' => :'severity' + } + 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 + { + :'cps_current_rating' => :'String', + :'cve_id' => :'String', + :'cvss_score' => :'String', + :'exploited_status' => :'Integer', + :'layer_command' => :'String', + :'layer_index' => :'Integer', + :'package_name_version' => :'String', + :'package_path' => :'String', + :'remediation_available' => :'Boolean', + :'severity' => :'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::ModelsAPIVulnerabilityDetails` 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::ModelsAPIVulnerabilityDetails`. 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?(:'cps_current_rating') + self.cps_current_rating = attributes[:'cps_current_rating'] + end + + if attributes.key?(:'cve_id') + self.cve_id = attributes[:'cve_id'] + end + + if attributes.key?(:'cvss_score') + self.cvss_score = attributes[:'cvss_score'] + end + + if attributes.key?(:'exploited_status') + self.exploited_status = attributes[:'exploited_status'] + end + + if attributes.key?(:'layer_command') + self.layer_command = attributes[:'layer_command'] + end + + if attributes.key?(:'layer_index') + self.layer_index = attributes[:'layer_index'] + end + + if attributes.key?(:'package_name_version') + self.package_name_version = attributes[:'package_name_version'] + end + + if attributes.key?(:'package_path') + self.package_path = attributes[:'package_path'] + end + + if attributes.key?(:'remediation_available') + self.remediation_available = attributes[:'remediation_available'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + 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 @cps_current_rating.nil? + invalid_properties.push('invalid value for "cps_current_rating", cps_current_rating cannot be nil.') + end + + if @cve_id.nil? + invalid_properties.push('invalid value for "cve_id", cve_id cannot be nil.') + end + + if @cvss_score.nil? + invalid_properties.push('invalid value for "cvss_score", cvss_score cannot be nil.') + end + + if @exploited_status.nil? + invalid_properties.push('invalid value for "exploited_status", exploited_status cannot be nil.') + end + + if @layer_command.nil? + invalid_properties.push('invalid value for "layer_command", layer_command cannot be nil.') + end + + if @layer_index.nil? + invalid_properties.push('invalid value for "layer_index", layer_index 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 @package_path.nil? + invalid_properties.push('invalid value for "package_path", package_path cannot be nil.') + end + + if @remediation_available.nil? + invalid_properties.push('invalid value for "remediation_available", remediation_available cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity 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 @cps_current_rating.nil? + return false if @cve_id.nil? + return false if @cvss_score.nil? + return false if @exploited_status.nil? + return false if @layer_command.nil? + return false if @layer_index.nil? + return false if @package_name_version.nil? + return false if @package_path.nil? + return false if @remediation_available.nil? + return false if @severity.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 && + cps_current_rating == o.cps_current_rating && + cve_id == o.cve_id && + cvss_score == o.cvss_score && + exploited_status == o.exploited_status && + layer_command == o.layer_command && + layer_index == o.layer_index && + package_name_version == o.package_name_version && + package_path == o.package_path && + remediation_available == o.remediation_available && + severity == o.severity + 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 + [cps_current_rating, cve_id, cvss_score, exploited_status, layer_command, layer_index, package_name_version, package_path, remediation_available, severity].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_info.rb b/lib/crimson-falcon/models/models_api_vulnerability_info.rb new file mode 100644 index 00000000..32be594e --- /dev/null +++ b/lib/crimson-falcon/models/models_api_vulnerability_info.rb @@ -0,0 +1,383 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsAPIVulnerabilityInfo + attr_accessor :cps_current_rating + + attr_accessor :cve_id + + attr_accessor :cvss_score + + attr_accessor :description + + attr_accessor :exploit_found + + attr_accessor :exploited_status_string + + attr_accessor :images_impacted + + attr_accessor :packages + + attr_accessor :published_date + + attr_accessor :severity + + attr_accessor :threat_actors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cps_current_rating' => :'cps_current_rating', + :'cve_id' => :'cve_id', + :'cvss_score' => :'cvss_score', + :'description' => :'description', + :'exploit_found' => :'exploit_found', + :'exploited_status_string' => :'exploited_status_string', + :'images_impacted' => :'images_impacted', + :'packages' => :'packages', + :'published_date' => :'published_date', + :'severity' => :'severity', + :'threat_actors' => :'threat_actors' + } + 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 + { + :'cps_current_rating' => :'String', + :'cve_id' => :'String', + :'cvss_score' => :'String', + :'description' => :'String', + :'exploit_found' => :'String', + :'exploited_status_string' => :'String', + :'images_impacted' => :'Integer', + :'packages' => :'Array', + :'published_date' => :'String', + :'severity' => :'String', + :'threat_actors' => :'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::ModelsAPIVulnerabilityInfo` 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::ModelsAPIVulnerabilityInfo`. 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?(:'cps_current_rating') + self.cps_current_rating = attributes[:'cps_current_rating'] + end + + if attributes.key?(:'cve_id') + self.cve_id = attributes[:'cve_id'] + end + + if attributes.key?(:'cvss_score') + self.cvss_score = attributes[:'cvss_score'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'exploit_found') + self.exploit_found = attributes[:'exploit_found'] + end + + if attributes.key?(:'exploited_status_string') + self.exploited_status_string = attributes[:'exploited_status_string'] + end + + if attributes.key?(:'images_impacted') + self.images_impacted = attributes[:'images_impacted'] + end + + if attributes.key?(:'packages') + if (value = attributes[:'packages']).is_a?(Array) + self.packages = value + end + end + + if attributes.key?(:'published_date') + self.published_date = attributes[:'published_date'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'threat_actors') + if (value = attributes[:'threat_actors']).is_a?(Array) + self.threat_actors = 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 @cps_current_rating.nil? + invalid_properties.push('invalid value for "cps_current_rating", cps_current_rating cannot be nil.') + end + + if @cve_id.nil? + invalid_properties.push('invalid value for "cve_id", cve_id cannot be nil.') + end + + if @cvss_score.nil? + invalid_properties.push('invalid value for "cvss_score", cvss_score cannot be nil.') + end + + if @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + if @exploit_found.nil? + invalid_properties.push('invalid value for "exploit_found", exploit_found cannot be nil.') + end + + if @exploited_status_string.nil? + invalid_properties.push('invalid value for "exploited_status_string", exploited_status_string cannot be nil.') + end + + if @images_impacted.nil? + invalid_properties.push('invalid value for "images_impacted", images_impacted cannot be nil.') + end + + if @packages.nil? + invalid_properties.push('invalid value for "packages", packages cannot be nil.') + end + + if @published_date.nil? + invalid_properties.push('invalid value for "published_date", published_date cannot be nil.') + end + + if @severity.nil? + invalid_properties.push('invalid value for "severity", severity cannot be nil.') + end + + if @threat_actors.nil? + invalid_properties.push('invalid value for "threat_actors", threat_actors 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 @cps_current_rating.nil? + return false if @cve_id.nil? + return false if @cvss_score.nil? + return false if @description.nil? + return false if @exploit_found.nil? + return false if @exploited_status_string.nil? + return false if @images_impacted.nil? + return false if @packages.nil? + return false if @published_date.nil? + return false if @severity.nil? + return false if @threat_actors.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 && + cps_current_rating == o.cps_current_rating && + cve_id == o.cve_id && + cvss_score == o.cvss_score && + description == o.description && + exploit_found == o.exploit_found && + exploited_status_string == o.exploited_status_string && + images_impacted == o.images_impacted && + packages == o.packages && + published_date == o.published_date && + severity == o.severity && + threat_actors == o.threat_actors + 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 + [cps_current_rating, cve_id, cvss_score, description, exploit_found, exploited_status_string, images_impacted, packages, published_date, severity, threat_actors].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_cluster.rb b/lib/crimson-falcon/models/models_cluster.rb new file mode 100644 index 00000000..c6a029e8 --- /dev/null +++ b/lib/crimson-falcon/models/models_cluster.rb @@ -0,0 +1,539 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsCluster + attr_accessor :access + + attr_accessor :agent_status + + attr_accessor :agents + + attr_accessor :cid + + attr_accessor :cloud_account_id + + attr_accessor :cloud_name + + attr_accessor :cloud_region + + attr_accessor :cluster_id + + attr_accessor :cluster_name + + attr_accessor :cluster_security_group + + attr_accessor :cluster_status + + attr_accessor :container_count + + attr_accessor :first_seen + + attr_accessor :kubernetes_version + + attr_accessor :labels_list + + attr_accessor :last_seen + + attr_accessor :management_status + + attr_accessor :node_count + + attr_accessor :pod_count + + attr_accessor :security_group + + attr_accessor :tags + + attr_accessor :virtual_network + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'access' => :'access', + :'agent_status' => :'agent_status', + :'agents' => :'agents', + :'cid' => :'cid', + :'cloud_account_id' => :'cloud_account_id', + :'cloud_name' => :'cloud_name', + :'cloud_region' => :'cloud_region', + :'cluster_id' => :'cluster_id', + :'cluster_name' => :'cluster_name', + :'cluster_security_group' => :'cluster_security_group', + :'cluster_status' => :'cluster_status', + :'container_count' => :'container_count', + :'first_seen' => :'first_seen', + :'kubernetes_version' => :'kubernetes_version', + :'labels_list' => :'labels_list', + :'last_seen' => :'last_seen', + :'management_status' => :'management_status', + :'node_count' => :'node_count', + :'pod_count' => :'pod_count', + :'security_group' => :'security_group', + :'tags' => :'tags', + :'virtual_network' => :'virtual_network' + } + 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 + { + :'access' => :'String', + :'agent_status' => :'String', + :'agents' => :'Array', + :'cid' => :'String', + :'cloud_account_id' => :'String', + :'cloud_name' => :'String', + :'cloud_region' => :'String', + :'cluster_id' => :'String', + :'cluster_name' => :'String', + :'cluster_security_group' => :'String', + :'cluster_status' => :'String', + :'container_count' => :'Integer', + :'first_seen' => :'String', + :'kubernetes_version' => :'String', + :'labels_list' => :'Array', + :'last_seen' => :'String', + :'management_status' => :'String', + :'node_count' => :'Integer', + :'pod_count' => :'Integer', + :'security_group' => :'String', + :'tags' => :'Hash', + :'virtual_network' => :'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::ModelsCluster` 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::ModelsCluster`. 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?(:'access') + self.access = attributes[:'access'] + end + + if attributes.key?(:'agent_status') + self.agent_status = attributes[:'agent_status'] + end + + if attributes.key?(:'agents') + if (value = attributes[:'agents']).is_a?(Array) + self.agents = value + end + 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_name') + self.cloud_name = attributes[:'cloud_name'] + end + + if attributes.key?(:'cloud_region') + self.cloud_region = attributes[:'cloud_region'] + 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?(:'cluster_security_group') + self.cluster_security_group = attributes[:'cluster_security_group'] + end + + if attributes.key?(:'cluster_status') + self.cluster_status = attributes[:'cluster_status'] + end + + if attributes.key?(:'container_count') + self.container_count = attributes[:'container_count'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'kubernetes_version') + self.kubernetes_version = attributes[:'kubernetes_version'] + end + + if attributes.key?(:'labels_list') + if (value = attributes[:'labels_list']).is_a?(Array) + self.labels_list = value + end + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'management_status') + self.management_status = attributes[:'management_status'] + end + + if attributes.key?(:'node_count') + self.node_count = attributes[:'node_count'] + end + + if attributes.key?(:'pod_count') + self.pod_count = attributes[:'pod_count'] + end + + if attributes.key?(:'security_group') + self.security_group = attributes[:'security_group'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Hash) + self.tags = value + end + end + + if attributes.key?(:'virtual_network') + self.virtual_network = attributes[:'virtual_network'] + 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 @access.nil? + invalid_properties.push('invalid value for "access", access cannot be nil.') + end + + if @agent_status.nil? + invalid_properties.push('invalid value for "agent_status", agent_status cannot be nil.') + end + + if @agents.nil? + invalid_properties.push('invalid value for "agents", agents 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_name.nil? + invalid_properties.push('invalid value for "cloud_name", cloud_name cannot be nil.') + end + + if @cloud_region.nil? + invalid_properties.push('invalid value for "cloud_region", cloud_region cannot be nil.') + end + + if @cluster_id.nil? + invalid_properties.push('invalid value for "cluster_id", cluster_id cannot be nil.') + end + + if @cluster_name.nil? + invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') + end + + if @cluster_security_group.nil? + invalid_properties.push('invalid value for "cluster_security_group", cluster_security_group cannot be nil.') + end + + if @cluster_status.nil? + invalid_properties.push('invalid value for "cluster_status", cluster_status cannot be nil.') + end + + if @container_count.nil? + invalid_properties.push('invalid value for "container_count", container_count cannot be nil.') + end + + if @first_seen.nil? + invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.') + end + + if @kubernetes_version.nil? + invalid_properties.push('invalid value for "kubernetes_version", kubernetes_version cannot be nil.') + end + + if @labels_list.nil? + invalid_properties.push('invalid value for "labels_list", labels_list cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @management_status.nil? + invalid_properties.push('invalid value for "management_status", management_status cannot be nil.') + end + + if @node_count.nil? + invalid_properties.push('invalid value for "node_count", node_count cannot be nil.') + end + + if @pod_count.nil? + invalid_properties.push('invalid value for "pod_count", pod_count cannot be nil.') + end + + if @security_group.nil? + invalid_properties.push('invalid value for "security_group", security_group cannot be nil.') + end + + if @tags.nil? + invalid_properties.push('invalid value for "tags", tags cannot be nil.') + end + + if @virtual_network.nil? + invalid_properties.push('invalid value for "virtual_network", virtual_network 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 @access.nil? + return false if @agent_status.nil? + return false if @agents.nil? + return false if @cid.nil? + return false if @cloud_account_id.nil? + return false if @cloud_name.nil? + return false if @cloud_region.nil? + return false if @cluster_id.nil? + return false if @cluster_name.nil? + return false if @cluster_security_group.nil? + return false if @cluster_status.nil? + return false if @container_count.nil? + return false if @first_seen.nil? + return false if @kubernetes_version.nil? + return false if @labels_list.nil? + return false if @last_seen.nil? + return false if @management_status.nil? + return false if @node_count.nil? + return false if @pod_count.nil? + return false if @security_group.nil? + return false if @tags.nil? + return false if @virtual_network.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 && + access == o.access && + agent_status == o.agent_status && + agents == o.agents && + cid == o.cid && + cloud_account_id == o.cloud_account_id && + cloud_name == o.cloud_name && + cloud_region == o.cloud_region && + cluster_id == o.cluster_id && + cluster_name == o.cluster_name && + cluster_security_group == o.cluster_security_group && + cluster_status == o.cluster_status && + container_count == o.container_count && + first_seen == o.first_seen && + kubernetes_version == o.kubernetes_version && + labels_list == o.labels_list && + last_seen == o.last_seen && + management_status == o.management_status && + node_count == o.node_count && + pod_count == o.pod_count && + security_group == o.security_group && + tags == o.tags && + virtual_network == o.virtual_network + 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 + [access, agent_status, agents, cid, cloud_account_id, cloud_name, cloud_region, cluster_id, cluster_name, cluster_security_group, cluster_status, container_count, first_seen, kubernetes_version, labels_list, last_seen, management_status, node_count, pod_count, security_group, tags, virtual_network].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_cluster_entity_response.rb b/lib/crimson-falcon/models/models_cluster_entity_response.rb new file mode 100644 index 00000000..719f46a0 --- /dev/null +++ b/lib/crimson-falcon/models/models_cluster_entity_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 ModelsClusterEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::ModelsClusterEntityResponse` 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::ModelsClusterEntityResponse`. 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/models_container.rb b/lib/crimson-falcon/models/models_container.rb new file mode 100644 index 00000000..72532dbd --- /dev/null +++ b/lib/crimson-falcon/models/models_container.rb @@ -0,0 +1,831 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsContainer + attr_accessor :agents + + attr_accessor :allow_privilege_escalation + + attr_accessor :cid + + attr_accessor :cloud + + attr_accessor :cloud_account_id + + attr_accessor :cloud_region + + attr_accessor :cluster_id + + attr_accessor :cluster_name + + attr_accessor :config_labels + + attr_accessor :config_user + + attr_accessor :container_image_id + + attr_accessor :created_at + + attr_accessor :cve_ids + + attr_accessor :first_seen + + attr_accessor :host_config_devices + + attr_accessor :id + + attr_accessor :image_application_package_count + + attr_accessor :image_assessed_at + + attr_accessor :image_detection_count + + attr_accessor :image_detection_id_list + + attr_accessor :image_detection_name_list + + attr_accessor :image_detection_severity_by_type + + attr_accessor :image_digest + + attr_accessor :image_has_been_assessed + + attr_accessor :image_highest_severity_vulnerability + + attr_accessor :image_id + + attr_accessor :image_package_count + + attr_accessor :image_registry + + attr_accessor :image_repo + + attr_accessor :image_tag + + attr_accessor :image_vulnerability_count + + attr_accessor :image_vulnerability_severity_by_type + + attr_accessor :insecure_mount_source + + attr_accessor :insecure_mount_type + + attr_accessor :insecure_propagation_mode + + attr_accessor :interactive_mode + + attr_accessor :ipv4 + + attr_accessor :ipv6 + + attr_accessor :kpa_coverage + + attr_accessor :labels + + attr_accessor :labels_list + + attr_accessor :last_seen + + attr_accessor :linux_sensor_aid + + attr_accessor :linux_sensor_config_build + + attr_accessor :linux_sensor_coverage + + attr_accessor :lumos_sensor_aid + + attr_accessor :lumos_sensor_config_build + + attr_accessor :lumos_sensor_coverage + + attr_accessor :name + + attr_accessor :namespace + + attr_accessor :node_id + + attr_accessor :node_name + + attr_accessor :pod_id + + attr_accessor :pod_name + + attr_accessor :port_list + + attr_accessor :privileged + + attr_accessor :root_write_access + + attr_accessor :rpd + + attr_accessor :run_as_root_group + + attr_accessor :run_as_root_user + + attr_accessor :running_status + + attr_accessor :snapshot_coverage + + attr_accessor :unidentified + + attr_accessor :volume_mounts + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'agents' => :'agents', + :'allow_privilege_escalation' => :'allow_privilege_escalation', + :'cid' => :'cid', + :'cloud' => :'cloud', + :'cloud_account_id' => :'cloud_account_id', + :'cloud_region' => :'cloud_region', + :'cluster_id' => :'cluster_id', + :'cluster_name' => :'cluster_name', + :'config_labels' => :'config_labels', + :'config_user' => :'config_user', + :'container_image_id' => :'container_image_id', + :'created_at' => :'created_at', + :'cve_ids' => :'cve_ids', + :'first_seen' => :'first_seen', + :'host_config_devices' => :'host_config_devices', + :'id' => :'id', + :'image_application_package_count' => :'image_application_package_count', + :'image_assessed_at' => :'image_assessed_at', + :'image_detection_count' => :'image_detection_count', + :'image_detection_id_list' => :'image_detection_id_list', + :'image_detection_name_list' => :'image_detection_name_list', + :'image_detection_severity_by_type' => :'image_detection_severity_by_type', + :'image_digest' => :'image_digest', + :'image_has_been_assessed' => :'image_has_been_assessed', + :'image_highest_severity_vulnerability' => :'image_highest_severity_vulnerability', + :'image_id' => :'image_id', + :'image_package_count' => :'image_package_count', + :'image_registry' => :'image_registry', + :'image_repo' => :'image_repo', + :'image_tag' => :'image_tag', + :'image_vulnerability_count' => :'image_vulnerability_count', + :'image_vulnerability_severity_by_type' => :'image_vulnerability_severity_by_type', + :'insecure_mount_source' => :'insecure_mount_source', + :'insecure_mount_type' => :'insecure_mount_type', + :'insecure_propagation_mode' => :'insecure_propagation_mode', + :'interactive_mode' => :'interactive_mode', + :'ipv4' => :'ipv4', + :'ipv6' => :'ipv6', + :'kpa_coverage' => :'kpa_coverage', + :'labels' => :'labels', + :'labels_list' => :'labels_list', + :'last_seen' => :'last_seen', + :'linux_sensor_aid' => :'linux_sensor_aid', + :'linux_sensor_config_build' => :'linux_sensor_config_build', + :'linux_sensor_coverage' => :'linux_sensor_coverage', + :'lumos_sensor_aid' => :'lumos_sensor_aid', + :'lumos_sensor_config_build' => :'lumos_sensor_config_build', + :'lumos_sensor_coverage' => :'lumos_sensor_coverage', + :'name' => :'name', + :'namespace' => :'namespace', + :'node_id' => :'node_id', + :'node_name' => :'node_name', + :'pod_id' => :'pod_id', + :'pod_name' => :'pod_name', + :'port_list' => :'port_list', + :'privileged' => :'privileged', + :'root_write_access' => :'root_write_access', + :'rpd' => :'rpd', + :'run_as_root_group' => :'run_as_root_group', + :'run_as_root_user' => :'run_as_root_user', + :'running_status' => :'running_status', + :'snapshot_coverage' => :'snapshot_coverage', + :'unidentified' => :'unidentified', + :'volume_mounts' => :'volume_mounts' + } + 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 + { + :'agents' => :'Array', + :'allow_privilege_escalation' => :'Boolean', + :'cid' => :'String', + :'cloud' => :'String', + :'cloud_account_id' => :'String', + :'cloud_region' => :'String', + :'cluster_id' => :'String', + :'cluster_name' => :'String', + :'config_labels' => :'String', + :'config_user' => :'String', + :'container_image_id' => :'String', + :'created_at' => :'Integer', + :'cve_ids' => :'Array', + :'first_seen' => :'Integer', + :'host_config_devices' => :'String', + :'id' => :'String', + :'image_application_package_count' => :'Integer', + :'image_assessed_at' => :'Integer', + :'image_detection_count' => :'Integer', + :'image_detection_id_list' => :'Array', + :'image_detection_name_list' => :'Array', + :'image_detection_severity_by_type' => :'Hash', + :'image_digest' => :'String', + :'image_has_been_assessed' => :'Boolean', + :'image_highest_severity_vulnerability' => :'String', + :'image_id' => :'String', + :'image_package_count' => :'Integer', + :'image_registry' => :'String', + :'image_repo' => :'String', + :'image_tag' => :'String', + :'image_vulnerability_count' => :'Integer', + :'image_vulnerability_severity_by_type' => :'Hash', + :'insecure_mount_source' => :'String', + :'insecure_mount_type' => :'String', + :'insecure_propagation_mode' => :'Boolean', + :'interactive_mode' => :'Boolean', + :'ipv4' => :'String', + :'ipv6' => :'String', + :'kpa_coverage' => :'Boolean', + :'labels' => :'Hash', + :'labels_list' => :'Array', + :'last_seen' => :'Integer', + :'linux_sensor_aid' => :'String', + :'linux_sensor_config_build' => :'String', + :'linux_sensor_coverage' => :'Boolean', + :'lumos_sensor_aid' => :'String', + :'lumos_sensor_config_build' => :'String', + :'lumos_sensor_coverage' => :'Boolean', + :'name' => :'String', + :'namespace' => :'String', + :'node_id' => :'String', + :'node_name' => :'String', + :'pod_id' => :'String', + :'pod_name' => :'String', + :'port_list' => :'Array', + :'privileged' => :'Boolean', + :'root_write_access' => :'Boolean', + :'rpd' => :'Array', + :'run_as_root_group' => :'Boolean', + :'run_as_root_user' => :'Boolean', + :'running_status' => :'Boolean', + :'snapshot_coverage' => :'Boolean', + :'unidentified' => :'Boolean', + :'volume_mounts' => :'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::ModelsContainer` 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::ModelsContainer`. 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?(:'agents') + if (value = attributes[:'agents']).is_a?(Array) + self.agents = value + end + end + + if attributes.key?(:'allow_privilege_escalation') + self.allow_privilege_escalation = attributes[:'allow_privilege_escalation'] + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'cloud') + self.cloud = attributes[:'cloud'] + end + + if attributes.key?(:'cloud_account_id') + self.cloud_account_id = attributes[:'cloud_account_id'] + end + + if attributes.key?(:'cloud_region') + self.cloud_region = attributes[:'cloud_region'] + 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?(:'config_labels') + self.config_labels = attributes[:'config_labels'] + end + + if attributes.key?(:'config_user') + self.config_user = attributes[:'config_user'] + end + + if attributes.key?(:'container_image_id') + self.container_image_id = attributes[:'container_image_id'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'cve_ids') + if (value = attributes[:'cve_ids']).is_a?(Array) + self.cve_ids = value + end + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'host_config_devices') + self.host_config_devices = attributes[:'host_config_devices'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'image_application_package_count') + self.image_application_package_count = attributes[:'image_application_package_count'] + end + + if attributes.key?(:'image_assessed_at') + self.image_assessed_at = attributes[:'image_assessed_at'] + end + + if attributes.key?(:'image_detection_count') + self.image_detection_count = attributes[:'image_detection_count'] + end + + if attributes.key?(:'image_detection_id_list') + if (value = attributes[:'image_detection_id_list']).is_a?(Array) + self.image_detection_id_list = value + end + end + + if attributes.key?(:'image_detection_name_list') + if (value = attributes[:'image_detection_name_list']).is_a?(Array) + self.image_detection_name_list = value + end + end + + if attributes.key?(:'image_detection_severity_by_type') + if (value = attributes[:'image_detection_severity_by_type']).is_a?(Hash) + self.image_detection_severity_by_type = value + end + end + + if attributes.key?(:'image_digest') + self.image_digest = attributes[:'image_digest'] + end + + if attributes.key?(:'image_has_been_assessed') + self.image_has_been_assessed = attributes[:'image_has_been_assessed'] + end + + if attributes.key?(:'image_highest_severity_vulnerability') + self.image_highest_severity_vulnerability = attributes[:'image_highest_severity_vulnerability'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'image_package_count') + self.image_package_count = attributes[:'image_package_count'] + end + + if attributes.key?(:'image_registry') + self.image_registry = attributes[:'image_registry'] + end + + if attributes.key?(:'image_repo') + self.image_repo = attributes[:'image_repo'] + end + + if attributes.key?(:'image_tag') + self.image_tag = attributes[:'image_tag'] + end + + if attributes.key?(:'image_vulnerability_count') + self.image_vulnerability_count = attributes[:'image_vulnerability_count'] + end + + if attributes.key?(:'image_vulnerability_severity_by_type') + if (value = attributes[:'image_vulnerability_severity_by_type']).is_a?(Hash) + self.image_vulnerability_severity_by_type = value + end + end + + if attributes.key?(:'insecure_mount_source') + self.insecure_mount_source = attributes[:'insecure_mount_source'] + end + + if attributes.key?(:'insecure_mount_type') + self.insecure_mount_type = attributes[:'insecure_mount_type'] + end + + if attributes.key?(:'insecure_propagation_mode') + self.insecure_propagation_mode = attributes[:'insecure_propagation_mode'] + end + + if attributes.key?(:'interactive_mode') + self.interactive_mode = attributes[:'interactive_mode'] + end + + if attributes.key?(:'ipv4') + self.ipv4 = attributes[:'ipv4'] + end + + if attributes.key?(:'ipv6') + self.ipv6 = attributes[:'ipv6'] + end + + if attributes.key?(:'kpa_coverage') + self.kpa_coverage = attributes[:'kpa_coverage'] + end + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Hash) + self.labels = value + end + end + + if attributes.key?(:'labels_list') + if (value = attributes[:'labels_list']).is_a?(Array) + self.labels_list = value + end + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'linux_sensor_aid') + self.linux_sensor_aid = attributes[:'linux_sensor_aid'] + end + + if attributes.key?(:'linux_sensor_config_build') + self.linux_sensor_config_build = attributes[:'linux_sensor_config_build'] + end + + if attributes.key?(:'linux_sensor_coverage') + self.linux_sensor_coverage = attributes[:'linux_sensor_coverage'] + end + + if attributes.key?(:'lumos_sensor_aid') + self.lumos_sensor_aid = attributes[:'lumos_sensor_aid'] + end + + if attributes.key?(:'lumos_sensor_config_build') + self.lumos_sensor_config_build = attributes[:'lumos_sensor_config_build'] + end + + if attributes.key?(:'lumos_sensor_coverage') + self.lumos_sensor_coverage = attributes[:'lumos_sensor_coverage'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'node_name') + self.node_name = attributes[:'node_name'] + end + + if attributes.key?(:'pod_id') + self.pod_id = attributes[:'pod_id'] + end + + if attributes.key?(:'pod_name') + self.pod_name = attributes[:'pod_name'] + end + + if attributes.key?(:'port_list') + if (value = attributes[:'port_list']).is_a?(Array) + self.port_list = value + end + end + + if attributes.key?(:'privileged') + self.privileged = attributes[:'privileged'] + end + + if attributes.key?(:'root_write_access') + self.root_write_access = attributes[:'root_write_access'] + end + + if attributes.key?(:'rpd') + if (value = attributes[:'rpd']).is_a?(Array) + self.rpd = value + end + end + + if attributes.key?(:'run_as_root_group') + self.run_as_root_group = attributes[:'run_as_root_group'] + end + + if attributes.key?(:'run_as_root_user') + self.run_as_root_user = attributes[:'run_as_root_user'] + end + + if attributes.key?(:'running_status') + self.running_status = attributes[:'running_status'] + end + + if attributes.key?(:'snapshot_coverage') + self.snapshot_coverage = attributes[:'snapshot_coverage'] + end + + if attributes.key?(:'unidentified') + self.unidentified = attributes[:'unidentified'] + end + + if attributes.key?(:'volume_mounts') + self.volume_mounts = attributes[:'volume_mounts'] + 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 @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 @cid.nil? + 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 && + agents == o.agents && + allow_privilege_escalation == o.allow_privilege_escalation && + cid == o.cid && + cloud == o.cloud && + cloud_account_id == o.cloud_account_id && + cloud_region == o.cloud_region && + cluster_id == o.cluster_id && + cluster_name == o.cluster_name && + config_labels == o.config_labels && + config_user == o.config_user && + container_image_id == o.container_image_id && + created_at == o.created_at && + cve_ids == o.cve_ids && + first_seen == o.first_seen && + host_config_devices == o.host_config_devices && + id == o.id && + image_application_package_count == o.image_application_package_count && + image_assessed_at == o.image_assessed_at && + image_detection_count == o.image_detection_count && + image_detection_id_list == o.image_detection_id_list && + image_detection_name_list == o.image_detection_name_list && + image_detection_severity_by_type == o.image_detection_severity_by_type && + image_digest == o.image_digest && + image_has_been_assessed == o.image_has_been_assessed && + image_highest_severity_vulnerability == o.image_highest_severity_vulnerability && + image_id == o.image_id && + image_package_count == o.image_package_count && + image_registry == o.image_registry && + image_repo == o.image_repo && + image_tag == o.image_tag && + image_vulnerability_count == o.image_vulnerability_count && + image_vulnerability_severity_by_type == o.image_vulnerability_severity_by_type && + insecure_mount_source == o.insecure_mount_source && + insecure_mount_type == o.insecure_mount_type && + insecure_propagation_mode == o.insecure_propagation_mode && + interactive_mode == o.interactive_mode && + ipv4 == o.ipv4 && + ipv6 == o.ipv6 && + kpa_coverage == o.kpa_coverage && + labels == o.labels && + labels_list == o.labels_list && + last_seen == o.last_seen && + linux_sensor_aid == o.linux_sensor_aid && + linux_sensor_config_build == o.linux_sensor_config_build && + linux_sensor_coverage == o.linux_sensor_coverage && + lumos_sensor_aid == o.lumos_sensor_aid && + lumos_sensor_config_build == o.lumos_sensor_config_build && + lumos_sensor_coverage == o.lumos_sensor_coverage && + name == o.name && + namespace == o.namespace && + node_id == o.node_id && + node_name == o.node_name && + pod_id == o.pod_id && + pod_name == o.pod_name && + port_list == o.port_list && + privileged == o.privileged && + root_write_access == o.root_write_access && + rpd == o.rpd && + run_as_root_group == o.run_as_root_group && + run_as_root_user == o.run_as_root_user && + running_status == o.running_status && + snapshot_coverage == o.snapshot_coverage && + unidentified == o.unidentified && + volume_mounts == o.volume_mounts + 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 + [agents, allow_privilege_escalation, cid, cloud, cloud_account_id, cloud_region, cluster_id, cluster_name, config_labels, config_user, container_image_id, created_at, cve_ids, first_seen, host_config_devices, id, image_application_package_count, image_assessed_at, image_detection_count, image_detection_id_list, image_detection_name_list, image_detection_severity_by_type, image_digest, image_has_been_assessed, image_highest_severity_vulnerability, image_id, image_package_count, image_registry, image_repo, image_tag, image_vulnerability_count, image_vulnerability_severity_by_type, insecure_mount_source, insecure_mount_type, insecure_propagation_mode, interactive_mode, ipv4, ipv6, kpa_coverage, labels, labels_list, last_seen, linux_sensor_aid, linux_sensor_config_build, linux_sensor_coverage, lumos_sensor_aid, lumos_sensor_config_build, lumos_sensor_coverage, name, namespace, node_id, node_name, pod_id, pod_name, port_list, privileged, root_write_access, rpd, run_as_root_group, run_as_root_user, running_status, snapshot_coverage, unidentified, volume_mounts].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_container_coverage.rb b/lib/crimson-falcon/models/models_container_coverage.rb new file mode 100644 index 00000000..14de5fc0 --- /dev/null +++ b/lib/crimson-falcon/models/models_container_coverage.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 ModelsContainerCoverage + attr_accessor :managed + + attr_accessor :unmanaged + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'managed' => :'managed', + :'unmanaged' => :'unmanaged' + } + 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 + { + :'managed' => :'Integer', + :'unmanaged' => :'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::ModelsContainerCoverage` 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::ModelsContainerCoverage`. 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?(:'managed') + self.managed = attributes[:'managed'] + end + + if attributes.key?(:'unmanaged') + self.unmanaged = attributes[:'unmanaged'] + 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 @managed.nil? + invalid_properties.push('invalid value for "managed", managed cannot be nil.') + end + + if @unmanaged.nil? + invalid_properties.push('invalid value for "unmanaged", unmanaged 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 @managed.nil? + return false if @unmanaged.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 && + managed == o.managed && + unmanaged == o.unmanaged + 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 + [managed, unmanaged].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_container_coverage_response_entity.rb b/lib/crimson-falcon/models/models_container_coverage_response_entity.rb new file mode 100644 index 00000000..bb8b2040 --- /dev/null +++ b/lib/crimson-falcon/models/models_container_coverage_response_entity.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 ModelsContainerCoverageResponseEntity + 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' => :'MsaspecMetaInfo', + :'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::ModelsContainerCoverageResponseEntity` 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::ModelsContainerCoverageResponseEntity`. 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/models_container_entity_response.rb b/lib/crimson-falcon/models/models_container_entity_response.rb new file mode 100644 index 00000000..3d56721a --- /dev/null +++ b/lib/crimson-falcon/models/models_container_entity_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 ModelsContainerEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::ModelsContainerEntityResponse` 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::ModelsContainerEntityResponse`. 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/models_container_image.rb b/lib/crimson-falcon/models/models_container_image.rb new file mode 100644 index 00000000..c721e093 --- /dev/null +++ b/lib/crimson-falcon/models/models_container_image.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 ModelsContainerImage + attr_accessor :cid + + attr_accessor :container_count + + attr_accessor :containers_running_status + + attr_accessor :hosts + + attr_accessor :id + + attr_accessor :image_detection_count + + attr_accessor :image_digest + + attr_accessor :image_has_been_assessed + + attr_accessor :image_id + + attr_accessor :image_name + + attr_accessor :image_registry + + attr_accessor :image_repository + + attr_accessor :image_tag + + attr_accessor :image_vulnerability_count + + attr_accessor :last_seen + + attr_accessor :running_container_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cid' => :'cid', + :'container_count' => :'container_count', + :'containers_running_status' => :'containers_running_status', + :'hosts' => :'hosts', + :'id' => :'id', + :'image_detection_count' => :'image_detection_count', + :'image_digest' => :'image_digest', + :'image_has_been_assessed' => :'image_has_been_assessed', + :'image_id' => :'image_id', + :'image_name' => :'image_name', + :'image_registry' => :'image_registry', + :'image_repository' => :'image_repository', + :'image_tag' => :'image_tag', + :'image_vulnerability_count' => :'image_vulnerability_count', + :'last_seen' => :'last_seen', + :'running_container_count' => :'running_container_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 + { + :'cid' => :'String', + :'container_count' => :'Integer', + :'containers_running_status' => :'Hash', + :'hosts' => :'Array', + :'id' => :'String', + :'image_detection_count' => :'Integer', + :'image_digest' => :'String', + :'image_has_been_assessed' => :'Boolean', + :'image_id' => :'String', + :'image_name' => :'String', + :'image_registry' => :'String', + :'image_repository' => :'String', + :'image_tag' => :'String', + :'image_vulnerability_count' => :'Integer', + :'last_seen' => :'String', + :'running_container_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::ModelsContainerImage` 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::ModelsContainerImage`. 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?(:'container_count') + self.container_count = attributes[:'container_count'] + end + + if attributes.key?(:'containers_running_status') + if (value = attributes[:'containers_running_status']).is_a?(Hash) + self.containers_running_status = value + end + end + + if attributes.key?(:'hosts') + if (value = attributes[:'hosts']).is_a?(Array) + self.hosts = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'image_detection_count') + self.image_detection_count = attributes[:'image_detection_count'] + end + + if attributes.key?(:'image_digest') + self.image_digest = attributes[:'image_digest'] + end + + if attributes.key?(:'image_has_been_assessed') + self.image_has_been_assessed = attributes[:'image_has_been_assessed'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'image_name') + self.image_name = attributes[:'image_name'] + end + + if attributes.key?(:'image_registry') + self.image_registry = attributes[:'image_registry'] + end + + if attributes.key?(:'image_repository') + self.image_repository = attributes[:'image_repository'] + end + + if attributes.key?(:'image_tag') + self.image_tag = attributes[:'image_tag'] + end + + if attributes.key?(:'image_vulnerability_count') + self.image_vulnerability_count = attributes[:'image_vulnerability_count'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'running_container_count') + self.running_container_count = attributes[:'running_container_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 + if @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @container_count.nil? + invalid_properties.push('invalid value for "container_count", container_count cannot be nil.') + end + + if @containers_running_status.nil? + invalid_properties.push('invalid value for "containers_running_status", containers_running_status cannot be nil.') + end + + if @hosts.nil? + invalid_properties.push('invalid value for "hosts", hosts cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @image_detection_count.nil? + invalid_properties.push('invalid value for "image_detection_count", image_detection_count cannot be nil.') + end + + if @image_digest.nil? + invalid_properties.push('invalid value for "image_digest", image_digest cannot be nil.') + end + + if @image_has_been_assessed.nil? + invalid_properties.push('invalid value for "image_has_been_assessed", image_has_been_assessed cannot be nil.') + end + + if @image_id.nil? + invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') + end + + if @image_name.nil? + invalid_properties.push('invalid value for "image_name", image_name cannot be nil.') + end + + if @image_registry.nil? + invalid_properties.push('invalid value for "image_registry", image_registry cannot be nil.') + end + + if @image_repository.nil? + invalid_properties.push('invalid value for "image_repository", image_repository cannot be nil.') + end + + if @image_tag.nil? + invalid_properties.push('invalid value for "image_tag", image_tag cannot be nil.') + end + + if @image_vulnerability_count.nil? + invalid_properties.push('invalid value for "image_vulnerability_count", image_vulnerability_count cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @running_container_count.nil? + invalid_properties.push('invalid value for "running_container_count", running_container_count 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 @container_count.nil? + return false if @containers_running_status.nil? + return false if @hosts.nil? + return false if @id.nil? + return false if @image_detection_count.nil? + return false if @image_digest.nil? + return false if @image_has_been_assessed.nil? + return false if @image_id.nil? + return false if @image_name.nil? + return false if @image_registry.nil? + return false if @image_repository.nil? + return false if @image_tag.nil? + return false if @image_vulnerability_count.nil? + return false if @last_seen.nil? + return false if @running_container_count.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 && + container_count == o.container_count && + containers_running_status == o.containers_running_status && + hosts == o.hosts && + id == o.id && + image_detection_count == o.image_detection_count && + image_digest == o.image_digest && + image_has_been_assessed == o.image_has_been_assessed && + image_id == o.image_id && + image_name == o.image_name && + image_registry == o.image_registry && + image_repository == o.image_repository && + image_tag == o.image_tag && + image_vulnerability_count == o.image_vulnerability_count && + last_seen == o.last_seen && + running_container_count == o.running_container_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 + [cid, container_count, containers_running_status, hosts, id, image_detection_count, image_digest, image_has_been_assessed, image_id, image_name, image_registry, image_repository, image_tag, image_vulnerability_count, last_seen, running_container_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/models_container_information.rb b/lib/crimson-falcon/models/models_container_information.rb new file mode 100644 index 00000000..899966ec --- /dev/null +++ b/lib/crimson-falcon/models/models_container_information.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 ModelsContainerInformation + attr_accessor :container_detection_count + + attr_accessor :container_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'container_detection_count' => :'container_detection_count', + :'container_id' => :'container_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 + { + :'container_detection_count' => :'String', + :'container_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::ModelsContainerInformation` 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::ModelsContainerInformation`. 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?(:'container_detection_count') + self.container_detection_count = attributes[:'container_detection_count'] + end + + if attributes.key?(:'container_id') + self.container_id = attributes[:'container_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 @container_detection_count.nil? + invalid_properties.push('invalid value for "container_detection_count", container_detection_count cannot be nil.') + end + + if @container_id.nil? + invalid_properties.push('invalid value for "container_id", container_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 @container_detection_count.nil? + return false if @container_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 && + container_detection_count == o.container_detection_count && + container_id == o.container_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 + [container_detection_count, container_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/models_container_runtime_pivot.rb b/lib/crimson-falcon/models/models_container_runtime_pivot.rb new file mode 100644 index 00000000..5a53d641 --- /dev/null +++ b/lib/crimson-falcon/models/models_container_runtime_pivot.rb @@ -0,0 +1,353 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsContainerRuntimePivot + attr_accessor :cid + + attr_accessor :cloud_name + + attr_accessor :cluster_name + + attr_accessor :container_runtime_version + + attr_accessor :created_at + + attr_accessor :first_seen + + attr_accessor :last_seen + + attr_accessor :node_name + + attr_accessor :pod_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cid' => :'cid', + :'cloud_name' => :'cloud_name', + :'cluster_name' => :'cluster_name', + :'container_runtime_version' => :'container_runtime_version', + :'created_at' => :'created_at', + :'first_seen' => :'first_seen', + :'last_seen' => :'last_seen', + :'node_name' => :'node_name', + :'pod_name' => :'pod_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 + { + :'cid' => :'String', + :'cloud_name' => :'String', + :'cluster_name' => :'String', + :'container_runtime_version' => :'String', + :'created_at' => :'String', + :'first_seen' => :'String', + :'last_seen' => :'String', + :'node_name' => :'String', + :'pod_name' => :'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::ModelsContainerRuntimePivot` 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::ModelsContainerRuntimePivot`. 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?(:'cloud_name') + self.cloud_name = attributes[:'cloud_name'] + end + + if attributes.key?(:'cluster_name') + self.cluster_name = attributes[:'cluster_name'] + end + + if attributes.key?(:'container_runtime_version') + self.container_runtime_version = attributes[:'container_runtime_version'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'node_name') + self.node_name = attributes[:'node_name'] + end + + if attributes.key?(:'pod_name') + if (value = attributes[:'pod_name']).is_a?(Array) + self.pod_name = 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 @cid.nil? + invalid_properties.push('invalid value for "cid", cid cannot be nil.') + end + + if @cloud_name.nil? + invalid_properties.push('invalid value for "cloud_name", cloud_name cannot be nil.') + end + + if @cluster_name.nil? + invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') + end + + if @container_runtime_version.nil? + invalid_properties.push('invalid value for "container_runtime_version", container_runtime_version cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @first_seen.nil? + invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @node_name.nil? + invalid_properties.push('invalid value for "node_name", node_name cannot be nil.') + end + + if @pod_name.nil? + invalid_properties.push('invalid value for "pod_name", pod_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 @cid.nil? + return false if @cloud_name.nil? + return false if @cluster_name.nil? + return false if @container_runtime_version.nil? + return false if @created_at.nil? + return false if @first_seen.nil? + return false if @last_seen.nil? + return false if @node_name.nil? + return false if @pod_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 && + cid == o.cid && + cloud_name == o.cloud_name && + cluster_name == o.cluster_name && + container_runtime_version == o.container_runtime_version && + created_at == o.created_at && + first_seen == o.first_seen && + last_seen == o.last_seen && + node_name == o.node_name && + pod_name == o.pod_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 + [cid, cloud_name, cluster_name, container_runtime_version, created_at, first_seen, last_seen, node_name, pod_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/models_container_runtime_pivot_response.rb b/lib/crimson-falcon/models/models_container_runtime_pivot_response.rb new file mode 100644 index 00000000..dfc7adc1 --- /dev/null +++ b/lib/crimson-falcon/models/models_container_runtime_pivot_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 ModelsContainerRuntimePivotResponse + 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' => :'MsaspecMetaInfo', + :'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::ModelsContainerRuntimePivotResponse` 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::ModelsContainerRuntimePivotResponse`. 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/models_create_image_group_request.rb b/lib/crimson-falcon/models/models_create_image_group_request.rb new file mode 100644 index 00000000..8962b0f5 --- /dev/null +++ b/lib/crimson-falcon/models/models_create_image_group_request.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 ModelsCreateImageGroupRequest + attr_accessor :description + + attr_accessor :name + + attr_accessor :policy_group_data + + attr_accessor :policy_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'policy_group_data' => :'policy_group_data', + :'policy_id' => :'policy_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 + { + :'description' => :'String', + :'name' => :'String', + :'policy_group_data' => :'ModelsAPIPolicyGroupData', + :'policy_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::ModelsCreateImageGroupRequest` 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::ModelsCreateImageGroupRequest`. 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?(:'policy_group_data') + self.policy_group_data = attributes[:'policy_group_data'] + end + + if attributes.key?(:'policy_id') + self.policy_id = attributes[:'policy_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 @description.nil? + invalid_properties.push('invalid value for "description", description 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 @description.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 && + description == o.description && + name == o.name && + policy_group_data == o.policy_group_data && + policy_id == o.policy_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 + [description, name, policy_group_data, policy_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/models_create_policy_request.rb b/lib/crimson-falcon/models/models_create_policy_request.rb new file mode 100644 index 00000000..3259ed38 --- /dev/null +++ b/lib/crimson-falcon/models/models_create_policy_request.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 ModelsCreatePolicyRequest + attr_accessor :description + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'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 + { + :'description' => :'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::ModelsCreatePolicyRequest` 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::ModelsCreatePolicyRequest`. 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 + 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 @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 @description.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 && + description == o.description && + 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 + [description, 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/models_definition_create_request_v2.rb b/lib/crimson-falcon/models/models_definition_create_request_v2.rb new file mode 100644 index 00000000..b04928f2 --- /dev/null +++ b/lib/crimson-falcon/models/models_definition_create_request_v2.rb @@ -0,0 +1,263 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsDefinitionCreateRequestV2 + attr_accessor :definition + + # Specifies whether a new definition should be enabled when created, always set to false if it's imported' + attr_accessor :enabled + + attr_accessor :flight_control + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'definition' => :'Definition', + :'enabled' => :'enabled', + :'flight_control' => :'flight_control' + } + 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' => :'V2Definition', + :'enabled' => :'Boolean', + :'flight_control' => :'DefinitionsFlightControlRequest' + } + 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::ModelsDefinitionCreateRequestV2` 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::ModelsDefinitionCreateRequestV2`. 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'flight_control') + self.flight_control = attributes[:'flight_control'] + 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 + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled 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? + return false if @enabled.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 && + enabled == o.enabled && + flight_control == o.flight_control + 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, enabled, flight_control].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_definition_update_request_v2.rb b/lib/crimson-falcon/models/models_definition_update_request_v2.rb new file mode 100644 index 00000000..2d74a049 --- /dev/null +++ b/lib/crimson-falcon/models/models_definition_update_request_v2.rb @@ -0,0 +1,288 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsDefinitionUpdateRequestV2 + attr_accessor :definition + + # Optional user provided description to outline the changes made as part of the update. Maximum of 500 characters. + attr_accessor :change_log + + # Specifies whether a new definition should be enabled when created, always set to false if it's imported' + attr_accessor :enabled + + attr_accessor :flight_control + + # Used to identify documents across versions + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'definition' => :'Definition', + :'change_log' => :'change_log', + :'enabled' => :'enabled', + :'flight_control' => :'flight_control', + :'id' => :'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 + { + :'definition' => :'V2Definition', + :'change_log' => :'String', + :'enabled' => :'Boolean', + :'flight_control' => :'DefinitionsFlightControlRequest', + :'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::ModelsDefinitionUpdateRequestV2` 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::ModelsDefinitionUpdateRequestV2`. 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?(:'change_log') + self.change_log = attributes[:'change_log'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'flight_control') + self.flight_control = attributes[:'flight_control'] + end + + if attributes.key?(:'id') + self.id = attributes[:'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 @definition.nil? + invalid_properties.push('invalid value for "definition", definition cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled cannot be nil.') + end + + 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 @definition.nil? + return false if @enabled.nil? + 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 && + definition == o.definition && + change_log == o.change_log && + enabled == o.enabled && + flight_control == o.flight_control && + id == o.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 + [definition, change_log, enabled, flight_control, 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/models_snapshot_inventory_application.rb b/lib/crimson-falcon/models/models_deployment.rb similarity index 64% rename from lib/crimson-falcon/models/models_snapshot_inventory_application.rb rename to lib/crimson-falcon/models/models_deployment.rb index e4c2a5c2..70807c6d 100644 --- a/lib/crimson-falcon/models/models_snapshot_inventory_application.rb +++ b/lib/crimson-falcon/models/models_deployment.rb @@ -31,37 +31,37 @@ require 'time' module Falcon - class ModelsSnapshotInventoryApplication - attr_accessor :major_version + class ModelsDeployment + attr_accessor :account_id - attr_accessor :package_hash + attr_accessor :asset_identifier - attr_accessor :package_provider + attr_accessor :cloud_provider - attr_accessor :package_source + attr_accessor :id - attr_accessor :path + attr_accessor :instance_type - attr_accessor :product + attr_accessor :last_updated_timestamp - attr_accessor :software_architecture + attr_accessor :region - attr_accessor :type + attr_accessor :status - attr_accessor :vendor + attr_accessor :status_detail # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'major_version' => :'major_version', - :'package_hash' => :'package_hash', - :'package_provider' => :'package_provider', - :'package_source' => :'package_source', - :'path' => :'path', - :'product' => :'product', - :'software_architecture' => :'software_architecture', - :'type' => :'type', - :'vendor' => :'vendor' + :'account_id' => :'account_id', + :'asset_identifier' => :'asset_identifier', + :'cloud_provider' => :'cloud_provider', + :'id' => :'id', + :'instance_type' => :'instance_type', + :'last_updated_timestamp' => :'last_updated_timestamp', + :'region' => :'region', + :'status' => :'status', + :'status_detail' => :'status_detail' } end @@ -73,15 +73,15 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'major_version' => :'String', - :'package_hash' => :'String', - :'package_provider' => :'String', - :'package_source' => :'String', - :'path' => :'String', - :'product' => :'String', - :'software_architecture' => :'String', - :'type' => :'String', - :'vendor' => :'String' + :'account_id' => :'String', + :'asset_identifier' => :'String', + :'cloud_provider' => :'String', + :'id' => :'String', + :'instance_type' => :'String', + :'last_updated_timestamp' => :'String', + :'region' => :'String', + :'status' => :'String', + :'status_detail' => :'String' } end @@ -95,51 +95,51 @@ 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::ModelsSnapshotInventoryApplication` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsDeployment` 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::ModelsSnapshotInventoryApplication`. 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::ModelsDeployment`. 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?(:'major_version') - self.major_version = attributes[:'major_version'] + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] end - if attributes.key?(:'package_hash') - self.package_hash = attributes[:'package_hash'] + if attributes.key?(:'asset_identifier') + self.asset_identifier = attributes[:'asset_identifier'] end - if attributes.key?(:'package_provider') - self.package_provider = attributes[:'package_provider'] + if attributes.key?(:'cloud_provider') + self.cloud_provider = attributes[:'cloud_provider'] end - if attributes.key?(:'package_source') - self.package_source = attributes[:'package_source'] + if attributes.key?(:'id') + self.id = attributes[:'id'] end - if attributes.key?(:'path') - self.path = attributes[:'path'] + if attributes.key?(:'instance_type') + self.instance_type = attributes[:'instance_type'] end - if attributes.key?(:'product') - self.product = attributes[:'product'] + if attributes.key?(:'last_updated_timestamp') + self.last_updated_timestamp = attributes[:'last_updated_timestamp'] end - if attributes.key?(:'software_architecture') - self.software_architecture = attributes[:'software_architecture'] + if attributes.key?(:'region') + self.region = attributes[:'region'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'status') + self.status = attributes[:'status'] end - if attributes.key?(:'vendor') - self.vendor = attributes[:'vendor'] + if attributes.key?(:'status_detail') + self.status_detail = attributes[:'status_detail'] end end @@ -147,40 +147,40 @@ def initialize(attributes = {}) # @return Array for valid properties with the reasons def list_invalid_properties invalid_properties = Array.new - if @major_version.nil? - invalid_properties.push('invalid value for "major_version", major_version cannot be nil.') + if @account_id.nil? + invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') end - if @package_hash.nil? - invalid_properties.push('invalid value for "package_hash", package_hash cannot be nil.') + if @asset_identifier.nil? + invalid_properties.push('invalid value for "asset_identifier", asset_identifier cannot be nil.') end - if @package_provider.nil? - invalid_properties.push('invalid value for "package_provider", package_provider cannot be nil.') + if @cloud_provider.nil? + invalid_properties.push('invalid value for "cloud_provider", cloud_provider cannot be nil.') end - if @package_source.nil? - invalid_properties.push('invalid value for "package_source", package_source cannot be nil.') + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') end - if @path.nil? - invalid_properties.push('invalid value for "path", path cannot be nil.') + if @instance_type.nil? + invalid_properties.push('invalid value for "instance_type", instance_type cannot be nil.') end - if @product.nil? - invalid_properties.push('invalid value for "product", product cannot be nil.') + if @last_updated_timestamp.nil? + invalid_properties.push('invalid value for "last_updated_timestamp", last_updated_timestamp cannot be nil.') end - if @software_architecture.nil? - invalid_properties.push('invalid value for "software_architecture", software_architecture cannot be nil.') + if @region.nil? + invalid_properties.push('invalid value for "region", region cannot be nil.') end - if @type.nil? - invalid_properties.push('invalid value for "type", type cannot be nil.') + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') end - if @vendor.nil? - invalid_properties.push('invalid value for "vendor", vendor cannot be nil.') + if @status_detail.nil? + invalid_properties.push('invalid value for "status_detail", status_detail cannot be nil.') end invalid_properties @@ -189,15 +189,15 @@ 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 @major_version.nil? - return false if @package_hash.nil? - return false if @package_provider.nil? - return false if @package_source.nil? - return false if @path.nil? - return false if @product.nil? - return false if @software_architecture.nil? - return false if @type.nil? - return false if @vendor.nil? + return false if @account_id.nil? + return false if @asset_identifier.nil? + return false if @cloud_provider.nil? + return false if @id.nil? + return false if @instance_type.nil? + return false if @last_updated_timestamp.nil? + return false if @region.nil? + return false if @status.nil? + return false if @status_detail.nil? true end @@ -206,15 +206,15 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - major_version == o.major_version && - package_hash == o.package_hash && - package_provider == o.package_provider && - package_source == o.package_source && - path == o.path && - product == o.product && - software_architecture == o.software_architecture && - type == o.type && - vendor == o.vendor + account_id == o.account_id && + asset_identifier == o.asset_identifier && + cloud_provider == o.cloud_provider && + id == o.id && + instance_type == o.instance_type && + last_updated_timestamp == o.last_updated_timestamp && + region == o.region && + status == o.status && + status_detail == o.status_detail end # @see the `==` method @@ -226,7 +226,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [major_version, package_hash, package_provider, package_source, path, product, software_architecture, type, vendor].hash + [account_id, asset_identifier, cloud_provider, id, instance_type, last_updated_timestamp, region, status, status_detail].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/models_deployment_entity_response.rb b/lib/crimson-falcon/models/models_deployment_entity_response.rb new file mode 100644 index 00000000..7daf115a --- /dev/null +++ b/lib/crimson-falcon/models/models_deployment_entity_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 ModelsDeploymentEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::ModelsDeploymentEntityResponse` 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::ModelsDeploymentEntityResponse`. 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/models_exclusion_condition.rb b/lib/crimson-falcon/models/models_exclusion_condition.rb new file mode 100644 index 00000000..be0461c0 --- /dev/null +++ b/lib/crimson-falcon/models/models_exclusion_condition.rb @@ -0,0 +1,310 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsExclusionCondition + attr_accessor :created_at + + attr_accessor :description + + attr_accessor :op + + attr_accessor :prop + + attr_accessor :ttl + + attr_accessor :updated_at + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_at' => :'created_at', + :'description' => :'description', + :'op' => :'op', + :'prop' => :'prop', + :'ttl' => :'ttl', + :'updated_at' => :'updated_at', + :'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 + { + :'created_at' => :'String', + :'description' => :'String', + :'op' => :'String', + :'prop' => :'String', + :'ttl' => :'Float', + :'updated_at' => :'String', + :'value' => :'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::ModelsExclusionCondition` 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::ModelsExclusionCondition`. 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_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'op') + self.op = attributes[:'op'] + end + + if attributes.key?(:'prop') + self.prop = attributes[:'prop'] + end + + if attributes.key?(:'ttl') + self.ttl = attributes[:'ttl'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'value') + if (value = attributes[:'value']).is_a?(Array) + self.value = 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 @description.nil? + invalid_properties.push('invalid value for "description", description cannot be nil.') + end + + 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.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value 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 @op.nil? + return false if @prop.nil? + return false if @value.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_at == o.created_at && + description == o.description && + op == o.op && + prop == o.prop && + ttl == o.ttl && + updated_at == o.updated_at && + 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 + [created_at, description, op, prop, ttl, updated_at, 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/models_exclusion_condition_request.rb b/lib/crimson-falcon/models/models_exclusion_condition_request.rb new file mode 100644 index 00000000..fe0d56e7 --- /dev/null +++ b/lib/crimson-falcon/models/models_exclusion_condition_request.rb @@ -0,0 +1,273 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsExclusionConditionRequest + attr_accessor :description + + attr_accessor :prop + + attr_accessor :ttl + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'prop' => :'prop', + :'ttl' => :'ttl', + :'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 + { + :'description' => :'String', + :'prop' => :'String', + :'ttl' => :'Float', + :'value' => :'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::ModelsExclusionConditionRequest` 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::ModelsExclusionConditionRequest`. 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?(:'prop') + self.prop = attributes[:'prop'] + end + + if attributes.key?(:'ttl') + self.ttl = attributes[:'ttl'] + end + + if attributes.key?(:'value') + if (value = attributes[:'value']).is_a?(Array) + self.value = 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 @prop.nil? + invalid_properties.push('invalid value for "prop", prop cannot be nil.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value 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 @prop.nil? + return false if @value.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 && + prop == o.prop && + ttl == o.ttl && + 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 + [description, prop, ttl, 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/models_image_information.rb b/lib/crimson-falcon/models/models_image_information.rb new file mode 100644 index 00000000..014aacba --- /dev/null +++ b/lib/crimson-falcon/models/models_image_information.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 ModelsImageInformation + attr_accessor :image_digest + + attr_accessor :image_id + + attr_accessor :image_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'image_digest' => :'image_digest', + :'image_id' => :'image_id', + :'image_name' => :'image_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 + { + :'image_digest' => :'String', + :'image_id' => :'String', + :'image_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::ModelsImageInformation` 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::ModelsImageInformation`. 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?(:'image_digest') + self.image_digest = attributes[:'image_digest'] + end + + if attributes.key?(:'image_id') + self.image_id = attributes[:'image_id'] + end + + if attributes.key?(:'image_name') + self.image_name = attributes[:'image_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 @image_digest.nil? + invalid_properties.push('invalid value for "image_digest", image_digest cannot be nil.') + end + + if @image_id.nil? + invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') + end + + if @image_name.nil? + invalid_properties.push('invalid value for "image_name", image_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 @image_digest.nil? + return false if @image_id.nil? + return false if @image_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 && + image_digest == o.image_digest && + image_id == o.image_id && + image_name == o.image_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 + [image_digest, image_id, image_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/models_image_summary_packages_info.rb b/lib/crimson-falcon/models/models_image_summary_packages_info.rb new file mode 100644 index 00000000..d8f2902b --- /dev/null +++ b/lib/crimson-falcon/models/models_image_summary_packages_info.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 ModelsImageSummaryPackagesInfo + attr_accessor :count_with_vulnerabilities + + attr_accessor :total_count + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'count_with_vulnerabilities' => :'count_with_vulnerabilities', + :'total_count' => :'total_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 + { + :'count_with_vulnerabilities' => :'Integer', + :'total_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::ModelsImageSummaryPackagesInfo` 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::ModelsImageSummaryPackagesInfo`. 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_with_vulnerabilities') + self.count_with_vulnerabilities = attributes[:'count_with_vulnerabilities'] + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_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 + if @count_with_vulnerabilities.nil? + invalid_properties.push('invalid value for "count_with_vulnerabilities", count_with_vulnerabilities cannot be nil.') + end + + if @total_count.nil? + invalid_properties.push('invalid value for "total_count", total_count 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 @count_with_vulnerabilities.nil? + return false if @total_count.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 && + count_with_vulnerabilities == o.count_with_vulnerabilities && + total_count == o.total_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 + [count_with_vulnerabilities, total_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/models_issues_summary_container_info.rb b/lib/crimson-falcon/models/models_issues_summary_container_info.rb new file mode 100644 index 00000000..c77335e3 --- /dev/null +++ b/lib/crimson-falcon/models/models_issues_summary_container_info.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 ModelsIssuesSummaryContainerInfo + attr_accessor :first_seen + + attr_accessor :last_seen + + attr_accessor :running_containers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_seen' => :'first_seen', + :'last_seen' => :'last_seen', + :'running_containers' => :'running_containers' + } + 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 + { + :'first_seen' => :'Integer', + :'last_seen' => :'Integer', + :'running_containers' => :'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::ModelsIssuesSummaryContainerInfo` 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::ModelsIssuesSummaryContainerInfo`. 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?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'running_containers') + self.running_containers = attributes[:'running_containers'] + 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 @first_seen.nil? + invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @running_containers.nil? + invalid_properties.push('invalid value for "running_containers", running_containers 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 @first_seen.nil? + return false if @last_seen.nil? + return false if @running_containers.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 && + first_seen == o.first_seen && + last_seen == o.last_seen && + running_containers == o.running_containers + 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 + [first_seen, last_seen, running_containers].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_light_weight_config.rb b/lib/crimson-falcon/models/models_light_weight_config.rb new file mode 100644 index 00000000..3dd41b0f --- /dev/null +++ b/lib/crimson-falcon/models/models_light_weight_config.rb @@ -0,0 +1,347 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsLightWeightConfig + attr_accessor :architecture + + attr_accessor :cmd + + attr_accessor :entry_point + + attr_accessor :env + + attr_accessor :exposed_ports + + attr_accessor :labels + + attr_accessor :user + + attr_accessor :working_dir + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'architecture' => :'architecture', + :'cmd' => :'cmd', + :'entry_point' => :'entry_point', + :'env' => :'env', + :'exposed_ports' => :'exposed_ports', + :'labels' => :'labels', + :'user' => :'user', + :'working_dir' => :'working_dir' + } + 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 + { + :'architecture' => :'String', + :'cmd' => :'Array', + :'entry_point' => :'Array', + :'env' => :'Array', + :'exposed_ports' => :'Hash', + :'labels' => :'Hash', + :'user' => :'String', + :'working_dir' => :'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::ModelsLightWeightConfig` 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::ModelsLightWeightConfig`. 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?(:'architecture') + self.architecture = attributes[:'architecture'] + end + + if attributes.key?(:'cmd') + if (value = attributes[:'cmd']).is_a?(Array) + self.cmd = value + end + end + + if attributes.key?(:'entry_point') + if (value = attributes[:'entry_point']).is_a?(Array) + self.entry_point = value + end + end + + if attributes.key?(:'env') + if (value = attributes[:'env']).is_a?(Array) + self.env = value + end + end + + if attributes.key?(:'exposed_ports') + if (value = attributes[:'exposed_ports']).is_a?(Hash) + self.exposed_ports = value + end + end + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Hash) + self.labels = value + end + end + + if attributes.key?(:'user') + self.user = attributes[:'user'] + end + + if attributes.key?(:'working_dir') + self.working_dir = attributes[:'working_dir'] + 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 @architecture.nil? + invalid_properties.push('invalid value for "architecture", architecture cannot be nil.') + end + + if @cmd.nil? + invalid_properties.push('invalid value for "cmd", cmd cannot be nil.') + end + + if @entry_point.nil? + invalid_properties.push('invalid value for "entry_point", entry_point cannot be nil.') + end + + if @env.nil? + invalid_properties.push('invalid value for "env", env cannot be nil.') + end + + if @exposed_ports.nil? + invalid_properties.push('invalid value for "exposed_ports", exposed_ports cannot be nil.') + end + + if @labels.nil? + invalid_properties.push('invalid value for "labels", labels cannot be nil.') + end + + if @user.nil? + invalid_properties.push('invalid value for "user", user cannot be nil.') + end + + if @working_dir.nil? + invalid_properties.push('invalid value for "working_dir", working_dir 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 @architecture.nil? + return false if @cmd.nil? + return false if @entry_point.nil? + return false if @env.nil? + return false if @exposed_ports.nil? + return false if @labels.nil? + return false if @user.nil? + return false if @working_dir.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 && + architecture == o.architecture && + cmd == o.cmd && + entry_point == o.entry_point && + env == o.env && + exposed_ports == o.exposed_ports && + labels == o.labels && + user == o.user && + working_dir == o.working_dir + 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 + [architecture, cmd, entry_point, env, exposed_ports, labels, user, working_dir].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_node.rb b/lib/crimson-falcon/models/models_node.rb new file mode 100644 index 00000000..a2305878 --- /dev/null +++ b/lib/crimson-falcon/models/models_node.rb @@ -0,0 +1,723 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsNode + attr_accessor :agents + + attr_accessor :annotations_list + + attr_accessor :architecture + + attr_accessor :base_image + + attr_accessor :cid + + attr_accessor :cloud_account_id + + attr_accessor :cloud_instance_id + + attr_accessor :cloud_instance_type + + attr_accessor :cloud_name + + attr_accessor :cloud_region + + attr_accessor :cluster_id + + attr_accessor :cluster_name + + attr_accessor :container_count + + attr_accessor :container_runtime_version + + attr_accessor :cpu + + attr_accessor :created_at + + attr_accessor :external_ip + + attr_accessor :first_seen + + attr_accessor :ipv4 + + attr_accessor :ipv6 + + attr_accessor :kernel_version + + attr_accessor :kubernetes_version + + attr_accessor :labels + + attr_accessor :labels_list + + attr_accessor :last_seen + + attr_accessor :linux_sensor_coverage + + attr_accessor :memory + + attr_accessor :node_id + + attr_accessor :node_name + + attr_accessor :os + + attr_accessor :pod_cidr + + attr_accessor :pod_count + + attr_accessor :provider_id + + attr_accessor :storage + + attr_accessor :uid + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'agents' => :'agents', + :'annotations_list' => :'annotations_list', + :'architecture' => :'architecture', + :'base_image' => :'base_image', + :'cid' => :'cid', + :'cloud_account_id' => :'cloud_account_id', + :'cloud_instance_id' => :'cloud_instance_id', + :'cloud_instance_type' => :'cloud_instance_type', + :'cloud_name' => :'cloud_name', + :'cloud_region' => :'cloud_region', + :'cluster_id' => :'cluster_id', + :'cluster_name' => :'cluster_name', + :'container_count' => :'container_count', + :'container_runtime_version' => :'container_runtime_version', + :'cpu' => :'cpu', + :'created_at' => :'created_at', + :'external_ip' => :'external_ip', + :'first_seen' => :'first_seen', + :'ipv4' => :'ipv4', + :'ipv6' => :'ipv6', + :'kernel_version' => :'kernel_version', + :'kubernetes_version' => :'kubernetes_version', + :'labels' => :'labels', + :'labels_list' => :'labels_list', + :'last_seen' => :'last_seen', + :'linux_sensor_coverage' => :'linux_sensor_coverage', + :'memory' => :'memory', + :'node_id' => :'node_id', + :'node_name' => :'node_name', + :'os' => :'os', + :'pod_cidr' => :'pod_cidr', + :'pod_count' => :'pod_count', + :'provider_id' => :'provider_id', + :'storage' => :'storage', + :'uid' => :'uid' + } + 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 + { + :'agents' => :'Array', + :'annotations_list' => :'Array', + :'architecture' => :'String', + :'base_image' => :'String', + :'cid' => :'String', + :'cloud_account_id' => :'String', + :'cloud_instance_id' => :'String', + :'cloud_instance_type' => :'String', + :'cloud_name' => :'String', + :'cloud_region' => :'String', + :'cluster_id' => :'String', + :'cluster_name' => :'String', + :'container_count' => :'Integer', + :'container_runtime_version' => :'String', + :'cpu' => :'String', + :'created_at' => :'String', + :'external_ip' => :'String', + :'first_seen' => :'String', + :'ipv4' => :'String', + :'ipv6' => :'String', + :'kernel_version' => :'String', + :'kubernetes_version' => :'String', + :'labels' => :'Hash', + :'labels_list' => :'Array', + :'last_seen' => :'String', + :'linux_sensor_coverage' => :'Boolean', + :'memory' => :'String', + :'node_id' => :'String', + :'node_name' => :'String', + :'os' => :'String', + :'pod_cidr' => :'String', + :'pod_count' => :'Integer', + :'provider_id' => :'String', + :'storage' => :'String', + :'uid' => :'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::ModelsNode` 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::ModelsNode`. 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?(:'agents') + if (value = attributes[:'agents']).is_a?(Array) + self.agents = value + end + end + + if attributes.key?(:'annotations_list') + if (value = attributes[:'annotations_list']).is_a?(Array) + self.annotations_list = value + end + end + + if attributes.key?(:'architecture') + self.architecture = attributes[:'architecture'] + end + + if attributes.key?(:'base_image') + self.base_image = attributes[:'base_image'] + 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_instance_id') + self.cloud_instance_id = attributes[:'cloud_instance_id'] + end + + if attributes.key?(:'cloud_instance_type') + self.cloud_instance_type = attributes[:'cloud_instance_type'] + end + + if attributes.key?(:'cloud_name') + self.cloud_name = attributes[:'cloud_name'] + end + + if attributes.key?(:'cloud_region') + self.cloud_region = attributes[:'cloud_region'] + 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?(:'container_count') + self.container_count = attributes[:'container_count'] + end + + if attributes.key?(:'container_runtime_version') + self.container_runtime_version = attributes[:'container_runtime_version'] + end + + if attributes.key?(:'cpu') + self.cpu = attributes[:'cpu'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'external_ip') + self.external_ip = attributes[:'external_ip'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'ipv4') + self.ipv4 = attributes[:'ipv4'] + end + + if attributes.key?(:'ipv6') + self.ipv6 = attributes[:'ipv6'] + end + + if attributes.key?(:'kernel_version') + self.kernel_version = attributes[:'kernel_version'] + end + + if attributes.key?(:'kubernetes_version') + self.kubernetes_version = attributes[:'kubernetes_version'] + end + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Hash) + self.labels = value + end + end + + if attributes.key?(:'labels_list') + if (value = attributes[:'labels_list']).is_a?(Array) + self.labels_list = value + end + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'linux_sensor_coverage') + self.linux_sensor_coverage = attributes[:'linux_sensor_coverage'] + end + + if attributes.key?(:'memory') + self.memory = attributes[:'memory'] + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_id'] + end + + if attributes.key?(:'node_name') + self.node_name = attributes[:'node_name'] + end + + if attributes.key?(:'os') + self.os = attributes[:'os'] + end + + if attributes.key?(:'pod_cidr') + self.pod_cidr = attributes[:'pod_cidr'] + end + + if attributes.key?(:'pod_count') + self.pod_count = attributes[:'pod_count'] + end + + if attributes.key?(:'provider_id') + self.provider_id = attributes[:'provider_id'] + end + + if attributes.key?(:'storage') + self.storage = attributes[:'storage'] + end + + if attributes.key?(:'uid') + self.uid = attributes[:'uid'] + 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 @agents.nil? + invalid_properties.push('invalid value for "agents", agents cannot be nil.') + end + + if @annotations_list.nil? + invalid_properties.push('invalid value for "annotations_list", annotations_list cannot be nil.') + end + + if @architecture.nil? + invalid_properties.push('invalid value for "architecture", architecture cannot be nil.') + end + + if @base_image.nil? + invalid_properties.push('invalid value for "base_image", base_image 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_instance_id.nil? + invalid_properties.push('invalid value for "cloud_instance_id", cloud_instance_id cannot be nil.') + end + + if @cloud_instance_type.nil? + invalid_properties.push('invalid value for "cloud_instance_type", cloud_instance_type cannot be nil.') + end + + if @cloud_name.nil? + invalid_properties.push('invalid value for "cloud_name", cloud_name cannot be nil.') + end + + if @cloud_region.nil? + invalid_properties.push('invalid value for "cloud_region", cloud_region cannot be nil.') + end + + if @cluster_id.nil? + invalid_properties.push('invalid value for "cluster_id", cluster_id cannot be nil.') + end + + if @cluster_name.nil? + invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') + end + + if @container_count.nil? + invalid_properties.push('invalid value for "container_count", container_count cannot be nil.') + end + + if @container_runtime_version.nil? + invalid_properties.push('invalid value for "container_runtime_version", container_runtime_version cannot be nil.') + end + + if @cpu.nil? + invalid_properties.push('invalid value for "cpu", cpu cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @external_ip.nil? + invalid_properties.push('invalid value for "external_ip", external_ip cannot be nil.') + end + + if @first_seen.nil? + invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.') + end + + if @ipv4.nil? + invalid_properties.push('invalid value for "ipv4", ipv4 cannot be nil.') + end + + if @ipv6.nil? + invalid_properties.push('invalid value for "ipv6", ipv6 cannot be nil.') + end + + if @kernel_version.nil? + invalid_properties.push('invalid value for "kernel_version", kernel_version cannot be nil.') + end + + if @kubernetes_version.nil? + invalid_properties.push('invalid value for "kubernetes_version", kubernetes_version cannot be nil.') + end + + if @labels.nil? + invalid_properties.push('invalid value for "labels", labels cannot be nil.') + end + + if @labels_list.nil? + invalid_properties.push('invalid value for "labels_list", labels_list cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @linux_sensor_coverage.nil? + invalid_properties.push('invalid value for "linux_sensor_coverage", linux_sensor_coverage cannot be nil.') + end + + if @memory.nil? + invalid_properties.push('invalid value for "memory", memory cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id cannot be nil.') + end + + if @node_name.nil? + invalid_properties.push('invalid value for "node_name", node_name cannot be nil.') + end + + if @os.nil? + invalid_properties.push('invalid value for "os", os cannot be nil.') + end + + if @pod_cidr.nil? + invalid_properties.push('invalid value for "pod_cidr", pod_cidr cannot be nil.') + end + + if @pod_count.nil? + invalid_properties.push('invalid value for "pod_count", pod_count cannot be nil.') + end + + if @provider_id.nil? + invalid_properties.push('invalid value for "provider_id", provider_id cannot be nil.') + end + + if @storage.nil? + invalid_properties.push('invalid value for "storage", storage cannot be nil.') + end + + if @uid.nil? + invalid_properties.push('invalid value for "uid", uid 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 @agents.nil? + return false if @annotations_list.nil? + return false if @architecture.nil? + return false if @base_image.nil? + return false if @cid.nil? + return false if @cloud_account_id.nil? + return false if @cloud_instance_id.nil? + return false if @cloud_instance_type.nil? + return false if @cloud_name.nil? + return false if @cloud_region.nil? + return false if @cluster_id.nil? + return false if @cluster_name.nil? + return false if @container_count.nil? + return false if @container_runtime_version.nil? + return false if @cpu.nil? + return false if @created_at.nil? + return false if @external_ip.nil? + return false if @first_seen.nil? + return false if @ipv4.nil? + return false if @ipv6.nil? + return false if @kernel_version.nil? + return false if @kubernetes_version.nil? + return false if @labels.nil? + return false if @labels_list.nil? + return false if @last_seen.nil? + return false if @linux_sensor_coverage.nil? + return false if @memory.nil? + return false if @node_id.nil? + return false if @node_name.nil? + return false if @os.nil? + return false if @pod_cidr.nil? + return false if @pod_count.nil? + return false if @provider_id.nil? + return false if @storage.nil? + return false if @uid.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 && + agents == o.agents && + annotations_list == o.annotations_list && + architecture == o.architecture && + base_image == o.base_image && + cid == o.cid && + cloud_account_id == o.cloud_account_id && + cloud_instance_id == o.cloud_instance_id && + cloud_instance_type == o.cloud_instance_type && + cloud_name == o.cloud_name && + cloud_region == o.cloud_region && + cluster_id == o.cluster_id && + cluster_name == o.cluster_name && + container_count == o.container_count && + container_runtime_version == o.container_runtime_version && + cpu == o.cpu && + created_at == o.created_at && + external_ip == o.external_ip && + first_seen == o.first_seen && + ipv4 == o.ipv4 && + ipv6 == o.ipv6 && + kernel_version == o.kernel_version && + kubernetes_version == o.kubernetes_version && + labels == o.labels && + labels_list == o.labels_list && + last_seen == o.last_seen && + linux_sensor_coverage == o.linux_sensor_coverage && + memory == o.memory && + node_id == o.node_id && + node_name == o.node_name && + os == o.os && + pod_cidr == o.pod_cidr && + pod_count == o.pod_count && + provider_id == o.provider_id && + storage == o.storage && + uid == o.uid + 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 + [agents, annotations_list, architecture, base_image, cid, cloud_account_id, cloud_instance_id, cloud_instance_type, cloud_name, cloud_region, cluster_id, cluster_name, container_count, container_runtime_version, cpu, created_at, external_ip, first_seen, ipv4, ipv6, kernel_version, kubernetes_version, labels, labels_list, last_seen, linux_sensor_coverage, memory, node_id, node_name, os, pod_cidr, pod_count, provider_id, storage, uid].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/public_get_changes_response.rb b/lib/crimson-falcon/models/models_node_entity_response.rb similarity index 97% rename from lib/crimson-falcon/models/public_get_changes_response.rb rename to lib/crimson-falcon/models/models_node_entity_response.rb index 66370244..20e87824 100644 --- a/lib/crimson-falcon/models/public_get_changes_response.rb +++ b/lib/crimson-falcon/models/models_node_entity_response.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class PublicGetChangesResponse + class ModelsNodeEntityResponse attr_accessor :errors attr_accessor :meta @@ -57,7 +57,7 @@ def self.openapi_types { :'errors' => :'Array', :'meta' => :'MsaspecMetaInfo', - :'resources' => :'Array' + :'resources' => :'Array' } end @@ -71,13 +71,13 @@ 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::PublicGetChangesResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsNodeEntityResponse` 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::PublicGetChangesResponse`. 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::ModelsNodeEntityResponse`. 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 } diff --git a/lib/crimson-falcon/models/models_package_name_version_type.rb b/lib/crimson-falcon/models/models_package_name_version_type.rb new file mode 100644 index 00000000..1806e865 --- /dev/null +++ b/lib/crimson-falcon/models/models_package_name_version_type.rb @@ -0,0 +1,295 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsPackageNameVersionType + attr_accessor :package_fixed_version + + attr_accessor :package_name_version + + attr_accessor :package_os_version + + attr_accessor :package_remediation + + attr_accessor :package_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'package_fixed_version' => :'package_fixed_version', + :'package_name_version' => :'package_name_version', + :'package_os_version' => :'package_os_version', + :'package_remediation' => :'package_remediation', + :'package_type' => :'package_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 + { + :'package_fixed_version' => :'String', + :'package_name_version' => :'String', + :'package_os_version' => :'String', + :'package_remediation' => :'String', + :'package_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::ModelsPackageNameVersionType` 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::ModelsPackageNameVersionType`. 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?(:'package_fixed_version') + self.package_fixed_version = attributes[:'package_fixed_version'] + end + + if attributes.key?(:'package_name_version') + self.package_name_version = attributes[:'package_name_version'] + end + + if attributes.key?(:'package_os_version') + self.package_os_version = attributes[:'package_os_version'] + end + + if attributes.key?(:'package_remediation') + self.package_remediation = attributes[:'package_remediation'] + end + + if attributes.key?(:'package_type') + self.package_type = attributes[:'package_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 + if @package_fixed_version.nil? + invalid_properties.push('invalid value for "package_fixed_version", package_fixed_version 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 @package_os_version.nil? + invalid_properties.push('invalid value for "package_os_version", package_os_version cannot be nil.') + end + + if @package_remediation.nil? + invalid_properties.push('invalid value for "package_remediation", package_remediation cannot be nil.') + end + + if @package_type.nil? + invalid_properties.push('invalid value for "package_type", package_type 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 @package_fixed_version.nil? + return false if @package_name_version.nil? + return false if @package_os_version.nil? + return false if @package_remediation.nil? + return false if @package_type.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 && + package_fixed_version == o.package_fixed_version && + package_name_version == o.package_name_version && + package_os_version == o.package_os_version && + package_remediation == o.package_remediation && + package_type == o.package_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 + [package_fixed_version, package_name_version, package_os_version, package_remediation, package_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/models_patch_image_group_request.rb b/lib/crimson-falcon/models/models_patch_image_group_request.rb new file mode 100644 index 00000000..99b17bb5 --- /dev/null +++ b/lib/crimson-falcon/models/models_patch_image_group_request.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 ModelsPatchImageGroupRequest + attr_accessor :description + + attr_accessor :name + + attr_accessor :policy_group_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'policy_group_data' => :'policy_group_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 + { + :'description' => :'String', + :'name' => :'String', + :'policy_group_data' => :'ModelsAPIPolicyGroupData' + } + 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::ModelsPatchImageGroupRequest` 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::ModelsPatchImageGroupRequest`. 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?(:'policy_group_data') + self.policy_group_data = attributes[:'policy_group_data'] + 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 @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 @description.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 && + description == o.description && + name == o.name && + policy_group_data == o.policy_group_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 + [description, name, policy_group_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/models_patch_policy_request.rb b/lib/crimson-falcon/models/models_patch_policy_request.rb new file mode 100644 index 00000000..3d600f42 --- /dev/null +++ b/lib/crimson-falcon/models/models_patch_policy_request.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 ModelsPatchPolicyRequest + attr_accessor :description + + attr_accessor :is_enabled + + attr_accessor :name + + attr_accessor :policy_data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'is_enabled' => :'is_enabled', + :'name' => :'name', + :'policy_data' => :'policy_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 + { + :'description' => :'String', + :'is_enabled' => :'Boolean', + :'name' => :'String', + :'policy_data' => :'ModelsRequestAPIPolicyData' + } + 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::ModelsPatchPolicyRequest` 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::ModelsPatchPolicyRequest`. 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?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'policy_data') + self.policy_data = attributes[:'policy_data'] + 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 @is_enabled.nil? + invalid_properties.push('invalid value for "is_enabled", is_enabled 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 @description.nil? + return false if @is_enabled.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 && + description == o.description && + is_enabled == o.is_enabled && + name == o.name && + policy_data == o.policy_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 + [description, is_enabled, name, policy_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/models_pod.rb b/lib/crimson-falcon/models/models_pod.rb new file mode 100644 index 00000000..1f26b0ce --- /dev/null +++ b/lib/crimson-falcon/models/models_pod.rb @@ -0,0 +1,827 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsPod + attr_accessor :agents + + attr_accessor :allow_privilege_escalation + + attr_accessor :annotations_list + + attr_accessor :automount_service_token + + attr_accessor :cid + + attr_accessor :cloud_account_id + + attr_accessor :cloud_name + + attr_accessor :cloud_region + + attr_accessor :cluster_id + + attr_accessor :cluster_name + + attr_accessor :container_count + + attr_accessor :containers + + attr_accessor :created_at + + attr_accessor :first_seen + + attr_accessor :host_ipc + + attr_accessor :host_network + + attr_accessor :host_pid + + attr_accessor :image_pull_secrets + + attr_accessor :ipv4 + + attr_accessor :ipv6 + + attr_accessor :labels + + attr_accessor :labels_list + + attr_accessor :last_seen + + attr_accessor :namespace + + attr_accessor :node_ipv4 + + attr_accessor :node_name + + attr_accessor :node_selector + + attr_accessor :node_uid + + attr_accessor :owner_id + + attr_accessor :owner_type + + attr_accessor :pod_external_id + + attr_accessor :pod_id + + attr_accessor :pod_name + + attr_accessor :ports + + attr_accessor :privileged + + attr_accessor :root_write_access + + attr_accessor :run_as_root_group + + attr_accessor :run_as_root_user + + attr_accessor :scheduler_name + + attr_accessor :service_account_name + + attr_accessor :share_process_namespace + + attr_accessor :volume_mounts + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'agents' => :'agents', + :'allow_privilege_escalation' => :'allow_privilege_escalation', + :'annotations_list' => :'annotations_list', + :'automount_service_token' => :'automount_service_token', + :'cid' => :'cid', + :'cloud_account_id' => :'cloud_account_id', + :'cloud_name' => :'cloud_name', + :'cloud_region' => :'cloud_region', + :'cluster_id' => :'cluster_id', + :'cluster_name' => :'cluster_name', + :'container_count' => :'container_count', + :'containers' => :'containers', + :'created_at' => :'created_at', + :'first_seen' => :'first_seen', + :'host_ipc' => :'host_ipc', + :'host_network' => :'host_network', + :'host_pid' => :'host_pid', + :'image_pull_secrets' => :'image_pull_secrets', + :'ipv4' => :'ipv4', + :'ipv6' => :'ipv6', + :'labels' => :'labels', + :'labels_list' => :'labels_list', + :'last_seen' => :'last_seen', + :'namespace' => :'namespace', + :'node_ipv4' => :'node_ipv4', + :'node_name' => :'node_name', + :'node_selector' => :'node_selector', + :'node_uid' => :'node_uid', + :'owner_id' => :'owner_id', + :'owner_type' => :'owner_type', + :'pod_external_id' => :'pod_external_id', + :'pod_id' => :'pod_id', + :'pod_name' => :'pod_name', + :'ports' => :'ports', + :'privileged' => :'privileged', + :'root_write_access' => :'root_write_access', + :'run_as_root_group' => :'run_as_root_group', + :'run_as_root_user' => :'run_as_root_user', + :'scheduler_name' => :'scheduler_name', + :'service_account_name' => :'service_account_name', + :'share_process_namespace' => :'share_process_namespace', + :'volume_mounts' => :'volume_mounts' + } + 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 + { + :'agents' => :'Array', + :'allow_privilege_escalation' => :'Boolean', + :'annotations_list' => :'Array', + :'automount_service_token' => :'Boolean', + :'cid' => :'String', + :'cloud_account_id' => :'String', + :'cloud_name' => :'String', + :'cloud_region' => :'String', + :'cluster_id' => :'String', + :'cluster_name' => :'String', + :'container_count' => :'Integer', + :'containers' => :'Array', + :'created_at' => :'String', + :'first_seen' => :'String', + :'host_ipc' => :'Boolean', + :'host_network' => :'Boolean', + :'host_pid' => :'Boolean', + :'image_pull_secrets' => :'Array', + :'ipv4' => :'String', + :'ipv6' => :'String', + :'labels' => :'Hash', + :'labels_list' => :'Array', + :'last_seen' => :'String', + :'namespace' => :'String', + :'node_ipv4' => :'String', + :'node_name' => :'String', + :'node_selector' => :'String', + :'node_uid' => :'String', + :'owner_id' => :'String', + :'owner_type' => :'String', + :'pod_external_id' => :'String', + :'pod_id' => :'String', + :'pod_name' => :'String', + :'ports' => :'Array', + :'privileged' => :'Boolean', + :'root_write_access' => :'Boolean', + :'run_as_root_group' => :'Boolean', + :'run_as_root_user' => :'Boolean', + :'scheduler_name' => :'String', + :'service_account_name' => :'String', + :'share_process_namespace' => :'Boolean', + :'volume_mounts' => :'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::ModelsPod` 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::ModelsPod`. 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?(:'agents') + if (value = attributes[:'agents']).is_a?(Array) + self.agents = value + end + end + + if attributes.key?(:'allow_privilege_escalation') + self.allow_privilege_escalation = attributes[:'allow_privilege_escalation'] + end + + if attributes.key?(:'annotations_list') + if (value = attributes[:'annotations_list']).is_a?(Array) + self.annotations_list = value + end + end + + if attributes.key?(:'automount_service_token') + self.automount_service_token = attributes[:'automount_service_token'] + 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_name') + self.cloud_name = attributes[:'cloud_name'] + end + + if attributes.key?(:'cloud_region') + self.cloud_region = attributes[:'cloud_region'] + 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?(:'container_count') + self.container_count = attributes[:'container_count'] + end + + if attributes.key?(:'containers') + if (value = attributes[:'containers']).is_a?(Array) + self.containers = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'first_seen') + self.first_seen = attributes[:'first_seen'] + end + + if attributes.key?(:'host_ipc') + self.host_ipc = attributes[:'host_ipc'] + end + + if attributes.key?(:'host_network') + self.host_network = attributes[:'host_network'] + end + + if attributes.key?(:'host_pid') + self.host_pid = attributes[:'host_pid'] + end + + if attributes.key?(:'image_pull_secrets') + if (value = attributes[:'image_pull_secrets']).is_a?(Array) + self.image_pull_secrets = value + end + end + + if attributes.key?(:'ipv4') + self.ipv4 = attributes[:'ipv4'] + end + + if attributes.key?(:'ipv6') + self.ipv6 = attributes[:'ipv6'] + end + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Hash) + self.labels = value + end + end + + if attributes.key?(:'labels_list') + if (value = attributes[:'labels_list']).is_a?(Array) + self.labels_list = value + end + end + + if attributes.key?(:'last_seen') + self.last_seen = attributes[:'last_seen'] + end + + if attributes.key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + + if attributes.key?(:'node_ipv4') + self.node_ipv4 = attributes[:'node_ipv4'] + end + + if attributes.key?(:'node_name') + self.node_name = attributes[:'node_name'] + end + + if attributes.key?(:'node_selector') + self.node_selector = attributes[:'node_selector'] + end + + if attributes.key?(:'node_uid') + self.node_uid = attributes[:'node_uid'] + end + + if attributes.key?(:'owner_id') + self.owner_id = attributes[:'owner_id'] + end + + if attributes.key?(:'owner_type') + self.owner_type = attributes[:'owner_type'] + end + + if attributes.key?(:'pod_external_id') + self.pod_external_id = attributes[:'pod_external_id'] + end + + if attributes.key?(:'pod_id') + self.pod_id = attributes[:'pod_id'] + end + + if attributes.key?(:'pod_name') + self.pod_name = attributes[:'pod_name'] + end + + if attributes.key?(:'ports') + if (value = attributes[:'ports']).is_a?(Array) + self.ports = value + end + end + + if attributes.key?(:'privileged') + self.privileged = attributes[:'privileged'] + end + + if attributes.key?(:'root_write_access') + self.root_write_access = attributes[:'root_write_access'] + end + + if attributes.key?(:'run_as_root_group') + self.run_as_root_group = attributes[:'run_as_root_group'] + end + + if attributes.key?(:'run_as_root_user') + self.run_as_root_user = attributes[:'run_as_root_user'] + end + + if attributes.key?(:'scheduler_name') + self.scheduler_name = attributes[:'scheduler_name'] + end + + if attributes.key?(:'service_account_name') + self.service_account_name = attributes[:'service_account_name'] + end + + if attributes.key?(:'share_process_namespace') + self.share_process_namespace = attributes[:'share_process_namespace'] + end + + if attributes.key?(:'volume_mounts') + self.volume_mounts = attributes[:'volume_mounts'] + 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 @agents.nil? + invalid_properties.push('invalid value for "agents", agents cannot be nil.') + end + + if @allow_privilege_escalation.nil? + invalid_properties.push('invalid value for "allow_privilege_escalation", allow_privilege_escalation cannot be nil.') + end + + if @annotations_list.nil? + invalid_properties.push('invalid value for "annotations_list", annotations_list cannot be nil.') + end + + if @automount_service_token.nil? + invalid_properties.push('invalid value for "automount_service_token", automount_service_token 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_name.nil? + invalid_properties.push('invalid value for "cloud_name", cloud_name cannot be nil.') + end + + if @cloud_region.nil? + invalid_properties.push('invalid value for "cloud_region", cloud_region cannot be nil.') + end + + if @cluster_id.nil? + invalid_properties.push('invalid value for "cluster_id", cluster_id cannot be nil.') + end + + if @cluster_name.nil? + invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') + end + + if @container_count.nil? + invalid_properties.push('invalid value for "container_count", container_count cannot be nil.') + end + + if @containers.nil? + invalid_properties.push('invalid value for "containers", containers cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @first_seen.nil? + invalid_properties.push('invalid value for "first_seen", first_seen cannot be nil.') + end + + if @host_ipc.nil? + invalid_properties.push('invalid value for "host_ipc", host_ipc cannot be nil.') + end + + if @host_network.nil? + invalid_properties.push('invalid value for "host_network", host_network cannot be nil.') + end + + if @host_pid.nil? + invalid_properties.push('invalid value for "host_pid", host_pid cannot be nil.') + end + + if @image_pull_secrets.nil? + invalid_properties.push('invalid value for "image_pull_secrets", image_pull_secrets cannot be nil.') + end + + if @ipv4.nil? + invalid_properties.push('invalid value for "ipv4", ipv4 cannot be nil.') + end + + if @ipv6.nil? + invalid_properties.push('invalid value for "ipv6", ipv6 cannot be nil.') + end + + if @labels.nil? + invalid_properties.push('invalid value for "labels", labels cannot be nil.') + end + + if @labels_list.nil? + invalid_properties.push('invalid value for "labels_list", labels_list cannot be nil.') + end + + if @last_seen.nil? + invalid_properties.push('invalid value for "last_seen", last_seen cannot be nil.') + end + + if @namespace.nil? + invalid_properties.push('invalid value for "namespace", namespace cannot be nil.') + end + + if @node_ipv4.nil? + invalid_properties.push('invalid value for "node_ipv4", node_ipv4 cannot be nil.') + end + + if @node_name.nil? + invalid_properties.push('invalid value for "node_name", node_name cannot be nil.') + end + + if @node_selector.nil? + invalid_properties.push('invalid value for "node_selector", node_selector cannot be nil.') + end + + if @node_uid.nil? + invalid_properties.push('invalid value for "node_uid", node_uid cannot be nil.') + end + + if @owner_id.nil? + invalid_properties.push('invalid value for "owner_id", owner_id cannot be nil.') + end + + if @owner_type.nil? + invalid_properties.push('invalid value for "owner_type", owner_type cannot be nil.') + end + + if @pod_external_id.nil? + invalid_properties.push('invalid value for "pod_external_id", pod_external_id cannot be nil.') + end + + if @pod_id.nil? + invalid_properties.push('invalid value for "pod_id", pod_id cannot be nil.') + end + + if @pod_name.nil? + invalid_properties.push('invalid value for "pod_name", pod_name cannot be nil.') + end + + if @ports.nil? + invalid_properties.push('invalid value for "ports", ports cannot be nil.') + end + + if @privileged.nil? + invalid_properties.push('invalid value for "privileged", privileged cannot be nil.') + end + + if @root_write_access.nil? + invalid_properties.push('invalid value for "root_write_access", root_write_access cannot be nil.') + end + + if @run_as_root_group.nil? + invalid_properties.push('invalid value for "run_as_root_group", run_as_root_group cannot be nil.') + end + + if @run_as_root_user.nil? + invalid_properties.push('invalid value for "run_as_root_user", run_as_root_user cannot be nil.') + end + + if @scheduler_name.nil? + invalid_properties.push('invalid value for "scheduler_name", scheduler_name cannot be nil.') + end + + if @service_account_name.nil? + invalid_properties.push('invalid value for "service_account_name", service_account_name cannot be nil.') + end + + if @share_process_namespace.nil? + invalid_properties.push('invalid value for "share_process_namespace", share_process_namespace cannot be nil.') + end + + if @volume_mounts.nil? + invalid_properties.push('invalid value for "volume_mounts", volume_mounts 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 @agents.nil? + return false if @allow_privilege_escalation.nil? + return false if @annotations_list.nil? + return false if @automount_service_token.nil? + return false if @cid.nil? + return false if @cloud_account_id.nil? + return false if @cloud_name.nil? + return false if @cloud_region.nil? + return false if @cluster_id.nil? + return false if @cluster_name.nil? + return false if @container_count.nil? + return false if @containers.nil? + return false if @created_at.nil? + return false if @first_seen.nil? + return false if @host_ipc.nil? + return false if @host_network.nil? + return false if @host_pid.nil? + return false if @image_pull_secrets.nil? + return false if @ipv4.nil? + return false if @ipv6.nil? + return false if @labels.nil? + return false if @labels_list.nil? + return false if @last_seen.nil? + return false if @namespace.nil? + return false if @node_ipv4.nil? + return false if @node_name.nil? + return false if @node_selector.nil? + return false if @node_uid.nil? + return false if @owner_id.nil? + return false if @owner_type.nil? + return false if @pod_external_id.nil? + return false if @pod_id.nil? + return false if @pod_name.nil? + return false if @ports.nil? + return false if @privileged.nil? + return false if @root_write_access.nil? + return false if @run_as_root_group.nil? + return false if @run_as_root_user.nil? + return false if @scheduler_name.nil? + return false if @service_account_name.nil? + return false if @share_process_namespace.nil? + return false if @volume_mounts.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 && + agents == o.agents && + allow_privilege_escalation == o.allow_privilege_escalation && + annotations_list == o.annotations_list && + automount_service_token == o.automount_service_token && + cid == o.cid && + cloud_account_id == o.cloud_account_id && + cloud_name == o.cloud_name && + cloud_region == o.cloud_region && + cluster_id == o.cluster_id && + cluster_name == o.cluster_name && + container_count == o.container_count && + containers == o.containers && + created_at == o.created_at && + first_seen == o.first_seen && + host_ipc == o.host_ipc && + host_network == o.host_network && + host_pid == o.host_pid && + image_pull_secrets == o.image_pull_secrets && + ipv4 == o.ipv4 && + ipv6 == o.ipv6 && + labels == o.labels && + labels_list == o.labels_list && + last_seen == o.last_seen && + namespace == o.namespace && + node_ipv4 == o.node_ipv4 && + node_name == o.node_name && + node_selector == o.node_selector && + node_uid == o.node_uid && + owner_id == o.owner_id && + owner_type == o.owner_type && + pod_external_id == o.pod_external_id && + pod_id == o.pod_id && + pod_name == o.pod_name && + ports == o.ports && + privileged == o.privileged && + root_write_access == o.root_write_access && + run_as_root_group == o.run_as_root_group && + run_as_root_user == o.run_as_root_user && + scheduler_name == o.scheduler_name && + service_account_name == o.service_account_name && + share_process_namespace == o.share_process_namespace && + volume_mounts == o.volume_mounts + 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 + [agents, allow_privilege_escalation, annotations_list, automount_service_token, cid, cloud_account_id, cloud_name, cloud_region, cluster_id, cluster_name, container_count, containers, created_at, first_seen, host_ipc, host_network, host_pid, image_pull_secrets, ipv4, ipv6, labels, labels_list, last_seen, namespace, node_ipv4, node_name, node_selector, node_uid, owner_id, owner_type, pod_external_id, pod_id, pod_name, ports, privileged, root_write_access, run_as_root_group, run_as_root_user, scheduler_name, service_account_name, share_process_namespace, volume_mounts].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_pod_entity_response.rb b/lib/crimson-falcon/models/models_pod_entity_response.rb new file mode 100644 index 00000000..8448281c --- /dev/null +++ b/lib/crimson-falcon/models/models_pod_entity_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 ModelsPodEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::ModelsPodEntityResponse` 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::ModelsPodEntityResponse`. 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/models_policy_entity_response.rb b/lib/crimson-falcon/models/models_policy_entity_response.rb new file mode 100644 index 00000000..8b49b028 --- /dev/null +++ b/lib/crimson-falcon/models/models_policy_entity_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 ModelsPolicyEntityResponse + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::ModelsPolicyEntityResponse` 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::ModelsPolicyEntityResponse`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/models_policy_exclusion_entity_response.rb b/lib/crimson-falcon/models/models_policy_exclusion_entity_response.rb new file mode 100644 index 00000000..d1548acb --- /dev/null +++ b/lib/crimson-falcon/models/models_policy_exclusion_entity_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 ModelsPolicyExclusionEntityResponse + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::ModelsPolicyExclusionEntityResponse` 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::ModelsPolicyExclusionEntityResponse`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/models_policy_group_entity_response.rb b/lib/crimson-falcon/models/models_policy_group_entity_response.rb new file mode 100644 index 00000000..15f89873 --- /dev/null +++ b/lib/crimson-falcon/models/models_policy_group_entity_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 ModelsPolicyGroupEntityResponse + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::ModelsPolicyGroupEntityResponse` 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::ModelsPolicyGroupEntityResponse`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/models_request_api_policy_data.rb b/lib/crimson-falcon/models/models_request_api_policy_data.rb new file mode 100644 index 00000000..dc1ef119 --- /dev/null +++ b/lib/crimson-falcon/models/models_request_api_policy_data.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 ModelsRequestAPIPolicyData + attr_accessor :rules + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'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::ModelsRequestAPIPolicyData` 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::ModelsRequestAPIPolicyData`. 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?(:'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 @rules.nil? + invalid_properties.push('invalid value for "rules", rules 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 @rules.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 && + 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 + [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/models_snapshot_account_status.rb b/lib/crimson-falcon/models/models_snapshot_account_status.rb new file mode 100644 index 00000000..b23d9807 --- /dev/null +++ b/lib/crimson-falcon/models/models_snapshot_account_status.rb @@ -0,0 +1,341 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ModelsSnapshotAccountStatus + attr_accessor :account_id + + attr_accessor :account_status + + attr_accessor :batch_regions + + attr_accessor :cloud_provider + + attr_accessor :iam_external_id + + attr_accessor :iam_role_arn + + attr_accessor :processing_account + + attr_accessor :regions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'account_id' => :'account_id', + :'account_status' => :'account_status', + :'batch_regions' => :'batch_regions', + :'cloud_provider' => :'cloud_provider', + :'iam_external_id' => :'iam_external_id', + :'iam_role_arn' => :'iam_role_arn', + :'processing_account' => :'processing_account', + :'regions' => :'regions' + } + 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_status' => :'String', + :'batch_regions' => :'Array', + :'cloud_provider' => :'Integer', + :'iam_external_id' => :'String', + :'iam_role_arn' => :'String', + :'processing_account' => :'String', + :'regions' => :'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::ModelsSnapshotAccountStatus` 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::ModelsSnapshotAccountStatus`. 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_status') + self.account_status = attributes[:'account_status'] + end + + if attributes.key?(:'batch_regions') + if (value = attributes[:'batch_regions']).is_a?(Array) + self.batch_regions = value + end + end + + if attributes.key?(:'cloud_provider') + self.cloud_provider = attributes[:'cloud_provider'] + end + + if attributes.key?(:'iam_external_id') + self.iam_external_id = attributes[:'iam_external_id'] + end + + if attributes.key?(:'iam_role_arn') + self.iam_role_arn = attributes[:'iam_role_arn'] + end + + if attributes.key?(:'processing_account') + self.processing_account = attributes[:'processing_account'] + end + + if attributes.key?(:'regions') + if (value = attributes[:'regions']).is_a?(Array) + self.regions = 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 @account_id.nil? + invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') + end + + if @account_status.nil? + invalid_properties.push('invalid value for "account_status", account_status cannot be nil.') + end + + if @batch_regions.nil? + invalid_properties.push('invalid value for "batch_regions", batch_regions cannot be nil.') + end + + if @cloud_provider.nil? + invalid_properties.push('invalid value for "cloud_provider", cloud_provider cannot be nil.') + end + + if @iam_external_id.nil? + invalid_properties.push('invalid value for "iam_external_id", iam_external_id cannot be nil.') + end + + if @iam_role_arn.nil? + invalid_properties.push('invalid value for "iam_role_arn", iam_role_arn cannot be nil.') + end + + if @processing_account.nil? + invalid_properties.push('invalid value for "processing_account", processing_account cannot be nil.') + end + + if @regions.nil? + invalid_properties.push('invalid value for "regions", regions 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 @account_id.nil? + return false if @account_status.nil? + return false if @batch_regions.nil? + return false if @cloud_provider.nil? + return false if @iam_external_id.nil? + return false if @iam_role_arn.nil? + return false if @processing_account.nil? + return false if @regions.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 && + account_id == o.account_id && + account_status == o.account_status && + batch_regions == o.batch_regions && + cloud_provider == o.cloud_provider && + iam_external_id == o.iam_external_id && + iam_role_arn == o.iam_role_arn && + processing_account == o.processing_account && + regions == o.regions + 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_status, batch_regions, cloud_provider, iam_external_id, iam_role_arn, processing_account, regions].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_update_exclusions_request.rb b/lib/crimson-falcon/models/models_update_exclusions_request.rb new file mode 100644 index 00000000..c69bf7df --- /dev/null +++ b/lib/crimson-falcon/models/models_update_exclusions_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 ModelsUpdateExclusionsRequest + attr_accessor :conditions + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'conditions' => :'conditions' + } + 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 + { + :'conditions' => :'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::ModelsUpdateExclusionsRequest` 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::ModelsUpdateExclusionsRequest`. 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?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = 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 @conditions.nil? + invalid_properties.push('invalid value for "conditions", conditions 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 @conditions.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 && + conditions == o.conditions + 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 + [conditions].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/msa_aggregation_result.rb b/lib/crimson-falcon/models/msa_aggregation_result.rb index edacc848..4759a7f0 100644 --- a/lib/crimson-falcon/models/msa_aggregation_result.rb +++ b/lib/crimson-falcon/models/msa_aggregation_result.rb @@ -34,6 +34,8 @@ module Falcon class MsaAggregationResult attr_accessor :buckets + attr_accessor :doc_count_error_upper_bound + attr_accessor :name attr_accessor :sum_other_doc_count @@ -42,6 +44,7 @@ class MsaAggregationResult def self.attribute_map { :'buckets' => :'buckets', + :'doc_count_error_upper_bound' => :'doc_count_error_upper_bound', :'name' => :'name', :'sum_other_doc_count' => :'sum_other_doc_count' } @@ -56,6 +59,7 @@ def self.acceptable_attributes def self.openapi_types { :'buckets' => :'Array', + :'doc_count_error_upper_bound' => :'Integer', :'name' => :'String', :'sum_other_doc_count' => :'Integer' } @@ -88,6 +92,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'doc_count_error_upper_bound') + self.doc_count_error_upper_bound = attributes[:'doc_count_error_upper_bound'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -126,6 +134,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && buckets == o.buckets && + doc_count_error_upper_bound == o.doc_count_error_upper_bound && name == o.name && sum_other_doc_count == o.sum_other_doc_count end @@ -139,7 +148,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [buckets, name, sum_other_doc_count].hash + [buckets, doc_count_error_upper_bound, name, sum_other_doc_count].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/packages_api_combined_package.rb b/lib/crimson-falcon/models/packages_api_combined_package.rb new file mode 100644 index 00000000..8b98f990 --- /dev/null +++ b/lib/crimson-falcon/models/packages_api_combined_package.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 PackagesApiCombinedPackage + 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' => :'MsaspecMetaInfo', + :'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::PackagesApiCombinedPackage` 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::PackagesApiCombinedPackage`. 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/packages_api_combined_package_export.rb b/lib/crimson-falcon/models/packages_api_combined_package_export.rb new file mode 100644 index 00000000..de860c1f --- /dev/null +++ b/lib/crimson-falcon/models/packages_api_combined_package_export.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 PackagesApiCombinedPackageExport + 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' => :'MsaspecMetaInfo', + :'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::PackagesApiCombinedPackageExport` 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::PackagesApiCombinedPackageExport`. 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/packages_api_packages_by_vuln_count.rb b/lib/crimson-falcon/models/packages_api_packages_by_vuln_count.rb new file mode 100644 index 00000000..704941b3 --- /dev/null +++ b/lib/crimson-falcon/models/packages_api_packages_by_vuln_count.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 PackagesApiPackagesByVulnCount + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::PackagesApiPackagesByVulnCount` 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::PackagesApiPackagesByVulnCount`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/parameter_activity_config_parameter_value.rb b/lib/crimson-falcon/models/parameter_activity_config_parameter_value.rb new file mode 100644 index 00000000..50644fc6 --- /dev/null +++ b/lib/crimson-falcon/models/parameter_activity_config_parameter_value.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 ParameterActivityConfigParameterValue + attr_accessor :default_value + + # Specifies whether the given activity configuration property can be overridden at provisioning time. + attr_accessor :deny_override + + # Indication of whether the property must be specified as a parameter during template provisioning. + attr_accessor :required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'default_value' => :'default_value', + :'deny_override' => :'deny_override', + :'required' => :'required' + } + 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_value' => :'Object', + :'deny_override' => :'Boolean', + :'required' => :'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::ParameterActivityConfigParameterValue` 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::ParameterActivityConfigParameterValue`. 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_value') + self.default_value = attributes[:'default_value'] + end + + if attributes.key?(:'deny_override') + self.deny_override = attributes[:'deny_override'] + end + + if attributes.key?(:'required') + self.required = attributes[:'required'] + 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 @required.nil? + invalid_properties.push('invalid value for "required", required 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 @required.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_value == o.default_value && + deny_override == o.deny_override && + required == o.required + 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_value, deny_override, required].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/parameter_activity_config_provision_parameter.rb b/lib/crimson-falcon/models/parameter_activity_config_provision_parameter.rb new file mode 100644 index 00000000..0678ec23 --- /dev/null +++ b/lib/crimson-falcon/models/parameter_activity_config_provision_parameter.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 ParameterActivityConfigProvisionParameter + # The node_id of the activity in the model that is to be configured. + attr_accessor :node_id + + # The configurable properties of the activity and their accompanying metadata. + attr_accessor :properties + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'node_id' => :'node_id', + :'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 + { + :'node_id' => :'String', + :'properties' => :'Object' + } + 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::ParameterActivityConfigProvisionParameter` 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::ParameterActivityConfigProvisionParameter`. 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?(:'node_id') + self.node_id = attributes[:'node_id'] + 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 @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_id 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 @node_id.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 && + node_id == o.node_id && + 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 + [node_id, 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/parameter_activity_provision_parameters.rb b/lib/crimson-falcon/models/parameter_activity_provision_parameters.rb new file mode 100644 index 00000000..86e4c81b --- /dev/null +++ b/lib/crimson-falcon/models/parameter_activity_provision_parameters.rb @@ -0,0 +1,249 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ParameterActivityProvisionParameters + # provisioning parameterization of activity configuration. + attr_accessor :configuration + + # provisioning parameterization of activity selection. + attr_accessor :selection + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'configuration' => :'configuration', + :'selection' => :'selection' + } + 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 + { + :'configuration' => :'Array', + :'selection' => :'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::ParameterActivityProvisionParameters` 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::ParameterActivityProvisionParameters`. 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?(:'configuration') + if (value = attributes[:'configuration']).is_a?(Array) + self.configuration = value + end + end + + if attributes.key?(:'selection') + if (value = attributes[:'selection']).is_a?(Array) + self.selection = 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 && + configuration == o.configuration && + selection == o.selection + 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 + [configuration, selection].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/parameter_activity_selection_parameter.rb b/lib/crimson-falcon/models/parameter_activity_selection_parameter.rb new file mode 100644 index 00000000..ae79b73b --- /dev/null +++ b/lib/crimson-falcon/models/parameter_activity_selection_parameter.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 ParameterActivitySelectionParameter + # A static activity ID that is a suitable candidate for specifying at provisioning time. + attr_accessor :id + + # Statically defines properties that will be applied to the referenced activity. + attr_accessor :properties + + # The ID of the node in the model the activity should be bound to at provisioning time. The activity will be generated along with a flow node that connects it to this source node. + attr_accessor :source + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'properties' => :'properties', + :'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 + { + :'id' => :'String', + :'properties' => :'Object', + :'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::ParameterActivitySelectionParameter` 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::ParameterActivitySelectionParameter`. 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?(:'properties') + self.properties = attributes[:'properties'] + 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 @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @properties.nil? + invalid_properties.push('invalid value for "properties", properties 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 @id.nil? + return false if @properties.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 && + id == o.id && + properties == o.properties && + 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 + [id, properties, 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/parameter_condition_field_parameter.rb b/lib/crimson-falcon/models/parameter_condition_field_parameter.rb new file mode 100644 index 00000000..d5db8e0e --- /dev/null +++ b/lib/crimson-falcon/models/parameter_condition_field_parameter.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 ParameterConditionFieldParameter + # Optional default operator to be used as part of the condition + attr_accessor :default_operator + + attr_accessor :default_value + + # Whether the field can be specified multiple times as provisioning parameter. When true, all values or combined via an OR operator. + attr_accessor :multiple + + # The default operator that should be applied for this field. + attr_accessor :operator + + # Indicates whether the field must be specified as a parameter at provision time. + attr_accessor :required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'default_operator' => :'default_operator', + :'default_value' => :'default_value', + :'multiple' => :'multiple', + :'operator' => :'operator', + :'required' => :'required' + } + 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_operator' => :'String', + :'default_value' => :'Object', + :'multiple' => :'Boolean', + :'operator' => :'String', + :'required' => :'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::ParameterConditionFieldParameter` 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::ParameterConditionFieldParameter`. 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_operator') + self.default_operator = attributes[:'default_operator'] + end + + if attributes.key?(:'default_value') + self.default_value = attributes[:'default_value'] + end + + if attributes.key?(:'multiple') + self.multiple = attributes[:'multiple'] + end + + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + end + + if attributes.key?(:'required') + self.required = attributes[:'required'] + 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 @multiple.nil? + invalid_properties.push('invalid value for "multiple", multiple cannot be nil.') + end + + if @required.nil? + invalid_properties.push('invalid value for "required", required 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 @multiple.nil? + return false if @required.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_operator == o.default_operator && + default_value == o.default_value && + multiple == o.multiple && + operator == o.operator && + required == o.required + 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_operator, default_value, multiple, operator, required].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/parameter_condition_field_provision_parameter.rb b/lib/crimson-falcon/models/parameter_condition_field_provision_parameter.rb new file mode 100644 index 00000000..712dbe9d --- /dev/null +++ b/lib/crimson-falcon/models/parameter_condition_field_provision_parameter.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 ParameterConditionFieldProvisionParameter + # Fully qualified name of the field + attr_accessor :name + + # Optional operator to be used as part of the condition. It not supplied the default in the template will be used. + attr_accessor :operator + + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'operator' => :'operator', + :'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 + { + :'name' => :'String', + :'operator' => :'String', + :'value' => :'Object' + } + 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::ParameterConditionFieldProvisionParameter` 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::ParameterConditionFieldProvisionParameter`. 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?(:'operator') + self.operator = attributes[:'operator'] + 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 @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @operator.nil? + invalid_properties.push('invalid value for "operator", operator cannot be nil.') + end + + if @value.nil? + invalid_properties.push('invalid value for "value", value 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 @operator.nil? + return false if @value.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 && + operator == o.operator && + 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 + [name, operator, 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/parameter_condition_provision_parameter.rb b/lib/crimson-falcon/models/parameter_condition_provision_parameter.rb new file mode 100644 index 00000000..15ac5866 --- /dev/null +++ b/lib/crimson-falcon/models/parameter_condition_provision_parameter.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 ParameterConditionProvisionParameter + # details for the condition fields to be set when provisioning. + attr_accessor :fields + + # The flow node_id in the model this condition is associated with. + attr_accessor :node_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fields' => :'fields', + :'node_id' => :'node_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 + { + :'fields' => :'Array', + :'node_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::ParameterConditionProvisionParameter` 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::ParameterConditionProvisionParameter`. 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?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_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 @fields.nil? + invalid_properties.push('invalid value for "fields", fields cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_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 @fields.nil? + return false if @node_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 && + fields == o.fields && + node_id == o.node_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 + [fields, node_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/parameter_template_provision_parameters.rb b/lib/crimson-falcon/models/parameter_template_provision_parameters.rb new file mode 100644 index 00000000..ca6b114c --- /dev/null +++ b/lib/crimson-falcon/models/parameter_template_provision_parameters.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 ParameterTemplateProvisionParameters + attr_accessor :activities + + # set of parameters for provisioning of conditions within the associated template. + attr_accessor :conditions + + attr_accessor :trigger + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'activities' => :'activities', + :'conditions' => :'conditions', + :'trigger' => :'trigger' + } + 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 + { + :'activities' => :'ParameterActivityProvisionParameters', + :'conditions' => :'Array', + :'trigger' => :'ParameterTriggerProvisionParameter' + } + 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::ParameterTemplateProvisionParameters` 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::ParameterTemplateProvisionParameters`. 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?(:'activities') + self.activities = attributes[:'activities'] + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = value + end + end + + if attributes.key?(:'trigger') + self.trigger = attributes[:'trigger'] + 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 && + activities == o.activities && + conditions == o.conditions && + trigger == o.trigger + 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 + [activities, conditions, trigger].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/parameter_trigger_field_parameter.rb b/lib/crimson-falcon/models/parameter_trigger_field_parameter.rb new file mode 100644 index 00000000..f0d47835 --- /dev/null +++ b/lib/crimson-falcon/models/parameter_trigger_field_parameter.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 ParameterTriggerFieldParameter + attr_accessor :default_value + + # Values associated with trigger property received during provisioning call. + attr_accessor :properties + + # Indicates whether the field must be specified as a parameter at provision time. + attr_accessor :required + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'default_value' => :'default_value', + :'properties' => :'properties', + :'required' => :'required' + } + 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_value' => :'Object', + :'properties' => :'Object', + :'required' => :'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::ParameterTriggerFieldParameter` 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::ParameterTriggerFieldParameter`. 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_value') + self.default_value = attributes[:'default_value'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + end + + if attributes.key?(:'required') + self.required = attributes[:'required'] + 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 @required.nil? + invalid_properties.push('invalid value for "required", required 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 @required.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_value == o.default_value && + properties == o.properties && + required == o.required + 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_value, properties, required].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/parameter_trigger_parameter.rb b/lib/crimson-falcon/models/parameter_trigger_parameter.rb new file mode 100644 index 00000000..eaba1fd2 --- /dev/null +++ b/lib/crimson-falcon/models/parameter_trigger_parameter.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 ParameterTriggerParameter + # Contains a mapping of each parameterized trigger field with default values. + attr_accessor :fields + + # The graph node ID for where these conditions reside. + attr_accessor :node_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fields' => :'fields', + :'node_id' => :'node_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 + { + :'fields' => :'Hash', + :'node_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::ParameterTriggerParameter` 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::ParameterTriggerParameter`. 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?(:'fields') + if (value = attributes[:'fields']).is_a?(Hash) + self.fields = value + end + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_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 @fields.nil? + invalid_properties.push('invalid value for "fields", fields cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_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 @fields.nil? + return false if @node_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 && + fields == o.fields && + node_id == o.node_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 + [fields, node_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/parameter_trigger_provision_parameter.rb b/lib/crimson-falcon/models/parameter_trigger_provision_parameter.rb new file mode 100644 index 00000000..b113786b --- /dev/null +++ b/lib/crimson-falcon/models/parameter_trigger_provision_parameter.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 ParameterTriggerProvisionParameter + # Contains a mapping of each parameterized trigger field with default values. + attr_accessor :fields + + # The flow node_id in the model this condition is associated with. + attr_accessor :node_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fields' => :'fields', + :'node_id' => :'node_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 + { + :'fields' => :'Hash', + :'node_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::ParameterTriggerProvisionParameter` 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::ParameterTriggerProvisionParameter`. 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?(:'fields') + if (value = attributes[:'fields']).is_a?(Hash) + self.fields = value + end + end + + if attributes.key?(:'node_id') + self.node_id = attributes[:'node_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 @fields.nil? + invalid_properties.push('invalid value for "fields", fields cannot be nil.') + end + + if @node_id.nil? + invalid_properties.push('invalid value for "node_id", node_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 @fields.nil? + return false if @node_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 && + fields == o.fields && + node_id == o.node_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 + [fields, node_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/policies_assigned_host_group.rb b/lib/crimson-falcon/models/policies_assigned_host_group.rb new file mode 100644 index 00000000..ffbd95ef --- /dev/null +++ b/lib/crimson-falcon/models/policies_assigned_host_group.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 PoliciesAssignedHostGroup + attr_accessor :href + + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'id' => :'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 + { + :'href' => :'String', + :'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::PoliciesAssignedHostGroup` 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::PoliciesAssignedHostGroup`. 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?(:'href') + self.href = attributes[:'href'] + end + + if attributes.key?(:'id') + self.id = attributes[:'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 @href.nil? + invalid_properties.push('invalid value for "href", href cannot be nil.') + end + + 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 @href.nil? + 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 && + href == o.href && + id == o.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 + [href, 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/policies_assigned_rule_group.rb b/lib/crimson-falcon/models/policies_assigned_rule_group.rb new file mode 100644 index 00000000..6ff6fccf --- /dev/null +++ b/lib/crimson-falcon/models/policies_assigned_rule_group.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 PoliciesAssignedRuleGroup + attr_accessor :href + + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'id' => :'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 + { + :'href' => :'String', + :'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::PoliciesAssignedRuleGroup` 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::PoliciesAssignedRuleGroup`. 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?(:'href') + self.href = attributes[:'href'] + end + + if attributes.key?(:'id') + self.id = attributes[:'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 @href.nil? + invalid_properties.push('invalid value for "href", href cannot be nil.') + end + + 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 @href.nil? + 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 && + href == o.href && + id == o.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 + [href, 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/policies_create_request.rb b/lib/crimson-falcon/models/policies_create_request.rb new file mode 100644 index 00000000..93276c6c --- /dev/null +++ b/lib/crimson-falcon/models/policies_create_request.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 PoliciesCreateRequest + attr_accessor :description + + attr_accessor :name + + attr_accessor :platform + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'platform' => :'platform' + } + 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', + :'platform' => :'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::PoliciesCreateRequest` 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::PoliciesCreateRequest`. 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?(:'platform') + self.platform = attributes[:'platform'] + 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 && + platform == o.platform + 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, platform].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/policies_delete_response.rb b/lib/crimson-falcon/models/policies_delete_response.rb new file mode 100644 index 00000000..a6e2a3e5 --- /dev/null +++ b/lib/crimson-falcon/models/policies_delete_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 PoliciesDeleteResponse + 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' => :'MsaspecMetaInfo', + :'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::PoliciesDeleteResponse` 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::PoliciesDeleteResponse`. 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/policies_policy.rb b/lib/crimson-falcon/models/policies_policy.rb new file mode 100644 index 00000000..e53a1b93 --- /dev/null +++ b/lib/crimson-falcon/models/policies_policy.rb @@ -0,0 +1,362 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 PoliciesPolicy + attr_accessor :created_by + + attr_accessor :created_timestamp + + attr_accessor :description + + attr_accessor :enabled + + attr_accessor :host_groups + + attr_accessor :id + + attr_accessor :modified_by + + attr_accessor :modified_timestamp + + attr_accessor :name + + attr_accessor :platform + + attr_accessor :precedence + + attr_accessor :rule_groups + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_by' => :'created_by', + :'created_timestamp' => :'created_timestamp', + :'description' => :'description', + :'enabled' => :'enabled', + :'host_groups' => :'host_groups', + :'id' => :'id', + :'modified_by' => :'modified_by', + :'modified_timestamp' => :'modified_timestamp', + :'name' => :'name', + :'platform' => :'platform', + :'precedence' => :'precedence', + :'rule_groups' => :'rule_groups' + } + 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' => :'String', + :'description' => :'String', + :'enabled' => :'Boolean', + :'host_groups' => :'Array', + :'id' => :'String', + :'modified_by' => :'String', + :'modified_timestamp' => :'String', + :'name' => :'String', + :'platform' => :'String', + :'precedence' => :'Integer', + :'rule_groups' => :'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::PoliciesPolicy` 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::PoliciesPolicy`. 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?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'host_groups') + if (value = attributes[:'host_groups']).is_a?(Array) + self.host_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') + self.platform = attributes[:'platform'] + end + + if attributes.key?(:'precedence') + self.precedence = attributes[:'precedence'] + end + + if attributes.key?(:'rule_groups') + if (value = attributes[:'rule_groups']).is_a?(Array) + self.rule_groups = 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 @created_timestamp.nil? + invalid_properties.push('invalid value for "created_timestamp", created_timestamp cannot be nil.') + end + + if @enabled.nil? + invalid_properties.push('invalid value for "enabled", enabled 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 + + 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 @enabled.nil? + return false if @id.nil? + return false if @modified_by.nil? + return false if @modified_timestamp.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 && + description == o.description && + enabled == o.enabled && + host_groups == o.host_groups && + id == o.id && + modified_by == o.modified_by && + modified_timestamp == o.modified_timestamp && + name == o.name && + platform == o.platform && + precedence == o.precedence && + rule_groups == o.rule_groups + 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, description, enabled, host_groups, id, modified_by, modified_timestamp, name, platform, precedence, rule_groups].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/policies_precedence_response.rb b/lib/crimson-falcon/models/policies_precedence_response.rb new file mode 100644 index 00000000..49d4edea --- /dev/null +++ b/lib/crimson-falcon/models/policies_precedence_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 PoliciesPrecedenceResponse + 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' => :'MsaspecMetaInfo', + :'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::PoliciesPrecedenceResponse` 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::PoliciesPrecedenceResponse`. 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/policies_response.rb b/lib/crimson-falcon/models/policies_response.rb new file mode 100644 index 00000000..7c1e9ce4 --- /dev/null +++ b/lib/crimson-falcon/models/policies_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 PoliciesResponse + 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' => :'MsaspecMetaInfo', + :'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::PoliciesResponse` 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::PoliciesResponse`. 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/policies_update_request.rb b/lib/crimson-falcon/models/policies_update_request.rb new file mode 100644 index 00000000..50a38e09 --- /dev/null +++ b/lib/crimson-falcon/models/policies_update_request.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 PoliciesUpdateRequest + attr_accessor :description + + attr_accessor :enabled + + attr_accessor :id + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'enabled' => :'enabled', + :'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 + { + :'description' => :'String', + :'enabled' => :'Boolean', + :'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::PoliciesUpdateRequest` 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::PoliciesUpdateRequest`. 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?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + 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 + 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 && + enabled == o.enabled && + 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 + [description, enabled, 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/quarantine_quarantined_file.rb b/lib/crimson-falcon/models/quarantine_quarantined_file.rb index e0c119e2..41379ab2 100644 --- a/lib/crimson-falcon/models/quarantine_quarantined_file.rb +++ b/lib/crimson-falcon/models/quarantine_quarantined_file.rb @@ -34,6 +34,8 @@ module Falcon class QuarantineQuarantinedFile attr_accessor :aid + attr_accessor :alert_ids + attr_accessor :cid attr_accessor :date_created @@ -70,6 +72,7 @@ class QuarantineQuarantinedFile def self.attribute_map { :'aid' => :'aid', + :'alert_ids' => :'alert_ids', :'cid' => :'cid', :'date_created' => :'date_created', :'date_updated' => :'date_updated', @@ -98,6 +101,7 @@ def self.acceptable_attributes def self.openapi_types { :'aid' => :'String', + :'alert_ids' => :'Array', :'cid' => :'String', :'date_created' => :'String', :'date_updated' => :'String', @@ -142,6 +146,12 @@ def initialize(attributes = {}) self.aid = attributes[:'aid'] end + if attributes.key?(:'alert_ids') + if (value = attributes[:'alert_ids']).is_a?(Array) + self.alert_ids = value + end + end + if attributes.key?(:'cid') self.cid = attributes[:'cid'] end @@ -230,6 +240,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && aid == o.aid && + alert_ids == o.alert_ids && cid == o.cid && date_created == o.date_created && date_updated == o.date_updated && @@ -257,7 +268,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [aid, cid, date_created, date_updated, detect_ids, extracted, hostname, id, is_on_removable_disk, paths, primary_module, release_path_for_removable_media, sandbox_report_id, sandbox_report_state, sha256, state, username].hash + [aid, alert_ids, cid, date_created, date_updated, detect_ids, extracted, hostname, id, is_on_removable_disk, paths, primary_module, release_path_for_removable_media, sandbox_report_id, sandbox_report_state, sha256, state, username].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 d77324ab..ef928366 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 :environment + attr_accessor :iam_role_arn attr_accessor :remediation_region @@ -52,6 +54,7 @@ def self.attribute_map :'account_id' => :'account_id', :'behavior_assessment_enabled' => :'behavior_assessment_enabled', :'cloudtrail_region' => :'cloudtrail_region', + :'environment' => :'environment', :'iam_role_arn' => :'iam_role_arn', :'remediation_region' => :'remediation_region', :'remediation_tou_accepted' => :'remediation_tou_accepted', @@ -70,6 +73,7 @@ def self.openapi_types :'account_id' => :'String', :'behavior_assessment_enabled' => :'Boolean', :'cloudtrail_region' => :'String', + :'environment' => :'String', :'iam_role_arn' => :'String', :'remediation_region' => :'String', :'remediation_tou_accepted' => :'Time', @@ -110,6 +114,10 @@ def initialize(attributes = {}) self.cloudtrail_region = attributes[:'cloudtrail_region'] end + if attributes.key?(:'environment') + self.environment = attributes[:'environment'] + end + if attributes.key?(:'iam_role_arn') self.iam_role_arn = attributes[:'iam_role_arn'] end @@ -158,6 +166,7 @@ def ==(o) account_id == o.account_id && behavior_assessment_enabled == o.behavior_assessment_enabled && cloudtrail_region == o.cloudtrail_region && + environment == o.environment && iam_role_arn == o.iam_role_arn && remediation_region == o.remediation_region && remediation_tou_accepted == o.remediation_tou_accepted && @@ -173,7 +182,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [account_id, behavior_assessment_enabled, cloudtrail_region, iam_role_arn, remediation_region, remediation_tou_accepted, sensor_management_enabled].hash + [account_id, behavior_assessment_enabled, cloudtrail_region, environment, iam_role_arn, remediation_region, remediation_tou_accepted, sensor_management_enabled].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/registration_azure_account_patch.rb b/lib/crimson-falcon/models/registration_azure_account_patch.rb new file mode 100644 index 00000000..ff8422fb --- /dev/null +++ b/lib/crimson-falcon/models/registration_azure_account_patch.rb @@ -0,0 +1,248 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 RegistrationAzureAccountPatch + attr_accessor :environment + + attr_accessor :subscription_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'environment' => :'environment', + :'subscription_id' => :'subscription_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 + { + :'environment' => :'String', + :'subscription_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::RegistrationAzureAccountPatch` 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::RegistrationAzureAccountPatch`. 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?(:'environment') + self.environment = attributes[:'environment'] + end + + if attributes.key?(:'subscription_id') + self.subscription_id = attributes[:'subscription_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 @subscription_id.nil? + invalid_properties.push('invalid value for "subscription_id", subscription_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 @subscription_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 && + environment == o.environment && + subscription_id == o.subscription_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 + [environment, subscription_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/registration_azure_account_patch_request.rb b/lib/crimson-falcon/models/registration_azure_account_patch_request.rb new file mode 100644 index 00000000..aceb3ab1 --- /dev/null +++ b/lib/crimson-falcon/models/registration_azure_account_patch_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 RegistrationAzureAccountPatchRequest + 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::RegistrationAzureAccountPatchRequest` 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::RegistrationAzureAccountPatchRequest`. 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/registration_azure_account_v1_ext.rb b/lib/crimson-falcon/models/registration_azure_account_v1_ext.rb index 829d92d3..85879089 100644 --- a/lib/crimson-falcon/models/registration_azure_account_v1_ext.rb +++ b/lib/crimson-falcon/models/registration_azure_account_v1_ext.rb @@ -62,8 +62,15 @@ class RegistrationAzureAccountV1Ext attr_accessor :environment + # Is CSPM Lite enabled. + attr_accessor :is_cspm_lite + attr_accessor :object_id + attr_accessor :parent_management_group_id + + attr_accessor :parent_management_group_name + attr_accessor :public_certificate attr_accessor :public_certificate_raw @@ -104,7 +111,10 @@ def self.attribute_map :'credentials_type' => :'credentials_type', :'default_subscription_id' => :'default_subscription_id', :'environment' => :'environment', + :'is_cspm_lite' => :'is_cspm_lite', :'object_id' => :'object_id', + :'parent_management_group_id' => :'parent_management_group_id', + :'parent_management_group_name' => :'parent_management_group_name', :'public_certificate' => :'public_certificate', :'public_certificate_raw' => :'public_certificate_raw', :'role_assignments' => :'role_assignments', @@ -139,7 +149,10 @@ def self.openapi_types :'credentials_type' => :'String', :'default_subscription_id' => :'String', :'environment' => :'String', + :'is_cspm_lite' => :'Boolean', :'object_id' => :'String', + :'parent_management_group_id' => :'String', + :'parent_management_group_name' => :'String', :'public_certificate' => :'String', :'public_certificate_raw' => :'String', :'role_assignments' => :'Array', @@ -235,10 +248,22 @@ def initialize(attributes = {}) self.environment = attributes[:'environment'] end + if attributes.key?(:'is_cspm_lite') + self.is_cspm_lite = attributes[:'is_cspm_lite'] + end + if attributes.key?(:'object_id') self.object_id = attributes[:'object_id'] end + if attributes.key?(:'parent_management_group_id') + self.parent_management_group_id = attributes[:'parent_management_group_id'] + end + + if attributes.key?(:'parent_management_group_name') + self.parent_management_group_name = attributes[:'parent_management_group_name'] + end + if attributes.key?(:'public_certificate') self.public_certificate = attributes[:'public_certificate'] end @@ -345,7 +370,10 @@ def ==(o) credentials_type == o.credentials_type && default_subscription_id == o.default_subscription_id && environment == o.environment && + is_cspm_lite == o.is_cspm_lite && object_id == o.object_id && + parent_management_group_id == o.parent_management_group_id && + parent_management_group_name == o.parent_management_group_name && public_certificate == o.public_certificate && public_certificate_raw == o.public_certificate_raw && role_assignments == o.role_assignments && @@ -366,7 +394,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [created_at, deleted_at, id, updated_at, account_type, azure_permissions_status, cid, client_id, cloud_scopes, conditions, credentials_end_date, credentials_type, default_subscription_id, environment, object_id, public_certificate, public_certificate_raw, role_assignments, show_modal, status, subscription_id, subscription_name, tenant_id, years_valid].hash + [created_at, deleted_at, id, updated_at, account_type, azure_permissions_status, cid, client_id, cloud_scopes, conditions, credentials_end_date, credentials_type, default_subscription_id, environment, is_cspm_lite, object_id, parent_management_group_id, parent_management_group_name, public_certificate, public_certificate_raw, role_assignments, show_modal, status, subscription_id, subscription_name, tenant_id, years_valid].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/registration_azure_management_group_create_request_external_v1.rb b/lib/crimson-falcon/models/registration_azure_management_group_create_request_external_v1.rb new file mode 100644 index 00000000..67d2300e --- /dev/null +++ b/lib/crimson-falcon/models/registration_azure_management_group_create_request_external_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 RegistrationAzureManagementGroupCreateRequestExternalV1 + 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::RegistrationAzureManagementGroupCreateRequestExternalV1` 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::RegistrationAzureManagementGroupCreateRequestExternalV1`. 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/registration_azure_management_group_external_v1.rb b/lib/crimson-falcon/models/registration_azure_management_group_external_v1.rb new file mode 100644 index 00000000..3d7480db --- /dev/null +++ b/lib/crimson-falcon/models/registration_azure_management_group_external_v1.rb @@ -0,0 +1,249 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 RegistrationAzureManagementGroupExternalV1 + attr_accessor :default_subscription_id + + # Azure Tenant ID to use. + attr_accessor :tenant_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'default_subscription_id' => :'default_subscription_id', + :'tenant_id' => :'tenant_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 + { + :'default_subscription_id' => :'String', + :'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::RegistrationAzureManagementGroupExternalV1` 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::RegistrationAzureManagementGroupExternalV1`. 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_subscription_id') + self.default_subscription_id = attributes[:'default_subscription_id'] + end + + 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 && + default_subscription_id == o.default_subscription_id && + 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 + [default_subscription_id, 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/registration_azure_management_group_response_v1.rb b/lib/crimson-falcon/models/registration_azure_management_group_response_v1.rb new file mode 100644 index 00000000..7a700420 --- /dev/null +++ b/lib/crimson-falcon/models/registration_azure_management_group_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 RegistrationAzureManagementGroupResponseV1 + 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' => :'MsaspecMetaInfo', + :'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::RegistrationAzureManagementGroupResponseV1` 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::RegistrationAzureManagementGroupResponseV1`. 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/registration_azure_management_group_v1_ext.rb b/lib/crimson-falcon/models/registration_azure_management_group_v1_ext.rb new file mode 100644 index 00000000..d41ebaa9 --- /dev/null +++ b/lib/crimson-falcon/models/registration_azure_management_group_v1_ext.rb @@ -0,0 +1,452 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 RegistrationAzureManagementGroupV1Ext + attr_accessor :created_at + + attr_accessor :deleted_at + + attr_accessor :id + + attr_accessor :updated_at + + # Azure Management Group ID. + attr_accessor :azure_management_group_id + + # Azure Management Group Name. + attr_accessor :azure_management_group_name + + # Permissions status returned via API. + attr_accessor :azure_permissions_status + + attr_accessor :cid + + attr_accessor :client_id + + attr_accessor :conditions + + attr_accessor :credentials_end_date + + attr_accessor :credentials_type + + # Default Azure Subscription ID to provision shared IOA infrastructure. + attr_accessor :default_subscription_id + + attr_accessor :object_id + + attr_accessor :public_certificate + + attr_accessor :public_certificate_raw + + attr_accessor :role_assignments + + # Account registration status. + attr_accessor :status + + # Azure Tenant ID to use. + attr_accessor :tenant_id + + attr_accessor :years_valid + + # 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', + :'azure_management_group_id' => :'azure_management_group_id', + :'azure_management_group_name' => :'azure_management_group_name', + :'azure_permissions_status' => :'azure_permissions_status', + :'cid' => :'cid', + :'client_id' => :'client_id', + :'conditions' => :'conditions', + :'credentials_end_date' => :'credentials_end_date', + :'credentials_type' => :'credentials_type', + :'default_subscription_id' => :'default_subscription_id', + :'object_id' => :'object_id', + :'public_certificate' => :'public_certificate', + :'public_certificate_raw' => :'public_certificate_raw', + :'role_assignments' => :'role_assignments', + :'status' => :'status', + :'tenant_id' => :'tenant_id', + :'years_valid' => :'years_valid' + } + 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_at' => :'Time', + :'deleted_at' => :'Time', + :'id' => :'Integer', + :'updated_at' => :'Time', + :'azure_management_group_id' => :'String', + :'azure_management_group_name' => :'String', + :'azure_permissions_status' => :'Array', + :'cid' => :'String', + :'client_id' => :'String', + :'conditions' => :'Array', + :'credentials_end_date' => :'Time', + :'credentials_type' => :'String', + :'default_subscription_id' => :'String', + :'object_id' => :'String', + :'public_certificate' => :'String', + :'public_certificate_raw' => :'String', + :'role_assignments' => :'Array', + :'status' => :'String', + :'tenant_id' => :'String', + :'years_valid' => :'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::RegistrationAzureManagementGroupV1Ext` 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::RegistrationAzureManagementGroupV1Ext`. 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_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?(:'azure_management_group_id') + self.azure_management_group_id = attributes[:'azure_management_group_id'] + end + + if attributes.key?(:'azure_management_group_name') + self.azure_management_group_name = attributes[:'azure_management_group_name'] + end + + if attributes.key?(:'azure_permissions_status') + if (value = attributes[:'azure_permissions_status']).is_a?(Array) + self.azure_permissions_status = value + end + end + + if attributes.key?(:'cid') + self.cid = attributes[:'cid'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Array) + self.conditions = value + end + end + + if attributes.key?(:'credentials_end_date') + self.credentials_end_date = attributes[:'credentials_end_date'] + end + + if attributes.key?(:'credentials_type') + self.credentials_type = attributes[:'credentials_type'] + end + + if attributes.key?(:'default_subscription_id') + self.default_subscription_id = attributes[:'default_subscription_id'] + end + + if attributes.key?(:'object_id') + self.object_id = attributes[:'object_id'] + end + + if attributes.key?(:'public_certificate') + self.public_certificate = attributes[:'public_certificate'] + end + + if attributes.key?(:'public_certificate_raw') + self.public_certificate_raw = attributes[:'public_certificate_raw'] + end + + if attributes.key?(:'role_assignments') + if (value = attributes[:'role_assignments']).is_a?(Array) + self.role_assignments = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + + if attributes.key?(:'years_valid') + self.years_valid = attributes[:'years_valid'] + 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_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 + + if @azure_management_group_id.nil? + invalid_properties.push('invalid value for "azure_management_group_id", azure_management_group_id cannot be nil.') + end + + 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 + + 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? + return false if @azure_management_group_id.nil? + return false if @cid.nil? + 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 && + created_at == o.created_at && + deleted_at == o.deleted_at && + id == o.id && + updated_at == o.updated_at && + azure_management_group_id == o.azure_management_group_id && + azure_management_group_name == o.azure_management_group_name && + azure_permissions_status == o.azure_permissions_status && + cid == o.cid && + client_id == o.client_id && + conditions == o.conditions && + credentials_end_date == o.credentials_end_date && + credentials_type == o.credentials_type && + default_subscription_id == o.default_subscription_id && + object_id == o.object_id && + public_certificate == o.public_certificate && + public_certificate_raw == o.public_certificate_raw && + role_assignments == o.role_assignments && + status == o.status && + tenant_id == o.tenant_id && + years_valid == o.years_valid + 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_at, deleted_at, id, updated_at, azure_management_group_id, azure_management_group_name, azure_permissions_status, cid, client_id, conditions, credentials_end_date, credentials_type, default_subscription_id, object_id, public_certificate, public_certificate_raw, role_assignments, status, tenant_id, years_valid].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/registration_gcp_account_ext_request_v2.rb b/lib/crimson-falcon/models/registration_gcp_account_ext_request_v2.rb new file mode 100644 index 00000000..083e3d07 --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_account_ext_request_v2.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 RegistrationGCPAccountExtRequestV2 + 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::RegistrationGCPAccountExtRequestV2` 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::RegistrationGCPAccountExtRequestV2`. 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/registration_gcp_account_patch.rb b/lib/crimson-falcon/models/registration_gcp_account_patch.rb new file mode 100644 index 00000000..d6ea102e --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_account_patch.rb @@ -0,0 +1,248 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 RegistrationGCPAccountPatch + attr_accessor :environment + + attr_accessor :parent_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'environment' => :'environment', + :'parent_id' => :'parent_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 + { + :'environment' => :'String', + :'parent_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::RegistrationGCPAccountPatch` 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::RegistrationGCPAccountPatch`. 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?(:'environment') + self.environment = attributes[:'environment'] + end + + if attributes.key?(:'parent_id') + self.parent_id = attributes[:'parent_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 @parent_id.nil? + invalid_properties.push('invalid value for "parent_id", parent_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 @parent_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 && + environment == o.environment && + parent_id == o.parent_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 + [environment, parent_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/registration_gcp_account_patch_request.rb b/lib/crimson-falcon/models/registration_gcp_account_patch_request.rb new file mode 100644 index 00000000..964292f4 --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_account_patch_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 RegistrationGCPAccountPatchRequest + 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::RegistrationGCPAccountPatchRequest` 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::RegistrationGCPAccountPatchRequest`. 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/registration_gcp_account_req_obj_v2.rb b/lib/crimson-falcon/models/registration_gcp_account_req_obj_v2.rb new file mode 100644 index 00000000..bd383ce0 --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_account_req_obj_v2.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 RegistrationGCPAccountReqObjV2 + attr_accessor :client_email + + attr_accessor :client_id + + attr_accessor :parent_id + + attr_accessor :parent_type + + attr_accessor :private_key + + attr_accessor :private_key_id + + attr_accessor :project_id + + attr_accessor :service_account_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_email' => :'client_email', + :'client_id' => :'client_id', + :'parent_id' => :'parent_id', + :'parent_type' => :'parent_type', + :'private_key' => :'private_key', + :'private_key_id' => :'private_key_id', + :'project_id' => :'project_id', + :'service_account_id' => :'service_account_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 + { + :'client_email' => :'String', + :'client_id' => :'String', + :'parent_id' => :'String', + :'parent_type' => :'String', + :'private_key' => :'String', + :'private_key_id' => :'String', + :'project_id' => :'String', + :'service_account_id' => :'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::RegistrationGCPAccountReqObjV2` 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::RegistrationGCPAccountReqObjV2`. 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?(:'client_email') + self.client_email = attributes[:'client_email'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'parent_id') + self.parent_id = attributes[:'parent_id'] + end + + if attributes.key?(:'parent_type') + self.parent_type = attributes[:'parent_type'] + end + + if attributes.key?(:'private_key') + self.private_key = attributes[:'private_key'] + end + + if attributes.key?(:'private_key_id') + self.private_key_id = attributes[:'private_key_id'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'service_account_id') + self.service_account_id = attributes[:'service_account_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 @parent_id.nil? + invalid_properties.push('invalid value for "parent_id", parent_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 @parent_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 && + client_email == o.client_email && + client_id == o.client_id && + parent_id == o.parent_id && + parent_type == o.parent_type && + private_key == o.private_key && + private_key_id == o.private_key_id && + project_id == o.project_id && + service_account_id == o.service_account_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 + [client_email, client_id, parent_id, parent_type, private_key, private_key_id, project_id, service_account_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/registration_gcp_account_response_ext_v2.rb b/lib/crimson-falcon/models/registration_gcp_account_response_ext_v2.rb new file mode 100644 index 00000000..c2cf5928 --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_account_response_ext_v2.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 RegistrationGCPAccountResponseExtV2 + 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' => :'MsaspecMetaInfo', + :'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::RegistrationGCPAccountResponseExtV2` 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::RegistrationGCPAccountResponseExtV2`. 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/registration_gcp_account_rsp_obj_v2.rb b/lib/crimson-falcon/models/registration_gcp_account_rsp_obj_v2.rb new file mode 100644 index 00000000..1f1f56a5 --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_account_rsp_obj_v2.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 RegistrationGCPAccountRspObjV2 + attr_accessor :client_email + + attr_accessor :client_id + + attr_accessor :parent_id + + attr_accessor :parent_type + + attr_accessor :project_id + + attr_accessor :service_account_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_email' => :'client_email', + :'client_id' => :'client_id', + :'parent_id' => :'parent_id', + :'parent_type' => :'parent_type', + :'project_id' => :'project_id', + :'service_account_id' => :'service_account_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 + { + :'client_email' => :'String', + :'client_id' => :'String', + :'parent_id' => :'String', + :'parent_type' => :'String', + :'project_id' => :'String', + :'service_account_id' => :'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::RegistrationGCPAccountRspObjV2` 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::RegistrationGCPAccountRspObjV2`. 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?(:'client_email') + self.client_email = attributes[:'client_email'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'parent_id') + self.parent_id = attributes[:'parent_id'] + end + + if attributes.key?(:'parent_type') + self.parent_type = attributes[:'parent_type'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'service_account_id') + self.service_account_id = attributes[:'service_account_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 @parent_id.nil? + invalid_properties.push('invalid value for "parent_id", parent_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 @parent_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 && + client_email == o.client_email && + client_id == o.client_id && + parent_id == o.parent_id && + parent_type == o.parent_type && + project_id == o.project_id && + service_account_id == o.service_account_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 + [client_email, client_id, parent_id, parent_type, project_id, service_account_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/registration_gcp_service_account_ext_v1.rb b/lib/crimson-falcon/models/registration_gcp_service_account_ext_v1.rb new file mode 100644 index 00000000..e77dd358 --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_service_account_ext_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 RegistrationGCPServiceAccountExtV1 + attr_accessor :client_email + + attr_accessor :client_id + + attr_accessor :project_id + + attr_accessor :service_account_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'client_email' => :'client_email', + :'client_id' => :'client_id', + :'project_id' => :'project_id', + :'service_account_id' => :'service_account_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 + { + :'client_email' => :'String', + :'client_id' => :'String', + :'project_id' => :'String', + :'service_account_id' => :'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::RegistrationGCPServiceAccountExtV1` 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::RegistrationGCPServiceAccountExtV1`. 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?(:'client_email') + self.client_email = attributes[:'client_email'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'service_account_id') + self.service_account_id = attributes[:'service_account_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 && + client_email == o.client_email && + client_id == o.client_id && + project_id == o.project_id && + service_account_id == o.service_account_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 + [client_email, client_id, project_id, service_account_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/registration_gcp_service_account_response_ext_v1.rb b/lib/crimson-falcon/models/registration_gcp_service_account_response_ext_v1.rb new file mode 100644 index 00000000..f7c29aa2 --- /dev/null +++ b/lib/crimson-falcon/models/registration_gcp_service_account_response_ext_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 RegistrationGCPServiceAccountResponseExtV1 + 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' => :'MsaspecMetaInfo', + :'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::RegistrationGCPServiceAccountResponseExtV1` 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::RegistrationGCPServiceAccountResponseExtV1`. 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/registration_iom_event_id_response_meta.rb b/lib/crimson-falcon/models/registration_iom_event_id_response_meta.rb new file mode 100644 index 00000000..72dfb519 --- /dev/null +++ b/lib/crimson-falcon/models/registration_iom_event_id_response_meta.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 RegistrationIOMEventIDResponseMeta + 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' => :'RegistrationNextTokenPagination', + :'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::RegistrationIOMEventIDResponseMeta` 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::RegistrationIOMEventIDResponseMeta`. 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 @pagination.nil? + invalid_properties.push('invalid value for "pagination", pagination cannot be nil.') + end + + if @powered_by.nil? + invalid_properties.push('invalid value for "powered_by", powered_by cannot be nil.') + end + + 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 @pagination.nil? + return false if @powered_by.nil? + 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/registration_iom_event_ids_response_v2.rb b/lib/crimson-falcon/models/registration_iom_event_ids_response_v2.rb index bd06ec1d..1fa52db3 100644 --- a/lib/crimson-falcon/models/registration_iom_event_ids_response_v2.rb +++ b/lib/crimson-falcon/models/registration_iom_event_ids_response_v2.rb @@ -56,7 +56,7 @@ def self.acceptable_attributes def self.openapi_types { :'errors' => :'Array', - :'meta' => :'RegistrationMSASpecMetaInfoExtension', + :'meta' => :'RegistrationIOMEventIDResponseMeta', :'resources' => :'Array' } end diff --git a/lib/crimson-falcon/models/registration_iom_event_v2.rb b/lib/crimson-falcon/models/registration_iom_event_v2.rb index 2ddf9997..82050c01 100644 --- a/lib/crimson-falcon/models/registration_iom_event_v2.rb +++ b/lib/crimson-falcon/models/registration_iom_event_v2.rb @@ -52,6 +52,8 @@ class RegistrationIOMEventV2 attr_accessor :finding + attr_accessor :findings + attr_accessor :id attr_accessor :is_managed @@ -105,6 +107,7 @@ def self.attribute_map :'cloud_scopes' => :'cloud_scopes', :'custom_policy_id' => :'custom_policy_id', :'finding' => :'finding', + :'findings' => :'findings', :'id' => :'id', :'is_managed' => :'is_managed', :'policy_id' => :'policy_id', @@ -146,6 +149,7 @@ def self.openapi_types :'cloud_scopes' => :'Array', :'custom_policy_id' => :'Integer', :'finding' => :'Object', + :'findings' => :'Array', :'id' => :'String', :'is_managed' => :'Boolean', :'policy_id' => :'Integer', @@ -234,6 +238,12 @@ def initialize(attributes = {}) self.finding = attributes[:'finding'] end + if attributes.key?(:'findings') + if (value = attributes[:'findings']).is_a?(Array) + self.findings = value + end + end + if attributes.key?(:'id') self.id = attributes[:'id'] end @@ -341,6 +351,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "finding", finding cannot be nil.') end + if @findings.nil? + invalid_properties.push('invalid value for "findings", findings cannot be nil.') + end + if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end @@ -412,6 +426,7 @@ def valid? return false if @cid.nil? return false if @cloud_provider.nil? return false if @finding.nil? + return false if @findings.nil? return false if @id.nil? return false if @policy_statement.nil? return false if @region.nil? @@ -445,6 +460,7 @@ def ==(o) cloud_scopes == o.cloud_scopes && custom_policy_id == o.custom_policy_id && finding == o.finding && + findings == o.findings && id == o.id && is_managed == o.is_managed && policy_id == o.policy_id && @@ -476,7 +492,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, 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, 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/registration_next_token_pagination.rb b/lib/crimson-falcon/models/registration_next_token_pagination.rb new file mode 100644 index 00000000..4b500029 --- /dev/null +++ b/lib/crimson-falcon/models/registration_next_token_pagination.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 RegistrationNextTokenPagination + attr_accessor :limit + + attr_accessor :next_token + + attr_accessor :offset + + attr_accessor :total + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'limit' => :'limit', + :'next_token' => :'next_token', + :'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', + :'next_token' => :'String', + :'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::RegistrationNextTokenPagination` 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::RegistrationNextTokenPagination`. 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?(:'next_token') + self.next_token = attributes[:'next_token'] + 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 + + 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? + 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 && + next_token == o.next_token && + 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, next_token, 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/rulegroups_assigned_rule.rb b/lib/crimson-falcon/models/rulegroups_assigned_rule.rb new file mode 100644 index 00000000..1670c121 --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_assigned_rule.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 RulegroupsAssignedRule + attr_accessor :href + + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'id' => :'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 + { + :'href' => :'String', + :'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::RulegroupsAssignedRule` 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::RulegroupsAssignedRule`. 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?(:'href') + self.href = attributes[:'href'] + end + + if attributes.key?(:'id') + self.id = attributes[:'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 @href.nil? + invalid_properties.push('invalid value for "href", href cannot be nil.') + end + + 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 @href.nil? + 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 && + href == o.href && + id == o.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 + [href, 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/rulegroups_create_request.rb b/lib/crimson-falcon/models/rulegroups_create_request.rb new file mode 100644 index 00000000..e1569a51 --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_create_request.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 RulegroupsCreateRequest + attr_accessor :description + + attr_accessor :name + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'type' => :'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 + { + :'description' => :'String', + :'name' => :'String', + :'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::RulegroupsCreateRequest` 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::RulegroupsCreateRequest`. 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?(:'type') + self.type = attributes[:'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 + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @type.nil? + invalid_properties.push('invalid value for "type", type 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 @type.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 && + type == o.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 + [description, name, 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/rulegroups_delete_response.rb b/lib/crimson-falcon/models/rulegroups_delete_response.rb new file mode 100644 index 00000000..7ff29685 --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_delete_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 RulegroupsDeleteResponse + 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' => :'MsaspecMetaInfo', + :'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::RulegroupsDeleteResponse` 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::RulegroupsDeleteResponse`. 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/rulegroups_policy_assignment.rb b/lib/crimson-falcon/models/rulegroups_policy_assignment.rb new file mode 100644 index 00000000..aec0563c --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_policy_assignment.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 RulegroupsPolicyAssignment + attr_accessor :href + + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'href' => :'href', + :'id' => :'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 + { + :'href' => :'String', + :'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::RulegroupsPolicyAssignment` 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::RulegroupsPolicyAssignment`. 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?(:'href') + self.href = attributes[:'href'] + end + + if attributes.key?(:'id') + self.id = attributes[:'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 @href.nil? + invalid_properties.push('invalid value for "href", href cannot be nil.') + end + + 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 @href.nil? + 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 && + href == o.href && + id == o.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 + [href, 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/rulegroups_response.rb b/lib/crimson-falcon/models/rulegroups_response.rb new file mode 100644 index 00000000..2fbb0744 --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_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 RulegroupsResponse + 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' => :'MsaspecMetaInfo', + :'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::RulegroupsResponse` 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::RulegroupsResponse`. 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/rulegroups_rule.rb b/lib/crimson-falcon/models/rulegroups_rule.rb new file mode 100644 index 00000000..bf2bf1ce --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_rule.rb @@ -0,0 +1,579 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 RulegroupsRule + attr_accessor :content_files + + attr_accessor :content_registry_values + + attr_accessor :created_timestamp + + attr_accessor :depth + + attr_accessor :description + + attr_accessor :enable_content_capture + + attr_accessor :exclude + + attr_accessor :exclude_processes + + attr_accessor :exclude_users + + attr_accessor :id + + attr_accessor :include + + attr_accessor :include_processes + + attr_accessor :include_users + + attr_accessor :modified_timestamp + + attr_accessor :path + + attr_accessor :precedence + + attr_accessor :rule_group_id + + attr_accessor :severity + + attr_accessor :type + + attr_accessor :watch_attributes_directory_changes + + attr_accessor :watch_attributes_file_changes + + attr_accessor :watch_create_directory_changes + + attr_accessor :watch_create_file_changes + + attr_accessor :watch_create_key_changes + + attr_accessor :watch_delete_directory_changes + + attr_accessor :watch_delete_file_changes + + attr_accessor :watch_delete_key_changes + + attr_accessor :watch_delete_value_changes + + attr_accessor :watch_permissions_directory_changes + + attr_accessor :watch_permissions_file_changes + + attr_accessor :watch_rename_directory_changes + + attr_accessor :watch_rename_file_changes + + attr_accessor :watch_rename_key_changes + + attr_accessor :watch_set_value_changes + + attr_accessor :watch_write_file_changes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'content_files' => :'content_files', + :'content_registry_values' => :'content_registry_values', + :'created_timestamp' => :'created_timestamp', + :'depth' => :'depth', + :'description' => :'description', + :'enable_content_capture' => :'enable_content_capture', + :'exclude' => :'exclude', + :'exclude_processes' => :'exclude_processes', + :'exclude_users' => :'exclude_users', + :'id' => :'id', + :'include' => :'include', + :'include_processes' => :'include_processes', + :'include_users' => :'include_users', + :'modified_timestamp' => :'modified_timestamp', + :'path' => :'path', + :'precedence' => :'precedence', + :'rule_group_id' => :'rule_group_id', + :'severity' => :'severity', + :'type' => :'type', + :'watch_attributes_directory_changes' => :'watch_attributes_directory_changes', + :'watch_attributes_file_changes' => :'watch_attributes_file_changes', + :'watch_create_directory_changes' => :'watch_create_directory_changes', + :'watch_create_file_changes' => :'watch_create_file_changes', + :'watch_create_key_changes' => :'watch_create_key_changes', + :'watch_delete_directory_changes' => :'watch_delete_directory_changes', + :'watch_delete_file_changes' => :'watch_delete_file_changes', + :'watch_delete_key_changes' => :'watch_delete_key_changes', + :'watch_delete_value_changes' => :'watch_delete_value_changes', + :'watch_permissions_directory_changes' => :'watch_permissions_directory_changes', + :'watch_permissions_file_changes' => :'watch_permissions_file_changes', + :'watch_rename_directory_changes' => :'watch_rename_directory_changes', + :'watch_rename_file_changes' => :'watch_rename_file_changes', + :'watch_rename_key_changes' => :'watch_rename_key_changes', + :'watch_set_value_changes' => :'watch_set_value_changes', + :'watch_write_file_changes' => :'watch_write_file_changes' + } + 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_files' => :'Array', + :'content_registry_values' => :'Array', + :'created_timestamp' => :'String', + :'depth' => :'String', + :'description' => :'String', + :'enable_content_capture' => :'Boolean', + :'exclude' => :'String', + :'exclude_processes' => :'String', + :'exclude_users' => :'String', + :'id' => :'String', + :'include' => :'String', + :'include_processes' => :'String', + :'include_users' => :'String', + :'modified_timestamp' => :'String', + :'path' => :'String', + :'precedence' => :'Integer', + :'rule_group_id' => :'String', + :'severity' => :'String', + :'type' => :'String', + :'watch_attributes_directory_changes' => :'Boolean', + :'watch_attributes_file_changes' => :'Boolean', + :'watch_create_directory_changes' => :'Boolean', + :'watch_create_file_changes' => :'Boolean', + :'watch_create_key_changes' => :'Boolean', + :'watch_delete_directory_changes' => :'Boolean', + :'watch_delete_file_changes' => :'Boolean', + :'watch_delete_key_changes' => :'Boolean', + :'watch_delete_value_changes' => :'Boolean', + :'watch_permissions_directory_changes' => :'Boolean', + :'watch_permissions_file_changes' => :'Boolean', + :'watch_rename_directory_changes' => :'Boolean', + :'watch_rename_file_changes' => :'Boolean', + :'watch_rename_key_changes' => :'Boolean', + :'watch_set_value_changes' => :'Boolean', + :'watch_write_file_changes' => :'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::RulegroupsRule` 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::RulegroupsRule`. 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_files') + if (value = attributes[:'content_files']).is_a?(Array) + self.content_files = value + end + end + + if attributes.key?(:'content_registry_values') + if (value = attributes[:'content_registry_values']).is_a?(Array) + self.content_registry_values = value + end + end + + if attributes.key?(:'created_timestamp') + self.created_timestamp = attributes[:'created_timestamp'] + end + + if attributes.key?(:'depth') + self.depth = attributes[:'depth'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'enable_content_capture') + self.enable_content_capture = attributes[:'enable_content_capture'] + end + + if attributes.key?(:'exclude') + self.exclude = attributes[:'exclude'] + end + + if attributes.key?(:'exclude_processes') + self.exclude_processes = attributes[:'exclude_processes'] + end + + if attributes.key?(:'exclude_users') + self.exclude_users = attributes[:'exclude_users'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'include_processes') + self.include_processes = attributes[:'include_processes'] + end + + if attributes.key?(:'include_users') + self.include_users = attributes[:'include_users'] + end + + if attributes.key?(:'modified_timestamp') + self.modified_timestamp = attributes[:'modified_timestamp'] + end + + if attributes.key?(:'path') + self.path = attributes[:'path'] + end + + if attributes.key?(:'precedence') + self.precedence = attributes[:'precedence'] + end + + if attributes.key?(:'rule_group_id') + self.rule_group_id = attributes[:'rule_group_id'] + end + + if attributes.key?(:'severity') + self.severity = attributes[:'severity'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'watch_attributes_directory_changes') + self.watch_attributes_directory_changes = attributes[:'watch_attributes_directory_changes'] + end + + if attributes.key?(:'watch_attributes_file_changes') + self.watch_attributes_file_changes = attributes[:'watch_attributes_file_changes'] + end + + if attributes.key?(:'watch_create_directory_changes') + self.watch_create_directory_changes = attributes[:'watch_create_directory_changes'] + end + + if attributes.key?(:'watch_create_file_changes') + self.watch_create_file_changes = attributes[:'watch_create_file_changes'] + end + + if attributes.key?(:'watch_create_key_changes') + self.watch_create_key_changes = attributes[:'watch_create_key_changes'] + end + + if attributes.key?(:'watch_delete_directory_changes') + self.watch_delete_directory_changes = attributes[:'watch_delete_directory_changes'] + end + + if attributes.key?(:'watch_delete_file_changes') + self.watch_delete_file_changes = attributes[:'watch_delete_file_changes'] + end + + if attributes.key?(:'watch_delete_key_changes') + self.watch_delete_key_changes = attributes[:'watch_delete_key_changes'] + end + + if attributes.key?(:'watch_delete_value_changes') + self.watch_delete_value_changes = attributes[:'watch_delete_value_changes'] + end + + if attributes.key?(:'watch_permissions_directory_changes') + self.watch_permissions_directory_changes = attributes[:'watch_permissions_directory_changes'] + end + + if attributes.key?(:'watch_permissions_file_changes') + self.watch_permissions_file_changes = attributes[:'watch_permissions_file_changes'] + end + + if attributes.key?(:'watch_rename_directory_changes') + self.watch_rename_directory_changes = attributes[:'watch_rename_directory_changes'] + end + + if attributes.key?(:'watch_rename_file_changes') + self.watch_rename_file_changes = attributes[:'watch_rename_file_changes'] + end + + if attributes.key?(:'watch_rename_key_changes') + self.watch_rename_key_changes = attributes[:'watch_rename_key_changes'] + end + + if attributes.key?(:'watch_set_value_changes') + self.watch_set_value_changes = attributes[:'watch_set_value_changes'] + end + + if attributes.key?(:'watch_write_file_changes') + self.watch_write_file_changes = attributes[:'watch_write_file_changes'] + 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 @depth.nil? + invalid_properties.push('invalid value for "depth", depth cannot be nil.') + end + + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + if @include.nil? + invalid_properties.push('invalid value for "include", include cannot be nil.') + end + + if @path.nil? + invalid_properties.push('invalid value for "path", path cannot be nil.') + end + + if @rule_group_id.nil? + invalid_properties.push('invalid value for "rule_group_id", rule_group_id 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 + + 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 @depth.nil? + return false if @id.nil? + return false if @include.nil? + return false if @path.nil? + return false if @rule_group_id.nil? + return false if @severity.nil? + return false if @type.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_files == o.content_files && + content_registry_values == o.content_registry_values && + created_timestamp == o.created_timestamp && + depth == o.depth && + description == o.description && + enable_content_capture == o.enable_content_capture && + exclude == o.exclude && + exclude_processes == o.exclude_processes && + exclude_users == o.exclude_users && + id == o.id && + include == o.include && + include_processes == o.include_processes && + include_users == o.include_users && + modified_timestamp == o.modified_timestamp && + path == o.path && + precedence == o.precedence && + rule_group_id == o.rule_group_id && + severity == o.severity && + type == o.type && + watch_attributes_directory_changes == o.watch_attributes_directory_changes && + watch_attributes_file_changes == o.watch_attributes_file_changes && + watch_create_directory_changes == o.watch_create_directory_changes && + watch_create_file_changes == o.watch_create_file_changes && + watch_create_key_changes == o.watch_create_key_changes && + watch_delete_directory_changes == o.watch_delete_directory_changes && + watch_delete_file_changes == o.watch_delete_file_changes && + watch_delete_key_changes == o.watch_delete_key_changes && + watch_delete_value_changes == o.watch_delete_value_changes && + watch_permissions_directory_changes == o.watch_permissions_directory_changes && + watch_permissions_file_changes == o.watch_permissions_file_changes && + watch_rename_directory_changes == o.watch_rename_directory_changes && + watch_rename_file_changes == o.watch_rename_file_changes && + watch_rename_key_changes == o.watch_rename_key_changes && + watch_set_value_changes == o.watch_set_value_changes && + watch_write_file_changes == o.watch_write_file_changes + 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_files, content_registry_values, created_timestamp, depth, description, enable_content_capture, exclude, exclude_processes, exclude_users, id, include, include_processes, include_users, modified_timestamp, path, precedence, rule_group_id, severity, type, watch_attributes_directory_changes, watch_attributes_file_changes, watch_create_directory_changes, watch_create_file_changes, watch_create_key_changes, watch_delete_directory_changes, watch_delete_file_changes, watch_delete_key_changes, watch_delete_value_changes, watch_permissions_directory_changes, watch_permissions_file_changes, watch_rename_directory_changes, watch_rename_file_changes, watch_rename_key_changes, watch_set_value_changes, watch_write_file_changes].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/rulegroups_rule_group.rb b/lib/crimson-falcon/models/rulegroups_rule_group.rb new file mode 100644 index 00000000..598361d4 --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_rule_group.rb @@ -0,0 +1,324 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 RulegroupsRuleGroup + attr_accessor :assigned_rules + + attr_accessor :created_by + + attr_accessor :created_timestamp + + attr_accessor :description + + attr_accessor :id + + attr_accessor :modified_by + + attr_accessor :modified_timestamp + + attr_accessor :name + + attr_accessor :policy_assignments + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'assigned_rules' => :'assigned_rules', + :'created_by' => :'created_by', + :'created_timestamp' => :'created_timestamp', + :'description' => :'description', + :'id' => :'id', + :'modified_by' => :'modified_by', + :'modified_timestamp' => :'modified_timestamp', + :'name' => :'name', + :'policy_assignments' => :'policy_assignments', + :'type' => :'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 + { + :'assigned_rules' => :'Array', + :'created_by' => :'String', + :'created_timestamp' => :'String', + :'description' => :'String', + :'id' => :'String', + :'modified_by' => :'String', + :'modified_timestamp' => :'String', + :'name' => :'String', + :'policy_assignments' => :'Array', + :'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::RulegroupsRuleGroup` 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::RulegroupsRuleGroup`. 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?(:'assigned_rules') + if (value = attributes[:'assigned_rules']).is_a?(Array) + self.assigned_rules = value + end + 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?(:'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?(:'policy_assignments') + if (value = attributes[:'policy_assignments']).is_a?(Array) + self.policy_assignments = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'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 + 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 && + assigned_rules == o.assigned_rules && + created_by == o.created_by && + created_timestamp == o.created_timestamp && + description == o.description && + id == o.id && + modified_by == o.modified_by && + modified_timestamp == o.modified_timestamp && + name == o.name && + policy_assignments == o.policy_assignments && + type == o.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 + [assigned_rules, created_by, created_timestamp, description, id, modified_by, modified_timestamp, name, policy_assignments, 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/rulegroups_rules_response.rb b/lib/crimson-falcon/models/rulegroups_rules_response.rb new file mode 100644 index 00000000..99e7d219 --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_rules_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 RulegroupsRulesResponse + 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' => :'MsaspecMetaInfo', + :'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::RulegroupsRulesResponse` 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::RulegroupsRulesResponse`. 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/rulegroups_update_request.rb b/lib/crimson-falcon/models/rulegroups_update_request.rb new file mode 100644 index 00000000..faf18dbd --- /dev/null +++ b/lib/crimson-falcon/models/rulegroups_update_request.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 RulegroupsUpdateRequest + attr_accessor :description + + attr_accessor :id + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'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 + { + :'description' => :'String', + :'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::RulegroupsUpdateRequest` 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::RulegroupsUpdateRequest`. 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 + 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 && + description == o.description && + 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 + [description, 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/runtimedetections_detections_entity_response.rb b/lib/crimson-falcon/models/runtimedetections_detections_entity_response.rb new file mode 100644 index 00000000..36abc31f --- /dev/null +++ b/lib/crimson-falcon/models/runtimedetections_detections_entity_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 RuntimedetectionsDetectionsEntityResponse + 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' => :'MsaspecMetaInfo', + :'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::RuntimedetectionsDetectionsEntityResponse` 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::RuntimedetectionsDetectionsEntityResponse`. 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/sadomain_submit_for_blocking_info.rb b/lib/crimson-falcon/models/sadomain_submission_information.rb similarity index 98% rename from lib/crimson-falcon/models/sadomain_submit_for_blocking_info.rb rename to lib/crimson-falcon/models/sadomain_submission_information.rb index cebde7fb..3c5829c0 100644 --- a/lib/crimson-falcon/models/sadomain_submit_for_blocking_info.rb +++ b/lib/crimson-falcon/models/sadomain_submission_information.rb @@ -31,7 +31,7 @@ require 'time' module Falcon - class SadomainSubmitForBlockingInfo + class SadomainSubmissionInformation attr_accessor :date attr_accessor :status @@ -71,13 +71,13 @@ 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::SadomainSubmitForBlockingInfo` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::SadomainSubmissionInformation` 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::SadomainSubmitForBlockingInfo`. 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::SadomainSubmissionInformation`. 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 } diff --git a/lib/crimson-falcon/models/sadomain_typosquatting_component.rb b/lib/crimson-falcon/models/sadomain_typosquatting_component.rb index 28c849f9..840bc320 100644 --- a/lib/crimson-falcon/models/sadomain_typosquatting_component.rb +++ b/lib/crimson-falcon/models/sadomain_typosquatting_component.rb @@ -44,6 +44,8 @@ class SadomainTyposquattingComponent attr_accessor :submit_for_blocking_info + attr_accessor :submit_for_takedown_info + # The Unicode representation of the infrastructure component attr_accessor :unicode_format @@ -55,6 +57,7 @@ def self.attribute_map :'parent_domain' => :'parent_domain', :'punycode_format' => :'punycode_format', :'submit_for_blocking_info' => :'submit_for_blocking_info', + :'submit_for_takedown_info' => :'submit_for_takedown_info', :'unicode_format' => :'unicode_format' } end @@ -71,7 +74,8 @@ def self.openapi_types :'id' => :'String', :'parent_domain' => :'SadomainTyposquattingParentDomain', :'punycode_format' => :'String', - :'submit_for_blocking_info' => :'SadomainSubmitForBlockingInfo', + :'submit_for_blocking_info' => :'SadomainSubmissionInformation', + :'submit_for_takedown_info' => :'SadomainSubmissionInformation', :'unicode_format' => :'String' } end @@ -117,6 +121,10 @@ def initialize(attributes = {}) 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 @@ -170,6 +178,7 @@ def ==(o) parent_domain == o.parent_domain && 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 end @@ -182,7 +191,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [base_domain, id, parent_domain, punycode_format, submit_for_blocking_info, unicode_format].hash + [base_domain, id, parent_domain, punycode_format, submit_for_blocking_info, submit_for_takedown_info, unicode_format].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/scheduledexclusions_create_request.rb b/lib/crimson-falcon/models/scheduledexclusions_create_request.rb new file mode 100644 index 00000000..92ca1efa --- /dev/null +++ b/lib/crimson-falcon/models/scheduledexclusions_create_request.rb @@ -0,0 +1,316 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ScheduledexclusionsCreateRequest + attr_accessor :description + + attr_accessor :name + + attr_accessor :policy_id + + attr_accessor :processes + + attr_accessor :repeated + + attr_accessor :schedule_end + + attr_accessor :schedule_start + + attr_accessor :timezone + + attr_accessor :users + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'name' => :'name', + :'policy_id' => :'policy_id', + :'processes' => :'processes', + :'repeated' => :'repeated', + :'schedule_end' => :'schedule_end', + :'schedule_start' => :'schedule_start', + :'timezone' => :'timezone', + :'users' => :'users' + } + 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', + :'policy_id' => :'String', + :'processes' => :'String', + :'repeated' => :'ScheduledexclusionsRepeated', + :'schedule_end' => :'String', + :'schedule_start' => :'String', + :'timezone' => :'String', + :'users' => :'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::ScheduledexclusionsCreateRequest` 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::ScheduledexclusionsCreateRequest`. 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?(:'policy_id') + self.policy_id = attributes[:'policy_id'] + end + + if attributes.key?(:'processes') + self.processes = attributes[:'processes'] + end + + if attributes.key?(:'repeated') + self.repeated = attributes[:'repeated'] + end + + if attributes.key?(:'schedule_end') + self.schedule_end = attributes[:'schedule_end'] + end + + if attributes.key?(:'schedule_start') + self.schedule_start = attributes[:'schedule_start'] + end + + if attributes.key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.key?(:'users') + self.users = attributes[:'users'] + 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 @timezone.nil? + invalid_properties.push('invalid value for "timezone", timezone 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 @timezone.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 && + policy_id == o.policy_id && + processes == o.processes && + repeated == o.repeated && + schedule_end == o.schedule_end && + schedule_start == o.schedule_start && + timezone == o.timezone && + users == o.users + 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, policy_id, processes, repeated, schedule_end, schedule_start, timezone, users].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/scheduledexclusions_repeated.rb b/lib/crimson-falcon/models/scheduledexclusions_repeated.rb new file mode 100644 index 00000000..ade01899 --- /dev/null +++ b/lib/crimson-falcon/models/scheduledexclusions_repeated.rb @@ -0,0 +1,292 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ScheduledexclusionsRepeated + attr_accessor :all_day + + attr_accessor :end_time + + attr_accessor :frequency + + attr_accessor :monthly_days + + attr_accessor :occurrence + + attr_accessor :start_time + + attr_accessor :weekly_days + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'all_day' => :'all_day', + :'end_time' => :'end_time', + :'frequency' => :'frequency', + :'monthly_days' => :'monthly_days', + :'occurrence' => :'occurrence', + :'start_time' => :'start_time', + :'weekly_days' => :'weekly_days' + } + 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 + { + :'all_day' => :'Boolean', + :'end_time' => :'String', + :'frequency' => :'String', + :'monthly_days' => :'Array', + :'occurrence' => :'String', + :'start_time' => :'String', + :'weekly_days' => :'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::ScheduledexclusionsRepeated` 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::ScheduledexclusionsRepeated`. 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?(:'all_day') + self.all_day = attributes[:'all_day'] + end + + if attributes.key?(:'end_time') + self.end_time = attributes[:'end_time'] + end + + if attributes.key?(:'frequency') + self.frequency = attributes[:'frequency'] + end + + if attributes.key?(:'monthly_days') + if (value = attributes[:'monthly_days']).is_a?(Array) + self.monthly_days = value + end + end + + if attributes.key?(:'occurrence') + self.occurrence = attributes[:'occurrence'] + end + + if attributes.key?(:'start_time') + self.start_time = attributes[:'start_time'] + end + + if attributes.key?(:'weekly_days') + if (value = attributes[:'weekly_days']).is_a?(Array) + self.weekly_days = 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 && + all_day == o.all_day && + end_time == o.end_time && + frequency == o.frequency && + monthly_days == o.monthly_days && + occurrence == o.occurrence && + start_time == o.start_time && + weekly_days == o.weekly_days + 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 + [all_day, end_time, frequency, monthly_days, occurrence, start_time, weekly_days].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/scheduledexclusions_response.rb b/lib/crimson-falcon/models/scheduledexclusions_response.rb new file mode 100644 index 00000000..17cc0794 --- /dev/null +++ b/lib/crimson-falcon/models/scheduledexclusions_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 ScheduledexclusionsResponse + 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' => :'MsaspecMetaInfo', + :'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::ScheduledexclusionsResponse` 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::ScheduledexclusionsResponse`. 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/scheduledexclusions_scheduled_exclusion.rb b/lib/crimson-falcon/models/scheduledexclusions_scheduled_exclusion.rb new file mode 100644 index 00000000..d615088b --- /dev/null +++ b/lib/crimson-falcon/models/scheduledexclusions_scheduled_exclusion.rb @@ -0,0 +1,348 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ScheduledexclusionsScheduledExclusion + attr_accessor :created_timestamp + + attr_accessor :description + + attr_accessor :id + + attr_accessor :modified_timestamp + + attr_accessor :name + + attr_accessor :policy_id + + attr_accessor :processes + + attr_accessor :repeated + + attr_accessor :schedule_end + + attr_accessor :schedule_start + + attr_accessor :timezone + + attr_accessor :users + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'created_timestamp' => :'created_timestamp', + :'description' => :'description', + :'id' => :'id', + :'modified_timestamp' => :'modified_timestamp', + :'name' => :'name', + :'policy_id' => :'policy_id', + :'processes' => :'processes', + :'repeated' => :'repeated', + :'schedule_end' => :'schedule_end', + :'schedule_start' => :'schedule_start', + :'timezone' => :'timezone', + :'users' => :'users' + } + 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_timestamp' => :'String', + :'description' => :'String', + :'id' => :'String', + :'modified_timestamp' => :'String', + :'name' => :'String', + :'policy_id' => :'String', + :'processes' => :'String', + :'repeated' => :'ScheduledexclusionsRepeated', + :'schedule_end' => :'String', + :'schedule_start' => :'String', + :'timezone' => :'String', + :'users' => :'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::ScheduledexclusionsScheduledExclusion` 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::ScheduledexclusionsScheduledExclusion`. 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_timestamp') + self.created_timestamp = attributes[:'created_timestamp'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + 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?(:'policy_id') + self.policy_id = attributes[:'policy_id'] + end + + if attributes.key?(:'processes') + self.processes = attributes[:'processes'] + end + + if attributes.key?(:'repeated') + self.repeated = attributes[:'repeated'] + end + + if attributes.key?(:'schedule_end') + self.schedule_end = attributes[:'schedule_end'] + end + + if attributes.key?(:'schedule_start') + self.schedule_start = attributes[:'schedule_start'] + end + + if attributes.key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.key?(:'users') + self.users = attributes[:'users'] + 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 + + if @timezone.nil? + invalid_properties.push('invalid value for "timezone", timezone 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? + return false if @timezone.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_timestamp == o.created_timestamp && + description == o.description && + id == o.id && + modified_timestamp == o.modified_timestamp && + name == o.name && + policy_id == o.policy_id && + processes == o.processes && + repeated == o.repeated && + schedule_end == o.schedule_end && + schedule_start == o.schedule_start && + timezone == o.timezone && + users == o.users + 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_timestamp, description, id, modified_timestamp, name, policy_id, processes, repeated, schedule_end, schedule_start, timezone, users].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/scheduledexclusions_update_request.rb b/lib/crimson-falcon/models/scheduledexclusions_update_request.rb new file mode 100644 index 00000000..cd0a1a02 --- /dev/null +++ b/lib/crimson-falcon/models/scheduledexclusions_update_request.rb @@ -0,0 +1,330 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 ScheduledexclusionsUpdateRequest + attr_accessor :description + + attr_accessor :id + + attr_accessor :name + + attr_accessor :policy_id + + attr_accessor :processes + + attr_accessor :repeated + + attr_accessor :schedule_end + + attr_accessor :schedule_start + + attr_accessor :timezone + + attr_accessor :users + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'description' => :'description', + :'id' => :'id', + :'name' => :'name', + :'policy_id' => :'policy_id', + :'processes' => :'processes', + :'repeated' => :'repeated', + :'schedule_end' => :'schedule_end', + :'schedule_start' => :'schedule_start', + :'timezone' => :'timezone', + :'users' => :'users' + } + 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', + :'policy_id' => :'String', + :'processes' => :'String', + :'repeated' => :'ScheduledexclusionsRepeated', + :'schedule_end' => :'String', + :'schedule_start' => :'String', + :'timezone' => :'String', + :'users' => :'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::ScheduledexclusionsUpdateRequest` 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::ScheduledexclusionsUpdateRequest`. 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?(:'policy_id') + self.policy_id = attributes[:'policy_id'] + end + + if attributes.key?(:'processes') + self.processes = attributes[:'processes'] + end + + if attributes.key?(:'repeated') + self.repeated = attributes[:'repeated'] + end + + if attributes.key?(:'schedule_end') + self.schedule_end = attributes[:'schedule_end'] + end + + if attributes.key?(:'schedule_start') + self.schedule_start = attributes[:'schedule_start'] + end + + if attributes.key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.key?(:'users') + self.users = attributes[:'users'] + 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 + + if @timezone.nil? + invalid_properties.push('invalid value for "timezone", timezone 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? + return false if @timezone.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 && + policy_id == o.policy_id && + processes == o.processes && + repeated == o.repeated && + schedule_end == o.schedule_end && + schedule_start == o.schedule_start && + timezone == o.timezone && + users == o.users + 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, policy_id, processes, repeated, schedule_end, schedule_start, timezone, users].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/sv_exclusions_create_req_v1.rb b/lib/crimson-falcon/models/sv_exclusions_create_req_v1.rb index 9e85a5a7..88fa1149 100644 --- a/lib/crimson-falcon/models/sv_exclusions_create_req_v1.rb +++ b/lib/crimson-falcon/models/sv_exclusions_create_req_v1.rb @@ -36,6 +36,8 @@ class SvExclusionsCreateReqV1 attr_accessor :groups + attr_accessor :is_descendant_process + attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. @@ -43,6 +45,7 @@ def self.attribute_map { :'comment' => :'comment', :'groups' => :'groups', + :'is_descendant_process' => :'is_descendant_process', :'value' => :'value' } end @@ -57,6 +60,7 @@ def self.openapi_types { :'comment' => :'String', :'groups' => :'Array', + :'is_descendant_process' => :'Boolean', :'value' => :'String' } end @@ -92,6 +96,10 @@ def initialize(attributes = {}) end end + if attributes.key?(:'is_descendant_process') + self.is_descendant_process = attributes[:'is_descendant_process'] + end + if attributes.key?(:'value') self.value = attributes[:'value'] end @@ -117,6 +125,7 @@ def ==(o) self.class == o.class && comment == o.comment && groups == o.groups && + is_descendant_process == o.is_descendant_process && value == o.value end @@ -129,7 +138,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [comment, groups, value].hash + [comment, groups, is_descendant_process, value].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/sv_exclusions_sv_exclusion_v1.rb b/lib/crimson-falcon/models/sv_exclusions_sv_exclusion_v1.rb index 2d68315e..0abf1ddb 100644 --- a/lib/crimson-falcon/models/sv_exclusions_sv_exclusion_v1.rb +++ b/lib/crimson-falcon/models/sv_exclusions_sv_exclusion_v1.rb @@ -42,6 +42,8 @@ class SvExclusionsSVExclusionV1 attr_accessor :id + attr_accessor :is_descendant_process + attr_accessor :last_modified attr_accessor :modified_by @@ -60,6 +62,7 @@ def self.attribute_map :'created_on' => :'created_on', :'groups' => :'groups', :'id' => :'id', + :'is_descendant_process' => :'is_descendant_process', :'last_modified' => :'last_modified', :'modified_by' => :'modified_by', :'regexp_value' => :'regexp_value', @@ -81,6 +84,7 @@ def self.openapi_types :'created_on' => :'Time', :'groups' => :'Array', :'id' => :'String', + :'is_descendant_process' => :'Boolean', :'last_modified' => :'Time', :'modified_by' => :'String', :'regexp_value' => :'String', @@ -132,6 +136,10 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'is_descendant_process') + self.is_descendant_process = attributes[:'is_descendant_process'] + end + if attributes.key?(:'last_modified') self.last_modified = attributes[:'last_modified'] end @@ -226,6 +234,7 @@ def ==(o) created_on == o.created_on && groups == o.groups && id == o.id && + is_descendant_process == o.is_descendant_process && last_modified == o.last_modified && modified_by == o.modified_by && regexp_value == o.regexp_value && @@ -242,7 +251,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [applied_globally, created_by, created_on, groups, id, last_modified, modified_by, regexp_value, value, value_hash].hash + [applied_globally, created_by, created_on, groups, id, is_descendant_process, last_modified, modified_by, regexp_value, value, value_hash].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/sv_exclusions_update_req_v1.rb b/lib/crimson-falcon/models/sv_exclusions_update_req_v1.rb index 0c830230..0af2c4ea 100644 --- a/lib/crimson-falcon/models/sv_exclusions_update_req_v1.rb +++ b/lib/crimson-falcon/models/sv_exclusions_update_req_v1.rb @@ -38,6 +38,8 @@ class SvExclusionsUpdateReqV1 attr_accessor :id + attr_accessor :is_descendant_process + attr_accessor :value # Attribute mapping from ruby-style variable name to JSON key. @@ -46,6 +48,7 @@ def self.attribute_map :'comment' => :'comment', :'groups' => :'groups', :'id' => :'id', + :'is_descendant_process' => :'is_descendant_process', :'value' => :'value' } end @@ -61,6 +64,7 @@ def self.openapi_types :'comment' => :'String', :'groups' => :'Array', :'id' => :'String', + :'is_descendant_process' => :'Boolean', :'value' => :'String' } end @@ -100,6 +104,10 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'is_descendant_process') + self.is_descendant_process = attributes[:'is_descendant_process'] + end + if attributes.key?(:'value') self.value = attributes[:'value'] end @@ -131,6 +139,7 @@ def ==(o) comment == o.comment && groups == o.groups && id == o.id && + is_descendant_process == o.is_descendant_process && value == o.value end @@ -143,7 +152,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [comment, groups, id, value].hash + [comment, groups, id, is_descendant_process, value].hash end # Builds the object from hash diff --git a/lib/crimson-falcon/models/unidentifiedcontainers_unidentified_container_api_response.rb b/lib/crimson-falcon/models/unidentifiedcontainers_unidentified_container_api_response.rb new file mode 100644 index 00000000..cf428de7 --- /dev/null +++ b/lib/crimson-falcon/models/unidentifiedcontainers_unidentified_container_api_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 UnidentifiedcontainersUnidentifiedContainerAPIResponse + 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' => :'MsaspecMetaInfo', + :'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::UnidentifiedcontainersUnidentifiedContainerAPIResponse` 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::UnidentifiedcontainersUnidentifiedContainerAPIResponse`. 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/unidentifiedcontainers_unidentified_containers_count_value.rb b/lib/crimson-falcon/models/unidentifiedcontainers_unidentified_containers_count_value.rb new file mode 100644 index 00000000..a557f53b --- /dev/null +++ b/lib/crimson-falcon/models/unidentifiedcontainers_unidentified_containers_count_value.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 UnidentifiedcontainersUnidentifiedContainersCountValue + attr_accessor :resources + + attr_accessor :errors + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'resources' => :'Resources', + :'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 + { + :'resources' => :'Array', + :'errors' => :'Array', + :'meta' => :'MsaspecMetaInfo' + } + 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::UnidentifiedcontainersUnidentifiedContainersCountValue` 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::UnidentifiedcontainersUnidentifiedContainersCountValue`. 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 + + 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 @resources.nil? + invalid_properties.push('invalid value for "resources", resources cannot be nil.') + end + + 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 @resources.nil? + 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 && + resources == o.resources && + 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 + [resources, 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/v2_activity.rb b/lib/crimson-falcon/models/v2_activity.rb new file mode 100644 index 00000000..af0cb3d0 --- /dev/null +++ b/lib/crimson-falcon/models/v2_activity.rb @@ -0,0 +1,264 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 V2Activity + attr_accessor :id + + attr_accessor :_next + + attr_accessor :properties + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'_next' => :'next', + :'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 + { + :'id' => :'String', + :'_next' => :'Array', + :'properties' => :'Object' + } + 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::V2Activity` 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::V2Activity`. 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?(:'_next') + if (value = attributes[:'_next']).is_a?(Array) + self._next = value + end + 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 @id.nil? + invalid_properties.push('invalid value for "id", id 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 @id.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 && + id == o.id && + _next == o._next && + 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 + [id, _next, 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/v2_activity_parameters.rb b/lib/crimson-falcon/models/v2_activity_parameters.rb new file mode 100644 index 00000000..73fe96cc --- /dev/null +++ b/lib/crimson-falcon/models/v2_activity_parameters.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 V2ActivityParameters + attr_accessor :configuration + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'configuration' => :'configuration' + } + 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 + { + :'configuration' => :'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::V2ActivityParameters` 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::V2ActivityParameters`. 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?(:'configuration') + if (value = attributes[:'configuration']).is_a?(Hash) + self.configuration = 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 @configuration.nil? + invalid_properties.push('invalid value for "configuration", configuration 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 @configuration.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 && + configuration == o.configuration + 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 + [configuration].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_activity_properties.rb b/lib/crimson-falcon/models/v2_activity_properties.rb new file mode 100644 index 00000000..9e027dae --- /dev/null +++ b/lib/crimson-falcon/models/v2_activity_properties.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 V2ActivityProperties + attr_accessor :properties + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'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 + { + :'properties' => :'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::V2ActivityProperties` 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::V2ActivityProperties`. 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?(:'properties') + if (value = attributes[:'properties']).is_a?(Hash) + self.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 + 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 @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 && + 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 + [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/v2_condition.rb b/lib/crimson-falcon/models/v2_condition.rb new file mode 100644 index 00000000..bc655ece --- /dev/null +++ b/lib/crimson-falcon/models/v2_condition.rb @@ -0,0 +1,286 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 V2Condition + attr_accessor :display + + attr_accessor :_else + + attr_accessor :else_if + + attr_accessor :expression + + attr_accessor :_next + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'display' => :'display', + :'_else' => :'else', + :'else_if' => :'else_if', + :'expression' => :'expression', + :'_next' => :'next' + } + 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 + { + :'display' => :'Array', + :'_else' => :'Array', + :'else_if' => :'String', + :'expression' => :'String', + :'_next' => :'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::V2Condition` 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::V2Condition`. 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?(:'display') + if (value = attributes[:'display']).is_a?(Array) + self.display = value + end + end + + if attributes.key?(:'_else') + if (value = attributes[:'_else']).is_a?(Array) + self._else = value + end + end + + if attributes.key?(:'else_if') + self.else_if = attributes[:'else_if'] + end + + if attributes.key?(:'expression') + self.expression = attributes[:'expression'] + end + + if attributes.key?(:'_next') + if (value = attributes[:'_next']).is_a?(Array) + self._next = 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 @expression.nil? + invalid_properties.push('invalid value for "expression", expression cannot be nil.') + end + + if @_next.nil? + invalid_properties.push('invalid value for "_next", _next 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 @expression.nil? + return false if @_next.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 && + display == o.display && + _else == o._else && + else_if == o.else_if && + expression == o.expression && + _next == o._next + 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 + [display, _else, else_if, expression, _next].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_condition_parameters.rb b/lib/crimson-falcon/models/v2_condition_parameters.rb new file mode 100644 index 00000000..c8325161 --- /dev/null +++ b/lib/crimson-falcon/models/v2_condition_parameters.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 V2ConditionParameters + attr_accessor :fields + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fields' => :'fields' + } + 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 + { + :'fields' => :'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::V2ConditionParameters` 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::V2ConditionParameters`. 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?(:'fields') + if (value = attributes[:'fields']).is_a?(Hash) + self.fields = 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 @fields.nil? + invalid_properties.push('invalid value for "fields", fields 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 @fields.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 && + fields == o.fields + 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 + [fields].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_definition.rb b/lib/crimson-falcon/models/v2_definition.rb new file mode 100644 index 00000000..1714a16a --- /dev/null +++ b/lib/crimson-falcon/models/v2_definition.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 V2Definition + attr_accessor :actions + + attr_accessor :conditions + + attr_accessor :description + + attr_accessor :labels + + attr_accessor :loops + + attr_accessor :multi_instance + + attr_accessor :name + + attr_accessor :node_registry + + attr_accessor :parameters + + attr_accessor :provision_on_install + + attr_accessor :trigger + + attr_accessor :type + + attr_accessor :uniq_node_seen + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'actions' => :'actions', + :'conditions' => :'conditions', + :'description' => :'description', + :'labels' => :'labels', + :'loops' => :'loops', + :'multi_instance' => :'multi_instance', + :'name' => :'name', + :'node_registry' => :'nodeRegistry', + :'parameters' => :'parameters', + :'provision_on_install' => :'provision_on_install', + :'trigger' => :'trigger', + :'type' => :'type', + :'uniq_node_seen' => :'uniqNodeSeen' + } + 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 + { + :'actions' => :'Hash', + :'conditions' => :'Hash', + :'description' => :'String', + :'labels' => :'Array', + :'loops' => :'Hash', + :'multi_instance' => :'Boolean', + :'name' => :'String', + :'node_registry' => :'Hash', + :'parameters' => :'V2Parameters', + :'provision_on_install' => :'Boolean', + :'trigger' => :'V2Trigger', + :'type' => :'String', + :'uniq_node_seen' => :'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::V2Definition` 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::V2Definition`. 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?(:'actions') + if (value = attributes[:'actions']).is_a?(Hash) + self.actions = value + end + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Hash) + self.conditions = value + end + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'labels') + if (value = attributes[:'labels']).is_a?(Array) + self.labels = value + end + end + + if attributes.key?(:'loops') + if (value = attributes[:'loops']).is_a?(Hash) + self.loops = value + end + end + + if attributes.key?(:'multi_instance') + self.multi_instance = attributes[:'multi_instance'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'node_registry') + if (value = attributes[:'node_registry']).is_a?(Hash) + self.node_registry = value + end + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'provision_on_install') + self.provision_on_install = attributes[:'provision_on_install'] + end + + if attributes.key?(:'trigger') + self.trigger = attributes[:'trigger'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'uniq_node_seen') + if (value = attributes[:'uniq_node_seen']).is_a?(Hash) + self.uniq_node_seen = 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 @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @node_registry.nil? + invalid_properties.push('invalid value for "node_registry", node_registry cannot be nil.') + end + + if @trigger.nil? + invalid_properties.push('invalid value for "trigger", trigger cannot be nil.') + end + + if @uniq_node_seen.nil? + invalid_properties.push('invalid value for "uniq_node_seen", uniq_node_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 @name.nil? + return false if @node_registry.nil? + return false if @trigger.nil? + return false if @uniq_node_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 && + actions == o.actions && + conditions == o.conditions && + description == o.description && + labels == o.labels && + loops == o.loops && + multi_instance == o.multi_instance && + name == o.name && + node_registry == o.node_registry && + parameters == o.parameters && + provision_on_install == o.provision_on_install && + trigger == o.trigger && + type == o.type && + uniq_node_seen == o.uniq_node_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 + [actions, conditions, description, labels, loops, multi_instance, name, node_registry, parameters, provision_on_install, trigger, type, uniq_node_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/v2_for_loop.rb b/lib/crimson-falcon/models/v2_for_loop.rb new file mode 100644 index 00000000..3e3febaf --- /dev/null +++ b/lib/crimson-falcon/models/v2_for_loop.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 V2ForLoop + attr_accessor :continue_on_partial_execution + + attr_accessor :input + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'continue_on_partial_execution' => :'continue_on_partial_execution', + :'input' => :'input' + } + 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 + { + :'continue_on_partial_execution' => :'Boolean', + :'input' => :'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::V2ForLoop` 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::V2ForLoop`. 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?(:'continue_on_partial_execution') + self.continue_on_partial_execution = attributes[:'continue_on_partial_execution'] + end + + if attributes.key?(:'input') + self.input = attributes[:'input'] + 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 @continue_on_partial_execution.nil? + invalid_properties.push('invalid value for "continue_on_partial_execution", continue_on_partial_execution cannot be nil.') + end + + if @input.nil? + invalid_properties.push('invalid value for "input", input 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 @continue_on_partial_execution.nil? + return false if @input.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 && + continue_on_partial_execution == o.continue_on_partial_execution && + input == o.input + 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 + [continue_on_partial_execution, input].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_loop.rb b/lib/crimson-falcon/models/v2_loop.rb new file mode 100644 index 00000000..286b114a --- /dev/null +++ b/lib/crimson-falcon/models/v2_loop.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 V2Loop + attr_accessor :actions + + attr_accessor :conditions + + attr_accessor :_for + + attr_accessor :_next + + attr_accessor :trigger + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'actions' => :'actions', + :'conditions' => :'conditions', + :'_for' => :'for', + :'_next' => :'next', + :'trigger' => :'trigger' + } + 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 + { + :'actions' => :'Hash', + :'conditions' => :'Hash', + :'_for' => :'V2ForLoop', + :'_next' => :'Array', + :'trigger' => :'V2Trigger' + } + 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::V2Loop` 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::V2Loop`. 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?(:'actions') + if (value = attributes[:'actions']).is_a?(Hash) + self.actions = value + end + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Hash) + self.conditions = value + end + end + + if attributes.key?(:'_for') + self._for = attributes[:'_for'] + end + + if attributes.key?(:'_next') + if (value = attributes[:'_next']).is_a?(Array) + self._next = value + end + end + + if attributes.key?(:'trigger') + self.trigger = attributes[:'trigger'] + 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 @_for.nil? + invalid_properties.push('invalid value for "_for", _for 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 @_for.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 && + actions == o.actions && + conditions == o.conditions && + _for == o._for && + _next == o._next && + trigger == o.trigger + 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 + [actions, conditions, _for, _next, trigger].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_parameters.rb b/lib/crimson-falcon/models/v2_parameters.rb new file mode 100644 index 00000000..e55ff1d8 --- /dev/null +++ b/lib/crimson-falcon/models/v2_parameters.rb @@ -0,0 +1,264 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 V2Parameters + attr_accessor :actions + + attr_accessor :conditions + + # Installation instructions for the template. + attr_accessor :install_instructions + + attr_accessor :trigger + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'actions' => :'actions', + :'conditions' => :'conditions', + :'install_instructions' => :'install_instructions', + :'trigger' => :'trigger' + } + 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 + { + :'actions' => :'V2ActivityParameters', + :'conditions' => :'Hash', + :'install_instructions' => :'String', + :'trigger' => :'ParameterTriggerParameter' + } + 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::V2Parameters` 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::V2Parameters`. 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?(:'actions') + self.actions = attributes[:'actions'] + end + + if attributes.key?(:'conditions') + if (value = attributes[:'conditions']).is_a?(Hash) + self.conditions = value + end + end + + if attributes.key?(:'install_instructions') + self.install_instructions = attributes[:'install_instructions'] + end + + if attributes.key?(:'trigger') + self.trigger = attributes[:'trigger'] + 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 && + actions == o.actions && + conditions == o.conditions && + install_instructions == o.install_instructions && + trigger == o.trigger + 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 + [actions, conditions, install_instructions, trigger].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_trigger.rb b/lib/crimson-falcon/models/v2_trigger.rb new file mode 100644 index 00000000..8b6e40d8 --- /dev/null +++ b/lib/crimson-falcon/models/v2_trigger.rb @@ -0,0 +1,277 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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 V2Trigger + attr_accessor :event + + attr_accessor :name + + attr_accessor :_next + + attr_accessor :parameters + + attr_accessor :schedule + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'event' => :'event', + :'name' => :'name', + :'_next' => :'next', + :'parameters' => :'parameters', + :'schedule' => :'schedule' + } + 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 + { + :'event' => :'String', + :'name' => :'String', + :'_next' => :'Array', + :'parameters' => :'JsonschemaSchema', + :'schedule' => :'GraphTimerEventDefinition' + } + 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::V2Trigger` 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::V2Trigger`. 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?(:'event') + self.event = attributes[:'event'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'_next') + if (value = attributes[:'_next']).is_a?(Array) + self._next = value + end + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'schedule') + self.schedule = attributes[:'schedule'] + 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 @_next.nil? + invalid_properties.push('invalid value for "_next", _next 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 @_next.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 && + event == o.event && + name == o.name && + _next == o._next && + parameters == o.parameters && + schedule == o.schedule + 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 + [event, name, _next, parameters, schedule].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/vulnerabilities_api_combined_vulnerability.rb b/lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability.rb new file mode 100644 index 00000000..fa9406b3 --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability.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 VulnerabilitiesApiCombinedVulnerability + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiCombinedVulnerability` 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::VulnerabilitiesApiCombinedVulnerability`. 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/vulnerabilities_api_combined_vulnerability_details.rb b/lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability_details.rb new file mode 100644 index 00000000..31193ee7 --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability_details.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 VulnerabilitiesApiCombinedVulnerabilityDetails + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiCombinedVulnerabilityDetails` 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::VulnerabilitiesApiCombinedVulnerabilityDetails`. 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/vulnerabilities_api_combined_vulnerability_info.rb b/lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability_info.rb new file mode 100644 index 00000000..c966d34d --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_combined_vulnerability_info.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 VulnerabilitiesApiCombinedVulnerabilityInfo + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiCombinedVulnerabilityInfo` 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::VulnerabilitiesApiCombinedVulnerabilityInfo`. 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/vulnerabilities_api_vuln_by_image_count.rb b/lib/crimson-falcon/models/vulnerabilities_api_vuln_by_image_count.rb new file mode 100644 index 00000000..d4953b40 --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_vuln_by_image_count.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 VulnerabilitiesApiVulnByImageCount + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiVulnByImageCount` 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::VulnerabilitiesApiVulnByImageCount`. 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/vulnerabilities_api_vuln_by_publication.rb b/lib/crimson-falcon/models/vulnerabilities_api_vuln_by_publication.rb new file mode 100644 index 00000000..182d0816 --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_vuln_by_publication.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 VulnerabilitiesApiVulnByPublication + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiVulnByPublication` 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::VulnerabilitiesApiVulnByPublication`. 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/vulnerabilities_api_vuln_count.rb b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count.rb new file mode 100644 index 00000000..868bfab5 --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count.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 VulnerabilitiesApiVulnCount + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiVulnCount` 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::VulnerabilitiesApiVulnCount`. 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/vulnerabilities_api_vuln_count_by_actively_exploited.rb b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_actively_exploited.rb new file mode 100644 index 00000000..82a0933f --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_actively_exploited.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 VulnerabilitiesApiVulnCountByActivelyExploited + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiVulnCountByActivelyExploited` 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::VulnerabilitiesApiVulnCountByActivelyExploited`. 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/vulnerabilities_api_vuln_count_by_csp_rating.rb b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_csp_rating.rb new file mode 100644 index 00000000..0cbff917 --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_csp_rating.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 VulnerabilitiesApiVulnCountByCSPRating + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiVulnCountByCSPRating` 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::VulnerabilitiesApiVulnCountByCSPRating`. 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/vulnerabilities_api_vuln_count_by_cvss_score.rb b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_cvss_score.rb new file mode 100644 index 00000000..09bdc4fc --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_cvss_score.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 VulnerabilitiesApiVulnCountByCVSSScore + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiVulnCountByCVSSScore` 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::VulnerabilitiesApiVulnCountByCVSSScore`. 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/vulnerabilities_api_vuln_count_by_severity.rb b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_severity.rb new file mode 100644 index 00000000..727f680a --- /dev/null +++ b/lib/crimson-falcon/models/vulnerabilities_api_vuln_count_by_severity.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 VulnerabilitiesApiVulnCountBySeverity + 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' => :'MsaspecMetaInfo', + :'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::VulnerabilitiesApiVulnCountBySeverity` 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::VulnerabilitiesApiVulnCountBySeverity`. 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 508712e6..eb17a07b 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: 2023-08-03T23:00:01Z +CrowdStrike Swagger API Version: 2024-01-26T00:00:01Z =end module Falcon diff --git a/spec/api/alerts_api_spec.rb b/spec/api/alerts_api_spec.rb index c7e48ebc..f5805f99 100644 --- a/spec/api/alerts_api_spec.rb +++ b/spec/api/alerts_api_spec.rb @@ -54,38 +54,78 @@ # @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 [String] :sort Sort detections in either `asc` (ascending) or `desc` (descending) order. For example: `status|asc` or `status|desc`. - # @option opts [String] :filter Filter detections using a query in Falcon Query Language (FQL). An asterisk wildcard `*` includes all results. 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] :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 detection metadata for the provided string - # @return [MsaspecQueryResponse] + # @return [DetectsapiAlertQueryResponse] describe 'get_queries_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 get_queries_alerts_v2 + # retrieves all Alerts ids that match a given query + # @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 [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 detection metadata for the provided string + # @return [DetectsapiAlertQueryResponse] + describe 'get_queries_alerts_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 patch_entities_alerts_v2 - # Perform actions on detections identified by detection 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. + # 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. # @param body request body takes a list of action parameter request that is applied against all \"ids\" provided # @param [Hash] opts the optional parameters - # @return [MsaspecResponseFields] + # @return [DetectsapiResponseFields] describe 'patch_entities_alerts_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 patch_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. + # @param body request body takes a list of action parameter request that is applied against all \"ids\" provided + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved + # @return [DetectsapiResponseFields] + describe 'patch_entities_alerts_v3 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_aggregates_alerts_v1 - # retrieves aggregates for Alerts across all CIDs - # @param body request body takes a list of aggregation query requests + # retrieves aggregate values for Alerts across all CIDs + # @param body request body takes a list of aggregate-alert query requests # @param [Hash] opts the optional parameters - # @return [ApiAggregatesResponse] + # @return [DetectsapiAggregatesResponse] describe 'post_aggregates_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_aggregates_alerts_v2 + # retrieves aggregate values for Alerts across all CIDs + # @param body request body takes a list of aggregate-alert query requests + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved + # @return [DetectsapiAggregatesResponse] + describe 'post_aggregates_alerts_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 post_entities_alerts_v1 # retrieves all Alerts given their ids # @param body @@ -97,4 +137,16 @@ end end + # unit tests for post_entities_alerts_v2 + # retrieves all Alerts given their composite ids + # @param body + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :include_hidden allows previously hidden alerts to be retrieved + # @return [DetectsapiPostEntitiesAlertsV2Response] + describe 'post_entities_alerts_v2 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/inventories_api_spec.rb b/spec/api/cloud_snapshots_api_spec.rb similarity index 76% rename from spec/api/inventories_api_spec.rb rename to spec/api/cloud_snapshots_api_spec.rb index d7266bd9..c3fab374 100644 --- a/spec/api/inventories_api_spec.rb +++ b/spec/api/cloud_snapshots_api_spec.rb @@ -30,31 +30,31 @@ require 'spec_helper' require 'json' -# Unit tests for Falcon::InventoriesApi +# Unit tests for Falcon::CloudSnapshotsApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe 'InventoriesApi' do +describe 'CloudSnapshotsApi' do before do # run before each test - @api_instance = Falcon::InventoriesApi.new + @api_instance = Falcon::CloudSnapshotsApi.new end after do # run after each test end - describe 'test an instance of InventoriesApi' do - it 'should create an instance of InventoriesApi' do - expect(@api_instance).to be_instance_of(Falcon::InventoriesApi) + describe 'test an instance of CloudSnapshotsApi' do + it 'should create an instance of CloudSnapshotsApi' do + expect(@api_instance).to be_instance_of(Falcon::CloudSnapshotsApi) end end - # unit tests for create_inventory - # Create inventory from data received from snapshot + # unit tests for register_cspm_snapshot_account + # Register customer cloud account for snapshot scanning # @param body # @param [Hash] opts the optional parameters - # @return [CommonEntitiesResponse] - describe 'create_inventory test' do + # @return [ModelsAccountStatusResponse] + describe 'register_cspm_snapshot_account 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/configuration_assessment_api_spec.rb b/spec/api/configuration_assessment_api_spec.rb index 6ae78bf3..a7428e24 100644 --- a/spec/api/configuration_assessment_api_spec.rb +++ b/spec/api/configuration_assessment_api_spec.rb @@ -64,4 +64,15 @@ end end + # unit tests for get_rule_details + # Get rules details for provided one or more rule IDs + # @param ids One or more rules IDs (max: 400) + # @param [Hash] opts the optional parameters + # @return [DomainAPIRuleDetailsResponseV1] + describe 'get_rule_details 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_api_spec.rb b/spec/api/container_alerts_api_spec.rb new file mode 100644 index 00000000..1566ca29 --- /dev/null +++ b/spec/api/container_alerts_api_spec.rb @@ -0,0 +1,88 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ContainerAlertsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ContainerAlertsApi' do + before do + # run before each test + @api_instance = Falcon::ContainerAlertsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ContainerAlertsApi' do + it 'should create an instance of ContainerAlertsApi' do + expect(@api_instance).to be_instance_of(Falcon::ContainerAlertsApi) + end + end + + # 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 + # @return [AlertsContainerAlertsCountValue] + describe 'read_container_alerts_count 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_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 + # @return [AlertsContainerAlertsCountValue] + describe 'read_container_alerts_count_by_severity 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 search_and_read_container_alerts + # 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,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. + # @return [AlertsContainerAlertsEntityResponse] + describe 'search_and_read_container_alerts 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_detections_api_spec.rb b/spec/api/container_detections_api_spec.rb new file mode 100644 index 00000000..80dd47e8 --- /dev/null +++ b/spec/api/container_detections_api_spec.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 'spec_helper' +require 'json' + +# Unit tests for Falcon::ContainerDetectionsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ContainerDetectionsApi' do + before do + # run before each test + @api_instance = Falcon::ContainerDetectionsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ContainerDetectionsApi' do + it 'should create an instance of ContainerDetectionsApi' do + expect(@api_instance).to be_instance_of(Falcon::ContainerDetectionsApi) + end + end + + # unit tests for read_combined_detections + # Retrieve image assessment detections identified by the provided filter criteria + # @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 [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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for read_detections + # Retrieve image assessment detection entities identified by the provided filter criteria + # @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 [Integer] :offset The offset from where to begin. + # @return [DetectionsApiAssessmentDetections] + describe 'read_detections 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_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 + # @return [DetectionsApiDetectionsCount] + describe 'read_detections_count 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_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 + # @return [DetectionsApiDetectionsBySeverity] + describe 'read_detections_count_by_severity 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_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 + # @return [DetectionsApiDetectionsByType] + describe 'read_detections_count_by_type 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 search_detections + # Retrieve image assessment detection entities identified by the provided filter criteria + # @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 [Integer] :offset The offset from where to begin. + # @return [CommonGenericEntityResponseString] + describe 'search_detections 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_images_api_spec.rb b/spec/api/container_images_api_spec.rb new file mode 100644 index 00000000..923f6189 --- /dev/null +++ b/spec/api/container_images_api_spec.rb @@ -0,0 +1,182 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ContainerImagesApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ContainerImagesApi' do + before do + # run before each test + @api_instance = Falcon::ContainerImagesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ContainerImagesApi' do + it 'should create an instance of ContainerImagesApi' do + expect(@api_instance).to be_instance_of(Falcon::ContainerImagesApi) + end + end + + # 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 + # @return [ImagesApiImageAssessmentHistory] + describe 'aggregate_image_assessment_history 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 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,layer_digest,package_name_version,registry,repository,tag,vulnerability_count,vulnerability_severity + # @return [ImagesApiImageCount] + describe 'aggregate_image_count 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 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 + # @return [ImagesApiImageCountByBaseOS] + describe 'aggregate_image_count_by_base_os 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 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 + # @return [ImagesApiImageCountByState] + describe 'aggregate_image_count_by_state 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 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 [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. + # @return [ImagesApiImageByVulnerabilityCount] + describe 'combined_image_by_vulnerability_count 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 combined_image_detail + # Retrieve image entities identified by the provided filter criteria + # @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 [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. + # @return [ImagesApiCustomerAndImage] + describe 'combined_image_detail 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 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 [Hash] opts the optional parameters + # @return [ImagesApiImageIssuesSummary] + describe 'combined_image_issues_summary 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 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 [Hash] opts the optional parameters + # @return [ImagesApiImageVulnerabilitiesSummary] + describe 'combined_image_vulnerability_summary 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_combined_images + # Get image assessment results by providing an FQL filter and paging details + # @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 [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 tag] + # @return [ImagesExtCombinedImagesResponse] + describe 'get_combined_images 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_combined_images_export + # Retrieve images with an option to expand aggregated vulnerabilities/detections + # @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,layer_digest,package_name_version,registry,repository,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 [Integer] :offset The offset from where to begin. + # @option opts [String] :sort The fields to sort the records on. Supported columns: [base_os cid containers detections firstScanned first_seen highest_detection_severity highest_vulnerability_severity image_digest image_id last_seen layers_with_vulnerabilities packages registry repository tag vulnerabilities] + # @return [ImagesApiCombinedImageExport] + describe 'read_combined_images_export 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_packages_api_spec.rb b/spec/api/container_packages_api_spec.rb new file mode 100644 index 00000000..4473b6b0 --- /dev/null +++ b/spec/api/container_packages_api_spec.rb @@ -0,0 +1,119 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ContainerPackagesApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ContainerPackagesApi' do + before do + # run before each test + @api_instance = Falcon::ContainerPackagesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ContainerPackagesApi' do + it 'should create an instance of ContainerPackagesApi' do + expect(@api_instance).to be_instance_of(Falcon::ContainerPackagesApi) + end + end + + # unit tests for read_packages_by_fixable_vuln_count + # Retrieve top x app packages with the most fixable vulnerabilities + # @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 [Integer] :offset The offset from where to begin. + # @return [PackagesApiPackagesByVulnCount] + describe 'read_packages_by_fixable_vuln_count 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_by_vuln_count + # Retrieve top x packages with the most vulnerabilities + # @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 [Integer] :offset The offset from where to begin. + # @return [PackagesApiPackagesByVulnCount] + describe 'read_packages_by_vuln_count 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_combined + # Retrieve packages identified by the provided filter criteria + # @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 [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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for read_packages_combined_export + # Retrieve packages identified by the provided filter criteria for the purpose of export + # @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 [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 + # 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 + # @return [CommonCountResponse] + describe 'read_packages_count_by_zero_day 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_vulnerabilities_api_spec.rb b/spec/api/container_vulnerabilities_api_spec.rb new file mode 100644 index 00000000..5a59cc17 --- /dev/null +++ b/spec/api/container_vulnerabilities_api_spec.rb @@ -0,0 +1,184 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ContainerVulnerabilitiesApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ContainerVulnerabilitiesApi' do + before do + # run before each test + @api_instance = Falcon::ContainerVulnerabilitiesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ContainerVulnerabilitiesApi' do + it 'should create an instance of ContainerVulnerabilitiesApi' do + expect(@api_instance).to be_instance_of(Falcon::ContainerVulnerabilitiesApi) + end + end + + # unit tests for read_combined_vulnerabilities + # Retrieve vulnerability and aggregate data filtered by the provided FQL + # @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,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] + # @return [VulnerabilitiesApiCombinedVulnerability] + describe 'read_combined_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 read_combined_vulnerabilities_details + # Retrieve vulnerability details related to an image + # @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,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] + describe 'read_combined_vulnerabilities_details 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_combined_vulnerabilities_info + # Retrieve vulnerability and package related info for this customer + # @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. + # @option opts [Integer] :offset The offset from where to begin. + # @return [VulnerabilitiesApiCombinedVulnerabilityInfo] + describe 'read_combined_vulnerabilities_info 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_vulnerabilities_by_image_count + # Retrieve top x vulnerabilities with the most impacted images + # @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 [Integer] :offset The offset from where to begin. + # @return [VulnerabilitiesApiVulnByImageCount] + describe 'read_vulnerabilities_by_image_count 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_vulnerabilities_publication_date + # Retrieve top x vulnerabilities with the most recent publication date + # @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 [Integer] :offset The offset from where to begin. + # @return [VulnerabilitiesApiVulnByPublication] + describe 'read_vulnerabilities_publication_date 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_vulnerability_count + # Aggregate count of vulnerabilities + # @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,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] + describe 'read_vulnerability_count 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_vulnerability_count_by_actively_exploited + # Aggregate count of vulnerabilities grouped by actively exploited + # @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,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] + describe 'read_vulnerability_count_by_actively_exploited 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_vulnerability_count_by_cps_rating + # Aggregate count of vulnerabilities grouped by csp_rating + # @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,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] + describe 'read_vulnerability_count_by_cps_rating 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_vulnerability_count_by_cvss_score + # Aggregate count of vulnerabilities grouped by cvss score + # @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,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] + describe 'read_vulnerability_count_by_cvss_score 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_vulnerability_count_by_severity + # Aggregate count of vulnerabilities grouped by severity + # @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,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] + describe 'read_vulnerability_count_by_severity 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_api_spec.rb b/spec/api/cspm_registration_api_spec.rb index 49f586a7..efad3bac 100644 --- a/spec/api/cspm_registration_api_spec.rb +++ b/spec/api/cspm_registration_api_spec.rb @@ -62,6 +62,17 @@ end end + # unit tests for connect_cspmgcp_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 + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseExtV2] + describe 'connect_cspmgcp_account 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 create_cspm_aws_account # 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. # @param body @@ -84,6 +95,28 @@ end end + # unit tests for create_cspm_azure_management_group + # Creates a new management group in our system for a customer. + # @param body + # @param [Hash] opts the optional parameters + # @return [RegistrationAzureAccountResponseV1] + describe 'create_cspm_azure_management_group 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 create_cspmgcp_account + # Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access. + # @param body + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseV1] + describe 'create_cspmgcp_account 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_cspm_aws_account # Deletes an existing AWS account or organization in our system. # @param [Hash] opts the optional parameters @@ -109,6 +142,17 @@ end end + # unit tests for delete_cspmgcp_account + # Deletes a GCP account from the system. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [MsaBaseEntitiesResponse] + describe 'delete_cspmgcp_account 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_behavior_detections # Get list of detected behaviors # @param [Hash] opts the optional parameters @@ -160,7 +204,7 @@ end # unit tests for get_configuration_detections - # Get list of active misconfigurations + # Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead # @param [Hash] opts the optional parameters # @option opts [String] :cloud_provider Cloud Provider (e.g.: aws|azure|gcp) # @option opts [String] :account_id AWS account ID or GCP Project Number or Azure subscription ID @@ -188,6 +232,7 @@ # @option opts [Array] :organization_ids AWS organization IDs # @option opts [String] :status Account status to filter results by. # @option opts [Integer] :limit The maximum records to return. Defaults to 100. + # @option opts [String] :cspm_lite Only return CSPM Lite accounts # @option opts [String] :migrated Only return migrated d4c accounts # @option opts [Integer] :offset The offset to start retrieving records from # @option opts [String] :group_by Field to group by. @@ -229,6 +274,7 @@ # @option opts [Array] :tenant_ids Tenant ids to filter azure accounts # @option opts [String] :scan_type Type of scan, dry or full, to perform on selected accounts # @option opts [String] :status Account status to filter results by. + # @option opts [String] :cspm_lite Only return CSPM Lite accounts # @option opts [Integer] :limit The maximum records to return. Defaults to 100. # @option opts [Integer] :offset The offset to start retrieving records from # @return [RegistrationAzureAccountResponseV1] @@ -238,6 +284,19 @@ end end + # unit tests for get_cspm_azure_management_group + # Return information about Azure management group registration + # @param [Hash] opts the optional parameters + # @option opts [Array] :tenant_ids Tenant ids to filter azure accounts + # @option opts [Integer] :limit The maximum records to return. Defaults to 100. + # @option opts [Integer] :offset The offset to start retrieving records from + # @return [RegistrationAzureManagementGroupResponseV1] + describe 'get_cspm_azure_management_group 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_cspm_azure_user_scripts_attachment # Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment # @param [Hash] opts the optional parameters @@ -245,6 +304,7 @@ # @option opts [Array] :subscription_ids Subscription IDs to generate script for. Defaults to all. # @option opts [String] :account_type # @option opts [String] :template Template to be rendered + # @option opts [Boolean] :azure_management_group Use Azure Management Group # @return [RegistrationAzureProvisionGetUserScriptResponseV1] describe 'get_cspm_azure_user_scripts_attachment test' do it 'should work' do @@ -298,6 +358,46 @@ end end + # unit tests for get_cspmcgp_account + # Returns information about the current status of an GCP account. + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @option opts [String] :scan_type Type of scan, dry or full, to perform on selected accounts + # @option opts [String] :status Account status to filter results by. + # @option opts [Integer] :limit The maximum records to return. Defaults to 100. + # @option opts [Integer] :offset The offset to start retrieving records from + # @option opts [String] :sort Order fields in ascending or descending order. Ex: parent_type|asc. + # @return [RegistrationGCPAccountResponseV1] + describe 'get_cspmcgp_account 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_cspmgcp_service_accounts_ext + # Returns the service account id and client email for external clients. + # @param [Hash] opts the optional parameters + # @option opts [String] :id Service Account ID + # @return [RegistrationGCPServiceAccountResponseExtV1] + describe 'get_cspmgcp_service_accounts_ext 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_cspmgcp_user_scripts_attachment + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [RegistrationGCPProvisionGetUserScriptResponseV1] + describe 'get_cspmgcp_user_scripts_attachment 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 patch_cspm_aws_account # Patches a existing account in our system for a customer. # @param body @@ -309,6 +409,17 @@ end end + # unit tests for update_cspm_azure_account + # Patches a existing account in our system for a customer. + # @param body + # @param [Hash] opts the optional parameters + # @return [RegistrationAzureAccountResponseV1] + describe 'update_cspm_azure_account 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_cspm_azure_account_client_id # Update an Azure service account in our system by with the user-created client_id created with the public key we've provided # @param id ClientID to use for the Service Principal associated with the customer's Azure account @@ -355,4 +466,15 @@ end end + # unit tests for update_cspmgcp_account + # Patches a existing account in our system for a customer. + # @param body + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseV1] + describe 'update_cspmgcp_account 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/custom_ioa_api_spec.rb b/spec/api/custom_ioa_api_spec.rb index 68acae6f..93405222 100644 --- a/spec/api/custom_ioa_api_spec.rb +++ b/spec/api/custom_ioa_api_spec.rb @@ -231,7 +231,7 @@ # unit tests for query_rules_mixin0 # Finds all rule IDs matching the query with optional filter. # @param [Hash] opts the optional parameters - # @option opts [String] :sort Possible order by fields: {rules.created_on, rules.current_version.name, rules.current_version.modified_by, rules.ruletype_name, rules.created_by, rules.current_version.description, rules.current_version.pattern_severity, rules.current_version.action_label, rules.current_version.modified_on, rules.enabled} + # @option opts [String] :sort Possible order by fields: {rules.current_version.description, rules.current_version.action_label, rules.current_version.modified_on, rules.created_on, rules.current_version.name, rules.created_by, rules.current_version.pattern_severity, rules.current_version.modified_by, rules.ruletype_name, rules.enabled} # @option opts [String] :filter FQL query specifying the filter parameters. Filter term criteria: [enabled platform name description rules.action_label rules.name rules.description rules.pattern_severity rules.ruletype_name rules.enabled]. Filter range criteria: created_on, modified_on; use any common date format, such as '2010-05-15T14:55:21.892315096Z'. # @option opts [String] :q Match query criteria, which includes all the filter string fields # @option opts [String] :offset Starting index of overall result set from which to return IDs diff --git a/spec/api/custom_storage_api_spec.rb b/spec/api/custom_storage_api_spec.rb new file mode 100644 index 00000000..5fef58e9 --- /dev/null +++ b/spec/api/custom_storage_api_spec.rb @@ -0,0 +1,133 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::CustomStorageApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CustomStorageApi' do + before do + # run before each test + @api_instance = Falcon::CustomStorageApi.new + end + + after do + # run after each test + end + + describe 'test an instance of CustomStorageApi' do + it 'should create an instance of CustomStorageApi' do + expect(@api_instance).to be_instance_of(Falcon::CustomStorageApi) + end + end + + # unit tests for delete_object + # Delete the specified object + # @param collection_name The name of the collection + # @param object_key The object key + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :dry_run If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. + # @return [CustomType3191042536] + describe 'delete_object 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_object + # Get the bytes for the specified object + # @param collection_name The name of the collection + # @param object_key The object key + # @param [Hash] opts the optional parameters + # @return [File] + describe 'get_object 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_object_metadata + # Get the metadata for the specified object + # @param collection_name The name of the collection + # @param object_key The object key + # @param [Hash] opts the optional parameters + # @return [CustomType3191042536] + describe 'get_object_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 list_objects + # List the object keys in the specified collection in alphabetical order + # @param collection_name The name of the collection + # @param [Hash] opts the optional parameters + # @option opts [String] :_end The end key to end listing to + # @option opts [Integer] :limit The limit of results to return + # @option opts [String] :start The start key to start listing from + # @return [CustomType1255839303] + describe 'list_objects 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 put_object + # Put the specified new object at the given key or overwrite an existing object at the given key + # @param collection_name The name of the collection + # @param object_key The object key + # @param body + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :dry_run If false, run the operation as normal. If true, validate that the request *would* succeed, but don't execute it. + # @option opts [String] :schema_version The version of the collection schema + # @return [CustomType3191042536] + describe 'put_object 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 search_objects + # Search for objects that match the specified filter criteria (returns metadata, not actual objects) + # @param collection_name The name of the collection + # @param filter The filter to limit the returned results. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The limit of results to return + # @option opts [Integer] :offset The offset of results to return + # @option opts [String] :sort The sort order for the returned results. + # @return [CustomType3191042536] + describe 'search_objects 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/d4c_registration_api_spec.rb b/spec/api/d4c_registration_api_spec.rb index af6fe6be..e722660c 100644 --- a/spec/api/d4c_registration_api_spec.rb +++ b/spec/api/d4c_registration_api_spec.rb @@ -49,6 +49,17 @@ end end + # unit tests for connect_d4_cgcp_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 + # @param [Hash] opts the optional parameters + # @return [RegistrationGCPAccountResponseExtV2] + describe 'connect_d4_cgcp_account 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 create_d4_c_aws_account # 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. # @param body @@ -94,6 +105,17 @@ end end + # unit tests for delete_d4_cgcp_account + # Deletes a GCP account from the system. + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @return [MsaBaseEntitiesResponse] + describe 'delete_d4_cgcp_account 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 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 @@ -163,6 +185,17 @@ end end + # unit tests for get_d4_cgcp_service_accounts_ext + # Returns the service account id and client email for external clients. + # @param [Hash] opts the optional parameters + # @option opts [String] :id Service Account ID + # @return [RegistrationGCPServiceAccountResponseExtV1] + describe 'get_d4_cgcp_service_accounts_ext 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_cgcp_user_scripts # Return a script for customer to run in their cloud environment to grant us access to their GCP environment # @param [Hash] opts the optional parameters @@ -174,6 +207,19 @@ end end + # unit tests for get_d4_cgcp_user_scripts_attachment + # Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment + # @param [Hash] opts the optional parameters + # @option opts [String] :parent_type GCP Hierarchy Parent Type, organization/folder/project + # @option opts [Array] :ids Hierarchical Resource IDs of accounts + # @option opts [String] :status Account status to filter results by. + # @return [RegistrationGCPProvisionGetUserScriptResponseV1] + describe 'get_d4_cgcp_user_scripts_attachment 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_discover_cloud_azure_account # Return information about Azure account registration # @param [Hash] opts the optional parameters @@ -216,6 +262,7 @@ # @param [Hash] opts the optional parameters # @option opts [Array] :subscription_ids Azure Subscription ID # @option opts [String] :template Template to be rendered + # @option opts [Boolean] :azure_management_group Use Azure Management Group # @return [RegistrationAzureProvisionGetUserScriptResponseV1] describe 'get_discover_cloud_azure_user_scripts_attachment test' do it 'should work' do diff --git a/spec/api/drift_indicators_api_spec.rb b/spec/api/drift_indicators_api_spec.rb new file mode 100644 index 00000000..ce55693f --- /dev/null +++ b/spec/api/drift_indicators_api_spec.rb @@ -0,0 +1,114 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::DriftIndicatorsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'DriftIndicatorsApi' do + before do + # run before each test + @api_instance = Falcon::DriftIndicatorsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of DriftIndicatorsApi' do + it 'should create an instance of DriftIndicatorsApi' do + expect(@api_instance).to be_instance_of(Falcon::DriftIndicatorsApi) + end + end + + # 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 [Integer] :limit The upper-bound on the number of records to retrieve. + # @return [DriftindicatorsDriftIndicatorsFieldValue] + describe 'get_drift_indicators_values_by_date 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_drift_indicator_entities + # Retrieve Drift Indicator entities identified by the provided IDs + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Search Drift Indicators by ids - The maximum amount is 100 IDs + # @return [DriftindicatorsDriftEntityResponse] + describe 'read_drift_indicator_entities 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_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 + # @return [DriftindicatorsDriftIndicatorsCountValue] + describe 'read_drift_indicators_count 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 search_and_read_drift_indicator_entities + # Retrieve Drift Indicators by the provided search criteria + # @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] :sort The fields to sort the records on. + # @return [DriftindicatorsDriftEntityResponse] + describe 'search_and_read_drift_indicator_entities 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 search_drift_indicators + # Retrieve all drift indicators that match the given query + # @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] :sort The fields to sort the records on. + # @return [MsaspecQueryResponse] + describe 'search_drift_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/falcon_complete_dashboard_api_spec.rb b/spec/api/falcon_complete_dashboard_api_spec.rb index 3e6a8a70..a512d7a6 100644 --- a/spec/api/falcon_complete_dashboard_api_spec.rb +++ b/spec/api/falcon_complete_dashboard_api_spec.rb @@ -49,6 +49,17 @@ end end + # unit tests for aggregate_alerts + # Retrieve aggregate alerts values based on the matched filter + # @param body + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + describe 'aggregate_alerts 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 aggregate_allow_list # Retrieve aggregate allowlist ticket values based on the matched filter # @param body @@ -116,6 +127,17 @@ end end + # unit tests for aggregate_prevention_policy + # Retrieve prevention policies aggregate values based on the matched filter + # @param body + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + describe 'aggregate_prevention_policy 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 aggregate_remediations # Retrieve aggregate remediation ticket values based on the matched filter # @param body @@ -127,6 +149,28 @@ end end + # unit tests for aggregate_sensor_update_policy + # Retrieve sensor update policies aggregate values + # @param body + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + describe 'aggregate_sensor_update_policy 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 aggregate_total_device_counts + # Retrieve aggregate total host/devices based on the matched filter + # @param body + # @param [Hash] opts the optional parameters + # @return [MsaAggregatesResponse] + describe 'aggregate_total_device_counts 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_device_count_collection_queries_by_filter # Retrieve device count collection Ids that match the provided FQL filter, criteria with scrolling enabled # @param [Hash] opts the optional parameters @@ -134,13 +178,27 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'get_device_count_collection_queries_by_filter 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_alert_ids_by_filter + # Retrieve Alerts Ids that match the provided FQL filter criteria with scrolling enabled + # @param [Hash] opts the optional parameters + # @option opts [Integer] :limit The maximum records to return. [1-500] + # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". + # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [String] :offset Starting index of overall result set from which to return ids. + # @return [MsaspecQueryResponse] + describe 'query_alert_ids_by_filter 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_allow_list_filter # Retrieve allowlist tickets that match the provided filter criteria with scrolling enabled # @param [Hash] opts the optional parameters @@ -148,7 +206,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_allow_list_filter test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -162,7 +220,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_block_list_filter test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -176,7 +234,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_detection_ids_by_filter test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -190,7 +248,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_escalations_filter test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -204,7 +262,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_incident_ids_by_filter test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -218,7 +276,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. For more information about FQL queries, see [our FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_remediations_filter 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/falcon_container_image_api_spec.rb b/spec/api/falcon_container_image_api_spec.rb index 9900f9d7..2d72614f 100644 --- a/spec/api/falcon_container_image_api_spec.rb +++ b/spec/api/falcon_container_image_api_spec.rb @@ -71,20 +71,6 @@ end end - # unit tests for get_combined_images - # Get image assessment results by providing an FQL filter and paging details - # @param [Hash] opts the optional parameters - # @option opts [String] :filter Filter images using a query in Falcon Query Language (FQL). Supported filters: container_running_status, cve_id, first_seen, registry, repository, tag, vulnerability_severity - # @option opts [Integer] :limit The upper-bound on the number of records to retrieve [1-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 registry repository tag vulnerability_severity] - # @return [ImagesExtCombinedImagesResponse] - describe 'get_combined_images 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_registry_entities # Retrieve registry entities identified by the customer id # @param [Hash] opts the optional parameters diff --git a/spec/api/falconx_sandbox_api_spec.rb b/spec/api/falconx_sandbox_api_spec.rb index 0e3f018f..28ac6ed3 100644 --- a/spec/api/falconx_sandbox_api_spec.rb +++ b/spec/api/falconx_sandbox_api_spec.rb @@ -209,7 +209,7 @@ # unit tests for submit # Submit an uploaded file or a URL for sandbox analysis. Time required for analysis varies but is usually less than 15 minutes. - # @param body Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. + # @param body Submit either a URL or a sample SHA256 for sandbox analysis. The sample file must have been previously uploaded through `/samples/entities/samples/v2`. You must specify a JSON object that includes the `falconx.SubmissionParametersV1` key/value pairs shown below. **`environment_id`**: Specifies the sandbox environment used for analysis. Values: - `400`: MacOS Catalina 10.15 - `300`: Linux Ubuntu 16.04, 64-bit - `200`: Android (static analysis) - `160`: Windows 10, 64-bit - `140`: Windows 11, 64-bit - `110`: Windows 7, 64-bit - `100`: Windows 7, 32-bit **`sha256`** ID of the sample, which is a SHA256 hash value. Find a sample ID from the response when uploading a malware sample or search with `/falconx/queries/submissions/v1`.The `url` parameter must be unset if `sha256` is used. **`url`** A web page or file URL. It can be HTTP(S) or FTP. The `sha256` parameter must be unset if `url` is used. **`action_script`** (optional): Runtime script for sandbox analysis. Values: - `default` - `default_maxantievasion` - `default_randomfiles` - `default_randomtheme` - `default_openie` **`command_line`** (optional): Command line script passed to the submitted file at runtime. Max length: 2048 characters **`document_password`** (optional): Auto-filled for Adobe or Office files that prompt for a password. Max length: 32 characters **`enable_tor`** (optional): Deprecated, please use `network_settings` instead. If `true`, sandbox analysis routes network traffic via TOR. Default: `false`. **`network_settings`** (optional): Specifies the sandbox network_settings used for analysis. Values: - `default`: Fully operating network - `tor`: Route network traffic via TOR - `simulated`: Simulate network traffic - `offline`: No network traffic **`submit_name`** (optional): Name of the malware sample that's used for file type detection and analysis **`system_date`** (optional): Set a custom date in the format `yyyy-MM-dd` for the sandbox environment **`system_time`** (optional): Set a custom time in the format `HH:mm` for the sandbox environment. # @param [Hash] opts the optional parameters # @return [FalconxSubmissionV1Response] describe 'submit test' do diff --git a/spec/api/filevantage_api_spec.rb b/spec/api/filevantage_api_spec.rb index d50091ea..157f4bb4 100644 --- a/spec/api/filevantage_api_spec.rb +++ b/spec/api/filevantage_api_spec.rb @@ -49,26 +49,189 @@ end end + # 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 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 create_rule_groups + # Creates a new rule group of the specified type. + # Individual rules can be assigned to a rule group after it has been created. + # @param body Create a new rule group of a specific type. * `name` must be between 1 and 100 characters. * `type` must be one of `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. * `description` can be between 0 and 500 characters. Note: rules are added/removed from rule groups using their dedicated end-points. + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + describe 'create_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 create_rules + # Creates a new rule configuration within the specified rule group. + # Creates a new rule configuration within the specified rule group. + # @param body Create a new rule configuration for the specified rule group. * `id` is not supported for creation of a rule, the new id of the created rule will be included in the response. * `rule_group_id` to add the new rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` - is not supported for creation of a rule, new rules will be added last in precedence order. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files whose content will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + # @param [Hash] opts the optional parameters + # @return [RulegroupsRulesResponse] + describe 'create_rules 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 create_scheduled_exclusions + # Creates a new scheduled exclusion configuration for the provided policy id. + # Creates a new scheduled exclusion configuration for the provided policy id. + # @param body Create a new scheduled exclusion configuration for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + # @param [Hash] opts the optional parameters + # @return [ScheduledexclusionsResponse] + describe 'create_scheduled_exclusions 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_policies + # Deletes 1 or more policies. + # Only disabled policies are allowed to be deleted. + # @param ids One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [PoliciesDeleteResponse] + describe 'delete_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_rule_groups + # Deletes 1 or more rule groups + # The rule groups represented by the provided ids and all rules that they contain will be deleted. Rule groups can only be deleted if they are not assigned to a policy. + # @param ids One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [RulegroupsDeleteResponse] + 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 + end + + # unit tests for delete_rules + # Deletes 1 or more rules from the specified rule group. + # Rules that match a provided id will be deleted from the provided rule group id. + # @param rule_group_id The id of the rule group from which the rules will be deleted. + # @param ids One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + describe 'delete_rules 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_scheduled_exclusions + # Deletes 1 or more scheduled exclusions from the provided policy id. + # Scheduled exclusions that match a provided id will be deleted from the provided policy id. + # @param policy_id ID of the policy to delete the scheduled exclusions from. + # @param ids One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + describe 'delete_scheduled_exclusions 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_changes # Retrieve information on changes # Retrieve key attributes of Falcon FileVantage changes for the specified ids. - # @param ids One or more change ids in the form of ids=ID1&ids=ID2 + # @param ids One or more change ids in the form of `ids=ID1&ids=ID2`. The maximum number of ids that can be requested at once is `500`. # @param [Hash] opts the optional parameters - # @return [PublicGetChangesResponse] + # @return [ChangesGetChangesResponse] describe 'get_changes 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_policies + # Retrieves the configuration for 1 or more policies. + # The configuration of each policy that match the provided id will be returned. + # @param ids One or more (up to 500) policy ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [PoliciesResponse] + describe 'get_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_rule_groups + # Retrieves the rule group details for 1 or more rule groups. + # Full details of each rule group that matches a provided id will be returned in the response + # @param ids One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + 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 + # Retrieves the configuration for 1 or more rules. + # Rules within the provided rule group id that match a provided id will be returned within the response. + # @param rule_group_id Rule group from which to retrieve the rule configuration. + # @param ids One or more (up to 500) rule ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [RulegroupsRulesResponse] + describe 'get_rules 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_scheduled_exclusions + # Retrieves the configuration of 1 or more scheduled exclusions from the provided policy id. + # Full details of each each scheduled exclusion that match a provided id will be returned in the response. + # @param policy_id The id of the policy to retrieve the scheduled exclusion configurations. + # @param ids One or more (up to 500) scheduled exclusion ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [ScheduledexclusionsResponse] + describe 'get_scheduled_exclusions 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 high_volume_query_changes + # Returns 1 or more change ids + # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. It can retrieve an unlimited number of results using multiple requests. + # @param [Hash] opts the optional parameters + # @option opts [String] :after A pagination token used with the `limit` parameter to manage pagination of results. On your first request don't provide a value for the `after` token. On subsequent requests provide the `after` token value from the previous response to continue pagination from where you left. If the response returns an empty `after` token it means there are no more results to return. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `5000`. + # @option opts [String] :sort Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. Defaults to `action_timestamp|desc` no value is specified. The full list of allowed sorting options can be reviewed in our API documentation. + # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. + # @return [ChangesHighVolumeQueryResponse] + describe 'high_volume_query_changes 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_changes - # Returns one or more change IDs - # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided + # Returns 1 or more change ids + # Returns a list of Falcon FileVantage change IDs filtered, sorted and limited by the query parameters provided. Using this endpoint you can retrieve up to `10000` results by using pagination with multiple requests. If you need to retrieve more than `10000` results consider using the `/queries/changes/v3` endpoint # @param [Hash] opts the optional parameters - # @option opts [Integer] :offset The first change index to return in the response. If not provided it will default to '0'. Use with the `limit` parameter to manage pagination of results. - # @option opts [Integer] :limit The maximum number of changes to return in the response (default: 100; max: 500). Use with the `offset` parameter to manage pagination of results - # @option opts [String] :sort Sort changes using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. - # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.host_name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to `0` if not specified. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to `100` if not specified. The maximum number of results that can be returned in a single call is `500`. + # @option opts [String] :sort Sort results using options like: - `action_timestamp` (timestamp of the change occurrence) Sort either `asc` (ascending) or `desc` (descending). For example: `action_timestamp|asc`. The full list of allowed sorting options can be reviewed in our API documentation. + # @option opts [String] :filter Filter changes using a query in Falcon Query Language (FQL). Common filter options include: - `host.name` - `action_timestamp` The full list of allowed filter parameters can be reviewed in our API documentation. # @return [MsaspecQueryResponse] describe 'query_changes test' do it 'should work' do @@ -76,4 +239,148 @@ end end + # unit tests for query_policies + # Retrieve the ids of all policies that are assigned the provided policy type. + # Policy ids will be returned sorted by a `precedence` order of ascending when a `sort` parameter is not provided. + # @param type The types of policies to retrieve. Allowed values are: `Windows`, `Linux` or `Mac`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to 0 if not specified. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + # @option opts [String] :sort Sort the returned ids based on one of the following properties: `precedence`, `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `precedence|asc`. + # @return [MsaspecQueryResponse] + describe 'query_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_rule_groups + # Retrieve the ids of all rule groups that are of the provided rule group type. + # Rule group ids will be returned sorted by `created_timestamp` order if a `sort` parameter is not provided + # @param type The rule group type to retrieve the ids of. Allowed values are: `WindowsFiles`, `WindowsRegistry`, `LinuxFiles` or `MacFiles`. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :offset The offset to start retrieving records from. Defaults to 0 if not specified. + # @option opts [Integer] :limit The maximum number of ids to return. Defaults to 100 if not specified. The maximum number of results that can be returned in a single call is 500. + # @option opts [String] :sort Sort the returned ids based on one of the following properties: `created_timestamp` or `modified_timestamp` Sort either `asc` (ascending) or `desc` (descending); for example: `created_timestamp|asc`. + # @return [MsaspecQueryResponse] + 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 + end + + # unit tests for query_scheduled_exclusions + # Retrieve the ids of all scheduled exclusions contained within the provided policy id. + # Retrieve the ids of all scheduled exclusions contained within the provided policy id + # @param policy_id The id of the policy from which to retrieve the scheduled exclusion ids. + # @param [Hash] opts the optional parameters + # @return [MsaspecQueryResponse] + describe 'query_scheduled_exclusions 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_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 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_policy_host_groups + # Manage host groups assigned to a policy. + # Manage host groups assigned to a policy. + # @param policy_id The id of the policy for which to perform the action. + # @param action The action to perform with the provided ids, must be one of: `assign` or `unassign`. + # @param ids One or more host group ids in the form of `ids=ID1&ids=ID2` + # @param [Hash] opts the optional parameters + # @return [PoliciesResponse] + describe 'update_policy_host_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 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 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_policy_rule_groups + # Manage the rule groups assigned to the policy or set the rule group precedence for all rule groups within the policy. + # Manage the rule groups assigned to the policy. Rule groups must be of the same type as the policy they are being added: * `WindowsRegistry` and `WindowsFiles` groups can only be added to a `Windows` policy. * `LinuxFiles` groups can only be added to a `Linux` policy. * `MacFiles` groups can only be added to a `Mac` policy. When setting rule group precedence, the precedence for `all` rule group ids within the policy must be provided. + # @param policy_id The id of the policy for which to perform the action. + # @param action The action to perform with the provided ids, must be one of: `assign`, `unassign`, or `precedence`. + # @param ids One or more rule group ids in the form of ids=ID1&ids=ID2. Note, for the precedence action, precedence is controlled by the order of the ids as they are specified in the request. + # @param [Hash] opts the optional parameters + # @return [PoliciesResponse] + describe 'update_policy_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 update_rule_group_precedence + # Updates the rule precedence for all rules in the identified rule group. + # The ids for `all` rules contained within the rule group must be specified in the desired precedence order. Requests that do not represent all ids will not be processed. + # @param rule_group_id Rule group from which to set the precedence. + # @param ids One or more (up to 500) rule group ids in the form of `ids=ID1&ids=ID2`. + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + describe 'update_rule_group_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_rule_groups + # Updates the provided rule group. + # Provides the ability to update the name and description of the rule group. + # @param body Enables updates to the following fields for an existing rule group. * `id` of the rule group to update. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `type` may not be modified after the rule group is created. Note: rules are added/removed from rule groups using their dedicated end-points. + # @param [Hash] opts the optional parameters + # @return [RulegroupsResponse] + describe 'update_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 update_rules + # Updates the provided rule configuration within the specified rule group. + # The rule must currently exist within the specified rule group. + # @param body Update the rule configuration for the specified rule ID and group. * `id` of the rule to update. * `rule_group_id` that contains the rule configuration. * `description` can be between 0 and 500 characters. * `path` representing the file system or registry path to monitor. * must be between 1 and 250 characters. * All paths must end with the path separator, e.g. c:\\windows\\ /usr/bin/ * `severity` to categorize change events produced by this rule; must be one of: `Low`, `Medium`, `High` or `Critical` * `depth` below the base path to monitor; must be one of: `1`, `2`, `3`, `4`, `5` or `ANY` * `precedence` is the order in which rules will be evaluated starting with 1. Specifying a precedence value that is already set for another rule in the group will result this rule being placed before that existing rule. Falcon GLOB syntax is supported for the following 6 properties. Allowed rule group configuration is based on the type of rule group the rule group is added to. * `include` represents the files, directories, registry keys, or registry values that will be monitored. * `exclude` represents the files, directories, registry keys, or registry values that will `NOT` be monitored. * `include_users` represents the changes performed by specific users that will be monitored. * `exclude_users` represents the changes performed by specific users that will `NOT` be monitored. * `include_processes` represents the changes performed by specific processes that will be monitored. * `exclude_processes` represents the changes performed by specific processes that will be `NOT` monitored. * `content_files` represents the files that will be monitored. Listed files must match the file include pattern and not match the file exclude pattern * `content_registry_values` represents the registry values whose content will be monitored. Listed registry values must match the registry include pattern and not match the registry exclude pattern * `enable_content_capture` File system directory monitoring: * `watch_delete_directory_changes` * `watch_create_directory_changes` * `watch_rename_directory_changes` * `watch_attributes_directory_changes` (`macOS` is not supported at this time) * `watch_permissions_directory_changes` (`macOS` is not supported at this time) File system file monitoring: * `watch_rename_file_changes` * `watch_write_file_changes` * `watch_create_file_changes` * `watch_delete_file_changes` * `watch_attributes_file_changes` (`macOS` is not supported at this time) * `watch_permissions_file_changes` (`macOS` is not supported at this time) Windows registry key and value monitoring: * `watch_create_key_changes` * `watch_delete_key_changes` * `watch_rename_key_changes` * `watch_set_value_changes` * `watch_delete_value_changes` * `watch_create_file_changes` + # @param [Hash] opts the optional parameters + # @return [RulegroupsRulesResponse] + describe 'update_rules 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_scheduled_exclusions + # Updates the provided scheduled exclusion configuration within the provided policy. + # Updates the provided scheduled exclusion configuration within the provided policy. + # @param body Update an existing scheduled exclusion for the specified policy. * `policy_id` to add the scheduled exclusion to. * `name` must be between 1 and 100 characters. * `description` can be between 0 and 500 characters. * `users` can be between 0 and 500 characters representing a comma separated list of user to exclude their changes. * admin* excludes changes made by all usernames that begin with admin. Falon GLOB syntax is supported. * `processes` can be between 0 and 500 characters representing a comma separated list of processes to exclude their changes. * **\\RunMe.exe or **/RunMe.sh excludes changes made by RunMe.exe or RunMe.sh in any location. * `schedule_start` must be provided to indicate the start of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `schedule_end` optionally provided to indicate the end of the schedule. This date/time must be an rfc3339 formatted string https://datatracker.ietf.org/doc/html/rfc3339. * `timezone` must be provided to indicate the TimeZone Name set for the provided `scheduled_start` and `scheduled_end` values. See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. * `repeated` optionally provided to indicate that the exclusion is applied repeatedly within the `scheduled_start` and `scheduled_end` time. * `start_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `end_time` must be the hour(00-23) and minute(00-59) of the day formatted as `HH:MM`. Required if `all_day` is not set to `true` * `all_day` must be `true` or `false` to indicate the exclusion is applied all day. * `frequency` must be one of `daily`, `weekly` or `monthly`. * `occurrence` must be one of the following when `frequency` is set to `monthly`: * `1st`, `2nd`, `3rd`, `4th` or `Last` represents the week. * `Days` represents specific calendar days. * `weekly_days` must be one or more of `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday` or `Sunday` when `frequency` is set to `weekly` or `frequency` is set to `monthly` and `occurrence` is NOT set to `Days`. * `monthly_days` must be set to one or more calendar days, between 1 and 31 when `frequency` is set to `monthly` and `occurrence` is set to `Days`. + # @param [Hash] opts the optional parameters + # @return [ScheduledexclusionsResponse] + describe 'update_scheduled_exclusions 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/foundry_logscale_api_spec.rb b/spec/api/foundry_logscale_api_spec.rb new file mode 100644 index 00000000..39534315 --- /dev/null +++ b/spec/api/foundry_logscale_api_spec.rb @@ -0,0 +1,226 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::FoundryLogscaleApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'FoundryLogscaleApi' do + before do + # run before each test + @api_instance = Falcon::FoundryLogscaleApi.new + end + + after do + # run after each test + end + + describe 'test an instance of FoundryLogscaleApi' do + it 'should create an instance of FoundryLogscaleApi' do + expect(@api_instance).to be_instance_of(Falcon::FoundryLogscaleApi) + end + end + + # unit tests for create_saved_searches_dynamic_execute_alt_v1 + # Execute a dynamic saved search + # @param body + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :include_schema_generation Include generated schemas in the response + # @option opts [Boolean] :include_test_data Include test data when executing searches + # @option opts [Boolean] :metadata Whether to include metadata in the response + # @option opts [String] :mode Mode to execute the query under. + # @return [ApidomainQueryResponseWrapperV1] + describe 'create_saved_searches_dynamic_execute_alt_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 create_saved_searches_dynamic_execute_v1 + # Execute a dynamic saved search + # @param body + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :include_schema_generation Include generated schemas in the response + # @option opts [Boolean] :include_test_data Include test data when executing searches + # @option opts [Boolean] :metadata Whether to include metadata in the response + # @option opts [String] :mode Mode to execute the query under. + # @return [ApidomainQueryResponseWrapperV1] + describe 'create_saved_searches_dynamic_execute_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 create_saved_searches_execute_alt_v1 + # Execute a saved search + # @param body + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :detailed Whether to include search field details + # @option opts [Boolean] :include_test_data Include test data when executing searches + # @option opts [Boolean] :metadata Whether to include metadata in the response + # @return [ApidomainQueryResponseWrapperV1] + describe 'create_saved_searches_execute_alt_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 create_saved_searches_execute_v1 + # Execute a saved search + # @param body + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [Boolean] :detailed Whether to include search field details + # @option opts [Boolean] :include_test_data Include test data when executing searches + # @option opts [Boolean] :metadata Whether to include metadata in the response + # @return [ApidomainQueryResponseWrapperV1] + describe 'create_saved_searches_execute_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 create_saved_searches_ingest_alt_v1 + # Populate a saved search + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @return [ClientDataIngestResponseWrapperV1] + describe 'create_saved_searches_ingest_alt_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 create_saved_searches_ingest_v1 + # Populate a saved search + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @return [ClientDataIngestResponseWrapperV1] + describe 'create_saved_searches_ingest_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_saved_searches_execute_alt_v1 + # Get the results of a saved search + # @param job_id Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [String] :limit Maximum number of records to return. + # @option opts [Boolean] :metadata Whether to include metadata in the response + # @option opts [String] :offset Starting pagination offset of records to return. + # @return [ApidomainQueryResponseWrapperV1] + describe 'get_saved_searches_execute_alt_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_saved_searches_execute_v1 + # Get the results of a saved search + # @param job_id Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :app_id Application ID. + # @option opts [String] :limit Maximum number of records to return. + # @option opts [Boolean] :metadata Whether to include metadata in the response + # @option opts [String] :offset Starting pagination offset of records to return. + # @return [ApidomainQueryResponseWrapperV1] + describe 'get_saved_searches_execute_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_saved_searches_job_results_download_alt_v1 + # Get the results of a saved search as a file + # @param job_id Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :result_format Result Format + # @return [File] + describe 'get_saved_searches_job_results_download_alt_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_saved_searches_job_results_download_v1 + # Get the results of a saved search as a file + # @param job_id Job ID for a previously executed async query + # @param [Hash] opts the optional parameters + # @option opts [String] :result_format Result Format + # @return [File] + describe 'get_saved_searches_job_results_download_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 ingest_data_v1 + # Ingest data into the application repository + # @param data_file Data file to ingest + # @param [Hash] opts the optional parameters + # @option opts [Array] :tag Custom tag for ingested data in the form tag:value + # @option opts [String] :tag_source Tag the data with the specified source + # @option opts [Boolean] :test_data Tag the data with test-ingest + # @return [ClientDataIngestResponseWrapperV1] + describe 'ingest_data_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 list_repos_v1 + # Lists available repositories and views + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :check_test_data Include whether test data is present in the application repository + # @return [ApidomainRepoViewListItemWrapperV1] + describe 'list_repos_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 list_view_v1 + # List views + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :check_test_data Include whether test data is present in the application repository + # @return [ApidomainRepoViewListItemWrapperV1] + describe 'list_view_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/hosts_api_spec.rb b/spec/api/hosts_api_spec.rb index a94c906c..a50d7951 100644 --- a/spec/api/hosts_api_spec.rb +++ b/spec/api/hosts_api_spec.rb @@ -50,7 +50,7 @@ end # unit tests for entities_perform_action - # Performs the specified action on the provided prevention policy IDs. + # Performs the specified action on the provided group IDs. # @param ids The group ids to act on # @param action_name The action to perform. # @param body @@ -63,17 +63,6 @@ end end - # unit tests for get_device_details - # Deprecated: Please use new GET or POST /devices/entities/devices/v2 endpoints. This endpoint will be removed on or sometime after February 9, 2023. Get details on one or more hosts by providing agent IDs (AID). You can get a host's agent IDs (AIDs) from the /devices/queries/devices/v1 endpoint, the Falcon console or the Streaming API - # @param ids The host agentIDs used to get details on - # @param [Hash] opts the optional parameters - # @return [DeviceapiDeviceDetailsResponseSwagger] - describe 'get_device_details 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_device_details_v2 # Get details on one or more hosts by providing host IDs as a query parameter. Supports up to a maximum 100 IDs. # @param ids The host agentIDs used to get details on @@ -130,6 +119,17 @@ end end + # unit tests for query_device_login_history_v2 + # Retrieve details about recent interactive login sessions for a set of devices powered by the Host Timeline. A max of 10 device ids can be specified + # @param body + # @param [Hash] opts the optional parameters + # @return [DeviceapiLoginHistoryResponseV1] + describe 'query_device_login_history_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 query_devices_by_filter # Search for hosts in your environment by platform, hostname, IP, and other criteria. # @param [Hash] opts the optional parameters diff --git a/spec/api/image_assessment_policies_api_spec.rb b/spec/api/image_assessment_policies_api_spec.rb new file mode 100644 index 00000000..43bbf854 --- /dev/null +++ b/spec/api/image_assessment_policies_api_spec.rb @@ -0,0 +1,172 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ImageAssessmentPoliciesApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'ImageAssessmentPoliciesApi' do + before do + # run before each test + @api_instance = Falcon::ImageAssessmentPoliciesApi.new + end + + after do + # run after each test + end + + describe 'test an instance of ImageAssessmentPoliciesApi' do + it 'should create an instance of ImageAssessmentPoliciesApi' do + expect(@api_instance).to be_instance_of(Falcon::ImageAssessmentPoliciesApi) + end + end + + # unit tests for create_policies + # Create Image Assessment policies + # @param body + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + describe 'create_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 create_policy_groups + # Create Image Assessment Policy Group entities + # @param body + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyGroupEntityResponse] + describe 'create_policy_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 delete_policy + # Delete Image Assessment Policy by policy UUID + # @param id Image Assessment Policy entity UUID + # @param [Hash] opts the optional parameters + # @return [CoreEntitiesResponse] + describe 'delete_policy 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_policy_group + # Delete Image Assessment Policy Group entities + # @param id Policy Image Group entity UUID + # @param [Hash] opts the optional parameters + # @return [CoreEntitiesResponse] + describe 'delete_policy_group 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_policies + # Get all Image Assessment policies + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + describe 'read_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 read_policy_exclusions + # Retrieve Image Assessment Policy Exclusion entities + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyExclusionEntityResponse] + describe 'read_policy_exclusions 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_policy_groups + # Retrieve Image Assessment Policy Group entities + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyGroupEntityResponse] + describe 'read_policy_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 update_policies + # Update Image Assessment Policy entities + # @param id Image Assessment Policy entity UUID + # @param body + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + describe '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 update_policy_exclusions + # Update Image Assessment Policy Exclusion entities + # @param body + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyExclusionEntityResponse] + describe 'update_policy_exclusions 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_policy_groups + # Update Image Assessment Policy Group entities + # @param id Policy Image Group entity UUID + # @param body + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyGroupEntityResponse] + describe 'update_policy_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 update_policy_precedence + # Update Image Assessment Policy precedence + # @param body + # @param [Hash] opts the optional parameters + # @return [ModelsPolicyEntityResponse] + 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 + end + +end diff --git a/spec/api/installation_tokens_api_spec.rb b/spec/api/installation_tokens_api_spec.rb index c19a1313..68f51391 100644 --- a/spec/api/installation_tokens_api_spec.rb +++ b/spec/api/installation_tokens_api_spec.rb @@ -56,7 +56,7 @@ # @option opts [Integer] :limit The maximum records to return. [1-1000]. Defaults to 50. # @option opts [String] :sort The property to sort by (e.g. timestamp.desc). # @option opts [String] :filter The filter expression that should be used to limit the results (e.g., `action:'token_create'`). - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'audit_events_query test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -99,7 +99,7 @@ # Deletes a token immediately. To revoke a token, use PATCH /installation-tokens/entities/tokens/v1 instead. # @param ids The token ids to delete. # @param [Hash] opts the optional parameters - # @return [MsaReplyMetaOnly] + # @return [MsaspecResponseFields] describe 'tokens_delete test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -113,7 +113,7 @@ # @option opts [Integer] :limit The maximum records to return. [1-1000]. Defaults to 50. # @option opts [String] :sort The property to sort by (e.g. created_timestamp.desc). # @option opts [String] :filter The filter expression that should be used to limit the results (e.g., `status:'valid'`). - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'tokens_query test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -136,7 +136,7 @@ # @param ids The token ids to update. # @param body # @param [Hash] opts the optional parameters - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'tokens_update 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/installation_tokens_settings_api_spec.rb b/spec/api/installation_tokens_settings_api_spec.rb index 298ef37a..13612ae0 100644 --- a/spec/api/installation_tokens_settings_api_spec.rb +++ b/spec/api/installation_tokens_settings_api_spec.rb @@ -53,7 +53,7 @@ # Update installation token settings. # @param body # @param [Hash] opts the optional parameters - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'customer_settings_update 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/intel_api_spec.rb b/spec/api/intel_api_spec.rb index 5286cd27..6a7c19c3 100644 --- a/spec/api/intel_api_spec.rb +++ b/spec/api/intel_api_spec.rb @@ -240,7 +240,7 @@ # @option opts [Integer] :offset Set the starting row number to return reports from. Defaults to 0. # @option opts [Integer] :limit Set the number of reports to return. The value must be between 1 and 5000. # @option opts [String] :sort Order fields in ascending or descending order. Ex: created_date|asc. - # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. # @option opts [String] :q Perform a generic substring search across all fields. # @option opts [Array] :fields The fields to return, or a predefined set of fields in the form of the collection name surrounded by two underscores like: \\_\\_\\<collection\\>\\_\\_. Ex: slug \\_\\_full\\_\\_. Defaults to \\_\\_basic\\_\\_. # @return [DomainNewsResponse] @@ -256,7 +256,7 @@ # @option opts [Integer] :offset Set the starting row number to return report IDs from. Defaults to 0. # @option opts [Integer] :limit Set the number of report IDs to return. The value must be between 1 and 5000. # @option opts [String] :sort Order fields in ascending or descending order. Ex: created_date|asc. - # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. + # @option opts [String] :filter Filter your query by specifying FQL filter parameters. Filter parameters include: actors, actors.id, actors.name, actors.slug, actors.url, created_date, description, id, last_modified_date, malware, malware.community_identifiers, malware.family_name, malware.slug, motivations, motivations.id, motivations.slug, motivations.value, name, name.raw, short_description, slug, sub_type, sub_type.id, sub_type.name, sub_type.slug, tags, tags.id, tags.slug, tags.value, target_countries, target_countries.id, target_countries.slug, target_countries.value, target_industries, target_industries.id, target_industries.slug, target_industries.value, type, type.id, type.name, type.slug, url. # @option opts [String] :q Perform a generic substring search across all fields. # @return [MsaQueryResponse] describe 'query_intel_report_ids test' do diff --git a/spec/api/ioc_api_spec.rb b/spec/api/ioc_api_spec.rb index caa5dca7..b18567e3 100644 --- a/spec/api/ioc_api_spec.rb +++ b/spec/api/ioc_api_spec.rb @@ -139,6 +139,47 @@ end end + # unit tests for indicator_get_device_count_v1 + # Get the number of devices the indicator has run on + # @param type The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value The string representation of the indicator + # @param [Hash] opts the optional parameters + # @return [ApiDeviceCountRespV1] + describe 'indicator_get_device_count_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 indicator_get_devices_ran_on_v1 + # Get the IDs of devices the indicator has run on + # @param type The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value The string representation of the indicator + # @param [Hash] opts the optional parameters + # @option opts [String] :limit The maximum number of results to return. Use with the offset parameter to manage pagination of results. + # @option opts [String] :offset The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. + # @return [ApiDevicesRanOnRespV1] + describe 'indicator_get_devices_ran_on_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 indicator_get_processes_ran_on_v1 + # Get the number of processes the indicator has run on + # @param type The type of the indicator. Valid types include: sha256: A hex-encoded sha256 hash string. Length - min: 64, max: 64. md5: A hex-encoded md5 hash string. Length - min 32, max: 32. domain: A domain name. Length - min: 1, max: 200. ipv4: An IPv4 address. Must be a valid IP address. ipv6: An IPv6 address. Must be a valid IP address. + # @param value The string representation of the indicator + # @param device_id Specify a host's ID to return only processes from that host. Get a host's ID from GET /devices/queries/devices/v1, the Falcon console, or the Streaming API. + # @param [Hash] opts the optional parameters + # @option opts [String] :limit The maximum number of results to return. Use with the offset parameter to manage pagination of results. + # @option opts [String] :offset The first process to return, where 0 is the latest offset. Use with the limit parameter to manage pagination of results. + # @return [ApiProcessesRanOnRespV1] + describe 'indicator_get_processes_ran_on_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 indicator_get_v1 # Get Indicators by ids. # @param ids The ids of the Indicators to retrieve diff --git a/spec/api/kubernetes_protection_api_spec.rb b/spec/api/kubernetes_protection_api_spec.rb index 05d85d2c..3c8fcf5f 100644 --- a/spec/api/kubernetes_protection_api_spec.rb +++ b/spec/api/kubernetes_protection_api_spec.rb @@ -93,6 +93,30 @@ end end + # unit tests for find_containers_by_container_run_time_version + # Retrieve containers by container_runtime_version + # @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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for find_containers_count_affected_by_zero_day_vulnerabilities + # Retrieve containers count affected by zero day vulnerabilities + # @param [Hash] opts the optional parameters + # @return [CommonCountResponse] + describe 'find_containers_count_affected_by_zero_day_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 get_aws_accounts_mixin0 # Provides a list of AWS accounts. # @param [Hash] opts the optional parameters @@ -213,6 +237,17 @@ end end + # 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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for list_azure_accounts # Provides the azure subscriptions registered to Kubernetes Protection # @param [Hash] opts the optional parameters @@ -241,6 +276,423 @@ end end + # unit tests for read_cluster_combined + # Retrieve kubernetes clusters identified by the provided filter criteria + # @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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 [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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,kubernetes_version,last_seen,management_status,node_count,pod_count,tags + # @return [CommonCountResponse] + describe 'read_cluster_count 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_cluster_enrichment + # 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 + # @return [K8sassetsClusterEnrichmentResponse] + describe 'read_cluster_enrichment 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_clusters_by_date_range_count + # Retrieve clusters by date range counts + # @param [Hash] opts the optional parameters + # @return [ModelsAggregateValuesByFieldResponse] + describe 'read_clusters_by_date_range_count 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_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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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_status,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,cluster_status,container_count,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for read_container_combined + # Retrieve containers identified by the provided filter criteria + # @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,cluster_id,cluster_name,container_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,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 Field to sort results by + # @return [ModelsContainerEntityResponse] + describe 'read_container_combined 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_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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for read_container_count_by_registry + # Retrieve top container image registries + # @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 [Integer] :limit The upper-bound on the number of records to retrieve. + # @return [ModelsAPIFilterResponse] + describe 'read_container_count_by_registry 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_container_enrichment + # 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 + # @return [K8sassetsContainerEnrichmentResponse] + describe 'read_container_enrichment 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_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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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 + # @return [ModelsAPIFilterResponse] + describe 'read_container_images_by_state 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_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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # unit tests for read_deployment_combined + # Retrieve kubernetes deployments identified by the provided filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Search Kubernetes deployments using a query in Falcon Query Language (FQL). Supported filters: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_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. + # @option opts [String] :sort Field to sort results by + # @return [ModelsDeploymentEntityResponse] + describe 'read_deployment_combined 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_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: annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,deployment_id,deployment_name,first_seen,last_seen,namespace,pod_count + # @return [CommonCountResponse] + describe 'read_deployment_count 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_deployment_enrichment + # 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 + # @return [K8sassetsDeploymentEnrichmentResponse] + describe 'read_deployment_enrichment 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_deployments_by_date_range_count + # Retrieve deployments by date range counts + # @param [Hash] opts the optional parameters + # @return [ModelsAggregateValuesByFieldResponse] + describe 'read_deployments_by_date_range_count 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_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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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,severity + # @return [K8siomsKubernetesIOMFieldValue] + describe 'read_kubernetes_iom_by_date_range 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_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,severity + # @return [K8siomsKubernetesIOMCountValue] + describe 'read_kubernetes_iom_count 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_kubernetes_iom_entities + # Retrieve Kubernetes IOM entities identified by the provided IDs + # @param [Hash] opts the optional parameters + # @option opts [Array] :ids Search Kubernetes IOMs by ids - The maximum amount is 100 IDs + # @return [K8siomsKubernetesIOMEntityResponse] + describe 'read_kubernetes_iom_entities 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_node_combined + # Retrieve kubernetes nodes identified by the provided filter criteria + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Search Kubernetes nodes using a query in Falcon Query Language (FQL). Supported filters: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_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. + # @option opts [String] :sort Field to sort results by + # @return [ModelsNodeEntityResponse] + describe 'read_node_combined 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_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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @return [CommonCountResponse] + describe 'read_node_count 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_node_enrichment + # 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 + # @return [K8sassetsNodeEnrichmentResponse] + describe 'read_node_enrichment 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_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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @return [ModelsAggregateValuesByFieldResponse] + describe 'read_nodes_by_cloud_count 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_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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @return [ModelsAggregateValuesByFieldResponse] + describe 'read_nodes_by_container_engine_version_count 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_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: aid,annotations_list,cid,cloud_account_id,cloud_name,cloud_region,cluster_id,cluster_name,container_count,container_runtime_version,first_seen,image_digest,ipv4,last_seen,linux_sensor_coverage,node_name,pod_count + # @return [ModelsAggregateValuesByFieldResponse] + describe 'read_nodes_by_date_range_count 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_pod_combined + # Retrieve kubernetes pods identified by the provided filter criteria + # @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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,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 [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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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,cluster_id,cluster_name,container_count,ipv4,ipv6,labels,last_seen,namespace,node_name,node_uid,owner_id,owner_type,pod_external_id,pod_id,pod_name,port,privileged,root_write_access,run_as_root_group,run_as_root_user + # @return [CommonCountResponse] + describe 'read_pod_count 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_pod_enrichment + # 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 + # @return [K8sassetsPodEnrichmentResponse] + describe 'read_pod_enrichment 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_pods_by_date_range_count + # Retrieve pods by date range counts + # @param [Hash] opts the optional parameters + # @return [ModelsAggregateValuesByFieldResponse] + describe 'read_pods_by_date_range_count 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_running_container_images + # Retrieve images on running containers + # @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,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 [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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + # 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,cluster_id,cluster_name,container_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,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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + # unit tests for regenerate_api_key # Regenerate API key for docker registry integrations # @param [Hash] opts the optional parameters @@ -251,6 +703,34 @@ end end + # unit tests for search_and_read_kubernetes_iom_entities + # Search Kubernetes IOM by the provided search criteria + # @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,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] :sort The fields to sort the records on. + # @return [K8siomsKubernetesIOMEntityResponse] + describe 'search_and_read_kubernetes_iom_entities 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 search_kubernetes_ioms + # Search Kubernetes IOMs by the provided search criteria. this endpoint returns a list of Kubernetes IOM UUIDs matching the query + # @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,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] :sort The fields to sort the records on. + # @return [CommonGenericEntityResponseString] + describe 'search_kubernetes_ioms 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 trigger_scan # Triggers a dry run or a full scan of a customer's kubernetes footprint # @param scan_type Scan Type to do diff --git a/spec/api/message_center_api_spec.rb b/spec/api/message_center_api_spec.rb index 8946af96..4a18a66a 100644 --- a/spec/api/message_center_api_spec.rb +++ b/spec/api/message_center_api_spec.rb @@ -64,7 +64,7 @@ # Add an activity to case. Only activities of type comment are allowed via API # @param body # @param [Hash] opts the optional parameters - # @return [MsaReplyMetaOnly] + # @return [MsaspecResponseFields] describe 'case_add_activity test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -148,7 +148,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. Allowed filters are: activity.created_time activity.type # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_activity_by_case_id test' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -162,7 +162,7 @@ # @option opts [String] :sort The property to sort on, followed by a dot (.), followed by the sort direction, either \"asc\" or \"desc\". # @option opts [String] :filter Optional filter and sort criteria in the form of an FQL query. Allowed filters are: _all activity.body case.aids case.assigner.display_name case.assigner.first_name case.assigner.last_name case.assigner.uid case.assigner.uuid case.body case.created_time case.detections.id case.hosts case.id case.incidents.id case.ip_addresses case.key case.last_modified_time case.status case.title case.type # @option opts [String] :offset Starting index of overall result set from which to return ids. - # @return [MsaQueryResponse] + # @return [MsaspecQueryResponse] describe 'query_cases_ids_by_filter 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/ods_api_spec.rb b/spec/api/ods_api_spec.rb index ca56d5ee..f2ff5c30 100644 --- a/spec/api/ods_api_spec.rb +++ b/spec/api/ods_api_spec.rb @@ -149,6 +149,17 @@ end end + # unit tests for get_scans_by_scan_ids_v2 + # Get Scans by IDs. + # @param ids The scan IDs to retrieve the scan entities + # @param [Hash] opts the optional parameters + # @return [EntitiesODSScanResponseV2] + describe 'get_scans_by_scan_ids_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 get_scheduled_scans_by_scan_ids # Get ScheduledScans by IDs. # @param ids The scan IDs to retrieve the scan entities @@ -177,7 +188,7 @@ # unit tests for query_scan_host_metadata # Query scan hosts. # @param [Hash] opts the optional parameters - # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated] + # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id host_id scan_id host_scan_id filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity completed_on started_on last_updated scan_control_reason] # @option opts [Integer] :offset Index of the starting resource # @option opts [Integer] :limit The max number of resources to return # @option opts [String] :sort The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" @@ -191,7 +202,7 @@ # unit tests for query_scans # Query Scans. # @param [Hash] opts the optional parameters - # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated] + # @option opts [String] :filter A FQL compatible query string. Terms: [id profile_id description.keyword initiated_from filecount.scanned filecount.malicious filecount.quarantined filecount.skipped affected_hosts_count status severity scan_started_on scan_completed_on created_on created_by last_updated targeted_host_count missing_host_count] # @option opts [Integer] :offset Index of the starting resource # @option opts [Integer] :limit The max number of resources to return # @option opts [String] :sort The property to sort on, followed by a |, followed by the sort direction, either \"asc\" or \"desc\" diff --git a/spec/api/real_time_response_admin_api_spec.rb b/spec/api/real_time_response_admin_api_spec.rb index c4d1f682..8fec3a09 100644 --- a/spec/api/real_time_response_admin_api_spec.rb +++ b/spec/api/real_time_response_admin_api_spec.rb @@ -139,6 +139,17 @@ end end + # unit tests for r_tr_get_falcon_scripts + # Get Falcon scripts with metadata and content of script + # @param ids IDs of the Falcon scripts you want to retrieve + # @param [Hash] opts the optional parameters + # @return [EmpowerapiMsaFalconScriptResponse] + describe 'r_tr_get_falcon_scripts 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 r_tr_get_put_files # Get put-files based on the ID's given. These are used for the RTR `put` command. # @param ids File IDs @@ -183,6 +194,20 @@ end end + # unit tests for r_tr_list_falcon_scripts + # Get a list of Falcon script IDs available to the user to run + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [Integer] :offset Starting index of overall result set from which to return ids. + # @option opts [Integer] :limit Number of ids to return. + # @option opts [String] :sort Sort by spec. Ex: 'created_at|asc'. + # @return [EmpowerapiMsaIDListResponse] + describe 'r_tr_list_falcon_scripts 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 r_tr_list_put_files # Get a list of put-file ID's that are available to the user for the `put` command. # @param [Hash] opts the optional parameters diff --git a/spec/api/real_time_response_audit_api_spec.rb b/spec/api/real_time_response_audit_api_spec.rb new file mode 100644 index 00000000..96a22498 --- /dev/null +++ b/spec/api/real_time_response_audit_api_spec.rb @@ -0,0 +1,67 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::RealTimeResponseAuditApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'RealTimeResponseAuditApi' do + before do + # run before each test + @api_instance = Falcon::RealTimeResponseAuditApi.new + end + + after do + # run after each test + end + + describe 'test an instance of RealTimeResponseAuditApi' do + it 'should create an instance of RealTimeResponseAuditApi' do + expect(@api_instance).to be_instance_of(Falcon::RealTimeResponseAuditApi) + end + end + + # unit tests for r_tr_audit_sessions + # Get all the RTR sessions created for a customer in a specified duration + # @param [Hash] opts the optional parameters + # @option opts [String] :filter Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our [FQL documentation in Falcon](https://falcon.crowdstrike.com/support/documentation/45/falcon-query-language-feature-guide). + # @option opts [String] :sort how to sort the session IDs. e.g. sort=created_at|desc will sort the results based on createdAt in descending order + # @option opts [String] :limit number of sessions to be returned + # @option opts [String] :offset offset value to be used for paginated results + # @option opts [Boolean] :with_command_info get sessions with command info included; by default sessions are returned without command info which include cloud_request_ids and logs fields + # @return [DomainSessionResponseWrapper] + describe 'r_tr_audit_sessions 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/recon_api_spec.rb b/spec/api/recon_api_spec.rb index e4590baf..a74ce6e8 100644 --- a/spec/api/recon_api_spec.rb +++ b/spec/api/recon_api_spec.rb @@ -50,7 +50,7 @@ end # unit tests for aggregate_notifications_exposed_data_records_v1 - # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name] + # Get notification exposed data record aggregates as specified via JSON in request body. The valid aggregation fields are: [cid notification_id created_date rule.id rule.name rule.topic source_category site author file.name credential_status bot.operating_system.hardware_id bot.bot_id] # @param body # @param [Hash] opts the optional parameters # @return [DomainAggregatesResponse] @@ -280,7 +280,7 @@ # @option opts [Integer] :offset Starting index of overall result set from which to return ids. # @option opts [Integer] :limit Number of IDs to return. Offset + limit should NOT be above 10K. # @option opts [String] :sort Possible order by fields: created_date, updated_date. Ex: 'updated_date|desc'. - # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id _all] + # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid created_date exposure_date rule.id rule.name rule.topic notification_id source_category site site_id author author_id user_id user_name credentials_url credentials_domain credentials_ip email domain hash_type display_name full_name user_ip phone_number company job_position file.name file.complete_data_set file.download_urls location.postal_code location.city location.state location.federal_district location.federal_admin_region location.country_code social.twitter_id social.facebook_id social.vk_id social.vk_token social.aim_id social.icq_id social.msn_id social.instagram_id social.skype_id financial.credit_card financial.bank_account financial.crypto_currency_addresses login_id credential_status _all bot.operating_system.hardware_id bot.bot_id] # @option opts [String] :q Free text search across all indexed fields. # @return [DomainQueryResponse] describe 'query_notifications_exposed_data_records_v1 test' do @@ -295,7 +295,7 @@ # @option opts [Integer] :offset Starting index of overall result set from which to return IDs. # @option opts [Integer] :limit Number of IDs to return. Offset + limit should NOT be above 10K. # @option opts [String] :sort Possible order by fields: `created_date`, `updated_date`. Ex: `updated_date|desc`. - # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid] + # @option opts [String] :filter FQL query to filter notifications by. Possible filter properties are: [id cid user_uuid status rule_id rule_name rule_topic rule_priority item_type item_site typosquatting.id typosquatting.unicode_format typosquatting.punycode_format typosquatting.parent_domain.id typosquatting.parent_domain.unicode_format typosquatting.parent_domain.punycode_format typosquatting.base_domain.id typosquatting.base_domain.unicode_format typosquatting.base_domain.punycode_format typosquatting.base_domain.is_registered typosquatting.base_domain.whois.registrar.name typosquatting.base_domain.whois.registrar.status typosquatting.base_domain.whois.registrant.email typosquatting.base_domain.whois.registrant.name typosquatting.base_domain.whois.registrant.org typosquatting.base_domain.whois.name_servers created_date updated_date assigned_to_uuid breach_summary.credential_statuses breach_summary.is_retroactively_deduped] # @option opts [String] :q Free text search across all indexed fields. # @return [DomainQueryResponse] describe 'query_notifications_v1 test' do diff --git a/spec/api/runtime_detections_api_spec.rb b/spec/api/runtime_detections_api_spec.rb new file mode 100644 index 00000000..54b5ff55 --- /dev/null +++ b/spec/api/runtime_detections_api_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::RuntimeDetectionsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'RuntimeDetectionsApi' do + before do + # run before each test + @api_instance = Falcon::RuntimeDetectionsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of RuntimeDetectionsApi' do + it 'should create an instance of RuntimeDetectionsApi' do + expect(@api_instance).to be_instance_of(Falcon::RuntimeDetectionsApi) + end + end + + # unit tests for get_runtime_detections_combined_v2 + # Retrieve container runtime detections by the provided search criteria + # @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 [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 + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + +end diff --git a/spec/api/vulnerabilities_evaluation_logic_api_spec.rb b/spec/api/spotlight_evaluation_logic_api_spec.rb similarity index 90% rename from spec/api/vulnerabilities_evaluation_logic_api_spec.rb rename to spec/api/spotlight_evaluation_logic_api_spec.rb index c0dcbff8..12644c85 100644 --- a/spec/api/vulnerabilities_evaluation_logic_api_spec.rb +++ b/spec/api/spotlight_evaluation_logic_api_spec.rb @@ -30,22 +30,22 @@ require 'spec_helper' require 'json' -# Unit tests for Falcon::VulnerabilitiesEvaluationLogicApi +# Unit tests for Falcon::SpotlightEvaluationLogicApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe 'VulnerabilitiesEvaluationLogicApi' do +describe 'SpotlightEvaluationLogicApi' do before do # run before each test - @api_instance = Falcon::VulnerabilitiesEvaluationLogicApi.new + @api_instance = Falcon::SpotlightEvaluationLogicApi.new end after do # run after each test end - describe 'test an instance of VulnerabilitiesEvaluationLogicApi' do - it 'should create an instance of VulnerabilitiesEvaluationLogicApi' do - expect(@api_instance).to be_instance_of(Falcon::VulnerabilitiesEvaluationLogicApi) + describe 'test an instance of SpotlightEvaluationLogicApi' do + it 'should create an instance of SpotlightEvaluationLogicApi' do + expect(@api_instance).to be_instance_of(Falcon::SpotlightEvaluationLogicApi) end end diff --git a/spec/api/vulnerabilities_api_spec.rb b/spec/api/spotlight_vulnerabilities_api_spec.rb similarity index 82% rename from spec/api/vulnerabilities_api_spec.rb rename to spec/api/spotlight_vulnerabilities_api_spec.rb index e462fd80..07b476c0 100644 --- a/spec/api/vulnerabilities_api_spec.rb +++ b/spec/api/spotlight_vulnerabilities_api_spec.rb @@ -30,28 +30,28 @@ require 'spec_helper' require 'json' -# Unit tests for Falcon::VulnerabilitiesApi +# Unit tests for Falcon::SpotlightVulnerabilitiesApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe 'VulnerabilitiesApi' do +describe 'SpotlightVulnerabilitiesApi' do before do # run before each test - @api_instance = Falcon::VulnerabilitiesApi.new + @api_instance = Falcon::SpotlightVulnerabilitiesApi.new end after do # run after each test end - describe 'test an instance of VulnerabilitiesApi' do - it 'should create an instance of VulnerabilitiesApi' do - expect(@api_instance).to be_instance_of(Falcon::VulnerabilitiesApi) + describe 'test an instance of SpotlightVulnerabilitiesApi' do + it 'should create an instance of SpotlightVulnerabilitiesApi' do + expect(@api_instance).to be_instance_of(Falcon::SpotlightVulnerabilitiesApi) end end # unit tests for combined_query_vulnerabilities # 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 - # @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, 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 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 # @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 The number of items to return in this response (default: 100, max: 5000). Use with the after parameter to manage pagination of results. @@ -88,7 +88,7 @@ # 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, 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 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 # @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 The number of items to return in this response (default: 100, max: 400). Use with the after parameter to manage pagination of results. diff --git a/spec/api/unidentified_containers_api_spec.rb b/spec/api/unidentified_containers_api_spec.rb new file mode 100644 index 00000000..14d8c6f7 --- /dev/null +++ b/spec/api/unidentified_containers_api_spec.rb @@ -0,0 +1,88 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::UnidentifiedContainersApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'UnidentifiedContainersApi' do + before do + # run before each test + @api_instance = Falcon::UnidentifiedContainersApi.new + end + + after do + # run after each test + end + + describe 'test an instance of UnidentifiedContainersApi' do + it 'should create an instance of UnidentifiedContainersApi' do + expect(@api_instance).to be_instance_of(Falcon::UnidentifiedContainersApi) + end + end + + # 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 + # @return [ModelsAggregateValuesByFieldResponse] + describe 'read_unidentified_containers_by_date_range_count 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_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 + # @return [UnidentifiedcontainersUnidentifiedContainersCountValue] + describe 'read_unidentified_containers_count 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 search_and_read_unidentified_containers + # Search Unidentified Containers by the provided search criteria + # @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] :sort The fields to sort the records on. + # @return [UnidentifiedcontainersUnidentifiedContainerAPIResponse] + describe 'search_and_read_unidentified_containers 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/workflows_api_spec.rb b/spec/api/workflows_api_spec.rb new file mode 100644 index 00000000..74b5e795 --- /dev/null +++ b/spec/api/workflows_api_spec.rb @@ -0,0 +1,224 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::WorkflowsApi +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'WorkflowsApi' do + before do + # run before each test + @api_instance = Falcon::WorkflowsApi.new + end + + after do + # run after each test + end + + describe 'test an instance of WorkflowsApi' do + it 'should create an instance of WorkflowsApi' do + expect(@api_instance).to be_instance_of(Falcon::WorkflowsApi) + end + end + + # unit tests for workflow_definitions_combined + # Search workflow definitions based on the provided filter + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [Integer] :limit Maximum number 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 [DefinitionsDefinitionExternalResponse] + describe 'workflow_definitions_combined 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 workflow_definitions_create + # Creates a workflow definition based on the provided model + # @param body + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating + # @return [ApiResourceIDsResponse] + describe 'workflow_definitions_create 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 workflow_definitions_export + # Exports a workflow definition for the given definition ID + # @param id ID of workflow definitions to return details for + # @param [Hash] opts the optional parameters + # @return [Array] + describe 'workflow_definitions_export 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 workflow_definitions_import + # Imports a workflow definition based on the provided model + # @param data_file A workflow definition in YAML format to import + # @param [Hash] opts the optional parameters + # @option opts [String] :name Workflow name to override + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating + # @return [DefinitionsDefinitionImportResponse] + describe 'workflow_definitions_import 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 workflow_definitions_update + # Updates a workflow definition based on the provided model + # @param body + # @param [Hash] opts the optional parameters + # @option opts [Boolean] :validate_only When enabled, prevents saving workflow after validating + # @return [ApiResourceIDsResponse] + describe 'workflow_definitions_update 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 workflow_execute + # Executes an on-demand Workflow, the body is JSON used to trigger the execution, the response the execution ID(s) + # @param body + # @param [Hash] opts the optional parameters + # @option opts [Array] :execution_cid CID(s) to execute on. This can be a child if this is a flight control enabled definition. If unset the definition CID is used. + # @option opts [Array] :definition_id Definition ID to execute, either a name or an ID can be specified. + # @option opts [String] :name Workflow name to execute, either a name or an ID can be specified. + # @option opts [String] :key Key used to help deduplicate executions, if unset a new UUID is used + # @option opts [Integer] :depth Used to record the execution depth to help limit execution loops when a workflow triggers another. The maximum depth is 4. + # @option opts [String] :source_event_url Used to record a URL to the source that led to triggering this workflow + # @return [ApiResourceIDsResponse] + describe 'workflow_execute 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 workflow_execution_results + # Get execution result of a given execution + # @param ids workflow execution id to return results for. + # @param [Hash] opts the optional parameters + # @return [ApiExecutionResultsResponse] + describe 'workflow_execution_results 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 workflow_executions_action + # Allows a user to resume/retry a failed workflow execution. + # @param action_name Specify one of these actions: - `resume`: resume/retry the workflow execution(s) specified in ids + # @param body + # @param [Hash] opts the optional parameters + # @return [DefinitionsDefinitionEntitiesResponse] + describe 'workflow_executions_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 workflow_executions_combined + # Search workflow executions based on the provided filter + # @param [Hash] opts the optional parameters + # @option opts [String] :filter FQL query specifying filter parameters. + # @option opts [String] :offset Starting pagination offset of records to return. + # @option opts [Integer] :limit Maximum number 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 [ApiExecutionResultsResponse] + describe 'workflow_executions_combined 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 workflow_get_human_input_v1 + # Gets one or more specific human inputs by their IDs. + # @param ids IDs of human inputs to read + # @param [Hash] opts the optional parameters + # @return [ModelUserInputReadResponse] + describe 'workflow_get_human_input_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 workflow_system_definitions_de_provision + # Deprovisions a system definition that was previously provisioned on the target CID + # @param body + # @param [Hash] opts the optional parameters + # @return [ClientSystemDefinitionCreateResponse] + describe 'workflow_system_definitions_de_provision 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 workflow_system_definitions_promote + # Promotes a version of a system definition for a customer. The customer must already have been provisioned. This allows the caller to apply an updated template version to a specific cid and expects all parameters to be supplied. If the template supports multi-instance the customer scope definition ID must be supplied to determine which customer workflow should be updated. + # @param body + # @param [Hash] opts the optional parameters + # @return [ClientSystemDefinitionCreateResponse] + describe 'workflow_system_definitions_promote 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 workflow_system_definitions_provision + # Provisions a system definition onto the target CID by using the template and provided parameters + # @param body + # @param [Hash] opts the optional parameters + # @return [ClientSystemDefinitionCreateResponse] + describe 'workflow_system_definitions_provision 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 workflow_update_human_input_v1 + # Provides an input in response to a human input action. Depending on action configuration, one or more of Approve, Decline, and/or Escalate are permitted. + # @param id ID of human input to provide an input to + # @param body + # @param [Hash] opts the optional parameters + # @return [ApiResourceIDsResponse] + describe 'workflow_update_human_input_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/models/alerts_container_alerts_count_value_spec.rb b/spec/models/alerts_container_alerts_count_value_spec.rb new file mode 100644 index 00000000..6910b84b --- /dev/null +++ b/spec/models/alerts_container_alerts_count_value_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::AlertsContainerAlertsCountValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::AlertsContainerAlertsCountValue do + let(:instance) { Falcon::AlertsContainerAlertsCountValue.new } + + describe 'test an instance of AlertsContainerAlertsCountValue' do + it 'should create an instance of AlertsContainerAlertsCountValue' do + expect(instance).to be_instance_of(Falcon::AlertsContainerAlertsCountValue) + 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 + + 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/alerts_container_alerts_entity_response_spec.rb b/spec/models/alerts_container_alerts_entity_response_spec.rb new file mode 100644 index 00000000..d6e4361d --- /dev/null +++ b/spec/models/alerts_container_alerts_entity_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::AlertsContainerAlertsEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::AlertsContainerAlertsEntityResponse do + let(:instance) { Falcon::AlertsContainerAlertsEntityResponse.new } + + describe 'test an instance of AlertsContainerAlertsEntityResponse' do + it 'should create an instance of AlertsContainerAlertsEntityResponse' do + expect(instance).to be_instance_of(Falcon::AlertsContainerAlertsEntityResponse) + 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_detects_query_meta_spec.rb b/spec/models/api_detects_query_meta_spec.rb new file mode 100644 index 00000000..6ef36d35 --- /dev/null +++ b/spec/models/api_detects_query_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::ApiDetectsQueryMeta +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiDetectsQueryMeta do + let(:instance) { Falcon::ApiDetectsQueryMeta.new } + + describe 'test an instance of ApiDetectsQueryMeta' do + it 'should create an instance of ApiDetectsQueryMeta' do + expect(instance).to be_instance_of(Falcon::ApiDetectsQueryMeta) + 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/api_detects_query_paging_spec.rb b/spec/models/api_detects_query_paging_spec.rb new file mode 100644 index 00000000..5a89c0cf --- /dev/null +++ b/spec/models/api_detects_query_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::ApiDetectsQueryPaging +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiDetectsQueryPaging do + let(:instance) { Falcon::ApiDetectsQueryPaging.new } + + describe 'test an instance of ApiDetectsQueryPaging' do + it 'should create an instance of ApiDetectsQueryPaging' do + expect(instance).to be_instance_of(Falcon::ApiDetectsQueryPaging) + 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 "offset"' 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_aggregates_response_spec.rb b/spec/models/api_device_count_resp_v1_spec.rb similarity index 84% rename from spec/models/api_aggregates_response_spec.rb rename to spec/models/api_device_count_resp_v1_spec.rb index c414dee5..2113881d 100644 --- a/spec/models/api_aggregates_response_spec.rb +++ b/spec/models/api_device_count_resp_v1_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::ApiAggregatesResponse +# Unit tests for Falcon::ApiDeviceCountRespV1 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::ApiAggregatesResponse do - let(:instance) { Falcon::ApiAggregatesResponse.new } +describe Falcon::ApiDeviceCountRespV1 do + let(:instance) { Falcon::ApiDeviceCountRespV1.new } - describe 'test an instance of ApiAggregatesResponse' do - it 'should create an instance of ApiAggregatesResponse' do - expect(instance).to be_instance_of(Falcon::ApiAggregatesResponse) + describe 'test an instance of ApiDeviceCountRespV1' do + it 'should create an instance of ApiDeviceCountRespV1' do + expect(instance).to be_instance_of(Falcon::ApiDeviceCountRespV1) end end describe 'test attribute "errors"' do diff --git a/spec/models/api_device_count_v1_spec.rb b/spec/models/api_device_count_v1_spec.rb new file mode 100644 index 00000000..8bab13e5 --- /dev/null +++ b/spec/models/api_device_count_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::ApiDeviceCountV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiDeviceCountV1 do + let(:instance) { Falcon::ApiDeviceCountV1.new } + + describe 'test an instance of ApiDeviceCountV1' do + it 'should create an instance of ApiDeviceCountV1' do + expect(instance).to be_instance_of(Falcon::ApiDeviceCountV1) + end + end + describe 'test attribute "device_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 "limit_exceeded"' 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 "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/api_devices_ran_on_resp_v1_spec.rb b/spec/models/api_devices_ran_on_resp_v1_spec.rb new file mode 100644 index 00000000..14d4b1c1 --- /dev/null +++ b/spec/models/api_devices_ran_on_resp_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::ApiDevicesRanOnRespV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiDevicesRanOnRespV1 do + let(:instance) { Falcon::ApiDevicesRanOnRespV1.new } + + describe 'test an instance of ApiDevicesRanOnRespV1' do + it 'should create an instance of ApiDevicesRanOnRespV1' do + expect(instance).to be_instance_of(Falcon::ApiDevicesRanOnRespV1) + 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_entities_response_spec.rb b/spec/models/api_entities_response_spec.rb new file mode 100644 index 00000000..fdd3396e --- /dev/null +++ b/spec/models/api_entities_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::ApiEntitiesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiEntitiesResponse do + let(:instance) { Falcon::ApiEntitiesResponse.new } + + describe 'test an instance of ApiEntitiesResponse' do + it 'should create an instance of ApiEntitiesResponse' do + expect(instance).to be_instance_of(Falcon::ApiEntitiesResponse) + 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_execution_results_response_spec.rb b/spec/models/api_execution_results_response_spec.rb new file mode 100644 index 00000000..0ba2b9bc --- /dev/null +++ b/spec/models/api_execution_results_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::ApiExecutionResultsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiExecutionResultsResponse do + let(:instance) { Falcon::ApiExecutionResultsResponse.new } + + describe 'test an instance of ApiExecutionResultsResponse' do + it 'should create an instance of ApiExecutionResultsResponse' do + expect(instance).to be_instance_of(Falcon::ApiExecutionResultsResponse) + 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_exposed_data_record_bot_location_v1_spec.rb b/spec/models/api_exposed_data_record_bot_location_v1_spec.rb new file mode 100644 index 00000000..d304f6c9 --- /dev/null +++ b/spec/models/api_exposed_data_record_bot_location_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::ApiExposedDataRecordBotLocationV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiExposedDataRecordBotLocationV1 do + let(:instance) { Falcon::ApiExposedDataRecordBotLocationV1.new } + + describe 'test an instance of ApiExposedDataRecordBotLocationV1' do + it 'should create an instance of ApiExposedDataRecordBotLocationV1' do + expect(instance).to be_instance_of(Falcon::ApiExposedDataRecordBotLocationV1) + 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 "zip_code"' 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_exposed_data_record_bot_operating_system_v1_spec.rb b/spec/models/api_exposed_data_record_bot_operating_system_v1_spec.rb new file mode 100644 index 00000000..05b6c44a --- /dev/null +++ b/spec/models/api_exposed_data_record_bot_operating_system_v1_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::ApiExposedDataRecordBotOperatingSystemV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiExposedDataRecordBotOperatingSystemV1 do + let(:instance) { Falcon::ApiExposedDataRecordBotOperatingSystemV1.new } + + describe 'test an instance of ApiExposedDataRecordBotOperatingSystemV1' do + it 'should create an instance of ApiExposedDataRecordBotOperatingSystemV1' do + expect(instance).to be_instance_of(Falcon::ApiExposedDataRecordBotOperatingSystemV1) + end + end + describe 'test attribute "antivirus"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "computer_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 "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 "hardware_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 "installed_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 "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 "layouts"' 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_architecture"' 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 "timezone"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uac"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "username"' 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_exposed_data_record_bot_v1_spec.rb b/spec/models/api_exposed_data_record_bot_v1_spec.rb new file mode 100644 index 00000000..81452385 --- /dev/null +++ b/spec/models/api_exposed_data_record_bot_v1_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::ApiExposedDataRecordBotV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiExposedDataRecordBotV1 do + let(:instance) { Falcon::ApiExposedDataRecordBotV1.new } + + describe 'test an instance of ApiExposedDataRecordBotV1' do + it 'should create an instance of ApiExposedDataRecordBotV1' do + expect(instance).to be_instance_of(Falcon::ApiExposedDataRecordBotV1) + end + end + describe 'test attribute "bot_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 "domain_detects"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "infection_build_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 "infection_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 "infection_path"' 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"' 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 "operating_system"' 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_meta_info_spec.rb b/spec/models/api_meta_info_spec.rb new file mode 100644 index 00000000..30c7523b --- /dev/null +++ b/spec/models/api_meta_info_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::ApiMetaInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiMetaInfo do + let(:instance) { Falcon::ApiMetaInfo.new } + + describe 'test an instance of ApiMetaInfo' do + it 'should create an instance of ApiMetaInfo' do + expect(instance).to be_instance_of(Falcon::ApiMetaInfo) + 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/api_notification_exposed_data_record_v1_spec.rb b/spec/models/api_notification_exposed_data_record_v1_spec.rb index 79efde0f..456545b0 100644 --- a/spec/models/api_notification_exposed_data_record_v1_spec.rb +++ b/spec/models/api_notification_exposed_data_record_v1_spec.rb @@ -54,6 +54,12 @@ end end + describe 'test attribute "bot"' 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/ @@ -72,6 +78,12 @@ end end + describe 'test attribute "credential_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 "credentials_domain"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -168,6 +180,12 @@ end end + describe 'test attribute "malware_family"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "notification_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/api_object_metadata_spec.rb b/spec/models/api_object_metadata_spec.rb new file mode 100644 index 00000000..78edb866 --- /dev/null +++ b/spec/models/api_object_metadata_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::ApiObjectMetadata +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiObjectMetadata do + let(:instance) { Falcon::ApiObjectMetadata.new } + + describe 'test an instance of ApiObjectMetadata' do + it 'should create an instance of ApiObjectMetadata' do + expect(instance).to be_instance_of(Falcon::ApiObjectMetadata) + end + end + describe 'test attribute "collection_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_modified_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 "namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "object_key"' 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_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/api_processes_ran_on_resp_v1_spec.rb b/spec/models/api_processes_ran_on_resp_v1_spec.rb new file mode 100644 index 00000000..64acc94a --- /dev/null +++ b/spec/models/api_processes_ran_on_resp_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::ApiProcessesRanOnRespV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiProcessesRanOnRespV1 do + let(:instance) { Falcon::ApiProcessesRanOnRespV1.new } + + describe 'test an instance of ApiProcessesRanOnRespV1' do + it 'should create an instance of ApiProcessesRanOnRespV1' do + expect(instance).to be_instance_of(Falcon::ApiProcessesRanOnRespV1) + 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/common_entities_response_spec.rb b/spec/models/api_resource_ids_response_spec.rb similarity index 85% rename from spec/models/common_entities_response_spec.rb rename to spec/models/api_resource_ids_response_spec.rb index 85ded2cf..d90db7b7 100644 --- a/spec/models/common_entities_response_spec.rb +++ b/spec/models/api_resource_ids_response_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::CommonEntitiesResponse +# Unit tests for Falcon::ApiResourceIDsResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::CommonEntitiesResponse do - let(:instance) { Falcon::CommonEntitiesResponse.new } +describe Falcon::ApiResourceIDsResponse do + let(:instance) { Falcon::ApiResourceIDsResponse.new } - describe 'test an instance of CommonEntitiesResponse' do - it 'should create an instance of CommonEntitiesResponse' do - expect(instance).to be_instance_of(Falcon::CommonEntitiesResponse) + describe 'test an instance of ApiResourceIDsResponse' do + it 'should create an instance of ApiResourceIDsResponse' do + expect(instance).to be_instance_of(Falcon::ApiResourceIDsResponse) end end describe 'test attribute "errors"' do diff --git a/spec/models/api_response_pagination_spec.rb b/spec/models/api_response_pagination_spec.rb new file mode 100644 index 00000000..773649da --- /dev/null +++ b/spec/models/api_response_pagination_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::ApiResponsePagination +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApiResponsePagination do + let(:instance) { Falcon::ApiResponsePagination.new } + + describe 'test an instance of ApiResponsePagination' do + it 'should create an instance of ApiResponsePagination' do + expect(instance).to be_instance_of(Falcon::ApiResponsePagination) + end + end + 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 "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/apidomain_dynamic_execute_search_request_v1_spec.rb b/spec/models/apidomain_dynamic_execute_search_request_v1_spec.rb new file mode 100644 index 00000000..d30c4a0a --- /dev/null +++ b/spec/models/apidomain_dynamic_execute_search_request_v1_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::ApidomainDynamicExecuteSearchRequestV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApidomainDynamicExecuteSearchRequestV1 do + let(:instance) { Falcon::ApidomainDynamicExecuteSearchRequestV1.new } + + describe 'test an instance of ApidomainDynamicExecuteSearchRequestV1' do + it 'should create an instance of ApidomainDynamicExecuteSearchRequestV1' do + expect(instance).to be_instance_of(Falcon::ApidomainDynamicExecuteSearchRequestV1) + 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 "repo_or_view"' 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_query"' 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_query_args"' 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"' 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/apidomain_query_response_v1_spec.rb b/spec/models/apidomain_query_response_v1_spec.rb new file mode 100644 index 00000000..c8c9fd5e --- /dev/null +++ b/spec/models/apidomain_query_response_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::ApidomainQueryResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApidomainQueryResponseV1 do + let(:instance) { Falcon::ApidomainQueryResponseV1.new } + + describe 'test an instance of ApidomainQueryResponseV1' do + it 'should create an instance of ApidomainQueryResponseV1' do + expect(instance).to be_instance_of(Falcon::ApidomainQueryResponseV1) + end + end + describe 'test attribute "event_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 "events"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "fields"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "job_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 "meta_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "schemas"' 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/apidomain_query_response_wrapper_v1_spec.rb b/spec/models/apidomain_query_response_wrapper_v1_spec.rb new file mode 100644 index 00000000..196f408f --- /dev/null +++ b/spec/models/apidomain_query_response_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::ApidomainQueryResponseWrapperV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApidomainQueryResponseWrapperV1 do + let(:instance) { Falcon::ApidomainQueryResponseWrapperV1.new } + + describe 'test an instance of ApidomainQueryResponseWrapperV1' do + it 'should create an instance of ApidomainQueryResponseWrapperV1' do + expect(instance).to be_instance_of(Falcon::ApidomainQueryResponseWrapperV1) + 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/models_snapshot_inventory_application_spec.rb b/spec/models/apidomain_repo_view_list_item_v1_spec.rb similarity index 76% rename from spec/models/models_snapshot_inventory_application_spec.rb rename to spec/models/apidomain_repo_view_list_item_v1_spec.rb index c21ef71b..22318aa8 100644 --- a/spec/models/models_snapshot_inventory_application_spec.rb +++ b/spec/models/apidomain_repo_view_list_item_v1_spec.rb @@ -31,66 +31,66 @@ require 'json' require 'date' -# Unit tests for Falcon::ModelsSnapshotInventoryApplication +# Unit tests for Falcon::ApidomainRepoViewListItemV1 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::ModelsSnapshotInventoryApplication do - let(:instance) { Falcon::ModelsSnapshotInventoryApplication.new } +describe Falcon::ApidomainRepoViewListItemV1 do + let(:instance) { Falcon::ApidomainRepoViewListItemV1.new } - describe 'test an instance of ModelsSnapshotInventoryApplication' do - it 'should create an instance of ModelsSnapshotInventoryApplication' do - expect(instance).to be_instance_of(Falcon::ModelsSnapshotInventoryApplication) + describe 'test an instance of ApidomainRepoViewListItemV1' do + it 'should create an instance of ApidomainRepoViewListItemV1' do + expect(instance).to be_instance_of(Falcon::ApidomainRepoViewListItemV1) end end - describe 'test attribute "major_version"' do + describe 'test attribute "connections"' 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_hash"' do + 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 "package_provider"' do + describe 'test attribute "display_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 "package_source"' do + describe 'test attribute "has_test_data"' 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 + 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 "product"' 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 "software_architecture"' do + describe 'test attribute "name_contracted"' 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 + 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 "vendor"' do + describe 'test attribute "type_name"' 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_repo_view_list_item_wrapper_v1_spec.rb b/spec/models/apidomain_repo_view_list_item_wrapper_v1_spec.rb new file mode 100644 index 00000000..bfdd16c5 --- /dev/null +++ b/spec/models/apidomain_repo_view_list_item_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::ApidomainRepoViewListItemWrapperV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApidomainRepoViewListItemWrapperV1 do + let(:instance) { Falcon::ApidomainRepoViewListItemWrapperV1.new } + + describe 'test an instance of ApidomainRepoViewListItemWrapperV1' do + it 'should create an instance of ApidomainRepoViewListItemWrapperV1' do + expect(instance).to be_instance_of(Falcon::ApidomainRepoViewListItemWrapperV1) + 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/apidomain_repository_v1_spec.rb b/spec/models/apidomain_repository_v1_spec.rb new file mode 100644 index 00000000..d361581c --- /dev/null +++ b/spec/models/apidomain_repository_v1_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::ApidomainRepositoryV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApidomainRepositoryV1 do + let(:instance) { Falcon::ApidomainRepositoryV1.new } + + describe 'test an instance of ApidomainRepositoryV1' do + it 'should create an instance of ApidomainRepositoryV1' do + expect(instance).to be_instance_of(Falcon::ApidomainRepositoryV1) + 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 "display_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 "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 "size"' 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/apidomain_saved_search_execute_request_v1_spec.rb b/spec/models/apidomain_saved_search_execute_request_v1_spec.rb new file mode 100644 index 00000000..2368d917 --- /dev/null +++ b/spec/models/apidomain_saved_search_execute_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::ApidomainSavedSearchExecuteRequestV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApidomainSavedSearchExecuteRequestV1 do + let(:instance) { Falcon::ApidomainSavedSearchExecuteRequestV1.new } + + describe 'test an instance of ApidomainSavedSearchExecuteRequestV1' do + it 'should create an instance of ApidomainSavedSearchExecuteRequestV1' do + expect(instance).to be_instance_of(Falcon::ApidomainSavedSearchExecuteRequestV1) + 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 "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 "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 "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 "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 "start"' 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 "with_in"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "with_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 "with_renames"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "with_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/apidomain_view_connection_v1_spec.rb b/spec/models/apidomain_view_connection_v1_spec.rb new file mode 100644 index 00000000..3ad7dbeb --- /dev/null +++ b/spec/models/apidomain_view_connection_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::ApidomainViewConnectionV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ApidomainViewConnectionV1 do + let(:instance) { Falcon::ApidomainViewConnectionV1.new } + + describe 'test an instance of ApidomainViewConnectionV1' do + it 'should create an instance of ApidomainViewConnectionV1' do + expect(instance).to be_instance_of(Falcon::ApidomainViewConnectionV1) + 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 "repository"' 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/public_acl_change_spec.rb b/spec/models/changes_acl_change_spec.rb similarity index 84% rename from spec/models/public_acl_change_spec.rb rename to spec/models/changes_acl_change_spec.rb index 998bc80f..19572bce 100644 --- a/spec/models/public_acl_change_spec.rb +++ b/spec/models/changes_acl_change_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicACLChange +# Unit tests for Falcon::ChangesACLChange # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicACLChange do - let(:instance) { Falcon::PublicACLChange.new } +describe Falcon::ChangesACLChange do + let(:instance) { Falcon::ChangesACLChange.new } - describe 'test an instance of PublicACLChange' do - it 'should create an instance of PublicACLChange' do - expect(instance).to be_instance_of(Falcon::PublicACLChange) + describe 'test an instance of ChangesACLChange' do + it 'should create an instance of ChangesACLChange' do + expect(instance).to be_instance_of(Falcon::ChangesACLChange) end end describe 'test attribute "operation"' do diff --git a/spec/models/public_acl_spec.rb b/spec/models/changes_acl_spec.rb similarity index 88% rename from spec/models/public_acl_spec.rb rename to spec/models/changes_acl_spec.rb index c67d9f90..0f40df6f 100644 --- a/spec/models/public_acl_spec.rb +++ b/spec/models/changes_acl_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicACL +# Unit tests for Falcon::ChangesACL # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicACL do - let(:instance) { Falcon::PublicACL.new } +describe Falcon::ChangesACL do + let(:instance) { Falcon::ChangesACL.new } - describe 'test an instance of PublicACL' do - it 'should create an instance of PublicACL' do - expect(instance).to be_instance_of(Falcon::PublicACL) + describe 'test an instance of ChangesACL' do + it 'should create an instance of ChangesACL' do + expect(instance).to be_instance_of(Falcon::ChangesACL) end end describe 'test attribute "acl_permission_change"' do diff --git a/spec/models/public_after_spec.rb b/spec/models/changes_after_spec.rb similarity index 85% rename from spec/models/public_after_spec.rb rename to spec/models/changes_after_spec.rb index 3967f9fb..8cbc9847 100644 --- a/spec/models/public_after_spec.rb +++ b/spec/models/changes_after_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicAfter +# Unit tests for Falcon::ChangesAfter # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicAfter do - let(:instance) { Falcon::PublicAfter.new } +describe Falcon::ChangesAfter do + let(:instance) { Falcon::ChangesAfter.new } - describe 'test an instance of PublicAfter' do - it 'should create an instance of PublicAfter' do - expect(instance).to be_instance_of(Falcon::PublicAfter) + describe 'test an instance of ChangesAfter' do + it 'should create an instance of ChangesAfter' do + expect(instance).to be_instance_of(Falcon::ChangesAfter) end end describe 'test attribute "id"' do diff --git a/spec/models/public_attribute_spec.rb b/spec/models/changes_attribute_spec.rb similarity index 84% rename from spec/models/public_attribute_spec.rb rename to spec/models/changes_attribute_spec.rb index 59b4fb73..dc6ba9e5 100644 --- a/spec/models/public_attribute_spec.rb +++ b/spec/models/changes_attribute_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicAttribute +# Unit tests for Falcon::ChangesAttribute # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicAttribute do - let(:instance) { Falcon::PublicAttribute.new } +describe Falcon::ChangesAttribute do + let(:instance) { Falcon::ChangesAttribute.new } - describe 'test an instance of PublicAttribute' do - it 'should create an instance of PublicAttribute' do - expect(instance).to be_instance_of(Falcon::PublicAttribute) + describe 'test an instance of ChangesAttribute' do + it 'should create an instance of ChangesAttribute' do + expect(instance).to be_instance_of(Falcon::ChangesAttribute) end end describe 'test attribute "attribute"' do diff --git a/spec/models/public_basic_spec.rb b/spec/models/changes_basic_spec.rb similarity index 87% rename from spec/models/public_basic_spec.rb rename to spec/models/changes_basic_spec.rb index 7a22765b..d9a5438f 100644 --- a/spec/models/public_basic_spec.rb +++ b/spec/models/changes_basic_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicBasic +# Unit tests for Falcon::ChangesBasic # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicBasic do - let(:instance) { Falcon::PublicBasic.new } +describe Falcon::ChangesBasic do + let(:instance) { Falcon::ChangesBasic.new } - describe 'test an instance of PublicBasic' do - it 'should create an instance of PublicBasic' do - expect(instance).to be_instance_of(Falcon::PublicBasic) + describe 'test an instance of ChangesBasic' do + it 'should create an instance of ChangesBasic' do + expect(instance).to be_instance_of(Falcon::ChangesBasic) end end describe 'test attribute "entity"' do diff --git a/spec/models/public_before_spec.rb b/spec/models/changes_before_spec.rb similarity index 85% rename from spec/models/public_before_spec.rb rename to spec/models/changes_before_spec.rb index 1b0d961b..2a36700c 100644 --- a/spec/models/public_before_spec.rb +++ b/spec/models/changes_before_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicBefore +# Unit tests for Falcon::ChangesBefore # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicBefore do - let(:instance) { Falcon::PublicBefore.new } +describe Falcon::ChangesBefore do + let(:instance) { Falcon::ChangesBefore.new } - describe 'test an instance of PublicBefore' do - it 'should create an instance of PublicBefore' do - expect(instance).to be_instance_of(Falcon::PublicBefore) + describe 'test an instance of ChangesBefore' do + it 'should create an instance of ChangesBefore' do + expect(instance).to be_instance_of(Falcon::ChangesBefore) end end describe 'test attribute "id"' do diff --git a/spec/models/public_change_spec.rb b/spec/models/changes_change_spec.rb similarity index 95% rename from spec/models/public_change_spec.rb rename to spec/models/changes_change_spec.rb index 2c0419f8..60bf707c 100644 --- a/spec/models/public_change_spec.rb +++ b/spec/models/changes_change_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicChange +# Unit tests for Falcon::ChangesChange # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicChange do - let(:instance) { Falcon::PublicChange.new } +describe Falcon::ChangesChange do + let(:instance) { Falcon::ChangesChange.new } - describe 'test an instance of PublicChange' do - it 'should create an instance of PublicChange' do - expect(instance).to be_instance_of(Falcon::PublicChange) + describe 'test an instance of ChangesChange' do + it 'should create an instance of ChangesChange' do + expect(instance).to be_instance_of(Falcon::ChangesChange) end end describe 'test attribute "action_timestamp"' do diff --git a/spec/models/public_dacl_entity_spec.rb b/spec/models/changes_dacl_entity_spec.rb similarity index 80% rename from spec/models/public_dacl_entity_spec.rb rename to spec/models/changes_dacl_entity_spec.rb index 2b859bd5..41b73720 100644 --- a/spec/models/public_dacl_entity_spec.rb +++ b/spec/models/changes_dacl_entity_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicDACLEntity +# Unit tests for Falcon::ChangesDACLEntity # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicDACLEntity do - let(:instance) { Falcon::PublicDACLEntity.new } +describe Falcon::ChangesDACLEntity do + let(:instance) { Falcon::ChangesDACLEntity.new } - describe 'test an instance of PublicDACLEntity' do - it 'should create an instance of PublicDACLEntity' do - expect(instance).to be_instance_of(Falcon::PublicDACLEntity) + describe 'test an instance of ChangesDACLEntity' do + it 'should create an instance of ChangesDACLEntity' do + expect(instance).to be_instance_of(Falcon::ChangesDACLEntity) end end describe 'test attribute "acl_change_type"' do @@ -60,6 +60,12 @@ end end + describe 'test attribute "acl_principal_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 "acl_type"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/public_dacl_spec.rb b/spec/models/changes_dacl_spec.rb similarity index 86% rename from spec/models/public_dacl_spec.rb rename to spec/models/changes_dacl_spec.rb index 662e1044..182ea36d 100644 --- a/spec/models/public_dacl_spec.rb +++ b/spec/models/changes_dacl_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicDACL +# Unit tests for Falcon::ChangesDACL # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicDACL do - let(:instance) { Falcon::PublicDACL.new } +describe Falcon::ChangesDACL do + let(:instance) { Falcon::ChangesDACL.new } - describe 'test an instance of PublicDACL' do - it 'should create an instance of PublicDACL' do - expect(instance).to be_instance_of(Falcon::PublicDACL) + describe 'test an instance of ChangesDACL' do + it 'should create an instance of ChangesDACL' do + expect(instance).to be_instance_of(Falcon::ChangesDACL) end end describe 'test attribute "changes_type"' do diff --git a/spec/models/public_diff_hash_spec.rb b/spec/models/changes_diff_hash_spec.rb similarity index 83% rename from spec/models/public_diff_hash_spec.rb rename to spec/models/changes_diff_hash_spec.rb index 30be3bf7..1bf587fd 100644 --- a/spec/models/public_diff_hash_spec.rb +++ b/spec/models/changes_diff_hash_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicDiffHash +# Unit tests for Falcon::ChangesDiffHash # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicDiffHash do - let(:instance) { Falcon::PublicDiffHash.new } +describe Falcon::ChangesDiffHash do + let(:instance) { Falcon::ChangesDiffHash.new } - describe 'test an instance of PublicDiffHash' do - it 'should create an instance of PublicDiffHash' do - expect(instance).to be_instance_of(Falcon::PublicDiffHash) + describe 'test an instance of ChangesDiffHash' do + it 'should create an instance of ChangesDiffHash' do + expect(instance).to be_instance_of(Falcon::ChangesDiffHash) end end describe 'test attribute "sha256"' do diff --git a/spec/models/public_diff_spec.rb b/spec/models/changes_diff_spec.rb similarity index 84% rename from spec/models/public_diff_spec.rb rename to spec/models/changes_diff_spec.rb index 09d00b52..b45b7232 100644 --- a/spec/models/public_diff_spec.rb +++ b/spec/models/changes_diff_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicDiff +# Unit tests for Falcon::ChangesDiff # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicDiff do - let(:instance) { Falcon::PublicDiff.new } +describe Falcon::ChangesDiff do + let(:instance) { Falcon::ChangesDiff.new } - describe 'test an instance of PublicDiff' do - it 'should create an instance of PublicDiff' do - expect(instance).to be_instance_of(Falcon::PublicDiff) + describe 'test an instance of ChangesDiff' do + it 'should create an instance of ChangesDiff' do + expect(instance).to be_instance_of(Falcon::ChangesDiff) end end describe 'test attribute "after"' do diff --git a/spec/models/public_diff_type_spec.rb b/spec/models/changes_diff_type_spec.rb similarity index 83% rename from spec/models/public_diff_type_spec.rb rename to spec/models/changes_diff_type_spec.rb index a09494f6..7fd0ae5c 100644 --- a/spec/models/public_diff_type_spec.rb +++ b/spec/models/changes_diff_type_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicDiffType +# Unit tests for Falcon::ChangesDiffType # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicDiffType do - let(:instance) { Falcon::PublicDiffType.new } +describe Falcon::ChangesDiffType do + let(:instance) { Falcon::ChangesDiffType.new } - describe 'test an instance of PublicDiffType' do - it 'should create an instance of PublicDiffType' do - expect(instance).to be_instance_of(Falcon::PublicDiffType) + describe 'test an instance of ChangesDiffType' do + it 'should create an instance of ChangesDiffType' do + expect(instance).to be_instance_of(Falcon::ChangesDiffType) end end describe 'test attribute "hash"' do diff --git a/spec/models/changes_get_changes_response_spec.rb b/spec/models/changes_get_changes_response_spec.rb new file mode 100644 index 00000000..09e7da9e --- /dev/null +++ b/spec/models/changes_get_changes_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::ChangesGetChangesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ChangesGetChangesResponse do + let(:instance) { Falcon::ChangesGetChangesResponse.new } + + describe 'test an instance of ChangesGetChangesResponse' do + it 'should create an instance of ChangesGetChangesResponse' do + expect(instance).to be_instance_of(Falcon::ChangesGetChangesResponse) + 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/public_owner_spec.rb b/spec/models/changes_group_spec.rb similarity index 85% rename from spec/models/public_owner_spec.rb rename to spec/models/changes_group_spec.rb index 10e13eaa..3192f1cd 100644 --- a/spec/models/public_owner_spec.rb +++ b/spec/models/changes_group_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicOwner +# Unit tests for Falcon::ChangesGroup # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicOwner do - let(:instance) { Falcon::PublicOwner.new } +describe Falcon::ChangesGroup do + let(:instance) { Falcon::ChangesGroup.new } - describe 'test an instance of PublicOwner' do - it 'should create an instance of PublicOwner' do - expect(instance).to be_instance_of(Falcon::PublicOwner) + describe 'test an instance of ChangesGroup' do + it 'should create an instance of ChangesGroup' do + expect(instance).to be_instance_of(Falcon::ChangesGroup) end end describe 'test attribute "after"' do diff --git a/spec/models/changes_high_volume_query_meta_spec.rb b/spec/models/changes_high_volume_query_meta_spec.rb new file mode 100644 index 00000000..c73cc19a --- /dev/null +++ b/spec/models/changes_high_volume_query_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::ChangesHighVolumeQueryMeta +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ChangesHighVolumeQueryMeta do + let(:instance) { Falcon::ChangesHighVolumeQueryMeta.new } + + describe 'test an instance of ChangesHighVolumeQueryMeta' do + it 'should create an instance of ChangesHighVolumeQueryMeta' do + expect(instance).to be_instance_of(Falcon::ChangesHighVolumeQueryMeta) + 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/changes_high_volume_query_paging_spec.rb b/spec/models/changes_high_volume_query_paging_spec.rb new file mode 100644 index 00000000..1356822f --- /dev/null +++ b/spec/models/changes_high_volume_query_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::ChangesHighVolumeQueryPaging +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ChangesHighVolumeQueryPaging do + let(:instance) { Falcon::ChangesHighVolumeQueryPaging.new } + + describe 'test an instance of ChangesHighVolumeQueryPaging' do + it 'should create an instance of ChangesHighVolumeQueryPaging' do + expect(instance).to be_instance_of(Falcon::ChangesHighVolumeQueryPaging) + 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/changes_high_volume_query_response_spec.rb b/spec/models/changes_high_volume_query_response_spec.rb new file mode 100644 index 00000000..a40cd484 --- /dev/null +++ b/spec/models/changes_high_volume_query_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::ChangesHighVolumeQueryResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ChangesHighVolumeQueryResponse do + let(:instance) { Falcon::ChangesHighVolumeQueryResponse.new } + + describe 'test an instance of ChangesHighVolumeQueryResponse' do + it 'should create an instance of ChangesHighVolumeQueryResponse' do + expect(instance).to be_instance_of(Falcon::ChangesHighVolumeQueryResponse) + 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/public_host_group_spec.rb b/spec/models/changes_host_group_spec.rb similarity index 83% rename from spec/models/public_host_group_spec.rb rename to spec/models/changes_host_group_spec.rb index 1ec4f42c..3e4709b3 100644 --- a/spec/models/public_host_group_spec.rb +++ b/spec/models/changes_host_group_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicHostGroup +# Unit tests for Falcon::ChangesHostGroup # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicHostGroup do - let(:instance) { Falcon::PublicHostGroup.new } +describe Falcon::ChangesHostGroup do + let(:instance) { Falcon::ChangesHostGroup.new } - describe 'test an instance of PublicHostGroup' do - it 'should create an instance of PublicHostGroup' do - expect(instance).to be_instance_of(Falcon::PublicHostGroup) + describe 'test an instance of ChangesHostGroup' do + it 'should create an instance of ChangesHostGroup' do + expect(instance).to be_instance_of(Falcon::ChangesHostGroup) end end describe 'test attribute "name"' do diff --git a/spec/models/public_host_spec.rb b/spec/models/changes_host_spec.rb similarity index 90% rename from spec/models/public_host_spec.rb rename to spec/models/changes_host_spec.rb index 4d333362..acb9df90 100644 --- a/spec/models/public_host_spec.rb +++ b/spec/models/changes_host_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicHost +# Unit tests for Falcon::ChangesHost # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicHost do - let(:instance) { Falcon::PublicHost.new } +describe Falcon::ChangesHost do + let(:instance) { Falcon::ChangesHost.new } - describe 'test an instance of PublicHost' do - it 'should create an instance of PublicHost' do - expect(instance).to be_instance_of(Falcon::PublicHost) + describe 'test an instance of ChangesHost' do + it 'should create an instance of ChangesHost' do + expect(instance).to be_instance_of(Falcon::ChangesHost) end end describe 'test attribute "agent_version"' do diff --git a/spec/models/public_group_spec.rb b/spec/models/changes_owner_spec.rb similarity index 85% rename from spec/models/public_group_spec.rb rename to spec/models/changes_owner_spec.rb index ed632bc1..94f1468c 100644 --- a/spec/models/public_group_spec.rb +++ b/spec/models/changes_owner_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicGroup +# Unit tests for Falcon::ChangesOwner # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicGroup do - let(:instance) { Falcon::PublicGroup.new } +describe Falcon::ChangesOwner do + let(:instance) { Falcon::ChangesOwner.new } - describe 'test an instance of PublicGroup' do - it 'should create an instance of PublicGroup' do - expect(instance).to be_instance_of(Falcon::PublicGroup) + describe 'test an instance of ChangesOwner' do + it 'should create an instance of ChangesOwner' do + expect(instance).to be_instance_of(Falcon::ChangesOwner) end end describe 'test attribute "after"' do diff --git a/spec/models/public_permissions_lin_spec.rb b/spec/models/changes_permissions_lin_spec.rb similarity index 87% rename from spec/models/public_permissions_lin_spec.rb rename to spec/models/changes_permissions_lin_spec.rb index 436b0a0a..73894659 100644 --- a/spec/models/public_permissions_lin_spec.rb +++ b/spec/models/changes_permissions_lin_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicPermissionsLin +# Unit tests for Falcon::ChangesPermissionsLin # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicPermissionsLin do - let(:instance) { Falcon::PublicPermissionsLin.new } +describe Falcon::ChangesPermissionsLin do + let(:instance) { Falcon::ChangesPermissionsLin.new } - describe 'test an instance of PublicPermissionsLin' do - it 'should create an instance of PublicPermissionsLin' do - expect(instance).to be_instance_of(Falcon::PublicPermissionsLin) + describe 'test an instance of ChangesPermissionsLin' do + it 'should create an instance of ChangesPermissionsLin' do + expect(instance).to be_instance_of(Falcon::ChangesPermissionsLin) end end describe 'test attribute "acl"' do diff --git a/spec/models/public_permissions_spec.rb b/spec/models/changes_permissions_spec.rb similarity index 86% rename from spec/models/public_permissions_spec.rb rename to spec/models/changes_permissions_spec.rb index 966a9153..7791ba8f 100644 --- a/spec/models/public_permissions_spec.rb +++ b/spec/models/changes_permissions_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicPermissions +# Unit tests for Falcon::ChangesPermissions # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicPermissions do - let(:instance) { Falcon::PublicPermissions.new } +describe Falcon::ChangesPermissions do + let(:instance) { Falcon::ChangesPermissions.new } - describe 'test an instance of PublicPermissions' do - it 'should create an instance of PublicPermissions' do - expect(instance).to be_instance_of(Falcon::PublicPermissions) + describe 'test an instance of ChangesPermissions' do + it 'should create an instance of ChangesPermissions' do + expect(instance).to be_instance_of(Falcon::ChangesPermissions) end end describe 'test attribute "dacl"' do diff --git a/spec/models/public_policy_rule_group_spec.rb b/spec/models/changes_policy_rule_group_spec.rb similarity index 83% rename from spec/models/public_policy_rule_group_spec.rb rename to spec/models/changes_policy_rule_group_spec.rb index 053a5b87..7a165912 100644 --- a/spec/models/public_policy_rule_group_spec.rb +++ b/spec/models/changes_policy_rule_group_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicPolicyRuleGroup +# Unit tests for Falcon::ChangesPolicyRuleGroup # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicPolicyRuleGroup do - let(:instance) { Falcon::PublicPolicyRuleGroup.new } +describe Falcon::ChangesPolicyRuleGroup do + let(:instance) { Falcon::ChangesPolicyRuleGroup.new } - describe 'test an instance of PublicPolicyRuleGroup' do - it 'should create an instance of PublicPolicyRuleGroup' do - expect(instance).to be_instance_of(Falcon::PublicPolicyRuleGroup) + describe 'test an instance of ChangesPolicyRuleGroup' do + it 'should create an instance of ChangesPolicyRuleGroup' do + expect(instance).to be_instance_of(Falcon::ChangesPolicyRuleGroup) end end describe 'test attribute "name"' do diff --git a/spec/models/public_policy_rule_spec.rb b/spec/models/changes_policy_rule_spec.rb similarity index 83% rename from spec/models/public_policy_rule_spec.rb rename to spec/models/changes_policy_rule_spec.rb index 36e65396..37d724f2 100644 --- a/spec/models/public_policy_rule_spec.rb +++ b/spec/models/changes_policy_rule_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicPolicyRule +# Unit tests for Falcon::ChangesPolicyRule # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicPolicyRule do - let(:instance) { Falcon::PublicPolicyRule.new } +describe Falcon::ChangesPolicyRule do + let(:instance) { Falcon::ChangesPolicyRule.new } - describe 'test an instance of PublicPolicyRule' do - it 'should create an instance of PublicPolicyRule' do - expect(instance).to be_instance_of(Falcon::PublicPolicyRule) + describe 'test an instance of ChangesPolicyRule' do + it 'should create an instance of ChangesPolicyRule' do + expect(instance).to be_instance_of(Falcon::ChangesPolicyRule) end end describe 'test attribute "base_path"' do diff --git a/spec/models/public_policy_spec.rb b/spec/models/changes_policy_spec.rb similarity index 85% rename from spec/models/public_policy_spec.rb rename to spec/models/changes_policy_spec.rb index 927fa70b..cced2d69 100644 --- a/spec/models/public_policy_spec.rb +++ b/spec/models/changes_policy_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicPolicy +# Unit tests for Falcon::ChangesPolicy # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicPolicy do - let(:instance) { Falcon::PublicPolicy.new } +describe Falcon::ChangesPolicy do + let(:instance) { Falcon::ChangesPolicy.new } - describe 'test an instance of PublicPolicy' do - it 'should create an instance of PublicPolicy' do - expect(instance).to be_instance_of(Falcon::PublicPolicy) + describe 'test an instance of ChangesPolicy' do + it 'should create an instance of ChangesPolicy' do + expect(instance).to be_instance_of(Falcon::ChangesPolicy) end end describe 'test attribute "name"' do diff --git a/spec/models/public_prevalence_spec.rb b/spec/models/changes_prevalence_spec.rb similarity index 86% rename from spec/models/public_prevalence_spec.rb rename to spec/models/changes_prevalence_spec.rb index 4beb23ce..a4c49a31 100644 --- a/spec/models/public_prevalence_spec.rb +++ b/spec/models/changes_prevalence_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicPrevalence +# Unit tests for Falcon::ChangesPrevalence # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicPrevalence do - let(:instance) { Falcon::PublicPrevalence.new } +describe Falcon::ChangesPrevalence do + let(:instance) { Falcon::ChangesPrevalence.new } - describe 'test an instance of PublicPrevalence' do - it 'should create an instance of PublicPrevalence' do - expect(instance).to be_instance_of(Falcon::PublicPrevalence) + describe 'test an instance of ChangesPrevalence' do + it 'should create an instance of ChangesPrevalence' do + expect(instance).to be_instance_of(Falcon::ChangesPrevalence) end end describe 'test attribute "computed_timestamp"' do diff --git a/spec/models/public_tag_spec.rb b/spec/models/changes_tag_spec.rb similarity index 85% rename from spec/models/public_tag_spec.rb rename to spec/models/changes_tag_spec.rb index fde55c1b..7319c5b0 100644 --- a/spec/models/public_tag_spec.rb +++ b/spec/models/changes_tag_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicTag +# Unit tests for Falcon::ChangesTag # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicTag do - let(:instance) { Falcon::PublicTag.new } +describe Falcon::ChangesTag do + let(:instance) { Falcon::ChangesTag.new } - describe 'test an instance of PublicTag' do - it 'should create an instance of PublicTag' do - expect(instance).to be_instance_of(Falcon::PublicTag) + describe 'test an instance of ChangesTag' do + it 'should create an instance of ChangesTag' do + expect(instance).to be_instance_of(Falcon::ChangesTag) end end describe 'test attribute "name"' do diff --git a/spec/models/client_action_request_spec.rb b/spec/models/client_action_request_spec.rb new file mode 100644 index 00000000..90476a4c --- /dev/null +++ b/spec/models/client_action_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::ClientActionRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientActionRequest do + let(:instance) { Falcon::ClientActionRequest.new } + + describe 'test an instance of ClientActionRequest' do + it 'should create an instance of ClientActionRequest' do + expect(instance).to be_instance_of(Falcon::ClientActionRequest) + 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/client_cost_spec.rb b/spec/models/client_cost_spec.rb new file mode 100644 index 00000000..40a8f9d1 --- /dev/null +++ b/spec/models/client_cost_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::ClientCost +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientCost do + let(:instance) { Falcon::ClientCost.new } + + describe 'test an instance of ClientCost' do + it 'should create an instance of ClientCost' do + expect(instance).to be_instance_of(Falcon::ClientCost) + end + end + describe 'test attribute "live_cost"' 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_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 "static_cost"' 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_costs_spec.rb b/spec/models/client_costs_spec.rb new file mode 100644 index 00000000..416ffe36 --- /dev/null +++ b/spec/models/client_costs_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::ClientCosts +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientCosts do + let(:instance) { Falcon::ClientCosts.new } + + describe 'test an instance of ClientCosts' do + it 'should create an instance of ClientCosts' do + expect(instance).to be_instance_of(Falcon::ClientCosts) + end + end + describe 'test attribute "live_cost"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "live_cost_rate"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "static_cost"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "static_cost_rate"' 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_data_ingest_response_v1_spec.rb b/spec/models/client_data_ingest_response_v1_spec.rb new file mode 100644 index 00000000..018dad07 --- /dev/null +++ b/spec/models/client_data_ingest_response_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::ClientDataIngestResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientDataIngestResponseV1 do + let(:instance) { Falcon::ClientDataIngestResponseV1.new } + + describe 'test an instance of ClientDataIngestResponseV1' do + it 'should create an instance of ClientDataIngestResponseV1' do + expect(instance).to be_instance_of(Falcon::ClientDataIngestResponseV1) + 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 "rows_written"' 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_data_ingest_response_wrapper_v1_spec.rb b/spec/models/client_data_ingest_response_wrapper_v1_spec.rb new file mode 100644 index 00000000..e6331c8d --- /dev/null +++ b/spec/models/client_data_ingest_response_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::ClientDataIngestResponseWrapperV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientDataIngestResponseWrapperV1 do + let(:instance) { Falcon::ClientDataIngestResponseWrapperV1.new } + + describe 'test an instance of ClientDataIngestResponseWrapperV1' do + it 'should create an instance of ClientDataIngestResponseWrapperV1' do + expect(instance).to be_instance_of(Falcon::ClientDataIngestResponseWrapperV1) + 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/client_digest_flow_spec.rb b/spec/models/client_digest_flow_spec.rb new file mode 100644 index 00000000..9812b0d0 --- /dev/null +++ b/spec/models/client_digest_flow_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::ClientDigestFlow +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientDigestFlow do + let(:instance) { Falcon::ClientDigestFlow.new } + + describe 'test an instance of ClientDigestFlow' do + it 'should create an instance of ClientDigestFlow' do + expect(instance).to be_instance_of(Falcon::ClientDigestFlow) + end + end + describe 'test attribute "ingest_time_known_good"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_ingest_latency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "min_ingest_time_included"' 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_extra_in_spec.rb b/spec/models/client_extra_in_spec.rb new file mode 100644 index 00000000..5c4748a8 --- /dev/null +++ b/spec/models/client_extra_in_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::ClientExtraIn +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientExtraIn do + let(:instance) { Falcon::ClientExtraIn.new } + + describe 'test an instance of ClientExtraIn' do + it 'should create an instance of ClientExtraIn' do + expect(instance).to be_instance_of(Falcon::ClientExtraIn) + 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 "values"' 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_extra_limit_spec.rb b/spec/models/client_extra_limit_spec.rb new file mode 100644 index 00000000..404a1e16 --- /dev/null +++ b/spec/models/client_extra_limit_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::ClientExtraLimit +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientExtraLimit do + let(:instance) { Falcon::ClientExtraLimit.new } + + describe 'test an instance of ClientExtraLimit' do + it 'should create an instance of ClientExtraLimit' do + expect(instance).to be_instance_of(Falcon::ClientExtraLimit) + end + end + describe 'test attribute "from"' 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 + +end diff --git a/spec/models/client_extra_rename_spec.rb b/spec/models/client_extra_rename_spec.rb new file mode 100644 index 00000000..b703a6d7 --- /dev/null +++ b/spec/models/client_extra_rename_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::ClientExtraRename +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientExtraRename do + let(:instance) { Falcon::ClientExtraRename.new } + + describe 'test an instance of ClientExtraRename' do + it 'should create an instance of ClientExtraRename' do + expect(instance).to be_instance_of(Falcon::ClientExtraRename) + end + end + describe 'test attribute "as"' 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"' 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_extra_sort_spec.rb b/spec/models/client_extra_sort_spec.rb new file mode 100644 index 00000000..688686b8 --- /dev/null +++ b/spec/models/client_extra_sort_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::ClientExtraSort +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientExtraSort do + let(:instance) { Falcon::ClientExtraSort.new } + + describe 'test an instance of ClientExtraSort' do + it 'should create an instance of ClientExtraSort' do + expect(instance).to be_instance_of(Falcon::ClientExtraSort) + end + end + describe 'test attribute "fields"' 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 "order"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reverse"' 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 + +end diff --git a/spec/models/client_field_spec.rb b/spec/models/client_field_spec.rb new file mode 100644 index 00000000..1d476bbe --- /dev/null +++ b/spec/models/client_field_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::ClientField +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientField do + let(:instance) { Falcon::ClientField.new } + + describe 'test an instance of ClientField' do + it 'should create an instance of ClientField' do + expect(instance).to be_instance_of(Falcon::ClientField) + 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 "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 "top_values"' 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_job_status_spec.rb b/spec/models/client_job_status_spec.rb new file mode 100644 index 00000000..c6890401 --- /dev/null +++ b/spec/models/client_job_status_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::ClientJobStatus +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientJobStatus do + let(:instance) { Falcon::ClientJobStatus.new } + + describe 'test an instance of ClientJobStatus' do + it 'should create an instance of ClientJobStatus' do + expect(instance).to be_instance_of(Falcon::ClientJobStatus) + end + end + describe 'test attribute "content_length"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "digest_algo"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "digest_hex"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "event_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 "file_link"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "job_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 "job_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 "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 "percent_complete"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "result_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 "run_duration"' 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/client_query_response_schemas_v1_spec.rb b/spec/models/client_query_response_schemas_v1_spec.rb new file mode 100644 index 00000000..ae156597 --- /dev/null +++ b/spec/models/client_query_response_schemas_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::ClientQueryResponseSchemasV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientQueryResponseSchemasV1 do + let(:instance) { Falcon::ClientQueryResponseSchemasV1.new } + + describe 'test an instance of ClientQueryResponseSchemasV1' do + it 'should create an instance of ClientQueryResponseSchemasV1' do + expect(instance).to be_instance_of(Falcon::ClientQueryResponseSchemasV1) + end + end + describe 'test attribute "request_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 "response_schema"' 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_query_result_metadata_spec.rb b/spec/models/client_query_result_metadata_spec.rb new file mode 100644 index 00000000..c9a95669 --- /dev/null +++ b/spec/models/client_query_result_metadata_spec.rb @@ -0,0 +1,159 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ClientQueryResultMetadata +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientQueryResultMetadata do + let(:instance) { Falcon::ClientQueryResultMetadata.new } + + describe 'test an instance of ClientQueryResultMetadata' do + it 'should create an instance of ClientQueryResultMetadata' do + expect(instance).to be_instance_of(Falcon::ClientQueryResultMetadata) + end + end + describe 'test attribute "costs"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "digest_flow"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "event_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 "extra_data"' 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_order"' 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_aggregate"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "poll_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 "processed_bytes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "processed_events"' 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_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 "query_spent"' 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_start"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "quota_total_spent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "responder_v_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 "result_buffer_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 "time_millis"' 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_work"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "warnings"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "work_done"' 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_repository_spec.rb b/spec/models/client_repository_spec.rb new file mode 100644 index 00000000..a03569f7 --- /dev/null +++ b/spec/models/client_repository_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::ClientRepository +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientRepository do + let(:instance) { Falcon::ClientRepository.new } + + describe 'test an instance of ClientRepository' do + it 'should create an instance of ClientRepository' do + expect(instance).to be_instance_of(Falcon::ClientRepository) + 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 "space_used"' 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_spent_spec.rb b/spec/models/client_spent_spec.rb new file mode 100644 index 00000000..8d8fbc77 --- /dev/null +++ b/spec/models/client_spent_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::ClientSpent +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientSpent do + let(:instance) { Falcon::ClientSpent.new } + + describe 'test an instance of ClientSpent' do + it 'should create an instance of ClientSpent' do + expect(instance).to be_instance_of(Falcon::ClientSpent) + end + end + describe 'test attribute "day"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hour"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "one_minute"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ten_minutes"' 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_system_definition_create_response_spec.rb b/spec/models/client_system_definition_create_response_spec.rb new file mode 100644 index 00000000..7dbb627f --- /dev/null +++ b/spec/models/client_system_definition_create_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::ClientSystemDefinitionCreateResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientSystemDefinitionCreateResponse do + let(:instance) { Falcon::ClientSystemDefinitionCreateResponse.new } + + describe 'test an instance of ClientSystemDefinitionCreateResponse' do + it 'should create an instance of ClientSystemDefinitionCreateResponse' do + expect(instance).to be_instance_of(Falcon::ClientSystemDefinitionCreateResponse) + 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/client_system_definition_de_provision_request_spec.rb b/spec/models/client_system_definition_de_provision_request_spec.rb new file mode 100644 index 00000000..60a5e059 --- /dev/null +++ b/spec/models/client_system_definition_de_provision_request_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::ClientSystemDefinitionDeProvisionRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientSystemDefinitionDeProvisionRequest do + let(:instance) { Falcon::ClientSystemDefinitionDeProvisionRequest.new } + + describe 'test an instance of ClientSystemDefinitionDeProvisionRequest' do + it 'should create an instance of ClientSystemDefinitionDeProvisionRequest' do + expect(instance).to be_instance_of(Falcon::ClientSystemDefinitionDeProvisionRequest) + end + end + describe 'test attribute "definition_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 "deprovision_all"' 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 + + describe 'test attribute "template_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/client_system_definition_promote_request_spec.rb b/spec/models/client_system_definition_promote_request_spec.rb new file mode 100644 index 00000000..4406b572 --- /dev/null +++ b/spec/models/client_system_definition_promote_request_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::ClientSystemDefinitionPromoteRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientSystemDefinitionPromoteRequest do + let(:instance) { Falcon::ClientSystemDefinitionPromoteRequest.new } + + describe 'test an instance of ClientSystemDefinitionPromoteRequest' do + it 'should create an instance of ClientSystemDefinitionPromoteRequest' do + expect(instance).to be_instance_of(Falcon::ClientSystemDefinitionPromoteRequest) + end + end + describe 'test attribute "customer_definition_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 "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 "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 "template_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 "template_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/client_system_definition_provision_request_spec.rb b/spec/models/client_system_definition_provision_request_spec.rb new file mode 100644 index 00000000..1735728a --- /dev/null +++ b/spec/models/client_system_definition_provision_request_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::ClientSystemDefinitionProvisionRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientSystemDefinitionProvisionRequest do + let(:instance) { Falcon::ClientSystemDefinitionProvisionRequest.new } + + describe 'test an instance of ClientSystemDefinitionProvisionRequest' do + it 'should create an instance of ClientSystemDefinitionProvisionRequest' do + expect(instance).to be_instance_of(Falcon::ClientSystemDefinitionProvisionRequest) + 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 "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 "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 "template_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 "template_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/client_top_value_spec.rb b/spec/models/client_top_value_spec.rb new file mode 100644 index 00000000..f327df13 --- /dev/null +++ b/spec/models/client_top_value_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::ClientTopValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ClientTopValue do + let(:instance) { Falcon::ClientTopValue.new } + + describe 'test an instance of ClientTopValue' do + it 'should create an instance of ClientTopValue' do + expect(instance).to be_instance_of(Falcon::ClientTopValue) + 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 "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/common_count_as_resource_spec.rb b/spec/models/common_count_as_resource_spec.rb new file mode 100644 index 00000000..fae8123e --- /dev/null +++ b/spec/models/common_count_as_resource_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::CommonCountAsResource +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::CommonCountAsResource do + let(:instance) { Falcon::CommonCountAsResource.new } + + describe 'test an instance of CommonCountAsResource' do + it 'should create an instance of CommonCountAsResource' do + expect(instance).to be_instance_of(Falcon::CommonCountAsResource) + 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 "label"' 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/common_count_response_spec.rb b/spec/models/common_count_response_spec.rb new file mode 100644 index 00000000..931dfbb9 --- /dev/null +++ b/spec/models/common_count_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::CommonCountResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::CommonCountResponse do + let(:instance) { Falcon::CommonCountResponse.new } + + describe 'test an instance of CommonCountResponse' do + it 'should create an instance of CommonCountResponse' do + expect(instance).to be_instance_of(Falcon::CommonCountResponse) + 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 + + 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/common_generic_entity_response_string_spec.rb b/spec/models/common_generic_entity_response_string_spec.rb new file mode 100644 index 00000000..f1caff15 --- /dev/null +++ b/spec/models/common_generic_entity_response_string_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::CommonGenericEntityResponseString +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::CommonGenericEntityResponseString do + let(:instance) { Falcon::CommonGenericEntityResponseString.new } + + describe 'test an instance of CommonGenericEntityResponseString' do + it 'should create an instance of CommonGenericEntityResponseString' do + expect(instance).to be_instance_of(Falcon::CommonGenericEntityResponseString) + 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/custom_type1255839303_spec.rb b/spec/models/custom_type1255839303_spec.rb new file mode 100644 index 00000000..f2064cf7 --- /dev/null +++ b/spec/models/custom_type1255839303_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::CustomType1255839303 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::CustomType1255839303 do + let(:instance) { Falcon::CustomType1255839303.new } + + describe 'test an instance of CustomType1255839303' do + it 'should create an instance of CustomType1255839303' do + expect(instance).to be_instance_of(Falcon::CustomType1255839303) + 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/custom_type3191042536_spec.rb b/spec/models/custom_type3191042536_spec.rb new file mode 100644 index 00000000..e0256a70 --- /dev/null +++ b/spec/models/custom_type3191042536_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::CustomType3191042536 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::CustomType3191042536 do + let(:instance) { Falcon::CustomType3191042536.new } + + describe 'test an instance of CustomType3191042536' do + it 'should create an instance of CustomType3191042536' do + expect(instance).to be_instance_of(Falcon::CustomType3191042536) + 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/definitions_definition_entities_response_spec.rb b/spec/models/definitions_definition_entities_response_spec.rb new file mode 100644 index 00000000..895187d9 --- /dev/null +++ b/spec/models/definitions_definition_entities_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::DefinitionsDefinitionEntitiesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsDefinitionEntitiesResponse do + let(:instance) { Falcon::DefinitionsDefinitionEntitiesResponse.new } + + describe 'test an instance of DefinitionsDefinitionEntitiesResponse' do + it 'should create an instance of DefinitionsDefinitionEntitiesResponse' do + expect(instance).to be_instance_of(Falcon::DefinitionsDefinitionEntitiesResponse) + 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/definitions_definition_ext_spec.rb b/spec/models/definitions_definition_ext_spec.rb new file mode 100644 index 00000000..a40856b8 --- /dev/null +++ b/spec/models/definitions_definition_ext_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::DefinitionsDefinitionExt +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsDefinitionExt do + let(:instance) { Falcon::DefinitionsDefinitionExt.new } + + describe 'test an instance of DefinitionsDefinitionExt' do + it 'should create an instance of DefinitionsDefinitionExt' do + expect(instance).to be_instance_of(Falcon::DefinitionsDefinitionExt) + 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 "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 "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_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/definitions_definition_external_response_spec.rb b/spec/models/definitions_definition_external_response_spec.rb new file mode 100644 index 00000000..bdd15811 --- /dev/null +++ b/spec/models/definitions_definition_external_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::DefinitionsDefinitionExternalResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsDefinitionExternalResponse do + let(:instance) { Falcon::DefinitionsDefinitionExternalResponse.new } + + describe 'test an instance of DefinitionsDefinitionExternalResponse' do + it 'should create an instance of DefinitionsDefinitionExternalResponse' do + expect(instance).to be_instance_of(Falcon::DefinitionsDefinitionExternalResponse) + 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/definitions_definition_import_response_entity_spec.rb b/spec/models/definitions_definition_import_response_entity_spec.rb new file mode 100644 index 00000000..c81eb01d --- /dev/null +++ b/spec/models/definitions_definition_import_response_entity_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::DefinitionsDefinitionImportResponseEntity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsDefinitionImportResponseEntity do + let(:instance) { Falcon::DefinitionsDefinitionImportResponseEntity.new } + + describe 'test an instance of DefinitionsDefinitionImportResponseEntity' do + it 'should create an instance of DefinitionsDefinitionImportResponseEntity' do + expect(instance).to be_instance_of(Falcon::DefinitionsDefinitionImportResponseEntity) + 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 "model"' 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 "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 "validation_errors"' 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/definitions_definition_import_response_spec.rb b/spec/models/definitions_definition_import_response_spec.rb new file mode 100644 index 00000000..5234b61d --- /dev/null +++ b/spec/models/definitions_definition_import_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::DefinitionsDefinitionImportResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsDefinitionImportResponse do + let(:instance) { Falcon::DefinitionsDefinitionImportResponse.new } + + describe 'test an instance of DefinitionsDefinitionImportResponse' do + it 'should create an instance of DefinitionsDefinitionImportResponse' do + expect(instance).to be_instance_of(Falcon::DefinitionsDefinitionImportResponse) + 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/definitions_flight_control_request_spec.rb b/spec/models/definitions_flight_control_request_spec.rb new file mode 100644 index 00000000..47fc2672 --- /dev/null +++ b/spec/models/definitions_flight_control_request_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::DefinitionsFlightControlRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsFlightControlRequest do + let(:instance) { Falcon::DefinitionsFlightControlRequest.new } + + describe 'test an instance of DefinitionsFlightControlRequest' do + it 'should create an instance of DefinitionsFlightControlRequest' do + expect(instance).to be_instance_of(Falcon::DefinitionsFlightControlRequest) + end + end + describe 'test attribute "all_cids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "excluded_cids"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "include_parent_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 "selected_cids"' 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/definitions_parameter_property_spec.rb b/spec/models/definitions_parameter_property_spec.rb new file mode 100644 index 00000000..8604e452 --- /dev/null +++ b/spec/models/definitions_parameter_property_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::DefinitionsParameterProperty +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsParameterProperty do + let(:instance) { Falcon::DefinitionsParameterProperty.new } + + describe 'test an instance of DefinitionsParameterProperty' do + it 'should create an instance of DefinitionsParameterProperty' do + expect(instance).to be_instance_of(Falcon::DefinitionsParameterProperty) + 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/definitions_playbook_parameter_spec.rb b/spec/models/definitions_playbook_parameter_spec.rb new file mode 100644 index 00000000..e9198456 --- /dev/null +++ b/spec/models/definitions_playbook_parameter_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::DefinitionsPlaybookParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DefinitionsPlaybookParameter do + let(:instance) { Falcon::DefinitionsPlaybookParameter.new } + + describe 'test an instance of DefinitionsPlaybookParameter' do + it 'should create an instance of DefinitionsPlaybookParameter' do + expect(instance).to be_instance_of(Falcon::DefinitionsPlaybookParameter) + end + end + describe 'test attribute "node_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 "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/detections_api_assessment_detections_spec.rb b/spec/models/detections_api_assessment_detections_spec.rb new file mode 100644 index 00000000..120b4507 --- /dev/null +++ b/spec/models/detections_api_assessment_detections_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::DetectionsApiAssessmentDetections +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectionsApiAssessmentDetections do + let(:instance) { Falcon::DetectionsApiAssessmentDetections.new } + + describe 'test an instance of DetectionsApiAssessmentDetections' do + it 'should create an instance of DetectionsApiAssessmentDetections' do + expect(instance).to be_instance_of(Falcon::DetectionsApiAssessmentDetections) + 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 + + 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/detections_api_combined_detections_spec.rb b/spec/models/detections_api_combined_detections_spec.rb new file mode 100644 index 00000000..a16bc83e --- /dev/null +++ b/spec/models/detections_api_combined_detections_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::DetectionsApiCombinedDetections +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectionsApiCombinedDetections do + let(:instance) { Falcon::DetectionsApiCombinedDetections.new } + + describe 'test an instance of DetectionsApiCombinedDetections' do + it 'should create an instance of DetectionsApiCombinedDetections' do + expect(instance).to be_instance_of(Falcon::DetectionsApiCombinedDetections) + 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 + + 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/detections_api_detections_by_severity_spec.rb b/spec/models/detections_api_detections_by_severity_spec.rb new file mode 100644 index 00000000..caa76494 --- /dev/null +++ b/spec/models/detections_api_detections_by_severity_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::DetectionsApiDetectionsBySeverity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectionsApiDetectionsBySeverity do + let(:instance) { Falcon::DetectionsApiDetectionsBySeverity.new } + + describe 'test an instance of DetectionsApiDetectionsBySeverity' do + it 'should create an instance of DetectionsApiDetectionsBySeverity' do + expect(instance).to be_instance_of(Falcon::DetectionsApiDetectionsBySeverity) + 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/detections_api_detections_by_type_spec.rb b/spec/models/detections_api_detections_by_type_spec.rb new file mode 100644 index 00000000..419f25b7 --- /dev/null +++ b/spec/models/detections_api_detections_by_type_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::DetectionsApiDetectionsByType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectionsApiDetectionsByType do + let(:instance) { Falcon::DetectionsApiDetectionsByType.new } + + describe 'test an instance of DetectionsApiDetectionsByType' do + it 'should create an instance of DetectionsApiDetectionsByType' do + expect(instance).to be_instance_of(Falcon::DetectionsApiDetectionsByType) + 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/detections_api_detections_count_spec.rb b/spec/models/detections_api_detections_count_spec.rb new file mode 100644 index 00000000..20c1d98f --- /dev/null +++ b/spec/models/detections_api_detections_count_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::DetectionsApiDetectionsCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectionsApiDetectionsCount do + let(:instance) { Falcon::DetectionsApiDetectionsCount.new } + + describe 'test an instance of DetectionsApiDetectionsCount' do + it 'should create an instance of DetectionsApiDetectionsCount' do + expect(instance).to be_instance_of(Falcon::DetectionsApiDetectionsCount) + 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 + + 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/detects_alert_spec.rb b/spec/models/detects_alert_spec.rb index 1c9a9f03..2e8050f5 100644 --- a/spec/models/detects_alert_spec.rb +++ b/spec/models/detects_alert_spec.rb @@ -114,6 +114,12 @@ end end + describe 'test attribute "data_domains"' 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/ @@ -132,6 +138,24 @@ end end + describe 'test attribute "es_doc_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 "es_doc_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 "es_routing_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 "external"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -168,6 +192,12 @@ end end + describe 'test attribute "poly_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 "product"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -192,6 +222,18 @@ end end + describe 'test attribute "source_products"' 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_vendors"' 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/ diff --git a/spec/models/detectsapi_aggregate_alert_query_request_spec.rb b/spec/models/detectsapi_aggregate_alert_query_request_spec.rb new file mode 100644 index 00000000..af6c31c9 --- /dev/null +++ b/spec/models/detectsapi_aggregate_alert_query_request_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::DetectsapiAggregateAlertQueryRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiAggregateAlertQueryRequest do + let(:instance) { Falcon::DetectsapiAggregateAlertQueryRequest.new } + + describe 'test an instance of DetectsapiAggregateAlertQueryRequest' do + it 'should create an instance of DetectsapiAggregateAlertQueryRequest' do + expect(instance).to be_instance_of(Falcon::DetectsapiAggregateAlertQueryRequest) + end + end + describe 'test attribute "date_ranges"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exclude"' 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"' 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 "from"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "include"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "interval"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_doc_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 "min_doc_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 "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 "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 "q"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ranges"' 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 "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 "sub_aggregates"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "time_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 "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/detectsapi_aggregates_response_spec.rb b/spec/models/detectsapi_aggregates_response_spec.rb new file mode 100644 index 00000000..4adc6fe0 --- /dev/null +++ b/spec/models/detectsapi_aggregates_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::DetectsapiAggregatesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiAggregatesResponse do + let(:instance) { Falcon::DetectsapiAggregatesResponse.new } + + describe 'test an instance of DetectsapiAggregatesResponse' do + it 'should create an instance of DetectsapiAggregatesResponse' do + expect(instance).to be_instance_of(Falcon::DetectsapiAggregatesResponse) + 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_aggregation_result_item_spec.rb b/spec/models/detectsapi_aggregation_result_item_spec.rb new file mode 100644 index 00000000..11210fdd --- /dev/null +++ b/spec/models/detectsapi_aggregation_result_item_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::DetectsapiAggregationResultItem +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiAggregationResultItem do + let(:instance) { Falcon::DetectsapiAggregationResultItem.new } + + describe 'test an instance of DetectsapiAggregationResultItem' do + it 'should create an instance of DetectsapiAggregationResultItem' do + expect(instance).to be_instance_of(Falcon::DetectsapiAggregationResultItem) + 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 "from"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "key_as_string"' 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 "string_from"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "string_to"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sub_aggregates"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "to"' 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 + + describe 'test attribute "value_as_string"' 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_aggregation_result_spec.rb b/spec/models/detectsapi_aggregation_result_spec.rb new file mode 100644 index 00000000..3e13647e --- /dev/null +++ b/spec/models/detectsapi_aggregation_result_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::DetectsapiAggregationResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiAggregationResult do + let(:instance) { Falcon::DetectsapiAggregationResult.new } + + describe 'test an instance of DetectsapiAggregationResult' do + it 'should create an instance of DetectsapiAggregationResult' do + expect(instance).to be_instance_of(Falcon::DetectsapiAggregationResult) + end + end + describe 'test attribute "buckets"' 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 "sum_other_doc_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/detectsapi_alert_query_response_spec.rb b/spec/models/detectsapi_alert_query_response_spec.rb new file mode 100644 index 00000000..295211fe --- /dev/null +++ b/spec/models/detectsapi_alert_query_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::DetectsapiAlertQueryResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiAlertQueryResponse do + let(:instance) { Falcon::DetectsapiAlertQueryResponse.new } + + describe 'test an instance of DetectsapiAlertQueryResponse' do + it 'should create an instance of DetectsapiAlertQueryResponse' do + expect(instance).to be_instance_of(Falcon::DetectsapiAlertQueryResponse) + 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_patch_entities_alerts_v3_request_spec.rb b/spec/models/detectsapi_patch_entities_alerts_v3_request_spec.rb new file mode 100644 index 00000000..c276c2de --- /dev/null +++ b/spec/models/detectsapi_patch_entities_alerts_v3_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::DetectsapiPatchEntitiesAlertsV3Request +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiPatchEntitiesAlertsV3Request do + let(:instance) { Falcon::DetectsapiPatchEntitiesAlertsV3Request.new } + + describe 'test an instance of DetectsapiPatchEntitiesAlertsV3Request' do + it 'should create an instance of DetectsapiPatchEntitiesAlertsV3Request' do + expect(instance).to be_instance_of(Falcon::DetectsapiPatchEntitiesAlertsV3Request) + end + end + describe 'test attribute "action_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 "composite_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/detectsapi_post_entities_alerts_v2_request_spec.rb b/spec/models/detectsapi_post_entities_alerts_v2_request_spec.rb new file mode 100644 index 00000000..f6da3297 --- /dev/null +++ b/spec/models/detectsapi_post_entities_alerts_v2_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::DetectsapiPostEntitiesAlertsV2Request +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiPostEntitiesAlertsV2Request do + let(:instance) { Falcon::DetectsapiPostEntitiesAlertsV2Request.new } + + describe 'test an instance of DetectsapiPostEntitiesAlertsV2Request' do + it 'should create an instance of DetectsapiPostEntitiesAlertsV2Request' do + expect(instance).to be_instance_of(Falcon::DetectsapiPostEntitiesAlertsV2Request) + end + end + describe 'test attribute "composite_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/detectsapi_post_entities_alerts_v2_response_spec.rb b/spec/models/detectsapi_post_entities_alerts_v2_response_spec.rb new file mode 100644 index 00000000..77ad0f47 --- /dev/null +++ b/spec/models/detectsapi_post_entities_alerts_v2_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::DetectsapiPostEntitiesAlertsV2Response +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiPostEntitiesAlertsV2Response do + let(:instance) { Falcon::DetectsapiPostEntitiesAlertsV2Response.new } + + describe 'test an instance of DetectsapiPostEntitiesAlertsV2Response' do + it 'should create an instance of DetectsapiPostEntitiesAlertsV2Response' do + expect(instance).to be_instance_of(Falcon::DetectsapiPostEntitiesAlertsV2Response) + 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_response_fields_spec.rb b/spec/models/detectsapi_response_fields_spec.rb new file mode 100644 index 00000000..2e66c373 --- /dev/null +++ b/spec/models/detectsapi_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::DetectsapiResponseFields +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DetectsapiResponseFields do + let(:instance) { Falcon::DetectsapiResponseFields.new } + + describe 'test an instance of DetectsapiResponseFields' do + it 'should create an instance of DetectsapiResponseFields' do + expect(instance).to be_instance_of(Falcon::DetectsapiResponseFields) + 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/device_device_spec.rb b/spec/models/device_device_spec.rb index d0a568d6..93307ffa 100644 --- a/spec/models/device_device_spec.rb +++ b/spec/models/device_device_spec.rb @@ -264,12 +264,24 @@ end end + describe 'test attribute "last_login_uid"' 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_login_user"' 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_login_user_sid"' 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_reboot"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/device_mapped_device_policies_spec.rb b/spec/models/device_mapped_device_policies_spec.rb index d72dacf2..f9955b1d 100644 --- a/spec/models/device_mapped_device_policies_spec.rb +++ b/spec/models/device_mapped_device_policies_spec.rb @@ -90,6 +90,12 @@ end end + describe 'test attribute "host_retention"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "identity_protection"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/deviceapi_device_swagger_spec.rb b/spec/models/deviceapi_device_swagger_spec.rb index a15bbfef..b4c15577 100644 --- a/spec/models/deviceapi_device_swagger_spec.rb +++ b/spec/models/deviceapi_device_swagger_spec.rb @@ -132,6 +132,12 @@ end end + describe 'test attribute "cpu_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 "default_gateway_ip"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -258,6 +264,24 @@ end end + describe 'test attribute "last_login_uid"' 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_login_user"' 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_login_user_sid"' 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_reboot"' 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_actor_document_spec.rb b/spec/models/domain_actor_document_spec.rb index db1a49b4..fd3a28cf 100644 --- a/spec/models/domain_actor_document_spec.rb +++ b/spec/models/domain_actor_document_spec.rb @@ -78,6 +78,24 @@ end end + describe 'test attribute "description_length"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "develops_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 "develops_threats_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 "ecrime_kill_chain"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -102,6 +120,30 @@ end end + describe 'test attribute "has_subgroup"' 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_subgroup_actors_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 "has_successor"' 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_successor_actors_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 "id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -114,6 +156,54 @@ end end + describe 'test attribute "in_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 "in_reports_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 "is_subgroup_of"' 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_subgroup_of_actors_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 "is_successor_of"' 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_successor_of_actors_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 "is_supported_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 "is_supported_by_actors_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 "kill_chain"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -186,6 +276,18 @@ end end + describe 'test attribute "sells_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 "sells_threats_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 "short_description"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -204,6 +306,18 @@ end end + describe 'test attribute "supports"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "supports_actors_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 "target_countries"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -234,4 +348,52 @@ end end + describe 'test attribute "uses_indicators_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 "uses_mitre_attacks_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 "uses_mitre_tactics_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 "uses_mitre_techniques_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 "uses_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 "uses_threats_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 "uses_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/domain_actor_entity_spec.rb b/spec/models/domain_actor_entity_spec.rb new file mode 100644 index 00000000..3c90bdfe --- /dev/null +++ b/spec/models/domain_actor_entity_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::DomainActorEntity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainActorEntity do + let(:instance) { Falcon::DomainActorEntity.new } + + describe 'test an instance of DomainActorEntity' do + it 'should create an instance of DomainActorEntity' do + expect(instance).to be_instance_of(Falcon::DomainActorEntity) + 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 "publish_flags"' 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_actor_news_document_spec.rb b/spec/models/domain_actor_news_document_spec.rb new file mode 100644 index 00000000..ab245ba8 --- /dev/null +++ b/spec/models/domain_actor_news_document_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::DomainActorNewsDocument +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainActorNewsDocument do + let(:instance) { Falcon::DomainActorNewsDocument.new } + + describe 'test an instance of DomainActorNewsDocument' do + it 'should create an instance of DomainActorNewsDocument' do + expect(instance).to be_instance_of(Falcon::DomainActorNewsDocument) + end + end + describe 'test attribute "created_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 "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 "slug"' 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_api_finding_rule_v1_spec.rb b/spec/models/domain_api_finding_rule_v1_spec.rb index c8041af7..af74874f 100644 --- a/spec/models/domain_api_finding_rule_v1_spec.rb +++ b/spec/models/domain_api_finding_rule_v1_spec.rb @@ -48,6 +48,12 @@ end end + describe 'test attribute "benchmark_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 "cce"' 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 "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 "policy_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/domain_api_finding_with_rule_v1_spec.rb b/spec/models/domain_api_finding_with_rule_v1_spec.rb index f7989839..b84ff32d 100644 --- a/spec/models/domain_api_finding_with_rule_v1_spec.rb +++ b/spec/models/domain_api_finding_with_rule_v1_spec.rb @@ -60,6 +60,12 @@ end end + describe 'test attribute "policy_host_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 "rule"' 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_api_host_info_facet_v1_spec.rb b/spec/models/domain_api_host_info_facet_v1_spec.rb index 4f0f88bf..99b36e3c 100644 --- a/spec/models/domain_api_host_info_facet_v1_spec.rb +++ b/spec/models/domain_api_host_info_facet_v1_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::DomainAPIHostInfoFacetV1) end end + describe 'test attribute "asset_criticality"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "build_number"' 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_api_rule_details_response_v1_spec.rb b/spec/models/domain_api_rule_details_response_v1_spec.rb new file mode 100644 index 00000000..1a7bbc1e --- /dev/null +++ b/spec/models/domain_api_rule_details_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::DomainAPIRuleDetailsResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainAPIRuleDetailsResponseV1 do + let(:instance) { Falcon::DomainAPIRuleDetailsResponseV1.new } + + describe 'test an instance of DomainAPIRuleDetailsResponseV1' do + it 'should create an instance of DomainAPIRuleDetailsResponseV1' do + expect(instance).to be_instance_of(Falcon::DomainAPIRuleDetailsResponseV1) + 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_api_rule_details_v1_spec.rb b/spec/models/domain_api_rule_details_v1_spec.rb new file mode 100644 index 00000000..f00b8a47 --- /dev/null +++ b/spec/models/domain_api_rule_details_v1_spec.rb @@ -0,0 +1,135 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::DomainAPIRuleDetailsV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainAPIRuleDetailsV1 do + let(:instance) { Falcon::DomainAPIRuleDetailsV1.new } + + describe 'test an instance of DomainAPIRuleDetailsV1' do + it 'should create an instance of DomainAPIRuleDetailsV1' do + expect(instance).to be_instance_of(Falcon::DomainAPIRuleDetailsV1) + end + end + describe 'test attribute "additional_information"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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 "assessment_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 "audit_procedure"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "authority"' 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_title"' 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 "impact_statement"' 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"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "rationale_statement"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "recommendation_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 "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_procedure"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/domain_api_vulnerability_app_v2_spec.rb b/spec/models/domain_api_vulnerability_app_v2_spec.rb index 3994e8cc..b9b75ea2 100644 --- a/spec/models/domain_api_vulnerability_app_v2_spec.rb +++ b/spec/models/domain_api_vulnerability_app_v2_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::DomainAPIVulnerabilityAppV2) end end + describe 'test attribute "product_name_normalized"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "product_name_version"' 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_api_vulnerability_cve_details_facet_v2_spec.rb b/spec/models/domain_api_vulnerability_cve_details_facet_v2_spec.rb index 66f36a21..cf04607b 100644 --- a/spec/models/domain_api_vulnerability_cve_details_facet_v2_spec.rb +++ b/spec/models/domain_api_vulnerability_cve_details_facet_v2_spec.rb @@ -132,6 +132,12 @@ end end + describe 'test attribute "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 "vector"' 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_api_vulnerability_extended_app_v2_spec.rb b/spec/models/domain_api_vulnerability_extended_app_v2_spec.rb index 1b9542c0..9bb7c71b 100644 --- a/spec/models/domain_api_vulnerability_extended_app_v2_spec.rb +++ b/spec/models/domain_api_vulnerability_extended_app_v2_spec.rb @@ -48,6 +48,12 @@ end end + describe 'test attribute "product_name_normalized"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "product_name_version"' 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_api_vulnerability_host_facet_v2_spec.rb b/spec/models/domain_api_vulnerability_host_facet_v2_spec.rb index aab653a8..df9e20e1 100644 --- a/spec/models/domain_api_vulnerability_host_facet_v2_spec.rb +++ b/spec/models/domain_api_vulnerability_host_facet_v2_spec.rb @@ -54,12 +54,6 @@ end end - describe 'test attribute "entity_graph_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/ diff --git a/spec/models/domain_api_vulnerability_v2_spec.rb b/spec/models/domain_api_vulnerability_v2_spec.rb index 7fe4ffe5..65911812 100644 --- a/spec/models/domain_api_vulnerability_v2_spec.rb +++ b/spec/models/domain_api_vulnerability_v2_spec.rb @@ -102,12 +102,6 @@ end end - describe 'test attribute "ports"' 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"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -138,10 +132,4 @@ end end - describe 'test attribute "vulnerability_metadata_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_asset_criticality_info_v1_spec.rb b/spec/models/domain_asset_criticality_info_v1_spec.rb new file mode 100644 index 00000000..f2eeb1ac --- /dev/null +++ b/spec/models/domain_asset_criticality_info_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::DomainAssetCriticalityInfoV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainAssetCriticalityInfoV1 do + let(:instance) { Falcon::DomainAssetCriticalityInfoV1.new } + + describe 'test an instance of DomainAssetCriticalityInfoV1' do + it 'should create an instance of DomainAssetCriticalityInfoV1' do + expect(instance).to be_instance_of(Falcon::DomainAssetCriticalityInfoV1) + end + end + describe 'test attribute "criticality"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "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 "roles"' 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_attachment_spec.rb b/spec/models/domain_attachment_spec.rb new file mode 100644 index 00000000..90a0e687 --- /dev/null +++ b/spec/models/domain_attachment_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::DomainAttachment +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainAttachment do + let(:instance) { Falcon::DomainAttachment.new } + + describe 'test an instance of DomainAttachment' do + it 'should create an instance of DomainAttachment' do + expect(instance).to be_instance_of(Falcon::DomainAttachment) + end + end + describe 'test attribute "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 "file_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 "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 "link"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "mime_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 "sha256"' 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_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/domain_aws_account_input_spec.rb b/spec/models/domain_aws_account_input_spec.rb new file mode 100644 index 00000000..c5589807 --- /dev/null +++ b/spec/models/domain_aws_account_input_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::DomainAWSAccountInput +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainAWSAccountInput do + let(:instance) { Falcon::DomainAWSAccountInput.new } + + describe 'test an instance of DomainAWSAccountInput' do + it 'should create an instance of DomainAWSAccountInput' do + expect(instance).to be_instance_of(Falcon::DomainAWSAccountInput) + end + end + describe 'test attribute "account_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 "batch_regions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "iam_external_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 "iam_role_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 "kms_alias"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "processing_account"' 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_v2_spec.rb b/spec/models/domain_aws_account_v2_spec.rb index 2ab952bd..fc33c67c 100644 --- a/spec/models/domain_aws_account_v2_spec.rb +++ b/spec/models/domain_aws_account_v2_spec.rb @@ -192,6 +192,12 @@ end end + describe 'test attribute "is_cspm_lite"' 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_custom_rolename"' 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_aws_batch_cluster_region_spec.rb b/spec/models/domain_aws_batch_cluster_region_spec.rb new file mode 100644 index 00000000..3e789dd6 --- /dev/null +++ b/spec/models/domain_aws_batch_cluster_region_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::DomainAWSBatchClusterRegion +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainAWSBatchClusterRegion do + let(:instance) { Falcon::DomainAWSBatchClusterRegion.new } + + describe 'test an instance of DomainAWSBatchClusterRegion' do + it 'should create an instance of DomainAWSBatchClusterRegion' do + expect(instance).to be_instance_of(Falcon::DomainAWSBatchClusterRegion) + end + end + describe 'test attribute "job_definition_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 "job_queue"' 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/domain_azure_management_group_role_assignment_spec.rb b/spec/models/domain_azure_management_group_role_assignment_spec.rb new file mode 100644 index 00000000..6fc409d6 --- /dev/null +++ b/spec/models/domain_azure_management_group_role_assignment_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::DomainAzureManagementGroupRoleAssignment +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainAzureManagementGroupRoleAssignment do + let(:instance) { Falcon::DomainAzureManagementGroupRoleAssignment.new } + + describe 'test an instance of DomainAzureManagementGroupRoleAssignment' do + it 'should create an instance of DomainAzureManagementGroupRoleAssignment' do + expect(instance).to be_instance_of(Falcon::DomainAzureManagementGroupRoleAssignment) + end + end + describe 'test attribute "management_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 "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 "role_definition_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 "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/domain_base_api_vulnerability_v2_spec.rb b/spec/models/domain_base_api_vulnerability_v2_spec.rb index c57baf81..0470d2cb 100644 --- a/spec/models/domain_base_api_vulnerability_v2_spec.rb +++ b/spec/models/domain_base_api_vulnerability_v2_spec.rb @@ -102,12 +102,6 @@ end end - describe 'test attribute "ports"' 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"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -138,10 +132,4 @@ end end - describe 'test attribute "vulnerability_metadata_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_breached_item_v1_spec.rb b/spec/models/domain_breached_item_v1_spec.rb index 7e39b46e..77133538 100644 --- a/spec/models/domain_breached_item_v1_spec.rb +++ b/spec/models/domain_breached_item_v1_spec.rb @@ -42,12 +42,24 @@ expect(instance).to be_instance_of(Falcon::DomainBreachedItemV1) end end + describe 'test attribute "bot"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "company"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end + describe 'test attribute "credential_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 "credentials_domain"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -114,6 +126,12 @@ end end + describe 'test attribute "malware_family"' 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/domain_card_spec.rb b/spec/models/domain_card_spec.rb new file mode 100644 index 00000000..209832b8 --- /dev/null +++ b/spec/models/domain_card_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::DomainCard +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainCard do + let(:instance) { Falcon::DomainCard.new } + + describe 'test an instance of DomainCard' do + it 'should create an instance of DomainCard' do + expect(instance).to be_instance_of(Falcon::DomainCard) + end + end + describe 'test attribute "bin_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 "cardholder_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 "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 "expiration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "issuing_bank"' 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_transaction_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 "servicecode"' 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_cid_group_spec.rb b/spec/models/domain_cid_group_spec.rb index d8b476eb..a7369a9a 100644 --- a/spec/models/domain_cid_group_spec.rb +++ b/spec/models/domain_cid_group_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::DomainCIDGroup) 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 "cid_group_id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -54,6 +60,12 @@ end end + describe 'test attribute "is_default"' 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/domain_cid_policy_assignments_spec.rb b/spec/models/domain_cid_policy_assignments_spec.rb index 1ec6dc0a..c788af5a 100644 --- a/spec/models/domain_cid_policy_assignments_spec.rb +++ b/spec/models/domain_cid_policy_assignments_spec.rb @@ -126,6 +126,18 @@ end end + describe 'test attribute "hipaa_benchmark"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hitrust_benchmark"' 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_remediable"' 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_cloud_scope_spec.rb b/spec/models/domain_cloud_scope_spec.rb index 028d0f23..3920b3db 100644 --- a/spec/models/domain_cloud_scope_spec.rb +++ b/spec/models/domain_cloud_scope_spec.rb @@ -102,4 +102,10 @@ 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 + end diff --git a/spec/models/domain_credentials_spec.rb b/spec/models/domain_credentials_spec.rb index 989407b9..8e7fb0f9 100644 --- a/spec/models/domain_credentials_spec.rb +++ b/spec/models/domain_credentials_spec.rb @@ -42,7 +42,19 @@ expect(instance).to be_instance_of(Falcon::DomainCredentials) end end - describe 'test attribute "token"' do + describe 'test attribute "sites_all"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sites_with_cookie_only"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sites_with_password"' 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/domain_device_policy_spec.rb b/spec/models/domain_device_policy_spec.rb new file mode 100644 index 00000000..45fac880 --- /dev/null +++ b/spec/models/domain_device_policy_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::DomainDevicePolicy +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainDevicePolicy do + let(:instance) { Falcon::DomainDevicePolicy.new } + + describe 'test an instance of DomainDevicePolicy' do + it 'should create an instance of DomainDevicePolicy' do + expect(instance).to be_instance_of(Falcon::DomainDevicePolicy) + end + end + describe 'test attribute "policy_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_device_spec.rb b/spec/models/domain_device_spec.rb index b0f2a4de..7bdab69c 100644 --- a/spec/models/domain_device_spec.rb +++ b/spec/models/domain_device_spec.rb @@ -78,6 +78,12 @@ end end + describe 'test attribute "device_policies"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "external_ip"' 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 deac7184..505910b2 100644 --- a/spec/models/domain_discover_api_host_spec.rb +++ b/spec/models/domain_discover_api_host_spec.rb @@ -204,6 +204,18 @@ end end + describe 'test attribute "computed_internet_exposure_external_ip"' 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_internet_exposure_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 "confidence"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -270,6 +282,12 @@ end end + describe 'test attribute "current_network_prefix"' 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_providers"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -306,6 +324,12 @@ end end + describe 'test attribute "discoverer_criticalities"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "discoverer_hostnames"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -756,4 +780,16 @@ end end + describe 'test attribute "user_asset_roles"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "user_internet_exposure"' 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_apiio_t_host_spec.rb b/spec/models/domain_discover_apiio_t_host_spec.rb index eeb6eed4..8f523af9 100644 --- a/spec/models/domain_discover_apiio_t_host_spec.rb +++ b/spec/models/domain_discover_apiio_t_host_spec.rb @@ -114,6 +114,24 @@ end end + describe 'test attribute "computed_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_internet_exposure_external_ip"' 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_internet_exposure_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 "confidence"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -210,6 +228,12 @@ end end + describe 'test attribute "dragos_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 "encrypted_drives"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -396,6 +420,18 @@ end end + describe 'test attribute "ot_information_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 "ot_serial_numbers"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "ou"' 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_msa_spec_meta_info_extension_spec.rb b/spec/models/domain_exposed_data_record_bot_location_v1_spec.rb similarity index 76% rename from spec/models/registration_msa_spec_meta_info_extension_spec.rb rename to spec/models/domain_exposed_data_record_bot_location_v1_spec.rb index bea3dba5..6cc604e7 100644 --- a/spec/models/registration_msa_spec_meta_info_extension_spec.rb +++ b/spec/models/domain_exposed_data_record_bot_location_v1_spec.rb @@ -31,24 +31,24 @@ require 'json' require 'date' -# Unit tests for Falcon::RegistrationMSASpecMetaInfoExtension +# Unit tests for Falcon::DomainExposedDataRecordBotLocationV1 # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::RegistrationMSASpecMetaInfoExtension do - let(:instance) { Falcon::RegistrationMSASpecMetaInfoExtension.new } +describe Falcon::DomainExposedDataRecordBotLocationV1 do + let(:instance) { Falcon::DomainExposedDataRecordBotLocationV1.new } - describe 'test an instance of RegistrationMSASpecMetaInfoExtension' do - it 'should create an instance of RegistrationMSASpecMetaInfoExtension' do - expect(instance).to be_instance_of(Falcon::RegistrationMSASpecMetaInfoExtension) + describe 'test an instance of DomainExposedDataRecordBotLocationV1' do + it 'should create an instance of DomainExposedDataRecordBotLocationV1' do + expect(instance).to be_instance_of(Falcon::DomainExposedDataRecordBotLocationV1) end end - describe 'test attribute "meta_info"' do + 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 "pagination"' do + describe 'test attribute "zip_code"' 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/domain_exposed_data_record_bot_operating_system_v1_spec.rb b/spec/models/domain_exposed_data_record_bot_operating_system_v1_spec.rb new file mode 100644 index 00000000..d250319e --- /dev/null +++ b/spec/models/domain_exposed_data_record_bot_operating_system_v1_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::DomainExposedDataRecordBotOperatingSystemV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainExposedDataRecordBotOperatingSystemV1 do + let(:instance) { Falcon::DomainExposedDataRecordBotOperatingSystemV1.new } + + describe 'test an instance of DomainExposedDataRecordBotOperatingSystemV1' do + it 'should create an instance of DomainExposedDataRecordBotOperatingSystemV1' do + expect(instance).to be_instance_of(Falcon::DomainExposedDataRecordBotOperatingSystemV1) + end + end + describe 'test attribute "antivirus"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "computer_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 "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 "hardware_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 "installed_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 "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 "layouts"' 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_architecture"' 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 "timezone"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uac"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "username"' 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_exposed_data_record_bot_v1_spec.rb b/spec/models/domain_exposed_data_record_bot_v1_spec.rb new file mode 100644 index 00000000..359fd4e9 --- /dev/null +++ b/spec/models/domain_exposed_data_record_bot_v1_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::DomainExposedDataRecordBotV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainExposedDataRecordBotV1 do + let(:instance) { Falcon::DomainExposedDataRecordBotV1.new } + + describe 'test an instance of DomainExposedDataRecordBotV1' do + it 'should create an instance of DomainExposedDataRecordBotV1' do + expect(instance).to be_instance_of(Falcon::DomainExposedDataRecordBotV1) + end + end + describe 'test attribute "bot_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 "domain_detects"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "infection_build_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 "infection_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 "infection_path"' 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"' 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 "operating_system"' 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_exposed_data_record_social_v1_spec.rb b/spec/models/domain_exposed_data_record_social_v1_spec.rb index ee0f83e8..f2be2fe3 100644 --- a/spec/models/domain_exposed_data_record_social_v1_spec.rb +++ b/spec/models/domain_exposed_data_record_social_v1_spec.rb @@ -90,4 +90,10 @@ end end + describe 'test attribute "vk_token"' 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_file_count_v2_spec.rb b/spec/models/domain_file_count_v2_spec.rb new file mode 100644 index 00000000..5c77a553 --- /dev/null +++ b/spec/models/domain_file_count_v2_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::DomainFileCountV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainFileCountV2 do + let(:instance) { Falcon::DomainFileCountV2.new } + + describe 'test an instance of DomainFileCountV2' do + it 'should create an instance of DomainFileCountV2' do + expect(instance).to be_instance_of(Falcon::DomainFileCountV2) + end + end + describe 'test attribute "malicious"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "quarantined"' 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 "skipped"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "traversed"' 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_fragment_info_spec.rb b/spec/models/domain_fragment_info_spec.rb new file mode 100644 index 00000000..59fb3d2e --- /dev/null +++ b/spec/models/domain_fragment_info_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::DomainFragmentInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainFragmentInfo do + let(:instance) { Falcon::DomainFragmentInfo.new } + + describe 'test an instance of DomainFragmentInfo' do + it 'should create an instance of DomainFragmentInfo' do + expect(instance).to be_instance_of(Falcon::DomainFragmentInfo) + end + end + describe 'test attribute "content_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 "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 "fragmented_fields"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "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 "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 "translated_content_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 "truncated_fields"' 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_gcp_account_v1_spec.rb b/spec/models/domain_gcp_account_v1_spec.rb index 8d42c912..2bbb766a 100644 --- a/spec/models/domain_gcp_account_v1_spec.rb +++ b/spec/models/domain_gcp_account_v1_spec.rb @@ -168,6 +168,12 @@ end end + describe 'test attribute "service_account_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 "status"' 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_host_spec.rb b/spec/models/domain_host_spec.rb new file mode 100644 index 00000000..8bead00c --- /dev/null +++ b/spec/models/domain_host_spec.rb @@ -0,0 +1,123 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::DomainHost +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainHost do + let(:instance) { Falcon::DomainHost.new } + + describe 'test an instance of DomainHost' do + it 'should create an instance of DomainHost' do + expect(instance).to be_instance_of(Falcon::DomainHost) + end + end + describe 'test attribute "admin_available"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "bandwidth_mbps"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "behind_nat"' 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"' 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_parsed"' 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 + + describe 'test attribute "os_banner"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ping_ms"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "processor_banner"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ram_gigs"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ssl_available"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tld"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uptime_hours"' 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_incident_spec.rb b/spec/models/domain_incident_spec.rb index 5d7820c5..6fa1667e 100644 --- a/spec/models/domain_incident_spec.rb +++ b/spec/models/domain_incident_spec.rb @@ -210,10 +210,4 @@ end end - describe 'test attribute "visibility"' 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_ioc_spec.rb b/spec/models/domain_ioc_spec.rb new file mode 100644 index 00000000..0edec818 --- /dev/null +++ b/spec/models/domain_ioc_spec.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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::DomainIOC +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainIOC do + let(:instance) { Falcon::DomainIOC.new } + + describe 'test an instance of DomainIOC' do + it 'should create an instance of DomainIOC' do + expect(instance).to be_instance_of(Falcon::DomainIOC) + end + end + describe 'test attribute "at_accounts"' 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_clis"' 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_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 "aws_secrets"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "bitcoin_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 "cves"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "discord_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "domains"' 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_domains"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "emails"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "emails_local_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 "ethereum_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 "generic_apis"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "github_apis"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "google_apis"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "hashtags"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "i2p_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "icq_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ips"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "magnet_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "md5s"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "monero_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 "onion_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "paste_urls"' 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_numbers"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "s3_buckets"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sha1s"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sha256s"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sha512s"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "skype_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "slack_apis"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sqs_queues"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "telegram_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "torrent_urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "urls"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "whatsapp_urls"' 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_item_details_v1_spec.rb b/spec/models/domain_item_details_v1_spec.rb new file mode 100644 index 00000000..5c9d3546 --- /dev/null +++ b/spec/models/domain_item_details_v1_spec.rb @@ -0,0 +1,207 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::DomainItemDetailsV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainItemDetailsV1 do + let(:instance) { Falcon::DomainItemDetailsV1.new } + + describe 'test an instance of DomainItemDetailsV1' do + it 'should create an instance of DomainItemDetailsV1' do + expect(instance).to be_instance_of(Falcon::DomainItemDetailsV1) + end + end + describe 'test attribute "actor_slug"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "attachments"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "author"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "author_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 "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 "collection_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 "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 "created_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 "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 "fragment_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 "ioc_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 "iocs"' 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 "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 "marketplace_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 "mime_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 "sha256"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "site"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "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 "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 "telegram_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 "thread_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 "title"' 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 "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 "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 "user_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_mapped_device_policies_spec.rb b/spec/models/domain_mapped_device_policies_spec.rb new file mode 100644 index 00000000..564f85b7 --- /dev/null +++ b/spec/models/domain_mapped_device_policies_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::DomainMappedDevicePolicies +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainMappedDevicePolicies do + let(:instance) { Falcon::DomainMappedDevicePolicies.new } + + describe 'test an instance of DomainMappedDevicePolicies' do + it 'should create an instance of DomainMappedDevicePolicies' do + expect(instance).to be_instance_of(Falcon::DomainMappedDevicePolicies) + end + end + describe 'test attribute "remote_response"' 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_marketplace_product_spec.rb b/spec/models/domain_marketplace_product_spec.rb new file mode 100644 index 00000000..9987b442 --- /dev/null +++ b/spec/models/domain_marketplace_product_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::DomainMarketplaceProduct +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainMarketplaceProduct do + let(:instance) { Falcon::DomainMarketplaceProduct.new } + + describe 'test an instance of DomainMarketplaceProduct' do + it 'should create an instance of DomainMarketplaceProduct' do + expect(instance).to be_instance_of(Falcon::DomainMarketplaceProduct) + end + end + describe 'test attribute "card"' 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_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 "credentials"' 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 "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 "price"' 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 + +end diff --git a/spec/models/domain_matched_breach_summary_v1_spec.rb b/spec/models/domain_matched_breach_summary_v1_spec.rb index 8f889c7f..e18ed826 100644 --- a/spec/models/domain_matched_breach_summary_v1_spec.rb +++ b/spec/models/domain_matched_breach_summary_v1_spec.rb @@ -54,6 +54,12 @@ end end + describe 'test attribute "credential_statuses"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "credentials_domains"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -114,6 +120,12 @@ end end + describe 'test attribute "is_retroactively_deduped"' 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/domain_meta_info_spec.rb b/spec/models/domain_meta_info_spec.rb index 65becd4e..6c113bd2 100644 --- a/spec/models/domain_meta_info_spec.rb +++ b/spec/models/domain_meta_info_spec.rb @@ -42,7 +42,19 @@ expect(instance).to be_instance_of(Falcon::DomainMetaInfo) end end - describe 'test attribute "msa_meta_info"' do + 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 @@ -54,4 +66,16 @@ 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/domain_news_document_spec.rb b/spec/models/domain_news_document_spec.rb index 7bea309a..611e7c1f 100644 --- a/spec/models/domain_news_document_spec.rb +++ b/spec/models/domain_news_document_spec.rb @@ -96,6 +96,12 @@ end end + describe 'test attribute "malware"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "motivations"' 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_notification_v1_spec.rb b/spec/models/domain_notification_v1_spec.rb index 2f829d6e..c0179249 100644 --- a/spec/models/domain_notification_v1_spec.rb +++ b/spec/models/domain_notification_v1_spec.rb @@ -42,6 +42,12 @@ expect(instance).to be_instance_of(Falcon::DomainNotificationV1) end end + describe 'test attribute "actor_slug"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "assigned_to_uid"' 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_policy_info_spec.rb b/spec/models/domain_policy_info_spec.rb index 2ce4bbb2..1fdd8d76 100644 --- a/spec/models/domain_policy_info_spec.rb +++ b/spec/models/domain_policy_info_spec.rb @@ -204,6 +204,18 @@ end end + describe 'test attribute "hipaa_benchmark_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 "hitrust_benchmark_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 "internal_only"' 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_report_malware_spec.rb b/spec/models/domain_report_malware_spec.rb new file mode 100644 index 00000000..a4c02e36 --- /dev/null +++ b/spec/models/domain_report_malware_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::DomainReportMalware +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainReportMalware do + let(:instance) { Falcon::DomainReportMalware.new } + + describe 'test an instance of DomainReportMalware' do + it 'should create an instance of DomainReportMalware' do + expect(instance).to be_instance_of(Falcon::DomainReportMalware) + end + end + describe 'test attribute "community_identifiers"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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 + + describe 'test attribute "slug"' 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_rule_spec.rb b/spec/models/domain_rule_spec.rb index f071f7be..9d53eb80 100644 --- a/spec/models/domain_rule_spec.rb +++ b/spec/models/domain_rule_spec.rb @@ -42,25 +42,25 @@ expect(instance).to be_instance_of(Falcon::DomainRule) end end - describe 'test attribute "created_date"' do + 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 "description"' do + describe 'test attribute "created_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 "id"' do + 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 "last_modified_date"' 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 @@ -72,25 +72,19 @@ end end - describe 'test attribute "rich_text_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 "short_description"' do + describe 'test attribute "rule_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 "tags"' do + describe 'test attribute "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 "type"' do + describe 'test attribute "value"' 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/domain_scan_profile_spec.rb b/spec/models/domain_scan_profile_spec.rb index 50c4c268..e9b668c7 100644 --- a/spec/models/domain_scan_profile_spec.rb +++ b/spec/models/domain_scan_profile_spec.rb @@ -210,4 +210,10 @@ end end + describe 'test attribute "targeted_host_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/domain_scan_spec.rb b/spec/models/domain_scan_spec.rb index 1ea1c828..7797a222 100644 --- a/spec/models/domain_scan_spec.rb +++ b/spec/models/domain_scan_spec.rb @@ -66,6 +66,12 @@ end end + describe 'test attribute "completed_host_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 "cpu_priority"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -126,6 +132,12 @@ end end + describe 'test attribute "incomplete_host_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 "initiated_from"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -156,6 +168,18 @@ end end + describe 'test attribute "missing_host_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 "not_started_host_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 "pause_duration"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -204,6 +228,12 @@ end end + describe 'test attribute "scan_scheduled_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 "scan_started_on"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -228,10 +258,22 @@ end end + describe 'test attribute "started_host_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 "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 "targeted_host_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/domain_scan_v2_spec.rb b/spec/models/domain_scan_v2_spec.rb new file mode 100644 index 00000000..0c0f8c16 --- /dev/null +++ b/spec/models/domain_scan_v2_spec.rb @@ -0,0 +1,273 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::DomainScanV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainScanV2 do + let(:instance) { Falcon::DomainScanV2.new } + + describe 'test an instance of DomainScanV2' do + it 'should create an instance of DomainScanV2' do + expect(instance).to be_instance_of(Falcon::DomainScanV2) + end + end + describe 'test attribute "affected_hosts_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 "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_ml_level_detection"' 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_ml_level_prevention"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completed_host_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 "cpu_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 "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/ + 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 "endpoint_notification"' 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_paths"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "filecount"' 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_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 "hosts"' 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 "incomplete_host_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 "initiated_from"' 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 "max_duration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_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 "metadata"' 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_host_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 "not_started_host_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 "pause_duration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "policy_setting"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "preemption_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 "profile_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 "quarantine"' 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_completed_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 "scan_exclusions"' 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_inclusions"' 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_started_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 "sensor_ml_level_detection"' 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_ml_level_prevention"' 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 "started_host_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 "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 "targeted_host_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/domain_schedule_spec.rb b/spec/models/domain_schedule_spec.rb index 76afec92..4dc71e4e 100644 --- a/spec/models/domain_schedule_spec.rb +++ b/spec/models/domain_schedule_spec.rb @@ -42,19 +42,19 @@ expect(instance).to be_instance_of(Falcon::DomainSchedule) end end - describe 'test attribute "can_stagger"' do + describe 'test attribute "ignored_by_channelfile"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "definition"' do + describe 'test attribute "interval"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "display"' do + 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 diff --git a/spec/models/domain_telegram_channel_info_spec.rb b/spec/models/domain_telegram_channel_info_spec.rb new file mode 100644 index 00000000..82698622 --- /dev/null +++ b/spec/models/domain_telegram_channel_info_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::DomainTelegramChannelInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainTelegramChannelInfo do + let(:instance) { Falcon::DomainTelegramChannelInfo.new } + + describe 'test an instance of DomainTelegramChannelInfo' do + it 'should create an instance of DomainTelegramChannelInfo' do + expect(instance).to be_instance_of(Falcon::DomainTelegramChannelInfo) + 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 + + 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/domain_telegram_info_spec.rb b/spec/models/domain_telegram_info_spec.rb new file mode 100644 index 00000000..9651eee4 --- /dev/null +++ b/spec/models/domain_telegram_info_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::DomainTelegramInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainTelegramInfo do + let(:instance) { Falcon::DomainTelegramInfo.new } + + describe 'test an instance of DomainTelegramInfo' do + it 'should create an instance of DomainTelegramInfo' do + expect(instance).to be_instance_of(Falcon::DomainTelegramInfo) + end + end + describe 'test attribute "channel_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 "recipient_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 "sender_info"' 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_telegram_recipient_info_spec.rb b/spec/models/domain_telegram_recipient_info_spec.rb new file mode 100644 index 00000000..8ae23cfe --- /dev/null +++ b/spec/models/domain_telegram_recipient_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::DomainTelegramRecipientInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainTelegramRecipientInfo do + let(:instance) { Falcon::DomainTelegramRecipientInfo.new } + + describe 'test an instance of DomainTelegramRecipientInfo' do + it 'should create an instance of DomainTelegramRecipientInfo' do + expect(instance).to be_instance_of(Falcon::DomainTelegramRecipientInfo) + end + end + describe 'test attribute "first_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 "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_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 "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 "username"' 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_telegram_sender_info_spec.rb b/spec/models/domain_telegram_sender_info_spec.rb new file mode 100644 index 00000000..f256f848 --- /dev/null +++ b/spec/models/domain_telegram_sender_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::DomainTelegramSenderInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainTelegramSenderInfo do + let(:instance) { Falcon::DomainTelegramSenderInfo.new } + + describe 'test an instance of DomainTelegramSenderInfo' do + it 'should create an instance of DomainTelegramSenderInfo' do + expect(instance).to be_instance_of(Falcon::DomainTelegramSenderInfo) + end + end + describe 'test attribute "first_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 "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_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 "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 "username"' 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_threat_entity_spec.rb b/spec/models/domain_threat_entity_spec.rb new file mode 100644 index 00000000..3f878d3a --- /dev/null +++ b/spec/models/domain_threat_entity_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::DomainThreatEntity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DomainThreatEntity do + let(:instance) { Falcon::DomainThreatEntity.new } + + describe 'test an instance of DomainThreatEntity' do + it 'should create an instance of DomainThreatEntity' do + expect(instance).to be_instance_of(Falcon::DomainThreatEntity) + 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/domain_user_spec.rb b/spec/models/domain_user_spec.rb index 09321d16..a4d19919 100644 --- a/spec/models/domain_user_spec.rb +++ b/spec/models/domain_user_spec.rb @@ -48,7 +48,7 @@ end end - describe 'test attribute "created_at"' do + describe 'test attribute "email"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end @@ -60,24 +60,12 @@ end end - describe 'test attribute "last_login_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 "last_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 "uid"' 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/ diff --git a/spec/models/driftindicators_drift_entity_response_spec.rb b/spec/models/driftindicators_drift_entity_response_spec.rb new file mode 100644 index 00000000..ebc2b533 --- /dev/null +++ b/spec/models/driftindicators_drift_entity_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::DriftindicatorsDriftEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DriftindicatorsDriftEntityResponse do + let(:instance) { Falcon::DriftindicatorsDriftEntityResponse.new } + + describe 'test an instance of DriftindicatorsDriftEntityResponse' do + it 'should create an instance of DriftindicatorsDriftEntityResponse' do + expect(instance).to be_instance_of(Falcon::DriftindicatorsDriftEntityResponse) + 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/driftindicators_drift_indicators_count_value_spec.rb b/spec/models/driftindicators_drift_indicators_count_value_spec.rb new file mode 100644 index 00000000..af188a3e --- /dev/null +++ b/spec/models/driftindicators_drift_indicators_count_value_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::DriftindicatorsDriftIndicatorsCountValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DriftindicatorsDriftIndicatorsCountValue do + let(:instance) { Falcon::DriftindicatorsDriftIndicatorsCountValue.new } + + describe 'test an instance of DriftindicatorsDriftIndicatorsCountValue' do + it 'should create an instance of DriftindicatorsDriftIndicatorsCountValue' do + expect(instance).to be_instance_of(Falcon::DriftindicatorsDriftIndicatorsCountValue) + 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 + + 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/driftindicators_drift_indicators_field_value_spec.rb b/spec/models/driftindicators_drift_indicators_field_value_spec.rb new file mode 100644 index 00000000..16e3c418 --- /dev/null +++ b/spec/models/driftindicators_drift_indicators_field_value_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::DriftindicatorsDriftIndicatorsFieldValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::DriftindicatorsDriftIndicatorsFieldValue do + let(:instance) { Falcon::DriftindicatorsDriftIndicatorsFieldValue.new } + + describe 'test an instance of DriftindicatorsDriftIndicatorsFieldValue' do + it 'should create an instance of DriftindicatorsDriftIndicatorsFieldValue' do + expect(instance).to be_instance_of(Falcon::DriftindicatorsDriftIndicatorsFieldValue) + 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 + + 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/empowerapi_falcon_script_spec.rb b/spec/models/empowerapi_falcon_script_spec.rb new file mode 100644 index 00000000..05f4ced1 --- /dev/null +++ b/spec/models/empowerapi_falcon_script_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' +require 'date' + +# Unit tests for Falcon::EmpowerapiFalconScript +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::EmpowerapiFalconScript do + let(:instance) { Falcon::EmpowerapiFalconScript.new } + + describe 'test an instance of EmpowerapiFalconScript' do + it 'should create an instance of EmpowerapiFalconScript' do + expect(instance).to be_instance_of(Falcon::EmpowerapiFalconScript) + end + end + describe 'test attribute "access_roles"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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 "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 "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 "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 "is_disruptive"' 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 "modifies_system"' 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"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "required_skus"' 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 "sha256"' 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 "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 "workflow_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 "workflow_input_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 "workflow_output_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 "workflow_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/empowerapi_msa_falcon_script_response_spec.rb b/spec/models/empowerapi_msa_falcon_script_response_spec.rb new file mode 100644 index 00000000..c1460b1b --- /dev/null +++ b/spec/models/empowerapi_msa_falcon_script_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::EmpowerapiMsaFalconScriptResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::EmpowerapiMsaFalconScriptResponse do + let(:instance) { Falcon::EmpowerapiMsaFalconScriptResponse.new } + + describe 'test an instance of EmpowerapiMsaFalconScriptResponse' do + it 'should create an instance of EmpowerapiMsaFalconScriptResponse' do + expect(instance).to be_instance_of(Falcon::EmpowerapiMsaFalconScriptResponse) + 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/empowerapi_msa_id_list_response_spec.rb b/spec/models/empowerapi_msa_id_list_response_spec.rb new file mode 100644 index 00000000..d85909f4 --- /dev/null +++ b/spec/models/empowerapi_msa_id_list_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::EmpowerapiMsaIDListResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::EmpowerapiMsaIDListResponse do + let(:instance) { Falcon::EmpowerapiMsaIDListResponse.new } + + describe 'test an instance of EmpowerapiMsaIDListResponse' do + it 'should create an instance of EmpowerapiMsaIDListResponse' do + expect(instance).to be_instance_of(Falcon::EmpowerapiMsaIDListResponse) + 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/entities_ods_scan_response_v2_spec.rb b/spec/models/entities_ods_scan_response_v2_spec.rb new file mode 100644 index 00000000..7e6084d5 --- /dev/null +++ b/spec/models/entities_ods_scan_response_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::EntitiesODSScanResponseV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::EntitiesODSScanResponseV2 do + let(:instance) { Falcon::EntitiesODSScanResponseV2.new } + + describe 'test an instance of EntitiesODSScanResponseV2' do + it 'should create an instance of EntitiesODSScanResponseV2' do + expect(instance).to be_instance_of(Falcon::EntitiesODSScanResponseV2) + 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/executions_activity_execution_result_spec.rb b/spec/models/executions_activity_execution_result_spec.rb new file mode 100644 index 00000000..ae9595ae --- /dev/null +++ b/spec/models/executions_activity_execution_result_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::ExecutionsActivityExecutionResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsActivityExecutionResult do + let(:instance) { Falcon::ExecutionsActivityExecutionResult.new } + + describe 'test an instance of ExecutionsActivityExecutionResult' do + it 'should create an instance of ExecutionsActivityExecutionResult' do + expect(instance).to be_instance_of(Falcon::ExecutionsActivityExecutionResult) + end + end + describe 'test attribute "end_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 "error_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 "error_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 "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 "mocked"' 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 "node_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 "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 "result"' 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 "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/executions_ancestor_execution_spec.rb b/spec/models/executions_ancestor_execution_spec.rb new file mode 100644 index 00000000..8bfe11b4 --- /dev/null +++ b/spec/models/executions_ancestor_execution_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::ExecutionsAncestorExecution +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsAncestorExecution do + let(:instance) { Falcon::ExecutionsAncestorExecution.new } + + describe 'test an instance of ExecutionsAncestorExecution' do + it 'should create an instance of ExecutionsAncestorExecution' do + expect(instance).to be_instance_of(Falcon::ExecutionsAncestorExecution) + 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 "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 "iteration"' 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/executions_child_execution_result_spec.rb b/spec/models/executions_child_execution_result_spec.rb new file mode 100644 index 00000000..67bea1ec --- /dev/null +++ b/spec/models/executions_child_execution_result_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::ExecutionsChildExecutionResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsChildExecutionResult do + let(:instance) { Falcon::ExecutionsChildExecutionResult.new } + + describe 'test an instance of ExecutionsChildExecutionResult' do + it 'should create an instance of ExecutionsChildExecutionResult' do + expect(instance).to be_instance_of(Falcon::ExecutionsChildExecutionResult) + end + end + describe 'test attribute "end_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 "iteration"' 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 + +end diff --git a/spec/models/executions_execution_result_spec.rb b/spec/models/executions_execution_result_spec.rb new file mode 100644 index 00000000..5f73aea9 --- /dev/null +++ b/spec/models/executions_execution_result_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::ExecutionsExecutionResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsExecutionResult do + let(:instance) { Falcon::ExecutionsExecutionResult.new } + + describe 'test an instance of ExecutionsExecutionResult' do + it 'should create an instance of ExecutionsExecutionResult' do + expect(instance).to be_instance_of(Falcon::ExecutionsExecutionResult) + end + end + describe 'test attribute "activities"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ancestor_executions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "definition_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 "definition_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 "end_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 "execution_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 "loops"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "retryable"' 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 "trigger"' 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/executions_iterations_spec.rb b/spec/models/executions_iterations_spec.rb new file mode 100644 index 00000000..1c0cf280 --- /dev/null +++ b/spec/models/executions_iterations_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::ExecutionsIterations +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsIterations do + let(:instance) { Falcon::ExecutionsIterations.new } + + describe 'test an instance of ExecutionsIterations' do + it 'should create an instance of ExecutionsIterations' do + expect(instance).to be_instance_of(Falcon::ExecutionsIterations) + end + end + describe 'test attribute "completed"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "failed"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "in_progress"' 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_nonrecoverable"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pending"' 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/executions_loop_result_spec.rb b/spec/models/executions_loop_result_spec.rb new file mode 100644 index 00000000..c912da66 --- /dev/null +++ b/spec/models/executions_loop_result_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::ExecutionsLoopResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsLoopResult do + let(:instance) { Falcon::ExecutionsLoopResult.new } + + describe 'test an instance of ExecutionsLoopResult' do + it 'should create an instance of ExecutionsLoopResult' do + expect(instance).to be_instance_of(Falcon::ExecutionsLoopResult) + end + end + describe 'test attribute "child_executions"' 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_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 "error_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 "error_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 "input_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 "iterations"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "mocked"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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 "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 + +end diff --git a/spec/models/executions_reference_link_spec.rb b/spec/models/executions_reference_link_spec.rb new file mode 100644 index 00000000..cd2f533c --- /dev/null +++ b/spec/models/executions_reference_link_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::ExecutionsReferenceLink +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsReferenceLink do + let(:instance) { Falcon::ExecutionsReferenceLink.new } + + describe 'test an instance of ExecutionsReferenceLink' do + it 'should create an instance of ExecutionsReferenceLink' do + expect(instance).to be_instance_of(Falcon::ExecutionsReferenceLink) + end + end + describe 'test attribute "display"' 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/executions_trigger_result_spec.rb b/spec/models/executions_trigger_result_spec.rb new file mode 100644 index 00000000..3d03ebfc --- /dev/null +++ b/spec/models/executions_trigger_result_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::ExecutionsTriggerResult +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ExecutionsTriggerResult do + let(:instance) { Falcon::ExecutionsTriggerResult.new } + + describe 'test an instance of ExecutionsTriggerResult' do + it 'should create an instance of ExecutionsTriggerResult' do + expect(instance).to be_instance_of(Falcon::ExecutionsTriggerResult) + 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 "mocked"' 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 "result"' 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/falconx_sandbox_parameters_v1_spec.rb b/spec/models/falconx_sandbox_parameters_v1_spec.rb index c71f10a3..2ce8919b 100644 --- a/spec/models/falconx_sandbox_parameters_v1_spec.rb +++ b/spec/models/falconx_sandbox_parameters_v1_spec.rb @@ -42,12 +42,6 @@ expect(instance).to be_instance_of(Falcon::FalconxSandboxParametersV1) end end - describe 'test attribute "interactivity"' do - it 'should work' do - # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ - end - end - describe 'test attribute "action_script"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -78,6 +72,12 @@ end end + describe 'test attribute "interactivity"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "network_settings"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/falconx_submission_v1_spec.rb b/spec/models/falconx_submission_v1_spec.rb index c1d09ab6..67475fd2 100644 --- a/spec/models/falconx_submission_v1_spec.rb +++ b/spec/models/falconx_submission_v1_spec.rb @@ -54,6 +54,24 @@ end end + describe 'test attribute "error_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 "error_origin"' 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_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 "id"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -66,6 +84,12 @@ end end + describe 'test attribute "interactive_phase"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "origin"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/flows_spec.rb b/spec/models/flows_spec.rb new file mode 100644 index 00000000..6d995e33 --- /dev/null +++ b/spec/models/flows_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::Flows +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::Flows do + let(:instance) { Falcon::Flows.new } + + describe 'test an instance of Flows' do + it 'should create an instance of Flows' do + expect(instance).to be_instance_of(Falcon::Flows) + end + end + describe 'test attribute "default"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "incoming"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "outgoing"' 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/fwmgr_msa_aggregation_result_spec.rb b/spec/models/fwmgr_msa_aggregation_result_spec.rb index a48093d5..e511de13 100644 --- a/spec/models/fwmgr_msa_aggregation_result_spec.rb +++ b/spec/models/fwmgr_msa_aggregation_result_spec.rb @@ -48,6 +48,12 @@ end end + describe 'test attribute "doc_count_error_upper_bound"' 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/graph_condition_spec.rb b/spec/models/graph_condition_spec.rb new file mode 100644 index 00000000..ee8c3450 --- /dev/null +++ b/spec/models/graph_condition_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::GraphCondition +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphCondition do + let(:instance) { Falcon::GraphCondition.new } + + describe 'test an instance of GraphCondition' do + it 'should create an instance of GraphCondition' do + expect(instance).to be_instance_of(Falcon::GraphCondition) + end + end + describe 'test attribute "display"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/ + end + end + +end diff --git a/spec/models/graph_configured_activity_spec.rb b/spec/models/graph_configured_activity_spec.rb new file mode 100644 index 00000000..c0094a8f --- /dev/null +++ b/spec/models/graph_configured_activity_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::GraphConfiguredActivity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphConfiguredActivity do + let(:instance) { Falcon::GraphConfiguredActivity.new } + + describe 'test an instance of GraphConfiguredActivity' do + it 'should create an instance of GraphConfiguredActivity' do + expect(instance).to be_instance_of(Falcon::GraphConfiguredActivity) + end + end + describe 'test attribute "flows"' 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 "max_seconds"' 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 "node_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 "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/graph_configured_trigger_spec.rb b/spec/models/graph_configured_trigger_spec.rb new file mode 100644 index 00000000..0eb89405 --- /dev/null +++ b/spec/models/graph_configured_trigger_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::GraphConfiguredTrigger +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphConfiguredTrigger do + let(:instance) { Falcon::GraphConfiguredTrigger.new } + + describe 'test an instance of GraphConfiguredTrigger' do + it 'should create an instance of GraphConfiguredTrigger' do + expect(instance).to be_instance_of(Falcon::GraphConfiguredTrigger) + 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 "node_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 "outgoing_flow"' 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 "timer_event_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 "trigger_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/graph_definition_model_spec.rb b/spec/models/graph_definition_model_spec.rb new file mode 100644 index 00000000..9ce483e1 --- /dev/null +++ b/spec/models/graph_definition_model_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::GraphDefinitionModel +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphDefinitionModel do + let(:instance) { Falcon::GraphDefinitionModel.new } + + describe 'test an instance of GraphDefinitionModel' do + it 'should create an instance of GraphDefinitionModel' do + expect(instance).to be_instance_of(Falcon::GraphDefinitionModel) + end + end + describe 'test attribute "activities"' 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 "flows"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "gateways"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_registry"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "sub_models"' 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"' 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_end_spec.rb b/spec/models/graph_end_spec.rb new file mode 100644 index 00000000..10d260c0 --- /dev/null +++ b/spec/models/graph_end_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::GraphEnd +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphEnd do + let(:instance) { Falcon::GraphEnd.new } + + describe 'test an instance of GraphEnd' do + it 'should create an instance of GraphEnd' do + expect(instance).to be_instance_of(Falcon::GraphEnd) + end + end + describe 'test attribute "incoming_flows"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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/graph_flow_spec.rb b/spec/models/graph_flow_spec.rb new file mode 100644 index 00000000..ebe1a9ef --- /dev/null +++ b/spec/models/graph_flow_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::GraphFlow +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphFlow do + let(:instance) { Falcon::GraphFlow.new } + + describe 'test an instance of GraphFlow' do + it 'should create an instance of GraphFlow' do + expect(instance).to be_instance_of(Falcon::GraphFlow) + 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/ + 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 + + describe 'test attribute "source_alias"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "target"' 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_gateway_spec.rb b/spec/models/graph_gateway_spec.rb new file mode 100644 index 00000000..aff001fc --- /dev/null +++ b/spec/models/graph_gateway_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::GraphGateway +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphGateway do + let(:instance) { Falcon::GraphGateway.new } + + describe 'test an instance of GraphGateway' do + it 'should create an instance of GraphGateway' do + expect(instance).to be_instance_of(Falcon::GraphGateway) + end + end + describe 'test attribute "flows"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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 "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/graph_multi_spec.rb b/spec/models/graph_multi_spec.rb new file mode 100644 index 00000000..d3286644 --- /dev/null +++ b/spec/models/graph_multi_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::GraphMulti +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphMulti do + let(:instance) { Falcon::GraphMulti.new } + + describe 'test an instance of GraphMulti' do + it 'should create an instance of GraphMulti' do + expect(instance).to be_instance_of(Falcon::GraphMulti) + end + end + describe 'test attribute "array_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 "array_field_display_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 "continue_on_partial_execution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_iteration_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/graph_sub_model_spec.rb b/spec/models/graph_sub_model_spec.rb new file mode 100644 index 00000000..220ce57c --- /dev/null +++ b/spec/models/graph_sub_model_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::GraphSubModel +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphSubModel do + let(:instance) { Falcon::GraphSubModel.new } + + describe 'test an instance of GraphSubModel' do + it 'should create an instance of GraphSubModel' do + expect(instance).to be_instance_of(Falcon::GraphSubModel) + end + end + describe 'test attribute "flows"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "model"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "multi"' 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 "node_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 "output_field"' 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_timer_event_definition_spec.rb b/spec/models/graph_timer_event_definition_spec.rb new file mode 100644 index 00000000..10e2c9ab --- /dev/null +++ b/spec/models/graph_timer_event_definition_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::GraphTimerEventDefinition +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphTimerEventDefinition do + let(:instance) { Falcon::GraphTimerEventDefinition.new } + + describe 'test an instance of GraphTimerEventDefinition' do + it 'should create an instance of GraphTimerEventDefinition' do + expect(instance).to be_instance_of(Falcon::GraphTimerEventDefinition) + end + end + describe 'test attribute "end_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 "skip_concurrent"' 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_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 "time_cycle"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "tz"' 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_validation_error_spec.rb b/spec/models/graph_validation_error_spec.rb new file mode 100644 index 00000000..138ad6b4 --- /dev/null +++ b/spec/models/graph_validation_error_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::GraphValidationError +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::GraphValidationError do + let(:instance) { Falcon::GraphValidationError.new } + + describe 'test an instance of GraphValidationError' do + it 'should create an instance of GraphValidationError' do + expect(instance).to be_instance_of(Falcon::GraphValidationError) + 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 "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 "display_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 "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 "node_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_node_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 "property"' 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/images_api_combined_image_export_spec.rb b/spec/models/images_api_combined_image_export_spec.rb new file mode 100644 index 00000000..87a4c3de --- /dev/null +++ b/spec/models/images_api_combined_image_export_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::ImagesApiCombinedImageExport +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiCombinedImageExport do + let(:instance) { Falcon::ImagesApiCombinedImageExport.new } + + describe 'test an instance of ImagesApiCombinedImageExport' do + it 'should create an instance of ImagesApiCombinedImageExport' do + expect(instance).to be_instance_of(Falcon::ImagesApiCombinedImageExport) + 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/images_api_customer_and_image_spec.rb b/spec/models/images_api_customer_and_image_spec.rb new file mode 100644 index 00000000..91ed7c48 --- /dev/null +++ b/spec/models/images_api_customer_and_image_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::ImagesApiCustomerAndImage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiCustomerAndImage do + let(:instance) { Falcon::ImagesApiCustomerAndImage.new } + + describe 'test an instance of ImagesApiCustomerAndImage' do + it 'should create an instance of ImagesApiCustomerAndImage' do + expect(instance).to be_instance_of(Falcon::ImagesApiCustomerAndImage) + 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/images_api_image_assessment_history_spec.rb b/spec/models/images_api_image_assessment_history_spec.rb new file mode 100644 index 00000000..edadc448 --- /dev/null +++ b/spec/models/images_api_image_assessment_history_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::ImagesApiImageAssessmentHistory +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiImageAssessmentHistory do + let(:instance) { Falcon::ImagesApiImageAssessmentHistory.new } + + describe 'test an instance of ImagesApiImageAssessmentHistory' do + it 'should create an instance of ImagesApiImageAssessmentHistory' do + expect(instance).to be_instance_of(Falcon::ImagesApiImageAssessmentHistory) + 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/images_api_image_by_vulnerability_count_spec.rb b/spec/models/images_api_image_by_vulnerability_count_spec.rb new file mode 100644 index 00000000..8e3314cb --- /dev/null +++ b/spec/models/images_api_image_by_vulnerability_count_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::ImagesApiImageByVulnerabilityCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiImageByVulnerabilityCount do + let(:instance) { Falcon::ImagesApiImageByVulnerabilityCount.new } + + describe 'test an instance of ImagesApiImageByVulnerabilityCount' do + it 'should create an instance of ImagesApiImageByVulnerabilityCount' do + expect(instance).to be_instance_of(Falcon::ImagesApiImageByVulnerabilityCount) + 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/images_api_image_count_by_base_os_spec.rb b/spec/models/images_api_image_count_by_base_os_spec.rb new file mode 100644 index 00000000..26ebeee5 --- /dev/null +++ b/spec/models/images_api_image_count_by_base_os_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::ImagesApiImageCountByBaseOS +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiImageCountByBaseOS do + let(:instance) { Falcon::ImagesApiImageCountByBaseOS.new } + + describe 'test an instance of ImagesApiImageCountByBaseOS' do + it 'should create an instance of ImagesApiImageCountByBaseOS' do + expect(instance).to be_instance_of(Falcon::ImagesApiImageCountByBaseOS) + 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/images_api_image_count_by_state_spec.rb b/spec/models/images_api_image_count_by_state_spec.rb new file mode 100644 index 00000000..cb170511 --- /dev/null +++ b/spec/models/images_api_image_count_by_state_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::ImagesApiImageCountByState +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiImageCountByState do + let(:instance) { Falcon::ImagesApiImageCountByState.new } + + describe 'test an instance of ImagesApiImageCountByState' do + it 'should create an instance of ImagesApiImageCountByState' do + expect(instance).to be_instance_of(Falcon::ImagesApiImageCountByState) + 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/images_api_image_count_spec.rb b/spec/models/images_api_image_count_spec.rb new file mode 100644 index 00000000..a4a3c138 --- /dev/null +++ b/spec/models/images_api_image_count_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::ImagesApiImageCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiImageCount do + let(:instance) { Falcon::ImagesApiImageCount.new } + + describe 'test an instance of ImagesApiImageCount' do + it 'should create an instance of ImagesApiImageCount' do + expect(instance).to be_instance_of(Falcon::ImagesApiImageCount) + 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/images_api_image_issues_summary_spec.rb b/spec/models/images_api_image_issues_summary_spec.rb new file mode 100644 index 00000000..3a1d77e1 --- /dev/null +++ b/spec/models/images_api_image_issues_summary_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::ImagesApiImageIssuesSummary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiImageIssuesSummary do + let(:instance) { Falcon::ImagesApiImageIssuesSummary.new } + + describe 'test an instance of ImagesApiImageIssuesSummary' do + it 'should create an instance of ImagesApiImageIssuesSummary' do + expect(instance).to be_instance_of(Falcon::ImagesApiImageIssuesSummary) + 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/images_api_image_vulnerabilities_summary_spec.rb b/spec/models/images_api_image_vulnerabilities_summary_spec.rb new file mode 100644 index 00000000..29ff202c --- /dev/null +++ b/spec/models/images_api_image_vulnerabilities_summary_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::ImagesApiImageVulnerabilitiesSummary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ImagesApiImageVulnerabilitiesSummary do + let(:instance) { Falcon::ImagesApiImageVulnerabilitiesSummary.new } + + describe 'test an instance of ImagesApiImageVulnerabilitiesSummary' do + it 'should create an instance of ImagesApiImageVulnerabilitiesSummary' do + expect(instance).to be_instance_of(Falcon::ImagesApiImageVulnerabilitiesSummary) + 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/internal_sensor_status_spec.rb b/spec/models/internal_sensor_status_spec.rb index 6f2e9b34..a837c50a 100644 --- a/spec/models/internal_sensor_status_spec.rb +++ b/spec/models/internal_sensor_status_spec.rb @@ -78,6 +78,24 @@ end end + describe 'test attribute "kerberos_config"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ldap_config"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ldaps_config"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "local_ip"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ @@ -90,12 +108,42 @@ end end + describe 'test attribute "ntlm_config"' 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 "rdp_to_dc_config"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "smb_to_dc_config"' 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 "status_causes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "ti_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/jsonschema_authorization_spec.rb b/spec/models/jsonschema_authorization_spec.rb new file mode 100644 index 00000000..047b9dff --- /dev/null +++ b/spec/models/jsonschema_authorization_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::JsonschemaAuthorization +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaAuthorization do + let(:instance) { Falcon::JsonschemaAuthorization.new } + + describe 'test an instance of JsonschemaAuthorization' do + it 'should create an instance of JsonschemaAuthorization' do + expect(instance).to be_instance_of(Falcon::JsonschemaAuthorization) + end + end + describe 'test attribute "api_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 "complex_permissions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "feature_flag"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "permissions"' 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_collection_index_field_spec.rb b/spec/models/jsonschema_collection_index_field_spec.rb new file mode 100644 index 00000000..6bad167d --- /dev/null +++ b/spec/models/jsonschema_collection_index_field_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::JsonschemaCollectionIndexField +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaCollectionIndexField do + let(:instance) { Falcon::JsonschemaCollectionIndexField.new } + + describe 'test an instance of JsonschemaCollectionIndexField' do + it 'should create an instance of JsonschemaCollectionIndexField' do + expect(instance).to be_instance_of(Falcon::JsonschemaCollectionIndexField) + 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 "fql_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 + +end diff --git a/spec/models/jsonschema_complex_permissions_or_spec.rb b/spec/models/jsonschema_complex_permissions_or_spec.rb new file mode 100644 index 00000000..49b45c3d --- /dev/null +++ b/spec/models/jsonschema_complex_permissions_or_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::JsonschemaComplexPermissionsOR +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaComplexPermissionsOR do + let(:instance) { Falcon::JsonschemaComplexPermissionsOR.new } + + describe 'test an instance of JsonschemaComplexPermissionsOR' do + it 'should create an instance of JsonschemaComplexPermissionsOR' do + expect(instance).to be_instance_of(Falcon::JsonschemaComplexPermissionsOR) + end + end + describe 'test attribute "_and"' 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_complex_permissions_spec.rb b/spec/models/jsonschema_complex_permissions_spec.rb new file mode 100644 index 00000000..05f5fbd2 --- /dev/null +++ b/spec/models/jsonschema_complex_permissions_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::JsonschemaComplexPermissions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaComplexPermissions do + let(:instance) { Falcon::JsonschemaComplexPermissions.new } + + describe 'test an instance of JsonschemaComplexPermissions' do + it 'should create an instance of JsonschemaComplexPermissions' do + expect(instance).to be_instance_of(Falcon::JsonschemaComplexPermissions) + end + end + describe 'test attribute "_or"' 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_condition_group_fields_spec.rb b/spec/models/jsonschema_condition_group_fields_spec.rb new file mode 100644 index 00000000..94c040d0 --- /dev/null +++ b/spec/models/jsonschema_condition_group_fields_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::JsonschemaConditionGroupFields +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaConditionGroupFields do + let(:instance) { Falcon::JsonschemaConditionGroupFields.new } + + describe 'test an instance of JsonschemaConditionGroupFields' do + it 'should create an instance of JsonschemaConditionGroupFields' do + expect(instance).to be_instance_of(Falcon::JsonschemaConditionGroupFields) + end + end + describe 'test attribute "condition_control"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "control_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 "controller"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "dependent_control"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "reset_fields"' 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_permission_spec.rb b/spec/models/jsonschema_permission_spec.rb new file mode 100644 index 00000000..6aa7cd2f --- /dev/null +++ b/spec/models/jsonschema_permission_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::JsonschemaPermission +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaPermission do + let(:instance) { Falcon::JsonschemaPermission.new } + + describe 'test an instance of JsonschemaPermission' do + it 'should create an instance of JsonschemaPermission' do + expect(instance).to be_instance_of(Falcon::JsonschemaPermission) + end + end + describe 'test attribute "action"' 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"' 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 new file mode 100644 index 00000000..aed530f5 --- /dev/null +++ b/spec/models/jsonschema_pivot_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::JsonschemaPivot +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaPivot do + let(:instance) { Falcon::JsonschemaPivot.new } + + describe 'test an instance of JsonschemaPivot' do + it 'should create an instance of JsonschemaPivot' do + expect(instance).to be_instance_of(Falcon::JsonschemaPivot) + end + end + describe 'test attribute "case_sensitive"' 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"' 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/ + end + end + + describe 'test attribute "query_string"' 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/ + end + end + + describe 'test attribute "sort_by_display"' 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_by_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 "sort_desc"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "strict"' 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_reset_fields_spec.rb b/spec/models/jsonschema_reset_fields_spec.rb new file mode 100644 index 00000000..c0c9f9b1 --- /dev/null +++ b/spec/models/jsonschema_reset_fields_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::JsonschemaResetFields +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaResetFields do + let(:instance) { Falcon::JsonschemaResetFields.new } + + describe 'test an instance of JsonschemaResetFields' do + it 'should create an instance of JsonschemaResetFields' do + expect(instance).to be_instance_of(Falcon::JsonschemaResetFields) + end + end + describe 'test attribute "fields"' 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_schema_spec.rb b/spec/models/jsonschema_schema_spec.rb new file mode 100644 index 00000000..19049c3e --- /dev/null +++ b/spec/models/jsonschema_schema_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::JsonschemaSchema +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaSchema do + let(:instance) { Falcon::JsonschemaSchema.new } + + describe 'test an instance of JsonschemaSchema' do + it 'should create an instance of JsonschemaSchema' do + expect(instance).to be_instance_of(Falcon::JsonschemaSchema) + end + end + describe 'test attribute "sub_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 "definitions"' 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_signals_extensions_spec.rb b/spec/models/jsonschema_signals_extensions_spec.rb new file mode 100644 index 00000000..5ad7e5d8 --- /dev/null +++ b/spec/models/jsonschema_signals_extensions_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::JsonschemaSignalsExtensions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaSignalsExtensions do + let(:instance) { Falcon::JsonschemaSignalsExtensions.new } + + describe 'test an instance of JsonschemaSignalsExtensions' do + it 'should create an instance of JsonschemaSignalsExtensions' do + expect(instance).to be_instance_of(Falcon::JsonschemaSignalsExtensions) + end + end + describe 'test attribute "enum_wrapper"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "example_display_map"' 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_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_sub_schema_spec.rb b/spec/models/jsonschema_sub_schema_spec.rb new file mode 100644 index 00000000..678153bf --- /dev/null +++ b/spec/models/jsonschema_sub_schema_spec.rb @@ -0,0 +1,399 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::JsonschemaSubSchema +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaSubSchema do + let(:instance) { Falcon::JsonschemaSubSchema.new } + + describe 'test an instance of JsonschemaSubSchema' do + it 'should create an instance of JsonschemaSubSchema' do + expect(instance).to be_instance_of(Falcon::JsonschemaSubSchema) + end + end + describe 'test attribute "ref"' 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"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "additional_items"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "additional_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 "all_of"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "any_of"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "binary_encoding"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "const"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "default"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "dependencies"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "deprecated"' 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 "_else"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "enum"' 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_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 "examples"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exclusive_maximum"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exclusive_minimum"' 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 "_if"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "items"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_items"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_length"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "max_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 "maximum"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "media"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "min_items"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "min_length"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "min_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 "minimum"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "multiple_of"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "_not"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "one_of"' 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"' 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_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 "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 "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 "_then"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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 + + 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 "uicomponent"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "unique_items"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_authorization"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_can_create"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_condition_group_fields"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_do_not_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 "x_cs_indexable"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_indexable_fields"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_max_duration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_min_duration"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_not_parameterizable"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_order"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_pivot"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_signals"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_signals_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 "x_cs_signals_operators"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "x_cs_signals_sub_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 "x_cs_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 "x_cs_workflow"' 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_workflow_extensions_spec.rb b/spec/models/jsonschema_workflow_extensions_spec.rb new file mode 100644 index 00000000..9733530b --- /dev/null +++ b/spec/models/jsonschema_workflow_extensions_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::JsonschemaWorkflowExtensions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::JsonschemaWorkflowExtensions do + let(:instance) { Falcon::JsonschemaWorkflowExtensions.new } + + describe 'test an instance of JsonschemaWorkflowExtensions' do + it 'should create an instance of JsonschemaWorkflowExtensions' do + expect(instance).to be_instance_of(Falcon::JsonschemaWorkflowExtensions) + 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 "node_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 "system"' 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 "x_cs_no_variable_injection"' 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/k8sassets_cluster_enrichment_data_spec.rb b/spec/models/k8sassets_cluster_enrichment_data_spec.rb new file mode 100644 index 00000000..a8d94db0 --- /dev/null +++ b/spec/models/k8sassets_cluster_enrichment_data_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::K8sassetsClusterEnrichmentData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsClusterEnrichmentData do + let(:instance) { Falcon::K8sassetsClusterEnrichmentData.new } + + describe 'test an instance of K8sassetsClusterEnrichmentData' do + it 'should create an instance of K8sassetsClusterEnrichmentData' do + expect(instance).to be_instance_of(Falcon::K8sassetsClusterEnrichmentData) + end + end + describe 'test attribute "container_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 "node_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 "pod_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/k8sassets_cluster_enrichment_entry_spec.rb b/spec/models/k8sassets_cluster_enrichment_entry_spec.rb new file mode 100644 index 00000000..514a679d --- /dev/null +++ b/spec/models/k8sassets_cluster_enrichment_entry_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::K8sassetsClusterEnrichmentEntry +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsClusterEnrichmentEntry do + let(:instance) { Falcon::K8sassetsClusterEnrichmentEntry.new } + + describe 'test an instance of K8sassetsClusterEnrichmentEntry' do + it 'should create an instance of K8sassetsClusterEnrichmentEntry' do + expect(instance).to be_instance_of(Falcon::K8sassetsClusterEnrichmentEntry) + 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 "enrichment_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/k8sassets_cluster_enrichment_response_spec.rb b/spec/models/k8sassets_cluster_enrichment_response_spec.rb new file mode 100644 index 00000000..9fb276b6 --- /dev/null +++ b/spec/models/k8sassets_cluster_enrichment_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::K8sassetsClusterEnrichmentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsClusterEnrichmentResponse do + let(:instance) { Falcon::K8sassetsClusterEnrichmentResponse.new } + + describe 'test an instance of K8sassetsClusterEnrichmentResponse' do + it 'should create an instance of K8sassetsClusterEnrichmentResponse' do + expect(instance).to be_instance_of(Falcon::K8sassetsClusterEnrichmentResponse) + end + end + describe 'test attribute "enrichment_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/k8sassets_container_enrichment_data_spec.rb b/spec/models/k8sassets_container_enrichment_data_spec.rb new file mode 100644 index 00000000..dcd92d00 --- /dev/null +++ b/spec/models/k8sassets_container_enrichment_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::K8sassetsContainerEnrichmentData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsContainerEnrichmentData do + let(:instance) { Falcon::K8sassetsContainerEnrichmentData.new } + + describe 'test an instance of K8sassetsContainerEnrichmentData' do + it 'should create an instance of K8sassetsContainerEnrichmentData' do + expect(instance).to be_instance_of(Falcon::K8sassetsContainerEnrichmentData) + end + end + describe 'test attribute "agents"' 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/k8sassets_container_enrichment_entry_spec.rb b/spec/models/k8sassets_container_enrichment_entry_spec.rb new file mode 100644 index 00000000..96a13dc6 --- /dev/null +++ b/spec/models/k8sassets_container_enrichment_entry_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::K8sassetsContainerEnrichmentEntry +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsContainerEnrichmentEntry do + let(:instance) { Falcon::K8sassetsContainerEnrichmentEntry.new } + + describe 'test an instance of K8sassetsContainerEnrichmentEntry' do + it 'should create an instance of K8sassetsContainerEnrichmentEntry' do + expect(instance).to be_instance_of(Falcon::K8sassetsContainerEnrichmentEntry) + end + end + describe 'test attribute "container_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 "enrichment_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/k8sassets_container_enrichment_response_spec.rb b/spec/models/k8sassets_container_enrichment_response_spec.rb new file mode 100644 index 00000000..1eeee655 --- /dev/null +++ b/spec/models/k8sassets_container_enrichment_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::K8sassetsContainerEnrichmentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsContainerEnrichmentResponse do + let(:instance) { Falcon::K8sassetsContainerEnrichmentResponse.new } + + describe 'test an instance of K8sassetsContainerEnrichmentResponse' do + it 'should create an instance of K8sassetsContainerEnrichmentResponse' do + expect(instance).to be_instance_of(Falcon::K8sassetsContainerEnrichmentResponse) + end + end + describe 'test attribute "enrichment_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/k8sassets_container_info_spec.rb b/spec/models/k8sassets_container_info_spec.rb new file mode 100644 index 00000000..2c0cc902 --- /dev/null +++ b/spec/models/k8sassets_container_info_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::K8sassetsContainerInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsContainerInfo do + let(:instance) { Falcon::K8sassetsContainerInfo.new } + + describe 'test an instance of K8sassetsContainerInfo' do + it 'should create an instance of K8sassetsContainerInfo' do + expect(instance).to be_instance_of(Falcon::K8sassetsContainerInfo) + 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/k8sassets_deployment_enrichment_data_spec.rb b/spec/models/k8sassets_deployment_enrichment_data_spec.rb new file mode 100644 index 00000000..2afdc83e --- /dev/null +++ b/spec/models/k8sassets_deployment_enrichment_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::K8sassetsDeploymentEnrichmentData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsDeploymentEnrichmentData do + let(:instance) { Falcon::K8sassetsDeploymentEnrichmentData.new } + + describe 'test an instance of K8sassetsDeploymentEnrichmentData' do + it 'should create an instance of K8sassetsDeploymentEnrichmentData' do + expect(instance).to be_instance_of(Falcon::K8sassetsDeploymentEnrichmentData) + end + end + describe 'test attribute "pod_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/k8sassets_deployment_enrichment_entry_spec.rb b/spec/models/k8sassets_deployment_enrichment_entry_spec.rb new file mode 100644 index 00000000..d6edbc20 --- /dev/null +++ b/spec/models/k8sassets_deployment_enrichment_entry_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::K8sassetsDeploymentEnrichmentEntry +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsDeploymentEnrichmentEntry do + let(:instance) { Falcon::K8sassetsDeploymentEnrichmentEntry.new } + + describe 'test an instance of K8sassetsDeploymentEnrichmentEntry' do + it 'should create an instance of K8sassetsDeploymentEnrichmentEntry' do + expect(instance).to be_instance_of(Falcon::K8sassetsDeploymentEnrichmentEntry) + end + end + describe 'test attribute "deployment_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 "enrichment_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/k8sassets_deployment_enrichment_response_spec.rb b/spec/models/k8sassets_deployment_enrichment_response_spec.rb new file mode 100644 index 00000000..0a989c20 --- /dev/null +++ b/spec/models/k8sassets_deployment_enrichment_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::K8sassetsDeploymentEnrichmentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsDeploymentEnrichmentResponse do + let(:instance) { Falcon::K8sassetsDeploymentEnrichmentResponse.new } + + describe 'test an instance of K8sassetsDeploymentEnrichmentResponse' do + it 'should create an instance of K8sassetsDeploymentEnrichmentResponse' do + expect(instance).to be_instance_of(Falcon::K8sassetsDeploymentEnrichmentResponse) + end + end + describe 'test attribute "enrichment_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/k8sassets_node_enrichment_data_spec.rb b/spec/models/k8sassets_node_enrichment_data_spec.rb new file mode 100644 index 00000000..73f75665 --- /dev/null +++ b/spec/models/k8sassets_node_enrichment_data_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::K8sassetsNodeEnrichmentData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsNodeEnrichmentData do + let(:instance) { Falcon::K8sassetsNodeEnrichmentData.new } + + describe 'test an instance of K8sassetsNodeEnrichmentData' do + it 'should create an instance of K8sassetsNodeEnrichmentData' do + expect(instance).to be_instance_of(Falcon::K8sassetsNodeEnrichmentData) + end + end + describe 'test attribute "container_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 "pod_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/k8sassets_node_enrichment_entry_spec.rb b/spec/models/k8sassets_node_enrichment_entry_spec.rb new file mode 100644 index 00000000..798bd84c --- /dev/null +++ b/spec/models/k8sassets_node_enrichment_entry_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::K8sassetsNodeEnrichmentEntry +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsNodeEnrichmentEntry do + let(:instance) { Falcon::K8sassetsNodeEnrichmentEntry.new } + + describe 'test an instance of K8sassetsNodeEnrichmentEntry' do + it 'should create an instance of K8sassetsNodeEnrichmentEntry' do + expect(instance).to be_instance_of(Falcon::K8sassetsNodeEnrichmentEntry) + end + end + describe 'test attribute "enrichment_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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/k8sassets_node_enrichment_response_spec.rb b/spec/models/k8sassets_node_enrichment_response_spec.rb new file mode 100644 index 00000000..7fd4338d --- /dev/null +++ b/spec/models/k8sassets_node_enrichment_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::K8sassetsNodeEnrichmentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsNodeEnrichmentResponse do + let(:instance) { Falcon::K8sassetsNodeEnrichmentResponse.new } + + describe 'test an instance of K8sassetsNodeEnrichmentResponse' do + it 'should create an instance of K8sassetsNodeEnrichmentResponse' do + expect(instance).to be_instance_of(Falcon::K8sassetsNodeEnrichmentResponse) + end + end + describe 'test attribute "enrichment_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/k8sassets_pod_enrichment_data_spec.rb b/spec/models/k8sassets_pod_enrichment_data_spec.rb new file mode 100644 index 00000000..befadc13 --- /dev/null +++ b/spec/models/k8sassets_pod_enrichment_data_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::K8sassetsPodEnrichmentData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsPodEnrichmentData do + let(:instance) { Falcon::K8sassetsPodEnrichmentData.new } + + describe 'test an instance of K8sassetsPodEnrichmentData' do + it 'should create an instance of K8sassetsPodEnrichmentData' do + expect(instance).to be_instance_of(Falcon::K8sassetsPodEnrichmentData) + end + end + describe 'test attribute "container_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 "container_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 "deployment_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/k8sassets_pod_enrichment_entry_spec.rb b/spec/models/k8sassets_pod_enrichment_entry_spec.rb new file mode 100644 index 00000000..24f6567b --- /dev/null +++ b/spec/models/k8sassets_pod_enrichment_entry_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::K8sassetsPodEnrichmentEntry +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsPodEnrichmentEntry do + let(:instance) { Falcon::K8sassetsPodEnrichmentEntry.new } + + describe 'test an instance of K8sassetsPodEnrichmentEntry' do + it 'should create an instance of K8sassetsPodEnrichmentEntry' do + expect(instance).to be_instance_of(Falcon::K8sassetsPodEnrichmentEntry) + end + end + describe 'test attribute "enrichment_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pod_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/k8sassets_pod_enrichment_response_spec.rb b/spec/models/k8sassets_pod_enrichment_response_spec.rb new file mode 100644 index 00000000..d15bba5f --- /dev/null +++ b/spec/models/k8sassets_pod_enrichment_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::K8sassetsPodEnrichmentResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8sassetsPodEnrichmentResponse do + let(:instance) { Falcon::K8sassetsPodEnrichmentResponse.new } + + describe 'test an instance of K8sassetsPodEnrichmentResponse' do + it 'should create an instance of K8sassetsPodEnrichmentResponse' do + expect(instance).to be_instance_of(Falcon::K8sassetsPodEnrichmentResponse) + end + end + describe 'test attribute "enrichment_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/k8sioms_kubernetes_iom_count_value_spec.rb b/spec/models/k8sioms_kubernetes_iom_count_value_spec.rb new file mode 100644 index 00000000..d976992b --- /dev/null +++ b/spec/models/k8sioms_kubernetes_iom_count_value_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::K8siomsKubernetesIOMCountValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8siomsKubernetesIOMCountValue do + let(:instance) { Falcon::K8siomsKubernetesIOMCountValue.new } + + describe 'test an instance of K8siomsKubernetesIOMCountValue' do + it 'should create an instance of K8siomsKubernetesIOMCountValue' do + expect(instance).to be_instance_of(Falcon::K8siomsKubernetesIOMCountValue) + 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 + + 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/k8sioms_kubernetes_iom_entity_response_spec.rb b/spec/models/k8sioms_kubernetes_iom_entity_response_spec.rb new file mode 100644 index 00000000..779a10f6 --- /dev/null +++ b/spec/models/k8sioms_kubernetes_iom_entity_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::K8siomsKubernetesIOMEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8siomsKubernetesIOMEntityResponse do + let(:instance) { Falcon::K8siomsKubernetesIOMEntityResponse.new } + + describe 'test an instance of K8siomsKubernetesIOMEntityResponse' do + it 'should create an instance of K8siomsKubernetesIOMEntityResponse' do + expect(instance).to be_instance_of(Falcon::K8siomsKubernetesIOMEntityResponse) + 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/k8sioms_kubernetes_iom_field_value_spec.rb b/spec/models/k8sioms_kubernetes_iom_field_value_spec.rb new file mode 100644 index 00000000..fe812893 --- /dev/null +++ b/spec/models/k8sioms_kubernetes_iom_field_value_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::K8siomsKubernetesIOMFieldValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::K8siomsKubernetesIOMFieldValue do + let(:instance) { Falcon::K8siomsKubernetesIOMFieldValue.new } + + describe 'test an instance of K8siomsKubernetesIOMFieldValue' do + it 'should create an instance of K8siomsKubernetesIOMFieldValue' do + expect(instance).to be_instance_of(Falcon::K8siomsKubernetesIOMFieldValue) + 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 + + 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/model_user_input_read_response_spec.rb b/spec/models/model_user_input_read_response_spec.rb new file mode 100644 index 00000000..294d40c8 --- /dev/null +++ b/spec/models/model_user_input_read_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::ModelUserInputReadResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelUserInputReadResponse do + let(:instance) { Falcon::ModelUserInputReadResponse.new } + + describe 'test an instance of ModelUserInputReadResponse' do + it 'should create an instance of ModelUserInputReadResponse' do + expect(instance).to be_instance_of(Falcon::ModelUserInputReadResponse) + 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/model_user_input_update_request_spec.rb b/spec/models/model_user_input_update_request_spec.rb new file mode 100644 index 00000000..cafdc06c --- /dev/null +++ b/spec/models/model_user_input_update_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::ModelUserInputUpdateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelUserInputUpdateRequest do + let(:instance) { Falcon::ModelUserInputUpdateRequest.new } + + describe 'test an instance of ModelUserInputUpdateRequest' do + it 'should create an instance of ModelUserInputUpdateRequest' do + expect(instance).to be_instance_of(Falcon::ModelUserInputUpdateRequest) + end + end + describe 'test attribute "input"' 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"' 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/model_user_input_view_model_spec.rb b/spec/models/model_user_input_view_model_spec.rb new file mode 100644 index 00000000..07a76c96 --- /dev/null +++ b/spec/models/model_user_input_view_model_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::ModelUserInputViewModel +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelUserInputViewModel do + let(:instance) { Falcon::ModelUserInputViewModel.new } + + describe 'test an instance of ModelUserInputViewModel' do + it 'should create an instance of ModelUserInputViewModel' do + expect(instance).to be_instance_of(Falcon::ModelUserInputViewModel) + end + end + describe 'test attribute "allowed_inputs"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "allowed_responders"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completed"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "completed_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 "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 "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 "input"' 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"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "responder"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "timeout_at"' 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_account_entities_input_spec.rb b/spec/models/models_account_entities_input_spec.rb new file mode 100644 index 00000000..ccd2f3e3 --- /dev/null +++ b/spec/models/models_account_entities_input_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::ModelsAccountEntitiesInput +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAccountEntitiesInput do + let(:instance) { Falcon::ModelsAccountEntitiesInput.new } + + describe 'test an instance of ModelsAccountEntitiesInput' do + it 'should create an instance of ModelsAccountEntitiesInput' do + expect(instance).to be_instance_of(Falcon::ModelsAccountEntitiesInput) + end + end + describe 'test attribute "aws_accounts"' 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_account_status_response_spec.rb b/spec/models/models_account_status_response_spec.rb new file mode 100644 index 00000000..a0dfddcf --- /dev/null +++ b/spec/models/models_account_status_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::ModelsAccountStatusResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAccountStatusResponse do + let(:instance) { Falcon::ModelsAccountStatusResponse.new } + + describe 'test an instance of ModelsAccountStatusResponse' do + it 'should create an instance of ModelsAccountStatusResponse' do + expect(instance).to be_instance_of(Falcon::ModelsAccountStatusResponse) + 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/models_aggregate_values_by_field_response_spec.rb b/spec/models/models_aggregate_values_by_field_response_spec.rb new file mode 100644 index 00000000..1e8acdd8 --- /dev/null +++ b/spec/models/models_aggregate_values_by_field_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::ModelsAggregateValuesByFieldResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAggregateValuesByFieldResponse do + let(:instance) { Falcon::ModelsAggregateValuesByFieldResponse.new } + + describe 'test an instance of ModelsAggregateValuesByFieldResponse' do + it 'should create an instance of ModelsAggregateValuesByFieldResponse' do + expect(instance).to be_instance_of(Falcon::ModelsAggregateValuesByFieldResponse) + 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/models_api_assessment_detections_spec.rb b/spec/models/models_api_assessment_detections_spec.rb new file mode 100644 index 00000000..9bfb631b --- /dev/null +++ b/spec/models/models_api_assessment_detections_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::ModelsAPIAssessmentDetections +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIAssessmentDetections do + let(:instance) { Falcon::ModelsAPIAssessmentDetections.new } + + describe 'test an instance of ModelsAPIAssessmentDetections' do + it 'should create an instance of ModelsAPIAssessmentDetections' do + expect(instance).to be_instance_of(Falcon::ModelsAPIAssessmentDetections) + 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 "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 "detection_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 "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 "image_architecture"' 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_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 "image_digest"' 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_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 "image_registry"' 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_repository"' 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_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 "image_tag"' 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 "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 "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 "remediation"' 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 "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/models_api_combined_detections_spec.rb b/spec/models/models_api_combined_detections_spec.rb new file mode 100644 index 00000000..3a233b57 --- /dev/null +++ b/spec/models/models_api_combined_detections_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::ModelsAPICombinedDetections +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPICombinedDetections do + let(:instance) { Falcon::ModelsAPICombinedDetections.new } + + describe 'test an instance of ModelsAPICombinedDetections' do + it 'should create an instance of ModelsAPICombinedDetections' do + expect(instance).to be_instance_of(Falcon::ModelsAPICombinedDetections) + 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 "containers_impacted"' 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 "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 "detection_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 "detection_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 "detection_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 "detection_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 "images_impacted"' 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_detected"' 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"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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/models_api_container_alert_spec.rb b/spec/models/models_api_container_alert_spec.rb new file mode 100644 index 00000000..14ee6b55 --- /dev/null +++ b/spec/models/models_api_container_alert_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::ModelsAPIContainerAlert +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIContainerAlert do + let(:instance) { Falcon::ModelsAPIContainerAlert.new } + + describe 'test an instance of ModelsAPIContainerAlert' do + it 'should create an instance of ModelsAPIContainerAlert' do + expect(instance).to be_instance_of(Falcon::ModelsAPIContainerAlert) + end + end + describe 'test attribute "containers_impacted_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 "containers_impacted_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 "detection_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 "detection_event_simple_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 "detection_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 "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 "last_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 "severity"' 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 new file mode 100644 index 00000000..c524ac9c --- /dev/null +++ b/spec/models/models_api_customer_and_image_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::ModelsAPICustomerAndImage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPICustomerAndImage do + let(:instance) { Falcon::ModelsAPICustomerAndImage.new } + + describe 'test an instance of ModelsAPICustomerAndImage' do + it 'should create an instance of ModelsAPICustomerAndImage' do + expect(instance).to be_instance_of(Falcon::ModelsAPICustomerAndImage) + end + end + describe 'test attribute "base_os"' 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_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 "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 "config"' 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_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 "crowdstrike_user"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "digest"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "eol_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 "first_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 "image_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 "image_scanning_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 "image_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 "registry"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "repository"' 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"' 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 "uuid"' 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_detection_count_by_type_spec.rb b/spec/models/models_api_detection_count_by_type_spec.rb new file mode 100644 index 00000000..ee922749 --- /dev/null +++ b/spec/models/models_api_detection_count_by_type_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::ModelsAPIDetectionCountByType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIDetectionCountByType do + let(:instance) { Falcon::ModelsAPIDetectionCountByType.new } + + describe 'test an instance of ModelsAPIDetectionCountByType' do + it 'should create an instance of ModelsAPIDetectionCountByType' do + expect(instance).to be_instance_of(Falcon::ModelsAPIDetectionCountByType) + 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 "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/models_api_detection_count_spec.rb b/spec/models/models_api_detection_count_spec.rb new file mode 100644 index 00000000..f9d9b79b --- /dev/null +++ b/spec/models/models_api_detection_count_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::ModelsAPIDetectionCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIDetectionCount do + let(:instance) { Falcon::ModelsAPIDetectionCount.new } + + describe 'test an instance of ModelsAPIDetectionCount' do + it 'should create an instance of ModelsAPIDetectionCount' do + expect(instance).to be_instance_of(Falcon::ModelsAPIDetectionCount) + 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 + +end diff --git a/spec/models/models_api_drift_indicators_spec.rb b/spec/models/models_api_drift_indicators_spec.rb new file mode 100644 index 00000000..2430ce21 --- /dev/null +++ b/spec/models/models_api_drift_indicators_spec.rb @@ -0,0 +1,195 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ModelsAPIDriftIndicators +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIDriftIndicators do + let(:instance) { Falcon::ModelsAPIDriftIndicators.new } + + describe 'test an instance of ModelsAPIDriftIndicators' do + it 'should create an instance of ModelsAPIDriftIndicators' do + expect(instance).to be_instance_of(Falcon::ModelsAPIDriftIndicators) + end + end + describe 'test attribute "agent_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 "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 "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_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 "command_line"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "computer_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 "container_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 "detection_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 "detection_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 "detection_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 "file_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 "host_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 "indicator_process_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 "namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "occurred_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 "parent_process_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 "pod_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 "pod_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 "prevented"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "prevention_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 "prevention_status_string"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "scheduler_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 "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 "sha256"' 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 + +end diff --git a/spec/models/domain_msa_meta_info_spec.rb b/spec/models/models_api_filter_label_spec.rb similarity index 80% rename from spec/models/domain_msa_meta_info_spec.rb rename to spec/models/models_api_filter_label_spec.rb index efe6da45..2da89695 100644 --- a/spec/models/domain_msa_meta_info_spec.rb +++ b/spec/models/models_api_filter_label_spec.rb @@ -31,24 +31,24 @@ require 'json' require 'date' -# Unit tests for Falcon::DomainMsaMetaInfo +# Unit tests for Falcon::ModelsAPIFilterLabel # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::DomainMsaMetaInfo do - let(:instance) { Falcon::DomainMsaMetaInfo.new } +describe Falcon::ModelsAPIFilterLabel do + let(:instance) { Falcon::ModelsAPIFilterLabel.new } - describe 'test an instance of DomainMsaMetaInfo' do - it 'should create an instance of DomainMsaMetaInfo' do - expect(instance).to be_instance_of(Falcon::DomainMsaMetaInfo) + describe 'test an instance of ModelsAPIFilterLabel' do + it 'should create an instance of ModelsAPIFilterLabel' do + expect(instance).to be_instance_of(Falcon::ModelsAPIFilterLabel) end end - describe 'test attribute "pagination"' do + 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 "query_time"' do + describe 'test attribute "label"' 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/models_api_filter_response_spec.rb b/spec/models/models_api_filter_response_spec.rb new file mode 100644 index 00000000..0d2c5a6b --- /dev/null +++ b/spec/models/models_api_filter_response_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::ModelsAPIFilterResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIFilterResponse do + let(:instance) { Falcon::ModelsAPIFilterResponse.new } + + describe 'test an instance of ModelsAPIFilterResponse' do + it 'should create an instance of ModelsAPIFilterResponse' do + expect(instance).to be_instance_of(Falcon::ModelsAPIFilterResponse) + end + end + describe 'test attribute "buckets"' 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/models_api_image_assessment_history_spec.rb b/spec/models/models_api_image_assessment_history_spec.rb new file mode 100644 index 00000000..f2837417 --- /dev/null +++ b/spec/models/models_api_image_assessment_history_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::ModelsAPIImageAssessmentHistory +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIImageAssessmentHistory do + let(:instance) { Falcon::ModelsAPIImageAssessmentHistory.new } + + describe 'test an instance of ModelsAPIImageAssessmentHistory' do + it 'should create an instance of ModelsAPIImageAssessmentHistory' do + expect(instance).to be_instance_of(Falcon::ModelsAPIImageAssessmentHistory) + end + end + describe 'test attribute "buckets"' 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/models_api_image_assessment_spec.rb b/spec/models/models_api_image_assessment_spec.rb new file mode 100644 index 00000000..03ed04ca --- /dev/null +++ b/spec/models/models_api_image_assessment_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::ModelsAPIImageAssessment +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIImageAssessment do + let(:instance) { Falcon::ModelsAPIImageAssessment.new } + + describe 'test an instance of ModelsAPIImageAssessment' do + it 'should create an instance of ModelsAPIImageAssessment' do + expect(instance).to be_instance_of(Falcon::ModelsAPIImageAssessment) + end + end + describe 'test attribute "assessed"' 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_image_pull"' 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_image_push"' 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_missing_config"' 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_unsupported_schema_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 "time_stamp"' 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_image_by_vulnerability_count_spec.rb b/spec/models/models_api_image_by_vulnerability_count_spec.rb new file mode 100644 index 00000000..95e3e11a --- /dev/null +++ b/spec/models/models_api_image_by_vulnerability_count_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::ModelsAPIImageByVulnerabilityCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIImageByVulnerabilityCount do + let(:instance) { Falcon::ModelsAPIImageByVulnerabilityCount.new } + + describe 'test an instance of ModelsAPIImageByVulnerabilityCount' do + it 'should create an instance of ModelsAPIImageByVulnerabilityCount' do + expect(instance).to be_instance_of(Falcon::ModelsAPIImageByVulnerabilityCount) + end + end + describe 'test attribute "image_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 "registry"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "repository"' 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"' 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_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/models_api_image_combined_export_spec.rb b/spec/models/models_api_image_combined_export_spec.rb new file mode 100644 index 00000000..5e70dbe5 --- /dev/null +++ b/spec/models/models_api_image_combined_export_spec.rb @@ -0,0 +1,165 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ModelsAPIImageCombinedExport +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIImageCombinedExport do + let(:instance) { Falcon::ModelsAPIImageCombinedExport.new } + + describe 'test an instance of ModelsAPIImageCombinedExport' do + it 'should create an instance of ModelsAPIImageCombinedExport' do + expect(instance).to be_instance_of(Falcon::ModelsAPIImageCombinedExport) + end + end + describe 'test attribute "base_os"' 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 "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 "cvss_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 "detection_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 "detection_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 "detection_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 "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 "image_digest"' 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_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"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "packages_impacted"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "registry"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "repository"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "started_containers"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "stopped_containers"' 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"' 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_cps_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 "vulnerability_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 "vulnerability_severity"' 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_image_count_spec.rb b/spec/models/models_api_image_count_spec.rb new file mode 100644 index 00000000..3bed1f46 --- /dev/null +++ b/spec/models/models_api_image_count_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::ModelsAPIImageCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIImageCount do + let(:instance) { Falcon::ModelsAPIImageCount.new } + + describe 'test an instance of ModelsAPIImageCount' do + it 'should create an instance of ModelsAPIImageCount' do + expect(instance).to be_instance_of(Falcon::ModelsAPIImageCount) + 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 + +end diff --git a/spec/models/models_api_image_issues_summary_spec.rb b/spec/models/models_api_image_issues_summary_spec.rb new file mode 100644 index 00000000..f171855b --- /dev/null +++ b/spec/models/models_api_image_issues_summary_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::ModelsAPIImageIssuesSummary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIImageIssuesSummary do + let(:instance) { Falcon::ModelsAPIImageIssuesSummary.new } + + describe 'test an instance of ModelsAPIImageIssuesSummary' do + it 'should create an instance of ModelsAPIImageIssuesSummary' do + expect(instance).to be_instance_of(Falcon::ModelsAPIImageIssuesSummary) + end + end + describe 'test attribute "image_container_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 "image_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 "is_dca_run"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "known_issues"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "packages_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 "policies_summary"' 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_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 "vulnerabilities_summary"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "zero_day_impacted"' 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_image_vulnerabilities_summary_spec.rb b/spec/models/models_api_image_vulnerabilities_summary_spec.rb new file mode 100644 index 00000000..6fd1ac2d --- /dev/null +++ b/spec/models/models_api_image_vulnerabilities_summary_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::ModelsAPIImageVulnerabilitiesSummary +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIImageVulnerabilitiesSummary do + let(:instance) { Falcon::ModelsAPIImageVulnerabilitiesSummary.new } + + describe 'test an instance of ModelsAPIImageVulnerabilitiesSummary' do + it 'should create an instance of ModelsAPIImageVulnerabilitiesSummary' do + expect(instance).to be_instance_of(Falcon::ModelsAPIImageVulnerabilitiesSummary) + end + end + describe 'test attribute "app_packages_with_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 "app_vuln_by_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 "image_vuln_by_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 "layers_with_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 "os_packages_with_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 "os_vuln_by_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 "total_app_packages"' 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_os_packages"' 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_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/models_api_kubernetes_iom_spec.rb b/spec/models/models_api_kubernetes_iom_spec.rb new file mode 100644 index 00000000..814bb108 --- /dev/null +++ b/spec/models/models_api_kubernetes_iom_spec.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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsAPIKubernetesIOM +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIKubernetesIOM do + let(:instance) { Falcon::ModelsAPIKubernetesIOM.new } + + describe 'test an instance of ModelsAPIKubernetesIOM' do + it 'should create an instance of ModelsAPIKubernetesIOM' do + expect(instance).to be_instance_of(Falcon::ModelsAPIKubernetesIOM) + end + end + describe 'test attribute "admission_review_action"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "admission_review_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 "admission_review_msg"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "admission_review_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 "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 "cis_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_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 "containers_impacted_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 "containers_impacted_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 "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 "detect_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 "detection_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 "detection_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 "detection_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 "image_assessment_matched_cves"' 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_assessment_policy_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 "image_assessment_policy_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 "image_assessment_policy_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 "image_digest"' 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_has_been_assessed"' 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_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 "image_registry"' 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_repository"' 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_tag"' 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_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 "mitigation_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 "mitigation_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 "namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "nist_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 "pod_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 "pods_impacted_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 "policy_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 "policy_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 "ports"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "prevented"' 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"' 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_creation_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 "resource_group_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_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_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 "sensitive_env_vars"' 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_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 "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 "tactic_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 "tactic_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 "technique_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 "technique_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/models_api_package_combined_spec.rb b/spec/models/models_api_package_combined_spec.rb new file mode 100644 index 00000000..8b5bd1c4 --- /dev/null +++ b/spec/models/models_api_package_combined_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::ModelsAPIPackageCombined +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPackageCombined do + let(:instance) { Falcon::ModelsAPIPackageCombined.new } + + describe 'test an instance of ModelsAPIPackageCombined' do + it 'should create an instance of ModelsAPIPackageCombined' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPackageCombined) + 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 "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 "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 "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 "vulnerability_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/models_api_package_vulnerability_spec.rb b/spec/models/models_api_package_vulnerability_spec.rb new file mode 100644 index 00000000..f3eb8625 --- /dev/null +++ b/spec/models/models_api_package_vulnerability_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::ModelsAPIPackageVulnerability +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPackageVulnerability do + let(:instance) { Falcon::ModelsAPIPackageVulnerability.new } + + describe 'test an instance of ModelsAPIPackageVulnerability' do + it 'should create an instance of ModelsAPIPackageVulnerability' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPackageVulnerability) + 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 "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 "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 "severity"' 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_packages_by_vuln_count_spec.rb b/spec/models/models_api_packages_by_vuln_count_spec.rb new file mode 100644 index 00000000..9d2788d5 --- /dev/null +++ b/spec/models/models_api_packages_by_vuln_count_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::ModelsAPIPackagesByVulnCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPackagesByVulnCount do + let(:instance) { Falcon::ModelsAPIPackagesByVulnCount.new } + + describe 'test an instance of ModelsAPIPackagesByVulnCount' do + it 'should create an instance of ModelsAPIPackagesByVulnCount' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPackagesByVulnCount) + end + end + describe 'test attribute "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 "package"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "packages_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 "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 "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 "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/models_api_policy_count_by_action_spec.rb b/spec/models/models_api_policy_count_by_action_spec.rb new file mode 100644 index 00000000..6774b474 --- /dev/null +++ b/spec/models/models_api_policy_count_by_action_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::ModelsAPIPolicyCountByAction +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPolicyCountByAction do + let(:instance) { Falcon::ModelsAPIPolicyCountByAction.new } + + describe 'test an instance of ModelsAPIPolicyCountByAction' do + it 'should create an instance of ModelsAPIPolicyCountByAction' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyCountByAction) + end + end + describe 'test attribute "action"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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 + +end diff --git a/spec/models/models_scan_results_spec.rb b/spec/models/models_api_policy_data_spec.rb similarity index 80% rename from spec/models/models_scan_results_spec.rb rename to spec/models/models_api_policy_data_spec.rb index 9eeee6b3..568a07ad 100644 --- a/spec/models/models_scan_results_spec.rb +++ b/spec/models/models_api_policy_data_spec.rb @@ -31,24 +31,24 @@ require 'json' require 'date' -# Unit tests for Falcon::ModelsScanResults +# Unit tests for Falcon::ModelsAPIPolicyData # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::ModelsScanResults do - let(:instance) { Falcon::ModelsScanResults.new } +describe Falcon::ModelsAPIPolicyData do + let(:instance) { Falcon::ModelsAPIPolicyData.new } - describe 'test an instance of ModelsScanResults' do - it 'should create an instance of ModelsScanResults' do - expect(instance).to be_instance_of(Falcon::ModelsScanResults) + describe 'test an instance of ModelsAPIPolicyData' do + it 'should create an instance of ModelsAPIPolicyData' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyData) end end - describe 'test attribute "applications"' do + 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 "os_version"' do + describe 'test attribute "rules"' 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/models_job_meta_data_spec.rb b/spec/models/models_api_policy_entity_spec.rb similarity index 78% rename from spec/models/models_job_meta_data_spec.rb rename to spec/models/models_api_policy_entity_spec.rb index 25183f94..45823c09 100644 --- a/spec/models/models_job_meta_data_spec.rb +++ b/spec/models/models_api_policy_entity_spec.rb @@ -31,60 +31,60 @@ require 'json' require 'date' -# Unit tests for Falcon::ModelsJobMetaData +# Unit tests for Falcon::ModelsAPIPolicyEntity # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::ModelsJobMetaData do - let(:instance) { Falcon::ModelsJobMetaData.new } +describe Falcon::ModelsAPIPolicyEntity do + let(:instance) { Falcon::ModelsAPIPolicyEntity.new } - describe 'test an instance of ModelsJobMetaData' do - it 'should create an instance of ModelsJobMetaData' do - expect(instance).to be_instance_of(Falcon::ModelsJobMetaData) + describe 'test an instance of ModelsAPIPolicyEntity' do + it 'should create an instance of ModelsAPIPolicyEntity' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyEntity) end end - describe 'test attribute "cloud_provider"' do + 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 "instance_id"' do + 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 "job_end_time"' do + describe 'test attribute "is_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 "job_id"' 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 "job_start_time"' do + describe 'test attribute "policy_data"' 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 + describe 'test attribute "policy_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 "scanner_version"' do + 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 "status"' do + 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 diff --git a/spec/models/models_api_policy_exclusion_spec.rb b/spec/models/models_api_policy_exclusion_spec.rb new file mode 100644 index 00000000..a566256c --- /dev/null +++ b/spec/models/models_api_policy_exclusion_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::ModelsAPIPolicyExclusion +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPolicyExclusion do + let(:instance) { Falcon::ModelsAPIPolicyExclusion.new } + + describe 'test an instance of ModelsAPIPolicyExclusion' do + it 'should create an instance of ModelsAPIPolicyExclusion' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyExclusion) + end + end + describe 'test attribute "conditions"' 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_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 "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 "policy_type_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 "updated_at"' 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_policy_group_data_spec.rb b/spec/models/models_api_policy_group_data_spec.rb new file mode 100644 index 00000000..4c80ce2f --- /dev/null +++ b/spec/models/models_api_policy_group_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::ModelsAPIPolicyGroupData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPolicyGroupData do + let(:instance) { Falcon::ModelsAPIPolicyGroupData.new } + + describe 'test an instance of ModelsAPIPolicyGroupData' do + it 'should create an instance of ModelsAPIPolicyGroupData' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyGroupData) + end + end + describe 'test attribute "conditions"' 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_policy_group_spec.rb b/spec/models/models_api_policy_group_spec.rb new file mode 100644 index 00000000..870a3504 --- /dev/null +++ b/spec/models/models_api_policy_group_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::ModelsAPIPolicyGroup +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPolicyGroup do + let(:instance) { Falcon::ModelsAPIPolicyGroup.new } + + describe 'test an instance of ModelsAPIPolicyGroup' do + it 'should create an instance of ModelsAPIPolicyGroup' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyGroup) + 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 "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 "policy_group_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "policy_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 "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 "uuid"' 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_policy_rule_spec.rb b/spec/models/models_api_policy_rule_spec.rb new file mode 100644 index 00000000..20971c3e --- /dev/null +++ b/spec/models/models_api_policy_rule_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::ModelsAPIPolicyRule +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPolicyRule do + let(:instance) { Falcon::ModelsAPIPolicyRule.new } + + describe 'test an instance of ModelsAPIPolicyRule' do + it 'should create an instance of ModelsAPIPolicyRule' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyRule) + end + end + describe 'test attribute "action"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "policy_rules_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/models_api_policy_rules_data_spec.rb b/spec/models/models_api_policy_rules_data_spec.rb new file mode 100644 index 00000000..7faa3255 --- /dev/null +++ b/spec/models/models_api_policy_rules_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::ModelsAPIPolicyRulesData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPolicyRulesData do + let(:instance) { Falcon::ModelsAPIPolicyRulesData.new } + + describe 'test an instance of ModelsAPIPolicyRulesData' do + it 'should create an instance of ModelsAPIPolicyRulesData' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPolicyRulesData) + end + end + describe 'test attribute "conditions"' 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_precedence_request_spec.rb b/spec/models/models_api_precedence_request_spec.rb new file mode 100644 index 00000000..d5e79550 --- /dev/null +++ b/spec/models/models_api_precedence_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::ModelsAPIPrecedenceRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIPrecedenceRequest do + let(:instance) { Falcon::ModelsAPIPrecedenceRequest.new } + + describe 'test an instance of ModelsAPIPrecedenceRequest' do + it 'should create an instance of ModelsAPIPrecedenceRequest' do + expect(instance).to be_instance_of(Falcon::ModelsAPIPrecedenceRequest) + 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 + +end diff --git a/spec/models/models_api_runtime_detection_spec.rb b/spec/models/models_api_runtime_detection_spec.rb new file mode 100644 index 00000000..60481bde --- /dev/null +++ b/spec/models/models_api_runtime_detection_spec.rb @@ -0,0 +1,369 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ModelsAPIRuntimeDetection +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIRuntimeDetection do + let(:instance) { Falcon::ModelsAPIRuntimeDetection.new } + + describe 'test an instance of ModelsAPIRuntimeDetection' do + it 'should create an instance of ModelsAPIRuntimeDetection' do + expect(instance).to be_instance_of(Falcon::ModelsAPIRuntimeDetection) + end + end + describe 'test attribute "action_taken"' 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_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 "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 "assigned_to"' 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"' 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_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_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/ + 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 "command_line"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "computer_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 "container_devices"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "container_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 "container_interactive_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 "container_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 "container_network_ip_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 "container_privileged"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "container_read_only_root_fs"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "container_user_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 "containers_impacted_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 "detect_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 "detection_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 "detection_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 "detection_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 "executable_sha_256"' 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_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 "file_path"' 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_containers_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 "host_detections_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 "host_detections_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 "host_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 "host_last_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 "host_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 "image_digest"' 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_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 "image_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 "image_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 "image_last_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 "image_maintainer"' 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_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 "images_container_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 "namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "network_ip_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 "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 "pod_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 "pod_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 "pod_namespace"' 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_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 "tactic_and_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 "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 "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/models_api_unidentified_container_spec.rb b/spec/models/models_api_unidentified_container_spec.rb new file mode 100644 index 00000000..d5b5c71d --- /dev/null +++ b/spec/models/models_api_unidentified_container_spec.rb @@ -0,0 +1,171 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ModelsAPIUnidentifiedContainer +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIUnidentifiedContainer do + let(:instance) { Falcon::ModelsAPIUnidentifiedContainer.new } + + describe 'test an instance of ModelsAPIUnidentifiedContainer' do + it 'should create an instance of ModelsAPIUnidentifiedContainer' do + expect(instance).to be_instance_of(Falcon::ModelsAPIUnidentifiedContainer) + end + end + describe 'test attribute "assessed_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 "assessed_images_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 "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 "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 "containers_impacted"' 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_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 "detect_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 "detections_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 "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 "host_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 "image_assessment_detections_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 "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 "namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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 "pod_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 "pod_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 "runtime_detections_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 "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 "unassessed_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 "unassessed_images_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 "visible_to_k8s"' 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_vuln_by_image_count_spec.rb b/spec/models/models_api_vuln_by_image_count_spec.rb new file mode 100644 index 00000000..9d2db6b8 --- /dev/null +++ b/spec/models/models_api_vuln_by_image_count_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::ModelsAPIVulnByImageCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIVulnByImageCount do + let(:instance) { Falcon::ModelsAPIVulnByImageCount.new } + + describe 'test an instance of ModelsAPIVulnByImageCount' do + it 'should create an instance of ModelsAPIVulnByImageCount' do + expect(instance).to be_instance_of(Falcon::ModelsAPIVulnByImageCount) + 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 "images_impacted"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "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 "severity"' 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_vuln_by_publication_date_spec.rb b/spec/models/models_api_vuln_by_publication_date_spec.rb new file mode 100644 index 00000000..be946d7e --- /dev/null +++ b/spec/models/models_api_vuln_by_publication_date_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::ModelsAPIVulnByPublicationDate +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIVulnByPublicationDate do + let(:instance) { Falcon::ModelsAPIVulnByPublicationDate.new } + + describe 'test an instance of ModelsAPIVulnByPublicationDate' do + it 'should create an instance of ModelsAPIVulnByPublicationDate' do + expect(instance).to be_instance_of(Falcon::ModelsAPIVulnByPublicationDate) + 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/ + 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 "cvss_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 "images_impacted"' 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 + + 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 + +end diff --git a/spec/models/models_api_vuln_count_by_severity_spec.rb b/spec/models/models_api_vuln_count_by_severity_spec.rb new file mode 100644 index 00000000..864323aa --- /dev/null +++ b/spec/models/models_api_vuln_count_by_severity_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::ModelsAPIVulnCountBySeverity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIVulnCountBySeverity do + let(:instance) { Falcon::ModelsAPIVulnCountBySeverity.new } + + describe 'test an instance of ModelsAPIVulnCountBySeverity' do + it 'should create an instance of ModelsAPIVulnCountBySeverity' do + expect(instance).to be_instance_of(Falcon::ModelsAPIVulnCountBySeverity) + 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 "severity"' 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_vuln_count_spec.rb b/spec/models/models_api_vuln_count_spec.rb new file mode 100644 index 00000000..04619aca --- /dev/null +++ b/spec/models/models_api_vuln_count_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::ModelsAPIVulnCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIVulnCount do + let(:instance) { Falcon::ModelsAPIVulnCount.new } + + describe 'test an instance of ModelsAPIVulnCount' do + it 'should create an instance of ModelsAPIVulnCount' do + expect(instance).to be_instance_of(Falcon::ModelsAPIVulnCount) + 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 + +end diff --git a/spec/models/models_api_vulnerability_combined_spec.rb b/spec/models/models_api_vulnerability_combined_spec.rb new file mode 100644 index 00000000..44736d83 --- /dev/null +++ b/spec/models/models_api_vulnerability_combined_spec.rb @@ -0,0 +1,123 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ModelsAPIVulnerabilityCombined +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIVulnerabilityCombined do + let(:instance) { Falcon::ModelsAPIVulnerabilityCombined.new } + + describe 'test an instance of ModelsAPIVulnerabilityCombined' do + it 'should create an instance of ModelsAPIVulnerabilityCombined' do + expect(instance).to be_instance_of(Falcon::ModelsAPIVulnerabilityCombined) + 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/ + end + end + + describe 'test attribute "cps_current_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 "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 "cvss_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 "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_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 "exploited_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 "exploited_status_string"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "images_impacted"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "packages_impacted"' 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 + + describe 'test attribute "remediation_available"' 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 + +end diff --git a/spec/models/models_api_vulnerability_details_spec.rb b/spec/models/models_api_vulnerability_details_spec.rb new file mode 100644 index 00000000..a716fc37 --- /dev/null +++ b/spec/models/models_api_vulnerability_details_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::ModelsAPIVulnerabilityDetails +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIVulnerabilityDetails do + let(:instance) { Falcon::ModelsAPIVulnerabilityDetails.new } + + describe 'test an instance of ModelsAPIVulnerabilityDetails' do + it 'should create an instance of ModelsAPIVulnerabilityDetails' do + expect(instance).to be_instance_of(Falcon::ModelsAPIVulnerabilityDetails) + end + end + describe 'test attribute "cps_current_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 "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 "cvss_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 "exploited_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 "layer_command"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "layer_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 "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 "package_path"' 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_available"' 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 + +end diff --git a/spec/models/models_api_vulnerability_info_spec.rb b/spec/models/models_api_vulnerability_info_spec.rb new file mode 100644 index 00000000..afbb8804 --- /dev/null +++ b/spec/models/models_api_vulnerability_info_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::ModelsAPIVulnerabilityInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsAPIVulnerabilityInfo do + let(:instance) { Falcon::ModelsAPIVulnerabilityInfo.new } + + describe 'test an instance of ModelsAPIVulnerabilityInfo' do + it 'should create an instance of ModelsAPIVulnerabilityInfo' do + expect(instance).to be_instance_of(Falcon::ModelsAPIVulnerabilityInfo) + end + end + describe 'test attribute "cps_current_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 "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 "cvss_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 "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_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 "exploited_status_string"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "images_impacted"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "packages"' 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 + + 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 "threat_actors"' 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_cluster_entity_response_spec.rb b/spec/models/models_cluster_entity_response_spec.rb new file mode 100644 index 00000000..bf2ffe51 --- /dev/null +++ b/spec/models/models_cluster_entity_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::ModelsClusterEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsClusterEntityResponse do + let(:instance) { Falcon::ModelsClusterEntityResponse.new } + + describe 'test an instance of ModelsClusterEntityResponse' do + it 'should create an instance of ModelsClusterEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsClusterEntityResponse) + 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/models_cluster_spec.rb b/spec/models/models_cluster_spec.rb new file mode 100644 index 00000000..82500447 --- /dev/null +++ b/spec/models/models_cluster_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' +require 'date' + +# Unit tests for Falcon::ModelsCluster +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsCluster do + let(:instance) { Falcon::ModelsCluster.new } + + describe 'test an instance of ModelsCluster' do + it 'should create an instance of ModelsCluster' do + expect(instance).to be_instance_of(Falcon::ModelsCluster) + end + end + describe 'test attribute "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 "agent_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 "agents"' 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_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_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 "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 "cluster_security_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 "cluster_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 "container_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 "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 "kubernetes_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 "labels_list"' 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 "management_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 "node_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 "pod_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 "security_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 "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 "virtual_network"' 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_coverage_response_entity_spec.rb b/spec/models/models_container_coverage_response_entity_spec.rb new file mode 100644 index 00000000..2091403d --- /dev/null +++ b/spec/models/models_container_coverage_response_entity_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::ModelsContainerCoverageResponseEntity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainerCoverageResponseEntity do + let(:instance) { Falcon::ModelsContainerCoverageResponseEntity.new } + + describe 'test an instance of ModelsContainerCoverageResponseEntity' do + it 'should create an instance of ModelsContainerCoverageResponseEntity' do + expect(instance).to be_instance_of(Falcon::ModelsContainerCoverageResponseEntity) + 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/models_container_coverage_spec.rb b/spec/models/models_container_coverage_spec.rb new file mode 100644 index 00000000..3f59809c --- /dev/null +++ b/spec/models/models_container_coverage_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::ModelsContainerCoverage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainerCoverage do + let(:instance) { Falcon::ModelsContainerCoverage.new } + + describe 'test an instance of ModelsContainerCoverage' do + it 'should create an instance of ModelsContainerCoverage' do + expect(instance).to be_instance_of(Falcon::ModelsContainerCoverage) + end + end + describe 'test attribute "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 "unmanaged"' 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_entity_response_spec.rb b/spec/models/models_container_entity_response_spec.rb new file mode 100644 index 00000000..50cc8c84 --- /dev/null +++ b/spec/models/models_container_entity_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::ModelsContainerEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainerEntityResponse do + let(:instance) { Falcon::ModelsContainerEntityResponse.new } + + describe 'test an instance of ModelsContainerEntityResponse' do + it 'should create an instance of ModelsContainerEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsContainerEntityResponse) + 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/models_container_image_spec.rb b/spec/models/models_container_image_spec.rb new file mode 100644 index 00000000..3ff5931f --- /dev/null +++ b/spec/models/models_container_image_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::ModelsContainerImage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainerImage do + let(:instance) { Falcon::ModelsContainerImage.new } + + describe 'test an instance of ModelsContainerImage' do + it 'should create an instance of ModelsContainerImage' do + expect(instance).to be_instance_of(Falcon::ModelsContainerImage) + 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 "container_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 "containers_running_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 "hosts"' 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 "image_detection_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 "image_digest"' 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_has_been_assessed"' 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_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 "image_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 "image_registry"' 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_repository"' 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_tag"' 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_vulnerability_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 "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 "running_container_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/models_container_information_spec.rb b/spec/models/models_container_information_spec.rb new file mode 100644 index 00000000..5926830e --- /dev/null +++ b/spec/models/models_container_information_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::ModelsContainerInformation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainerInformation do + let(:instance) { Falcon::ModelsContainerInformation.new } + + describe 'test an instance of ModelsContainerInformation' do + it 'should create an instance of ModelsContainerInformation' do + expect(instance).to be_instance_of(Falcon::ModelsContainerInformation) + end + end + describe 'test attribute "container_detection_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 "container_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/models_container_runtime_pivot_response_spec.rb b/spec/models/models_container_runtime_pivot_response_spec.rb new file mode 100644 index 00000000..2765efa5 --- /dev/null +++ b/spec/models/models_container_runtime_pivot_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::ModelsContainerRuntimePivotResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainerRuntimePivotResponse do + let(:instance) { Falcon::ModelsContainerRuntimePivotResponse.new } + + describe 'test an instance of ModelsContainerRuntimePivotResponse' do + it 'should create an instance of ModelsContainerRuntimePivotResponse' do + expect(instance).to be_instance_of(Falcon::ModelsContainerRuntimePivotResponse) + 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/models_container_runtime_pivot_spec.rb b/spec/models/models_container_runtime_pivot_spec.rb new file mode 100644 index 00000000..ef057d3f --- /dev/null +++ b/spec/models/models_container_runtime_pivot_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::ModelsContainerRuntimePivot +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainerRuntimePivot do + let(:instance) { Falcon::ModelsContainerRuntimePivot.new } + + describe 'test an instance of ModelsContainerRuntimePivot' do + it 'should create an instance of ModelsContainerRuntimePivot' do + expect(instance).to be_instance_of(Falcon::ModelsContainerRuntimePivot) + 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_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 "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 "container_runtime_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 "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 "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 "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 "node_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 "pod_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/models_container_spec.rb b/spec/models/models_container_spec.rb new file mode 100644 index 00000000..44ddd0e8 --- /dev/null +++ b/spec/models/models_container_spec.rb @@ -0,0 +1,429 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::ModelsContainer +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsContainer do + let(:instance) { Falcon::ModelsContainer.new } + + describe 'test an instance of ModelsContainer' do + it 'should create an instance of ModelsContainer' do + expect(instance).to be_instance_of(Falcon::ModelsContainer) + end + end + describe 'test attribute "agents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "allow_privilege_escalation"' 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"' 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_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 "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 "config_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 "config_user"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "container_image_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 "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 "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 "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 "host_config_devices"' 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 "image_application_package_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 "image_assessed_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 "image_detection_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 "image_detection_id_list"' 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_detection_name_list"' 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_detection_severity_by_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 "image_digest"' 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_has_been_assessed"' 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_highest_severity_vulnerability"' 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_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 "image_package_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 "image_registry"' 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_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 "image_tag"' 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_vulnerability_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 "image_vulnerability_severity_by_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 "insecure_mount_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 "insecure_mount_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 "insecure_propagation_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 "interactive_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 "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 "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 "kpa_coverage"' 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 "labels_list"' 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 "linux_sensor_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 "linux_sensor_config_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 "linux_sensor_coverage"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "lumos_sensor_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 "lumos_sensor_config_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 "lumos_sensor_coverage"' 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 "namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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 "node_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 "pod_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 "pod_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 "port_list"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "privileged"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "root_write_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 "rpd"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "run_as_root_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 "run_as_root_user"' 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_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 "snapshot_coverage"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "unidentified"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "volume_mounts"' 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_create_image_group_request_spec.rb b/spec/models/models_create_image_group_request_spec.rb new file mode 100644 index 00000000..831eb9ae --- /dev/null +++ b/spec/models/models_create_image_group_request_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::ModelsCreateImageGroupRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsCreateImageGroupRequest do + let(:instance) { Falcon::ModelsCreateImageGroupRequest.new } + + describe 'test an instance of ModelsCreateImageGroupRequest' do + it 'should create an instance of ModelsCreateImageGroupRequest' do + expect(instance).to be_instance_of(Falcon::ModelsCreateImageGroupRequest) + 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 "policy_group_data"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "policy_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/models_create_policy_request_spec.rb b/spec/models/models_create_policy_request_spec.rb new file mode 100644 index 00000000..25448172 --- /dev/null +++ b/spec/models/models_create_policy_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::ModelsCreatePolicyRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsCreatePolicyRequest do + let(:instance) { Falcon::ModelsCreatePolicyRequest.new } + + describe 'test an instance of ModelsCreatePolicyRequest' do + it 'should create an instance of ModelsCreatePolicyRequest' do + expect(instance).to be_instance_of(Falcon::ModelsCreatePolicyRequest) + 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 + +end diff --git a/spec/models/models_definition_create_request_v2_spec.rb b/spec/models/models_definition_create_request_v2_spec.rb new file mode 100644 index 00000000..8b40e146 --- /dev/null +++ b/spec/models/models_definition_create_request_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::ModelsDefinitionCreateRequestV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsDefinitionCreateRequestV2 do + let(:instance) { Falcon::ModelsDefinitionCreateRequestV2.new } + + describe 'test an instance of ModelsDefinitionCreateRequestV2' do + it 'should create an instance of ModelsDefinitionCreateRequestV2' do + expect(instance).to be_instance_of(Falcon::ModelsDefinitionCreateRequestV2) + 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 "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 "flight_control"' 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_definition_update_request_v2_spec.rb b/spec/models/models_definition_update_request_v2_spec.rb new file mode 100644 index 00000000..2d8d650d --- /dev/null +++ b/spec/models/models_definition_update_request_v2_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::ModelsDefinitionUpdateRequestV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsDefinitionUpdateRequestV2 do + let(:instance) { Falcon::ModelsDefinitionUpdateRequestV2.new } + + describe 'test an instance of ModelsDefinitionUpdateRequestV2' do + it 'should create an instance of ModelsDefinitionUpdateRequestV2' do + expect(instance).to be_instance_of(Falcon::ModelsDefinitionUpdateRequestV2) + 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 "change_log"' 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 "flight_control"' 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 + +end diff --git a/spec/models/models_deployment_entity_response_spec.rb b/spec/models/models_deployment_entity_response_spec.rb new file mode 100644 index 00000000..b4dc7341 --- /dev/null +++ b/spec/models/models_deployment_entity_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::ModelsDeploymentEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsDeploymentEntityResponse do + let(:instance) { Falcon::ModelsDeploymentEntityResponse.new } + + describe 'test an instance of ModelsDeploymentEntityResponse' do + it 'should create an instance of ModelsDeploymentEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsDeploymentEntityResponse) + 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/models_deployment_spec.rb b/spec/models/models_deployment_spec.rb new file mode 100644 index 00000000..6644f48c --- /dev/null +++ b/spec/models/models_deployment_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::ModelsDeployment +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsDeployment do + let(:instance) { Falcon::ModelsDeployment.new } + + describe 'test an instance of ModelsDeployment' do + it 'should create an instance of ModelsDeployment' do + expect(instance).to be_instance_of(Falcon::ModelsDeployment) + 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 "asset_identifier"' 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 "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_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 "last_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 "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 "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 "status_detail"' 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_exclusion_condition_request_spec.rb b/spec/models/models_exclusion_condition_request_spec.rb new file mode 100644 index 00000000..a5ba0af7 --- /dev/null +++ b/spec/models/models_exclusion_condition_request_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::ModelsExclusionConditionRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsExclusionConditionRequest do + let(:instance) { Falcon::ModelsExclusionConditionRequest.new } + + describe 'test an instance of ModelsExclusionConditionRequest' do + it 'should create an instance of ModelsExclusionConditionRequest' do + expect(instance).to be_instance_of(Falcon::ModelsExclusionConditionRequest) + 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 "prop"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ttl"' 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/models_exclusion_condition_spec.rb b/spec/models/models_exclusion_condition_spec.rb new file mode 100644 index 00000000..13e87104 --- /dev/null +++ b/spec/models/models_exclusion_condition_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::ModelsExclusionCondition +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsExclusionCondition do + let(:instance) { Falcon::ModelsExclusionCondition.new } + + describe 'test an instance of ModelsExclusionCondition' do + it 'should create an instance of ModelsExclusionCondition' do + expect(instance).to be_instance_of(Falcon::ModelsExclusionCondition) + 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 "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 "op"' 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 + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "ttl"' 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 "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/models_image_information_spec.rb b/spec/models/models_image_information_spec.rb new file mode 100644 index 00000000..028c190a --- /dev/null +++ b/spec/models/models_image_information_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::ModelsImageInformation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsImageInformation do + let(:instance) { Falcon::ModelsImageInformation.new } + + describe 'test an instance of ModelsImageInformation' do + it 'should create an instance of ModelsImageInformation' do + expect(instance).to be_instance_of(Falcon::ModelsImageInformation) + 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/ + end + end + + describe 'test attribute "image_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 "image_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/models_image_summary_packages_info_spec.rb b/spec/models/models_image_summary_packages_info_spec.rb new file mode 100644 index 00000000..a8248fc7 --- /dev/null +++ b/spec/models/models_image_summary_packages_info_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::ModelsImageSummaryPackagesInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsImageSummaryPackagesInfo do + let(:instance) { Falcon::ModelsImageSummaryPackagesInfo.new } + + describe 'test an instance of ModelsImageSummaryPackagesInfo' do + it 'should create an instance of ModelsImageSummaryPackagesInfo' do + expect(instance).to be_instance_of(Falcon::ModelsImageSummaryPackagesInfo) + end + end + describe 'test attribute "count_with_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 "total_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/models_issues_summary_container_info_spec.rb b/spec/models/models_issues_summary_container_info_spec.rb new file mode 100644 index 00000000..799518f7 --- /dev/null +++ b/spec/models/models_issues_summary_container_info_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::ModelsIssuesSummaryContainerInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsIssuesSummaryContainerInfo do + let(:instance) { Falcon::ModelsIssuesSummaryContainerInfo.new } + + describe 'test an instance of ModelsIssuesSummaryContainerInfo' do + it 'should create an instance of ModelsIssuesSummaryContainerInfo' do + expect(instance).to be_instance_of(Falcon::ModelsIssuesSummaryContainerInfo) + 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 "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 "running_containers"' 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_light_weight_config_spec.rb b/spec/models/models_light_weight_config_spec.rb new file mode 100644 index 00000000..1cf2dfe7 --- /dev/null +++ b/spec/models/models_light_weight_config_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::ModelsLightWeightConfig +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsLightWeightConfig do + let(:instance) { Falcon::ModelsLightWeightConfig.new } + + describe 'test an instance of ModelsLightWeightConfig' do + it 'should create an instance of ModelsLightWeightConfig' do + expect(instance).to be_instance_of(Falcon::ModelsLightWeightConfig) + 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/ + end + end + + describe 'test attribute "cmd"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "entry_point"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "env"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exposed_ports"' 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 "user"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "working_dir"' 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/public_get_changes_response_spec.rb b/spec/models/models_node_entity_response_spec.rb similarity index 84% rename from spec/models/public_get_changes_response_spec.rb rename to spec/models/models_node_entity_response_spec.rb index a2c5a358..4578edc3 100644 --- a/spec/models/public_get_changes_response_spec.rb +++ b/spec/models/models_node_entity_response_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::PublicGetChangesResponse +# Unit tests for Falcon::ModelsNodeEntityResponse # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::PublicGetChangesResponse do - let(:instance) { Falcon::PublicGetChangesResponse.new } +describe Falcon::ModelsNodeEntityResponse do + let(:instance) { Falcon::ModelsNodeEntityResponse.new } - describe 'test an instance of PublicGetChangesResponse' do - it 'should create an instance of PublicGetChangesResponse' do - expect(instance).to be_instance_of(Falcon::PublicGetChangesResponse) + describe 'test an instance of ModelsNodeEntityResponse' do + it 'should create an instance of ModelsNodeEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsNodeEntityResponse) end end describe 'test attribute "errors"' do diff --git a/spec/models/models_node_spec.rb b/spec/models/models_node_spec.rb new file mode 100644 index 00000000..ad16261c --- /dev/null +++ b/spec/models/models_node_spec.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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsNode +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsNode do + let(:instance) { Falcon::ModelsNode.new } + + describe 'test an instance of ModelsNode' do + it 'should create an instance of ModelsNode' do + expect(instance).to be_instance_of(Falcon::ModelsNode) + end + end + describe 'test attribute "agents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "annotations_list"' 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/ + end + end + + describe 'test attribute "base_image"' 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_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_instance_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 "cloud_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_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 "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 "container_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 "container_runtime_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 "cpu"' 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_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 "external_ip"' 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 "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 "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 "kernel_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 "kubernetes_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 "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 "labels_list"' 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 "linux_sensor_coverage"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "memory"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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 "node_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 "os"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pod_cidr"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "pod_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 "provider_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 "storage"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "uid"' 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_package_name_version_type_spec.rb b/spec/models/models_package_name_version_type_spec.rb new file mode 100644 index 00000000..2f904c20 --- /dev/null +++ b/spec/models/models_package_name_version_type_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::ModelsPackageNameVersionType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPackageNameVersionType do + let(:instance) { Falcon::ModelsPackageNameVersionType.new } + + describe 'test an instance of ModelsPackageNameVersionType' do + it 'should create an instance of ModelsPackageNameVersionType' do + expect(instance).to be_instance_of(Falcon::ModelsPackageNameVersionType) + end + end + describe 'test attribute "package_fixed_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 "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 "package_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 "package_remediation"' 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_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/models_patch_image_group_request_spec.rb b/spec/models/models_patch_image_group_request_spec.rb new file mode 100644 index 00000000..862f592c --- /dev/null +++ b/spec/models/models_patch_image_group_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::ModelsPatchImageGroupRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPatchImageGroupRequest do + let(:instance) { Falcon::ModelsPatchImageGroupRequest.new } + + describe 'test an instance of ModelsPatchImageGroupRequest' do + it 'should create an instance of ModelsPatchImageGroupRequest' do + expect(instance).to be_instance_of(Falcon::ModelsPatchImageGroupRequest) + 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 "policy_group_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/models_patch_policy_request_spec.rb b/spec/models/models_patch_policy_request_spec.rb new file mode 100644 index 00000000..28cc2056 --- /dev/null +++ b/spec/models/models_patch_policy_request_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::ModelsPatchPolicyRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPatchPolicyRequest do + let(:instance) { Falcon::ModelsPatchPolicyRequest.new } + + describe 'test an instance of ModelsPatchPolicyRequest' do + it 'should create an instance of ModelsPatchPolicyRequest' do + expect(instance).to be_instance_of(Falcon::ModelsPatchPolicyRequest) + 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 "is_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 "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 "policy_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/models_pod_entity_response_spec.rb b/spec/models/models_pod_entity_response_spec.rb new file mode 100644 index 00000000..9e0e174b --- /dev/null +++ b/spec/models/models_pod_entity_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::ModelsPodEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPodEntityResponse do + let(:instance) { Falcon::ModelsPodEntityResponse.new } + + describe 'test an instance of ModelsPodEntityResponse' do + it 'should create an instance of ModelsPodEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsPodEntityResponse) + 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/models_pod_spec.rb b/spec/models/models_pod_spec.rb new file mode 100644 index 00000000..4e656585 --- /dev/null +++ b/spec/models/models_pod_spec.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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::ModelsPod +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPod do + let(:instance) { Falcon::ModelsPod.new } + + describe 'test an instance of ModelsPod' do + it 'should create an instance of ModelsPod' do + expect(instance).to be_instance_of(Falcon::ModelsPod) + end + end + describe 'test attribute "agents"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "allow_privilege_escalation"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "annotations_list"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "automount_service_token"' 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_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_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 "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 "container_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 "containers"' 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_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 "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 "host_ipc"' 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_network"' 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_pid"' 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_pull_secrets"' 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 "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 "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 "labels_list"' 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 "namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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 "node_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 "node_selector"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_uid"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "owner_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 "owner_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 "pod_external_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 "pod_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 "pod_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 "ports"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "privileged"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "root_write_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 "run_as_root_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 "run_as_root_user"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "scheduler_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 "service_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 "share_process_namespace"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "volume_mounts"' 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_policy_entity_response_spec.rb b/spec/models/models_policy_entity_response_spec.rb new file mode 100644 index 00000000..ee114861 --- /dev/null +++ b/spec/models/models_policy_entity_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::ModelsPolicyEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPolicyEntityResponse do + let(:instance) { Falcon::ModelsPolicyEntityResponse.new } + + describe 'test an instance of ModelsPolicyEntityResponse' do + it 'should create an instance of ModelsPolicyEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsPolicyEntityResponse) + 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 + + 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/models_policy_exclusion_entity_response_spec.rb b/spec/models/models_policy_exclusion_entity_response_spec.rb new file mode 100644 index 00000000..186d096a --- /dev/null +++ b/spec/models/models_policy_exclusion_entity_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::ModelsPolicyExclusionEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPolicyExclusionEntityResponse do + let(:instance) { Falcon::ModelsPolicyExclusionEntityResponse.new } + + describe 'test an instance of ModelsPolicyExclusionEntityResponse' do + it 'should create an instance of ModelsPolicyExclusionEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsPolicyExclusionEntityResponse) + 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 + + 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/models_policy_group_entity_response_spec.rb b/spec/models/models_policy_group_entity_response_spec.rb new file mode 100644 index 00000000..daf8d535 --- /dev/null +++ b/spec/models/models_policy_group_entity_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::ModelsPolicyGroupEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsPolicyGroupEntityResponse do + let(:instance) { Falcon::ModelsPolicyGroupEntityResponse.new } + + describe 'test an instance of ModelsPolicyGroupEntityResponse' do + it 'should create an instance of ModelsPolicyGroupEntityResponse' do + expect(instance).to be_instance_of(Falcon::ModelsPolicyGroupEntityResponse) + 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 + + 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/models_request_api_policy_data_spec.rb b/spec/models/models_request_api_policy_data_spec.rb new file mode 100644 index 00000000..46ba0034 --- /dev/null +++ b/spec/models/models_request_api_policy_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::ModelsRequestAPIPolicyData +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsRequestAPIPolicyData do + let(:instance) { Falcon::ModelsRequestAPIPolicyData.new } + + describe 'test an instance of ModelsRequestAPIPolicyData' do + it 'should create an instance of ModelsRequestAPIPolicyData' do + expect(instance).to be_instance_of(Falcon::ModelsRequestAPIPolicyData) + 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/models_snapshot_account_status_spec.rb b/spec/models/models_snapshot_account_status_spec.rb new file mode 100644 index 00000000..83d819bc --- /dev/null +++ b/spec/models/models_snapshot_account_status_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::ModelsSnapshotAccountStatus +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsSnapshotAccountStatus do + let(:instance) { Falcon::ModelsSnapshotAccountStatus.new } + + describe 'test an instance of ModelsSnapshotAccountStatus' do + it 'should create an instance of ModelsSnapshotAccountStatus' do + expect(instance).to be_instance_of(Falcon::ModelsSnapshotAccountStatus) + 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_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 "batch_regions"' 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 "iam_external_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 "iam_role_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 "processing_account"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "regions"' 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_update_exclusions_request_spec.rb b/spec/models/models_update_exclusions_request_spec.rb new file mode 100644 index 00000000..249aa66b --- /dev/null +++ b/spec/models/models_update_exclusions_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::ModelsUpdateExclusionsRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ModelsUpdateExclusionsRequest do + let(:instance) { Falcon::ModelsUpdateExclusionsRequest.new } + + describe 'test an instance of ModelsUpdateExclusionsRequest' do + it 'should create an instance of ModelsUpdateExclusionsRequest' do + expect(instance).to be_instance_of(Falcon::ModelsUpdateExclusionsRequest) + end + end + describe 'test attribute "conditions"' 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/msa_aggregation_result_spec.rb b/spec/models/msa_aggregation_result_spec.rb index 7ef3fa2b..1db6547a 100644 --- a/spec/models/msa_aggregation_result_spec.rb +++ b/spec/models/msa_aggregation_result_spec.rb @@ -48,6 +48,12 @@ end end + describe 'test attribute "doc_count_error_upper_bound"' 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/packages_api_combined_package_export_spec.rb b/spec/models/packages_api_combined_package_export_spec.rb new file mode 100644 index 00000000..4ac8ef15 --- /dev/null +++ b/spec/models/packages_api_combined_package_export_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::PackagesApiCombinedPackageExport +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PackagesApiCombinedPackageExport do + let(:instance) { Falcon::PackagesApiCombinedPackageExport.new } + + describe 'test an instance of PackagesApiCombinedPackageExport' do + it 'should create an instance of PackagesApiCombinedPackageExport' do + expect(instance).to be_instance_of(Falcon::PackagesApiCombinedPackageExport) + 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/packages_api_combined_package_spec.rb b/spec/models/packages_api_combined_package_spec.rb new file mode 100644 index 00000000..3113a4be --- /dev/null +++ b/spec/models/packages_api_combined_package_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::PackagesApiCombinedPackage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PackagesApiCombinedPackage do + let(:instance) { Falcon::PackagesApiCombinedPackage.new } + + describe 'test an instance of PackagesApiCombinedPackage' do + it 'should create an instance of PackagesApiCombinedPackage' do + expect(instance).to be_instance_of(Falcon::PackagesApiCombinedPackage) + 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/packages_api_packages_by_vuln_count_spec.rb b/spec/models/packages_api_packages_by_vuln_count_spec.rb new file mode 100644 index 00000000..d317363f --- /dev/null +++ b/spec/models/packages_api_packages_by_vuln_count_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::PackagesApiPackagesByVulnCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PackagesApiPackagesByVulnCount do + let(:instance) { Falcon::PackagesApiPackagesByVulnCount.new } + + describe 'test an instance of PackagesApiPackagesByVulnCount' do + it 'should create an instance of PackagesApiPackagesByVulnCount' do + expect(instance).to be_instance_of(Falcon::PackagesApiPackagesByVulnCount) + 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 + + 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/parameter_activity_config_parameter_value_spec.rb b/spec/models/parameter_activity_config_parameter_value_spec.rb new file mode 100644 index 00000000..558bb1b1 --- /dev/null +++ b/spec/models/parameter_activity_config_parameter_value_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::ParameterActivityConfigParameterValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterActivityConfigParameterValue do + let(:instance) { Falcon::ParameterActivityConfigParameterValue.new } + + describe 'test an instance of ParameterActivityConfigParameterValue' do + it 'should create an instance of ParameterActivityConfigParameterValue' do + expect(instance).to be_instance_of(Falcon::ParameterActivityConfigParameterValue) + end + end + describe 'test attribute "default_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 "deny_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 "required"' 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/parameter_activity_config_provision_parameter_spec.rb b/spec/models/parameter_activity_config_provision_parameter_spec.rb new file mode 100644 index 00000000..e4c15c57 --- /dev/null +++ b/spec/models/parameter_activity_config_provision_parameter_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::ParameterActivityConfigProvisionParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterActivityConfigProvisionParameter do + let(:instance) { Falcon::ParameterActivityConfigProvisionParameter.new } + + describe 'test an instance of ParameterActivityConfigProvisionParameter' do + it 'should create an instance of ParameterActivityConfigProvisionParameter' do + expect(instance).to be_instance_of(Falcon::ParameterActivityConfigProvisionParameter) + end + end + describe 'test attribute "node_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 "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/parameter_activity_provision_parameters_spec.rb b/spec/models/parameter_activity_provision_parameters_spec.rb new file mode 100644 index 00000000..235f29e7 --- /dev/null +++ b/spec/models/parameter_activity_provision_parameters_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::ParameterActivityProvisionParameters +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterActivityProvisionParameters do + let(:instance) { Falcon::ParameterActivityProvisionParameters.new } + + describe 'test an instance of ParameterActivityProvisionParameters' do + it 'should create an instance of ParameterActivityProvisionParameters' do + expect(instance).to be_instance_of(Falcon::ParameterActivityProvisionParameters) + 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 "selection"' 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/parameter_activity_selection_parameter_spec.rb b/spec/models/parameter_activity_selection_parameter_spec.rb new file mode 100644 index 00000000..1cff7782 --- /dev/null +++ b/spec/models/parameter_activity_selection_parameter_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::ParameterActivitySelectionParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterActivitySelectionParameter do + let(:instance) { Falcon::ParameterActivitySelectionParameter.new } + + describe 'test an instance of ParameterActivitySelectionParameter' do + it 'should create an instance of ParameterActivitySelectionParameter' do + expect(instance).to be_instance_of(Falcon::ParameterActivitySelectionParameter) + 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 "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 "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/parameter_condition_field_parameter_spec.rb b/spec/models/parameter_condition_field_parameter_spec.rb new file mode 100644 index 00000000..0834522f --- /dev/null +++ b/spec/models/parameter_condition_field_parameter_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::ParameterConditionFieldParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterConditionFieldParameter do + let(:instance) { Falcon::ParameterConditionFieldParameter.new } + + describe 'test an instance of ParameterConditionFieldParameter' do + it 'should create an instance of ParameterConditionFieldParameter' do + expect(instance).to be_instance_of(Falcon::ParameterConditionFieldParameter) + end + end + describe 'test attribute "default_operator"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "default_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 "multiple"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "operator"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "required"' 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/parameter_condition_field_provision_parameter_spec.rb b/spec/models/parameter_condition_field_provision_parameter_spec.rb new file mode 100644 index 00000000..700d5ca9 --- /dev/null +++ b/spec/models/parameter_condition_field_provision_parameter_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::ParameterConditionFieldProvisionParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterConditionFieldProvisionParameter do + let(:instance) { Falcon::ParameterConditionFieldProvisionParameter.new } + + describe 'test an instance of ParameterConditionFieldProvisionParameter' do + it 'should create an instance of ParameterConditionFieldProvisionParameter' do + expect(instance).to be_instance_of(Falcon::ParameterConditionFieldProvisionParameter) + 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 "operator"' 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/parameter_condition_provision_parameter_spec.rb b/spec/models/parameter_condition_provision_parameter_spec.rb new file mode 100644 index 00000000..dcba0b93 --- /dev/null +++ b/spec/models/parameter_condition_provision_parameter_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::ParameterConditionProvisionParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterConditionProvisionParameter do + let(:instance) { Falcon::ParameterConditionProvisionParameter.new } + + describe 'test an instance of ParameterConditionProvisionParameter' do + it 'should create an instance of ParameterConditionProvisionParameter' do + expect(instance).to be_instance_of(Falcon::ParameterConditionProvisionParameter) + end + end + describe 'test attribute "fields"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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/parameter_template_provision_parameters_spec.rb b/spec/models/parameter_template_provision_parameters_spec.rb new file mode 100644 index 00000000..32f326a6 --- /dev/null +++ b/spec/models/parameter_template_provision_parameters_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::ParameterTemplateProvisionParameters +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterTemplateProvisionParameters do + let(:instance) { Falcon::ParameterTemplateProvisionParameters.new } + + describe 'test an instance of ParameterTemplateProvisionParameters' do + it 'should create an instance of ParameterTemplateProvisionParameters' do + expect(instance).to be_instance_of(Falcon::ParameterTemplateProvisionParameters) + end + end + describe 'test attribute "activities"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "conditions"' 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"' 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/parameter_trigger_field_parameter_spec.rb b/spec/models/parameter_trigger_field_parameter_spec.rb new file mode 100644 index 00000000..7eb03112 --- /dev/null +++ b/spec/models/parameter_trigger_field_parameter_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::ParameterTriggerFieldParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterTriggerFieldParameter do + let(:instance) { Falcon::ParameterTriggerFieldParameter.new } + + describe 'test an instance of ParameterTriggerFieldParameter' do + it 'should create an instance of ParameterTriggerFieldParameter' do + expect(instance).to be_instance_of(Falcon::ParameterTriggerFieldParameter) + end + end + describe 'test attribute "default_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 "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 "required"' 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/parameter_trigger_parameter_spec.rb b/spec/models/parameter_trigger_parameter_spec.rb new file mode 100644 index 00000000..49ce32a4 --- /dev/null +++ b/spec/models/parameter_trigger_parameter_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::ParameterTriggerParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterTriggerParameter do + let(:instance) { Falcon::ParameterTriggerParameter.new } + + describe 'test an instance of ParameterTriggerParameter' do + it 'should create an instance of ParameterTriggerParameter' do + expect(instance).to be_instance_of(Falcon::ParameterTriggerParameter) + end + end + describe 'test attribute "fields"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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/parameter_trigger_provision_parameter_spec.rb b/spec/models/parameter_trigger_provision_parameter_spec.rb new file mode 100644 index 00000000..9fcb6ff5 --- /dev/null +++ b/spec/models/parameter_trigger_provision_parameter_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::ParameterTriggerProvisionParameter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ParameterTriggerProvisionParameter do + let(:instance) { Falcon::ParameterTriggerProvisionParameter.new } + + describe 'test an instance of ParameterTriggerProvisionParameter' do + it 'should create an instance of ParameterTriggerProvisionParameter' do + expect(instance).to be_instance_of(Falcon::ParameterTriggerProvisionParameter) + end + end + describe 'test attribute "fields"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "node_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/policies_assigned_host_group_spec.rb b/spec/models/policies_assigned_host_group_spec.rb new file mode 100644 index 00000000..1496652b --- /dev/null +++ b/spec/models/policies_assigned_host_group_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::PoliciesAssignedHostGroup +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesAssignedHostGroup do + let(:instance) { Falcon::PoliciesAssignedHostGroup.new } + + describe 'test an instance of PoliciesAssignedHostGroup' do + it 'should create an instance of PoliciesAssignedHostGroup' do + expect(instance).to be_instance_of(Falcon::PoliciesAssignedHostGroup) + end + end + describe 'test attribute "href"' 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 + +end diff --git a/spec/models/policies_assigned_rule_group_spec.rb b/spec/models/policies_assigned_rule_group_spec.rb new file mode 100644 index 00000000..6c4c2627 --- /dev/null +++ b/spec/models/policies_assigned_rule_group_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::PoliciesAssignedRuleGroup +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesAssignedRuleGroup do + let(:instance) { Falcon::PoliciesAssignedRuleGroup.new } + + describe 'test an instance of PoliciesAssignedRuleGroup' do + it 'should create an instance of PoliciesAssignedRuleGroup' do + expect(instance).to be_instance_of(Falcon::PoliciesAssignedRuleGroup) + end + end + describe 'test attribute "href"' 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 + +end diff --git a/spec/models/policies_create_request_spec.rb b/spec/models/policies_create_request_spec.rb new file mode 100644 index 00000000..b4c270cd --- /dev/null +++ b/spec/models/policies_create_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::PoliciesCreateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesCreateRequest do + let(:instance) { Falcon::PoliciesCreateRequest.new } + + describe 'test an instance of PoliciesCreateRequest' do + it 'should create an instance of PoliciesCreateRequest' do + expect(instance).to be_instance_of(Falcon::PoliciesCreateRequest) + 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 "platform"' 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/policies_delete_response_spec.rb b/spec/models/policies_delete_response_spec.rb new file mode 100644 index 00000000..fbb19408 --- /dev/null +++ b/spec/models/policies_delete_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::PoliciesDeleteResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesDeleteResponse do + let(:instance) { Falcon::PoliciesDeleteResponse.new } + + describe 'test an instance of PoliciesDeleteResponse' do + it 'should create an instance of PoliciesDeleteResponse' do + expect(instance).to be_instance_of(Falcon::PoliciesDeleteResponse) + 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/policies_policy_spec.rb b/spec/models/policies_policy_spec.rb new file mode 100644 index 00000000..df395045 --- /dev/null +++ b/spec/models/policies_policy_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::PoliciesPolicy +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesPolicy do + let(:instance) { Falcon::PoliciesPolicy.new } + + describe 'test an instance of PoliciesPolicy' do + it 'should create an instance of PoliciesPolicy' do + expect(instance).to be_instance_of(Falcon::PoliciesPolicy) + 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 "host_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"' 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 "rule_groups"' 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/policies_precedence_response_spec.rb b/spec/models/policies_precedence_response_spec.rb new file mode 100644 index 00000000..c9451e68 --- /dev/null +++ b/spec/models/policies_precedence_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::PoliciesPrecedenceResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesPrecedenceResponse do + let(:instance) { Falcon::PoliciesPrecedenceResponse.new } + + describe 'test an instance of PoliciesPrecedenceResponse' do + it 'should create an instance of PoliciesPrecedenceResponse' do + expect(instance).to be_instance_of(Falcon::PoliciesPrecedenceResponse) + 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/policies_response_spec.rb b/spec/models/policies_response_spec.rb new file mode 100644 index 00000000..8d83c6b3 --- /dev/null +++ b/spec/models/policies_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::PoliciesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesResponse do + let(:instance) { Falcon::PoliciesResponse.new } + + describe 'test an instance of PoliciesResponse' do + it 'should create an instance of PoliciesResponse' do + expect(instance).to be_instance_of(Falcon::PoliciesResponse) + 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/policies_update_request_spec.rb b/spec/models/policies_update_request_spec.rb new file mode 100644 index 00000000..211138e4 --- /dev/null +++ b/spec/models/policies_update_request_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::PoliciesUpdateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::PoliciesUpdateRequest do + let(:instance) { Falcon::PoliciesUpdateRequest.new } + + describe 'test an instance of PoliciesUpdateRequest' do + it 'should create an instance of PoliciesUpdateRequest' do + expect(instance).to be_instance_of(Falcon::PoliciesUpdateRequest) + 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 "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/quarantine_quarantined_file_spec.rb b/spec/models/quarantine_quarantined_file_spec.rb index 015063a3..01802b11 100644 --- a/spec/models/quarantine_quarantined_file_spec.rb +++ b/spec/models/quarantine_quarantined_file_spec.rb @@ -48,6 +48,12 @@ end end + describe 'test attribute "alert_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 "cid"' 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 a672878f..1161c6ec 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 "environment"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "iam_role_arn"' 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_azure_account_patch_request_spec.rb b/spec/models/registration_azure_account_patch_request_spec.rb new file mode 100644 index 00000000..c8cc4e50 --- /dev/null +++ b/spec/models/registration_azure_account_patch_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::RegistrationAzureAccountPatchRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationAzureAccountPatchRequest do + let(:instance) { Falcon::RegistrationAzureAccountPatchRequest.new } + + describe 'test an instance of RegistrationAzureAccountPatchRequest' do + it 'should create an instance of RegistrationAzureAccountPatchRequest' do + expect(instance).to be_instance_of(Falcon::RegistrationAzureAccountPatchRequest) + 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/models_snapshot_inventory_payload_spec.rb b/spec/models/registration_azure_account_patch_spec.rb similarity index 77% rename from spec/models/models_snapshot_inventory_payload_spec.rb rename to spec/models/registration_azure_account_patch_spec.rb index f824d0e7..464c76b2 100644 --- a/spec/models/models_snapshot_inventory_payload_spec.rb +++ b/spec/models/registration_azure_account_patch_spec.rb @@ -31,24 +31,24 @@ require 'json' require 'date' -# Unit tests for Falcon::ModelsSnapshotInventoryPayload +# Unit tests for Falcon::RegistrationAzureAccountPatch # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::ModelsSnapshotInventoryPayload do - let(:instance) { Falcon::ModelsSnapshotInventoryPayload.new } +describe Falcon::RegistrationAzureAccountPatch do + let(:instance) { Falcon::RegistrationAzureAccountPatch.new } - describe 'test an instance of ModelsSnapshotInventoryPayload' do - it 'should create an instance of ModelsSnapshotInventoryPayload' do - expect(instance).to be_instance_of(Falcon::ModelsSnapshotInventoryPayload) + describe 'test an instance of RegistrationAzureAccountPatch' do + it 'should create an instance of RegistrationAzureAccountPatch' do + expect(instance).to be_instance_of(Falcon::RegistrationAzureAccountPatch) end end - describe 'test attribute "job_metadata"' do + describe 'test attribute "environment"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ end end - describe 'test attribute "results"' do + 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 diff --git a/spec/models/registration_azure_account_v1_ext_spec.rb b/spec/models/registration_azure_account_v1_ext_spec.rb index 3e11d089..8d4d60a5 100644 --- a/spec/models/registration_azure_account_v1_ext_spec.rb +++ b/spec/models/registration_azure_account_v1_ext_spec.rb @@ -126,12 +126,30 @@ end end + describe 'test attribute "is_cspm_lite"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + describe 'test attribute "object_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_management_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 "parent_management_group_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 "public_certificate"' 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_azure_management_group_create_request_external_v1_spec.rb b/spec/models/registration_azure_management_group_create_request_external_v1_spec.rb new file mode 100644 index 00000000..3950ffed --- /dev/null +++ b/spec/models/registration_azure_management_group_create_request_external_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::RegistrationAzureManagementGroupCreateRequestExternalV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationAzureManagementGroupCreateRequestExternalV1 do + let(:instance) { Falcon::RegistrationAzureManagementGroupCreateRequestExternalV1.new } + + describe 'test an instance of RegistrationAzureManagementGroupCreateRequestExternalV1' do + it 'should create an instance of RegistrationAzureManagementGroupCreateRequestExternalV1' do + expect(instance).to be_instance_of(Falcon::RegistrationAzureManagementGroupCreateRequestExternalV1) + 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/registration_azure_management_group_external_v1_spec.rb b/spec/models/registration_azure_management_group_external_v1_spec.rb new file mode 100644 index 00000000..e902fe37 --- /dev/null +++ b/spec/models/registration_azure_management_group_external_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::RegistrationAzureManagementGroupExternalV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationAzureManagementGroupExternalV1 do + let(:instance) { Falcon::RegistrationAzureManagementGroupExternalV1.new } + + describe 'test an instance of RegistrationAzureManagementGroupExternalV1' do + it 'should create an instance of RegistrationAzureManagementGroupExternalV1' do + expect(instance).to be_instance_of(Falcon::RegistrationAzureManagementGroupExternalV1) + end + end + describe 'test attribute "default_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 "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/registration_azure_management_group_response_v1_spec.rb b/spec/models/registration_azure_management_group_response_v1_spec.rb new file mode 100644 index 00000000..c159abc9 --- /dev/null +++ b/spec/models/registration_azure_management_group_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::RegistrationAzureManagementGroupResponseV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationAzureManagementGroupResponseV1 do + let(:instance) { Falcon::RegistrationAzureManagementGroupResponseV1.new } + + describe 'test an instance of RegistrationAzureManagementGroupResponseV1' do + it 'should create an instance of RegistrationAzureManagementGroupResponseV1' do + expect(instance).to be_instance_of(Falcon::RegistrationAzureManagementGroupResponseV1) + 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/registration_azure_management_group_v1_ext_spec.rb b/spec/models/registration_azure_management_group_v1_ext_spec.rb new file mode 100644 index 00000000..115c512b --- /dev/null +++ b/spec/models/registration_azure_management_group_v1_ext_spec.rb @@ -0,0 +1,165 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::RegistrationAzureManagementGroupV1Ext +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationAzureManagementGroupV1Ext do + let(:instance) { Falcon::RegistrationAzureManagementGroupV1Ext.new } + + describe 'test an instance of RegistrationAzureManagementGroupV1Ext' do + it 'should create an instance of RegistrationAzureManagementGroupV1Ext' do + expect(instance).to be_instance_of(Falcon::RegistrationAzureManagementGroupV1Ext) + 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 "azure_management_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 "azure_management_group_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 "azure_permissions_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 "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 "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 "conditions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "credentials_end_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 "credentials_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 "default_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 "object_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 "public_certificate"' 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_certificate_raw"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "role_assignments"' 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 "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 "years_valid"' 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/registration_gcp_account_ext_request_v2_spec.rb b/spec/models/registration_gcp_account_ext_request_v2_spec.rb new file mode 100644 index 00000000..3cea5b25 --- /dev/null +++ b/spec/models/registration_gcp_account_ext_request_v2_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::RegistrationGCPAccountExtRequestV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPAccountExtRequestV2 do + let(:instance) { Falcon::RegistrationGCPAccountExtRequestV2.new } + + describe 'test an instance of RegistrationGCPAccountExtRequestV2' do + it 'should create an instance of RegistrationGCPAccountExtRequestV2' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPAccountExtRequestV2) + 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/registration_gcp_account_patch_request_spec.rb b/spec/models/registration_gcp_account_patch_request_spec.rb new file mode 100644 index 00000000..9556b1bf --- /dev/null +++ b/spec/models/registration_gcp_account_patch_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::RegistrationGCPAccountPatchRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPAccountPatchRequest do + let(:instance) { Falcon::RegistrationGCPAccountPatchRequest.new } + + describe 'test an instance of RegistrationGCPAccountPatchRequest' do + it 'should create an instance of RegistrationGCPAccountPatchRequest' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPAccountPatchRequest) + 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/registration_gcp_account_patch_spec.rb b/spec/models/registration_gcp_account_patch_spec.rb new file mode 100644 index 00000000..8ca2d634 --- /dev/null +++ b/spec/models/registration_gcp_account_patch_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::RegistrationGCPAccountPatch +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPAccountPatch do + let(:instance) { Falcon::RegistrationGCPAccountPatch.new } + + describe 'test an instance of RegistrationGCPAccountPatch' do + it 'should create an instance of RegistrationGCPAccountPatch' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPAccountPatch) + end + end + describe 'test attribute "environment"' 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_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/registration_gcp_account_req_obj_v2_spec.rb b/spec/models/registration_gcp_account_req_obj_v2_spec.rb new file mode 100644 index 00000000..d2ade772 --- /dev/null +++ b/spec/models/registration_gcp_account_req_obj_v2_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::RegistrationGCPAccountReqObjV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPAccountReqObjV2 do + let(:instance) { Falcon::RegistrationGCPAccountReqObjV2.new } + + describe 'test an instance of RegistrationGCPAccountReqObjV2' do + it 'should create an instance of RegistrationGCPAccountReqObjV2' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPAccountReqObjV2) + end + end + describe 'test attribute "client_email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "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 "parent_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_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 "private_key"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "private_key_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_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 "service_account_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/registration_gcp_account_response_ext_v2_spec.rb b/spec/models/registration_gcp_account_response_ext_v2_spec.rb new file mode 100644 index 00000000..6da90017 --- /dev/null +++ b/spec/models/registration_gcp_account_response_ext_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::RegistrationGCPAccountResponseExtV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPAccountResponseExtV2 do + let(:instance) { Falcon::RegistrationGCPAccountResponseExtV2.new } + + describe 'test an instance of RegistrationGCPAccountResponseExtV2' do + it 'should create an instance of RegistrationGCPAccountResponseExtV2' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPAccountResponseExtV2) + 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/registration_gcp_account_rsp_obj_v2_spec.rb b/spec/models/registration_gcp_account_rsp_obj_v2_spec.rb new file mode 100644 index 00000000..39afff24 --- /dev/null +++ b/spec/models/registration_gcp_account_rsp_obj_v2_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::RegistrationGCPAccountRspObjV2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPAccountRspObjV2 do + let(:instance) { Falcon::RegistrationGCPAccountRspObjV2.new } + + describe 'test an instance of RegistrationGCPAccountRspObjV2' do + it 'should create an instance of RegistrationGCPAccountRspObjV2' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPAccountRspObjV2) + end + end + describe 'test attribute "client_email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "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 "parent_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_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 "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 "service_account_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/registration_gcp_service_account_ext_v1_spec.rb b/spec/models/registration_gcp_service_account_ext_v1_spec.rb new file mode 100644 index 00000000..692c4c2f --- /dev/null +++ b/spec/models/registration_gcp_service_account_ext_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::RegistrationGCPServiceAccountExtV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPServiceAccountExtV1 do + let(:instance) { Falcon::RegistrationGCPServiceAccountExtV1.new } + + describe 'test an instance of RegistrationGCPServiceAccountExtV1' do + it 'should create an instance of RegistrationGCPServiceAccountExtV1' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPServiceAccountExtV1) + end + end + describe 'test attribute "client_email"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "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 "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 "service_account_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/registration_gcp_service_account_response_ext_v1_spec.rb b/spec/models/registration_gcp_service_account_response_ext_v1_spec.rb new file mode 100644 index 00000000..d9d352c8 --- /dev/null +++ b/spec/models/registration_gcp_service_account_response_ext_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::RegistrationGCPServiceAccountResponseExtV1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationGCPServiceAccountResponseExtV1 do + let(:instance) { Falcon::RegistrationGCPServiceAccountResponseExtV1.new } + + describe 'test an instance of RegistrationGCPServiceAccountResponseExtV1' do + it 'should create an instance of RegistrationGCPServiceAccountResponseExtV1' do + expect(instance).to be_instance_of(Falcon::RegistrationGCPServiceAccountResponseExtV1) + 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/registration_iom_event_id_response_meta_spec.rb b/spec/models/registration_iom_event_id_response_meta_spec.rb new file mode 100644 index 00000000..57bf5ade --- /dev/null +++ b/spec/models/registration_iom_event_id_response_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::RegistrationIOMEventIDResponseMeta +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationIOMEventIDResponseMeta do + let(:instance) { Falcon::RegistrationIOMEventIDResponseMeta.new } + + describe 'test an instance of RegistrationIOMEventIDResponseMeta' do + it 'should create an instance of RegistrationIOMEventIDResponseMeta' do + expect(instance).to be_instance_of(Falcon::RegistrationIOMEventIDResponseMeta) + 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/registration_iom_event_v2_spec.rb b/spec/models/registration_iom_event_v2_spec.rb index abb89f26..bb709a04 100644 --- a/spec/models/registration_iom_event_v2_spec.rb +++ b/spec/models/registration_iom_event_v2_spec.rb @@ -102,6 +102,12 @@ end end + describe 'test attribute "findings"' 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/registration_next_token_pagination_spec.rb b/spec/models/registration_next_token_pagination_spec.rb new file mode 100644 index 00000000..020d2b61 --- /dev/null +++ b/spec/models/registration_next_token_pagination_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::RegistrationNextTokenPagination +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RegistrationNextTokenPagination do + let(:instance) { Falcon::RegistrationNextTokenPagination.new } + + describe 'test an instance of RegistrationNextTokenPagination' do + it 'should create an instance of RegistrationNextTokenPagination' do + expect(instance).to be_instance_of(Falcon::RegistrationNextTokenPagination) + 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 "next_token"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + 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 "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/rulegroups_assigned_rule_spec.rb b/spec/models/rulegroups_assigned_rule_spec.rb new file mode 100644 index 00000000..143718d6 --- /dev/null +++ b/spec/models/rulegroups_assigned_rule_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::RulegroupsAssignedRule +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsAssignedRule do + let(:instance) { Falcon::RulegroupsAssignedRule.new } + + describe 'test an instance of RulegroupsAssignedRule' do + it 'should create an instance of RulegroupsAssignedRule' do + expect(instance).to be_instance_of(Falcon::RulegroupsAssignedRule) + end + end + describe 'test attribute "href"' 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 + +end diff --git a/spec/models/rulegroups_create_request_spec.rb b/spec/models/rulegroups_create_request_spec.rb new file mode 100644 index 00000000..74d3abfb --- /dev/null +++ b/spec/models/rulegroups_create_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::RulegroupsCreateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsCreateRequest do + let(:instance) { Falcon::RulegroupsCreateRequest.new } + + describe 'test an instance of RulegroupsCreateRequest' do + it 'should create an instance of RulegroupsCreateRequest' do + expect(instance).to be_instance_of(Falcon::RulegroupsCreateRequest) + 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 "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/rulegroups_delete_response_spec.rb b/spec/models/rulegroups_delete_response_spec.rb new file mode 100644 index 00000000..edc6eaa4 --- /dev/null +++ b/spec/models/rulegroups_delete_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::RulegroupsDeleteResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsDeleteResponse do + let(:instance) { Falcon::RulegroupsDeleteResponse.new } + + describe 'test an instance of RulegroupsDeleteResponse' do + it 'should create an instance of RulegroupsDeleteResponse' do + expect(instance).to be_instance_of(Falcon::RulegroupsDeleteResponse) + 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/rulegroups_policy_assignment_spec.rb b/spec/models/rulegroups_policy_assignment_spec.rb new file mode 100644 index 00000000..c61776e7 --- /dev/null +++ b/spec/models/rulegroups_policy_assignment_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::RulegroupsPolicyAssignment +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsPolicyAssignment do + let(:instance) { Falcon::RulegroupsPolicyAssignment.new } + + describe 'test an instance of RulegroupsPolicyAssignment' do + it 'should create an instance of RulegroupsPolicyAssignment' do + expect(instance).to be_instance_of(Falcon::RulegroupsPolicyAssignment) + end + end + describe 'test attribute "href"' 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 + +end diff --git a/spec/models/rulegroups_response_spec.rb b/spec/models/rulegroups_response_spec.rb new file mode 100644 index 00000000..1943fdcb --- /dev/null +++ b/spec/models/rulegroups_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::RulegroupsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsResponse do + let(:instance) { Falcon::RulegroupsResponse.new } + + describe 'test an instance of RulegroupsResponse' do + it 'should create an instance of RulegroupsResponse' do + expect(instance).to be_instance_of(Falcon::RulegroupsResponse) + 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_notification_details_v1_spec.rb b/spec/models/rulegroups_rule_group_spec.rb similarity index 78% rename from spec/models/domain_notification_details_v1_spec.rb rename to spec/models/rulegroups_rule_group_spec.rb index a7daf006..c145906b 100644 --- a/spec/models/domain_notification_details_v1_spec.rb +++ b/spec/models/rulegroups_rule_group_spec.rb @@ -31,72 +31,72 @@ require 'json' require 'date' -# Unit tests for Falcon::DomainNotificationDetailsV1 +# Unit tests for Falcon::RulegroupsRuleGroup # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::DomainNotificationDetailsV1 do - let(:instance) { Falcon::DomainNotificationDetailsV1.new } +describe Falcon::RulegroupsRuleGroup do + let(:instance) { Falcon::RulegroupsRuleGroup.new } - describe 'test an instance of DomainNotificationDetailsV1' do - it 'should create an instance of DomainNotificationDetailsV1' do - expect(instance).to be_instance_of(Falcon::DomainNotificationDetailsV1) + describe 'test an instance of RulegroupsRuleGroup' do + it 'should create an instance of RulegroupsRuleGroup' do + expect(instance).to be_instance_of(Falcon::RulegroupsRuleGroup) end end - describe 'test attribute "author"' do + describe 'test attribute "assigned_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 "content"' do + 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_date"' do + 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 "labels"' do + 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 "language"' 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 "site"' do + 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 "title"' do + 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 "type"' 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 "updated_date"' do + describe 'test attribute "policy_assignments"' 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 + describe 'test attribute "type"' 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/rulegroups_rule_spec.rb b/spec/models/rulegroups_rule_spec.rb new file mode 100644 index 00000000..3ced4446 --- /dev/null +++ b/spec/models/rulegroups_rule_spec.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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Falcon::RulegroupsRule +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsRule do + let(:instance) { Falcon::RulegroupsRule.new } + + describe 'test an instance of RulegroupsRule' do + it 'should create an instance of RulegroupsRule' do + expect(instance).to be_instance_of(Falcon::RulegroupsRule) + end + end + describe 'test attribute "content_files"' 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_registry_values"' 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 "depth"' 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 "enable_content_capture"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exclude"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exclude_processes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "exclude_users"' 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 "include"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "include_processes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "include_users"' 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 "path"' 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 "rule_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 "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 "watch_attributes_directory_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_attributes_file_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_create_directory_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_create_file_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_create_key_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_delete_directory_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_delete_file_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_delete_key_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_delete_value_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_permissions_directory_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_permissions_file_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_rename_directory_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_rename_file_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_rename_key_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_set_value_changes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "watch_write_file_changes"' 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/rulegroups_rules_response_spec.rb b/spec/models/rulegroups_rules_response_spec.rb new file mode 100644 index 00000000..02662df4 --- /dev/null +++ b/spec/models/rulegroups_rules_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::RulegroupsRulesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsRulesResponse do + let(:instance) { Falcon::RulegroupsRulesResponse.new } + + describe 'test an instance of RulegroupsRulesResponse' do + it 'should create an instance of RulegroupsRulesResponse' do + expect(instance).to be_instance_of(Falcon::RulegroupsRulesResponse) + 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/rulegroups_update_request_spec.rb b/spec/models/rulegroups_update_request_spec.rb new file mode 100644 index 00000000..4bfe9fbd --- /dev/null +++ b/spec/models/rulegroups_update_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::RulegroupsUpdateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RulegroupsUpdateRequest do + let(:instance) { Falcon::RulegroupsUpdateRequest.new } + + describe 'test an instance of RulegroupsUpdateRequest' do + it 'should create an instance of RulegroupsUpdateRequest' do + expect(instance).to be_instance_of(Falcon::RulegroupsUpdateRequest) + 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 + +end diff --git a/spec/models/runtimedetections_detections_entity_response_spec.rb b/spec/models/runtimedetections_detections_entity_response_spec.rb new file mode 100644 index 00000000..31a2ed66 --- /dev/null +++ b/spec/models/runtimedetections_detections_entity_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::RuntimedetectionsDetectionsEntityResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::RuntimedetectionsDetectionsEntityResponse do + let(:instance) { Falcon::RuntimedetectionsDetectionsEntityResponse.new } + + describe 'test an instance of RuntimedetectionsDetectionsEntityResponse' do + it 'should create an instance of RuntimedetectionsDetectionsEntityResponse' do + expect(instance).to be_instance_of(Falcon::RuntimedetectionsDetectionsEntityResponse) + 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/sadomain_submit_for_blocking_info_spec.rb b/spec/models/sadomain_submission_information_spec.rb similarity index 83% rename from spec/models/sadomain_submit_for_blocking_info_spec.rb rename to spec/models/sadomain_submission_information_spec.rb index 62c398ba..ca6b5c16 100644 --- a/spec/models/sadomain_submit_for_blocking_info_spec.rb +++ b/spec/models/sadomain_submission_information_spec.rb @@ -31,15 +31,15 @@ require 'json' require 'date' -# Unit tests for Falcon::SadomainSubmitForBlockingInfo +# Unit tests for Falcon::SadomainSubmissionInformation # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate -describe Falcon::SadomainSubmitForBlockingInfo do - let(:instance) { Falcon::SadomainSubmitForBlockingInfo.new } +describe Falcon::SadomainSubmissionInformation do + let(:instance) { Falcon::SadomainSubmissionInformation.new } - describe 'test an instance of SadomainSubmitForBlockingInfo' do - it 'should create an instance of SadomainSubmitForBlockingInfo' do - expect(instance).to be_instance_of(Falcon::SadomainSubmitForBlockingInfo) + describe 'test an instance of SadomainSubmissionInformation' do + it 'should create an instance of SadomainSubmissionInformation' do + expect(instance).to be_instance_of(Falcon::SadomainSubmissionInformation) end end describe 'test attribute "date"' do diff --git a/spec/models/sadomain_typosquatting_component_spec.rb b/spec/models/sadomain_typosquatting_component_spec.rb index f6eccd3f..e3a9dea0 100644 --- a/spec/models/sadomain_typosquatting_component_spec.rb +++ b/spec/models/sadomain_typosquatting_component_spec.rb @@ -72,6 +72,12 @@ 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/scheduledexclusions_create_request_spec.rb b/spec/models/scheduledexclusions_create_request_spec.rb new file mode 100644 index 00000000..6c62347e --- /dev/null +++ b/spec/models/scheduledexclusions_create_request_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::ScheduledexclusionsCreateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ScheduledexclusionsCreateRequest do + let(:instance) { Falcon::ScheduledexclusionsCreateRequest.new } + + describe 'test an instance of ScheduledexclusionsCreateRequest' do + it 'should create an instance of ScheduledexclusionsCreateRequest' do + expect(instance).to be_instance_of(Falcon::ScheduledexclusionsCreateRequest) + 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 "policy_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 "processes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "repeated"' 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_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 "schedule_start"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "users"' 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/scheduledexclusions_repeated_spec.rb b/spec/models/scheduledexclusions_repeated_spec.rb new file mode 100644 index 00000000..5ca8c57e --- /dev/null +++ b/spec/models/scheduledexclusions_repeated_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::ScheduledexclusionsRepeated +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ScheduledexclusionsRepeated do + let(:instance) { Falcon::ScheduledexclusionsRepeated.new } + + describe 'test an instance of ScheduledexclusionsRepeated' do + it 'should create an instance of ScheduledexclusionsRepeated' do + expect(instance).to be_instance_of(Falcon::ScheduledexclusionsRepeated) + end + end + describe 'test attribute "all_day"' 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_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 "frequency"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "monthly_days"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "occurrence"' 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_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 "weekly_days"' 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/scheduledexclusions_response_spec.rb b/spec/models/scheduledexclusions_response_spec.rb new file mode 100644 index 00000000..5eebd22a --- /dev/null +++ b/spec/models/scheduledexclusions_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::ScheduledexclusionsResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ScheduledexclusionsResponse do + let(:instance) { Falcon::ScheduledexclusionsResponse.new } + + describe 'test an instance of ScheduledexclusionsResponse' do + it 'should create an instance of ScheduledexclusionsResponse' do + expect(instance).to be_instance_of(Falcon::ScheduledexclusionsResponse) + 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/scheduledexclusions_scheduled_exclusion_spec.rb b/spec/models/scheduledexclusions_scheduled_exclusion_spec.rb new file mode 100644 index 00000000..ffb93d3b --- /dev/null +++ b/spec/models/scheduledexclusions_scheduled_exclusion_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::ScheduledexclusionsScheduledExclusion +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ScheduledexclusionsScheduledExclusion do + let(:instance) { Falcon::ScheduledexclusionsScheduledExclusion.new } + + describe 'test an instance of ScheduledexclusionsScheduledExclusion' do + it 'should create an instance of ScheduledexclusionsScheduledExclusion' do + expect(instance).to be_instance_of(Falcon::ScheduledexclusionsScheduledExclusion) + 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 "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_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 "policy_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 "processes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "repeated"' 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_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 "schedule_start"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "users"' 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/scheduledexclusions_update_request_spec.rb b/spec/models/scheduledexclusions_update_request_spec.rb new file mode 100644 index 00000000..6eea8ae5 --- /dev/null +++ b/spec/models/scheduledexclusions_update_request_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::ScheduledexclusionsUpdateRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::ScheduledexclusionsUpdateRequest do + let(:instance) { Falcon::ScheduledexclusionsUpdateRequest.new } + + describe 'test an instance of ScheduledexclusionsUpdateRequest' do + it 'should create an instance of ScheduledexclusionsUpdateRequest' do + expect(instance).to be_instance_of(Falcon::ScheduledexclusionsUpdateRequest) + 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 "policy_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 "processes"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "repeated"' 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_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 "schedule_start"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "timezone"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "users"' 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/sv_exclusions_create_req_v1_spec.rb b/spec/models/sv_exclusions_create_req_v1_spec.rb index 73ecde79..631cf5d5 100644 --- a/spec/models/sv_exclusions_create_req_v1_spec.rb +++ b/spec/models/sv_exclusions_create_req_v1_spec.rb @@ -54,6 +54,12 @@ end end + describe 'test attribute "is_descendant_process"' 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/ diff --git a/spec/models/sv_exclusions_sv_exclusion_v1_spec.rb b/spec/models/sv_exclusions_sv_exclusion_v1_spec.rb index 9df7601f..597ca7b4 100644 --- a/spec/models/sv_exclusions_sv_exclusion_v1_spec.rb +++ b/spec/models/sv_exclusions_sv_exclusion_v1_spec.rb @@ -72,6 +72,12 @@ end end + describe 'test attribute "is_descendant_process"' 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"' do it 'should work' do # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ diff --git a/spec/models/sv_exclusions_update_req_v1_spec.rb b/spec/models/sv_exclusions_update_req_v1_spec.rb index 134521e5..dfd89b88 100644 --- a/spec/models/sv_exclusions_update_req_v1_spec.rb +++ b/spec/models/sv_exclusions_update_req_v1_spec.rb @@ -60,6 +60,12 @@ end end + describe 'test attribute "is_descendant_process"' 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/ diff --git a/spec/models/unidentifiedcontainers_unidentified_container_api_response_spec.rb b/spec/models/unidentifiedcontainers_unidentified_container_api_response_spec.rb new file mode 100644 index 00000000..317e5e8c --- /dev/null +++ b/spec/models/unidentifiedcontainers_unidentified_container_api_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::UnidentifiedcontainersUnidentifiedContainerAPIResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::UnidentifiedcontainersUnidentifiedContainerAPIResponse do + let(:instance) { Falcon::UnidentifiedcontainersUnidentifiedContainerAPIResponse.new } + + describe 'test an instance of UnidentifiedcontainersUnidentifiedContainerAPIResponse' do + it 'should create an instance of UnidentifiedcontainersUnidentifiedContainerAPIResponse' do + expect(instance).to be_instance_of(Falcon::UnidentifiedcontainersUnidentifiedContainerAPIResponse) + 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/unidentifiedcontainers_unidentified_containers_count_value_spec.rb b/spec/models/unidentifiedcontainers_unidentified_containers_count_value_spec.rb new file mode 100644 index 00000000..59ee193e --- /dev/null +++ b/spec/models/unidentifiedcontainers_unidentified_containers_count_value_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::UnidentifiedcontainersUnidentifiedContainersCountValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::UnidentifiedcontainersUnidentifiedContainersCountValue do + let(:instance) { Falcon::UnidentifiedcontainersUnidentifiedContainersCountValue.new } + + describe 'test an instance of UnidentifiedcontainersUnidentifiedContainersCountValue' do + it 'should create an instance of UnidentifiedcontainersUnidentifiedContainersCountValue' do + expect(instance).to be_instance_of(Falcon::UnidentifiedcontainersUnidentifiedContainersCountValue) + 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 + + 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/v2_activity_parameters_spec.rb b/spec/models/v2_activity_parameters_spec.rb new file mode 100644 index 00000000..36eea22f --- /dev/null +++ b/spec/models/v2_activity_parameters_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::V2ActivityParameters +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2ActivityParameters do + let(:instance) { Falcon::V2ActivityParameters.new } + + describe 'test an instance of V2ActivityParameters' do + it 'should create an instance of V2ActivityParameters' do + expect(instance).to be_instance_of(Falcon::V2ActivityParameters) + 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 + +end diff --git a/spec/models/v2_activity_properties_spec.rb b/spec/models/v2_activity_properties_spec.rb new file mode 100644 index 00000000..ddac05a1 --- /dev/null +++ b/spec/models/v2_activity_properties_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::V2ActivityProperties +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2ActivityProperties do + let(:instance) { Falcon::V2ActivityProperties.new } + + describe 'test an instance of V2ActivityProperties' do + it 'should create an instance of V2ActivityProperties' do + expect(instance).to be_instance_of(Falcon::V2ActivityProperties) + 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/v2_activity_spec.rb b/spec/models/v2_activity_spec.rb new file mode 100644 index 00000000..b8edb859 --- /dev/null +++ b/spec/models/v2_activity_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::V2Activity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2Activity do + let(:instance) { Falcon::V2Activity.new } + + describe 'test an instance of V2Activity' do + it 'should create an instance of V2Activity' do + expect(instance).to be_instance_of(Falcon::V2Activity) + 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 "_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 "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/v2_condition_parameters_spec.rb b/spec/models/v2_condition_parameters_spec.rb new file mode 100644 index 00000000..93893753 --- /dev/null +++ b/spec/models/v2_condition_parameters_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::V2ConditionParameters +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2ConditionParameters do + let(:instance) { Falcon::V2ConditionParameters.new } + + describe 'test an instance of V2ConditionParameters' do + it 'should create an instance of V2ConditionParameters' do + expect(instance).to be_instance_of(Falcon::V2ConditionParameters) + end + end + describe 'test attribute "fields"' 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_condition_spec.rb b/spec/models/v2_condition_spec.rb new file mode 100644 index 00000000..dd5e422a --- /dev/null +++ b/spec/models/v2_condition_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::V2Condition +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2Condition do + let(:instance) { Falcon::V2Condition.new } + + describe 'test an instance of V2Condition' do + it 'should create an instance of V2Condition' do + expect(instance).to be_instance_of(Falcon::V2Condition) + end + end + describe 'test attribute "display"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "_else"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "else_if"' 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/ + 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 + +end diff --git a/spec/models/v2_definition_spec.rb b/spec/models/v2_definition_spec.rb new file mode 100644 index 00000000..be70f791 --- /dev/null +++ b/spec/models/v2_definition_spec.rb @@ -0,0 +1,123 @@ +=begin +Crimson Falcon - Ruby Client SDK + +Code auto-generated by OpenAPI Generator; DO NOT EDIT. + +MIT License + +Copyright (c) 2023 Crowdstrike + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 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::V2Definition +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2Definition do + let(:instance) { Falcon::V2Definition.new } + + describe 'test an instance of V2Definition' do + it 'should create an instance of V2Definition' do + expect(instance).to be_instance_of(Falcon::V2Definition) + end + end + describe 'test attribute "actions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "conditions"' 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 "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 "loops"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "multi_instance"' 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 "node_registry"' 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 "provision_on_install"' 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"' 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 "uniq_node_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/v2_for_loop_spec.rb b/spec/models/v2_for_loop_spec.rb new file mode 100644 index 00000000..6873399b --- /dev/null +++ b/spec/models/v2_for_loop_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::V2ForLoop +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2ForLoop do + let(:instance) { Falcon::V2ForLoop.new } + + describe 'test an instance of V2ForLoop' do + it 'should create an instance of V2ForLoop' do + expect(instance).to be_instance_of(Falcon::V2ForLoop) + end + end + describe 'test attribute "continue_on_partial_execution"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "input"' 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_loop_spec.rb b/spec/models/v2_loop_spec.rb new file mode 100644 index 00000000..70561516 --- /dev/null +++ b/spec/models/v2_loop_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::V2Loop +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2Loop do + let(:instance) { Falcon::V2Loop.new } + + describe 'test an instance of V2Loop' do + it 'should create an instance of V2Loop' do + expect(instance).to be_instance_of(Falcon::V2Loop) + end + end + describe 'test attribute "actions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "conditions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "_for"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + 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 "trigger"' 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_parameters_spec.rb b/spec/models/v2_parameters_spec.rb new file mode 100644 index 00000000..865008cc --- /dev/null +++ b/spec/models/v2_parameters_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::V2Parameters +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2Parameters do + let(:instance) { Falcon::V2Parameters.new } + + describe 'test an instance of V2Parameters' do + it 'should create an instance of V2Parameters' do + expect(instance).to be_instance_of(Falcon::V2Parameters) + end + end + describe 'test attribute "actions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "conditions"' do + it 'should work' do + # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/ + end + end + + describe 'test attribute "install_instructions"' 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"' 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_trigger_spec.rb b/spec/models/v2_trigger_spec.rb new file mode 100644 index 00000000..d9ae7ec2 --- /dev/null +++ b/spec/models/v2_trigger_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::V2Trigger +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::V2Trigger do + let(:instance) { Falcon::V2Trigger.new } + + describe 'test an instance of V2Trigger' do + it 'should create an instance of V2Trigger' do + expect(instance).to be_instance_of(Falcon::V2Trigger) + end + end + describe 'test attribute "event"' 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 "_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 "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 "schedule"' 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/vulnerabilities_api_combined_vulnerability_details_spec.rb b/spec/models/vulnerabilities_api_combined_vulnerability_details_spec.rb new file mode 100644 index 00000000..f37ffce5 --- /dev/null +++ b/spec/models/vulnerabilities_api_combined_vulnerability_details_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::VulnerabilitiesApiCombinedVulnerabilityDetails +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiCombinedVulnerabilityDetails do + let(:instance) { Falcon::VulnerabilitiesApiCombinedVulnerabilityDetails.new } + + describe 'test an instance of VulnerabilitiesApiCombinedVulnerabilityDetails' do + it 'should create an instance of VulnerabilitiesApiCombinedVulnerabilityDetails' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiCombinedVulnerabilityDetails) + 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/vulnerabilities_api_combined_vulnerability_info_spec.rb b/spec/models/vulnerabilities_api_combined_vulnerability_info_spec.rb new file mode 100644 index 00000000..80e6811b --- /dev/null +++ b/spec/models/vulnerabilities_api_combined_vulnerability_info_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::VulnerabilitiesApiCombinedVulnerabilityInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiCombinedVulnerabilityInfo do + let(:instance) { Falcon::VulnerabilitiesApiCombinedVulnerabilityInfo.new } + + describe 'test an instance of VulnerabilitiesApiCombinedVulnerabilityInfo' do + it 'should create an instance of VulnerabilitiesApiCombinedVulnerabilityInfo' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiCombinedVulnerabilityInfo) + 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/vulnerabilities_api_combined_vulnerability_spec.rb b/spec/models/vulnerabilities_api_combined_vulnerability_spec.rb new file mode 100644 index 00000000..92b95ab7 --- /dev/null +++ b/spec/models/vulnerabilities_api_combined_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::VulnerabilitiesApiCombinedVulnerability +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiCombinedVulnerability do + let(:instance) { Falcon::VulnerabilitiesApiCombinedVulnerability.new } + + describe 'test an instance of VulnerabilitiesApiCombinedVulnerability' do + it 'should create an instance of VulnerabilitiesApiCombinedVulnerability' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiCombinedVulnerability) + 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/vulnerabilities_api_vuln_by_image_count_spec.rb b/spec/models/vulnerabilities_api_vuln_by_image_count_spec.rb new file mode 100644 index 00000000..aab144dc --- /dev/null +++ b/spec/models/vulnerabilities_api_vuln_by_image_count_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::VulnerabilitiesApiVulnByImageCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiVulnByImageCount do + let(:instance) { Falcon::VulnerabilitiesApiVulnByImageCount.new } + + describe 'test an instance of VulnerabilitiesApiVulnByImageCount' do + it 'should create an instance of VulnerabilitiesApiVulnByImageCount' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiVulnByImageCount) + 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/vulnerabilities_api_vuln_by_publication_spec.rb b/spec/models/vulnerabilities_api_vuln_by_publication_spec.rb new file mode 100644 index 00000000..90ae4463 --- /dev/null +++ b/spec/models/vulnerabilities_api_vuln_by_publication_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::VulnerabilitiesApiVulnByPublication +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiVulnByPublication do + let(:instance) { Falcon::VulnerabilitiesApiVulnByPublication.new } + + describe 'test an instance of VulnerabilitiesApiVulnByPublication' do + it 'should create an instance of VulnerabilitiesApiVulnByPublication' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiVulnByPublication) + 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/vulnerabilities_api_vuln_count_by_actively_exploited_spec.rb b/spec/models/vulnerabilities_api_vuln_count_by_actively_exploited_spec.rb new file mode 100644 index 00000000..d4f335d7 --- /dev/null +++ b/spec/models/vulnerabilities_api_vuln_count_by_actively_exploited_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::VulnerabilitiesApiVulnCountByActivelyExploited +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiVulnCountByActivelyExploited do + let(:instance) { Falcon::VulnerabilitiesApiVulnCountByActivelyExploited.new } + + describe 'test an instance of VulnerabilitiesApiVulnCountByActivelyExploited' do + it 'should create an instance of VulnerabilitiesApiVulnCountByActivelyExploited' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiVulnCountByActivelyExploited) + 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/vulnerabilities_api_vuln_count_by_csp_rating_spec.rb b/spec/models/vulnerabilities_api_vuln_count_by_csp_rating_spec.rb new file mode 100644 index 00000000..eb7aa328 --- /dev/null +++ b/spec/models/vulnerabilities_api_vuln_count_by_csp_rating_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::VulnerabilitiesApiVulnCountByCSPRating +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiVulnCountByCSPRating do + let(:instance) { Falcon::VulnerabilitiesApiVulnCountByCSPRating.new } + + describe 'test an instance of VulnerabilitiesApiVulnCountByCSPRating' do + it 'should create an instance of VulnerabilitiesApiVulnCountByCSPRating' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiVulnCountByCSPRating) + 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/vulnerabilities_api_vuln_count_by_cvss_score_spec.rb b/spec/models/vulnerabilities_api_vuln_count_by_cvss_score_spec.rb new file mode 100644 index 00000000..d945530c --- /dev/null +++ b/spec/models/vulnerabilities_api_vuln_count_by_cvss_score_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::VulnerabilitiesApiVulnCountByCVSSScore +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiVulnCountByCVSSScore do + let(:instance) { Falcon::VulnerabilitiesApiVulnCountByCVSSScore.new } + + describe 'test an instance of VulnerabilitiesApiVulnCountByCVSSScore' do + it 'should create an instance of VulnerabilitiesApiVulnCountByCVSSScore' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiVulnCountByCVSSScore) + 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/vulnerabilities_api_vuln_count_by_severity_spec.rb b/spec/models/vulnerabilities_api_vuln_count_by_severity_spec.rb new file mode 100644 index 00000000..da886f84 --- /dev/null +++ b/spec/models/vulnerabilities_api_vuln_count_by_severity_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::VulnerabilitiesApiVulnCountBySeverity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiVulnCountBySeverity do + let(:instance) { Falcon::VulnerabilitiesApiVulnCountBySeverity.new } + + describe 'test an instance of VulnerabilitiesApiVulnCountBySeverity' do + it 'should create an instance of VulnerabilitiesApiVulnCountBySeverity' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiVulnCountBySeverity) + 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/vulnerabilities_api_vuln_count_spec.rb b/spec/models/vulnerabilities_api_vuln_count_spec.rb new file mode 100644 index 00000000..c15531bb --- /dev/null +++ b/spec/models/vulnerabilities_api_vuln_count_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::VulnerabilitiesApiVulnCount +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe Falcon::VulnerabilitiesApiVulnCount do + let(:instance) { Falcon::VulnerabilitiesApiVulnCount.new } + + describe 'test an instance of VulnerabilitiesApiVulnCount' do + it 'should create an instance of VulnerabilitiesApiVulnCount' do + expect(instance).to be_instance_of(Falcon::VulnerabilitiesApiVulnCount) + 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