toDeliveryStreamFailureType method

DeliveryStreamFailureType toDeliveryStreamFailureType()

Implementation

DeliveryStreamFailureType toDeliveryStreamFailureType() {
  switch (this) {
    case 'RETIRE_KMS_GRANT_FAILED':
      return DeliveryStreamFailureType.retireKmsGrantFailed;
    case 'CREATE_KMS_GRANT_FAILED':
      return DeliveryStreamFailureType.createKmsGrantFailed;
    case 'KMS_ACCESS_DENIED':
      return DeliveryStreamFailureType.kmsAccessDenied;
    case 'DISABLED_KMS_KEY':
      return DeliveryStreamFailureType.disabledKmsKey;
    case 'INVALID_KMS_KEY':
      return DeliveryStreamFailureType.invalidKmsKey;
    case 'KMS_KEY_NOT_FOUND':
      return DeliveryStreamFailureType.kmsKeyNotFound;
    case 'KMS_OPT_IN_REQUIRED':
      return DeliveryStreamFailureType.kmsOptInRequired;
    case 'CREATE_ENI_FAILED':
      return DeliveryStreamFailureType.createEniFailed;
    case 'DELETE_ENI_FAILED':
      return DeliveryStreamFailureType.deleteEniFailed;
    case 'SUBNET_NOT_FOUND':
      return DeliveryStreamFailureType.subnetNotFound;
    case 'SECURITY_GROUP_NOT_FOUND':
      return DeliveryStreamFailureType.securityGroupNotFound;
    case 'ENI_ACCESS_DENIED':
      return DeliveryStreamFailureType.eniAccessDenied;
    case 'SUBNET_ACCESS_DENIED':
      return DeliveryStreamFailureType.subnetAccessDenied;
    case 'SECURITY_GROUP_ACCESS_DENIED':
      return DeliveryStreamFailureType.securityGroupAccessDenied;
    case 'UNKNOWN_ERROR':
      return DeliveryStreamFailureType.unknownError;
  }
  throw Exception('$this is not known in enum DeliveryStreamFailureType');
}