toImageFailureCode method

ImageFailureCode toImageFailureCode()

Implementation

ImageFailureCode toImageFailureCode() {
  switch (this) {
    case 'InvalidImageDigest':
      return ImageFailureCode.invalidImageDigest;
    case 'InvalidImageTag':
      return ImageFailureCode.invalidImageTag;
    case 'ImageTagDoesNotMatchDigest':
      return ImageFailureCode.imageTagDoesNotMatchDigest;
    case 'ImageNotFound':
      return ImageFailureCode.imageNotFound;
    case 'MissingDigestAndTag':
      return ImageFailureCode.missingDigestAndTag;
    case 'ImageReferencedByManifestList':
      return ImageFailureCode.imageReferencedByManifestList;
    case 'KmsError':
      return ImageFailureCode.kmsError;
  }
  throw Exception('$this is not known in enum ImageFailureCode');
}