# Copyright (c) 2012-2017, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.

from . import AWSObject, AWSProperty, Tags


class Instance(AWSObject):
    resource_type = "AWS::ServiceDiscovery::Instance"

    props = {
        "InstanceAttributes": (dict, True),
        "InstanceId": (str, False),
        "ServiceId": (str, True),
    }


class PrivateDnsNamespace(AWSObject):
    resource_type = "AWS::ServiceDiscovery::PrivateDnsNamespace"

    props = {
        "Description": (str, False),
        "Name": (str, True),
        "Tags": (Tags, False),
        "Vpc": (str, True),
    }


class PublicDnsNamespace(AWSObject):
    resource_type = "AWS::ServiceDiscovery::PublicDnsNamespace"

    props = {
        "Description": (str, False),
        "Name": (str, True),
        "Tags": (Tags, False),
    }


class HealthCheckConfig(AWSProperty):
    props = {
        "FailureThreshold": (float, False),
        "ResourcePath": (str, False),
        "Type": (str, True),
    }


class HealthCheckCustomConfig(AWSProperty):
    props = {"FailureThreshold": (float, True)}


class DnsRecord(AWSProperty):
    props = {
        "TTL": (str, True),
        "Type": (str, True),
    }


class DnsConfig(AWSProperty):
    props = {
        "DnsRecords": ([DnsRecord], True),
        "NamespaceId": (str, False),
        "RoutingPolicy": (str, False),
    }


class Service(AWSObject):
    resource_type = "AWS::ServiceDiscovery::Service"

    props = {
        "Description": (str, False),
        "DnsConfig": (DnsConfig, False),
        "HealthCheckConfig": (HealthCheckConfig, False),
        "HealthCheckCustomConfig": (HealthCheckCustomConfig, False),
        "Name": (str, False),
        "NamespaceId": (str, False),
        "Tags": (Tags, False),
    }


class HttpNamespace(AWSObject):
    resource_type = "AWS::ServiceDiscovery::HttpNamespace"

    props = {
        "Description": (str, False),
        "Name": (str, True),
        "Tags": (Tags, False),
    }

@@ -20,10 +20,10 @@
 2-20
+2
 1
-7
 , Ma
@@ -112,51 +112,426 @@
 se.%0A
-%0Afrom . import AWSObject, AWSProperty, Tags
+#%0A# *** Do not modify - this file is autogenerated ***%0A# Resource specification version: 35.0.0%0A%0A%0Afrom . import AWSObject%0Afrom . import AWSProperty%0Afrom troposphere import Tags%0Afrom .validators import double%0A%0A%0Aclass HttpNamespace(AWSObject):%0A    resource_type = %22AWS::ServiceDiscovery::HttpNamespace%22%0A%0A    props = %7B%0A        %22Description%22: (str, False),%0A        %22Name%22: (str, True),%0A        %22Tags%22: (Tags, False),%0A    %7D
 %0A%0A%0Ac
@@ -1225,27 +1225,131 @@
 %0A%0Aclass 
-HealthCheck
+DnsRecord(AWSProperty):%0A    props = %7B%0A        %22TTL%22: (double, True),%0A        %22Type%22: (str, True),%0A    %7D%0A%0A%0Aclass Dns
 Config(A
@@ -1388,39 +1388,38 @@
    %22
-FailureThreshold%22: (float, Fals
+DnsRecords%22: (%5BDnsRecord%5D, Tru
 e),%0A
@@ -1431,20 +1431,19 @@
    %22
-ResourcePath
+NamespaceId
 %22: (
@@ -1456,36 +1456,45 @@
 alse),%0A        %22
-Type
+RoutingPolicy
 %22: (str, True),%0A
@@ -1478,35 +1478,36 @@
 gPolicy%22: (str, 
-Tru
+Fals
 e),%0A    %7D%0A%0A%0Aclas
@@ -1516,30 +1516,24 @@
 HealthCheckC
-ustomC
 onfig(AWSPro
@@ -1553,16 +1553,25 @@
 rops = %7B
+%0A        
 %22Failure
@@ -1587,80 +1587,45 @@
 %22: (
-float, True)%7D%0A%0A%0Aclass DnsRecord(AWSProperty):%0A    props = %7B%0A        %22TTL
+double, False),%0A        %22ResourcePath
 %22: (
@@ -1621,35 +1621,36 @@
 rcePath%22: (str, 
-Tru
+Fals
 e),%0A        %22Typ
@@ -1672,35 +1672,49 @@
 ,%0A    %7D%0A%0A%0Aclass 
-Dns
+HealthCheckCustom
 Config(AWSProper
@@ -1745,108 +1745,34 @@
    %22
-DnsRecords%22: (%5BDnsRecord%5D, True),%0A        %22NamespaceId%22: (str, False),%0A        %22RoutingPolicy%22: (str
+FailureThreshold%22: (double
 , Fa
@@ -2189,205 +2189,24 @@
     
-%7D%0A%0A%0Aclass HttpNamespace(AWSObject):%0A    resource_type = %22AWS::ServiceDiscovery::HttpNamespace%22%0A%0A    props = %7B%0A        %22Description%22: (str, False),%0A        %22Name%22: (str, True),%0A        %22Tags%22: (Tags
+    %22Type%22: (str
 , Fa

Update ServiceDiscovery per 2021-03-18 changes and re-gen file