export interface MetaCredentialType {
  id?: number;
  name?: string;
  key?: string;
  createDate?: Date;
}

export enum MetaCredentialTypeEnum {
  NONE = 'NONE',
  Windows = 'WINDOWS',
  Linux = 'LINUX',
  Solaris = 'SOLARIS',
  MacOS = 'MACOS',
  VMWare = 'VMWARE',
  XenServer = 'XENSERVER',
  SNMP = 'SNMP',
  Database = 'DATABASE',
  AmazoneCloudWatch = 'AMAZON_CLOUDWATCH',
}

export const toMetaCredentialTypeEnum = (v: MetaCredentialType): MetaCredentialTypeEnum => {
  return MetaCredentialTypeEnum[v.key];
};

export const toMetaCredentialType = (v: MetaCredentialTypeEnum): MetaCredentialType => {
  return {
    key: v,
  };
};
