text: # generated by datamodel-codegen:
  #   filename:  openapi.yaml
  #   timestamp: 2021-12-31T02:59:43+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, Field
  
  
  class ResourceAssociatedException(BaseModel):
      __root__: Any
  
  
  class AccessDeniedException(ResourceAssociatedException):
      pass
  
  
  class ResourceNotFoundException(ResourceAssociatedException):
      pass
  
  
  class InvalidParameterValuesException(ResourceAssociatedException):
      pass
  
  
  class InvalidResourceStateException(ResourceAssociatedException):
      pass
  
  
  class OperationNotSupportedException(ResourceAssociatedException):
      pass
  
  
  class AssociateIpGroupsResult(BaseModel):
      pass
  
  
  class ResourceLimitExceededException(ResourceAssociatedException):
      pass
  
  
  class AuthorizeIpRulesResult(AssociateIpGroupsResult):
      pass
  
  
  class ResourceAlreadyExistsException(ResourceAssociatedException):
      pass
  
  
  class ResourceUnavailableException(ResourceAssociatedException):
      pass
  
  
  class ResourceCreationFailedException(ResourceAssociatedException):
      pass
  
  
  class CreateTagsResult(AssociateIpGroupsResult):
      pass
  
  
  class DeleteConnectionAliasResult(AssociateIpGroupsResult):
      pass
  
  
  class DeleteIpGroupResult(AssociateIpGroupsResult):
      pass
  
  
  class DeleteTagsResult(AssociateIpGroupsResult):
      pass
  
  
  class DeleteWorkspaceBundleResult(AssociateIpGroupsResult):
      pass
  
  
  class DeleteWorkspaceImageResult(AssociateIpGroupsResult):
      pass
  
  
  class DeregisterWorkspaceDirectoryResult(AssociateIpGroupsResult):
      pass
  
  
  class DescribeAccountRequest(BaseModel):
      pass
  
  
  class DisassociateConnectionAliasResult(AssociateIpGroupsResult):
      pass
  
  
  class DisassociateIpGroupsResult(AssociateIpGroupsResult):
      pass
  
  
  class OperationInProgressException(ResourceAssociatedException):
      pass
  
  
  class ModifyAccountResult(AssociateIpGroupsResult):
      pass
  
  
  class ModifyClientPropertiesResult(AssociateIpGroupsResult):
      pass
  
  
  class ModifySelfservicePermissionsResult(AssociateIpGroupsResult):
      pass
  
  
  class ModifyWorkspaceAccessPropertiesResult(AssociateIpGroupsResult):
      pass
  
  
  class ModifyWorkspaceCreationPropertiesResult(AssociateIpGroupsResult):
      pass
  
  
  class ModifyWorkspacePropertiesResult(AssociateIpGroupsResult):
      pass
  
  
  class UnsupportedWorkspaceConfigurationException(ResourceAssociatedException):
      pass
  
  
  class ModifyWorkspaceStateResult(AssociateIpGroupsResult):
      pass
  
  
  class RegisterWorkspaceDirectoryResult(AssociateIpGroupsResult):
      pass
  
  
  class WorkspacesDefaultRoleNotFoundException(ResourceAssociatedException):
      pass
  
  
  class UnsupportedNetworkConfigurationException(ResourceAssociatedException):
      pass
  
  
  class RestoreWorkspaceResult(AssociateIpGroupsResult):
      pass
  
  
  class RevokeIpRulesResult(AssociateIpGroupsResult):
      pass
  
  
  class UpdateConnectionAliasPermissionResult(AssociateIpGroupsResult):
      pass
  
  
  class UpdateRulesOfIpGroupResult(AssociateIpGroupsResult):
      pass
  
  
  class UpdateWorkspaceBundleResult(AssociateIpGroupsResult):
      pass
  
  
  class UpdateWorkspaceImagePermissionResult(AssociateIpGroupsResult):
      pass
  
  
  class ARN(BaseModel):
      __root__: Annotated[
          str,
          Field(
              regex='^arn:aws:[A-Za-z0-9][A-za-z0-9_/.-]{0,62}:[A-za-z0-9_/.-]{0,63}:[A-za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-za-z0-9_/.-]{0,127}$'
          ),
      ]
  
  
  class AccessPropertyValue(Enum):
      ALLOW = 'ALLOW'
      DENY = 'DENY'
  
  
  class DedicatedTenancyModificationStateEnum(Enum):
      PENDING = 'PENDING'
      COMPLETED = 'COMPLETED'
      FAILED = 'FAILED'
  
  
  class DedicatedTenancySupportResultEnum(Enum):
      ENABLED = 'ENABLED'
      DISABLED = 'DISABLED'
  
  
  class DedicatedTenancyManagementCidrRange(BaseModel):
      __root__: Annotated[
          str,
          Field(
              regex='(^([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.0\\.0)(\\/(16$))$'
          ),
      ]
  
  
  class Timestamp(BaseModel):
      __root__: datetime
  
  
  class WorkspaceErrorCode(BaseModel):
      __root__: str
  
  
  class Description1(WorkspaceErrorCode):
      pass
  
  
  class AccountModification(BaseModel):
      """
      Describes a modification to the configuration of Bring Your Own License (BYOL) for the specified account.
      """
  
      ModificationState: Optional[DedicatedTenancyModificationStateEnum] = None
      DedicatedTenancySupport: Optional[DedicatedTenancySupportResultEnum] = None
      DedicatedTenancyManagementCidrRange: Optional[
          DedicatedTenancyManagementCidrRange
      ] = None
      StartTime: Optional[Timestamp] = None
      ErrorCode: Optional[WorkspaceErrorCode] = None
      ErrorMessage: Optional[Description1] = None
  
  
  class AccountModificationList(BaseModel):
      __root__: List[AccountModification]
  
  
  class Alias(WorkspaceErrorCode):
      pass
  
  
  class Application(Enum):
      Microsoft_Office_2016 = 'Microsoft_Office_2016'
      Microsoft_Office_2019 = 'Microsoft_Office_2019'
  
  
  class ApplicationList(BaseModel):
      __root__: Annotated[List[Application], Field(max_items=5, min_items=1)]
  
  
  class ConnectionAliasId(BaseModel):
      __root__: Annotated[
          str, Field(max_length=68, min_length=13, regex='^wsca-[0-9a-z]{8,63}$')
      ]
  
  
  class NonEmptyString(BaseModel):
      __root__: Annotated[str, Field(min_length=1)]
  
  
  class ConnectionIdentifier(BaseModel):
      __root__: Annotated[str, Field(max_length=20, min_length=1, regex='^[a-zA-Z0-9]+$')]
  
  
  class DirectoryId(BaseModel):
      __root__: Annotated[
          str, Field(max_length=65, min_length=10, regex='^d-[0-9a-f]{8,63}$')
      ]
  
  
  class AssociationStatus(Enum):
      NOT_ASSOCIATED = 'NOT_ASSOCIATED'
      ASSOCIATED_WITH_OWNER_ACCOUNT = 'ASSOCIATED_WITH_OWNER_ACCOUNT'
      ASSOCIATED_WITH_SHARED_ACCOUNT = 'ASSOCIATED_WITH_SHARED_ACCOUNT'
      PENDING_ASSOCIATION = 'PENDING_ASSOCIATION'
      PENDING_DISASSOCIATION = 'PENDING_DISASSOCIATION'
  
  
  class IpGroupId(BaseModel):
      __root__: Annotated[str, Field(regex='wsipg-[0-9a-z]{8,63}$')]
  
  
  class AwsAccount(BaseModel):
      __root__: Annotated[str, Field(regex='^\\d{12}$')]
  
  
  class BooleanObject(BaseModel):
      __root__: bool
  
  
  class BundleId(BaseModel):
      __root__: Annotated[str, Field(regex='^wsb-[0-9a-z]{8,63}$')]
  
  
  class BundleIdList(BaseModel):
      __root__: Annotated[List[BundleId], Field(max_items=25, min_items=1)]
  
  
  class BundleOwner(WorkspaceErrorCode):
      pass
  
  
  class ClientProperties(BaseModel):
      """
      Describes an Amazon WorkSpaces client.
      """
  
      ReconnectEnabled: Optional[DedicatedTenancySupportResultEnum] = None
  
  
  class ClientPropertiesResult(BaseModel):
      """
      Information about the Amazon WorkSpaces client.
      """
  
      ResourceId: Optional[NonEmptyString] = None
      ClientProperties: Optional[ClientProperties] = None
  
  
  class ClientPropertiesList(BaseModel):
      __root__: List[ClientPropertiesResult]
  
  
  class Compute(Enum):
      VALUE = 'VALUE'
      STANDARD = 'STANDARD'
      PERFORMANCE = 'PERFORMANCE'
      POWER = 'POWER'
      GRAPHICS = 'GRAPHICS'
      POWERPRO = 'POWERPRO'
      GRAPHICSPRO = 'GRAPHICSPRO'
  
  
  class ComputeType(BaseModel):
      """
      Describes the compute type of the bundle.
      """
  
      Name: Optional[Compute] = None
  
  
  class ComputerName(WorkspaceErrorCode):
      pass
  
  
  class ConnectionString(BaseModel):
      __root__: Annotated[
          str, Field(max_length=255, min_length=1, regex='^[.0-9a-zA-Z\\-]{1,255}$')
      ]
  
  
  class ConnectionAliasState(Enum):
      CREATING = 'CREATING'
      CREATED = 'CREATED'
      DELETING = 'DELETING'
  
  
  class ConnectionAliasAssociation(BaseModel):
      """
      Describes a connection alias association that is used for cross-Region redirection. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html"> Cross-Region Redirection for Amazon WorkSpaces</a>.
      """
  
      AssociationStatus: Optional[AssociationStatus] = None
      AssociatedAccountId: Optional[AwsAccount] = None
      ResourceId: Optional[NonEmptyString] = None
      ConnectionIdentifier: Optional[ConnectionIdentifier] = None
  
  
  class ConnectionAliasIdList(BaseModel):
      __root__: Annotated[List[ConnectionAliasId], Field(max_items=25, min_items=1)]
  
  
  class ConnectionAliasPermission(BaseModel):
      """
      Describes the permissions for a connection alias. Connection aliases are used for cross-Region redirection. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html"> Cross-Region Redirection for Amazon WorkSpaces</a>.
      """
  
      SharedAccountId: AwsAccount
      AllowAssociation: BooleanObject
  
  
  class ConnectionAliasPermissions(BaseModel):
      __root__: Annotated[
          List[ConnectionAliasPermission], Field(max_items=25, min_items=1)
      ]
  
  
  class ConnectionState(Enum):
      CONNECTED = 'CONNECTED'
      DISCONNECTED = 'DISCONNECTED'
      UNKNOWN = 'UNKNOWN'
  
  
  class WorkspaceImageName(BaseModel):
      __root__: Annotated[
          str, Field(max_length=64, min_length=1, regex='^[a-zA-Z0-9_./()\\\\-]+$')
      ]
  
  
  class WorkspaceImageDescription(BaseModel):
      __root__: Annotated[
          str, Field(max_length=256, min_length=1, regex='^[a-zA-Z0-9_./() -]+$')
      ]
  
  
  class WorkspaceImageId(BaseModel):
      __root__: Annotated[str, Field(regex='wsi-[0-9a-z]{9,63}$')]
  
  
  class Region(BaseModel):
      __root__: Annotated[
          str, Field(max_length=31, min_length=1, regex='^[-0-9a-z]{1,31}$')
      ]
  
  
  class IpGroupName(WorkspaceErrorCode):
      pass
  
  
  class IpGroupDesc(WorkspaceErrorCode):
      pass
  
  
  class WorkspaceBundleName(WorkspaceImageName):
      pass
  
  
  class WorkspaceBundleDescription(BaseModel):
      __root__: Annotated[
          str, Field(max_length=255, min_length=1, regex='^[a-zA-Z0-9_./() -]+$')
      ]
  
  
  class UserStorage(BaseModel):
      """
      Describes the user volume for a WorkSpace bundle.
      """
  
      Capacity: Optional[NonEmptyString] = None
  
  
  class RootStorage(UserStorage):
      """
      Describes the root volume for a WorkSpace bundle.
      """
  
      pass
  
  
  class DedicatedTenancyCidrRangeList(BaseModel):
      __root__: List[DedicatedTenancyManagementCidrRange]
  
  
  class DedicatedTenancySupportEnum(Enum):
      ENABLED = 'ENABLED'
  
  
  class DefaultOu(WorkspaceErrorCode):
      pass
  
  
  class SecurityGroupId(BaseModel):
      __root__: Annotated[
          str,
          Field(max_length=20, min_length=11, regex='^(sg-([0-9a-f]{8}|[0-9a-f]{17}))$'),
      ]
  
  
  class DefaultWorkspaceCreationProperties(BaseModel):
      """
      Describes the default values that are used to create WorkSpaces. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/update-directory-details.html">Update Directory Details for Your WorkSpaces</a>.
      """
  
      EnableWorkDocs: Optional[BooleanObject] = None
      EnableInternetAccess: Optional[BooleanObject] = None
      DefaultOu: Optional[DefaultOu] = None
      CustomSecurityGroupId: Optional[SecurityGroupId] = None
      UserEnabledAsLocalAdministrator: Optional[BooleanObject] = None
      EnableMaintenanceMode: Optional[BooleanObject] = None
  
  
  class TagKeyList(BaseModel):
      __root__: List[NonEmptyString]
  
  
  class PaginationToken(BaseModel):
      __root__: Annotated[str, Field(max_length=2048, min_length=1)]
  
  
  class ResourceIdList(BaseModel):
      __root__: Annotated[List[NonEmptyString], Field(max_items=25, min_items=1)]
  
  
  class Limit(BaseModel):
      __root__: Annotated[int, Field(ge=1.0, le=25.0)]
  
  
  class DirectoryIdList(BaseModel):
      __root__: Annotated[List[DirectoryId], Field(max_items=25, min_items=1)]
  
  
  class WorkspaceImageIdList(BaseModel):
      __root__: Annotated[List[WorkspaceImageId], Field(max_items=25, min_items=1)]
  
  
  class ImageType(Enum):
      OWNED = 'OWNED'
      SHARED = 'SHARED'
  
  
  class WorkspaceId(BaseModel):
      __root__: Annotated[str, Field(regex='^ws-[0-9a-z]{8,63}$')]
  
  
  class WorkspaceIdList(BaseModel):
      __root__: Annotated[List[WorkspaceId], Field(max_items=25, min_items=1)]
  
  
  class UserName(BaseModel):
      __root__: Annotated[str, Field(max_length=63, min_length=1)]
  
  
  class DirectoryName(WorkspaceErrorCode):
      pass
  
  
  class IpAddress(WorkspaceErrorCode):
      pass
  
  
  class DnsIpAddresses(BaseModel):
      __root__: List[IpAddress]
  
  
  class Ec2ImageId(BaseModel):
      __root__: Annotated[str, Field(regex='^ami\\-([a-f0-9]{8}|[a-f0-9]{17})$')]
  
  
  class ErrorType(WorkspaceErrorCode):
      pass
  
  
  class FailedWorkspaceChangeRequest(BaseModel):
      """
      Describes a WorkSpace that could not be rebooted. (<a>RebootWorkspaces</a>), rebuilt (<a>RebuildWorkspaces</a>), restored (<a>RestoreWorkspace</a>), terminated (<a>TerminateWorkspaces</a>), started (<a>StartWorkspaces</a>), or stopped (<a>StopWorkspaces</a>).
      """
  
      WorkspaceId: Optional[WorkspaceId] = None
      ErrorCode: Optional[ErrorType] = None
      ErrorMessage: Optional[Description1] = None
  
  
  class FailedRebootWorkspaceRequests(BaseModel):
      __root__: List[FailedWorkspaceChangeRequest]
  
  
  class FailedRebuildWorkspaceRequests(FailedRebootWorkspaceRequests):
      pass
  
  
  class FailedStartWorkspaceRequests(FailedRebootWorkspaceRequests):
      pass
  
  
  class FailedStopWorkspaceRequests(FailedRebootWorkspaceRequests):
      pass
  
  
  class FailedTerminateWorkspaceRequests(FailedRebootWorkspaceRequests):
      pass
  
  
  class ImagePermission(BaseModel):
      """
      Describes the AWS accounts that have been granted permission to use a shared image. For more information about sharing images, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/share-custom-image.html"> Share or Unshare a Custom WorkSpaces Image</a>.
      """
  
      SharedAccountId: Optional[AwsAccount] = None
  
  
  class WorkspaceImageIngestionProcess(Enum):
      BYOL_REGULAR = 'BYOL_REGULAR'
      BYOL_GRAPHICS = 'BYOL_GRAPHICS'
      BYOL_GRAPHICSPRO = 'BYOL_GRAPHICSPRO'
      BYOL_REGULAR_WSP = 'BYOL_REGULAR_WSP'
  
  
  class IpRule(WorkspaceErrorCode):
      pass
  
  
  class IpRevokedRuleList(BaseModel):
      __root__: List[IpRule]
  
  
  class IpRuleDesc(WorkspaceErrorCode):
      pass
  
  
  class IpRuleItem(BaseModel):
      """
      Describes a rule for an IP access control group.
      """
  
      ipRule: Optional[IpRule] = None
      ruleDesc: Optional[IpRuleDesc] = None
  
  
  class ManagementCidrRangeConstraint(BaseModel):
      __root__: Annotated[
          str,
          Field(
              regex='^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(3[0-2]|[1-2][0-9]|[0-9]))$'
          ),
      ]
  
  
  class ManagementCidrRangeMaxResults(BaseModel):
      __root__: Annotated[int, Field(ge=1.0, le=5.0)]
  
  
  class ModificationResourceEnum(Enum):
      ROOT_VOLUME = 'ROOT_VOLUME'
      USER_VOLUME = 'USER_VOLUME'
      COMPUTE_TYPE = 'COMPUTE_TYPE'
  
  
  class ModificationStateEnum(Enum):
      UPDATE_INITIATED = 'UPDATE_INITIATED'
      UPDATE_IN_PROGRESS = 'UPDATE_IN_PROGRESS'
  
  
  class ModificationState1(BaseModel):
      """
      Describes a WorkSpace modification.
      """
  
      Resource: Optional[ModificationResourceEnum] = None
      State: Optional[ModificationStateEnum] = None
  
  
  class ModificationStateList(BaseModel):
      __root__: List[ModificationState1]
  
  
  class SelfservicePermissions(BaseModel):
      """
      Describes the self-service permissions for a directory. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/enable-user-self-service-workspace-management.html">Enable Self-Service WorkSpace Management Capabilities for Your Users</a>.
      """
  
      RestartWorkspace: Optional[DedicatedTenancySupportResultEnum] = None
      IncreaseVolumeSize: Optional[DedicatedTenancySupportResultEnum] = None
      ChangeComputeType: Optional[DedicatedTenancySupportResultEnum] = None
      SwitchRunningMode: Optional[DedicatedTenancySupportResultEnum] = None
      RebuildWorkspace: Optional[DedicatedTenancySupportResultEnum] = None
  
  
  class WorkspaceAccessProperties(BaseModel):
      """
      The device types and operating systems that can be used to access a WorkSpace. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-network-requirements.html">Amazon WorkSpaces Client Network Requirements</a>.
      """
  
      DeviceTypeWindows: Optional[AccessPropertyValue] = None
      DeviceTypeOsx: Optional[AccessPropertyValue] = None
      DeviceTypeWeb: Optional[AccessPropertyValue] = None
      DeviceTypeIos: Optional[AccessPropertyValue] = None
      DeviceTypeAndroid: Optional[AccessPropertyValue] = None
      DeviceTypeChromeOs: Optional[AccessPropertyValue] = None
      DeviceTypeZeroClient: Optional[AccessPropertyValue] = None
      DeviceTypeLinux: Optional[AccessPropertyValue] = None
  
  
  class WorkspaceCreationProperties(DefaultWorkspaceCreationProperties):
      """
      Describes the default properties that are used for creating WorkSpaces. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/update-directory-details.html">Update Directory Details for Your WorkSpaces</a>.
      """
  
      pass
  
  
  class TargetWorkspaceState(Enum):
      AVAILABLE = 'AVAILABLE'
      ADMIN_MAINTENANCE = 'ADMIN_MAINTENANCE'
  
  
  class OperatingSystemType(Enum):
      WINDOWS = 'WINDOWS'
      LINUX = 'LINUX'
  
  
  class OperatingSystem(BaseModel):
      """
      The operating system that the image is running.
      """
  
      Type: Optional[OperatingSystemType] = None
  
  
  class RebootRequest(BaseModel):
      """
      Describes the information used to reboot a WorkSpace.
      """
  
      WorkspaceId: WorkspaceId
  
  
  class RebootWorkspaceRequests(BaseModel):
      __root__: Annotated[List[RebootRequest], Field(max_items=25, min_items=1)]
  
  
  class RebuildRequest(RebootRequest):
      """
      Describes the information used to rebuild a WorkSpace.
      """
  
      pass
  
  
  class RebuildWorkspaceRequests(BaseModel):
      __root__: Annotated[List[RebuildRequest], Field(max_items=1, min_items=1)]
  
  
  class Tenancy(Enum):
      DEDICATED = 'DEDICATED'
      SHARED = 'SHARED'
  
  
  class RegistrationCode(BaseModel):
      __root__: Annotated[str, Field(max_length=20, min_length=1)]
  
  
  class RootVolumeSizeGib(BaseModel):
      __root__: int
  
  
  class RunningMode(Enum):
      AUTO_STOP = 'AUTO_STOP'
      ALWAYS_ON = 'ALWAYS_ON'
  
  
  class RunningModeAutoStopTimeoutInMinutes(RootVolumeSizeGib):
      pass
  
  
  class Snapshot(BaseModel):
      """
      Describes a snapshot.
      """
  
      SnapshotTime: Optional[Timestamp] = None
  
  
  class StartRequest(BaseModel):
      """
      Information used to start a WorkSpace.
      """
  
      WorkspaceId: Optional[WorkspaceId] = None
  
  
  class StartWorkspaceRequests(BaseModel):
      __root__: Annotated[List[StartRequest], Field(max_items=25, min_items=1)]
  
  
  class StopRequest(StartRequest):
      """
      Describes the information used to stop a WorkSpace.
      """
  
      pass
  
  
  class StopWorkspaceRequests(BaseModel):
      __root__: Annotated[List[StopRequest], Field(max_items=25, min_items=1)]
  
  
  class SubnetId(BaseModel):
      __root__: Annotated[
          str,
          Field(
              max_length=24, min_length=15, regex='^(subnet-([0-9a-f]{8}|[0-9a-f]{17}))$'
          ),
      ]
  
  
  class TagKey(BaseModel):
      __root__: Annotated[str, Field(max_length=127, min_length=1)]
  
  
  class TagValue(BaseModel):
      __root__: Annotated[str, Field(max_length=255)]
  
  
  class Tag(BaseModel):
      """
      Describes a tag.
      """
  
      Key: TagKey
      Value: Optional[TagValue] = None
  
  
  class TerminateRequest(RebootRequest):
      """
      Describes the information used to terminate a WorkSpace.
      """
  
      pass
  
  
  class TerminateWorkspaceRequests(BaseModel):
      __root__: Annotated[List[TerminateRequest], Field(max_items=25, min_items=1)]
  
  
  class UserVolumeSizeGib(RootVolumeSizeGib):
      pass
  
  
  class VolumeEncryptionKey(WorkspaceErrorCode):
      pass
  
  
  class WorkspaceState1(Enum):
      PENDING = 'PENDING'
      AVAILABLE = 'AVAILABLE'
      IMPAIRED = 'IMPAIRED'
      UNHEALTHY = 'UNHEALTHY'
      REBOOTING = 'REBOOTING'
      STARTING = 'STARTING'
      REBUILDING = 'REBUILDING'
      RESTORING = 'RESTORING'
      MAINTENANCE = 'MAINTENANCE'
      ADMIN_MAINTENANCE = 'ADMIN_MAINTENANCE'
      TERMINATING = 'TERMINATING'
      TERMINATED = 'TERMINATED'
      SUSPENDED = 'SUSPENDED'
      UPDATING = 'UPDATING'
      STOPPING = 'STOPPING'
      STOPPED = 'STOPPED'
      ERROR = 'ERROR'
  
  
  class WorkspaceConnectionStatus(BaseModel):
      """
      Describes the connection status of a WorkSpace.
      """
  
      WorkspaceId: Optional[WorkspaceId] = None
      ConnectionState: Optional[ConnectionState] = None
      ConnectionStateCheckTimestamp: Optional[Timestamp] = None
      LastKnownUserConnectionTimestamp: Optional[Timestamp] = None
  
  
  class WorkspaceDirectoryType(Enum):
      SIMPLE_AD = 'SIMPLE_AD'
      AD_CONNECTOR = 'AD_CONNECTOR'
  
  
  class WorkspaceDirectoryState(Enum):
      REGISTERING = 'REGISTERING'
      REGISTERED = 'REGISTERED'
      DEREGISTERING = 'DEREGISTERING'
      DEREGISTERED = 'DEREGISTERED'
      ERROR = 'ERROR'
  
  
  class WorkspaceImageState(Enum):
      AVAILABLE = 'AVAILABLE'
      PENDING = 'PENDING'
      ERROR = 'ERROR'
  
  
  class WorkspaceImageRequiredTenancy(Enum):
      DEFAULT = 'DEFAULT'
      DEDICATED = 'DEDICATED'
  
  
  class WorkspaceImageErrorCode(WorkspaceErrorCode):
      pass
  
  
  class WorkspaceImage(BaseModel):
      """
      Describes a WorkSpace image.
      """
  
      ImageId: Optional[WorkspaceImageId] = None
      Name: Optional[WorkspaceImageName] = None
      Description: Optional[WorkspaceImageDescription] = None
      OperatingSystem: Optional[OperatingSystem] = None
      State: Optional[WorkspaceImageState] = None
      RequiredTenancy: Optional[WorkspaceImageRequiredTenancy] = None
      ErrorCode: Optional[WorkspaceImageErrorCode] = None
      ErrorMessage: Optional[Description1] = None
      Created: Optional[Timestamp] = None
      OwnerAccountId: Optional[AwsAccount] = None
  
  
  class AssociateConnectionAliasResult(BaseModel):
      ConnectionIdentifier: Optional[ConnectionIdentifier] = None
  
  
  class AssociateConnectionAliasRequest(BaseModel):
      AliasId: ConnectionAliasId
      ResourceId: NonEmptyString
  
  
  class CopyWorkspaceImageResult(BaseModel):
      ImageId: Optional[WorkspaceImageId] = None
  
  
  class CreateConnectionAliasResult(BaseModel):
      AliasId: Optional[ConnectionAliasId] = None
  
  
  class CreateIpGroupResult(BaseModel):
      GroupId: Optional[IpGroupId] = None
  
  
  class DeleteConnectionAliasRequest(BaseModel):
      AliasId: ConnectionAliasId
  
  
  class DeleteIpGroupRequest(BaseModel):
      GroupId: IpGroupId
  
  
  class DeleteTagsRequest(BaseModel):
      ResourceId: NonEmptyString
      TagKeys: TagKeyList
  
  
  class DeleteWorkspaceBundleRequest(BaseModel):
      BundleId: Optional[BundleId] = None
  
  
  class DeleteWorkspaceImageRequest(BaseModel):
      ImageId: WorkspaceImageId
  
  
  class DeregisterWorkspaceDirectoryRequest(BaseModel):
      DirectoryId: DirectoryId
  
  
  class DescribeAccountResult(BaseModel):
      DedicatedTenancySupport: Optional[DedicatedTenancySupportResultEnum] = None
      DedicatedTenancyManagementCidrRange: Optional[
          DedicatedTenancyManagementCidrRange
      ] = None
  
  
  class DescribeAccountModificationsResult(BaseModel):
      AccountModifications: Optional[AccountModificationList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeAccountModificationsRequest(BaseModel):
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeClientPropertiesResult(BaseModel):
      ClientPropertiesList: Optional[ClientPropertiesList] = None
  
  
  class DescribeClientPropertiesRequest(BaseModel):
      ResourceIds: ResourceIdList
  
  
  class DescribeConnectionAliasPermissionsResult(BaseModel):
      AliasId: Optional[ConnectionAliasId] = None
      ConnectionAliasPermissions: Optional[ConnectionAliasPermissions] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeConnectionAliasPermissionsRequest(BaseModel):
      AliasId: ConnectionAliasId
      NextToken: Optional[PaginationToken] = None
      MaxResults: Optional[Limit] = None
  
  
  class DescribeConnectionAliasesRequest(BaseModel):
      AliasIds: Optional[ConnectionAliasIdList] = None
      ResourceId: Optional[NonEmptyString] = None
      Limit: Optional[Limit] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeTagsRequest(BaseModel):
      ResourceId: NonEmptyString
  
  
  class DescribeWorkspaceBundlesRequest(BaseModel):
      BundleIds: Optional[BundleIdList] = None
      Owner: Optional[BundleOwner] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeWorkspaceDirectoriesRequest(BaseModel):
      DirectoryIds: Optional[DirectoryIdList] = None
      Limit: Optional[Limit] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeWorkspaceImagePermissionsRequest(BaseModel):
      ImageId: WorkspaceImageId
      NextToken: Optional[PaginationToken] = None
      MaxResults: Optional[Limit] = None
  
  
  class DescribeWorkspaceImagesRequest(BaseModel):
      ImageIds: Optional[WorkspaceImageIdList] = None
      ImageType: Optional[ImageType] = None
      NextToken: Optional[PaginationToken] = None
      MaxResults: Optional[Limit] = None
  
  
  class DescribeWorkspaceSnapshotsRequest(BaseModel):
      WorkspaceId: WorkspaceId
  
  
  class DescribeWorkspacesRequest(BaseModel):
      WorkspaceIds: Optional[WorkspaceIdList] = None
      DirectoryId: Optional[DirectoryId] = None
      UserName: Optional[UserName] = None
      BundleId: Optional[BundleId] = None
      Limit: Optional[Limit] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeWorkspacesConnectionStatusRequest(BaseModel):
      WorkspaceIds: Optional[WorkspaceIdList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DisassociateConnectionAliasRequest(BaseModel):
      AliasId: ConnectionAliasId
  
  
  class ImportWorkspaceImageResult(CopyWorkspaceImageResult):
      pass
  
  
  class ListAvailableManagementCidrRangesResult(BaseModel):
      ManagementCidrRanges: Optional[DedicatedTenancyCidrRangeList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class ListAvailableManagementCidrRangesRequest(BaseModel):
      ManagementCidrRangeConstraint: ManagementCidrRangeConstraint
      MaxResults: Optional[ManagementCidrRangeMaxResults] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class MigrateWorkspaceResult(BaseModel):
      SourceWorkspaceId: Optional[WorkspaceId] = None
      TargetWorkspaceId: Optional[WorkspaceId] = None
  
  
  class MigrateWorkspaceRequest(BaseModel):
      SourceWorkspaceId: WorkspaceId
      BundleId: BundleId
  
  
  class ModifyAccountRequest(BaseModel):
      DedicatedTenancySupport: Optional[DedicatedTenancySupportEnum] = None
      DedicatedTenancyManagementCidrRange: Optional[
          DedicatedTenancyManagementCidrRange
      ] = None
  
  
  class ModifyClientPropertiesRequest(BaseModel):
      ResourceId: NonEmptyString
      ClientProperties: ClientProperties
  
  
  class ModifySelfservicePermissionsRequest(BaseModel):
      ResourceId: DirectoryId
      SelfservicePermissions: SelfservicePermissions
  
  
  class ModifyWorkspaceAccessPropertiesRequest(BaseModel):
      ResourceId: DirectoryId
      WorkspaceAccessProperties: WorkspaceAccessProperties
  
  
  class ModifyWorkspaceCreationPropertiesRequest(BaseModel):
      ResourceId: DirectoryId
      WorkspaceCreationProperties: WorkspaceCreationProperties
  
  
  class ModifyWorkspaceStateRequest(BaseModel):
      WorkspaceId: WorkspaceId
      WorkspaceState: TargetWorkspaceState
  
  
  class RebootWorkspacesResult(BaseModel):
      FailedRequests: Optional[FailedRebootWorkspaceRequests] = None
  
  
  class RebootWorkspacesRequest(BaseModel):
      RebootWorkspaceRequests: RebootWorkspaceRequests
  
  
  class RebuildWorkspacesResult(BaseModel):
      FailedRequests: Optional[FailedRebuildWorkspaceRequests] = None
  
  
  class RebuildWorkspacesRequest(BaseModel):
      RebuildWorkspaceRequests: RebuildWorkspaceRequests
  
  
  class RestoreWorkspaceRequest(BaseModel):
      WorkspaceId: WorkspaceId
  
  
  class RevokeIpRulesRequest(BaseModel):
      GroupId: IpGroupId
      UserRules: IpRevokedRuleList
  
  
  class StartWorkspacesResult(BaseModel):
      FailedRequests: Optional[FailedStartWorkspaceRequests] = None
  
  
  class StartWorkspacesRequest(BaseModel):
      StartWorkspaceRequests: StartWorkspaceRequests
  
  
  class StopWorkspacesResult(BaseModel):
      FailedRequests: Optional[FailedStopWorkspaceRequests] = None
  
  
  class StopWorkspacesRequest(BaseModel):
      StopWorkspaceRequests: StopWorkspaceRequests
  
  
  class TerminateWorkspacesResult(BaseModel):
      FailedRequests: Optional[FailedTerminateWorkspaceRequests] = None
  
  
  class TerminateWorkspacesRequest(BaseModel):
      TerminateWorkspaceRequests: TerminateWorkspaceRequests
  
  
  class UpdateConnectionAliasPermissionRequest(BaseModel):
      AliasId: ConnectionAliasId
      ConnectionAliasPermission: ConnectionAliasPermission
  
  
  class UpdateWorkspaceBundleRequest(BaseModel):
      BundleId: Optional[BundleId] = None
      ImageId: Optional[WorkspaceImageId] = None
  
  
  class UpdateWorkspaceImagePermissionRequest(BaseModel):
      ImageId: WorkspaceImageId
      AllowCopyImage: BooleanObject
      SharedAccountId: AwsAccount
  
  
  class IpGroupIdList(BaseModel):
      __root__: List[IpGroupId]
  
  
  class IpRuleList(BaseModel):
      __root__: List[IpRuleItem]
  
  
  class WorkspaceBundle(BaseModel):
      """
      Describes a WorkSpace bundle.
      """
  
      BundleId: Optional[BundleId] = None
      Name: Optional[NonEmptyString] = None
      Owner: Optional[BundleOwner] = None
      Description: Optional[Description1] = None
      ImageId: Optional[WorkspaceImageId] = None
      RootStorage: Optional[RootStorage] = None
      UserStorage: Optional[UserStorage] = None
      ComputeType: Optional[ComputeType] = None
      LastUpdatedTime: Optional[Timestamp] = None
      CreationTime: Optional[Timestamp] = None
  
  
  class BundleList(BaseModel):
      __root__: List[WorkspaceBundle]
  
  
  class ConnectionAliasAssociationList(BaseModel):
      __root__: Annotated[
          List[ConnectionAliasAssociation], Field(max_items=25, min_items=1)
      ]
  
  
  class ConnectionAlias(BaseModel):
      """
      Describes a connection alias. Connection aliases are used for cross-Region redirection. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/cross-region-redirection.html"> Cross-Region Redirection for Amazon WorkSpaces</a>.
      """
  
      ConnectionString: Optional[ConnectionString] = None
      AliasId: Optional[ConnectionAliasId] = None
      State: Optional[ConnectionAliasState] = None
      OwnerAccountId: Optional[AwsAccount] = None
      Associations: Optional[ConnectionAliasAssociationList] = None
  
  
  class ConnectionAliasList(BaseModel):
      __root__: Annotated[List[ConnectionAlias], Field(max_items=25, min_items=1)]
  
  
  class TagList(BaseModel):
      __root__: List[Tag]
  
  
  class ImagePermissions(BaseModel):
      __root__: List[ImagePermission]
  
  
  class WorkspaceImageList(BaseModel):
      __root__: List[WorkspaceImage]
  
  
  class SnapshotList(BaseModel):
      __root__: List[Snapshot]
  
  
  class WorkspaceConnectionStatusList(BaseModel):
      __root__: List[WorkspaceConnectionStatus]
  
  
  class WorkspaceProperties(BaseModel):
      """
      Describes a WorkSpace.
      """
  
      RunningMode: Optional[RunningMode] = None
      RunningModeAutoStopTimeoutInMinutes: Optional[
          RunningModeAutoStopTimeoutInMinutes
      ] = None
      RootVolumeSizeGib: Optional[RootVolumeSizeGib] = None
      UserVolumeSizeGib: Optional[UserVolumeSizeGib] = None
      ComputeTypeName: Optional[Compute] = None
  
  
  class SubnetIds(BaseModel):
      __root__: Annotated[List[SubnetId], Field(max_items=2)]
  
  
  class Workspace(BaseModel):
      """
      Describes a WorkSpace.
      """
  
      WorkspaceId: Optional[WorkspaceId] = None
      DirectoryId: Optional[DirectoryId] = None
      UserName: Optional[UserName] = None
      IpAddress: Optional[IpAddress] = None
      State: Optional[WorkspaceState1] = None
      BundleId: Optional[BundleId] = None
      SubnetId: Optional[SubnetId] = None
      ErrorMessage: Optional[Description1] = None
      ErrorCode: Optional[WorkspaceErrorCode] = None
      ComputerName: Optional[ComputerName] = None
      VolumeEncryptionKey: Optional[VolumeEncryptionKey] = None
      UserVolumeEncryptionEnabled: Optional[BooleanObject] = None
      RootVolumeEncryptionEnabled: Optional[BooleanObject] = None
      WorkspaceProperties: Optional[WorkspaceProperties] = None
      ModificationStates: Optional[ModificationStateList] = None
  
  
  class WorkspacesIpGroup(BaseModel):
      """
      Describes an IP access control group.
      """
  
      groupId: Optional[IpGroupId] = None
      groupName: Optional[IpGroupName] = None
      groupDesc: Optional[IpGroupDesc] = None
      userRules: Optional[IpRuleList] = None
  
  
  class AssociateIpGroupsRequest(BaseModel):
      DirectoryId: DirectoryId
      GroupIds: IpGroupIdList
  
  
  class AuthorizeIpRulesRequest(BaseModel):
      GroupId: IpGroupId
      UserRules: IpRuleList
  
  
  class CopyWorkspaceImageRequest(BaseModel):
      Name: WorkspaceImageName
      Description: Optional[WorkspaceImageDescription] = None
      SourceImageId: WorkspaceImageId
      SourceRegion: Region
      Tags: Optional[TagList] = None
  
  
  class CreateConnectionAliasRequest(BaseModel):
      ConnectionString: ConnectionString
      Tags: Optional[TagList] = None
  
  
  class CreateIpGroupRequest(BaseModel):
      GroupName: IpGroupName
      GroupDesc: Optional[IpGroupDesc] = None
      UserRules: Optional[IpRuleList] = None
      Tags: Optional[TagList] = None
  
  
  class CreateTagsRequest(BaseModel):
      ResourceId: NonEmptyString
      Tags: TagList
  
  
  class CreateWorkspaceBundleResult(BaseModel):
      WorkspaceBundle: Optional[WorkspaceBundle] = None
  
  
  class CreateWorkspaceBundleRequest(BaseModel):
      BundleName: WorkspaceBundleName
      BundleDescription: WorkspaceBundleDescription
      ImageId: WorkspaceImageId
      ComputeType: ComputeType
      UserStorage: UserStorage
      RootStorage: Optional[RootStorage] = None
      Tags: Optional[TagList] = None
  
  
  class DescribeConnectionAliasesResult(BaseModel):
      ConnectionAliases: Optional[ConnectionAliasList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeIpGroupsRequest(BaseModel):
      GroupIds: Optional[IpGroupIdList] = None
      NextToken: Optional[PaginationToken] = None
      MaxResults: Optional[Limit] = None
  
  
  class DescribeTagsResult(BaseModel):
      TagList: Optional[TagList] = None
  
  
  class DescribeWorkspaceBundlesResult(BaseModel):
      Bundles: Optional[BundleList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeWorkspaceImagePermissionsResult(BaseModel):
      ImageId: Optional[WorkspaceImageId] = None
      ImagePermissions: Optional[ImagePermissions] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeWorkspaceImagesResult(BaseModel):
      Images: Optional[WorkspaceImageList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeWorkspaceSnapshotsResult(BaseModel):
      RebuildSnapshots: Optional[SnapshotList] = None
      RestoreSnapshots: Optional[SnapshotList] = None
  
  
  class DescribeWorkspacesConnectionStatusResult(BaseModel):
      WorkspacesConnectionStatus: Optional[WorkspaceConnectionStatusList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DisassociateIpGroupsRequest(BaseModel):
      DirectoryId: DirectoryId
      GroupIds: IpGroupIdList
  
  
  class ImportWorkspaceImageRequest(BaseModel):
      Ec2ImageId: Ec2ImageId
      IngestionProcess: WorkspaceImageIngestionProcess
      ImageName: WorkspaceImageName
      ImageDescription: WorkspaceImageDescription
      Tags: Optional[TagList] = None
      Applications: Optional[ApplicationList] = None
  
  
  class ModifyWorkspacePropertiesRequest(BaseModel):
      WorkspaceId: WorkspaceId
      WorkspaceProperties: WorkspaceProperties
  
  
  class RegisterWorkspaceDirectoryRequest(BaseModel):
      DirectoryId: DirectoryId
      SubnetIds: Optional[SubnetIds] = None
      EnableWorkDocs: BooleanObject
      EnableSelfService: Optional[BooleanObject] = None
      Tenancy: Optional[Tenancy] = None
      Tags: Optional[TagList] = None
  
  
  class UpdateRulesOfIpGroupRequest(BaseModel):
      GroupId: IpGroupId
      UserRules: IpRuleList
  
  
  class WorkspaceList(BaseModel):
      __root__: List[Workspace]
  
  
  class WorkspacesIpGroupsList(BaseModel):
      __root__: List[WorkspacesIpGroup]
  
  
  class WorkspaceDirectory(BaseModel):
      """
      Describes a directory that is used with Amazon WorkSpaces.
      """
  
      DirectoryId: Optional[DirectoryId] = None
      Alias: Optional[Alias] = None
      DirectoryName: Optional[DirectoryName] = None
      RegistrationCode: Optional[RegistrationCode] = None
      SubnetIds: Optional[SubnetIds] = None
      DnsIpAddresses: Optional[DnsIpAddresses] = None
      CustomerUserName: Optional[UserName] = None
      IamRoleId: Optional[ARN] = None
      DirectoryType: Optional[WorkspaceDirectoryType] = None
      WorkspaceSecurityGroupId: Optional[SecurityGroupId] = None
      State: Optional[WorkspaceDirectoryState] = None
      WorkspaceCreationProperties: Optional[DefaultWorkspaceCreationProperties] = None
      ipGroupIds: Optional[IpGroupIdList] = None
      WorkspaceAccessProperties: Optional[WorkspaceAccessProperties] = None
      Tenancy: Optional[Tenancy] = None
      SelfservicePermissions: Optional[SelfservicePermissions] = None
  
  
  class WorkspaceRequest(BaseModel):
      """
      Describes the information used to create a WorkSpace.
      """
  
      DirectoryId: DirectoryId
      UserName: UserName
      BundleId: BundleId
      VolumeEncryptionKey: Optional[VolumeEncryptionKey] = None
      UserVolumeEncryptionEnabled: Optional[BooleanObject] = None
      RootVolumeEncryptionEnabled: Optional[BooleanObject] = None
      WorkspaceProperties: Optional[WorkspaceProperties] = None
      Tags: Optional[TagList] = None
  
  
  class FailedCreateWorkspaceRequest(BaseModel):
      """
      Describes a WorkSpace that cannot be created.
      """
  
      WorkspaceRequest: Optional[WorkspaceRequest] = None
      ErrorCode: Optional[ErrorType] = None
      ErrorMessage: Optional[Description1] = None
  
  
  class DescribeIpGroupsResult(BaseModel):
      Result: Optional[WorkspacesIpGroupsList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class DescribeWorkspacesResult(BaseModel):
      Workspaces: Optional[WorkspaceList] = None
      NextToken: Optional[PaginationToken] = None
  
  
  class WorkspaceRequestList(BaseModel):
      __root__: Annotated[List[WorkspaceRequest], Field(max_items=25, min_items=1)]
  
  
  class FailedCreateWorkspaceRequests(BaseModel):
      __root__: List[FailedCreateWorkspaceRequest]
  
  
  class DirectoryList(BaseModel):
      __root__: List[WorkspaceDirectory]
  
  
  class CreateWorkspacesResult(BaseModel):
      FailedRequests: Optional[FailedCreateWorkspaceRequests] = None
      PendingRequests: Optional[WorkspaceList] = None
  
  
  class CreateWorkspacesRequest(BaseModel):
      Workspaces: WorkspaceRequestList
  
  
  class DescribeWorkspaceDirectoriesResult(BaseModel):
      Directories: Optional[DirectoryList] = None
      NextToken: Optional[PaginationToken] = None
  