3 O4Â\Sã@s0ddlmZGdd„deƒZGdd„deƒZdS)é)ÚEnumc@s0eZdZdZdZiZdd„Zdd„Zdd„ZdS) Ú SamResourcea4 Class representing a SAM resource. It is designed to make minimal assumptions about the resource structure. Any mutating methods also touch only "Properties" and "Type" attributes of the resource. This allows compatibility with any CloudFormation constructs, like DependsOn, Conditions etc. NcCs2||_|jdƒ|_|jddƒ|_|jdiƒ|_dS)zŸ Initialize the object given the resource as a dictionary :param dict resource_dict: Resource dictionary containing type & properties ÚTypeÚ ConditionNÚ Properties)Ú resource_dictÚgetÚtypeZ conditionÚ properties)Úselfr©r ú‚/Users/sshvans/Documents/Work/Quickstart/python-virtual-environments/env/lib/python3.6/site-packages/samtranslator/sdk/resource.pyÚ__init__ s zSamResource.__init__cCs tj|jƒS)zg Checks if the resource data is valid :return: True, if the resource is valid )ÚSamResourceTypeÚ has_valuer )r r r r ÚvalidszSamResource.validcCs&|jƒr |j|jd<|j|jd<|jS)Nrr)rr rr )r r r r Úto_dict$s  zSamResource.to_dict) Ú__name__Ú __module__Ú __qualname__Ú__doc__r r rrrr r r r rs  rc@s0eZdZdZdZdZdZdZdZe dd„ƒZ d S) rz% Enum of supported SAM types zAWS::Serverless::ApizAWS::Serverless::FunctionzAWS::Serverless::SimpleTablezAWS::Serverless::ApplicationzAWS::Serverless::LayerVersioncst‡fdd„|DƒƒS)z  Checks if the given value belongs to the Enum :param string value: Value to be checked :return: True, if input is in the Enum c3s|]}ˆ|jkVqdS)N)Úvalue)Ú.0Úitem)rr r ú Asz,SamResourceType.has_value..)Úany)Úclsrr )rr r9szSamResourceType.has_valueN) rrrrZApiZFunctionZ SimpleTableZ ApplicationZLambdaLayerVersionÚ classmethodrr r r r r/srN)ÚenumrÚobjectrrr r r r Ús +