code: function _createServiceCheck(src) {
    var dst = {};
  
    if ((src.grpc || src.http || src.tcp || src.args || src.script) && src.interval) {
      if (src.grpc) {
        dst.GRPC = src.grpc;
        if (src.hasOwnProperty('grpcusetls')) dst.GRPCUseTLS = src.grpcusetls;
      } else if (src.http) {
        dst.HTTP = src.http;
        if (src.hasOwnProperty('tlsskipverify')) dst.TLSSkipVerify = src.tlsskipverify;
      } else if (src.tcp){
        dst.TCP = src.tcp;
      } else {
        if (src.args) {
          dst.Args = src.args;
        } else {
          dst.Script = src.script;
        }
        if (src.hasOwnProperty('dockercontainerid')) dst.DockerContainerID = src.dockercontainerid;
        if (src.hasOwnProperty('shell')) dst.Shell = src.shell;
      }
      dst.Interval = src.interval;
      if (src.hasOwnProperty('timeout')) dst.Timeout = src.timeout;
    } else if (src.ttl) {
      dst.TTL = src.ttl;
    } else {
      throw new Error('args/grpc/http/tcp and interval, or ttl');
    }
    if (src.hasOwnProperty('notes')) dst.Notes = src.notes;
    if (src.hasOwnProperty('status')) dst.Status = src.status;
    if (src.hasOwnProperty('deregistercriticalserviceafter')) {
      dst.DeregisterCriticalServiceAfter = src.deregistercriticalserviceafter;
    }
  
    return dst;
  }
docs: Create node/server-level check object
  Corresponds to CheckType in Consul Agent Endpoint:
  https://github.com/hashicorp/consul/blob/master/command/agent/check.go#L43
  Corresponds to AgentServiceCheck in Consul Go API (which currently omits Notes):
  https://github.com/hashicorp/consul/blob/master/api/agent.go#L66
  Currently omits ID and Name fields:
  https://github.com/hashicorp/consul/issues/2223