<s> from openstack import format <EOL> from openstack . object_store . v1 import _base <EOL> from openstack import resource <EOL> class Container ( _base . BaseResource ) : <EOL> _custom_metadata_prefix = "<STR_LIT>" <EOL> _system_metadata = { <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" , <EOL> "<STR_LIT>" : "<STR_LIT>" <EOL> } <EOL> base_path = "<STR_LIT:/>" <EOL> id_attribute = "<STR_LIT:name>" <EOL> allow_create = True <EOL> allow_retrieve = True <EOL> allow_update = True <EOL> allow_delete = True <EOL> allow_list = True <EOL> allow_head = True <EOL> name = resource . prop ( "<STR_LIT:name>" ) <EOL> count = resource . prop ( "<STR_LIT:count>" ) <EOL> bytes = resource . prop ( "<STR_LIT>" ) <EOL> object_count = resource . header ( "<STR_LIT>" , type = int ) <EOL> bytes_used = resource . header ( "<STR_LIT>" , type = int ) <EOL> timestamp = resource . header ( "<STR_LIT>" , type = format . UNIXEpoch ) <EOL> is_newest = resource . header ( "<STR_LIT>" , type = bool ) <EOL> read_ACL = resource . header ( "<STR_LIT>" ) <EOL> write_ACL = resource . header ( "<STR_LIT>" ) <EOL> sync_to = resource . header ( "<STR_LIT>" ) <EOL> sync_key = resource . header ( "<STR_LIT>" ) <EOL> versions_location = resource . header ( "<STR_LIT>" ) <EOL> content_type = resource . header ( "<STR_LIT>" ) <EOL> is_content_type_detected = resource . header ( "<STR_LIT>" , <EOL> type = bool ) <EOL> if_none_match = resource . header ( "<STR_LIT>" ) <EOL> @ classmethod <EOL> def create_by_id ( cls , session , attrs , resource_id = None ) : <EOL> """<STR_LIT>""" <EOL> url = cls . _get_url ( None , resource_id ) <EOL> headers = attrs . get ( resource . HEADERS , dict ( ) ) <EOL> headers [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> return session . put ( url , endpoint_filter = cls . service , <EOL> headers = headers ) . headers <EOL> def create ( self , session ) : <EOL> """<STR_LIT>""" <EOL> resp = self . create_by_id ( session , self . _attrs , self . id ) <EOL> self . set_headers ( resp ) <EOL> self . _reset_dirty ( ) <EOL> return self </s>
