<gh_stars>1-10
# generated by datamodel-codegen:
#   filename:  openapi.yaml
#   timestamp: 2021-12-31T02:52:06+00:00

from __future__ import annotations

from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional

from pydantic import BaseModel, Extra, Field


class AcceptInvitationResponse(BaseModel):
    pass


class ValidationException(BaseModel):
    __root__: Any


class InternalServerException(ValidationException):
    pass


class ServiceQuotaExceededException(ValidationException):
    pass


class AccessDeniedException(ValidationException):
    pass


class ResourceNotFoundException(ValidationException):
    pass


class ThrottlingException(ValidationException):
    pass


class ConflictException(ValidationException):
    pass


class _String(BaseModel):
    __root__: str


class CreateClassificationJobResponse(BaseModel):
    jobArn: Optional[_String] = None
    jobId: Optional[_String] = None


class DailySchedule(AcceptInvitationResponse):
    """
    Specifies that a classification job runs once a day, every day. This is an empty object.
    """

    pass


class CreateCustomDataIdentifierResponse(BaseModel):
    customDataIdentifierId: Optional[_String] = None


class CreateFindingsFilterResponse(BaseModel):
    arn: Optional[_String] = None
    id: Optional[_String] = None


class Criterion(BaseModel):
    """
    Specifies a condition that defines a property, operator, and one or more values to filter the results of a query for findings. The number of values depends on the property and operator specified by the condition. For information about defining filter conditions, see <a href="https://docs.aws.amazon.com/macie/latest/user/findings-filter-basics.html">Fundamentals of filtering findings</a> in the <i>Amazon Macie User Guide</i>.
    """

    pass

    class Config:
        extra = Extra.allow


class CreateMemberResponse(BaseModel):
    arn: Optional[_String] = None


class CreateSampleFindingsResponse(AcceptInvitationResponse):
    pass


class FindingType(Enum):
    """
    The type of finding. For details about each type, see <a href="https://docs.aws.amazon.com/macie/latest/user/findings-types.html">Types of Amazon Macie findings</a> in the <i>Amazon Macie User Guide</i>. Valid values are:
    """

    SensitiveData_S3Object_Multiple = 'SensitiveData:S3Object/Multiple'
    SensitiveData_S3Object_Financial = 'SensitiveData:S3Object/Financial'
    SensitiveData_S3Object_Personal = 'SensitiveData:S3Object/Personal'
    SensitiveData_S3Object_Credentials = 'SensitiveData:S3Object/Credentials'
    SensitiveData_S3Object_CustomIdentifier = 'SensitiveData:S3Object/CustomIdentifier'
    Policy_IAMUser_S3BucketPublic = 'Policy:IAMUser/S3BucketPublic'
    Policy_IAMUser_S3BucketSharedExternally = 'Policy:IAMUser/S3BucketSharedExternally'
    Policy_IAMUser_S3BucketReplicatedExternally = (
        'Policy:IAMUser/S3BucketReplicatedExternally'
    )
    Policy_IAMUser_S3BucketEncryptionDisabled = (
        'Policy:IAMUser/S3BucketEncryptionDisabled'
    )
    Policy_IAMUser_S3BlockPublicAccessDisabled = (
        'Policy:IAMUser/S3BlockPublicAccessDisabled'
    )


class DeleteCustomDataIdentifierResponse(AcceptInvitationResponse):
    pass


class DeleteFindingsFilterResponse(AcceptInvitationResponse):
    pass


class DeleteMemberResponse(AcceptInvitationResponse):
    pass


class OrderBy(Enum):
    ASC = 'ASC'
    DESC = 'DESC'


class DisableMacieResponse(AcceptInvitationResponse):
    pass


class DisableOrganizationAdminAccountResponse(AcceptInvitationResponse):
    pass


class DisassociateFromAdministratorAccountResponse(AcceptInvitationResponse):
    pass


class DisassociateFromMasterAccountResponse(AcceptInvitationResponse):
    pass


class DisassociateMemberResponse(AcceptInvitationResponse):
    pass


class EnableMacieResponse(AcceptInvitationResponse):
    pass


class EnableOrganizationAdminAccountResponse(AcceptInvitationResponse):
    pass


class FindingStatisticsSortAttributeName(Enum):
    """
    The grouping to sort the results by. Valid values are:
    """

    groupKey = 'groupKey'
    count = 'count'


class UsageStatisticsSortKey(Enum):
    """
    The field to use to sort the results of a query for Amazon Macie account quotas and usage data. Valid values are:
    """

    accountId = 'accountId'
    total = 'total'
    serviceLimitValue = 'serviceLimitValue'
    freeTrialStartDate = 'freeTrialStartDate'


class ListJobsSortAttributeName(Enum):
    """
    The property to sort the results by. Valid values are:
    """

    createdAt = 'createdAt'
    jobStatus = 'jobStatus'
    name = 'name'
    jobType = 'jobType'


class S3Destination(BaseModel):
    """
    Specifies an S3 bucket to store data classification results in, and the encryption settings to use when storing results in that bucket.
    """

    bucketName: _String
    keyPrefix: Optional[_String] = None
    kmsKeyArn: _String


class PutFindingsPublicationConfigurationResponse(AcceptInvitationResponse):
    pass


class _Boolean(BaseModel):
    __root__: bool


class SearchResourcesSortAttributeName(Enum):
    """
    The property to sort the query results by. Valid values are:
    """

    ACCOUNT_ID = 'ACCOUNT_ID'
    RESOURCE_NAME = 'RESOURCE_NAME'
    S3_CLASSIFIABLE_OBJECT_COUNT = 'S3_CLASSIFIABLE_OBJECT_COUNT'
    S3_CLASSIFIABLE_SIZE_IN_BYTES = 'S3_CLASSIFIABLE_SIZE_IN_BYTES'


class TagResourceResponse(AcceptInvitationResponse):
    pass


class UntagResourceResponse(AcceptInvitationResponse):
    pass


class UpdateClassificationJobResponse(AcceptInvitationResponse):
    pass


class UpdateFindingsFilterResponse(CreateFindingsFilterResponse):
    pass


class UpdateMacieSessionResponse(AcceptInvitationResponse):
    pass


class UpdateMemberSessionResponse(AcceptInvitationResponse):
    pass


class UpdateOrganizationConfigurationResponse(AcceptInvitationResponse):
    pass


class AcceptInvitationRequest(BaseModel):
    administratorAccountId: Optional[_String] = None
    invitationId: _String
    masterAccount: Optional[_String] = None


class AccessControlList(BaseModel):
    """
    Provides information about the permissions settings of the bucket-level access control list (ACL) for an S3 bucket.
    """

    allowsPublicReadAccess: Optional[_Boolean] = None
    allowsPublicWriteAccess: Optional[_Boolean] = None


class AccountDetail(BaseModel):
    """
    Specifies the details of an account to associate with an Amazon Macie administrator account.
    """

    accountId: _String
    email: _String


class BlockPublicAccess(BaseModel):
    """
    Provides information about the block public access settings for an S3 bucket. These settings can apply to a bucket at the account level or bucket level. For detailed information about each setting, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html">Blocking public access to your Amazon S3 storage</a> in the <i>Amazon Simple Storage Service User Guide</i>.
    """

    blockPublicAcls: Optional[_Boolean] = None
    blockPublicPolicy: Optional[_Boolean] = None
    ignorePublicAcls: Optional[_Boolean] = None
    restrictPublicBuckets: Optional[_Boolean] = None


class AccountLevelPermissions(BaseModel):
    """
    Provides information about the account-level permissions settings that apply to an S3 bucket.
    """

    blockPublicAccess: Optional[BlockPublicAccess] = None


class AdminStatus(Enum):
    """
    The current status of an account as the delegated Amazon Macie administrator account for an Amazon Web Services organization. Possible values are:
    """

    ENABLED = 'ENABLED'
    DISABLING_IN_PROGRESS = 'DISABLING_IN_PROGRESS'


class AdminAccount(BaseModel):
    """
    Provides information about the delegated Amazon Macie administrator account for an Amazon Web Services organization.
    """

    accountId: Optional[_String] = None
    status: Optional[AdminStatus] = None


class AllowsUnencryptedObjectUploads(Enum):
    TRUE = 'TRUE'
    FALSE = 'FALSE'
    UNKNOWN = 'UNKNOWN'


class _TimestampIso8601(BaseModel):
    __root__: datetime


class ApiCallDetails(BaseModel):
    """
    Provides information about an API operation that an entity invoked for an affected resource.
    """

    api: Optional[_String] = None
    apiServiceName: Optional[_String] = None
    firstSeen: Optional[_TimestampIso8601] = None
    lastSeen: Optional[_TimestampIso8601] = None


class AwsAccount(BaseModel):
    """
    Provides information about an Amazon Web Services account and entity that performed an action on an affected resource. The action was performed using the credentials for an Amazon Web Services account other than your own account.
    """

    accountId: Optional[_String] = None
    principalId: Optional[_String] = None


class AwsService(BaseModel):
    """
    Provides information about an Amazon Web Service that performed an action on an affected resource.
    """

    invokedBy: Optional[_String] = None


class BatchGetCustomDataIdentifierSummary(BaseModel):
    """
    Provides information about a custom data identifier.
    """

    arn: Optional[_String] = None
    createdAt: Optional[_TimestampIso8601] = None
    deleted: Optional[_Boolean] = None
    description: Optional[_String] = None
    id: Optional[_String] = None
    name: Optional[_String] = None


class _ListOfString(BaseModel):
    __root__: List[_String]


class BatchGetCustomDataIdentifiersRequest(BaseModel):
    ids: Optional[_ListOfString] = None


class _ListOfBatchGetCustomDataIdentifierSummary(BaseModel):
    __root__: List[BatchGetCustomDataIdentifierSummary]


class _Long(BaseModel):
    __root__: int


class BucketCountByEffectivePermission(BaseModel):
    """
    Provides information about the number of S3 buckets that are publicly accessible based on a combination of permissions settings for each bucket.
    """

    publiclyAccessible: Optional[_Long] = None
    publiclyReadable: Optional[_Long] = None
    publiclyWritable: Optional[_Long] = None
    unknown: Optional[_Long] = None


class BucketCountByEncryptionType(BaseModel):
    """
    Provides information about the number of S3 buckets that use certain types of server-side encryption by default or don't encrypt new objects by default. For detailed information about these settings, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-encryption.html">Setting default server-side encryption behavior for Amazon S3 buckets</a> in the <i>Amazon Simple Storage Service User Guide</i>.
    """

    kmsManaged: Optional[_Long] = None
    s3Managed: Optional[_Long] = None
    unencrypted: Optional[_Long] = None
    unknown: Optional[_Long] = None


class BucketCountBySharedAccessType(BaseModel):
    """
    Provides information about the number of S3 buckets that are or aren't shared with other Amazon Web Services accounts.
    """

    external: Optional[_Long] = None
    internal: Optional[_Long] = None
    notShared: Optional[_Long] = None
    unknown: Optional[_Long] = None


class BucketCountPolicyAllowsUnencryptedObjectUploads(BaseModel):
    """
    Provides information about the number of S3 buckets whose bucket policies do or don't require server-side encryption of objects when objects are uploaded to the buckets.
    """

    allowsUnencryptedObjectUploads: Optional[_Long] = None
    deniesUnencryptedObjectUploads: Optional[_Long] = None
    unknown: Optional[_Long] = None


class BucketCriteria(BaseModel):
    """
    Specifies, as a map, one or more property-based conditions that filter the results of a query for information about S3 buckets.
    """

    pass

    class Config:
        extra = Extra.allow


class BucketPolicy(AccessControlList):
    """
    Provides information about the permissions settings of the bucket policy for an S3 bucket.
    """

    pass


class BucketLevelPermissions(BaseModel):
    """
    Provides information about the bucket-level permissions settings for an S3 bucket.
    """

    accessControlList: Optional[AccessControlList] = None
    blockPublicAccess: Optional[BlockPublicAccess] = None
    bucketPolicy: Optional[BucketPolicy] = None


class ObjectCountByEncryptionType(BaseModel):
    """
    Provides information about the number of objects that are in an S3 bucket and use certain types of server-side encryption, use client-side encryption, or aren't encrypted.
    """

    customerManaged: Optional[_Long] = None
    kmsManaged: Optional[_Long] = None
    s3Managed: Optional[_Long] = None
    unencrypted: Optional[_Long] = None
    unknown: Optional[_Long] = None


class ReplicationDetails(BaseModel):
    """
    Provides information about settings that define whether one or more objects in an S3 bucket are replicated to S3 buckets for other Amazon Web Services accounts and, if so, which accounts.
    """

    replicated: Optional[_Boolean] = None
    replicatedExternally: Optional[_Boolean] = None
    replicationAccounts: Optional[_ListOfString] = None


class SharedAccess(Enum):
    EXTERNAL = 'EXTERNAL'
    INTERNAL = 'INTERNAL'
    NOT_SHARED = 'NOT_SHARED'
    UNKNOWN = 'UNKNOWN'


class ObjectLevelStatistics(BaseModel):
    """
    Provides information about the total storage size (in bytes) or number of objects that Amazon Macie can't analyze in one or more S3 buckets. In a BucketMetadata or MatchingBucket object, this data is for a specific bucket. In a GetBucketStatisticsResponse object, this data is aggregated for all the buckets in the query results. If versioning is enabled for a bucket, total storage size values are based on the size of the latest version of each applicable object in the bucket.
    """

    fileType: Optional[_Long] = None
    storageClass: Optional[_Long] = None
    total: Optional[_Long] = None


class BucketPermissionConfiguration(BaseModel):
    """
    Provides information about the account-level and bucket-level permissions settings for an S3 bucket.
    """

    accountLevelPermissions: Optional[AccountLevelPermissions] = None
    bucketLevelPermissions: Optional[BucketLevelPermissions] = None


class EffectivePermission(Enum):
    PUBLIC = 'PUBLIC'
    NOT_PUBLIC = 'NOT_PUBLIC'
    UNKNOWN = 'UNKNOWN'


class Type(Enum):
    NONE = 'NONE'
    AES256 = 'AES256'
    aws_kms = 'aws:kms'


class BucketSortCriteria(BaseModel):
    """
    Specifies criteria for sorting the results of a query for information about S3 buckets.
    """

    attributeName: Optional[_String] = None
    orderBy: Optional[OrderBy] = None


class Cell(BaseModel):
    """
    Specifies the location of an occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file.
    """

    cellReference: Optional[_String] = None
    column: Optional[_Long] = None
    columnName: Optional[_String] = None
    row: Optional[_Long] = None


class Cells(BaseModel):
    """
    Specifies the location of occurrences of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file.
    """

    __root__: Annotated[
        List[Cell],
        Field(
            description='Specifies the location of occurrences of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file.'
        ),
    ]


class ClassificationExportConfiguration(BaseModel):
    """
    Specifies where to store data classification results, and the encryption settings to use when storing results in that location. Currently, you can store classification results only in an S3 bucket.
    """

    s3Destination: Optional[S3Destination] = None


class ClassificationResultStatus(BaseModel):
    """
    Provides information about the status of a sensitive data finding.
    """

    code: Optional[_String] = None
    reason: Optional[_String] = None


class JobType(Enum):
    """
    The schedule for running a classification job. Valid values are:
    """

    ONE_TIME = 'ONE_TIME'
    SCHEDULED = 'SCHEDULED'


class ManagedDataIdentifierSelector(Enum):
    """
    The selection type that determines which managed data identifiers a classification job uses to analyze data. Valid values are:
    """

    ALL = 'ALL'
    EXCLUDE = 'EXCLUDE'
    INCLUDE = 'INCLUDE'
    NONE = 'NONE'


class _Integer(_Long):
    pass


class TagMap(BaseModel):
    """
    A string-to-string map of key-value pairs that specifies the tags (keys and values) for a classification job, custom data identifier, findings filter, or member account.
    """

    pass

    class Config:
        extra = Extra.allow


class CreateCustomDataIdentifierRequest(BaseModel):
    clientToken: Optional[_String] = None
    description: Optional[_String] = None
    ignoreWords: Optional[_ListOfString] = None
    keywords: Optional[_ListOfString] = None
    maximumMatchDistance: Optional[_Integer] = None
    name: Optional[_String] = None
    regex: Optional[_String] = None
    tags: Optional[TagMap] = None


class FindingsFilterAction(Enum):
    """
    The action to perform on findings that meet the filter criteria. To suppress (automatically archive) findings that meet the criteria, set this value to ARCHIVE. Valid values are:
    """

    ARCHIVE = 'ARCHIVE'
    NOOP = 'NOOP'


class FindingCriteria(BaseModel):
    """
    Specifies, as a map, one or more property-based conditions that filter the results of a query for findings.
    """

    criterion: Optional[Criterion] = None


class CreateFindingsFilterRequest(BaseModel):
    action: FindingsFilterAction
    clientToken: Optional[_String] = None
    description: Optional[_String] = None
    findingCriteria: FindingCriteria
    name: _String
    position: Optional[_Integer] = None
    tags: Optional[TagMap] = None


class CreateInvitationsRequest(BaseModel):
    accountIds: _ListOfString
    disableEmailNotification: Optional[_Boolean] = None
    message: Optional[_String] = None


class CreateMemberRequest(BaseModel):
    account: AccountDetail
    tags: Optional[TagMap] = None


class _ListOfFindingType(BaseModel):
    __root__: List[FindingType]


class CreateSampleFindingsRequest(BaseModel):
    findingTypes: Optional[_ListOfFindingType] = None


class CriterionAdditionalProperties(BaseModel):
    """
    Specifies the operator to use in a property-based condition that filters the results of a query for findings. For detailed information and examples of each operator, see <a href="https://docs.aws.amazon.com/macie/latest/user/findings-filter-basics.html">Fundamentals of filtering findings</a> in the <i>Amazon Macie User Guide</i>.
    """

    eq: Optional[_ListOfString] = None
    eqExactMatch: Optional[_ListOfString] = None
    gt: Optional[_Long] = None
    gte: Optional[_Long] = None
    lt: Optional[_Long] = None
    lte: Optional[_Long] = None
    neq: Optional[_ListOfString] = None


class Currency(Enum):
    """
    The type of currency that the data for an Amazon Macie usage metric is reported in. Possible values are:
    """

    USD = 'USD'


class CustomDataIdentifierSummary(BaseModel):
    """
    Provides information about a custom data identifier.
    """

    arn: Optional[_String] = None
    createdAt: Optional[_TimestampIso8601] = None
    description: Optional[_String] = None
    id: Optional[_String] = None
    name: Optional[_String] = None


class DayOfWeek(Enum):
    SUNDAY = 'SUNDAY'
    MONDAY = 'MONDAY'
    TUESDAY = 'TUESDAY'
    WEDNESDAY = 'WEDNESDAY'
    THURSDAY = 'THURSDAY'
    FRIDAY = 'FRIDAY'
    SATURDAY = 'SATURDAY'


class DeclineInvitationsRequest(BaseModel):
    accountIds: _ListOfString


class DeleteCustomDataIdentifierRequest(BaseModel):
    pass


class DeleteFindingsFilterRequest(BaseModel):
    pass


class DeleteInvitationsRequest(BaseModel):
    accountIds: _ListOfString


class DeleteMemberRequest(BaseModel):
    pass


class DescribeBucketsRequest(BaseModel):
    criteria: Optional[BucketCriteria] = None
    maxResults: Optional[_Integer] = None
    nextToken: Optional[_String] = None
    sortCriteria: Optional[BucketSortCriteria] = None


class DescribeClassificationJobRequest(BaseModel):
    pass


class JobStatus(Enum):
    """
    The status of a classification job. Possible values are:
    """

    RUNNING = 'RUNNING'
    PAUSED = 'PAUSED'
    CANCELLED = 'CANCELLED'
    COMPLETE = 'COMPLETE'
    IDLE = 'IDLE'
    USER_PAUSED = 'USER_PAUSED'


class UserPausedDetails(BaseModel):
    """
    Provides information about when a classification job was paused. For a one-time job, this object also specifies when the job will expire and be cancelled if it isn't resumed. For a recurring job, this object also specifies when the paused job run will expire and be cancelled if it isn't resumed. This object is present only if a job's current status (jobStatus) is USER_PAUSED. The information in this object applies only to a job that was paused while it had a status of RUNNING.
    """

    jobExpiresAt: Optional[_TimestampIso8601] = None
    jobImminentExpirationHealthEventArn: Optional[_String] = None
    jobPausedAt: Optional[_TimestampIso8601] = None


class DescribeOrganizationConfigurationRequest(BaseModel):
    pass


class DisableMacieRequest(BaseModel):
    pass


class DisableOrganizationAdminAccountRequest(BaseModel):
    pass


class DisassociateFromAdministratorAccountRequest(BaseModel):
    pass


class DisassociateFromMasterAccountRequest(BaseModel):
    pass


class DisassociateMemberRequest(BaseModel):
    pass


class DomainDetails(BaseModel):
    """
    Provides information about the domain name of the device that an entity used to perform an action on an affected resource.
    """

    domainName: Optional[_String] = None


class FindingPublishingFrequency(Enum):
    """
    The frequency with which Amazon Macie publishes updates to policy findings for an account. This includes publishing updates to Security Hub and Amazon EventBridge (formerly called Amazon CloudWatch Events). For more information, see <a href="https://docs.aws.amazon.com/macie/latest/user/findings-monitor.html">Monitoring and processing findings</a> in the <i>Amazon Macie User Guide</i>. Valid values are:
    """

    FIFTEEN_MINUTES = 'FIFTEEN_MINUTES'
    ONE_HOUR = 'ONE_HOUR'
    SIX_HOURS = 'SIX_HOURS'


class MacieStatus(Enum):
    """
    The status of an Amazon Macie account. Valid values are:
    """

    PAUSED = 'PAUSED'
    ENABLED = 'ENABLED'


class EnableMacieRequest(BaseModel):
    clientToken: Optional[_String] = None
    findingPublishingFrequency: Optional[FindingPublishingFrequency] = None
    status: Optional[MacieStatus] = None


class EnableOrganizationAdminAccountRequest(BaseModel):
    adminAccountId: _String
    clientToken: Optional[_String] = None


class EncryptionType(Enum):
    """
    The type of server-side encryption that's used to encrypt an S3 object or objects in an S3 bucket. Valid values are:
    """

    NONE = 'NONE'
    AES256 = 'AES256'
    aws_kms = 'aws:kms'
    UNKNOWN = 'UNKNOWN'


class ErrorCode(Enum):
    """
    The source of an issue or delay. Possible values are:
    """

    ClientError = 'ClientError'
    InternalError = 'InternalError'


class FindingCategory(Enum):
    """
    The category of the finding. Valid values are:
    """

    CLASSIFICATION = 'CLASSIFICATION'
    POLICY = 'POLICY'


class FindingActionType(Enum):
    """
    The type of action that occurred for the resource and produced the policy finding:
    """

    AWS_API_CALL = 'AWS_API_CALL'


class FindingAction(BaseModel):
    """
    Provides information about an action that occurred for a resource and produced a policy finding.
    """

    actionType: Optional[FindingActionType] = None
    apiCallDetails: Optional[ApiCallDetails] = None


class FindingStatisticsSortCriteria(BaseModel):
    """
    Specifies criteria for sorting the results of a query that retrieves aggregated statistical data about findings.
    """

    attributeName: Optional[FindingStatisticsSortAttributeName] = None
    orderBy: Optional[OrderBy] = None


class FindingsFilterListItem(BaseModel):
    """
    Provides information about a findings filter.
    """

    action: Optional[FindingsFilterAction] = None
    arn: Optional[_String] = None
    id: Optional[_String] = None
    name: Optional[_String] = None
    tags: Optional[TagMap] = None


class GetAdministratorAccountRequest(BaseModel):
    pass


class GetBucketStatisticsRequest(BaseModel):
    accountId: Optional[_String] = None


class GetClassificationExportConfigurationRequest(BaseModel):
    pass


class GetCustomDataIdentifierRequest(BaseModel):
    pass


class GroupBy(Enum):
    resourcesAffected_s3Bucket_name = 'resourcesAffected.s3Bucket.name'
    type = 'type'
    classificationDetails_jobId = 'classificationDetails.jobId'
    severity_description = 'severity.description'


class GetFindingStatisticsRequest(BaseModel):
    findingCriteria: Optional[FindingCriteria] = None
    groupBy: GroupBy
    size: Optional[_Integer] = None
    sortCriteria: Optional[FindingStatisticsSortCriteria] = None


class GetFindingsFilterRequest(BaseModel):
    pass


class GetFindingsPublicationConfigurationRequest(BaseModel):
    pass


class SecurityHubConfiguration(BaseModel):
    """
    Specifies configuration settings that determine which findings are published to Security Hub automatically. For information about how Macie publishes findings to Security Hub, see <a href="https://docs.aws.amazon.com/macie/latest/user/securityhub-integration.html">Amazon Macie integration with Security Hub</a> in the <i>Amazon Macie User Guide</i>.
    """

    publishClassificationFindings: _Boolean
    publishPolicyFindings: _Boolean


class SortCriteria2(BucketSortCriteria):
    """
    Specifies criteria for sorting the results of a request for findings.
    """

    pass


class GetFindingsRequest(BaseModel):
    findingIds: _ListOfString
    sortCriteria: Optional[SortCriteria2] = None


class GetInvitationsCountRequest(BaseModel):
    pass


class GetMacieSessionRequest(BaseModel):
    pass


class GetMasterAccountRequest(BaseModel):
    pass


class GetMemberRequest(BaseModel):
    pass


class RelationshipStatus(Enum):
    """
    The current status of the relationship between an account and an associated Amazon Macie administrator account (<i>inviter account</i>). Possible values are:
    """

    Enabled = 'Enabled'
    Paused = 'Paused'
    Invited = 'Invited'
    Created = 'Created'
    Removed = 'Removed'
    Resigned = 'Resigned'
    EmailVerificationInProgress = 'EmailVerificationInProgress'
    EmailVerificationFailed = 'EmailVerificationFailed'
    RegionDisabled = 'RegionDisabled'
    AccountSuspended = 'AccountSuspended'


class UsageStatisticsSortBy(BaseModel):
    """
    Specifies criteria for sorting the results of a query for Amazon Macie account quotas and usage data.
    """

    key: Optional[UsageStatisticsSortKey] = None
    orderBy: Optional[OrderBy] = None


class TimeRange(Enum):
    """
    An inclusive time period that Amazon Macie usage data applies to. Possible values are:
    """

    MONTH_TO_DATE = 'MONTH_TO_DATE'
    PAST_30_DAYS = 'PAST_30_DAYS'


class GetUsageTotalsRequest(BaseModel):
    pass


class GroupCount(BaseModel):
    """
    Provides a group of results for a query that retrieved aggregated statistical data about findings.
    """

    count: Optional[_Long] = None
    groupKey: Optional[_String] = None


class IamUser(BaseModel):
    """
    Provides information about an Identity and Access Management (IAM) user who performed an action on an affected resource.
    """

    accountId: Optional[_String] = None
    arn: Optional[_String] = None
    principalId: Optional[_String] = None
    userName: Optional[_String] = None


class IpCity(BaseModel):
    """
    Provides information about the city that an IP address originated from.
    """

    name: Optional[_String] = None


class IpCountry(BaseModel):
    """
    Provides information about the country that an IP address originated from.
    """

    code: Optional[_String] = None
    name: Optional[_String] = None


class IpOwner(BaseModel):
    """
    Provides information about the registered owner of an IP address.
    """

    asn: Optional[_String] = None
    asnOrg: Optional[_String] = None
    isp: Optional[_String] = None
    org: Optional[_String] = None


class _Double(BaseModel):
    __root__: float


class JobComparator(Enum):
    """
    The operator to use in a condition. Valid values are:
    """

    EQ = 'EQ'
    GT = 'GT'
    GTE = 'GTE'
    LT = 'LT'
    LTE = 'LTE'
    NE = 'NE'
    CONTAINS = 'CONTAINS'
    STARTS_WITH = 'STARTS_WITH'


class KeyValuePair(BaseModel):
    """
    Provides information about the tags that are associated with an S3 bucket or object. Each tag consists of a required tag key and an associated tag value.
    """

    key: Optional[_String] = None
    value: Optional[_String] = None


class KeyValuePairList(BaseModel):
    """
    Provides information about the tags that are associated with an S3 bucket or object. Each tag consists of a required tag key and an associated tag value.
    """

    __root__: Annotated[
        List[KeyValuePair],
        Field(
            description='Provides information about the tags that are associated with an S3 bucket or object. Each tag consists of a required tag key and an associated tag value.'
        ),
    ]


class LastRunErrorStatusCode(Enum):
    """
    Specifies whether any account- or bucket-level access errors occurred during the run of a one-time classification job or the most recent run of a recurring classification job. Possible values are:
    """

    NONE = 'NONE'
    ERROR = 'ERROR'


class ListJobsSortCriteria(BaseModel):
    """
    Specifies criteria for sorting the results of a request for information about classification jobs.
    """

    attributeName: Optional[ListJobsSortAttributeName] = None
    orderBy: Optional[OrderBy] = None


class ListCustomDataIdentifiersRequest(BaseModel):
    maxResults: Optional[_Integer] = None
    nextToken: Optional[_String] = None


class _ListOfCustomDataIdentifierSummary(BaseModel):
    __root__: List[CustomDataIdentifierSummary]


class MaxResults4(BaseModel):
    __root__: Annotated[int, Field(ge=1.0, le=25.0)]


class ListFindingsFiltersRequest(BaseModel):
    pass


class _ListOfFindingsFilterListItem(BaseModel):
    __root__: List[FindingsFilterListItem]


class ListFindingsRequest(BaseModel):
    findingCriteria: Optional[FindingCriteria] = None
    maxResults: Optional[_Integer] = None
    nextToken: Optional[_String] = None
    sortCriteria: Optional[SortCriteria2] = None


class ListInvitationsRequest(BaseModel):
    pass


class ListJobsFilterKey(Enum):
    """
    The property to use to filter the results. Valid values are:
    """

    jobType = 'jobType'
    jobStatus = 'jobStatus'
    createdAt = 'createdAt'
    name = 'name'


class ListJobsFilterTerm(BaseModel):
    """
    Specifies a condition that filters the results of a request for information about classification jobs. Each condition consists of a property, an operator, and one or more values.
    """

    comparator: Optional[JobComparator] = None
    key: Optional[ListJobsFilterKey] = None
    values: Optional[_ListOfString] = None


class ListManagedDataIdentifiersRequest(BaseModel):
    nextToken: Optional[_String] = None


class ListMembersRequest(BaseModel):
    pass


class ListOrganizationAdminAccountsRequest(BaseModel):
    pass


class _ListOfAdminAccount(BaseModel):
    __root__: List[AdminAccount]


class ListTagsForResourceRequest(BaseModel):
    pass


class SensitiveDataItemCategory(Enum):
    """
    For a finding, the category of sensitive data that was detected and produced the finding. For a managed data identifier, the category of sensitive data that the managed data identifier detects. Possible values are:
    """

    FINANCIAL_INFORMATION = 'FINANCIAL_INFORMATION'
    PERSONAL_INFORMATION = 'PERSONAL_INFORMATION'
    CREDENTIALS = 'CREDENTIALS'
    CUSTOM_IDENTIFIER = 'CUSTOM_IDENTIFIER'


class ManagedDataIdentifierSummary(BaseModel):
    """
    Provides information about a managed data identifier. For additional information, see <a href="https://docs.aws.amazon.com/macie/latest/user/managed-data-identifiers.html">Using managed data identifiers</a> in the <i>Amazon Macie User Guide</i>.
    """

    category: Optional[SensitiveDataItemCategory] = None
    id: Optional[_String] = None


class Member(BaseModel):
    """
    Provides information about an account that's associated with an Amazon Macie administrator account.
    """

    accountId: Optional[_String] = None
    administratorAccountId: Optional[_String] = None
    arn: Optional[_String] = None
    email: Optional[_String] = None
    invitedAt: Optional[_TimestampIso8601] = None
    masterAccountId: Optional[_String] = None
    relationshipStatus: Optional[RelationshipStatus] = None
    tags: Optional[TagMap] = None
    updatedAt: Optional[_TimestampIso8601] = None


class Range(BaseModel):
    """
    Specifies the location of an occurrence of sensitive data in a non-binary text file, such as an HTML, TXT, or XML file.
    """

    end: Optional[_Long] = None
    start: Optional[_Long] = None
    startColumn: Optional[_Long] = None


class Page(BaseModel):
    """
    Specifies the location of an occurrence of sensitive data in an Adobe Portable Document Format file.
    """

    lineRange: Optional[Range] = None
    offsetRange: Optional[Range] = None
    pageNumber: Optional[_Long] = None


class PutClassificationExportConfigurationRequest(BaseModel):
    configuration: ClassificationExportConfiguration


class PutFindingsPublicationConfigurationRequest(BaseModel):
    clientToken: Optional[_String] = None
    securityHubConfiguration: Optional[SecurityHubConfiguration] = None


class Record(BaseModel):
    """
    Specifies the location of an occurrence of sensitive data in an Apache Avro object container, Apache Parquet file, JSON file, or JSON Lines file.
    """

    jsonPath: Optional[_String] = None
    recordIndex: Optional[_Long] = None


class ServerSideEncryption(BaseModel):
    """
    Provides information about the server-side encryption settings for an S3 bucket or S3 object.
    """

    encryptionType: Optional[EncryptionType] = None
    kmsMasterKeyId: Optional[_String] = None


class S3BucketOwner(BaseModel):
    """
    Provides information about the Amazon Web Services account that owns an S3 bucket.
    """

    displayName: Optional[_String] = None
    id: Optional[_String] = None


class S3BucketDefinitionForJob(BaseModel):
    """
    Specifies an Amazon Web Services account that owns S3 buckets for a classification job to analyze, and one or more specific buckets to analyze for that account.
    """

    accountId: _String
    buckets: _ListOfString


class StorageClass(Enum):
    """
    The storage class of the S3 object. Possible values are:
    """

    STANDARD = 'STANDARD'
    REDUCED_REDUNDANCY = 'REDUCED_REDUNDANCY'
    STANDARD_IA = 'STANDARD_IA'
    INTELLIGENT_TIERING = 'INTELLIGENT_TIERING'
    DEEP_ARCHIVE = 'DEEP_ARCHIVE'
    ONEZONE_IA = 'ONEZONE_IA'
    GLACIER = 'GLACIER'


class ScopeFilterKey(Enum):
    """
    The property to use in a condition that determines whether an S3 object is included or excluded from a classification job. Valid values are:
    """

    OBJECT_EXTENSION = 'OBJECT_EXTENSION'
    OBJECT_LAST_MODIFIED_DATE = 'OBJECT_LAST_MODIFIED_DATE'
    OBJECT_SIZE = 'OBJECT_SIZE'
    OBJECT_KEY = 'OBJECT_KEY'


class SearchResourcesComparator(Enum):
    """
    The operator to use in a condition that filters the results of a query. Valid values are:
    """

    EQ = 'EQ'
    NE = 'NE'


class SearchResourcesSortCriteria(BaseModel):
    """
    Specifies criteria for sorting the results of a query for information about Amazon Web Services resources that Amazon Macie monitors and analyzes.
    """

    attributeName: Optional[SearchResourcesSortAttributeName] = None
    orderBy: Optional[OrderBy] = None


class SearchResourcesSimpleCriterionKey(Enum):
    """
    The property to use in a condition that filters the query results. Valid values are:
    """

    ACCOUNT_ID = 'ACCOUNT_ID'
    S3_BUCKET_NAME = 'S3_BUCKET_NAME'
    S3_BUCKET_EFFECTIVE_PERMISSION = 'S3_BUCKET_EFFECTIVE_PERMISSION'
    S3_BUCKET_SHARED_ACCESS = 'S3_BUCKET_SHARED_ACCESS'


class SearchResourcesTagCriterionPair(KeyValuePair):
    """
    Specifies a tag key, a tag value, or a tag key and value (as a pair) to use in a tag-based filter condition for a query. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based filter conditions.
    """

    pass


class Unit(Enum):
    TERABYTES = 'TERABYTES'


class ServiceLimit(BaseModel):
    """
    Specifies a current quota for an Amazon Macie account.
    """

    isServiceLimited: Optional[_Boolean] = None
    unit: Optional[Unit] = None
    value: Optional[_Long] = None


class SessionContextAttributes(BaseModel):
    """
    Provides information about the context in which temporary security credentials were issued to an entity.
    """

    creationDate: Optional[_TimestampIso8601] = None
    mfaAuthenticated: Optional[_Boolean] = None


class SessionIssuer(BaseModel):
    """
    Provides information about the source and type of temporary security credentials that were issued to an entity.
    """

    accountId: Optional[_String] = None
    arn: Optional[_String] = None
    principalId: Optional[_String] = None
    type: Optional[_String] = None
    userName: Optional[_String] = None


class SeverityDescription(Enum):
    """
    The qualitative representation of the finding's severity. Possible values are:
    """

    Low = 'Low'
    Medium = 'Medium'
    High = 'High'


class TagCriterionPairForJob(KeyValuePair):
    """
    <p>Specifies a tag key, a tag value, or a tag key and value (as a pair) to use in a tag-based condition that determines whether an S3 bucket is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.</p>
    """

    pass


class TagResourceRequest(BaseModel):
    tags: TagMap


class TagTarget(Enum):
    """
    The type of object to apply a tag-based condition to. Valid values are:
    """

    S3_OBJECT = 'S3_OBJECT'


class TagValuePair(KeyValuePair):
    """
    Specifies a tag key or tag key and value pair to use in a tag-based condition that determines whether an S3 object is included or excluded from a classification job. Tag keys and values are case sensitive. Also, Amazon Macie doesn't support use of partial values or wildcard characters in tag-based conditions.
    """

    pass


class TestCustomDataIdentifierRequest(BaseModel):
    ignoreWords: Optional[_ListOfString] = None
    keywords: Optional[_ListOfString] = None
    maximumMatchDistance: Optional[_Integer] = None
    regex: _String
    sampleText: _String


class UnprocessedAccount(BaseModel):
    """
    <p>Provides information about an account-related request that hasn't been processed.</p>
    """

    accountId: Optional[_String] = None
    errorCode: Optional[ErrorCode] = None
    errorMessage: Optional[_String] = None


class UntagResourceRequest(BaseModel):
    pass


class UpdateClassificationJobRequest(BaseModel):
    jobStatus: JobStatus


class UpdateFindingsFilterRequest(BaseModel):
    action: Optional[FindingsFilterAction] = None
    description: Optional[_String] = None
    findingCriteria: Optional[FindingCriteria] = None
    name: Optional[_String] = None
    position: Optional[_Integer] = None
    clientToken: Optional[_String] = None


class UpdateMacieSessionRequest(BaseModel):
    findingPublishingFrequency: Optional[FindingPublishingFrequency] = None
    status: Optional[MacieStatus] = None


class UpdateMemberSessionRequest(BaseModel):
    status: MacieStatus


class UpdateOrganizationConfigurationRequest(BaseModel):
    autoEnable: _Boolean


class UsageType(Enum):
    """
    The name of an Amazon Macie usage metric for an account. Possible values are:
    """

    DATA_INVENTORY_EVALUATION = 'DATA_INVENTORY_EVALUATION'
    SENSITIVE_DATA_DISCOVERY = 'SENSITIVE_DATA_DISCOVERY'


class UsageByAccount(BaseModel):
    """
    Provides data for a specific usage metric and the corresponding quota for an Amazon Macie account.
    """

    currency: Optional[Currency] = None
    estimatedCost: Optional[_String] = None
    serviceLimit: Optional[ServiceLimit] = None
    type: Optional[UsageType] = None


class _ListOfUsageByAccount(BaseModel):
    __root__: List[UsageByAccount]


class UsageRecord(BaseModel):
    """
    Provides quota and aggregated usage data for an Amazon Macie account.
    """

    accountId: Optional[_String] = None
    freeTrialStartDate: Optional[_TimestampIso8601] = None
    usage: Optional[_ListOfUsageByAccount] = None


class UsageStatisticsFilterComparator(Enum):
    """
    The operator to use in a condition that filters the results of a query for Amazon Macie account quotas and usage data. Valid values are:
    """

    GT = 'GT'
    GTE = 'GTE'
    LT = 'LT'
    LTE = 'LTE'
    EQ = 'EQ'
    NE = 'NE'
    CONTAINS = 'CONTAINS'


class UsageStatisticsFilterKey(Enum):
    """
    The field to use in a condition that filters the results of a query for Amazon Macie account quotas and usage data. Valid values are:
    """

    accountId = 'accountId'
    serviceLimit = 'serviceLimit'
    freeTrialStartDate = 'freeTrialStartDate'
    total = 'total'


class UsageTotal(BaseModel):
    """
    Provides aggregated data for an Amazon Macie usage metric. The value for the metric reports estimated usage data for an account for the preceding 30 days or the current calendar month to date, depending on the time period (timeRange) specified in the request.
    """

    currency: Optional[Currency] = None
    estimatedCost: Optional[_String] = None
    type: Optional[UsageType] = None


class UserIdentityRoot(BaseModel):
    """
    Provides information about an Amazon Web Services account and entity that performed an action on an affected resource. The action was performed using the credentials for your Amazon Web Services account.
    """

    accountId: Optional[_String] = None
    arn: Optional[_String] = None
    principalId: Optional[_String] = None


class UserIdentityType(Enum):
    """
    The type of entity that performed the action on the affected resource. Possible values are:
    """

    AssumedRole = 'AssumedRole'
    IAMUser = 'IAMUser'
    FederatedUser = 'FederatedUser'
    Root = 'Root'
    AWSAccount = 'AWSAccount'
    AWSService = 'AWSService'


class BatchGetCustomDataIdentifiersResponse(BaseModel):
    customDataIdentifiers: Optional[_ListOfBatchGetCustomDataIdentifierSummary] = None
    notFoundIdentifierIds: Optional[_ListOfString] = None


class _ListOfS3BucketDefinitionForJob(BaseModel):
    __root__: List[S3BucketDefinitionForJob]


class MonthlySchedule(BaseModel):
    """
    Specifies a monthly recurrence pattern for running a classification job.
    """

    dayOfMonth: Optional[_Integer] = None


class WeeklySchedule(BaseModel):
    """
    Specifies a weekly recurrence pattern for running a classification job.
    """

    dayOfWeek: Optional[DayOfWeek] = None


class BucketCriteriaAdditionalProperties(BaseModel):
    """
    Specifies the operator to use in a property-based condition that filters the results of a query for information about S3 buckets.
    """

    eq: Optional[_ListOfString] = None
    gt: Optional[_Long] = None
    gte: Optional[_Long] = None
    lt: Optional[_Long] = None
    lte: Optional[_Long] = None
    neq: Optional[_ListOfString] = None
    prefix: Optional[_String] = None


class DescribeOrganizationConfigurationResponse(BaseModel):
    autoEnable: Optional[_Boolean] = None
    maxAccountLimitReached: Optional[_Boolean] = None


class GetBucketStatisticsResponse(BaseModel):
    bucketCount: Optional[_Long] = None
    bucketCountByEffectivePermission: Optional[BucketCountByEffectivePermission] = None
    bucketCountByEncryptionType: Optional[BucketCountByEncryptionType] = None
    bucketCountByObjectEncryptionRequirement: Optional[
        BucketCountPolicyAllowsUnencryptedObjectUploads
    ] = None
    bucketCountBySharedAccessType: Optional[BucketCountBySharedAccessType] = None
    classifiableObjectCount: Optional[_Long] = None
    classifiableSizeInBytes: Optional[_Long] = None
    lastUpdated: Optional[_TimestampIso8601] = None
    objectCount: Optional[_Long] = None
    sizeInBytes: Optional[_Long] = None
    sizeInBytesCompressed: Optional[_Long] = None
    unclassifiableObjectCount: Optional[ObjectLevelStatistics] = None
    unclassifiableObjectSizeInBytes: Optional[ObjectLevelStatistics] = None


class GetClassificationExportConfigurationResponse(BaseModel):
    configuration: Optional[ClassificationExportConfiguration] = None


class GetCustomDataIdentifierResponse(BaseModel):
    arn: Optional[_String] = None
    createdAt: Optional[_TimestampIso8601] = None
    deleted: Optional[_Boolean] = None
    description: Optional[_String] = None
    id: Optional[_String] = None
    ignoreWords: Optional[_ListOfString] = None
    keywords: Optional[_ListOfString] = None
    maximumMatchDistance: Optional[_Integer] = None
    name: Optional[_String] = None
    regex: Optional[_String] = None
    tags: Optional[TagMap] = None


class GetFindingsFilterResponse(BaseModel):
    action: Optional[FindingsFilterAction] = None
    arn: Optional[_String] = None
    description: Optional[_String] = None
    findingCriteria: Optional[FindingCriteria] = None
    id: Optional[_String] = None
    name: Optional[_String] = None
    position: Optional[_Integer] = None
    tags: Optional[TagMap] = None


class GetFindingsPublicationConfigurationResponse(BaseModel):
    securityHubConfiguration: Optional[SecurityHubConfiguration] = None


class GetInvitationsCountResponse(BaseModel):
    invitationsCount: Optional[_Long] = None


class GetMacieSessionResponse(BaseModel):
    createdAt: Optional[_TimestampIso8601] = None
    findingPublishingFrequency: Optional[FindingPublishingFrequency] = None
    serviceRole: Optional[_String] = None
    status: Optional[MacieStatus] = None
    updatedAt: Optional[_TimestampIso8601] = None


class GetMemberResponse(Member):
    pass


class UsageStatisticsFilter(BaseModel):
    """
    Specifies a condition for filtering the results of a query for quota and usage data for one or more Amazon Macie accounts.
    """

    comparator: Optional[UsageStatisticsFilterComparator] = None
    key: Optional[UsageStatisticsFilterKey] = None
    values: Optional[_ListOfString] = None


class _ListOfListJobsFilterTerm(BaseModel):
    __root__: List[ListJobsFilterTerm]


class ListCustomDataIdentifiersResponse(BaseModel):
    items: Optional[_ListOfCustomDataIdentifierSummary] = None
    nextToken: Optional[_String] = None


class ListFindingsResponse(BaseModel):
    findingIds: Optional[_ListOfString] = None
    nextToken: Optional[_String] = None


class ListFindingsFiltersResponse(BaseModel):
    findingsFilterListItems: Optional[_ListOfFindingsFilterListItem] = None
    nextToken: Optional[_String] = None


class ListOrganizationAdminAccountsResponse(BaseModel):
    adminAccounts: Optional[_ListOfAdminAccount] = None
    nextToken: Optional[_String] = None


class ListTagsForResourceResponse(BaseModel):
    tags: Optional[TagMap] = None


class PutClassificationExportConfigurationResponse(
    GetClassificationExportConfigurationResponse
):
    pass


class TestCustomDataIdentifierResponse(BaseModel):
    matchCount: Optional[_Integer] = None


class SessionContext(BaseModel):
    """
    Provides information about a session that was created for an entity that performed an action by using temporary security credentials.
    """

    attributes: Optional[SessionContextAttributes] = None
    sessionIssuer: Optional[SessionIssuer] = None


class AssumedRole(BaseModel):
    """
    Provides information about an identity that performed an action on an affected resource by using temporary security credentials. The credentials were obtained using the AssumeRole operation of the Security Token Service (STS) API.
    """

    accessKeyId: Optional[_String] = None
    accountId: Optional[_String] = None
    arn: Optional[_String] = None
    principalId: Optional[_String] = None
    sessionContext: Optional[SessionContext] = None


class JobDetails(BaseModel):
    """
    Specifies whether any one-time or recurring classification jobs are configured to analyze data in an S3 bucket, and, if so, the details of the job that ran most recently.
    """

    isDefinedInJob: Optional[AllowsUnencryptedObjectUploads] = None
    isMonitoredByJob: Optional[AllowsUnencryptedObjectUploads] = None
    lastJobId: Optional[_String] = None
    lastJobRunTime: Optional[_TimestampIso8601] = None


class BucketPublicAccess(BaseModel):
    """
    Provides information about the permissions settings that determine whether an S3 bucket is publicly accessible.
    """

    effectivePermission: Optional[EffectivePermission] = None
    permissionConfiguration: Optional[BucketPermissionConfiguration] = None


class BucketServerSideEncryption(BaseModel):
    """
    Provides information about the default server-side encryption settings for an S3 bucket. For detailed information about these settings, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-encryption.html">Setting default server-side encryption behavior for Amazon S3 buckets</a> in the <i>Amazon Simple Storage Service User Guide</i>.
    """

    kmsMasterKeyId: Optional[_String] = None
    type: Optional[Type] = None


class _ListOfKeyValuePair(BaseModel):
    __root__: List[KeyValuePair]


class BucketMetadata(BaseModel):
    """
    Provides information about an S3 bucket that Amazon Macie monitors and analyzes.
    """

    accountId: Optional[_String] = None
    allowsUnencryptedObjectUploads: Optional[AllowsUnencryptedObjectUploads] = None
    bucketArn: Optional[_String] = None
    bucketCreatedAt: Optional[_TimestampIso8601] = None
    bucketName: Optional[_String] = None
    classifiableObjectCount: Optional[_Long] = None
    classifiableSizeInBytes: Optional[_Long] = None
    jobDetails: Optional[JobDetails] = None
    lastUpdated: Optional[_TimestampIso8601] = None
    objectCount: Optional[_Long] = None
    objectCountByEncryptionType: Optional[ObjectCountByEncryptionType] = None
    publicAccess: Optional[BucketPublicAccess] = None
    region: Optional[_String] = None
    replicationDetails: Optional[ReplicationDetails] = None
    serverSideEncryption: Optional[BucketServerSideEncryption] = None
    sharedAccess: Optional[SharedAccess] = None
    sizeInBytes: Optional[_Long] = None
    sizeInBytesCompressed: Optional[_Long] = None
    tags: Optional[_ListOfKeyValuePair] = None
    unclassifiableObjectCount: Optional[ObjectLevelStatistics] = None
    unclassifiableObjectSizeInBytes: Optional[ObjectLevelStatistics] = None
    versioning: Optional[_Boolean] = None


class JobScheduleFrequency(BaseModel):
    """
    Specifies the recurrence pattern for running a classification job.
    """

    dailySchedule: Optional[DailySchedule] = None
    monthlySchedule: Optional[MonthlySchedule] = None
    weeklySchedule: Optional[WeeklySchedule] = None


class _ListOfUnprocessedAccount(BaseModel):
    __root__: List[UnprocessedAccount]


class SimpleCriterionForJob(BaseModel):
    """
    Specifies a property-based condition that determines whether an S3 bucket is included or excluded from a classification job.
    """

    comparator: Optional[JobComparator] = None
    key: Optional[SearchResourcesSimpleCriterionKey] = None
    values: Optional[_ListOfString] = None


class _ListOfBucketMetadata(BaseModel):
    __root__: List[BucketMetadata]


class LastRunErrorStatus(BaseModel):
    """
    Specifies whether any account- or bucket-level access errors occurred when a classification job ran. For information about using logging data to investigate these errors, see <a href="https://docs.aws.amazon.com/macie/latest/user/discovery-jobs-monitor-cw-logs.html">Monitoring sensitive data discovery jobs</a> in the <i>Amazon Macie User Guide</i>.
    """

    code: Optional[LastRunErrorStatusCode] = None


class Statistics(BaseModel):
    """
    Provides processing statistics for a classification job.
    """

    approximateNumberOfObjectsToProcess: Optional[_Double] = None
    numberOfRuns: Optional[_Double] = None


class FederatedUser(AssumedRole):
    """
    Provides information about an identity that performed an action on an affected resource by using temporary security credentials. The credentials were obtained using the GetFederationToken operation of the Security Token Service (STS) API.
    """

    pass


class Severity(BaseModel):
    """
    Provides the numerical and qualitative representations of a finding's severity.
    """

    description: Optional[SeverityDescription] = None
    score: Optional[_Long] = None


class UserIdentity(BaseModel):
    """
    Provides information about the type and other characteristics of an entity that performed an action on an affected resource.
    """

    assumedRole: Optional[AssumedRole] = None
    awsAccount: Optional[AwsAccount] = None
    awsService: Optional[AwsService] = None
    federatedUser: Optional[FederatedUser] = None
    iamUser: Optional[IamUser] = None
    root: Optional[UserIdentityRoot] = None
    type: Optional[UserIdentityType] = None


class Invitation(BaseModel):
    """
    Provides information about an Amazon Macie membership invitation that was received by an account.
    """

    accountId: Optional[_String] = None
    invitationId: Optional[_String] = None
    invitedAt: Optional[_TimestampIso8601] = None
    relationshipStatus: Optional[RelationshipStatus] = None


class _ListOfGroupCount(BaseModel):
    __root__: List[GroupCount]


class _ListOfUsageStatisticsFilter(BaseModel):
    __root__: List[UsageStatisticsFilter]


class GetUsageStatisticsRequest(BaseModel):
    filterBy: Optional[_ListOfUsageStatisticsFilter] = None
    maxResults: Optional[_Integer] = None
    nextToken: Optional[_String] = None
    sortBy: Optional[UsageStatisticsSortBy] = None
    timeRange: Optional[TimeRange] = None


class _ListOfUsageRecord(BaseModel):
    __root__: List[UsageRecord]


class _ListOfUsageTotal(BaseModel):
    __root__: List[UsageTotal]


class IpGeoLocation(BaseModel):
    """
    Provides geographic coordinates that indicate where a specified IP address originated from.
    """

    lat: Optional[_Double] = None
    lon: Optional[_Double] = None


class SimpleScopeTerm(BaseModel):
    """
    Specifies a property-based condition that determines whether an S3 object is included or excluded from a classification job.
    """

    comparator: Optional[JobComparator] = None
    key: Optional[ScopeFilterKey] = None
    values: Optional[_ListOfString] = None


class ListJobsFilterCriteria(BaseModel):
    """
    Specifies criteria for filtering the results of a request for information about classification jobs.
    """

    excludes: Optional[_ListOfListJobsFilterTerm] = None
    includes: Optional[_ListOfListJobsFilterTerm] = None


class ListClassificationJobsRequest(BaseModel):
    filterCriteria: Optional[ListJobsFilterCriteria] = None
    maxResults: Optional[_Integer] = None
    nextToken: Optional[_String] = None
    sortCriteria: Optional[ListJobsSortCriteria] = None


class _ListOfInvitation(BaseModel):
    __root__: List[Invitation]


class _ListOfManagedDataIdentifierSummary(BaseModel):
    __root__: List[ManagedDataIdentifierSummary]


class _ListOfMember(BaseModel):
    __root__: List[Member]


class MatchingBucket(BaseModel):
    """
    Provides statistical data and other information about an S3 bucket that Amazon Macie monitors and analyzes.
    """

    accountId: Optional[_String] = None
    bucketName: Optional[_String] = None
    classifiableObjectCount: Optional[_Long] = None
    classifiableSizeInBytes: Optional[_Long] = None
    jobDetails: Optional[JobDetails] = None
    objectCount: Optional[_Long] = None
    objectCountByEncryptionType: Optional[ObjectCountByEncryptionType] = None
    sizeInBytes: Optional[_Long] = None
    sizeInBytesCompressed: Optional[_Long] = None
    unclassifiableObjectCount: Optional[ObjectLevelStatistics] = None
    unclassifiableObjectSizeInBytes: Optional[ObjectLevelStatistics] = None


class MatchingResource(BaseModel):
    """
    Provides statistical data and other information about an Amazon Web Services resource that Amazon Macie monitors and analyzes.
    """

    matchingBucket: Optional[MatchingBucket] = None


class Ranges(BaseModel):
    __root__: List[Range]


class Pages(BaseModel):
    """
    Specifies the location of occurrences of sensitive data in an Adobe Portable Document Format file.
    """

    __root__: Annotated[
        List[Page],
        Field(
            description='Specifies the location of occurrences of sensitive data in an Adobe Portable Document Format file.'
        ),
    ]


class Records(BaseModel):
    __root__: List[Record]


class S3Bucket(BaseModel):
    """
    Provides information about the S3 bucket that a finding applies to.
    """

    allowsUnencryptedObjectUploads: Optional[AllowsUnencryptedObjectUploads] = None
    arn: Optional[_String] = None
    createdAt: Optional[_TimestampIso8601] = None
    defaultServerSideEncryption: Optional[ServerSideEncryption] = None
    name: Optional[_String] = None
    owner: Optional[S3BucketOwner] = None
    publicAccess: Optional[BucketPublicAccess] = None
    tags: Optional[KeyValuePairList] = None


class S3Object(BaseModel):
    """
    Provides information about the S3 object that a finding applies to.
    """

    bucketArn: Optional[_String] = None
    eTag: Optional[_String] = None
    extension: Optional[_String] = None
    key: Optional[_String] = None
    lastModified: Optional[_TimestampIso8601] = None
    path: Optional[_String] = None
    publicAccess: Optional[_Boolean] = None
    serverSideEncryption: Optional[ServerSideEncryption] = None
    size: Optional[_Long] = None
    storageClass: Optional[StorageClass] = None
    tags: Optional[KeyValuePairList] = None
    versionId: Optional[_String] = None


class SearchResourcesSimpleCriterion(BaseModel):
    """
    Specifies a property-based filter condition that determines which Amazon Web Services resources are included or excluded from the query results.
    """

    comparator: Optional[SearchResourcesComparator] = None
    key: Optional[SearchResourcesSimpleCriterionKey] = None
    values: Optional[_ListOfString] = None


class _ListOfMatchingResource(BaseModel):
    __root__: List[MatchingResource]


class _ListOfSearchResourcesTagCriterionPair(BaseModel):
    __root__: List[SearchResourcesTagCriterionPair]


class _ListOfTagCriterionPairForJob(BaseModel):
    __root__: List[TagCriterionPairForJob]


class _ListOfTagValuePair(BaseModel):
    __root__: List[TagValuePair]


class CreateInvitationsResponse(BaseModel):
    unprocessedAccounts: Optional[_ListOfUnprocessedAccount] = None


class DeclineInvitationsResponse(CreateInvitationsResponse):
    pass


class DeleteInvitationsResponse(CreateInvitationsResponse):
    pass


class DescribeBucketsResponse(BaseModel):
    buckets: Optional[_ListOfBucketMetadata] = None
    nextToken: Optional[_String] = None


class GetAdministratorAccountResponse(BaseModel):
    administrator: Optional[Invitation] = None


class GetFindingStatisticsResponse(BaseModel):
    countsByGroup: Optional[_ListOfGroupCount] = None


class GetMasterAccountResponse(BaseModel):
    master: Optional[Invitation] = None


class GetUsageStatisticsResponse(BaseModel):
    nextToken: Optional[_String] = None
    records: Optional[_ListOfUsageRecord] = None
    timeRange: Optional[TimeRange] = None


class GetUsageTotalsResponse(BaseModel):
    timeRange: Optional[TimeRange] = None
    usageTotals: Optional[_ListOfUsageTotal] = None


class ListInvitationsResponse(BaseModel):
    invitations: Optional[_ListOfInvitation] = None
    nextToken: Optional[_String] = None


class ListManagedDataIdentifiersResponse(BaseModel):
    items: Optional[_ListOfManagedDataIdentifierSummary] = None
    nextToken: Optional[_String] = None


class ListMembersResponse(BaseModel):
    members: Optional[_ListOfMember] = None
    nextToken: Optional[_String] = None


class SearchResourcesResponse(BaseModel):
    matchingResources: Optional[_ListOfMatchingResource] = None
    nextToken: Optional[_String] = None


class TagCriterionForJob(BaseModel):
    """
    Specifies a tag-based condition that determines whether an S3 bucket is included or excluded from a classification job.
    """

    comparator: Optional[JobComparator] = None
    tagValues: Optional[_ListOfTagCriterionPairForJob] = None


class CriteriaForJob(BaseModel):
    """
    Specifies a property- or tag-based condition that defines criteria for including or excluding S3 buckets from a classification job.
    """

    simpleCriterion: Optional[SimpleCriterionForJob] = None
    tagCriterion: Optional[TagCriterionForJob] = None


class Occurrences(BaseModel):
    """
    Specifies the location of 1-15 occurrences of sensitive data that was detected by a managed data identifier or a custom data identifier and produced a sensitive data finding.
    """

    cells: Optional[Cells] = None
    lineRanges: Optional[Ranges] = None
    offsetRanges: Optional[Ranges] = None
    pages: Optional[Pages] = None
    records: Optional[Records] = None


class CustomDetection(BaseModel):
    """
    Provides information about a custom data identifier that produced a sensitive data finding, and the sensitive data that it detected for the finding.
    """

    arn: Optional[_String] = None
    count: Optional[_Long] = None
    name: Optional[_String] = None
    occurrences: Optional[Occurrences] = None


class DefaultDetection(BaseModel):
    """
    Provides information about a type of sensitive data that was detected by a managed data identifier and produced a sensitive data finding.
    """

    count: Optional[_Long] = None
    occurrences: Optional[Occurrences] = None
    type: Optional[_String] = None


class DefaultDetections(BaseModel):
    """
    Provides information about sensitive data that was detected by managed data identifiers and produced a sensitive data finding, and the number of occurrences of each type of sensitive data that was detected.
    """

    __root__: Annotated[
        List[DefaultDetection],
        Field(
            description='Provides information about sensitive data that was detected by managed data identifiers and produced a sensitive data finding, and the number of occurrences of each type of sensitive data that was detected.'
        ),
    ]


class ResourcesAffected(BaseModel):
    """
    Provides information about the resources that a finding applies to.
    """

    s3Bucket: Optional[S3Bucket] = None
    s3Object: Optional[S3Object] = None


class IpAddressDetails(BaseModel):
    """
    Provides information about the IP address of the device that an entity used to perform an action on an affected resource.
    """

    ipAddressV4: Optional[_String] = None
    ipCity: Optional[IpCity] = None
    ipCountry: Optional[IpCountry] = None
    ipGeoLocation: Optional[IpGeoLocation] = None
    ipOwner: Optional[IpOwner] = None


class FindingActor(BaseModel):
    """
    Provides information about an entity that performed an action that produced a policy finding for a resource.
    """

    domainDetails: Optional[DomainDetails] = None
    ipAddressDetails: Optional[IpAddressDetails] = None
    userIdentity: Optional[UserIdentity] = None


class TagScopeTerm(BaseModel):
    """
    Specifies a tag-based condition that determines whether an S3 object is included or excluded from a classification job.
    """

    comparator: Optional[JobComparator] = None
    key: Optional[_String] = None
    tagValues: Optional[_ListOfTagValuePair] = None
    target: Optional[TagTarget] = None


class JobScopeTerm(BaseModel):
    """
    Specifies a property- or tag-based condition that defines criteria for including or excluding S3 objects from a classification job. A JobScopeTerm object can contain only one simpleScopeTerm object or one tagScopeTerm object.
    """

    simpleScopeTerm: Optional[SimpleScopeTerm] = None
    tagScopeTerm: Optional[TagScopeTerm] = None


class _ListOfJobScopeTerm(BaseModel):
    __root__: List[JobScopeTerm]


class JobScopingBlock(BaseModel):
    """
    Specifies one or more property- and tag-based conditions that define criteria for including or excluding S3 objects from a classification job.
    """

    and_: Annotated[Optional[_ListOfJobScopeTerm], Field(alias='and')] = None


class SearchResourcesTagCriterion(BaseModel):
    """
    Specifies a tag-based filter condition that determines which Amazon Web Services resources are included or excluded from the query results.
    """

    comparator: Optional[SearchResourcesComparator] = None
    tagValues: Optional[_ListOfSearchResourcesTagCriterionPair] = None


class SearchResourcesCriteria(BaseModel):
    """
    Specifies a property- or tag-based filter condition for including or excluding Amazon Web Services resources from the query results.
    """

    simpleCriterion: Optional[SearchResourcesSimpleCriterion] = None
    tagCriterion: Optional[SearchResourcesTagCriterion] = None


class _ListOfSearchResourcesCriteria(BaseModel):
    __root__: List[SearchResourcesCriteria]


class SensitiveDataItem(BaseModel):
    """
    Provides information about the category, types, and occurrences of sensitive data that produced a sensitive data finding.
    """

    category: Optional[SensitiveDataItemCategory] = None
    detections: Optional[DefaultDetections] = None
    totalCount: Optional[_Long] = None


class Scoping(BaseModel):
    """
    Specifies one or more property- and tag-based conditions that define criteria for including or excluding S3 objects from a classification job. Exclude conditions take precedence over include conditions.
    """

    excludes: Optional[JobScopingBlock] = None
    includes: Optional[JobScopingBlock] = None


class SearchResourcesCriteriaBlock(BaseModel):
    """
    Specifies property- and tag-based conditions that define filter criteria for including or excluding Amazon Web Services resources from the query results.
    """

    and_: Annotated[Optional[_ListOfSearchResourcesCriteria], Field(alias='and')] = None


class SensitiveData(BaseModel):
    """
    Provides information about the category and number of occurrences of sensitive data that produced a finding.
    """

    __root__: Annotated[
        List[SensitiveDataItem],
        Field(
            description='Provides information about the category and number of occurrences of sensitive data that produced a finding.'
        ),
    ]


class _ListOfCriteriaForJob(BaseModel):
    __root__: List[CriteriaForJob]


class CriteriaBlockForJob(BaseModel):
    """
    Specifies one or more property- and tag-based conditions that define criteria for including or excluding S3 buckets from a classification job.
    """

    and_: Annotated[Optional[_ListOfCriteriaForJob], Field(alias='and')] = None


class CustomDetections(BaseModel):
    """
    Provides information about custom data identifiers that produced a sensitive data finding, and the number of occurrences of the data that each identifier detected.
    """

    __root__: Annotated[
        List[CustomDetection],
        Field(
            description='Provides information about custom data identifiers that produced a sensitive data finding, and the number of occurrences of the data that each identifier detected.'
        ),
    ]


class PolicyDetails(BaseModel):
    """
    Provides the details of a policy finding.
    """

    action: Optional[FindingAction] = None
    actor: Optional[FindingActor] = None


class SearchResourcesBucketCriteria(BaseModel):
    """
    Specifies property- and tag-based conditions that define filter criteria for including or excluding S3 buckets from the query results. Exclude conditions take precedence over include conditions.
    """

    excludes: Optional[SearchResourcesCriteriaBlock] = None
    includes: Optional[SearchResourcesCriteriaBlock] = None


class SearchResourcesRequest(BaseModel):
    bucketCriteria: Optional[SearchResourcesBucketCriteria] = None
    maxResults: Optional[_Integer] = None
    nextToken: Optional[_String] = None
    sortCriteria: Optional[SearchResourcesSortCriteria] = None


class S3BucketCriteriaForJob(BaseModel):
    """
    Specifies property- and tag-based conditions that define criteria for including or excluding S3 buckets from a classification job. Exclude conditions take precedence over include conditions.
    """

    excludes: Optional[CriteriaBlockForJob] = None
    includes: Optional[CriteriaBlockForJob] = None


class CustomDataIdentifiers(BaseModel):
    """
    Provides information about custom data identifiers that produced a sensitive data finding, and the number of occurrences of the data that they detected for the finding.
    """

    detections: Optional[CustomDetections] = None
    totalCount: Optional[_Long] = None


class S3JobDefinition(BaseModel):
    """
    Specifies which S3 buckets contain the objects that a classification job analyzes, and the scope of that analysis. The bucket specification can be static (bucketDefinitions) or dynamic (bucketCriteria). If it's static, the job analyzes objects in the same predefined set of buckets each time the job runs. If it's dynamic, the job analyzes objects in any buckets that match the specified criteria each time the job starts to run.
    """

    bucketDefinitions: Optional[_ListOfS3BucketDefinitionForJob] = None
    scoping: Optional[Scoping] = None
    bucketCriteria: Optional[S3BucketCriteriaForJob] = None


class CreateClassificationJobRequest(BaseModel):
    clientToken: _String
    customDataIdentifierIds: Optional[_ListOfString] = None
    description: Optional[_String] = None
    initialRun: Optional[_Boolean] = None
    jobType: JobType
    managedDataIdentifierIds: Optional[_ListOfString] = None
    managedDataIdentifierSelector: Optional[ManagedDataIdentifierSelector] = None
    name: _String
    s3JobDefinition: S3JobDefinition
    samplingPercentage: Optional[_Integer] = None
    scheduleFrequency: Optional[JobScheduleFrequency] = None
    tags: Optional[TagMap] = None


class JobSummary(BaseModel):
    """
    Provides information about a classification job, including the current status of the job.
    """

    bucketDefinitions: Optional[_ListOfS3BucketDefinitionForJob] = None
    createdAt: Optional[_TimestampIso8601] = None
    jobId: Optional[_String] = None
    jobStatus: Optional[JobStatus] = None
    jobType: Optional[JobType] = None
    lastRunErrorStatus: Optional[LastRunErrorStatus] = None
    name: Optional[_String] = None
    userPausedDetails: Optional[UserPausedDetails] = None
    bucketCriteria: Optional[S3BucketCriteriaForJob] = None


class _ListOfJobSummary(BaseModel):
    __root__: List[JobSummary]


class DescribeClassificationJobResponse(BaseModel):
    clientToken: Optional[_String] = None
    createdAt: Optional[_TimestampIso8601] = None
    customDataIdentifierIds: Optional[_ListOfString] = None
    description: Optional[_String] = None
    initialRun: Optional[_Boolean] = None
    jobArn: Optional[_String] = None
    jobId: Optional[_String] = None
    jobStatus: Optional[JobStatus] = None
    jobType: Optional[JobType] = None
    lastRunErrorStatus: Optional[LastRunErrorStatus] = None
    lastRunTime: Optional[_TimestampIso8601] = None
    managedDataIdentifierIds: Optional[_ListOfString] = None
    managedDataIdentifierSelector: Optional[ManagedDataIdentifierSelector] = None
    name: Optional[_String] = None
    s3JobDefinition: Optional[S3JobDefinition] = None
    samplingPercentage: Optional[_Integer] = None
    scheduleFrequency: Optional[JobScheduleFrequency] = None
    statistics: Optional[Statistics] = None
    tags: Optional[TagMap] = None
    userPausedDetails: Optional[UserPausedDetails] = None


class ListClassificationJobsResponse(BaseModel):
    items: Optional[_ListOfJobSummary] = None
    nextToken: Optional[_String] = None


class ClassificationResult(BaseModel):
    """
    Provides the details of a sensitive data finding, including the types, number of occurrences, and locations of the sensitive data that was detected.
    """

    additionalOccurrences: Optional[_Boolean] = None
    customDataIdentifiers: Optional[CustomDataIdentifiers] = None
    mimeType: Optional[_String] = None
    sensitiveData: Optional[SensitiveData] = None
    sizeClassified: Optional[_Long] = None
    status: Optional[ClassificationResultStatus] = None


class ClassificationDetails(BaseModel):
    """
    Provides information about a sensitive data finding, including the classification job that produced the finding.
    """

    detailedResultsLocation: Optional[_String] = None
    jobArn: Optional[_String] = None
    jobId: Optional[_String] = None
    result: Optional[ClassificationResult] = None


class Finding(BaseModel):
    """
    Provides the details of a finding.
    """

    accountId: Optional[_String] = None
    archived: Optional[_Boolean] = None
    category: Optional[FindingCategory] = None
    classificationDetails: Optional[ClassificationDetails] = None
    count: Optional[_Long] = None
    createdAt: Optional[_TimestampIso8601] = None
    description: Optional[_String] = None
    id: Optional[_String] = None
    partition: Optional[_String] = None
    policyDetails: Optional[PolicyDetails] = None
    region: Optional[_String] = None
    resourcesAffected: Optional[ResourcesAffected] = None
    sample: Optional[_Boolean] = None
    schemaVersion: Optional[_String] = None
    severity: Optional[Severity] = None
    title: Optional[_String] = None
    type: Optional[FindingType] = None
    updatedAt: Optional[_TimestampIso8601] = None


class _ListOfFinding(BaseModel):
    __root__: List[Finding]


class GetFindingsResponse(BaseModel):
    findings: Optional[_ListOfFinding] = None
