@classmethod
  def JsonLifecycleToMessage(cls, json_txt):
    try:
      deserialized_lifecycle = json.loads(json_txt)
      # If lifecycle JSON is the in the following format
      # {'lifecycle': {'rule': ... then strip out the 'lifecycle' key
      # and reduce it to the following format
      # {'rule': ...
      if 'lifecycle' in deserialized_lifecycle:
        deserialized_lifecycle = deserialized_lifecycle['lifecycle']
      lifecycle = encoding.DictToMessage(
          deserialized_lifecycle, apitools_messages.Bucket.LifecycleValue)
      return lifecycle
    except ValueError:
      CheckForXmlConfigurationAndRaise('lifecycle', json_txt)
Validates URI argument and creates blank ACL entity
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/translation_helper.py/LifecycleTranslation.JsonLifecycleToMessage--crossover with--dataset/ETHPy150Open openstack/python-barbicanclient/barbicanclient/barbican_cli/acls.py/ArgMixin.create_blank_acl_entity_from_uri