func main() {
	flag.Usage = Usage
	var host string
	var port int
	var protocol string
	var urlString string
	var framed bool
	var useHttp bool
	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.Parse()

	if len(urlString) > 0 {
		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"
	} 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
	if useHttp {
		trans, err = thrift.NewTHttpClient(parsedUrl.String())
	} 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.NewTSocket(net.JoinHostPort(host, portStr))
		if err != nil {
			fmt.Fprintln(os.Stderr, "error resolving address:", err)
			os.Exit(1)
		}
		if framed {
			trans = thrift.NewTFramedTransport(trans)
		}
	}
	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.NewTCompactProtocolFactory()
		break
	case "simplejson":
		protocolFactory = thrift.NewTSimpleJSONProtocolFactory()
		break
	case "json":
		protocolFactory = thrift.NewTJSONProtocolFactory()
		break
	case "binary", "":
		protocolFactory = thrift.NewTBinaryProtocolFactoryDefault()
		break
	default:
		fmt.Fprintln(os.Stderr, "Invalid protocol specified: ", protocol)
		Usage()
		os.Exit(1)
	}
	client := services.NewResourceManagerClientFactory(trans, protocolFactory)
	if err := trans.Open(); err != nil {
		fmt.Fprintln(os.Stderr, "Error opening socket to ", host, ":", port, " ", err)
		os.Exit(1)
	}

	switch cmd {
	case "createResource":
		if flag.NArg()-1 != 3 {
			fmt.Fprintln(os.Stderr, "CreateResource requires 3 args")
			flag.Usage()
		}
		arg664 := flag.Arg(1)
		mbTrans665 := thrift.NewTMemoryBufferLen(len(arg664))
		defer mbTrans665.Close()
		_, err666 := mbTrans665.WriteString(arg664)
		if err666 != nil {
			Usage()
			return
		}
		factory667 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt668 := factory667.GetProtocol(mbTrans665)
		argvalue0 := services.NewResource()
		err669 := argvalue0.Read(jsProt668)
		if err669 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		arg670 := flag.Arg(2)
		mbTrans671 := thrift.NewTMemoryBufferLen(len(arg670))
		defer mbTrans671.Close()
		_, err672 := mbTrans671.WriteString(arg670)
		if err672 != nil {
			Usage()
			return
		}
		factory673 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt674 := factory673.GetProtocol(mbTrans671)
		containerStruct1 := services.NewCreateResourceArgs()
		err675 := containerStruct1.ReadField2(jsProt674)
		if err675 != nil {
			Usage()
			return
		}
		argvalue1 := containerStruct1.Tags
		value1 := argvalue1
		arg676 := flag.Arg(3)
		mbTrans677 := thrift.NewTMemoryBufferLen(len(arg676))
		defer mbTrans677.Close()
		_, err678 := mbTrans677.WriteString(arg676)
		if err678 != nil {
			Usage()
			return
		}
		factory679 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt680 := factory679.GetProtocol(mbTrans677)
		argvalue2 := services.NewFromInfo()
		err681 := argvalue2.Read(jsProt680)
		if err681 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		fmt.Print(client.CreateResource(value0, value1, value2))
		fmt.Print("\n")
		break
	case "getResource":
		if flag.NArg()-1 != 3 {
			fmt.Fprintln(os.Stderr, "GetResource requires 3 args")
			flag.Usage()
		}
		argvalue0, err682 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err682 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err683 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err683 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		arg684 := flag.Arg(3)
		mbTrans685 := thrift.NewTMemoryBufferLen(len(arg684))
		defer mbTrans685.Close()
		_, err686 := mbTrans685.WriteString(arg684)
		if err686 != nil {
			Usage()
			return
		}
		factory687 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt688 := factory687.GetProtocol(mbTrans685)
		argvalue2 := services.NewFromInfo()
		err689 := argvalue2.Read(jsProt688)
		if err689 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		fmt.Print(client.GetResource(value0, value1, value2))
		fmt.Print("\n")
		break
	case "getResourceInfo":
		if flag.NArg()-1 != 3 {
			fmt.Fprintln(os.Stderr, "GetResourceInfo requires 3 args")
			flag.Usage()
		}
		argvalue0, err690 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err690 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err691 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err691 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		arg692 := flag.Arg(3)
		mbTrans693 := thrift.NewTMemoryBufferLen(len(arg692))
		defer mbTrans693.Close()
		_, err694 := mbTrans693.WriteString(arg692)
		if err694 != nil {
			Usage()
			return
		}
		factory695 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt696 := factory695.GetProtocol(mbTrans693)
		argvalue2 := services.NewFromInfo()
		err697 := argvalue2.Read(jsProt696)
		if err697 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		fmt.Print(client.GetResourceInfo(value0, value1, value2))
		fmt.Print("\n")
		break
	case "updateResource":
		if flag.NArg()-1 != 5 {
			fmt.Fprintln(os.Stderr, "UpdateResource requires 5 args")
			flag.Usage()
		}
		arg698 := flag.Arg(1)
		mbTrans699 := thrift.NewTMemoryBufferLen(len(arg698))
		defer mbTrans699.Close()
		_, err700 := mbTrans699.WriteString(arg698)
		if err700 != nil {
			Usage()
			return
		}
		factory701 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt702 := factory701.GetProtocol(mbTrans699)
		argvalue0 := services.NewResource()
		err703 := argvalue0.Read(jsProt702)
		if err703 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err704 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err704 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		argvalue2, err705 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err705 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		arg706 := flag.Arg(4)
		mbTrans707 := thrift.NewTMemoryBufferLen(len(arg706))
		defer mbTrans707.Close()
		_, err708 := mbTrans707.WriteString(arg706)
		if err708 != nil {
			Usage()
			return
		}
		factory709 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt710 := factory709.GetProtocol(mbTrans707)
		containerStruct3 := services.NewUpdateResourceArgs()
		err711 := containerStruct3.ReadField4(jsProt710)
		if err711 != nil {
			Usage()
			return
		}
		argvalue3 := containerStruct3.Tags
		value3 := argvalue3
		arg712 := flag.Arg(5)
		mbTrans713 := thrift.NewTMemoryBufferLen(len(arg712))
		defer mbTrans713.Close()
		_, err714 := mbTrans713.WriteString(arg712)
		if err714 != nil {
			Usage()
			return
		}
		factory715 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt716 := factory715.GetProtocol(mbTrans713)
		argvalue4 := services.NewFromInfo()
		err717 := argvalue4.Read(jsProt716)
		if err717 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		fmt.Print(client.UpdateResource(value0, value1, value2, value3, value4))
		fmt.Print("\n")
		break
	case "deleteResourceBySharedId":
		if flag.NArg()-1 != 3 {
			fmt.Fprintln(os.Stderr, "DeleteResourceBySharedId requires 3 args")
			flag.Usage()
		}
		argvalue0 := flag.Arg(1)
		value0 := argvalue0
		argvalue1, err719 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err719 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		arg720 := flag.Arg(3)
		mbTrans721 := thrift.NewTMemoryBufferLen(len(arg720))
		defer mbTrans721.Close()
		_, err722 := mbTrans721.WriteString(arg720)
		if err722 != nil {
			Usage()
			return
		}
		factory723 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt724 := factory723.GetProtocol(mbTrans721)
		argvalue2 := services.NewFromInfo()
		err725 := argvalue2.Read(jsProt724)
		if err725 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		fmt.Print(client.DeleteResourceBySharedId(value0, value1, value2))
		fmt.Print("\n")
		break
	case "deleteResource":
		if flag.NArg()-1 != 3 {
			fmt.Fprintln(os.Stderr, "DeleteResource requires 3 args")
			flag.Usage()
		}
		argvalue0, err726 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err726 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err727 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err727 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		arg728 := flag.Arg(3)
		mbTrans729 := thrift.NewTMemoryBufferLen(len(arg728))
		defer mbTrans729.Close()
		_, err730 := mbTrans729.WriteString(arg728)
		if err730 != nil {
			Usage()
			return
		}
		factory731 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt732 := factory731.GetProtocol(mbTrans729)
		argvalue2 := services.NewFromInfo()
		err733 := argvalue2.Read(jsProt732)
		if err733 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		fmt.Print(client.DeleteResource(value0, value1, value2))
		fmt.Print("\n")
		break
	case "shareResource":
		if flag.NArg()-1 != 5 {
			fmt.Fprintln(os.Stderr, "ShareResource requires 5 args")
			flag.Usage()
		}
		arg734 := flag.Arg(1)
		mbTrans735 := thrift.NewTMemoryBufferLen(len(arg734))
		defer mbTrans735.Close()
		_, err736 := mbTrans735.WriteString(arg734)
		if err736 != nil {
			Usage()
			return
		}
		factory737 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt738 := factory737.GetProtocol(mbTrans735)
		argvalue0 := services.NewResource()
		err739 := argvalue0.Read(jsProt738)
		if err739 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		arg740 := flag.Arg(2)
		mbTrans741 := thrift.NewTMemoryBufferLen(len(arg740))
		defer mbTrans741.Close()
		_, err742 := mbTrans741.WriteString(arg740)
		if err742 != nil {
			Usage()
			return
		}
		factory743 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt744 := factory743.GetProtocol(mbTrans741)
		containerStruct1 := services.NewShareResourceArgs()
		err745 := containerStruct1.ReadField2(jsProt744)
		if err745 != nil {
			Usage()
			return
		}
		argvalue1 := containerStruct1.ShareGroups
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.Zone(tmp2)
		value2 := argvalue2
		argvalue3, err746 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err746 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		arg747 := flag.Arg(5)
		mbTrans748 := thrift.NewTMemoryBufferLen(len(arg747))
		defer mbTrans748.Close()
		_, err749 := mbTrans748.WriteString(arg747)
		if err749 != nil {
			Usage()
			return
		}
		factory750 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt751 := factory750.GetProtocol(mbTrans748)
		argvalue4 := services.NewFromInfo()
		err752 := argvalue4.Read(jsProt751)
		if err752 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		fmt.Print(client.ShareResource(value0, value1, value2, value3, value4))
		fmt.Print("\n")
		break
	case "getSharedResources":
		if flag.NArg()-1 != 9 {
			fmt.Fprintln(os.Stderr, "GetSharedResources requires 9 args")
			flag.Usage()
		}
		argvalue0, err753 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err753 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err := (strconv.Atoi(flag.Arg(2)))
		if err != nil {
			Usage()
			return
		}
		argvalue1 := services.Zone(tmp1)
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceType(tmp2)
		value2 := argvalue2
		argvalue3, err754 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err754 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err755 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err755 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5, err756 := (strconv.ParseInt(flag.Arg(6), 10, 64))
		if err756 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		argvalue6 := flag.Arg(7) == "true"
		value6 := argvalue6
		tmp7, err758 := (strconv.Atoi(flag.Arg(8)))
		if err758 != nil {
			Usage()
			return
		}
		argvalue7 := int32(tmp7)
		value7 := argvalue7
		arg759 := flag.Arg(9)
		mbTrans760 := thrift.NewTMemoryBufferLen(len(arg759))
		defer mbTrans760.Close()
		_, err761 := mbTrans760.WriteString(arg759)
		if err761 != nil {
			Usage()
			return
		}
		factory762 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt763 := factory762.GetProtocol(mbTrans760)
		argvalue8 := services.NewFromInfo()
		err764 := argvalue8.Read(jsProt763)
		if err764 != nil {
			Usage()
			return
		}
		value8 := argvalue8
		fmt.Print(client.GetSharedResources(value0, value1, value2, value3, value4, value5, value6, value7, value8))
		fmt.Print("\n")
		break
	case "cancelSharedResource":
		if flag.NArg()-1 != 2 {
			fmt.Fprintln(os.Stderr, "CancelSharedResource requires 2 args")
			flag.Usage()
		}
		argvalue0 := flag.Arg(1)
		value0 := argvalue0
		arg766 := flag.Arg(2)
		mbTrans767 := thrift.NewTMemoryBufferLen(len(arg766))
		defer mbTrans767.Close()
		_, err768 := mbTrans767.WriteString(arg766)
		if err768 != nil {
			Usage()
			return
		}
		factory769 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt770 := factory769.GetProtocol(mbTrans767)
		argvalue1 := services.NewFromInfo()
		err771 := argvalue1.Read(jsProt770)
		if err771 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		fmt.Print(client.CancelSharedResource(value0, value1))
		fmt.Print("\n")
		break
	case "getUserResources":
		if flag.NArg()-1 != 8 {
			fmt.Fprintln(os.Stderr, "GetUserResources requires 8 args")
			flag.Usage()
		}
		argvalue0, err772 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err772 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err := (strconv.Atoi(flag.Arg(2)))
		if err != nil {
			Usage()
			return
		}
		argvalue1 := services.ResourceType(tmp1)
		value1 := argvalue1
		argvalue2, err773 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err773 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		argvalue3, err774 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err774 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err775 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err775 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5 := flag.Arg(6) == "true"
		value5 := argvalue5
		tmp6, err777 := (strconv.Atoi(flag.Arg(7)))
		if err777 != nil {
			Usage()
			return
		}
		argvalue6 := int32(tmp6)
		value6 := argvalue6
		arg778 := flag.Arg(8)
		mbTrans779 := thrift.NewTMemoryBufferLen(len(arg778))
		defer mbTrans779.Close()
		_, err780 := mbTrans779.WriteString(arg778)
		if err780 != nil {
			Usage()
			return
		}
		factory781 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt782 := factory781.GetProtocol(mbTrans779)
		argvalue7 := services.NewFromInfo()
		err783 := argvalue7.Read(jsProt782)
		if err783 != nil {
			Usage()
			return
		}
		value7 := argvalue7
		fmt.Print(client.GetUserResources(value0, value1, value2, value3, value4, value5, value6, value7))
		fmt.Print("\n")
		break
	case "addComment":
		if flag.NArg()-1 != 2 {
			fmt.Fprintln(os.Stderr, "AddComment requires 2 args")
			flag.Usage()
		}
		arg784 := flag.Arg(1)
		mbTrans785 := thrift.NewTMemoryBufferLen(len(arg784))
		defer mbTrans785.Close()
		_, err786 := mbTrans785.WriteString(arg784)
		if err786 != nil {
			Usage()
			return
		}
		factory787 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt788 := factory787.GetProtocol(mbTrans785)
		argvalue0 := services.NewComment()
		err789 := argvalue0.Read(jsProt788)
		if err789 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		arg790 := flag.Arg(2)
		mbTrans791 := thrift.NewTMemoryBufferLen(len(arg790))
		defer mbTrans791.Close()
		_, err792 := mbTrans791.WriteString(arg790)
		if err792 != nil {
			Usage()
			return
		}
		factory793 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt794 := factory793.GetProtocol(mbTrans791)
		argvalue1 := services.NewFromInfo()
		err795 := argvalue1.Read(jsProt794)
		if err795 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		fmt.Print(client.AddComment(value0, value1))
		fmt.Print("\n")
		break
	case "deleteComment":
		if flag.NArg()-1 != 6 {
			fmt.Fprintln(os.Stderr, "DeleteComment requires 6 args")
			flag.Usage()
		}
		argvalue0, err796 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err796 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err797 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err797 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		argvalue2, err798 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err798 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		argvalue3, err799 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err799 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err800 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err800 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		arg801 := flag.Arg(6)
		mbTrans802 := thrift.NewTMemoryBufferLen(len(arg801))
		defer mbTrans802.Close()
		_, err803 := mbTrans802.WriteString(arg801)
		if err803 != nil {
			Usage()
			return
		}
		factory804 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt805 := factory804.GetProtocol(mbTrans802)
		argvalue5 := services.NewFromInfo()
		err806 := argvalue5.Read(jsProt805)
		if err806 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		fmt.Print(client.DeleteComment(value0, value1, value2, value3, value4, value5))
		fmt.Print("\n")
		break
	case "getComments":
		if flag.NArg()-1 != 7 {
			fmt.Fprintln(os.Stderr, "GetComments requires 7 args")
			flag.Usage()
		}
		argvalue0, err807 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err807 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err808 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err808 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		argvalue2, err809 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err809 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		argvalue3, err810 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err810 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4 := flag.Arg(5) == "true"
		value4 := argvalue4
		tmp5, err812 := (strconv.Atoi(flag.Arg(6)))
		if err812 != nil {
			Usage()
			return
		}
		argvalue5 := int32(tmp5)
		value5 := argvalue5
		arg813 := flag.Arg(7)
		mbTrans814 := thrift.NewTMemoryBufferLen(len(arg813))
		defer mbTrans814.Close()
		_, err815 := mbTrans814.WriteString(arg813)
		if err815 != nil {
			Usage()
			return
		}
		factory816 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt817 := factory816.GetProtocol(mbTrans814)
		argvalue6 := services.NewFromInfo()
		err818 := argvalue6.Read(jsProt817)
		if err818 != nil {
			Usage()
			return
		}
		value6 := argvalue6
		fmt.Print(client.GetComments(value0, value1, value2, value3, value4, value5, value6))
		fmt.Print("\n")
		break
	case "operateThumb":
		if flag.NArg()-1 != 6 {
			fmt.Fprintln(os.Stderr, "OperateThumb requires 6 args")
			flag.Usage()
		}
		argvalue0, err819 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err819 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err820 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err820 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ThumbType(tmp2)
		value2 := argvalue2
		argvalue3, err821 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err821 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		tmp4, err := (strconv.Atoi(flag.Arg(5)))
		if err != nil {
			Usage()
			return
		}
		argvalue4 := services.ResourceType(tmp4)
		value4 := argvalue4
		arg822 := flag.Arg(6)
		mbTrans823 := thrift.NewTMemoryBufferLen(len(arg822))
		defer mbTrans823.Close()
		_, err824 := mbTrans823.WriteString(arg822)
		if err824 != nil {
			Usage()
			return
		}
		factory825 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt826 := factory825.GetProtocol(mbTrans823)
		argvalue5 := services.NewFromInfo()
		err827 := argvalue5.Read(jsProt826)
		if err827 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		fmt.Print(client.OperateThumb(value0, value1, value2, value3, value4, value5))
		fmt.Print("\n")
		break
	case "getThumbs":
		if flag.NArg()-1 != 8 {
			fmt.Fprintln(os.Stderr, "GetThumbs requires 8 args")
			flag.Usage()
		}
		argvalue0, err828 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err828 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err829 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err829 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ThumbType(tmp2)
		value2 := argvalue2
		argvalue3, err830 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err830 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err831 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err831 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5 := flag.Arg(6) == "true"
		value5 := argvalue5
		tmp6, err833 := (strconv.Atoi(flag.Arg(7)))
		if err833 != nil {
			Usage()
			return
		}
		argvalue6 := int32(tmp6)
		value6 := argvalue6
		arg834 := flag.Arg(8)
		mbTrans835 := thrift.NewTMemoryBufferLen(len(arg834))
		defer mbTrans835.Close()
		_, err836 := mbTrans835.WriteString(arg834)
		if err836 != nil {
			Usage()
			return
		}
		factory837 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt838 := factory837.GetProtocol(mbTrans835)
		argvalue7 := services.NewFromInfo()
		err839 := argvalue7.Read(jsProt838)
		if err839 != nil {
			Usage()
			return
		}
		value7 := argvalue7
		fmt.Print(client.GetThumbs(value0, value1, value2, value3, value4, value5, value6, value7))
		fmt.Print("\n")
		break
	case "registerResourceNotification":
		if flag.NArg()-1 != 3 {
			fmt.Fprintln(os.Stderr, "RegisterResourceNotification requires 3 args")
			flag.Usage()
		}
		argvalue0, err840 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err840 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err841 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err841 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		arg842 := flag.Arg(3)
		mbTrans843 := thrift.NewTMemoryBufferLen(len(arg842))
		defer mbTrans843.Close()
		_, err844 := mbTrans843.WriteString(arg842)
		if err844 != nil {
			Usage()
			return
		}
		factory845 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt846 := factory845.GetProtocol(mbTrans843)
		argvalue2 := services.NewFromInfo()
		err847 := argvalue2.Read(jsProt846)
		if err847 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		fmt.Print(client.RegisterResourceNotification(value0, value1, value2))
		fmt.Print("\n")
		break
	case "unregisterResourceNotification":
		if flag.NArg()-1 != 4 {
			fmt.Fprintln(os.Stderr, "UnregisterResourceNotification requires 4 args")
			flag.Usage()
		}
		argvalue0, err848 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err848 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err849 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err849 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceType(tmp2)
		value2 := argvalue2
		arg850 := flag.Arg(4)
		mbTrans851 := thrift.NewTMemoryBufferLen(len(arg850))
		defer mbTrans851.Close()
		_, err852 := mbTrans851.WriteString(arg850)
		if err852 != nil {
			Usage()
			return
		}
		factory853 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt854 := factory853.GetProtocol(mbTrans851)
		argvalue3 := services.NewFromInfo()
		err855 := argvalue3.Read(jsProt854)
		if err855 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		fmt.Print(client.UnregisterResourceNotification(value0, value1, value2, value3))
		fmt.Print("\n")
		break
	case "sendResourceNotification":
		if flag.NArg()-1 != 5 {
			fmt.Fprintln(os.Stderr, "SendResourceNotification requires 5 args")
			flag.Usage()
		}
		argvalue0, err856 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err856 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err857 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err857 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		arg858 := flag.Arg(3)
		mbTrans859 := thrift.NewTMemoryBufferLen(len(arg858))
		defer mbTrans859.Close()
		_, err860 := mbTrans859.WriteString(arg858)
		if err860 != nil {
			Usage()
			return
		}
		factory861 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt862 := factory861.GetProtocol(mbTrans859)
		argvalue2 := services.NewComment()
		err863 := argvalue2.Read(jsProt862)
		if err863 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		argvalue3, err864 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err864 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		arg865 := flag.Arg(5)
		mbTrans866 := thrift.NewTMemoryBufferLen(len(arg865))
		defer mbTrans866.Close()
		_, err867 := mbTrans866.WriteString(arg865)
		if err867 != nil {
			Usage()
			return
		}
		factory868 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt869 := factory868.GetProtocol(mbTrans866)
		argvalue4 := services.NewFromInfo()
		err870 := argvalue4.Read(jsProt869)
		if err870 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		fmt.Print(client.SendResourceNotification(value0, value1, value2, value3, value4))
		fmt.Print("\n")
		break
	case "getCommentsHistory":
		if flag.NArg()-1 != 8 {
			fmt.Fprintln(os.Stderr, "GetCommentsHistory requires 8 args")
			flag.Usage()
		}
		argvalue0, err871 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err871 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err := (strconv.Atoi(flag.Arg(2)))
		if err != nil {
			Usage()
			return
		}
		argvalue1 := services.CommentHistoryType(tmp1)
		value1 := argvalue1
		argvalue2, err872 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err872 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		argvalue3, err873 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err873 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err874 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err874 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5 := flag.Arg(6) == "true"
		value5 := argvalue5
		tmp6, err876 := (strconv.Atoi(flag.Arg(7)))
		if err876 != nil {
			Usage()
			return
		}
		argvalue6 := int32(tmp6)
		value6 := argvalue6
		arg877 := flag.Arg(8)
		mbTrans878 := thrift.NewTMemoryBufferLen(len(arg877))
		defer mbTrans878.Close()
		_, err879 := mbTrans878.WriteString(arg877)
		if err879 != nil {
			Usage()
			return
		}
		factory880 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt881 := factory880.GetProtocol(mbTrans878)
		argvalue7 := services.NewFromInfo()
		err882 := argvalue7.Read(jsProt881)
		if err882 != nil {
			Usage()
			return
		}
		value7 := argvalue7
		fmt.Print(client.GetCommentsHistory(value0, value1, value2, value3, value4, value5, value6, value7))
		fmt.Print("\n")
		break
	case "deleteCommentHistory":
		if flag.NArg()-1 != 6 {
			fmt.Fprintln(os.Stderr, "DeleteCommentHistory requires 6 args")
			flag.Usage()
		}
		argvalue0, err883 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err883 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err := (strconv.Atoi(flag.Arg(2)))
		if err != nil {
			Usage()
			return
		}
		argvalue1 := services.CommentHistoryType(tmp1)
		value1 := argvalue1
		argvalue2, err884 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err884 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		argvalue3, err885 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err885 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err886 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err886 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		arg887 := flag.Arg(6)
		mbTrans888 := thrift.NewTMemoryBufferLen(len(arg887))
		defer mbTrans888.Close()
		_, err889 := mbTrans888.WriteString(arg887)
		if err889 != nil {
			Usage()
			return
		}
		factory890 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt891 := factory890.GetProtocol(mbTrans888)
		argvalue5 := services.NewFromInfo()
		err892 := argvalue5.Read(jsProt891)
		if err892 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		fmt.Print(client.DeleteCommentHistory(value0, value1, value2, value3, value4, value5))
		fmt.Print("\n")
		break
	case "updateGroupResourceName":
		if flag.NArg()-1 != 7 {
			fmt.Fprintln(os.Stderr, "UpdateGroupResourceName requires 7 args")
			flag.Usage()
		}
		argvalue0, err893 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err893 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err := (strconv.Atoi(flag.Arg(2)))
		if err != nil {
			Usage()
			return
		}
		argvalue1 := services.Zone(tmp1)
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceType(tmp2)
		value2 := argvalue2
		argvalue3, err894 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err894 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err895 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err895 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5 := flag.Arg(6)
		value5 := argvalue5
		arg897 := flag.Arg(7)
		mbTrans898 := thrift.NewTMemoryBufferLen(len(arg897))
		defer mbTrans898.Close()
		_, err899 := mbTrans898.WriteString(arg897)
		if err899 != nil {
			Usage()
			return
		}
		factory900 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt901 := factory900.GetProtocol(mbTrans898)
		argvalue6 := services.NewFromInfo()
		err902 := argvalue6.Read(jsProt901)
		if err902 != nil {
			Usage()
			return
		}
		value6 := argvalue6
		fmt.Print(client.UpdateGroupResourceName(value0, value1, value2, value3, value4, value5, value6))
		fmt.Print("\n")
		break
	case "getSharedGroupResource":
		if flag.NArg()-1 != 2 {
			fmt.Fprintln(os.Stderr, "GetSharedGroupResource requires 2 args")
			flag.Usage()
		}
		argvalue0 := flag.Arg(1)
		value0 := argvalue0
		arg904 := flag.Arg(2)
		mbTrans905 := thrift.NewTMemoryBufferLen(len(arg904))
		defer mbTrans905.Close()
		_, err906 := mbTrans905.WriteString(arg904)
		if err906 != nil {
			Usage()
			return
		}
		factory907 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt908 := factory907.GetProtocol(mbTrans905)
		argvalue1 := services.NewFromInfo()
		err909 := argvalue1.Read(jsProt908)
		if err909 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		fmt.Print(client.GetSharedGroupResource(value0, value1))
		fmt.Print("\n")
		break
	case "getResourceChatRoomViewer":
		if flag.NArg()-1 != 4 {
			fmt.Fprintln(os.Stderr, "GetResourceChatRoomViewer requires 4 args")
			flag.Usage()
		}
		argvalue0, err910 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err910 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err911 := (strconv.Atoi(flag.Arg(2)))
		if err911 != nil {
			Usage()
			return
		}
		argvalue1 := int32(tmp1)
		value1 := argvalue1
		argvalue2, err912 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err912 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		arg913 := flag.Arg(4)
		mbTrans914 := thrift.NewTMemoryBufferLen(len(arg913))
		defer mbTrans914.Close()
		_, err915 := mbTrans914.WriteString(arg913)
		if err915 != nil {
			Usage()
			return
		}
		factory916 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt917 := factory916.GetProtocol(mbTrans914)
		argvalue3 := services.NewFromInfo()
		err918 := argvalue3.Read(jsProt917)
		if err918 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		fmt.Print(client.GetResourceChatRoomViewer(value0, value1, value2, value3))
		fmt.Print("\n")
		break
	case "getResourceChatRoomViewerCount":
		if flag.NArg()-1 != 2 {
			fmt.Fprintln(os.Stderr, "GetResourceChatRoomViewerCount requires 2 args")
			flag.Usage()
		}
		argvalue0, err919 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err919 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		arg920 := flag.Arg(2)
		mbTrans921 := thrift.NewTMemoryBufferLen(len(arg920))
		defer mbTrans921.Close()
		_, err922 := mbTrans921.WriteString(arg920)
		if err922 != nil {
			Usage()
			return
		}
		factory923 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt924 := factory923.GetProtocol(mbTrans921)
		argvalue1 := services.NewFromInfo()
		err925 := argvalue1.Read(jsProt924)
		if err925 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		fmt.Print(client.GetResourceChatRoomViewerCount(value0, value1))
		fmt.Print("\n")
		break
	case "":
		Usage()
		break
	default:
		fmt.Fprintln(os.Stderr, "Invalid function ", cmd)
	}
}
func main() {
	flag.Usage = Usage
	var host string
	var port int
	var protocol string
	var urlString string
	var framed bool
	var useHttp bool
	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.Parse()

	if len(urlString) > 0 {
		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"
	} 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
	if useHttp {
		trans, err = thrift.NewTHttpClient(parsedUrl.String())
	} 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.NewTSocket(net.JoinHostPort(host, portStr))
		if err != nil {
			fmt.Fprintln(os.Stderr, "error resolving address:", err)
			os.Exit(1)
		}
		if framed {
			trans = thrift.NewTFramedTransport(trans)
		}
	}
	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.NewTCompactProtocolFactory()
		break
	case "simplejson":
		protocolFactory = thrift.NewTSimpleJSONProtocolFactory()
		break
	case "json":
		protocolFactory = thrift.NewTJSONProtocolFactory()
		break
	case "binary", "":
		protocolFactory = thrift.NewTBinaryProtocolFactoryDefault()
		break
	default:
		fmt.Fprintln(os.Stderr, "Invalid protocol specified: ", protocol)
		Usage()
		os.Exit(1)
	}
	client := services.NewResourceCategoryManagerClientFactory(trans, protocolFactory)
	if err := trans.Open(); err != nil {
		fmt.Fprintln(os.Stderr, "Error opening socket to ", host, ":", port, " ", err)
		os.Exit(1)
	}

	switch cmd {
	case "getChildren":
		if flag.NArg()-1 != 6 {
			fmt.Fprintln(os.Stderr, "GetChildren requires 6 args")
			flag.Usage()
		}
		argvalue0, err1063 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1063 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1064 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1064 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceNodeType(tmp2)
		value2 := argvalue2
		argvalue3, err1065 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1065 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		tmp4, err1066 := (strconv.Atoi(flag.Arg(5)))
		if err1066 != nil {
			Usage()
			return
		}
		argvalue4 := int32(tmp4)
		value4 := argvalue4
		arg1067 := flag.Arg(6)
		mbTrans1068 := thrift.NewTMemoryBufferLen(len(arg1067))
		defer mbTrans1068.Close()
		_, err1069 := mbTrans1068.WriteString(arg1067)
		if err1069 != nil {
			Usage()
			return
		}
		factory1070 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1071 := factory1070.GetProtocol(mbTrans1068)
		argvalue5 := services.NewFromInfo()
		err1072 := argvalue5.Read(jsProt1071)
		if err1072 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		fmt.Print(client.GetChildren(value0, value1, value2, value3, value4, value5))
		fmt.Print("\n")
		break
	case "getChildrenByType":
		if flag.NArg()-1 != 6 {
			fmt.Fprintln(os.Stderr, "GetChildrenByType requires 6 args")
			flag.Usage()
		}
		argvalue0, err1073 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1073 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1074 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1074 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceNodeType(tmp2)
		value2 := argvalue2
		argvalue3, err1075 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1075 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		tmp4, err1076 := (strconv.Atoi(flag.Arg(5)))
		if err1076 != nil {
			Usage()
			return
		}
		argvalue4 := int32(tmp4)
		value4 := argvalue4
		arg1077 := flag.Arg(6)
		mbTrans1078 := thrift.NewTMemoryBufferLen(len(arg1077))
		defer mbTrans1078.Close()
		_, err1079 := mbTrans1078.WriteString(arg1077)
		if err1079 != nil {
			Usage()
			return
		}
		factory1080 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1081 := factory1080.GetProtocol(mbTrans1078)
		argvalue5 := services.NewFromInfo()
		err1082 := argvalue5.Read(jsProt1081)
		if err1082 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		fmt.Print(client.GetChildrenByType(value0, value1, value2, value3, value4, value5))
		fmt.Print("\n")
		break
	case "removeChild":
		if flag.NArg()-1 != 5 {
			fmt.Fprintln(os.Stderr, "RemoveChild requires 5 args")
			flag.Usage()
		}
		argvalue0, err1083 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1083 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1084 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1084 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceNodeType(tmp2)
		value2 := argvalue2
		argvalue3, err1085 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1085 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		arg1086 := flag.Arg(5)
		mbTrans1087 := thrift.NewTMemoryBufferLen(len(arg1086))
		defer mbTrans1087.Close()
		_, err1088 := mbTrans1087.WriteString(arg1086)
		if err1088 != nil {
			Usage()
			return
		}
		factory1089 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1090 := factory1089.GetProtocol(mbTrans1087)
		argvalue4 := services.NewFromInfo()
		err1091 := argvalue4.Read(jsProt1090)
		if err1091 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		fmt.Print(client.RemoveChild(value0, value1, value2, value3, value4))
		fmt.Print("\n")
		break
	case "moveChild":
		if flag.NArg()-1 != 7 {
			fmt.Fprintln(os.Stderr, "MoveChild requires 7 args")
			flag.Usage()
		}
		argvalue0, err1092 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1092 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1093 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1093 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceNodeType(tmp2)
		value2 := argvalue2
		argvalue3, err1094 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1094 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err1095 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err1095 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5 := flag.Arg(6) == "true"
		value5 := argvalue5
		arg1097 := flag.Arg(7)
		mbTrans1098 := thrift.NewTMemoryBufferLen(len(arg1097))
		defer mbTrans1098.Close()
		_, err1099 := mbTrans1098.WriteString(arg1097)
		if err1099 != nil {
			Usage()
			return
		}
		factory1100 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1101 := factory1100.GetProtocol(mbTrans1098)
		argvalue6 := services.NewFromInfo()
		err1102 := argvalue6.Read(jsProt1101)
		if err1102 != nil {
			Usage()
			return
		}
		value6 := argvalue6
		fmt.Print(client.MoveChild(value0, value1, value2, value3, value4, value5, value6))
		fmt.Print("\n")
		break
	case "renameChild":
		if flag.NArg()-1 != 6 {
			fmt.Fprintln(os.Stderr, "RenameChild requires 6 args")
			flag.Usage()
		}
		argvalue0, err1103 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1103 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1104 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1104 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceNodeType(tmp2)
		value2 := argvalue2
		argvalue3, err1105 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1105 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4 := flag.Arg(5)
		value4 := argvalue4
		arg1107 := flag.Arg(6)
		mbTrans1108 := thrift.NewTMemoryBufferLen(len(arg1107))
		defer mbTrans1108.Close()
		_, err1109 := mbTrans1108.WriteString(arg1107)
		if err1109 != nil {
			Usage()
			return
		}
		factory1110 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1111 := factory1110.GetProtocol(mbTrans1108)
		argvalue5 := services.NewFromInfo()
		err1112 := argvalue5.Read(jsProt1111)
		if err1112 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		fmt.Print(client.RenameChild(value0, value1, value2, value3, value4, value5))
		fmt.Print("\n")
		break
	case "createCategory":
		if flag.NArg()-1 != 4 {
			fmt.Fprintln(os.Stderr, "CreateCategory requires 4 args")
			flag.Usage()
		}
		argvalue0, err1113 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1113 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1114 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1114 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		argvalue2 := flag.Arg(3)
		value2 := argvalue2
		arg1116 := flag.Arg(4)
		mbTrans1117 := thrift.NewTMemoryBufferLen(len(arg1116))
		defer mbTrans1117.Close()
		_, err1118 := mbTrans1117.WriteString(arg1116)
		if err1118 != nil {
			Usage()
			return
		}
		factory1119 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1120 := factory1119.GetProtocol(mbTrans1117)
		argvalue3 := services.NewFromInfo()
		err1121 := argvalue3.Read(jsProt1120)
		if err1121 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		fmt.Print(client.CreateCategory(value0, value1, value2, value3))
		fmt.Print("\n")
		break
	case "assignCategory":
		if flag.NArg()-1 != 6 {
			fmt.Fprintln(os.Stderr, "AssignCategory requires 6 args")
			flag.Usage()
		}
		argvalue0, err1122 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1122 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1123 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1123 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		arg1124 := flag.Arg(3)
		mbTrans1125 := thrift.NewTMemoryBufferLen(len(arg1124))
		defer mbTrans1125.Close()
		_, err1126 := mbTrans1125.WriteString(arg1124)
		if err1126 != nil {
			Usage()
			return
		}
		factory1127 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1128 := factory1127.GetProtocol(mbTrans1125)
		argvalue2 := services.NewResource()
		err1129 := argvalue2.Read(jsProt1128)
		if err1129 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		tmp3, err := (strconv.Atoi(flag.Arg(4)))
		if err != nil {
			Usage()
			return
		}
		argvalue3 := services.Zone(tmp3)
		value3 := argvalue3
		argvalue4 := flag.Arg(5)
		value4 := argvalue4
		arg1131 := flag.Arg(6)
		mbTrans1132 := thrift.NewTMemoryBufferLen(len(arg1131))
		defer mbTrans1132.Close()
		_, err1133 := mbTrans1132.WriteString(arg1131)
		if err1133 != nil {
			Usage()
			return
		}
		factory1134 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1135 := factory1134.GetProtocol(mbTrans1132)
		argvalue5 := services.NewFromInfo()
		err1136 := argvalue5.Read(jsProt1135)
		if err1136 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		fmt.Print(client.AssignCategory(value0, value1, value2, value3, value4, value5))
		fmt.Print("\n")
		break
	case "assignResourceZone":
		if flag.NArg()-1 != 7 {
			fmt.Fprintln(os.Stderr, "AssignResourceZone requires 7 args")
			flag.Usage()
		}
		argvalue0, err1137 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1137 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		argvalue1, err1138 := (strconv.ParseInt(flag.Arg(2), 10, 64))
		if err1138 != nil {
			Usage()
			return
		}
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceNodeType(tmp2)
		value2 := argvalue2
		argvalue3, err1139 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1139 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		tmp4, err := (strconv.Atoi(flag.Arg(5)))
		if err != nil {
			Usage()
			return
		}
		argvalue4 := services.Zone(tmp4)
		value4 := argvalue4
		argvalue5 := flag.Arg(6)
		value5 := argvalue5
		arg1141 := flag.Arg(7)
		mbTrans1142 := thrift.NewTMemoryBufferLen(len(arg1141))
		defer mbTrans1142.Close()
		_, err1143 := mbTrans1142.WriteString(arg1141)
		if err1143 != nil {
			Usage()
			return
		}
		factory1144 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1145 := factory1144.GetProtocol(mbTrans1142)
		argvalue6 := services.NewFromInfo()
		err1146 := argvalue6.Read(jsProt1145)
		if err1146 != nil {
			Usage()
			return
		}
		value6 := argvalue6
		fmt.Print(client.AssignResourceZone(value0, value1, value2, value3, value4, value5, value6))
		fmt.Print("\n")
		break
	case "assignUnclassifiedResourceZone":
		if flag.NArg()-1 != 4 {
			fmt.Fprintln(os.Stderr, "AssignUnclassifiedResourceZone requires 4 args")
			flag.Usage()
		}
		tmp0, err := (strconv.Atoi(flag.Arg(1)))
		if err != nil {
			Usage()
			return
		}
		argvalue0 := services.Zone(tmp0)
		value0 := argvalue0
		argvalue1 := flag.Arg(2)
		value1 := argvalue1
		argvalue2, err1148 := (strconv.ParseInt(flag.Arg(3), 10, 64))
		if err1148 != nil {
			Usage()
			return
		}
		value2 := argvalue2
		arg1149 := flag.Arg(4)
		mbTrans1150 := thrift.NewTMemoryBufferLen(len(arg1149))
		defer mbTrans1150.Close()
		_, err1151 := mbTrans1150.WriteString(arg1149)
		if err1151 != nil {
			Usage()
			return
		}
		factory1152 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1153 := factory1152.GetProtocol(mbTrans1150)
		argvalue3 := services.NewFromInfo()
		err1154 := argvalue3.Read(jsProt1153)
		if err1154 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		fmt.Print(client.AssignUnclassifiedResourceZone(value0, value1, value2, value3))
		fmt.Print("\n")
		break
	case "getUnclassifiedGroupResources":
		if flag.NArg()-1 != 9 {
			fmt.Fprintln(os.Stderr, "GetUnclassifiedGroupResources requires 9 args")
			flag.Usage()
		}
		argvalue0, err1155 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1155 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err := (strconv.Atoi(flag.Arg(2)))
		if err != nil {
			Usage()
			return
		}
		argvalue1 := services.Zone(tmp1)
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceType(tmp2)
		value2 := argvalue2
		argvalue3, err1156 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1156 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err1157 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err1157 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5, err1158 := (strconv.ParseInt(flag.Arg(6), 10, 64))
		if err1158 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		argvalue6 := flag.Arg(7) == "true"
		value6 := argvalue6
		tmp7, err1160 := (strconv.Atoi(flag.Arg(8)))
		if err1160 != nil {
			Usage()
			return
		}
		argvalue7 := int32(tmp7)
		value7 := argvalue7
		arg1161 := flag.Arg(9)
		mbTrans1162 := thrift.NewTMemoryBufferLen(len(arg1161))
		defer mbTrans1162.Close()
		_, err1163 := mbTrans1162.WriteString(arg1161)
		if err1163 != nil {
			Usage()
			return
		}
		factory1164 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1165 := factory1164.GetProtocol(mbTrans1162)
		argvalue8 := services.NewFromInfo()
		err1166 := argvalue8.Read(jsProt1165)
		if err1166 != nil {
			Usage()
			return
		}
		value8 := argvalue8
		fmt.Print(client.GetUnclassifiedGroupResources(value0, value1, value2, value3, value4, value5, value6, value7, value8))
		fmt.Print("\n")
		break
	case "getUnclassifiedGroupResourcesByType":
		if flag.NArg()-1 != 9 {
			fmt.Fprintln(os.Stderr, "GetUnclassifiedGroupResourcesByType requires 9 args")
			flag.Usage()
		}
		argvalue0, err1167 := (strconv.ParseInt(flag.Arg(1), 10, 64))
		if err1167 != nil {
			Usage()
			return
		}
		value0 := argvalue0
		tmp1, err := (strconv.Atoi(flag.Arg(2)))
		if err != nil {
			Usage()
			return
		}
		argvalue1 := services.Zone(tmp1)
		value1 := argvalue1
		tmp2, err := (strconv.Atoi(flag.Arg(3)))
		if err != nil {
			Usage()
			return
		}
		argvalue2 := services.ResourceType(tmp2)
		value2 := argvalue2
		argvalue3, err1168 := (strconv.ParseInt(flag.Arg(4), 10, 64))
		if err1168 != nil {
			Usage()
			return
		}
		value3 := argvalue3
		argvalue4, err1169 := (strconv.ParseInt(flag.Arg(5), 10, 64))
		if err1169 != nil {
			Usage()
			return
		}
		value4 := argvalue4
		argvalue5, err1170 := (strconv.ParseInt(flag.Arg(6), 10, 64))
		if err1170 != nil {
			Usage()
			return
		}
		value5 := argvalue5
		argvalue6 := flag.Arg(7) == "true"
		value6 := argvalue6
		tmp7, err1172 := (strconv.Atoi(flag.Arg(8)))
		if err1172 != nil {
			Usage()
			return
		}
		argvalue7 := int32(tmp7)
		value7 := argvalue7
		arg1173 := flag.Arg(9)
		mbTrans1174 := thrift.NewTMemoryBufferLen(len(arg1173))
		defer mbTrans1174.Close()
		_, err1175 := mbTrans1174.WriteString(arg1173)
		if err1175 != nil {
			Usage()
			return
		}
		factory1176 := thrift.NewTSimpleJSONProtocolFactory()
		jsProt1177 := factory1176.GetProtocol(mbTrans1174)
		argvalue8 := services.NewFromInfo()
		err1178 := argvalue8.Read(jsProt1177)
		if err1178 != nil {
			Usage()
			return
		}
		value8 := argvalue8
		fmt.Print(client.GetUnclassifiedGroupResourcesByType(value0, value1, value2, value3, value4, value5, value6, value7, value8))
		fmt.Print("\n")
		break
	case "":
		Usage()
		break
	default:
		fmt.Fprintln(os.Stderr, "Invalid function ", cmd)
	}
}