prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add AWS::Elasticsearch::Domain DomainEndpointOptions 
  Cloudformation now allows you to specify additional options for the domain endpoint, such as whether to require HTTPS for all traffic, with an Elasticseach Domain.  
  
  https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-domainendpointoptions.html
  
  Adding support for this would be super. 
  
  </issue>
  <code>
  [start of troposphere/elasticsearch.py]
  1 # Copyright (c) 2012-2015, Mark Peek <mark@peek.org>
  2 # All rights reserved.
  3 #
  4 # See LICENSE file for full license.
  5 
  6 from . import AWSProperty, AWSObject, Tags
  7 from .compat import policytypes
  8 from .validators import boolean, integer, integer_range, positive_integer
  9 
  10 VALID_VOLUME_TYPES = ('standard', 'gp2', 'io1')
  11 
  12 
  13 def validate_volume_type(volume_type):
  14     """Validate VolumeType for ElasticsearchDomain"""
  15     if volume_type not in VALID_VOLUME_TYPES:
  16         raise ValueError("Elasticsearch Domain VolumeType must be one of: %s" %
  17                          ", ".join(VALID_VOLUME_TYPES))
  18     return volume_type
  19 
  20 
  21 class CognitoOptions(AWSProperty):
  22     props = {
  23         'Enabled': (boolean, False),
  24         'IdentityPoolId': (basestring, False),
  25         'RoleArn': (basestring, False),
  26         'UserPoolId': (basestring, False),
  27     }
  28 
  29 
  30 class EBSOptions(AWSProperty):
  31     props = {
  32         'EBSEnabled': (boolean, False),
  33         'Iops': (positive_integer, False),
  34         'VolumeSize': (integer, False),
  35         'VolumeType': (validate_volume_type, False)
  36     }
  37 
  38     def validate(self):
  39         volume_type = self.properties.get('VolumeType')
  40         iops = self.properties.get('Iops')
  41         if volume_type == 'io1' and not iops:
  42             raise ValueError("Must specify Iops if VolumeType is 'io1'.")
  43 
  44 
  45 class ZoneAwarenessConfig(AWSProperty):
  46     props = {
  47         'AvailabilityZoneCount': (integer, False),
  48     }
  49 
  50 
  51 class ElasticsearchClusterConfig(AWSProperty):
  52     props = {
  53         'DedicatedMasterCount': (integer, False),
  54         'DedicatedMasterEnabled': (boolean, False),
  55         'DedicatedMasterType': (basestring, False),
  56         'InstanceCount': (integer, False),
  57         'InstanceType': (basestring, False),
  58         'ZoneAwarenessConfig': (ZoneAwarenessConfig, False),
  59         'ZoneAwarenessEnabled': (boolean, False)
  60     }
  61 
  62 
  63 class EncryptionAtRestOptions(AWSProperty):
  64     props = {
  65         'Enabled': (boolean, False),
  66         'KmsKeyId': (basestring, False),
  67     }
  68 
  69 
  70 class NodeToNodeEncryptionOptions(AWSProperty):
  71     props = {
  72         'Enabled': (boolean, False),
  73     }
  74 
  75 
  76 class SnapshotOptions(AWSProperty):
  77     props = {
  78         'AutomatedSnapshotStartHour': (integer_range(0, 23), False)
  79     }
  80 
  81 
  82 class VPCOptions(AWSProperty):
  83     props = {
  84         'SecurityGroupIds': ([basestring], False),
  85         'SubnetIds': ([basestring], False)
  86     }
  87 
  88 
  89 class MasterUserOptions(AWSProperty):
  90     props = {
  91         'MasterUserARN': (basestring, False),
  92         'MasterUserName': (basestring, False),
  93         'MasterUserPassword': (basestring, False),
  94     }
  95 
  96 
  97 class AdvancedSecurityOptionsInput(AWSProperty):
  98     props = {
  99         'Enabled': (boolean, False),
  100         'InternalUserDatabaseEnabled': (boolean, False),
  101         'MasterUserOptions': (MasterUserOptions, False),
  102     }
  103 
  104 
  105 class Domain(AWSObject):
  106     resource_type = "AWS::Elasticsearch::Domain"
  107 
  108     props = {
  109         'AccessPolicies': (policytypes, False),
  110         'AdvancedOptions': (dict, False),
  111         'AdvancedSecurityOptions': (AdvancedSecurityOptionsInput, False),
  112         'CognitoOptions': (CognitoOptions, False),
  113         'DomainName': (basestring, False),
  114         'EBSOptions': (EBSOptions, False),
  115         'ElasticsearchClusterConfig': (ElasticsearchClusterConfig, False),
  116         'ElasticsearchVersion': (basestring, False),
  117         'EncryptionAtRestOptions': (EncryptionAtRestOptions, False),
  118         'LogPublishingOptions': (dict, False),
  119         'NodeToNodeEncryptionOptions': (NodeToNodeEncryptionOptions, False),
  120         'SnapshotOptions': (SnapshotOptions, False),
  121         'Tags': ((Tags, list), False),
  122         'VPCOptions': (VPCOptions, False),
  123     }
  124 
  125 
  126 # Backward compatibility
  127 ElasticsearchDomain = Domain
  128
  [end of troposphere/elasticsearch.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/troposphere/elasticsearch.py b/troposphere/elasticsearch.py
  --- a/troposphere/elasticsearch.py
  +++ b/troposphere/elasticsearch.py
  @@ -8,6 +8,10 @@
   from .validators import boolean, integer, integer_range, positive_integer
   
   VALID_VOLUME_TYPES = ('standard', 'gp2', 'io1')
  +VALID_TLS_SECURITY_POLICIES = (
  +    'Policy-Min-TLS-1-0-2019-07',
  +    'Policy-Min-TLS-1-2-2019-07'
  +    )
   
   
   def validate_volume_type(volume_type):
  @@ -18,6 +22,14 @@
       return volume_type
   
   
  +def validate_tls_security_policy(tls_security_policy):
  +    """Validate TLS Security Policy for ElasticsearchDomain"""
  +    if tls_security_policy not in VALID_TLS_SECURITY_POLICIES:
  +        raise ValueError("Minimum TLS Security Policy must be one of: %s" %
  +                         ", ".join(VALID_TLS_SECURITY_POLICIES))
  +    return tls_security_policy
  +
  +
   class CognitoOptions(AWSProperty):
       props = {
           'Enabled': (boolean, False),
  @@ -27,6 +39,13 @@
       }
   
   
  +class DomainEndpointOptions(AWSProperty):
  +    props = {
  +        'EnforceHTTPS': (boolean, False),
  +        'TLSSecurityPolicy': (validate_tls_security_policy, False),
  +    }
  +
  +
   class EBSOptions(AWSProperty):
       props = {
           'EBSEnabled': (boolean, False),
  @@ -111,6 +130,7 @@
           'AdvancedSecurityOptions': (AdvancedSecurityOptionsInput, False),
           'CognitoOptions': (CognitoOptions, False),
           'DomainName': (basestring, False),
  +        'DomainEndpointOptions': (DomainEndpointOptions, False),
           'EBSOptions': (EBSOptions, False),
           'ElasticsearchClusterConfig': (ElasticsearchClusterConfig, False),
           'ElasticsearchVersion': (basestring, False),
  
verification_info: {"golden_diff": "diff --git a/troposphere/elasticsearch.py b/troposphere/elasticsearch.py\n--- a/troposphere/elasticsearch.py\n+++ b/troposphere/elasticsearch.py\n@@ -8,6 +8,10 @@\n from .validators import boolean, integer, integer_range, positive_integer\n \n VALID_VOLUME_TYPES = ('standard', 'gp2', 'io1')\n+VALID_TLS_SECURITY_POLICIES = (\n+    'Policy-Min-TLS-1-0-2019-07',\n+    'Policy-Min-TLS-1-2-2019-07'\n+    )\n \n \n def validate_volume_type(volume_type):\n@@ -18,6 +22,14 @@\n     return volume_type\n \n \n+def validate_tls_security_policy(tls_security_policy):\n+    \"\"\"Validate TLS Security Policy for ElasticsearchDomain\"\"\"\n+    if tls_security_policy not in VALID_TLS_SECURITY_POLICIES:\n+        raise ValueError(\"Minimum TLS Security Policy must be one of: %s\" %\n+                         \", \".join(VALID_TLS_SECURITY_POLICIES))\n+    return tls_security_policy\n+\n+\n class CognitoOptions(AWSProperty):\n     props = {\n         'Enabled': (boolean, False),\n@@ -27,6 +39,13 @@\n     }\n \n \n+class DomainEndpointOptions(AWSProperty):\n+    props = {\n+        'EnforceHTTPS': (boolean, False),\n+        'TLSSecurityPolicy': (validate_tls_security_policy, False),\n+    }\n+\n+\n class EBSOptions(AWSProperty):\n     props = {\n         'EBSEnabled': (boolean, False),\n@@ -111,6 +130,7 @@\n         'AdvancedSecurityOptions': (AdvancedSecurityOptionsInput, False),\n         'CognitoOptions': (CognitoOptions, False),\n         'DomainName': (basestring, False),\n+        'DomainEndpointOptions': (DomainEndpointOptions, False),\n         'EBSOptions': (EBSOptions, False),\n         'ElasticsearchClusterConfig': (ElasticsearchClusterConfig, False),\n         'ElasticsearchVersion': (basestring, False),\n", "issue": "Add AWS::Elasticsearch::Domain DomainEndpointOptions \nCloudformation now allows you to specify additional options for the domain endpoint, such as whether to require HTTPS for all traffic, with an Elasticseach Domain.  \r\n\r\nhttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticsearch-domain-domainendpointoptions.html\r\n\r\nAdding support for this would be super. \n", "before_files": [{"content": "# Copyright (c) 2012-2015, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSProperty, AWSObject, Tags\nfrom .compat import policytypes\nfrom .validators import boolean, integer, integer_range, positive_integer\n\nVALID_VOLUME_TYPES = ('standard', 'gp2', 'io1')\n\n\ndef validate_volume_type(volume_type):\n    \"\"\"Validate VolumeType for ElasticsearchDomain\"\"\"\n    if volume_type not in VALID_VOLUME_TYPES:\n        raise ValueError(\"Elasticsearch Domain VolumeType must be one of: %s\" %\n                         \", \".join(VALID_VOLUME_TYPES))\n    return volume_type\n\n\nclass CognitoOptions(AWSProperty):\n    props = {\n        'Enabled': (boolean, False),\n        'IdentityPoolId': (basestring, False),\n        'RoleArn': (basestring, False),\n        'UserPoolId': (basestring, False),\n    }\n\n\nclass EBSOptions(AWSProperty):\n    props = {\n        'EBSEnabled': (boolean, False),\n        'Iops': (positive_integer, False),\n        'VolumeSize': (integer, False),\n        'VolumeType': (validate_volume_type, False)\n    }\n\n    def validate(self):\n        volume_type = self.properties.get('VolumeType')\n        iops = self.properties.get('Iops')\n        if volume_type == 'io1' and not iops:\n            raise ValueError(\"Must specify Iops if VolumeType is 'io1'.\")\n\n\nclass ZoneAwarenessConfig(AWSProperty):\n    props = {\n        'AvailabilityZoneCount': (integer, False),\n    }\n\n\nclass ElasticsearchClusterConfig(AWSProperty):\n    props = {\n        'DedicatedMasterCount': (integer, False),\n        'DedicatedMasterEnabled': (boolean, False),\n        'DedicatedMasterType': (basestring, False),\n        'InstanceCount': (integer, False),\n        'InstanceType': (basestring, False),\n        'ZoneAwarenessConfig': (ZoneAwarenessConfig, False),\n        'ZoneAwarenessEnabled': (boolean, False)\n    }\n\n\nclass EncryptionAtRestOptions(AWSProperty):\n    props = {\n        'Enabled': (boolean, False),\n        'KmsKeyId': (basestring, False),\n    }\n\n\nclass NodeToNodeEncryptionOptions(AWSProperty):\n    props = {\n        'Enabled': (boolean, False),\n    }\n\n\nclass SnapshotOptions(AWSProperty):\n    props = {\n        'AutomatedSnapshotStartHour': (integer_range(0, 23), False)\n    }\n\n\nclass VPCOptions(AWSProperty):\n    props = {\n        'SecurityGroupIds': ([basestring], False),\n        'SubnetIds': ([basestring], False)\n    }\n\n\nclass MasterUserOptions(AWSProperty):\n    props = {\n        'MasterUserARN': (basestring, False),\n        'MasterUserName': (basestring, False),\n        'MasterUserPassword': (basestring, False),\n    }\n\n\nclass AdvancedSecurityOptionsInput(AWSProperty):\n    props = {\n        'Enabled': (boolean, False),\n        'InternalUserDatabaseEnabled': (boolean, False),\n        'MasterUserOptions': (MasterUserOptions, False),\n    }\n\n\nclass Domain(AWSObject):\n    resource_type = \"AWS::Elasticsearch::Domain\"\n\n    props = {\n        'AccessPolicies': (policytypes, False),\n        'AdvancedOptions': (dict, False),\n        'AdvancedSecurityOptions': (AdvancedSecurityOptionsInput, False),\n        'CognitoOptions': (CognitoOptions, False),\n        'DomainName': (basestring, False),\n        'EBSOptions': (EBSOptions, False),\n        'ElasticsearchClusterConfig': (ElasticsearchClusterConfig, False),\n        'ElasticsearchVersion': (basestring, False),\n        'EncryptionAtRestOptions': (EncryptionAtRestOptions, False),\n        'LogPublishingOptions': (dict, False),\n        'NodeToNodeEncryptionOptions': (NodeToNodeEncryptionOptions, False),\n        'SnapshotOptions': (SnapshotOptions, False),\n        'Tags': ((Tags, list), False),\n        'VPCOptions': (VPCOptions, False),\n    }\n\n\n# Backward compatibility\nElasticsearchDomain = Domain\n", "path": "troposphere/elasticsearch.py"}]}