toGrantOperation method

GrantOperation toGrantOperation()

Implementation

GrantOperation toGrantOperation() {
  switch (this) {
    case 'Decrypt':
      return GrantOperation.decrypt;
    case 'Encrypt':
      return GrantOperation.encrypt;
    case 'GenerateDataKey':
      return GrantOperation.generateDataKey;
    case 'GenerateDataKeyWithoutPlaintext':
      return GrantOperation.generateDataKeyWithoutPlaintext;
    case 'ReEncryptFrom':
      return GrantOperation.reEncryptFrom;
    case 'ReEncryptTo':
      return GrantOperation.reEncryptTo;
    case 'Sign':
      return GrantOperation.sign;
    case 'Verify':
      return GrantOperation.verify;
    case 'GetPublicKey':
      return GrantOperation.getPublicKey;
    case 'CreateGrant':
      return GrantOperation.createGrant;
    case 'RetireGrant':
      return GrantOperation.retireGrant;
    case 'DescribeKey':
      return GrantOperation.describeKey;
    case 'GenerateDataKeyPair':
      return GrantOperation.generateDataKeyPair;
    case 'GenerateDataKeyPairWithoutPlaintext':
      return GrantOperation.generateDataKeyPairWithoutPlaintext;
  }
  throw Exception('$this is not known in enum GrantOperation');
}