prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Cloudwatch Alarm Threshold Type
  The parameter type 'Threshold' within Cloudwatch Alarms is currently of type 'integer' whereas the AWS documentations notes this should be a String.
  
  http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold
  
  I am hitting an issue when using alarms to check instance health - to monitor StatusCheckFailed I have an implementation which sets Threshold to 0.5 to evaluate a healthcheck of sorts. This works in Cloudformation but fails when I try to use it in the troposphere code.
  
  I think the line 'Threshold': (integer, True), should be 'Threshold': (basestring, True), within cloudwatch.py
  
  Any thoughts?
  
  
  </issue>
  <code>
  [start of troposphere/cloudwatch.py]
  1 # Copyright (c) 2013, Mark Peek <mark@peek.org>
  2 # All rights reserved.
  3 #
  4 # See LICENSE file for full license.
  5 
  6 from . import AWSObject, AWSProperty, Ref
  7 from .validators import integer, positive_integer, boolean
  8 
  9 
  10 class MetricDimension(AWSProperty):
  11     props = {
  12         'Name': (basestring, True),
  13         'Value': (basestring, True),
  14     }
  15 
  16 
  17 class Alarm(AWSObject):
  18     resource_type = "AWS::CloudWatch::Alarm"
  19 
  20     props = {
  21         'ActionsEnabled': (boolean, False),
  22         'AlarmActions': ([basestring, Ref], False),
  23         'AlarmDescription': (basestring, False),
  24         'AlarmName': (basestring, False),
  25         'ComparisonOperator': (basestring, True),
  26         'Dimensions': ([MetricDimension], False),
  27         'EvaluationPeriods': (positive_integer, True),
  28         'InsufficientDataActions': ([basestring, Ref], False),
  29         'MetricName': (basestring, True),
  30         'Namespace': (basestring, True),
  31         'OKActions': ([basestring, Ref], False),
  32         'Period': (positive_integer, True),
  33         'Statistic': (basestring, True),
  34         'Threshold': (integer, True),
  35         'Unit': (basestring, False),
  36     }
  37
  [end of troposphere/cloudwatch.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/cloudwatch.py b/troposphere/cloudwatch.py
  --- a/troposphere/cloudwatch.py
  +++ b/troposphere/cloudwatch.py
  @@ -4,7 +4,7 @@
   # See LICENSE file for full license.
   
   from . import AWSObject, AWSProperty, Ref
  -from .validators import integer, positive_integer, boolean
  +from .validators import positive_integer, boolean
   
   
   class MetricDimension(AWSProperty):
  @@ -31,6 +31,6 @@
           'OKActions': ([basestring, Ref], False),
           'Period': (positive_integer, True),
           'Statistic': (basestring, True),
  -        'Threshold': (integer, True),
  +        'Threshold': (basestring, True),
           'Unit': (basestring, False),
       }
  
verification_info: {"golden_diff": "diff --git a/troposphere/cloudwatch.py b/troposphere/cloudwatch.py\n--- a/troposphere/cloudwatch.py\n+++ b/troposphere/cloudwatch.py\n@@ -4,7 +4,7 @@\n # See LICENSE file for full license.\n \n from . import AWSObject, AWSProperty, Ref\n-from .validators import integer, positive_integer, boolean\n+from .validators import positive_integer, boolean\n \n \n class MetricDimension(AWSProperty):\n@@ -31,6 +31,6 @@\n         'OKActions': ([basestring, Ref], False),\n         'Period': (positive_integer, True),\n         'Statistic': (basestring, True),\n-        'Threshold': (integer, True),\n+        'Threshold': (basestring, True),\n         'Unit': (basestring, False),\n     }\n", "issue": "Cloudwatch Alarm Threshold Type\nThe parameter type 'Threshold' within Cloudwatch Alarms is currently of type 'integer' whereas the AWS documentations notes this should be a String.\n\nhttp://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cw-alarm.html#cfn-cloudwatch-alarms-threshold\n\nI am hitting an issue when using alarms to check instance health - to monitor StatusCheckFailed I have an implementation which sets Threshold to 0.5 to evaluate a healthcheck of sorts. This works in Cloudformation but fails when I try to use it in the troposphere code.\n\nI think the line 'Threshold': (integer, True), should be 'Threshold': (basestring, True), within cloudwatch.py\n\nAny thoughts?\n\n", "before_files": [{"content": "# Copyright (c) 2013, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Ref\nfrom .validators import integer, positive_integer, boolean\n\n\nclass MetricDimension(AWSProperty):\n    props = {\n        'Name': (basestring, True),\n        'Value': (basestring, True),\n    }\n\n\nclass Alarm(AWSObject):\n    resource_type = \"AWS::CloudWatch::Alarm\"\n\n    props = {\n        'ActionsEnabled': (boolean, False),\n        'AlarmActions': ([basestring, Ref], False),\n        'AlarmDescription': (basestring, False),\n        'AlarmName': (basestring, False),\n        'ComparisonOperator': (basestring, True),\n        'Dimensions': ([MetricDimension], False),\n        'EvaluationPeriods': (positive_integer, True),\n        'InsufficientDataActions': ([basestring, Ref], False),\n        'MetricName': (basestring, True),\n        'Namespace': (basestring, True),\n        'OKActions': ([basestring, Ref], False),\n        'Period': (positive_integer, True),\n        'Statistic': (basestring, True),\n        'Threshold': (integer, True),\n        'Unit': (basestring, False),\n    }\n", "path": "troposphere/cloudwatch.py"}]}