toEndpointTypesElement method

EndpointTypesElement toEndpointTypesElement()

Implementation

EndpointTypesElement toEndpointTypesElement() {
  switch (this) {
    case 'PUSH':
      return EndpointTypesElement.push;
    case 'GCM':
      return EndpointTypesElement.gcm;
    case 'APNS':
      return EndpointTypesElement.apns;
    case 'APNS_SANDBOX':
      return EndpointTypesElement.apnsSandbox;
    case 'APNS_VOIP':
      return EndpointTypesElement.apnsVoip;
    case 'APNS_VOIP_SANDBOX':
      return EndpointTypesElement.apnsVoipSandbox;
    case 'ADM':
      return EndpointTypesElement.adm;
    case 'SMS':
      return EndpointTypesElement.sms;
    case 'VOICE':
      return EndpointTypesElement.voice;
    case 'EMAIL':
      return EndpointTypesElement.email;
    case 'BAIDU':
      return EndpointTypesElement.baidu;
    case 'CUSTOM':
      return EndpointTypesElement.custom;
  }
  throw Exception('$this is not known in enum EndpointTypesElement');
}