Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
botocore
/
File Content:
validate.pyc
� ?��Xc @ s� d Z d d l m Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d � Z d � Z d � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( sQ User input parameter validation. This module handles user input parameter validation against a provided input model. Note that the objects in this module do *not* mutate any arguments. No type version happens here. It is up to another layer to properly convert arguments to any required types. Validation Errors ----------------- i����( t sixN( t datetime( t parse_to_aware_datetime( t is_json_value_header( t ParamValidationErrorc C sC t � } | j | | � } | j � r? t d | j � � � n d S( sv Validates input parameters against a schema. This is a convenience function that validates parameters against a schema. You can also instantiate and use the ParamValidator class directly if you want more control. If there are any validation errors then a ParamValidationError will be raised. If there are no validation errors than no exception is raised and a value of None is returned. :param params: The user provided input parameters. :type shape: botocore.model.Shape :param shape: The schema which the input parameters should adhere to. :raise: ParamValidationError t reportN( t ParamValidatort validatet has_errorsR t generate_report( t paramst shapet validatorR ( ( s3 /tmp/pip-build-uEGWVr/botocore/botocore/validate.pyt validate_parameters s c s � f d � } | S( Nc s% � � f d � } � f d � � | S( Nc s, � | | | � r( � | | | | | � Sd S( N( ( t selft paramR t errorst name( t _type_checkt func( s3 /tmp/pip-build-uEGWVr/botocore/botocore/validate.pyt _on_passes_type_check6 s c sU t | � � sQ g � D] } t j | � ^ q } | j | d d | d | �t St S( Ns invalid typeR t valid_types( t isinstanceR t text_typeR t Falset True( R R R t tt valid_type_names( R ( s3 /tmp/pip-build-uEGWVr/botocore/botocore/validate.pyR : s "( ( R R ( R ( R R s3 /tmp/pip-build-uEGWVr/botocore/botocore/validate.pyt _create_type_check_guard5 s ( ( R R ( ( R s3 /tmp/pip-build-uEGWVr/botocore/botocore/validate.pyt type_check4 s c C s� t } t d � } t d � } d | j k rR | j d } | | k rR t } qR n | r} | j | | d | d | | g �n d S( Ns -inft inft minR t valid_range( R t floatt metadataR R ( R t valueR t error_typeR t failedt min_allowedt max_allowed( ( s3 /tmp/pip-build-uEGWVr/botocore/botocore/validate.pyt range_checkF s t ValidationErrorsc B s>