<s> """<STR_LIT>""" <EOL> import base64 <EOL> from decimal import Decimal as _Decimal <EOL> import isodate <EOL> import six <EOL> from zeep . xsd . types import SimpleType <EOL> class String ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return six . text_type ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return value <EOL> class Boolean ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return '<STR_LIT:true>' if value else '<STR_LIT:false>' <EOL> def pythonvalue ( self , value ) : <EOL> """<STR_LIT>""" <EOL> return value in ( '<STR_LIT:true>' , '<STR_LIT:1>' ) <EOL> class Decimal ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return _Decimal ( value ) <EOL> class Float ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) . upper ( ) <EOL> def pythonvalue ( self , value ) : <EOL> return float ( value ) <EOL> class Double ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return float ( value ) <EOL> class Duration ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return isodate . duration_isoformat ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return isodate . parse_duration ( value ) <EOL> class DateTime ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return value . strftime ( '<STR_LIT>' ) <EOL> def pythonvalue ( self , value ) : <EOL> return isodate . parse_datetime ( value ) <EOL> class Time ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return value . strftime ( '<STR_LIT>' ) <EOL> def pythonvalue ( self , value ) : <EOL> return isodate . parse_time ( value ) <EOL> class Date ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return value . strftime ( '<STR_LIT>' ) <EOL> def pythonvalue ( self , value ) : <EOL> return isodate . parse_date ( value ) <EOL> class gYearMonth ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return str ( value ) <EOL> class gYear ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return int ( value ) <EOL> class gMonthDay ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return str ( value ) <EOL> class gDay ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return int ( value ) <EOL> class gMonth ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return int ( value ) <EOL> class HexBinary ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return str ( value ) <EOL> class Base64Binary ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return base64 . b64encode ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return base64 . b64decode ( value ) <EOL> class AnyURI ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return value <EOL> def pythonvalue ( self , value ) : <EOL> return value <EOL> class QName ( SimpleType ) : <EOL> pass <EOL> class Notation ( SimpleType ) : <EOL> pass <EOL> class NormalizedString ( String ) : <EOL> name = '<STR_LIT>' <EOL> class Token ( NormalizedString ) : <EOL> name = '<STR_LIT>' <EOL> class Language ( Token ) : <EOL> name = '<STR_LIT>' <EOL> class NmToken ( Token ) : <EOL> name = '<STR_LIT>' <EOL> class NmTokens ( NmToken ) : <EOL> name = '<STR_LIT>' <EOL> class Name ( Token ) : <EOL> name = '<STR_LIT>' <EOL> class NCName ( Name ) : <EOL> name = '<STR_LIT>' <EOL> class ID ( NCName ) : <EOL> name = '<STR_LIT>' <EOL> class IDREF ( NCName ) : <EOL> name = '<STR_LIT>' <EOL> class IDREFS ( IDREF ) : <EOL> name = '<STR_LIT>' <EOL> class Entity ( NCName ) : <EOL> name = '<STR_LIT>' <EOL> class Entities ( Entity ) : <EOL> name = '<STR_LIT>' <EOL> class Integer ( Decimal ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return str ( value ) <EOL> def pythonvalue ( self , value ) : <EOL> return int ( value ) <EOL> class NonPositiveInteger ( Integer ) : <EOL> name = '<STR_LIT>' <EOL> class NegativeInteger ( Integer ) : <EOL> name = '<STR_LIT>' <EOL> class Long ( Integer ) : <EOL> name = '<STR_LIT>' <EOL> def pythonvalue ( self , value ) : <EOL> return long ( value ) if six . PY2 else int ( value ) <EOL> class Int ( Long ) : <EOL> name = '<STR_LIT>' <EOL> class Short ( Int ) : <EOL> name = '<STR_LIT>' <EOL> class Byte ( Short ) : <EOL> """<STR_LIT>""" <EOL> name = '<STR_LIT>' <EOL> class NonNegativeInteger ( Integer ) : <EOL> name = '<STR_LIT>' <EOL> class UnsignedLong ( NonNegativeInteger ) : <EOL> name = '<STR_LIT>' <EOL> class UnsignedInt ( UnsignedLong ) : <EOL> name = '<STR_LIT>' <EOL> class UnsignedShort ( UnsignedInt ) : <EOL> name = '<STR_LIT>' <EOL> class UnsignedByte ( UnsignedShort ) : <EOL> name = '<STR_LIT>' <EOL> class PositiveInteger ( NonNegativeInteger ) : <EOL> name = '<STR_LIT>' <EOL> class AnyType ( SimpleType ) : <EOL> name = '<STR_LIT>' <EOL> def xmlvalue ( self , value ) : <EOL> return value <EOL> def pythonvalue ( self , value ) : <EOL> return value <EOL> default_types = { <EOL> '<STR_LIT>' : String ( ) , <EOL> '<STR_LIT>' : Boolean ( ) , <EOL> '<STR_LIT>' : Decimal ( ) , <EOL> '<STR_LIT>' : Float ( ) , <EOL> '<STR_LIT>' : Double ( ) , <EOL> '<STR_LIT>' : Duration ( ) , <EOL> '<STR_LIT>' : DateTime ( ) , <EOL> '<STR_LIT>' : Time ( ) , <EOL> '<STR_LIT>' : Date ( ) , <EOL> '<STR_LIT>' : gYearMonth ( ) , <EOL> '<STR_LIT>' : gYear ( ) , <EOL> '<STR_LIT>' : gMonthDay ( ) , <EOL> '<STR_LIT>' : gDay ( ) , <EOL> '<STR_LIT>' : gMonth ( ) , <EOL> '<STR_LIT>' : HexBinary ( ) , <EOL> '<STR_LIT>' : Base64Binary ( ) , <EOL> '<STR_LIT>' : AnyURI ( ) , <EOL> '<STR_LIT>' : QName ( ) , <EOL> '<STR_LIT>' : Notation ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : ID ( ) , <EOL> '<STR_LIT>' : IDREF ( ) , <EOL> '<STR_LIT>' : IDREFS ( ) , <EOL> '<STR_LIT>' : Entity ( ) , <EOL> '<STR_LIT>' : Entities ( ) , <EOL> '<STR_LIT>' : Integer ( ) , <EOL> '<STR_LIT>' : NonPositiveInteger ( ) , <EOL> '<STR_LIT>' : NegativeInteger ( ) , <EOL> '<STR_LIT>' : Long ( ) , <EOL> '<STR_LIT>' : Int ( ) , <EOL> '<STR_LIT>' : Short ( ) , <EOL> '<STR_LIT>' : Byte ( ) , <EOL> '<STR_LIT>' : NonNegativeInteger ( ) , <EOL> '<STR_LIT>' : String ( ) , <EOL> '<STR_LIT>' : UnsignedInt ( ) , <EOL> '<STR_LIT>' : UnsignedLong ( ) , <EOL> '<STR_LIT>' : UnsignedShort ( ) , <EOL> '<STR_LIT>' : PositiveInteger ( ) , <EOL> '<STR_LIT>' : AnyType ( ) , <EOL> } </s>
