from __future__ import unicode_literals


TYPE_MESSAGES = {
    'unknown': 'Unknown type: {0}',
    'invalid': "Got value `{0}` of type `{1}`. Value must be of type(s): `{2}`",
    'invalid_header_type': (
        "Invalid type for header: `{0}`. Must be one of 'string', 'number', "
        "'integer', 'boolean', or 'array'."
    ),
    'invalid_type_for_minimum': '`minimum` can only be used for json number types',
    'invalid_type_for_maximum': '`maximum` can only be used for json number types',
    'invalid_type_for_multiple_of': '`multipleOf` can only be used for json number types',
    'invalid_type_for_min_length': '`minLength` can only be used for string types',
    'invalid_type_for_max_length': '`maxLength` can only be used for string types',
    'invalid_type_for_min_items': '`minItems` can only be used for array types',
    'invalid_type_for_max_items': '`maxItems` can only be used for array types',
    'invalid_type_for_unique_items': '`uniqueItems` can only be used for array types',
    'invalid_type_for_min_properties': 'minProperties can only be used for `object` types',
    'invalid_type_for_max_properties': 'maxProperties can only be used for `object` types',
    'non_body_parameters_must_declare_a_type': (
        "A Parameter who's `in` value is not 'body' must declare a type."
    ),
}

FORMAT_MESSAGES = {
    'invalid': "Value {0} does not conform to the format {1}",
    'invalid_uuid': "{0} is not a valid uuid",
    'invalid_date': "{0} is not a valid RFC3339 full-date",
    'invalid_datetime': "{0} is not a valid RFC3339 date-time",
    'invalid_int': (
        "Integer {0} does not conform to the format int{1}. Must be no more than {1} bits"
    ),
    'invalid_uri': "The value `{0}` is not valid according to RFC3987.",
    'invalid_email': "The email address `{0}` is invalid according to RFC5322.",
}

REQUIRED_MESSAGES = {
    'required': "This value is required",
    'path_parameters_must_be_required': (
        "A Parameter who's `in` value is 'path' must be declared as required."
    ),
}

MULTIPLE_OF_MESSAGES = {
    'invalid': "Value must be a multiple of {0}. Got {1} which is not.",
}

MINIMUM_AND_MAXIMUM_MESSAGES = {
    'invalid': "{0} must be {1} {2}",
    'must_be_greater_than_minimum': (
        "The value of `maximum` must be greater than or equal to the value of `minimum`"
    ),
    'exclusive_minimum_required_minimum': (
        "When `exclusiveMinimum` is set, `minimum` is required"
    ),
    'exclusive_maximum_required_maximum': (
        "When `exclusiveMaximum` is set, `maximum` is required"
    ),
}


MIN_LENGTH_MESSAGES = {
    "invalid": "value must be no less than {0} characters in length.",
}


MAX_LENGTH_MESSAGES = {
    "invalid": "value must be no greater than {0} characters in length.",
    'must_be_greater_than_min_length': (
        'The value of `maxLength` must be greater than or equal to the `minLength` value'
    ),
}


MIN_ITEMS_MESSAGES = {
    'invalid': "Array must have at least {0} items. It had only had {1} items.",
}


MAX_ITEMS_MESSAGES = {
    'must_be_greater_than_min_items': (
        "The value of `maxItems` must be greater than or equal to the value of `minItems`"
    ),
    'invalid': "Array must have no more than {0} items. It had {1} items.",
}


UNIQUE_ITEMS_MESSAGES = {