# Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 31.0.0


from . import AWSObject
from . import AWSProperty
from troposphere import Tags
from .validators import integer


class Agent(AWSObject):
    resource_type = "AWS::DataSync::Agent"

    props = {
        'ActivationKey': (basestring, True),
        'AgentName': (basestring, False),
        'SecurityGroupArns': ([basestring], False),
        'SubnetArns': ([basestring], False),
        'Tags': (Tags, False),
        'VpcEndpointId': (basestring, False),
    }


class Ec2Config(AWSProperty):
    props = {
        'SecurityGroupArns': ([basestring], True),
        'SubnetArn': (basestring, True),
    }


class LocationEFS(AWSObject):
    resource_type = "AWS::DataSync::LocationEFS"

    props = {
        'Ec2Config': (Ec2Config, True),
        'EfsFilesystemArn': (basestring, True),
        'Subdirectory': (basestring, False),
        'Tags': (Tags, False),
    }


class LocationFSxWindows(AWSObject):
    resource_type = "AWS::DataSync::LocationFSxWindows"

    props = {
        'Domain': (basestring, False),
        'FsxFilesystemArn': (basestring, True),
        'Password': (basestring, True),
        'SecurityGroupArns': ([basestring], True),
        'Subdirectory': (basestring, False),
        'Tags': (Tags, False),
        'User': (basestring, True),
    }


class MountOptions(AWSProperty):
    props = {
        'Version': (basestring, False),
    }


class OnPremConfig(AWSProperty):
    props = {
        'AgentArns': ([basestring], True),
    }


class LocationNFS(AWSObject):
    resource_type = "AWS::DataSync::LocationNFS"

    props = {
        'MountOptions': (MountOptions, False),
        'OnPremConfig': (OnPremConfig, True),
        'ServerHostname': (basestring, True),
        'Subdirectory': (basestring, True),
        'Tags': (Tags, False),
    }


class LocationObjectStorage(AWSObject):
    resource_type = "AWS::DataSync::LocationObjectStorage"

    props = {
        'AccessKey': (basestring, False),
        'AgentArns': ([basestring], True),
        'BucketName': (basestring, True),
        'SecretKey': (basestring, False),
        'ServerHostname': (basestring, True),
        'ServerPort': (integer, False),
        'ServerProtocol': (basestring, False),
        'Subdirectory': (basestring, False),
        'Tags': (Tags, False),
    }


class S3Config(AWSProperty):
    props = {
        'BucketAccessRoleArn': (basestring, True),
    }


class LocationS3(AWSObject):
    resource_type = "AWS::DataSync::LocationS3"

    props = {
        'S3BucketArn': (basestring, True),
        'S3Config': (S3Config, True),
        'S3StorageClass': (basestring, False),
        'Subdirectory': (basestring, False),
        'Tags': (Tags, False),
    }


class LocationSMB(AWSObject):
    resource_type = "AWS::DataSync::LocationSMB"

    props = {
        'AgentArns': ([basestring], True),
        'Domain': (basestring, False),
        'MountOptions': (MountOptions, False),
        'Password': (basestring, True),
        'ServerHostname': (basestring, True),
        'Subdirectory': (basestring, True),
        'Tags': (Tags, False),
        'User': (basestring, True),
    }


class FilterRule(AWSProperty):
    props = {
        'FilterType': (basestring, False),
        'Value': (basestring, False),
    }


class Options(AWSProperty):
    props = {
        'Atime': (basestring, False),
        'BytesPerSecond': (integer, False),
        'Gid': (basestring, False),
        'LogLevel': (basestring, False),
        'Mtime': (basestring, False),
        'OverwriteMode': (basestring, False),
        'PosixPermissions': (basestring, False),
        'PreserveDeletedFiles': (basestring, False),
        'PreserveDevices': (basestring, False),
        'TaskQueueing': (basestring, False),
        'TransferMode': (basestring, False),
        'Uid': (basestring, False),
        'VerifyMode': (basestring, False),
    }


class TaskSchedule(AWSProperty):
    props = {
        'ScheduleExpression': (basestring, True),
    }


class Task(AWSObject):
    resource_type = "AWS::DataSync::Task"

    props = {
        'CloudWatchLogGroupArn': (basestring, False),
        'DestinationLocationArn': (basestring, True),
        'Excludes': ([FilterRule], False),
        'Name': (basestring, False),
        'Options': (Options, False),
        'Schedule': (TaskSchedule, False),
        'SourceLocationArn': (basestring, True),
        'Tags': (Tags, False),
    }
