
from . import AWSObject, AWSProperty
from .compat import policytypes
from .validators import boolean


class Subscription(AWSProperty):
    props = {
        'Endpoint': (basestring, True),
        'Protocol': (basestring, True),
    }


class SubscriptionResource(AWSObject):
    resource_type = "AWS::SNS::Subscription"

    props = {
        'DeliveryPolicy': (dict, False),
        'Endpoint': (basestring, False),
        'FilterPolicy': (dict, False),
        'Protocol': (basestring, True),
        'RawMessageDelivery': (boolean, False),
        'Region': (basestring, False),
        'TopicArn': (basestring, True),
    }


class TopicPolicy(AWSObject):
    resource_type = "AWS::SNS::TopicPolicy"

    props = {
        'PolicyDocument': (policytypes, True),
        'Topics': (list, True),
    }


class Topic(AWSObject):
    resource_type = "AWS::SNS::Topic"

    props = {
        'DisplayName': (basestring, False),
        'KmsMasterKeyId': (basestring, False),
        'Subscription': ([Subscription], False),
        'TopicName': (basestring, False),
    }


from . import AWSObject, AWSProperty, Tags
from .compat import policytypes
from .validators import boolean


class Subscription(AWSProperty):
    props = {
        'Endpoint': (basestring, True),
        'Protocol': (basestring, True),
    }


class SubscriptionResource(AWSObject):
    resource_type = "AWS::SNS::Subscription"

    props = {
        'DeliveryPolicy': (dict, False),
        'Endpoint': (basestring, False),
        'FilterPolicy': (dict, False),
        'Protocol': (basestring, True),
        'RawMessageDelivery': (boolean, False),
        'Region': (basestring, False),
        'TopicArn': (basestring, True),
    }


class TopicPolicy(AWSObject):
    resource_type = "AWS::SNS::TopicPolicy"

    props = {
        'PolicyDocument': (policytypes, True),
        'Topics': (list, True),
    }


class Topic(AWSObject):
    resource_type = "AWS::SNS::Topic"

    props = {
        'DisplayName': (basestring, False),
        'KmsMasterKeyId': (basestring, False),
        'Subscription': ([Subscription], False),
        'Tags': (Tags, False),
        'TopicName': (basestring, False),
    }

Add Tags to SNS::Topic per 2019-11-31 changes
Add Tags to SNS::Topic per 2019-11-31 changes

  
- from . import AWSObject, AWSProperty
+ from . import AWSObject, AWSProperty, Tags
  from .compat import policytypes
  from .validators import boolean
  
  
  class Subscription(AWSProperty):
      props = {
          'Endpoint': (basestring, True),
          'Protocol': (basestring, True),
      }
  
  
  class SubscriptionResource(AWSObject):
      resource_type = "AWS::SNS::Subscription"
  
      props = {
          'DeliveryPolicy': (dict, False),
          'Endpoint': (basestring, False),
          'FilterPolicy': (dict, False),
          'Protocol': (basestring, True),
          'RawMessageDelivery': (boolean, False),
          'Region': (basestring, False),
          'TopicArn': (basestring, True),
      }
  
  
  class TopicPolicy(AWSObject):
      resource_type = "AWS::SNS::TopicPolicy"
  
      props = {
          'PolicyDocument': (policytypes, True),
          'Topics': (list, True),
      }
  
  
  class Topic(AWSObject):
      resource_type = "AWS::SNS::Topic"
  
      props = {
          'DisplayName': (basestring, False),
          'KmsMasterKeyId': (basestring, False),
          'Subscription': ([Subscription], False),
+         'Tags': (Tags, False),
          'TopicName': (basestring, False),
      }
  
Add Tags to SNS::Topic per 2019-11-31 changes
## Code Before:

from . import AWSObject, AWSProperty
from .compat import policytypes
from .validators import boolean


class Subscription(AWSProperty):
    props = {
        'Endpoint': (basestring, True),
        'Protocol': (basestring, True),
    }


class SubscriptionResource(AWSObject):
    resource_type = "AWS::SNS::Subscription"

    props = {
        'DeliveryPolicy': (dict, False),
        'Endpoint': (basestring, False),
        'FilterPolicy': (dict, False),
        'Protocol': (basestring, True),
        'RawMessageDelivery': (boolean, False),
        'Region': (basestring, False),
        'TopicArn': (basestring, True),
    }


class TopicPolicy(AWSObject):
    resource_type = "AWS::SNS::TopicPolicy"

    props = {
        'PolicyDocument': (policytypes, True),
        'Topics': (list, True),
    }


class Topic(AWSObject):
    resource_type = "AWS::SNS::Topic"

    props = {
        'DisplayName': (basestring, False),
        'KmsMasterKeyId': (basestring, False),
        'Subscription': ([Subscription], False),
        'TopicName': (basestring, False),
    }

## Instruction:
Add Tags to SNS::Topic per 2019-11-31 changes
## Code After:

from . import AWSObject, AWSProperty, Tags
from .compat import policytypes
from .validators import boolean


class Subscription(AWSProperty):
    props = {
        'Endpoint': (basestring, True),
        'Protocol': (basestring, True),
    }


class SubscriptionResource(AWSObject):
    resource_type = "AWS::SNS::Subscription"

    props = {
        'DeliveryPolicy': (dict, False),
        'Endpoint': (basestring, False),
        'FilterPolicy': (dict, False),
        'Protocol': (basestring, True),
        'RawMessageDelivery': (boolean, False),
        'Region': (basestring, False),
        'TopicArn': (basestring, True),
    }


class TopicPolicy(AWSObject):
    resource_type = "AWS::SNS::TopicPolicy"

    props = {
        'PolicyDocument': (policytypes, True),
        'Topics': (list, True),
    }


class Topic(AWSObject):
    resource_type = "AWS::SNS::Topic"

    props = {
        'DisplayName': (basestring, False),
        'KmsMasterKeyId': (basestring, False),
        'Subscription': ([Subscription], False),
        'Tags': (Tags, False),
        'TopicName': (basestring, False),
    }
