# generated by datamodel-codegen:
#   filename:  openapi.yaml
#   timestamp: 2021-12-31T02:48:57+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 InsufficientPrivilegesException(BaseModel):
    __root__: Any


class ElasticBeanstalkServiceException(InsufficientPrivilegesException):
    pass


class ManagedActionInvalidStateException(InsufficientPrivilegesException):
    pass


class VersionLabel(BaseModel):
    __root__: Annotated[str, Field(max_length=100, min_length=1)]


class TooManyEnvironmentsException(InsufficientPrivilegesException):
    pass


class String(BaseModel):
    __root__: str


class TooManyApplicationsException(InsufficientPrivilegesException):
    pass


class SourceType(Enum):
    Git = 'Git'
    Zip = 'Zip'


class SourceRepository(Enum):
    CodeCommit = 'CodeCommit'
    S3 = 'S3'


class SourceLocation(BaseModel):
    __root__: Annotated[str, Field(max_length=255, min_length=3, regex='.+/.+')]


class S3Bucket(BaseModel):
    __root__: Annotated[str, Field(max_length=255)]


class S3Key(BaseModel):
    __root__: Annotated[str, Field(max_length=1024)]


class NonEmptyString(BaseModel):
    __root__: Annotated[str, Field(regex='.*\\S.*')]


class ComputeType(Enum):
    BUILD_GENERAL1_SMALL = 'BUILD_GENERAL1_SMALL'
    BUILD_GENERAL1_MEDIUM = 'BUILD_GENERAL1_MEDIUM'
    BUILD_GENERAL1_LARGE = 'BUILD_GENERAL1_LARGE'


class BoxedInt(BaseModel):
    __root__: int


class TooManyApplicationVersionsException(InsufficientPrivilegesException):
    pass


class S3LocationNotInServiceRegionException(InsufficientPrivilegesException):
    pass


class CodeBuildNotInServiceRegionException(InsufficientPrivilegesException):
    pass


class ApplicationName(VersionLabel):
    pass


class ConfigurationTemplateName(VersionLabel):
    pass


class TooManyBucketsException(InsufficientPrivilegesException):
    pass


class TooManyConfigurationTemplatesException(InsufficientPrivilegesException):
    pass


class TooManyPlatformsException(InsufficientPrivilegesException):
    pass


class CreateStorageLocationResultMessage(BaseModel):
    """
    Results of a <a>CreateStorageLocationResult</a> call.
    """

    S3Bucket: Optional[S3Bucket] = None


class S3SubscriptionRequiredException(InsufficientPrivilegesException):
    pass


class OperationInProgressException(InsufficientPrivilegesException):
    pass


class SourceBundleDeletionException(InsufficientPrivilegesException):
    pass


class PlatformVersionStillReferencedException(InsufficientPrivilegesException):
    pass


class EnvironmentHealthAttribute(Enum):
    Status = 'Status'
    Color = 'Color'
    Causes = 'Causes'
    ApplicationMetrics = 'ApplicationMetrics'
    InstancesHealth = 'InstancesHealth'
    All = 'All'
    HealthStatus = 'HealthStatus'
    RefreshedAt = 'RefreshedAt'


class InvalidRequestException(InsufficientPrivilegesException):
    pass


class EnvironmentId(String):
    pass


class EnvironmentName(BaseModel):
    __root__: Annotated[str, Field(max_length=40, min_length=4)]


class InstancesHealthAttribute(Enum):
    HealthStatus = 'HealthStatus'
    Color = 'Color'
    Causes = 'Causes'
    ApplicationMetrics = 'ApplicationMetrics'
    RefreshedAt = 'RefreshedAt'
    LaunchedAt = 'LaunchedAt'
    System = 'System'
    Deployment = 'Deployment'
    AvailabilityZone = 'AvailabilityZone'
    InstanceType = 'InstanceType'
    All = 'All'


class ResourceNotFoundException(InsufficientPrivilegesException):
    pass


class ResourceTypeNotSupportedException(InsufficientPrivilegesException):
    pass


class TagKey(BaseModel):
    __root__: Annotated[str, Field(max_length=128, min_length=1)]


class TooManyTagsException(InsufficientPrivilegesException):
    pass


class ARN(String):
    pass


class AbortEnvironmentUpdateMessage(BaseModel):
    """
    <p/>
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None


class AbortableOperationInProgress(BaseModel):
    __root__: bool


class ActionHistoryStatus(Enum):
    Completed = 'Completed'
    Failed = 'Failed'
    Unknown = 'Unknown'


class ActionStatus(Enum):
    Scheduled = 'Scheduled'
    Pending = 'Pending'
    Running = 'Running'
    Unknown = 'Unknown'


class ActionType(Enum):
    InstanceRefresh = 'InstanceRefresh'
    PlatformUpdate = 'PlatformUpdate'
    Unknown = 'Unknown'


class ApplicationArn(String):
    pass


class Description(BaseModel):
    __root__: Annotated[str, Field(max_length=200)]


class CreationDate(BaseModel):
    __root__: datetime


class UpdateDate(CreationDate):
    pass


class VersionLabelsList(BaseModel):
    __root__: List[VersionLabel]


class ConfigurationTemplateNamesList(BaseModel):
    __root__: List[ConfigurationTemplateName]


class NullableInteger(BoxedInt):
    pass


class RequestCount(BoxedInt):
    pass


class StatusCodes(BaseModel):
    """
    Represents the percentage of requests over the last 10 seconds that resulted in each type of status code response. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">Status Code Definitions</a>.
    """

    Status2xx: Optional[NullableInteger] = None
    Status3xx: Optional[NullableInteger] = None
    Status4xx: Optional[NullableInteger] = None
    Status5xx: Optional[NullableInteger] = None


class ApplicationNamesList(BaseModel):
    __root__: List[ApplicationName]


class ApplicationVersionArn(String):
    pass


class SourceBuildInformation(BaseModel):
    """
    Location of the source code for an application version.
    """

    SourceType: SourceType
    SourceRepository: SourceRepository
    SourceLocation: SourceLocation


class S3Location(BaseModel):
    """
    The bucket and key of an item stored in Amazon S3.
    """

    S3Bucket: Optional[S3Bucket] = None
    S3Key: Optional[S3Key] = None


class ApplicationVersionStatus(Enum):
    Processed = 'Processed'
    Unprocessed = 'Unprocessed'
    Failed = 'Failed'
    Processing = 'Processing'
    Building = 'Building'


class ApplicationVersionDescription(BaseModel):
    """
    Describes the properties of an application version.
    """

    ApplicationVersionArn: Optional[ApplicationVersionArn] = None
    ApplicationName: Optional[ApplicationName] = None
    Description: Optional[Description] = None
    VersionLabel: Optional[VersionLabel] = None
    SourceBuildInformation: Optional[SourceBuildInformation] = None
    BuildArn: Optional[String] = None
    SourceBundle: Optional[S3Location] = None
    DateCreated: Optional[CreationDate] = None
    DateUpdated: Optional[UpdateDate] = None
    Status: Optional[ApplicationVersionStatus] = None


class ApplicationVersionDescriptionList(BaseModel):
    __root__: List[ApplicationVersionDescription]


class Token(String):
    pass


class ApplicationVersionProccess(AbortableOperationInProgress):
    pass


class ApplyEnvironmentManagedActionRequest(BaseModel):
    """
    Request to execute a scheduled managed action immediately.
    """

    EnvironmentName: Optional[String] = None
    EnvironmentId: Optional[String] = None
    ActionId: String


class OperationsRole(BaseModel):
    __root__: Annotated[str, Field(max_length=256, min_length=1)]


class AssociateEnvironmentOperationsRoleMessage(BaseModel):
    """
    Request to add or change the operations role used by an environment.
    """

    EnvironmentName: EnvironmentName
    OperationsRole: OperationsRole


class AutoCreateApplication(AbortableOperationInProgress):
    pass


class ResourceId(String):
    pass


class AutoScalingGroup(BaseModel):
    """
    Describes an Auto Scaling launch configuration.
    """

    Name: Optional[ResourceId] = None


class AutoScalingGroupList(BaseModel):
    __root__: List[AutoScalingGroup]


class SolutionStackName(String):
    pass


class AvailableSolutionStackNamesList(BaseModel):
    __root__: List[SolutionStackName]


class BoxedBoolean(AbortableOperationInProgress):
    pass


class BranchName(String):
    pass


class BranchOrder(BoxedInt):
    pass


class BuildConfiguration(BaseModel):
    """
    Settings for an AWS CodeBuild build.
    """

    ArtifactName: Optional[String] = None
    CodeBuildServiceRole: NonEmptyString
    ComputeType: Optional[ComputeType] = None
    Image: NonEmptyString
    TimeoutInMinutes: Optional[BoxedInt] = None


class Builder(BaseModel):
    """
    The builder used to build the custom platform.
    """

    ARN: Optional[ARN] = None


class NullableDouble(BaseModel):
    __root__: float


class CPUUtilization(BaseModel):
    """
    CPU utilization metrics for an instance.
    """

    User: Optional[NullableDouble] = None
    Nice: Optional[NullableDouble] = None
    System: Optional[NullableDouble] = None
    Idle: Optional[NullableDouble] = None
    IOWait: Optional[NullableDouble] = None
    IRQ: Optional[NullableDouble] = None
    SoftIRQ: Optional[NullableDouble] = None
    Privileged: Optional[NullableDouble] = None


class Cause(BaseModel):
    __root__: Annotated[str, Field(max_length=255, min_length=1)]


class Causes(BaseModel):
    __root__: List[Cause]


class DNSCnamePrefix(BaseModel):
    __root__: Annotated[str, Field(max_length=63, min_length=4)]


class CheckDNSAvailabilityMessage(BaseModel):
    """
    Results message indicating whether a CNAME is available.
    """

    CNAMEPrefix: DNSCnamePrefix


class CnameAvailability(AbortableOperationInProgress):
    pass


class DNSCname(Cause):
    pass


class GroupName(BaseModel):
    __root__: Annotated[str, Field(max_length=19, min_length=1)]


class VersionLabels(VersionLabelsList):
    pass


class ComposeEnvironmentsMessage(BaseModel):
    """
    Request to create or update a group of environments.
    """

    ApplicationName: Optional[ApplicationName] = None
    GroupName: Optional[GroupName] = None
    VersionLabels: Optional[VersionLabels] = None


class ConfigurationDeploymentStatus(Enum):
    deployed = 'deployed'
    pending = 'pending'
    failed = 'failed'


class ConfigurationOptionDefaultValue(String):
    pass


class OptionNamespace(String):
    pass


class ConfigurationOptionName(String):
    pass


class ConfigurationOptionSeverity(String):
    pass


class UserDefinedOption(AbortableOperationInProgress):
    pass


class ConfigurationOptionValueType(Enum):
    Scalar = 'Scalar'
    List = 'List'


class OptionRestrictionMinValue(BoxedInt):
    pass


class OptionRestrictionMaxValue(BoxedInt):
    pass


class OptionRestrictionMaxLength(BoxedInt):
    pass


class ConfigurationOptionPossibleValue(String):
    pass


class ResourceName(OperationsRole):
    pass


class ConfigurationOptionValue(String):
    pass


class PlatformArn(String):
    pass


class SourceConfiguration(BaseModel):
    """
    A specification for an environment configuration.
    """

    ApplicationName: Optional[ApplicationName] = None
    TemplateName: Optional[ConfigurationTemplateName] = None


class EnvironmentTier(BaseModel):
    """
    Describes the properties of an environment tier
    """

    Name: Optional[String] = None
    Type: Optional[String] = None
    Version: Optional[String] = None


class PlatformName(String):
    pass


class PlatformVersion(String):
    pass


class VirtualizationType(String):
    pass


class ImageId(String):
    pass


class CustomAmi(BaseModel):
    """
    A custom AMI available to platforms.
    """

    VirtualizationType: Optional[VirtualizationType] = None
    ImageId: Optional[ImageId] = None


class CustomAmiList(BaseModel):
    __root__: List[CustomAmi]


class TerminateEnvForce(AbortableOperationInProgress):
    pass


class DeleteApplicationMessage(BaseModel):
    """
    Request to delete an application.
    """

    ApplicationName: ApplicationName
    TerminateEnvByForce: Optional[TerminateEnvForce] = None


class DeleteSourceBundle(AbortableOperationInProgress):
    pass


class DeleteApplicationVersionMessage(BaseModel):
    """
    Request to delete an application version.
    """

    ApplicationName: ApplicationName
    VersionLabel: VersionLabel
    DeleteSourceBundle: Optional[DeleteSourceBundle] = None


class DeleteConfigurationTemplateMessage(BaseModel):
    """
    Request to delete a configuration template.
    """

    ApplicationName: ApplicationName
    TemplateName: ConfigurationTemplateName


class DeleteEnvironmentConfigurationMessage(BaseModel):
    """
    Request to delete a draft environment configuration.
    """

    ApplicationName: ApplicationName
    EnvironmentName: EnvironmentName


class DeletePlatformVersionRequest(BaseModel):
    PlatformArn: Optional[PlatformArn] = None


class NullableLong(BoxedInt):
    pass


class DeploymentTimestamp(CreationDate):
    pass


class Deployment(BaseModel):
    """
    Information about an application version deployment.
    """

    VersionLabel: Optional[String] = None
    DeploymentId: Optional[NullableLong] = None
    Status: Optional[String] = None
    DeploymentTime: Optional[DeploymentTimestamp] = None


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


class DescribeApplicationVersionsMessage(BaseModel):
    """
    Request to describe application versions.
    """

    ApplicationName: Optional[ApplicationName] = None
    VersionLabels: Optional[VersionLabelsList] = None
    MaxRecords: Optional[MaxRecords] = None
    NextToken: Optional[Token] = None


class DescribeApplicationsMessage(BaseModel):
    """
    Request to describe one or more applications.
    """

    ApplicationNames: Optional[ApplicationNamesList] = None


class DescribeConfigurationSettingsMessage(BaseModel):
    """
    Result message containing all of the configuration settings for a specified solution stack or configuration template.
    """

    ApplicationName: ApplicationName
    TemplateName: Optional[ConfigurationTemplateName] = None
    EnvironmentName: Optional[EnvironmentName] = None


class EnvironmentHealthAttributes(BaseModel):
    __root__: List[EnvironmentHealthAttribute]


class DescribeEnvironmentHealthRequest(BaseModel):
    """
    See the example below to learn how to create a request body.
    """

    EnvironmentName: Optional[EnvironmentName] = None
    EnvironmentId: Optional[EnvironmentId] = None
    AttributeNames: Optional[EnvironmentHealthAttributes] = None


class EnvironmentHealth(Enum):
    Green = 'Green'
    Yellow = 'Yellow'
    Red = 'Red'
    Grey = 'Grey'


class InstanceHealthSummary(BaseModel):
    """
    Represents summary information about the health of an instance. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/health-enhanced-status.html">Health Colors and Statuses</a>.
    """

    NoData: Optional[NullableInteger] = None
    Unknown: Optional[NullableInteger] = None
    Pending: Optional[NullableInteger] = None
    Ok: Optional[NullableInteger] = None
    Info: Optional[NullableInteger] = None
    Warning: Optional[NullableInteger] = None
    Degraded: Optional[NullableInteger] = None
    Severe: Optional[NullableInteger] = None


class RefreshedAt(CreationDate):
    pass


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


class DescribeEnvironmentManagedActionHistoryRequest(BaseModel):
    """
    Request to list completed and failed managed actions.
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None
    NextToken: Optional[String] = None
    MaxItems: Optional[ManagedActionHistoryMaxItems] = None


class DescribeEnvironmentManagedActionsRequest(BaseModel):
    """
    Request to list an environment's upcoming and in-progress managed actions.
    """

    EnvironmentName: Optional[String] = None
    EnvironmentId: Optional[String] = None
    Status: Optional[ActionStatus] = None


class DescribeEnvironmentResourcesMessage(BaseModel):
    """
    Request to describe the resources in an environment.
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None


class EnvironmentIdList(BaseModel):
    __root__: List[EnvironmentId]


class EnvironmentNamesList(BaseModel):
    __root__: List[EnvironmentName]


class IncludeDeleted(AbortableOperationInProgress):
    pass


class IncludeDeletedBackTo(CreationDate):
    pass


class DescribeEnvironmentsMessage(BaseModel):
    """
    Request to describe one or more environments.
    """

    ApplicationName: Optional[ApplicationName] = None
    VersionLabel: Optional[VersionLabel] = None
    EnvironmentIds: Optional[EnvironmentIdList] = None
    EnvironmentNames: Optional[EnvironmentNamesList] = None
    IncludeDeleted: Optional[IncludeDeleted] = None
    IncludedDeletedBackTo: Optional[IncludeDeletedBackTo] = None
    MaxRecords: Optional[MaxRecords] = None
    NextToken: Optional[Token] = None


class RequestId(String):
    pass


class EventSeverity(Enum):
    TRACE = 'TRACE'
    DEBUG = 'DEBUG'
    INFO = 'INFO'
    WARN = 'WARN'
    ERROR = 'ERROR'
    FATAL = 'FATAL'


class TimeFilterStart(CreationDate):
    pass


class TimeFilterEnd(CreationDate):
    pass


class DescribeEventsMessage(BaseModel):
    """
    Request to retrieve a list of events for an environment.
    """

    ApplicationName: Optional[ApplicationName] = None
    VersionLabel: Optional[VersionLabel] = None
    TemplateName: Optional[ConfigurationTemplateName] = None
    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None
    PlatformArn: Optional[PlatformArn] = None
    RequestId: Optional[RequestId] = None
    Severity: Optional[EventSeverity] = None
    StartTime: Optional[TimeFilterStart] = None
    EndTime: Optional[TimeFilterEnd] = None
    MaxRecords: Optional[MaxRecords] = None
    NextToken: Optional[Token] = None


class InstancesHealthAttributes(BaseModel):
    __root__: List[InstancesHealthAttribute]


class NextToken(VersionLabel):
    pass


class DescribeInstancesHealthRequest(BaseModel):
    """
    Parameters for a call to <code>DescribeInstancesHealth</code>.
    """

    EnvironmentName: Optional[EnvironmentName] = None
    EnvironmentId: Optional[EnvironmentId] = None
    AttributeNames: Optional[InstancesHealthAttributes] = None
    NextToken: Optional[NextToken] = None


class DescribePlatformVersionRequest(BaseModel):
    PlatformArn: Optional[PlatformArn] = None


class DisassociateEnvironmentOperationsRoleMessage(BaseModel):
    """
    Request to disassociate the operations role from an environment.
    """

    EnvironmentName: EnvironmentName


class Ec2InstanceId(String):
    pass


class EndpointURL(String):
    pass


class EnvironmentArn(String):
    pass


class EnvironmentStatus(Enum):
    Aborting = 'Aborting'
    Launching = 'Launching'
    Updating = 'Updating'
    LinkingFrom = 'LinkingFrom'
    LinkingTo = 'LinkingTo'
    Ready = 'Ready'
    Terminating = 'Terminating'
    Terminated = 'Terminated'


class EnvironmentHealthStatus(Enum):
    NoData = 'NoData'
    Unknown = 'Unknown'
    Pending = 'Pending'
    Ok = 'Ok'
    Info = 'Info'
    Warning = 'Warning'
    Degraded = 'Degraded'
    Severe = 'Severe'
    Suspended = 'Suspended'


class EnvironmentInfoType(Enum):
    tail = 'tail'
    bundle = 'bundle'


class SampleTimestamp(CreationDate):
    pass


class Message(String):
    pass


class EnvironmentInfoDescription(BaseModel):
    """
    The information retrieved from the Amazon EC2 instances.
    """

    InfoType: Optional[EnvironmentInfoType] = None
    Ec2InstanceId: Optional[Ec2InstanceId] = None
    SampleTimestamp: Optional[SampleTimestamp] = None
    Message: Optional[Message] = None


class EnvironmentInfoDescriptionList(BaseModel):
    __root__: List[EnvironmentInfoDescription]


class EnvironmentLink(BaseModel):
    """
    A link to another environment, defined in the environment's manifest. Links provide connection information in system properties that can be used to connect to another environment in the same group. See <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-cfg-manifest.html">Environment Manifest (env.yaml)</a> for details.
    """

    LinkName: Optional[String] = None
    EnvironmentName: Optional[String] = None


class EventDate(CreationDate):
    pass


class EventMessage(String):
    pass


class EventDescription(BaseModel):
    """
    Describes an event.
    """

    EventDate: Optional[EventDate] = None
    Message: Optional[EventMessage] = None
    ApplicationName: Optional[ApplicationName] = None
    VersionLabel: Optional[VersionLabel] = None
    TemplateName: Optional[ConfigurationTemplateName] = None
    EnvironmentName: Optional[EnvironmentName] = None
    PlatformArn: Optional[PlatformArn] = None
    RequestId: Optional[RequestId] = None
    Severity: Optional[EventSeverity] = None


class EventDescriptionList(BaseModel):
    __root__: List[EventDescription]


class FailureType(Enum):
    UpdateCancelled = 'UpdateCancelled'
    CancellationFailed = 'CancellationFailed'
    RollbackFailed = 'RollbackFailed'
    RollbackSuccessful = 'RollbackSuccessful'
    InternalFailure = 'InternalFailure'
    InvalidEnvironmentState = 'InvalidEnvironmentState'
    PermissionsError = 'PermissionsError'


class FileTypeExtension(VersionLabel):
    pass


class ForceTerminate(AbortableOperationInProgress):
    pass


class Instance(BaseModel):
    """
    The description of an Amazon EC2 instance.
    """

    Id: Optional[ResourceId] = None


class InstanceId(Cause):
    pass


class Integer(BoxedInt):
    pass


class LaunchConfiguration(AutoScalingGroup):
    """
    Describes an Auto Scaling launch configuration.
    """

    pass


class LaunchTemplate(Instance):
    """
    Describes an Amazon EC2 launch template.
    """

    pass


class LaunchedAt(CreationDate):
    pass


class PlatformBranchMaxRecords(BaseModel):
    __root__: Annotated[int, Field(ge=1.0)]


class PlatformMaxRecords(PlatformBranchMaxRecords):
    pass


class ResourceArn(String):
    pass


class ListTagsForResourceMessage(BaseModel):
    ResourceArn: ResourceArn


class Listener(BaseModel):
    """
    Describes the properties of a Listener for the LoadBalancer.
    """

    Protocol: Optional[String] = None
    Port: Optional[Integer] = None


class LoadAverageValue(NullableDouble):
    pass


class LoadAverage(BaseModel):
    __root__: List[LoadAverageValue]


class LoadBalancer(AutoScalingGroup):
    """
    Describes a LoadBalancer.
    """

    pass


class LoadBalancerListenersDescription(BaseModel):
    __root__: List[Listener]


class Maintainer(String):
    pass


class Timestamp(CreationDate):
    pass


class ManagedAction(BaseModel):
    """
    The record of an upcoming or in-progress managed action.
    """

    ActionId: Optional[String] = None
    ActionDescription: Optional[String] = None
    ActionType: Optional[ActionType] = None
    Status: Optional[ActionStatus] = None
    WindowStartTime: Optional[Timestamp] = None


class ManagedActionHistoryItem(BaseModel):
    """
    The record of a completed or failed managed action.
    """

    ActionId: Optional[String] = None
    ActionType: Optional[ActionType] = None
    ActionDescription: Optional[String] = None
    FailureType: Optional[FailureType] = None
    Status: Optional[ActionHistoryStatus] = None
    FailureDescription: Optional[String] = None
    ExecutedTime: Optional[Timestamp] = None
    FinishedTime: Optional[Timestamp] = None


class OperatingSystemName(String):
    pass


class OperatingSystemVersion(String):
    pass


class RegexPattern(String):
    pass


class RegexLabel(String):
    pass


class PlatformBranchLifecycleState(String):
    pass


class PlatformCategory(String):
    pass


class PlatformOwner(String):
    pass


class PlatformStatus(Enum):
    Creating = 'Creating'
    Failed = 'Failed'
    Ready = 'Ready'
    Deleting = 'Deleting'
    Deleted = 'Deleted'


class PlatformLifecycleState(String):
    pass


class PlatformFilterType(String):
    pass


class PlatformFilterOperator(String):
    pass


class PlatformFilterValue(String):
    pass


class PlatformFramework(BaseModel):
    """
    A framework supported by the platform.
    """

    Name: Optional[String] = None
    Version: Optional[String] = None


class PlatformProgrammingLanguage(PlatformFramework):
    """
    A programming language supported by the platform.
    """

    pass


class Queue(BaseModel):
    """
    Describes a queue.
    """

    Name: Optional[String] = None
    URL: Optional[String] = None


class RebuildEnvironmentMessage(BaseModel):
    """
    <p/>
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None


class RequestEnvironmentInfoMessage(BaseModel):
    """
    Request to retrieve logs from an environment and store them in your Elastic Beanstalk storage bucket.
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None
    InfoType: EnvironmentInfoType


class ResourceQuota(BaseModel):
    """
    The AWS Elastic Beanstalk quota information for a single resource type in an AWS account. It reflects the resource's limits for this account.
    """

    Maximum: Optional[BoxedInt] = None


class RestartAppServerMessage(BaseModel):
    """
    <p/>
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None


class RetrieveEnvironmentInfoMessage(BaseModel):
    """
    Request to download logs retrieved with <a>RequestEnvironmentInfo</a>.
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None
    InfoType: EnvironmentInfoType


class SearchFilterAttribute(String):
    pass


class SearchFilterOperator(String):
    pass


class SearchFilterValue(String):
    pass


class SystemStatus(BaseModel):
    """
    CPU utilization and load average metrics for an Amazon EC2 instance.
    """

    CPUUtilization: Optional[CPUUtilization] = None
    LoadAverage: Optional[LoadAverage] = None


class SolutionStackFileTypeList(BaseModel):
    __root__: List[FileTypeExtension]


class SupportedAddon(String):
    pass


class SupportedTier(String):
    pass


class SwapEnvironmentCNAMEsMessage(BaseModel):
    """
    Swaps the CNAMEs of two environments.
    """

    SourceEnvironmentId: Optional[EnvironmentId] = None
    SourceEnvironmentName: Optional[EnvironmentName] = None
    DestinationEnvironmentId: Optional[EnvironmentId] = None
    DestinationEnvironmentName: Optional[EnvironmentName] = None


class TagValue(OperationsRole):
    pass


class TagKeyList(BaseModel):
    __root__: List[TagKey]


class TerminateEnvironmentResources(AbortableOperationInProgress):
    pass


class TerminateEnvironmentMessage(BaseModel):
    """
    Request to terminate an environment.
    """

    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None
    TerminateResources: Optional[TerminateEnvironmentResources] = None
    ForceTerminate: Optional[ForceTerminate] = None


class Trigger(AutoScalingGroup):
    """
    Describes a trigger.
    """

    pass


class UpdateApplicationMessage(BaseModel):
    """
    Request to update an application.
    """

    ApplicationName: ApplicationName
    Description: Optional[Description] = None


class UpdateApplicationVersionMessage(BaseModel):
    """
    <p/>
    """

    ApplicationName: ApplicationName
    VersionLabel: VersionLabel
    Description: Optional[Description] = None


class ValidationMessageString(String):
    pass


class ValidationSeverity(Enum):
    error = 'error'
    warning = 'warning'


class ValidationMessage(BaseModel):
    """
    An error or warning for a desired configuration option value.
    """

    Message: Optional[ValidationMessageString] = None
    Severity: Optional[ValidationSeverity] = None
    Namespace: Optional[OptionNamespace] = None
    OptionName: Optional[ConfigurationOptionName] = None


class ApplyEnvironmentManagedActionResult(BaseModel):
    """
    The result message containing information about the managed action.
    """

    ActionId: Optional[String] = None
    ActionDescription: Optional[String] = None
    ActionType: Optional[ActionType] = None
    Status: Optional[String] = None


class CheckDNSAvailabilityResultMessage(BaseModel):
    """
    Indicates if the specified CNAME is available.
    """

    Available: Optional[CnameAvailability] = None
    FullyQualifiedCNAME: Optional[DNSCname] = None


class Tag(BaseModel):
    """
    Describes a tag applied to a resource in an environment.
    """

    Key: Optional[TagKey] = None
    Value: Optional[TagValue] = None


class ApplicationVersionDescriptionMessage(BaseModel):
    """
    Result message wrapping a single description of an application version.
    """

    ApplicationVersion: Optional[ApplicationVersionDescription] = None


class ConfigurationOptionSetting(BaseModel):
    """
    A specification identifying an individual configuration option along with its current value. For a list of possible namespaces and option values, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html">Option Values</a> in the <i>AWS Elastic Beanstalk Developer Guide</i>.
    """

    ResourceName: Optional[ResourceName] = None
    Namespace: Optional[OptionNamespace] = None
    OptionName: Optional[ConfigurationOptionName] = None
    Value: Optional[ConfigurationOptionValue] = None


class OptionSpecification(BaseModel):
    """
    A specification identifying an individual configuration option.
    """

    ResourceName: Optional[ResourceName] = None
    Namespace: Optional[OptionNamespace] = None
    OptionName: Optional[ConfigurationOptionName] = None


class ApplicationVersionDescriptionsMessage(BaseModel):
    """
    Result message wrapping a list of application version descriptions.
    """

    ApplicationVersions: Optional[ApplicationVersionDescriptionList] = None
    NextToken: Optional[Token] = None


class EventDescriptionsMessage(BaseModel):
    """
    Result message wrapping a list of event descriptions.
    """

    Events: Optional[EventDescriptionList] = None
    NextToken: Optional[Token] = None


class RetrieveEnvironmentInfoResultMessage(BaseModel):
    """
    Result message containing a description of the requested environment info.
    """

    EnvironmentInfo: Optional[EnvironmentInfoDescriptionList] = None


class Latency(BaseModel):
    """
    Represents the average latency for the slowest X percent of requests over the last 10 seconds.
    """

    P999: Optional[NullableDouble] = None
    P99: Optional[NullableDouble] = None
    P95: Optional[NullableDouble] = None
    P90: Optional[NullableDouble] = None
    P85: Optional[NullableDouble] = None
    P75: Optional[NullableDouble] = None
    P50: Optional[NullableDouble] = None
    P10: Optional[NullableDouble] = None


class ApplicationMetrics(BaseModel):
    """
    Application request metrics for an AWS Elastic Beanstalk environment.
    """

    Duration: Optional[NullableInteger] = None
    RequestCount: Optional[RequestCount] = None
    StatusCodes: Optional[StatusCodes] = None
    Latency: Optional[Latency] = None


class MaxCountRule(BaseModel):
    """
    A lifecycle rule that deletes the oldest application version when the maximum count is exceeded.
    """

    Enabled: BoxedBoolean
    MaxCount: Optional[BoxedInt] = None
    DeleteSourceFromS3: Optional[BoxedBoolean] = None


class MaxAgeRule(BaseModel):
    """
    A lifecycle rule that deletes application versions after the specified number of days.
    """

    Enabled: BoxedBoolean
    MaxAgeInDays: Optional[BoxedInt] = None
    DeleteSourceFromS3: Optional[BoxedBoolean] = None


class SolutionStackDescription(BaseModel):
    """
    Describes the solution stack.
    """

    SolutionStackName: Optional[SolutionStackName] = None
    PermittedFileTypes: Optional[SolutionStackFileTypeList] = None


class AvailableSolutionStackDetailsList(BaseModel):
    __root__: List[SolutionStackDescription]


class ConfigurationOptionPossibleValues(BaseModel):
    __root__: List[ConfigurationOptionPossibleValue]


class OptionRestrictionRegex(BaseModel):
    """
    A regular expression representing a restriction on a string configuration option value.
    """

    Pattern: Optional[RegexPattern] = None
    Label: Optional[RegexLabel] = None


class ConfigurationOptionDescription(BaseModel):
    """
    Describes the possible values for a configuration option.
    """

    Namespace: Optional[OptionNamespace] = None
    Name: Optional[ConfigurationOptionName] = None
    DefaultValue: Optional[ConfigurationOptionDefaultValue] = None
    ChangeSeverity: Optional[ConfigurationOptionSeverity] = None
    UserDefined: Optional[UserDefinedOption] = None
    ValueType: Optional[ConfigurationOptionValueType] = None
    ValueOptions: Optional[ConfigurationOptionPossibleValues] = None
    MinValue: Optional[OptionRestrictionMinValue] = None
    MaxValue: Optional[OptionRestrictionMaxValue] = None
    MaxLength: Optional[OptionRestrictionMaxLength] = None
    Regex: Optional[OptionRestrictionRegex] = None


class ConfigurationOptionDescriptionsList(BaseModel):
    __root__: List[ConfigurationOptionDescription]


class ConfigurationOptionSettingsList(BaseModel):
    __root__: List[ConfigurationOptionSetting]


class ValidationMessagesList(BaseModel):
    __root__: List[ValidationMessage]


class Tags(BaseModel):
    __root__: List[Tag]


class CreateApplicationVersionMessage(BaseModel):
    """
    <p/>
    """

    ApplicationName: ApplicationName
    VersionLabel: VersionLabel
    Description: Optional[Description] = None
    SourceBuildInformation: Optional[SourceBuildInformation] = None
    SourceBundle: Optional[S3Location] = None
    BuildConfiguration: Optional[BuildConfiguration] = None
    AutoCreateApplication: Optional[AutoCreateApplication] = None
    Process: Optional[ApplicationVersionProccess] = None
    Tags: Optional[Tags] = None


class CreateConfigurationTemplateMessage(BaseModel):
    """
    Request to create a configuration template.
    """

    ApplicationName: ApplicationName
    TemplateName: ConfigurationTemplateName
    SolutionStackName: Optional[SolutionStackName] = None
    PlatformArn: Optional[PlatformArn] = None
    SourceConfiguration: Optional[SourceConfiguration] = None
    EnvironmentId: Optional[EnvironmentId] = None
    Description: Optional[Description] = None
    OptionSettings: Optional[ConfigurationOptionSettingsList] = None
    Tags: Optional[Tags] = None


class OptionsSpecifierList(BaseModel):
    __root__: List[OptionSpecification]


class CreateEnvironmentMessage(BaseModel):
    """
    <p/>
    """

    ApplicationName: ApplicationName
    EnvironmentName: Optional[EnvironmentName] = None
    GroupName: Optional[GroupName] = None
    Description: Optional[Description] = None
    CNAMEPrefix: Optional[DNSCnamePrefix] = None
    Tier: Optional[EnvironmentTier] = None
    Tags: Optional[Tags] = None
    VersionLabel: Optional[VersionLabel] = None
    TemplateName: Optional[ConfigurationTemplateName] = None
    SolutionStackName: Optional[SolutionStackName] = None
    PlatformArn: Optional[PlatformArn] = None
    OptionSettings: Optional[ConfigurationOptionSettingsList] = None
    OptionsToRemove: Optional[OptionsSpecifierList] = None
    OperationsRole: Optional[OperationsRole] = None


class CreatePlatformVersionRequest(BaseModel):
    """
    Request to create a new platform version.
    """

    PlatformName: PlatformName
    PlatformVersion: PlatformVersion
    PlatformDefinitionBundle: S3Location
    EnvironmentName: Optional[EnvironmentName] = None
    OptionSettings: Optional[ConfigurationOptionSettingsList] = None
    Tags: Optional[Tags] = None


class ResourceQuotas(BaseModel):
    """
    A set of per-resource AWS Elastic Beanstalk quotas associated with an AWS account. They reflect Elastic Beanstalk resource limits for this account.
    """

    ApplicationQuota: Optional[ResourceQuota] = None
    ApplicationVersionQuota: Optional[ResourceQuota] = None
    EnvironmentQuota: Optional[ResourceQuota] = None
    ConfigurationTemplateQuota: Optional[ResourceQuota] = None
    CustomPlatformQuota: Optional[ResourceQuota] = None


class DescribeConfigurationOptionsMessage(BaseModel):
    """
    Result message containing a list of application version descriptions.
    """

    ApplicationName: Optional[ApplicationName] = None
    TemplateName: Optional[ConfigurationTemplateName] = None
    EnvironmentName: Optional[EnvironmentName] = None
    SolutionStackName: Optional[SolutionStackName] = None
    PlatformArn: Optional[PlatformArn] = None
    Options: Optional[OptionsSpecifierList] = None


class ManagedActionHistoryItems(BaseModel):
    __root__: Annotated[
        List[ManagedActionHistoryItem], Field(max_items=100, min_items=1)
    ]


class ManagedActions(BaseModel):
    __root__: Annotated[List[ManagedAction], Field(max_items=100, min_items=1)]


class EnvironmentLinks(BaseModel):
    __root__: List[EnvironmentLink]


class InstanceList(BaseModel):
    __root__: List[Instance]


class LaunchConfigurationList(BaseModel):
    __root__: List[LaunchConfiguration]


class LaunchTemplateList(BaseModel):
    __root__: List[LaunchTemplate]


class LoadBalancerList(BaseModel):
    __root__: List[LoadBalancer]


class TriggerList(BaseModel):
    __root__: List[Trigger]


class QueueList(BaseModel):
    __root__: List[Queue]


class EnvironmentResourceDescription(BaseModel):
    """
    Describes the AWS resources in use by this environment. This data is live.
    """

    EnvironmentName: Optional[EnvironmentName] = None
    AutoScalingGroups: Optional[AutoScalingGroupList] = None
    Instances: Optional[InstanceList] = None
    LaunchConfigurations: Optional[LaunchConfigurationList] = None
    LaunchTemplates: Optional[LaunchTemplateList] = None
    LoadBalancers: Optional[LoadBalancerList] = None
    Triggers: Optional[TriggerList] = None
    Queues: Optional[QueueList] = None


class LoadBalancerDescription(BaseModel):
    """
    Describes the details of a LoadBalancer.
    """

    LoadBalancerName: Optional[String] = None
    Domain: Optional[String] = None
    Listeners: Optional[LoadBalancerListenersDescription] = None


class SingleInstanceHealth(BaseModel):
    """
    Detailed health information about an Amazon EC2 instance in your Elastic Beanstalk environment.
    """

    InstanceId: Optional[InstanceId] = None
    HealthStatus: Optional[String] = None
    Color: Optional[String] = None
    Causes: Optional[Causes] = None
    LaunchedAt: Optional[LaunchedAt] = None
    ApplicationMetrics: Optional[ApplicationMetrics] = None
    System: Optional[SystemStatus] = None
    Deployment: Optional[Deployment] = None
    AvailabilityZone: Optional[String] = None
    InstanceType: Optional[String] = None


class SupportedTierList(BaseModel):
    __root__: List[SupportedTier]


class PlatformBranchSummary(BaseModel):
    """
    Summary information about a platform branch.
    """

    PlatformName: Optional[PlatformName] = None
    BranchName: Optional[BranchName] = None
    LifecycleState: Optional[PlatformBranchLifecycleState] = None
    BranchOrder: Optional[BranchOrder] = None
    SupportedTierList: Optional[SupportedTierList] = None


class PlatformProgrammingLanguages(BaseModel):
    __root__: List[PlatformProgrammingLanguage]


class PlatformFrameworks(BaseModel):
    __root__: List[PlatformFramework]


class SupportedAddonList(BaseModel):
    __root__: List[SupportedAddon]


class PlatformFilterValueList(BaseModel):
    __root__: List[PlatformFilterValue]


class TagList(Tags):
    pass


class SearchFilterValues(BaseModel):
    __root__: List[SearchFilterValue]


class UpdateConfigurationTemplateMessage(BaseModel):
    """
    The result message containing the options for the specified solution stack.
    """

    ApplicationName: ApplicationName
    TemplateName: ConfigurationTemplateName
    Description: Optional[Description] = None
    OptionSettings: Optional[ConfigurationOptionSettingsList] = None
    OptionsToRemove: Optional[OptionsSpecifierList] = None


class UpdateEnvironmentMessage(BaseModel):
    """
    Request to update an environment.
    """

    ApplicationName: Optional[ApplicationName] = None
    EnvironmentId: Optional[EnvironmentId] = None
    EnvironmentName: Optional[EnvironmentName] = None
    GroupName: Optional[GroupName] = None
    Description: Optional[Description] = None
    Tier: Optional[EnvironmentTier] = None
    VersionLabel: Optional[VersionLabel] = None
    TemplateName: Optional[ConfigurationTemplateName] = None
    SolutionStackName: Optional[SolutionStackName] = None
    PlatformArn: Optional[PlatformArn] = None
    OptionSettings: Optional[ConfigurationOptionSettingsList] = None
    OptionsToRemove: Optional[OptionsSpecifierList] = None


class UpdateTagsForResourceMessage(BaseModel):
    ResourceArn: ResourceArn
    TagsToAdd: Optional[TagList] = None
    TagsToRemove: Optional[TagKeyList] = None


class ValidateConfigurationSettingsMessage(BaseModel):
    """
    A list of validation messages for a specified configuration template.
    """

    ApplicationName: ApplicationName
    TemplateName: Optional[ConfigurationTemplateName] = None
    EnvironmentName: Optional[EnvironmentName] = None
    OptionSettings: ConfigurationOptionSettingsList


class ApplicationVersionLifecycleConfig(BaseModel):
    """
    <p>The application version lifecycle settings for an application. Defines the rules that Elastic Beanstalk applies to an application's versions in order to avoid hitting the per-region limit for application versions.</p> <p>When Elastic Beanstalk deletes an application version from its database, you can no longer deploy that version to an environment. The source bundle remains in S3 unless you configure the rule to delete it.</p>
    """

    MaxCountRule: Optional[MaxCountRule] = None
    MaxAgeRule: Optional[MaxAgeRule] = None


class ConfigurationSettingsDescription(BaseModel):
    """
    Describes the settings for a configuration set.
    """

    SolutionStackName: Optional[SolutionStackName] = None
    PlatformArn: Optional[PlatformArn] = None
    ApplicationName: Optional[ApplicationName] = None
    TemplateName: Optional[ConfigurationTemplateName] = None
    Description: Optional[Description] = None
    EnvironmentName: Optional[EnvironmentName] = None
    DeploymentStatus: Optional[ConfigurationDeploymentStatus] = None
    DateCreated: Optional[CreationDate] = None
    DateUpdated: Optional[UpdateDate] = None
    OptionSettings: Optional[ConfigurationOptionSettingsList] = None


class DescribeAccountAttributesResult(BaseModel):
    ResourceQuotas: Optional[ResourceQuotas] = None


class ConfigurationOptionsDescription(BaseModel):
    """
    Describes the settings for a specified configuration set.
    """

    SolutionStackName: Optional[SolutionStackName] = None
    PlatformArn: Optional[PlatformArn] = None
    Options: Optional[ConfigurationOptionDescriptionsList] = None


class DescribeEnvironmentHealthResult(BaseModel):
    """
    Health details for an AWS Elastic Beanstalk environment.
    """

    EnvironmentName: Optional[EnvironmentName] = None
    HealthStatus: Optional[String] = None
    Status: Optional[EnvironmentHealth] = None
    Color: Optional[String] = None
    Causes: Optional[Causes] = None
    ApplicationMetrics: Optional[ApplicationMetrics] = None
    InstancesHealth: Optional[InstanceHealthSummary] = None
    RefreshedAt: Optional[RefreshedAt] = None


class DescribeEnvironmentManagedActionHistoryResult(BaseModel):
    """
    A result message containing a list of completed and failed managed actions.
    """

    ManagedActionHistoryItems: Optional[ManagedActionHistoryItems] = None
    NextToken: Optional[String] = None


class DescribeEnvironmentManagedActionsResult(BaseModel):
    """
    The result message containing a list of managed actions.
    """

    ManagedActions: Optional[ManagedActions] = None


class EnvironmentResourceDescriptionsMessage(BaseModel):
    """
    Result message containing a list of environment resource descriptions.
    """

    EnvironmentResources: Optional[EnvironmentResourceDescription] = None


class ListAvailableSolutionStacksResultMessage(BaseModel):
    """
    A list of available AWS Elastic Beanstalk solution stacks.
    """

    SolutionStacks: Optional[AvailableSolutionStackNamesList] = None
    SolutionStackDetails: Optional[AvailableSolutionStackDetailsList] = None


class SearchFilter(BaseModel):
    """
    <p>Describes criteria to restrict a list of results.</p> <p>For operators that apply a single value to the attribute, the filter is evaluated as follows: <code>Attribute Operator Values[1]</code> </p> <p>Some operators, e.g. <code>in</code>, can apply multiple values. In this case, the filter is evaluated as a logical union (OR) of applications of the operator to the attribute with each one of the values: <code>(Attribute Operator Values[1]) OR (Attribute Operator Values[2]) OR ...</code> </p> <p>The valid values for attributes of <code>SearchFilter</code> depend on the API action. For valid values, see the reference page for the API action you're calling that takes a <code>SearchFilter</code> parameter.</p>
    """

    Attribute: Optional[SearchFilterAttribute] = None
    Operator: Optional[SearchFilterOperator] = None
    Values: Optional[SearchFilterValues] = None


class PlatformFilter(BaseModel):
    """
    <p>Describes criteria to restrict the results when listing platform versions.</p> <p>The filter is evaluated as follows: <code>Type Operator Values[1]</code> </p>
    """

    Type: Optional[PlatformFilterType] = None
    Operator: Optional[PlatformFilterOperator] = None
    Values: Optional[PlatformFilterValueList] = None


class ResourceTagsDescriptionMessage(BaseModel):
    ResourceArn: Optional[ResourceArn] = None
    ResourceTags: Optional[TagList] = None


class ConfigurationSettingsValidationMessages(BaseModel):
    """
    Provides a list of validation messages.
    """

    Messages: Optional[ValidationMessagesList] = None


class ApplicationResourceLifecycleConfig(BaseModel):
    """
    The resource lifecycle configuration for an application. Defines lifecycle settings for resources that belong to the application, and the service role that AWS Elastic Beanstalk assumes in order to apply lifecycle settings. The version lifecycle configuration defines lifecycle settings for application versions.
    """

    ServiceRole: Optional[String] = None
    VersionLifecycleConfig: Optional[ApplicationVersionLifecycleConfig] = None


class ApplicationDescription(BaseModel):
    """
    Describes the properties of an application.
    """

    ApplicationArn: Optional[ApplicationArn] = None
    ApplicationName: Optional[ApplicationName] = None
    Description: Optional[Description] = None
    DateCreated: Optional[CreationDate] = None
    DateUpdated: Optional[UpdateDate] = None
    Versions: Optional[VersionLabelsList] = None
    ConfigurationTemplates: Optional[ConfigurationTemplateNamesList] = None
    ResourceLifecycleConfig: Optional[ApplicationResourceLifecycleConfig] = None


class ApplicationDescriptionList(BaseModel):
    __root__: List[ApplicationDescription]


class ConfigurationSettingsDescriptionList(BaseModel):
    __root__: List[ConfigurationSettingsDescription]


class CreateApplicationMessage(BaseModel):
    """
    Request to create an application.
    """

    ApplicationName: ApplicationName
    Description: Optional[Description] = None
    ResourceLifecycleConfig: Optional[ApplicationResourceLifecycleConfig] = None
    Tags: Optional[Tags] = None


class PlatformSummary(BaseModel):
    """
    Summary information about a platform version.
    """

    PlatformArn: Optional[PlatformArn] = None
    PlatformOwner: Optional[PlatformOwner] = None
    PlatformStatus: Optional[PlatformStatus] = None
    PlatformCategory: Optional[PlatformCategory] = None
    OperatingSystemName: Optional[OperatingSystemName] = None
    OperatingSystemVersion: Optional[OperatingSystemVersion] = None
    SupportedTierList: Optional[SupportedTierList] = None
    SupportedAddonList: Optional[SupportedAddonList] = None
    PlatformLifecycleState: Optional[PlatformLifecycleState] = None
    PlatformVersion: Optional[PlatformVersion] = None
    PlatformBranchName: Optional[BranchName] = None
    PlatformBranchLifecycleState: Optional[PlatformBranchLifecycleState] = None


class InstanceHealthList(BaseModel):
    __root__: List[SingleInstanceHealth]


class PlatformDescription(BaseModel):
    """
    Detailed information about a platform version.
    """

    PlatformArn: Optional[PlatformArn] = None
    PlatformOwner: Optional[PlatformOwner] = None
    PlatformName: Optional[PlatformName] = None
    PlatformVersion: Optional[PlatformVersion] = None
    SolutionStackName: Optional[SolutionStackName] = None
    PlatformStatus: Optional[PlatformStatus] = None
    DateCreated: Optional[CreationDate] = None
    DateUpdated: Optional[UpdateDate] = None
    PlatformCategory: Optional[PlatformCategory] = None
    Description: Optional[Description] = None
    Maintainer: Optional[Maintainer] = None
    OperatingSystemName: Optional[OperatingSystemName] = None
    OperatingSystemVersion: Optional[OperatingSystemVersion] = None
    ProgrammingLanguages: Optional[PlatformProgrammingLanguages] = None
    Frameworks: Optional[PlatformFrameworks] = None
    CustomAmiList: Optional[CustomAmiList] = None
    SupportedTierList: Optional[SupportedTierList] = None
    SupportedAddonList: Optional[SupportedAddonList] = None
    PlatformLifecycleState: Optional[PlatformLifecycleState] = None
    PlatformBranchName: Optional[BranchName] = None
    PlatformBranchLifecycleState: Optional[PlatformBranchLifecycleState] = None


class EnvironmentResourcesDescription(BaseModel):
    """
    Describes the AWS resources in use by this environment. This data is not live data.
    """

    LoadBalancer: Optional[LoadBalancerDescription] = None


class SearchFilters(BaseModel):
    __root__: List[SearchFilter]


class ListPlatformBranchesRequest(BaseModel):
    Filters: Optional[SearchFilters] = None
    MaxRecords: Optional[PlatformBranchMaxRecords] = None
    NextToken: Optional[Token] = None


class PlatformBranchSummaryList(BaseModel):
    __root__: List[PlatformBranchSummary]


class PlatformFilters(BaseModel):
    __root__: List[PlatformFilter]


class ListPlatformVersionsRequest(BaseModel):
    Filters: Optional[PlatformFilters] = None
    MaxRecords: Optional[PlatformMaxRecords] = None
    NextToken: Optional[Token] = None


class PlatformSummaryList(BaseModel):
    __root__: List[PlatformSummary]


class UpdateApplicationResourceLifecycleMessage(BaseModel):
    ApplicationName: ApplicationName
    ResourceLifecycleConfig: ApplicationResourceLifecycleConfig


class ApplicationDescriptionMessage(BaseModel):
    """
    Result message containing a single description of an application.
    """

    Application: Optional[ApplicationDescription] = None


class EnvironmentDescription(BaseModel):
    """
    Describes the properties of an environment.
    """

    EnvironmentName: Optional[EnvironmentName] = None
    EnvironmentId: Optional[EnvironmentId] = None
    ApplicationName: Optional[ApplicationName] = None
    VersionLabel: Optional[VersionLabel] = None
    SolutionStackName: Optional[SolutionStackName] = None
    PlatformArn: Optional[PlatformArn] = None
    TemplateName: Optional[ConfigurationTemplateName] = None
    Description: Optional[Description] = None
    EndpointURL: Optional[EndpointURL] = None
    CNAME: Optional[DNSCname] = None
    DateCreated: Optional[CreationDate] = None
    DateUpdated: Optional[UpdateDate] = None
    Status: Optional[EnvironmentStatus] = None
    AbortableOperationInProgress: Optional[AbortableOperationInProgress] = None
    Health: Optional[EnvironmentHealth] = None
    HealthStatus: Optional[EnvironmentHealthStatus] = None
    Resources: Optional[EnvironmentResourcesDescription] = None
    Tier: Optional[EnvironmentTier] = None
    EnvironmentLinks: Optional[EnvironmentLinks] = None
    EnvironmentArn: Optional[EnvironmentArn] = None
    OperationsRole: Optional[OperationsRole] = None


class CreatePlatformVersionResult(BaseModel):
    PlatformSummary: Optional[PlatformSummary] = None
    Builder: Optional[Builder] = None


class DeletePlatformVersionResult(BaseModel):
    PlatformSummary: Optional[PlatformSummary] = None


class ApplicationDescriptionsMessage(BaseModel):
    """
    Result message containing a list of application descriptions.
    """

    Applications: Optional[ApplicationDescriptionList] = None


class ConfigurationSettingsDescriptions(BaseModel):
    """
    The results from a request to change the configuration settings of an environment.
    """

    ConfigurationSettings: Optional[ConfigurationSettingsDescriptionList] = None


class DescribeInstancesHealthResult(BaseModel):
    """
    Detailed health information about the Amazon EC2 instances in an AWS Elastic Beanstalk environment.
    """

    InstanceHealthList: Optional[InstanceHealthList] = None
    RefreshedAt: Optional[RefreshedAt] = None
    NextToken: Optional[NextToken] = None


class DescribePlatformVersionResult(BaseModel):
    PlatformDescription: Optional[PlatformDescription] = None


class ListPlatformBranchesResult(BaseModel):
    PlatformBranchSummaryList: Optional[PlatformBranchSummaryList] = None
    NextToken: Optional[Token] = None


class ListPlatformVersionsResult(BaseModel):
    PlatformSummaryList: Optional[PlatformSummaryList] = None
    NextToken: Optional[Token] = None


class ApplicationResourceLifecycleDescriptionMessage(BaseModel):
    ApplicationName: Optional[ApplicationName] = None
    ResourceLifecycleConfig: Optional[ApplicationResourceLifecycleConfig] = None


class EnvironmentDescriptionsList(BaseModel):
    __root__: List[EnvironmentDescription]


class EnvironmentDescriptionsMessage(BaseModel):
    """
    Result message containing a list of environment descriptions.
    """

    Environments: Optional[EnvironmentDescriptionsList] = None
    NextToken: Optional[Token] = None
