// Code generated by Thrift Compiler (0.17.0). DO NOT EDIT.

package main

import (
	"context"
	"flag"
	"fmt"
	"math"
	"net"
	"net/url"
	"os"
	"strconv"
	"strings"
	thrift "github.com/apache/thrift/lib/go/thrift"
	"github.com/alibaba/pairec/v2/datasource/hbase_thrift/gen-go/hbase"
)

var _ = hbase.GoUnusedProtection__

func Usage() {
  fmt.Fprintln(os.Stderr, "Usage of ", os.Args[0], " [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]:")
  flag.PrintDefaults()
  fmt.Fprintln(os.Stderr, "\nFunctions:")
  fmt.Fprintln(os.Stderr, "  bool exists(string table, TGet tget)")
  fmt.Fprintln(os.Stderr, "   existsAll(string table,  tgets)")
  fmt.Fprintln(os.Stderr, "  TResult get(string table, TGet tget)")
  fmt.Fprintln(os.Stderr, "   getMultiple(string table,  tgets)")
  fmt.Fprintln(os.Stderr, "  void put(string table, TPut tput)")
  fmt.Fprintln(os.Stderr, "  bool checkAndPut(string table, string row, string family, string qualifier, string value, TPut tput)")
  fmt.Fprintln(os.Stderr, "  void putMultiple(string table,  tputs)")
  fmt.Fprintln(os.Stderr, "  void deleteSingle(string table, TDelete tdelete)")
  fmt.Fprintln(os.Stderr, "   deleteMultiple(string table,  tdeletes)")
  fmt.Fprintln(os.Stderr, "  bool checkAndDelete(string table, string row, string family, string qualifier, string value, TDelete tdelete)")
  fmt.Fprintln(os.Stderr, "  TResult increment(string table, TIncrement tincrement)")
  fmt.Fprintln(os.Stderr, "  TResult append(string table, TAppend tappend)")
  fmt.Fprintln(os.Stderr, "  i32 openScanner(string table, TScan tscan)")
  fmt.Fprintln(os.Stderr, "   getScannerRows(i32 scannerId, i32 numRows)")
  fmt.Fprintln(os.Stderr, "  void closeScanner(i32 scannerId)")
  fmt.Fprintln(os.Stderr, "  void mutateRow(string table, TRowMutations trowMutations)")
  fmt.Fprintln(os.Stderr, "   getScannerResults(string table, TScan tscan, i32 numRows)")
  fmt.Fprintln(os.Stderr, "  THRegionLocation getRegionLocation(string table, string row, bool reload)")
  fmt.Fprintln(os.Stderr, "   getAllRegionLocations(string table)")
  fmt.Fprintln(os.Stderr, "  bool checkAndMutate(string table, string row, string family, string qualifier, TCompareOp compareOp, string value, TRowMutations rowMutations)")
  fmt.Fprintln(os.Stderr, "  TTableDescriptor getTableDescriptor(TTableName table)")
  fmt.Fprintln(os.Stderr, "   getTableDescriptors( tables)")
  fmt.Fprintln(os.Stderr, "  bool tableExists(TTableName tableName)")
  fmt.Fprintln(os.Stderr, "   getTableDescriptorsByPattern(string regex, bool includeSysTables)")
  fmt.Fprintln(os.Stderr, "   getTableDescriptorsByNamespace(string name)")
  fmt.Fprintln(os.Stderr, "   getTableNamesByPattern(string regex, bool includeSysTables)")
  fmt.Fprintln(os.Stderr, "   getTableNamesByNamespace(string name)")
  fmt.Fprintln(os.Stderr, "  void createTable(TTableDescriptor desc,  splitKeys)")
  fmt.Fprintln(os.Stderr, "  void deleteTable(TTableName tableName)")
  fmt.Fprintln(os.Stderr, "  void truncateTable(TTableName tableName, bool preserveSplits)")
  fmt.Fprintln(os.Stderr, "  void enableTable(TTableName tableName)")
  fmt.Fprintln(os.Stderr, "  void disableTable(TTableName tableName)")
  fmt.Fprintln(os.Stderr, "  bool isTableEnabled(TTableName tableName)")
  fmt.Fprintln(os.Stderr, "  bool isTableDisabled(TTableName tableName)")
  fmt.Fprintln(os.Stderr, "  bool isTableAvailable(TTableName tableName)")
  fmt.Fprintln(os.Stderr, "  bool isTableAvailableWithSplit(TTableName tableName,  splitKeys)")
  fmt.Fprintln(os.Stderr, "  void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column)")
  fmt.Fprintln(os.Stderr, "  void deleteColumnFamily(TTableName tableName, string column)")
  fmt.Fprintln(os.Stderr, "  void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column)")
  fmt.Fprintln(os.Stderr, "  void modifyTable(TTableDescriptor desc)")
  fmt.Fprintln(os.Stderr, "  void createNamespace(TNamespaceDescriptor namespaceDesc)")
  fmt.Fprintln(os.Stderr, "  void modifyNamespace(TNamespaceDescriptor namespaceDesc)")
  fmt.Fprintln(os.Stderr, "  void deleteNamespace(string name)")
  fmt.Fprintln(os.Stderr, "  TNamespaceDescriptor getNamespaceDescriptor(string name)")
  fmt.Fprintln(os.Stderr, "   listNamespaceDescriptors()")
  fmt.Fprintln(os.Stderr)
  os.Exit(0)
}

type httpHeaders map[string]string

func (h httpHeaders) String() string {
  var m map[string]string = h
  return fmt.Sprintf("%s", m)
}

func (h httpHeaders) Set(value string) error {
  parts := strings.Split(value, ": ")
  if len(parts) != 2 {
    return fmt.Errorf("header should be of format 'Key: Value'")
  }
  h[parts[0]] = parts[1]
  return nil
}

func main() {
  flag.Usage = Usage
  var host string
  var port int
  var protocol string
  var urlString string
  var framed bool
  var useHttp bool
  headers := make(httpHeaders)
  var parsedUrl *url.URL
  var trans thrift.TTransport
  _ = strconv.Atoi
  _ = math.Abs
  flag.Usage = Usage
  flag.StringVar(&host, "h", "localhost", "Specify host and port")
  flag.IntVar(&port, "p", 9090, "Specify port")
  flag.StringVar(&protocol, "P", "binary", "Specify the protocol (binary, compact, simplejson, json)")
  flag.StringVar(&urlString, "u", "", "Specify the url")
  flag.BoolVar(&framed, "framed", false, "Use framed transport")
  flag.BoolVar(&useHttp, "http", false, "Use http")
  flag.Var(headers, "H", "Headers to set on the http(s) request (e.g. -H \"Key: Value\")")
  flag.Parse()
  
  if len(urlString) > 0 {
    var err error
    parsedUrl, err = url.Parse(urlString)
    if err != nil {
      fmt.Fprintln(os.Stderr, "Error parsing URL: ", err)
      flag.Usage()
    }
    host = parsedUrl.Host
    useHttp = len(parsedUrl.Scheme) <= 0 || parsedUrl.Scheme == "http" || parsedUrl.Scheme == "https"
  } else if useHttp {
    _, err := url.Parse(fmt.Sprint("http://", host, ":", port))
    if err != nil {
      fmt.Fprintln(os.Stderr, "Error parsing URL: ", err)
      flag.Usage()
    }
  }
  
  cmd := flag.Arg(0)
  var err error
  var cfg *thrift.TConfiguration = nil
  if useHttp {
    trans, err = thrift.NewTHttpClient(parsedUrl.String())
    if len(headers) > 0 {
      httptrans := trans.(*thrift.THttpClient)
      for key, value := range headers {
        httptrans.SetHeader(key, value)
      }
    }
  } else {
    portStr := fmt.Sprint(port)
    if strings.Contains(host, ":") {
           host, portStr, err = net.SplitHostPort(host)
           if err != nil {
                   fmt.Fprintln(os.Stderr, "error with host:", err)
                   os.Exit(1)
           }
    }
    trans, err = thrift.NewTSocketConf(net.JoinHostPort(host, portStr), cfg)
    if err != nil {
      fmt.Fprintln(os.Stderr, "error resolving address:", err)
      os.Exit(1)
    }
    if framed {
      trans = thrift.NewTFramedTransportConf(trans, cfg)
    }
  }
  if err != nil {
    fmt.Fprintln(os.Stderr, "Error creating transport", err)
    os.Exit(1)
  }
  defer trans.Close()
  var protocolFactory thrift.TProtocolFactory
  switch protocol {
  case "compact":
    protocolFactory = thrift.NewTCompactProtocolFactoryConf(cfg)
    break
  /**
  case "simplejson":
    protocolFactory = thrift.NewTSimpleJSONProtocolFactoryConf(cfg)
    break
 **/
  case "json":
    protocolFactory = thrift.NewTJSONProtocolFactory()
    break
  case "binary", "":
    protocolFactory = thrift.NewTBinaryProtocolFactoryConf(cfg)
    break
  default:
    fmt.Fprintln(os.Stderr, "Invalid protocol specified: ", protocol)
    Usage()
    os.Exit(1)
  }
  iprot := protocolFactory.GetProtocol(trans)
  oprot := protocolFactory.GetProtocol(trans)
  client := hbase.NewTHBaseServiceClient(thrift.NewTStandardClient(iprot, oprot))
  if err := trans.Open(); err != nil {
    fmt.Fprintln(os.Stderr, "Error opening socket to ", host, ":", port, " ", err)
    os.Exit(1)
  }
  
  switch cmd {
  case "exists":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "Exists requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg306 := flag.Arg(2)
    mbTrans307 := thrift.NewTMemoryBufferLen(len(arg306))
    defer mbTrans307.Close()
    _, err308 := mbTrans307.WriteString(arg306)
    if err308 != nil {
      Usage()
      return
    }
    factory309 := thrift.NewTJSONProtocolFactory()
    jsProt310 := factory309.GetProtocol(mbTrans307)
    argvalue1 := hbase.NewTGet()
    err311 := argvalue1.Read(context.Background(), jsProt310)
    if err311 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.Exists(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "existsAll":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "ExistsAll requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg313 := flag.Arg(2)
    mbTrans314 := thrift.NewTMemoryBufferLen(len(arg313))
    defer mbTrans314.Close()
    _, err315 := mbTrans314.WriteString(arg313)
    if err315 != nil { 
      Usage()
      return
    }
    factory316 := thrift.NewTJSONProtocolFactory()
    jsProt317 := factory316.GetProtocol(mbTrans314)
    containerStruct1 := hbase.NewTHBaseServiceExistsAllArgs()
    err318 := containerStruct1.ReadField2(context.Background(), jsProt317)
    if err318 != nil {
      Usage()
      return
    }
    argvalue1 := containerStruct1.Tgets
    value1 := argvalue1
    fmt.Print(client.ExistsAll(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "get":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "Get requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg320 := flag.Arg(2)
    mbTrans321 := thrift.NewTMemoryBufferLen(len(arg320))
    defer mbTrans321.Close()
    _, err322 := mbTrans321.WriteString(arg320)
    if err322 != nil {
      Usage()
      return
    }
    factory323 := thrift.NewTJSONProtocolFactory()
    jsProt324 := factory323.GetProtocol(mbTrans321)
    argvalue1 := hbase.NewTGet()
    err325 := argvalue1.Read(context.Background(), jsProt324)
    if err325 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.Get(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "getMultiple":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "GetMultiple requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg327 := flag.Arg(2)
    mbTrans328 := thrift.NewTMemoryBufferLen(len(arg327))
    defer mbTrans328.Close()
    _, err329 := mbTrans328.WriteString(arg327)
    if err329 != nil { 
      Usage()
      return
    }
    factory330 := thrift.NewTJSONProtocolFactory()
    jsProt331 := factory330.GetProtocol(mbTrans328)
    containerStruct1 := hbase.NewTHBaseServiceGetMultipleArgs()
    err332 := containerStruct1.ReadField2(context.Background(), jsProt331)
    if err332 != nil {
      Usage()
      return
    }
    argvalue1 := containerStruct1.Tgets
    value1 := argvalue1
    fmt.Print(client.GetMultiple(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "put":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "Put requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg334 := flag.Arg(2)
    mbTrans335 := thrift.NewTMemoryBufferLen(len(arg334))
    defer mbTrans335.Close()
    _, err336 := mbTrans335.WriteString(arg334)
    if err336 != nil {
      Usage()
      return
    }
    factory337 := thrift.NewTJSONProtocolFactory()
    jsProt338 := factory337.GetProtocol(mbTrans335)
    argvalue1 := hbase.NewTPut()
    err339 := argvalue1.Read(context.Background(), jsProt338)
    if err339 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.Put(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "checkAndPut":
    if flag.NArg() - 1 != 6 {
      fmt.Fprintln(os.Stderr, "CheckAndPut requires 6 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    argvalue1 := []byte(flag.Arg(2))
    value1 := argvalue1
    argvalue2 := []byte(flag.Arg(3))
    value2 := argvalue2
    argvalue3 := []byte(flag.Arg(4))
    value3 := argvalue3
    argvalue4 := []byte(flag.Arg(5))
    value4 := argvalue4
    arg345 := flag.Arg(6)
    mbTrans346 := thrift.NewTMemoryBufferLen(len(arg345))
    defer mbTrans346.Close()
    _, err347 := mbTrans346.WriteString(arg345)
    if err347 != nil {
      Usage()
      return
    }
    factory348 := thrift.NewTJSONProtocolFactory()
    jsProt349 := factory348.GetProtocol(mbTrans346)
    argvalue5 := hbase.NewTPut()
    err350 := argvalue5.Read(context.Background(), jsProt349)
    if err350 != nil {
      Usage()
      return
    }
    value5 := argvalue5
    fmt.Print(client.CheckAndPut(context.Background(), value0, value1, value2, value3, value4, value5))
    fmt.Print("\n")
    break
  case "putMultiple":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "PutMultiple requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg352 := flag.Arg(2)
    mbTrans353 := thrift.NewTMemoryBufferLen(len(arg352))
    defer mbTrans353.Close()
    _, err354 := mbTrans353.WriteString(arg352)
    if err354 != nil { 
      Usage()
      return
    }
    factory355 := thrift.NewTJSONProtocolFactory()
    jsProt356 := factory355.GetProtocol(mbTrans353)
    containerStruct1 := hbase.NewTHBaseServicePutMultipleArgs()
    err357 := containerStruct1.ReadField2(context.Background(), jsProt356)
    if err357 != nil {
      Usage()
      return
    }
    argvalue1 := containerStruct1.Tputs
    value1 := argvalue1
    fmt.Print(client.PutMultiple(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "deleteSingle":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "DeleteSingle requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg359 := flag.Arg(2)
    mbTrans360 := thrift.NewTMemoryBufferLen(len(arg359))
    defer mbTrans360.Close()
    _, err361 := mbTrans360.WriteString(arg359)
    if err361 != nil {
      Usage()
      return
    }
    factory362 := thrift.NewTJSONProtocolFactory()
    jsProt363 := factory362.GetProtocol(mbTrans360)
    argvalue1 := hbase.NewTDelete()
    err364 := argvalue1.Read(context.Background(), jsProt363)
    if err364 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.DeleteSingle(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "deleteMultiple":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "DeleteMultiple requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg366 := flag.Arg(2)
    mbTrans367 := thrift.NewTMemoryBufferLen(len(arg366))
    defer mbTrans367.Close()
    _, err368 := mbTrans367.WriteString(arg366)
    if err368 != nil { 
      Usage()
      return
    }
    factory369 := thrift.NewTJSONProtocolFactory()
    jsProt370 := factory369.GetProtocol(mbTrans367)
    containerStruct1 := hbase.NewTHBaseServiceDeleteMultipleArgs()
    err371 := containerStruct1.ReadField2(context.Background(), jsProt370)
    if err371 != nil {
      Usage()
      return
    }
    argvalue1 := containerStruct1.Tdeletes
    value1 := argvalue1
    fmt.Print(client.DeleteMultiple(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "checkAndDelete":
    if flag.NArg() - 1 != 6 {
      fmt.Fprintln(os.Stderr, "CheckAndDelete requires 6 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    argvalue1 := []byte(flag.Arg(2))
    value1 := argvalue1
    argvalue2 := []byte(flag.Arg(3))
    value2 := argvalue2
    argvalue3 := []byte(flag.Arg(4))
    value3 := argvalue3
    argvalue4 := []byte(flag.Arg(5))
    value4 := argvalue4
    arg377 := flag.Arg(6)
    mbTrans378 := thrift.NewTMemoryBufferLen(len(arg377))
    defer mbTrans378.Close()
    _, err379 := mbTrans378.WriteString(arg377)
    if err379 != nil {
      Usage()
      return
    }
    factory380 := thrift.NewTJSONProtocolFactory()
    jsProt381 := factory380.GetProtocol(mbTrans378)
    argvalue5 := hbase.NewTDelete()
    err382 := argvalue5.Read(context.Background(), jsProt381)
    if err382 != nil {
      Usage()
      return
    }
    value5 := argvalue5
    fmt.Print(client.CheckAndDelete(context.Background(), value0, value1, value2, value3, value4, value5))
    fmt.Print("\n")
    break
  case "increment":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "Increment requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg384 := flag.Arg(2)
    mbTrans385 := thrift.NewTMemoryBufferLen(len(arg384))
    defer mbTrans385.Close()
    _, err386 := mbTrans385.WriteString(arg384)
    if err386 != nil {
      Usage()
      return
    }
    factory387 := thrift.NewTJSONProtocolFactory()
    jsProt388 := factory387.GetProtocol(mbTrans385)
    argvalue1 := hbase.NewTIncrement()
    err389 := argvalue1.Read(context.Background(), jsProt388)
    if err389 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.Increment(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "append":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "Append requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg391 := flag.Arg(2)
    mbTrans392 := thrift.NewTMemoryBufferLen(len(arg391))
    defer mbTrans392.Close()
    _, err393 := mbTrans392.WriteString(arg391)
    if err393 != nil {
      Usage()
      return
    }
    factory394 := thrift.NewTJSONProtocolFactory()
    jsProt395 := factory394.GetProtocol(mbTrans392)
    argvalue1 := hbase.NewTAppend()
    err396 := argvalue1.Read(context.Background(), jsProt395)
    if err396 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.Append(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "openScanner":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "OpenScanner requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg398 := flag.Arg(2)
    mbTrans399 := thrift.NewTMemoryBufferLen(len(arg398))
    defer mbTrans399.Close()
    _, err400 := mbTrans399.WriteString(arg398)
    if err400 != nil {
      Usage()
      return
    }
    factory401 := thrift.NewTJSONProtocolFactory()
    jsProt402 := factory401.GetProtocol(mbTrans399)
    argvalue1 := hbase.NewTScan()
    err403 := argvalue1.Read(context.Background(), jsProt402)
    if err403 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.OpenScanner(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "getScannerRows":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "GetScannerRows requires 2 args")
      flag.Usage()
    }
    tmp0, err404 := (strconv.Atoi(flag.Arg(1)))
    if err404 != nil {
      Usage()
      return
    }
    argvalue0 := int32(tmp0)
    value0 := argvalue0
    tmp1, err405 := (strconv.Atoi(flag.Arg(2)))
    if err405 != nil {
      Usage()
      return
    }
    argvalue1 := int32(tmp1)
    value1 := argvalue1
    fmt.Print(client.GetScannerRows(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "closeScanner":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "CloseScanner requires 1 args")
      flag.Usage()
    }
    tmp0, err406 := (strconv.Atoi(flag.Arg(1)))
    if err406 != nil {
      Usage()
      return
    }
    argvalue0 := int32(tmp0)
    value0 := argvalue0
    fmt.Print(client.CloseScanner(context.Background(), value0))
    fmt.Print("\n")
    break
  case "mutateRow":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "MutateRow requires 2 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg408 := flag.Arg(2)
    mbTrans409 := thrift.NewTMemoryBufferLen(len(arg408))
    defer mbTrans409.Close()
    _, err410 := mbTrans409.WriteString(arg408)
    if err410 != nil {
      Usage()
      return
    }
    factory411 := thrift.NewTJSONProtocolFactory()
    jsProt412 := factory411.GetProtocol(mbTrans409)
    argvalue1 := hbase.NewTRowMutations()
    err413 := argvalue1.Read(context.Background(), jsProt412)
    if err413 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.MutateRow(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "getScannerResults":
    if flag.NArg() - 1 != 3 {
      fmt.Fprintln(os.Stderr, "GetScannerResults requires 3 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    arg415 := flag.Arg(2)
    mbTrans416 := thrift.NewTMemoryBufferLen(len(arg415))
    defer mbTrans416.Close()
    _, err417 := mbTrans416.WriteString(arg415)
    if err417 != nil {
      Usage()
      return
    }
    factory418 := thrift.NewTJSONProtocolFactory()
    jsProt419 := factory418.GetProtocol(mbTrans416)
    argvalue1 := hbase.NewTScan()
    err420 := argvalue1.Read(context.Background(), jsProt419)
    if err420 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    tmp2, err421 := (strconv.Atoi(flag.Arg(3)))
    if err421 != nil {
      Usage()
      return
    }
    argvalue2 := int32(tmp2)
    value2 := argvalue2
    fmt.Print(client.GetScannerResults(context.Background(), value0, value1, value2))
    fmt.Print("\n")
    break
  case "getRegionLocation":
    if flag.NArg() - 1 != 3 {
      fmt.Fprintln(os.Stderr, "GetRegionLocation requires 3 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    argvalue1 := []byte(flag.Arg(2))
    value1 := argvalue1
    argvalue2 := flag.Arg(3) == "true"
    value2 := argvalue2
    fmt.Print(client.GetRegionLocation(context.Background(), value0, value1, value2))
    fmt.Print("\n")
    break
  case "getAllRegionLocations":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "GetAllRegionLocations requires 1 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    fmt.Print(client.GetAllRegionLocations(context.Background(), value0))
    fmt.Print("\n")
    break
  case "checkAndMutate":
    if flag.NArg() - 1 != 7 {
      fmt.Fprintln(os.Stderr, "CheckAndMutate requires 7 args")
      flag.Usage()
    }
    argvalue0 := []byte(flag.Arg(1))
    value0 := argvalue0
    argvalue1 := []byte(flag.Arg(2))
    value1 := argvalue1
    argvalue2 := []byte(flag.Arg(3))
    value2 := argvalue2
    argvalue3 := []byte(flag.Arg(4))
    value3 := argvalue3
    tmp4, err := (strconv.Atoi(flag.Arg(5)))
    if err != nil {
      Usage()
     return
    }
    argvalue4 := hbase.TCompareOp(tmp4)
    value4 := argvalue4
    argvalue5 := []byte(flag.Arg(6))
    value5 := argvalue5
    arg431 := flag.Arg(7)
    mbTrans432 := thrift.NewTMemoryBufferLen(len(arg431))
    defer mbTrans432.Close()
    _, err433 := mbTrans432.WriteString(arg431)
    if err433 != nil {
      Usage()
      return
    }
    factory434 := thrift.NewTJSONProtocolFactory()
    jsProt435 := factory434.GetProtocol(mbTrans432)
    argvalue6 := hbase.NewTRowMutations()
    err436 := argvalue6.Read(context.Background(), jsProt435)
    if err436 != nil {
      Usage()
      return
    }
    value6 := argvalue6
    fmt.Print(client.CheckAndMutate(context.Background(), value0, value1, value2, value3, value4, value5, value6))
    fmt.Print("\n")
    break
  case "getTableDescriptor":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "GetTableDescriptor requires 1 args")
      flag.Usage()
    }
    arg437 := flag.Arg(1)
    mbTrans438 := thrift.NewTMemoryBufferLen(len(arg437))
    defer mbTrans438.Close()
    _, err439 := mbTrans438.WriteString(arg437)
    if err439 != nil {
      Usage()
      return
    }
    factory440 := thrift.NewTJSONProtocolFactory()
    jsProt441 := factory440.GetProtocol(mbTrans438)
    argvalue0 := hbase.NewTTableName()
    err442 := argvalue0.Read(context.Background(), jsProt441)
    if err442 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.GetTableDescriptor(context.Background(), value0))
    fmt.Print("\n")
    break
  case "getTableDescriptors":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "GetTableDescriptors requires 1 args")
      flag.Usage()
    }
    arg443 := flag.Arg(1)
    mbTrans444 := thrift.NewTMemoryBufferLen(len(arg443))
    defer mbTrans444.Close()
    _, err445 := mbTrans444.WriteString(arg443)
    if err445 != nil { 
      Usage()
      return
    }
    factory446 := thrift.NewTJSONProtocolFactory()
    jsProt447 := factory446.GetProtocol(mbTrans444)
    containerStruct0 := hbase.NewTHBaseServiceGetTableDescriptorsArgs()
    err448 := containerStruct0.ReadField1(context.Background(), jsProt447)
    if err448 != nil {
      Usage()
      return
    }
    argvalue0 := containerStruct0.Tables
    value0 := argvalue0
    fmt.Print(client.GetTableDescriptors(context.Background(), value0))
    fmt.Print("\n")
    break
  case "tableExists":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "TableExists requires 1 args")
      flag.Usage()
    }
    arg449 := flag.Arg(1)
    mbTrans450 := thrift.NewTMemoryBufferLen(len(arg449))
    defer mbTrans450.Close()
    _, err451 := mbTrans450.WriteString(arg449)
    if err451 != nil {
      Usage()
      return
    }
    factory452 := thrift.NewTJSONProtocolFactory()
    jsProt453 := factory452.GetProtocol(mbTrans450)
    argvalue0 := hbase.NewTTableName()
    err454 := argvalue0.Read(context.Background(), jsProt453)
    if err454 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.TableExists(context.Background(), value0))
    fmt.Print("\n")
    break
  case "getTableDescriptorsByPattern":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "GetTableDescriptorsByPattern requires 2 args")
      flag.Usage()
    }
    argvalue0 := flag.Arg(1)
    value0 := argvalue0
    argvalue1 := flag.Arg(2) == "true"
    value1 := argvalue1
    fmt.Print(client.GetTableDescriptorsByPattern(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "getTableDescriptorsByNamespace":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "GetTableDescriptorsByNamespace requires 1 args")
      flag.Usage()
    }
    argvalue0 := flag.Arg(1)
    value0 := argvalue0
    fmt.Print(client.GetTableDescriptorsByNamespace(context.Background(), value0))
    fmt.Print("\n")
    break
  case "getTableNamesByPattern":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "GetTableNamesByPattern requires 2 args")
      flag.Usage()
    }
    argvalue0 := flag.Arg(1)
    value0 := argvalue0
    argvalue1 := flag.Arg(2) == "true"
    value1 := argvalue1
    fmt.Print(client.GetTableNamesByPattern(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "getTableNamesByNamespace":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "GetTableNamesByNamespace requires 1 args")
      flag.Usage()
    }
    argvalue0 := flag.Arg(1)
    value0 := argvalue0
    fmt.Print(client.GetTableNamesByNamespace(context.Background(), value0))
    fmt.Print("\n")
    break
  case "createTable":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "CreateTable requires 2 args")
      flag.Usage()
    }
    arg461 := flag.Arg(1)
    mbTrans462 := thrift.NewTMemoryBufferLen(len(arg461))
    defer mbTrans462.Close()
    _, err463 := mbTrans462.WriteString(arg461)
    if err463 != nil {
      Usage()
      return
    }
    factory464 := thrift.NewTJSONProtocolFactory()
    jsProt465 := factory464.GetProtocol(mbTrans462)
    argvalue0 := hbase.NewTTableDescriptor()
    err466 := argvalue0.Read(context.Background(), jsProt465)
    if err466 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    arg467 := flag.Arg(2)
    mbTrans468 := thrift.NewTMemoryBufferLen(len(arg467))
    defer mbTrans468.Close()
    _, err469 := mbTrans468.WriteString(arg467)
    if err469 != nil { 
      Usage()
      return
    }
    factory470 := thrift.NewTJSONProtocolFactory()
    jsProt471 := factory470.GetProtocol(mbTrans468)
    containerStruct1 := hbase.NewTHBaseServiceCreateTableArgs()
    err472 := containerStruct1.ReadField2(context.Background(), jsProt471)
    if err472 != nil {
      Usage()
      return
    }
    argvalue1 := containerStruct1.SplitKeys
    value1 := argvalue1
    fmt.Print(client.CreateTable(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "deleteTable":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "DeleteTable requires 1 args")
      flag.Usage()
    }
    arg473 := flag.Arg(1)
    mbTrans474 := thrift.NewTMemoryBufferLen(len(arg473))
    defer mbTrans474.Close()
    _, err475 := mbTrans474.WriteString(arg473)
    if err475 != nil {
      Usage()
      return
    }
    factory476 := thrift.NewTJSONProtocolFactory()
    jsProt477 := factory476.GetProtocol(mbTrans474)
    argvalue0 := hbase.NewTTableName()
    err478 := argvalue0.Read(context.Background(), jsProt477)
    if err478 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.DeleteTable(context.Background(), value0))
    fmt.Print("\n")
    break
  case "truncateTable":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "TruncateTable requires 2 args")
      flag.Usage()
    }
    arg479 := flag.Arg(1)
    mbTrans480 := thrift.NewTMemoryBufferLen(len(arg479))
    defer mbTrans480.Close()
    _, err481 := mbTrans480.WriteString(arg479)
    if err481 != nil {
      Usage()
      return
    }
    factory482 := thrift.NewTJSONProtocolFactory()
    jsProt483 := factory482.GetProtocol(mbTrans480)
    argvalue0 := hbase.NewTTableName()
    err484 := argvalue0.Read(context.Background(), jsProt483)
    if err484 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    argvalue1 := flag.Arg(2) == "true"
    value1 := argvalue1
    fmt.Print(client.TruncateTable(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "enableTable":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "EnableTable requires 1 args")
      flag.Usage()
    }
    arg486 := flag.Arg(1)
    mbTrans487 := thrift.NewTMemoryBufferLen(len(arg486))
    defer mbTrans487.Close()
    _, err488 := mbTrans487.WriteString(arg486)
    if err488 != nil {
      Usage()
      return
    }
    factory489 := thrift.NewTJSONProtocolFactory()
    jsProt490 := factory489.GetProtocol(mbTrans487)
    argvalue0 := hbase.NewTTableName()
    err491 := argvalue0.Read(context.Background(), jsProt490)
    if err491 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.EnableTable(context.Background(), value0))
    fmt.Print("\n")
    break
  case "disableTable":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "DisableTable requires 1 args")
      flag.Usage()
    }
    arg492 := flag.Arg(1)
    mbTrans493 := thrift.NewTMemoryBufferLen(len(arg492))
    defer mbTrans493.Close()
    _, err494 := mbTrans493.WriteString(arg492)
    if err494 != nil {
      Usage()
      return
    }
    factory495 := thrift.NewTJSONProtocolFactory()
    jsProt496 := factory495.GetProtocol(mbTrans493)
    argvalue0 := hbase.NewTTableName()
    err497 := argvalue0.Read(context.Background(), jsProt496)
    if err497 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.DisableTable(context.Background(), value0))
    fmt.Print("\n")
    break
  case "isTableEnabled":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "IsTableEnabled requires 1 args")
      flag.Usage()
    }
    arg498 := flag.Arg(1)
    mbTrans499 := thrift.NewTMemoryBufferLen(len(arg498))
    defer mbTrans499.Close()
    _, err500 := mbTrans499.WriteString(arg498)
    if err500 != nil {
      Usage()
      return
    }
    factory501 := thrift.NewTJSONProtocolFactory()
    jsProt502 := factory501.GetProtocol(mbTrans499)
    argvalue0 := hbase.NewTTableName()
    err503 := argvalue0.Read(context.Background(), jsProt502)
    if err503 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.IsTableEnabled(context.Background(), value0))
    fmt.Print("\n")
    break
  case "isTableDisabled":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "IsTableDisabled requires 1 args")
      flag.Usage()
    }
    arg504 := flag.Arg(1)
    mbTrans505 := thrift.NewTMemoryBufferLen(len(arg504))
    defer mbTrans505.Close()
    _, err506 := mbTrans505.WriteString(arg504)
    if err506 != nil {
      Usage()
      return
    }
    factory507 := thrift.NewTJSONProtocolFactory()
    jsProt508 := factory507.GetProtocol(mbTrans505)
    argvalue0 := hbase.NewTTableName()
    err509 := argvalue0.Read(context.Background(), jsProt508)
    if err509 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.IsTableDisabled(context.Background(), value0))
    fmt.Print("\n")
    break
  case "isTableAvailable":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "IsTableAvailable requires 1 args")
      flag.Usage()
    }
    arg510 := flag.Arg(1)
    mbTrans511 := thrift.NewTMemoryBufferLen(len(arg510))
    defer mbTrans511.Close()
    _, err512 := mbTrans511.WriteString(arg510)
    if err512 != nil {
      Usage()
      return
    }
    factory513 := thrift.NewTJSONProtocolFactory()
    jsProt514 := factory513.GetProtocol(mbTrans511)
    argvalue0 := hbase.NewTTableName()
    err515 := argvalue0.Read(context.Background(), jsProt514)
    if err515 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.IsTableAvailable(context.Background(), value0))
    fmt.Print("\n")
    break
  case "isTableAvailableWithSplit":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "IsTableAvailableWithSplit requires 2 args")
      flag.Usage()
    }
    arg516 := flag.Arg(1)
    mbTrans517 := thrift.NewTMemoryBufferLen(len(arg516))
    defer mbTrans517.Close()
    _, err518 := mbTrans517.WriteString(arg516)
    if err518 != nil {
      Usage()
      return
    }
    factory519 := thrift.NewTJSONProtocolFactory()
    jsProt520 := factory519.GetProtocol(mbTrans517)
    argvalue0 := hbase.NewTTableName()
    err521 := argvalue0.Read(context.Background(), jsProt520)
    if err521 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    arg522 := flag.Arg(2)
    mbTrans523 := thrift.NewTMemoryBufferLen(len(arg522))
    defer mbTrans523.Close()
    _, err524 := mbTrans523.WriteString(arg522)
    if err524 != nil { 
      Usage()
      return
    }
    factory525 := thrift.NewTJSONProtocolFactory()
    jsProt526 := factory525.GetProtocol(mbTrans523)
    containerStruct1 := hbase.NewTHBaseServiceIsTableAvailableWithSplitArgs()
    err527 := containerStruct1.ReadField2(context.Background(), jsProt526)
    if err527 != nil {
      Usage()
      return
    }
    argvalue1 := containerStruct1.SplitKeys
    value1 := argvalue1
    fmt.Print(client.IsTableAvailableWithSplit(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "addColumnFamily":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "AddColumnFamily requires 2 args")
      flag.Usage()
    }
    arg528 := flag.Arg(1)
    mbTrans529 := thrift.NewTMemoryBufferLen(len(arg528))
    defer mbTrans529.Close()
    _, err530 := mbTrans529.WriteString(arg528)
    if err530 != nil {
      Usage()
      return
    }
    factory531 := thrift.NewTJSONProtocolFactory()
    jsProt532 := factory531.GetProtocol(mbTrans529)
    argvalue0 := hbase.NewTTableName()
    err533 := argvalue0.Read(context.Background(), jsProt532)
    if err533 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    arg534 := flag.Arg(2)
    mbTrans535 := thrift.NewTMemoryBufferLen(len(arg534))
    defer mbTrans535.Close()
    _, err536 := mbTrans535.WriteString(arg534)
    if err536 != nil {
      Usage()
      return
    }
    factory537 := thrift.NewTJSONProtocolFactory()
    jsProt538 := factory537.GetProtocol(mbTrans535)
    argvalue1 := hbase.NewTColumnFamilyDescriptor()
    err539 := argvalue1.Read(context.Background(), jsProt538)
    if err539 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.AddColumnFamily(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "deleteColumnFamily":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "DeleteColumnFamily requires 2 args")
      flag.Usage()
    }
    arg540 := flag.Arg(1)
    mbTrans541 := thrift.NewTMemoryBufferLen(len(arg540))
    defer mbTrans541.Close()
    _, err542 := mbTrans541.WriteString(arg540)
    if err542 != nil {
      Usage()
      return
    }
    factory543 := thrift.NewTJSONProtocolFactory()
    jsProt544 := factory543.GetProtocol(mbTrans541)
    argvalue0 := hbase.NewTTableName()
    err545 := argvalue0.Read(context.Background(), jsProt544)
    if err545 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    argvalue1 := []byte(flag.Arg(2))
    value1 := argvalue1
    fmt.Print(client.DeleteColumnFamily(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "modifyColumnFamily":
    if flag.NArg() - 1 != 2 {
      fmt.Fprintln(os.Stderr, "ModifyColumnFamily requires 2 args")
      flag.Usage()
    }
    arg547 := flag.Arg(1)
    mbTrans548 := thrift.NewTMemoryBufferLen(len(arg547))
    defer mbTrans548.Close()
    _, err549 := mbTrans548.WriteString(arg547)
    if err549 != nil {
      Usage()
      return
    }
    factory550 := thrift.NewTJSONProtocolFactory()
    jsProt551 := factory550.GetProtocol(mbTrans548)
    argvalue0 := hbase.NewTTableName()
    err552 := argvalue0.Read(context.Background(), jsProt551)
    if err552 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    arg553 := flag.Arg(2)
    mbTrans554 := thrift.NewTMemoryBufferLen(len(arg553))
    defer mbTrans554.Close()
    _, err555 := mbTrans554.WriteString(arg553)
    if err555 != nil {
      Usage()
      return
    }
    factory556 := thrift.NewTJSONProtocolFactory()
    jsProt557 := factory556.GetProtocol(mbTrans554)
    argvalue1 := hbase.NewTColumnFamilyDescriptor()
    err558 := argvalue1.Read(context.Background(), jsProt557)
    if err558 != nil {
      Usage()
      return
    }
    value1 := argvalue1
    fmt.Print(client.ModifyColumnFamily(context.Background(), value0, value1))
    fmt.Print("\n")
    break
  case "modifyTable":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "ModifyTable requires 1 args")
      flag.Usage()
    }
    arg559 := flag.Arg(1)
    mbTrans560 := thrift.NewTMemoryBufferLen(len(arg559))
    defer mbTrans560.Close()
    _, err561 := mbTrans560.WriteString(arg559)
    if err561 != nil {
      Usage()
      return
    }
    factory562 := thrift.NewTJSONProtocolFactory()
    jsProt563 := factory562.GetProtocol(mbTrans560)
    argvalue0 := hbase.NewTTableDescriptor()
    err564 := argvalue0.Read(context.Background(), jsProt563)
    if err564 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.ModifyTable(context.Background(), value0))
    fmt.Print("\n")
    break
  case "createNamespace":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "CreateNamespace requires 1 args")
      flag.Usage()
    }
    arg565 := flag.Arg(1)
    mbTrans566 := thrift.NewTMemoryBufferLen(len(arg565))
    defer mbTrans566.Close()
    _, err567 := mbTrans566.WriteString(arg565)
    if err567 != nil {
      Usage()
      return
    }
    factory568 := thrift.NewTJSONProtocolFactory()
    jsProt569 := factory568.GetProtocol(mbTrans566)
    argvalue0 := hbase.NewTNamespaceDescriptor()
    err570 := argvalue0.Read(context.Background(), jsProt569)
    if err570 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.CreateNamespace(context.Background(), value0))
    fmt.Print("\n")
    break
  case "modifyNamespace":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "ModifyNamespace requires 1 args")
      flag.Usage()
    }
    arg571 := flag.Arg(1)
    mbTrans572 := thrift.NewTMemoryBufferLen(len(arg571))
    defer mbTrans572.Close()
    _, err573 := mbTrans572.WriteString(arg571)
    if err573 != nil {
      Usage()
      return
    }
    factory574 := thrift.NewTJSONProtocolFactory()
    jsProt575 := factory574.GetProtocol(mbTrans572)
    argvalue0 := hbase.NewTNamespaceDescriptor()
    err576 := argvalue0.Read(context.Background(), jsProt575)
    if err576 != nil {
      Usage()
      return
    }
    value0 := argvalue0
    fmt.Print(client.ModifyNamespace(context.Background(), value0))
    fmt.Print("\n")
    break
  case "deleteNamespace":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "DeleteNamespace requires 1 args")
      flag.Usage()
    }
    argvalue0 := flag.Arg(1)
    value0 := argvalue0
    fmt.Print(client.DeleteNamespace(context.Background(), value0))
    fmt.Print("\n")
    break
  case "getNamespaceDescriptor":
    if flag.NArg() - 1 != 1 {
      fmt.Fprintln(os.Stderr, "GetNamespaceDescriptor requires 1 args")
      flag.Usage()
    }
    argvalue0 := flag.Arg(1)
    value0 := argvalue0
    fmt.Print(client.GetNamespaceDescriptor(context.Background(), value0))
    fmt.Print("\n")
    break
  case "listNamespaceDescriptors":
    if flag.NArg() - 1 != 0 {
      fmt.Fprintln(os.Stderr, "ListNamespaceDescriptors requires 0 args")
      flag.Usage()
    }
    fmt.Print(client.ListNamespaceDescriptors(context.Background()))
    fmt.Print("\n")
    break
  case "":
    Usage()
    break
  default:
    fmt.Fprintln(os.Stderr, "Invalid function ", cmd)
  }
}
