cmd

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2017 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AuthCmd = &cobra.Command{
	Use:   "auth",
	Short: TR("auth.auth.post.summary"),
	Long:  TR(`auth.auth.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		param, err := collectAuthCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

AuthCmd defines 'auth' subcommand

View Source
var AuthCmdAuthKey string

AuthCmdAuthKey holds value of 'authKey' option

View Source
var AuthCmdAuthKeyId string

AuthCmdAuthKeyId holds value of 'authKeyId' option

View Source
var AuthCmdBody string

AuthCmdBody holds contents of request body to be sent

View Source
var AuthCmdEmail string

AuthCmdEmail holds value of 'email' option

View Source
var AuthCmdOperatorId string

AuthCmdOperatorId holds value of 'operatorId' option

View Source
var AuthCmdPassword string

AuthCmdPassword holds value of 'password' option

View Source
var AuthCmdTokenTimeoutSeconds int64

AuthCmdTokenTimeoutSeconds holds value of 'tokenTimeoutSeconds' option

View Source
var AuthCmdUserName string

AuthCmdUserName holds value of 'userName' option

View Source
var AuthIssuePasswordResetTokenCmd = &cobra.Command{
	Use:   "issue-password-reset-token",
	Short: TR("auth.issue_password_reset_token.post.summary"),
	Long:  TR(`auth.issue_password_reset_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		param, err := collectAuthIssuePasswordResetTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

AuthIssuePasswordResetTokenCmd defines 'issue-password-reset-token' subcommand

View Source
var AuthIssuePasswordResetTokenCmdBody string

AuthIssuePasswordResetTokenCmdBody holds contents of request body to be sent

View Source
var AuthIssuePasswordResetTokenCmdEmail string

AuthIssuePasswordResetTokenCmdEmail holds value of 'email' option

View Source
var AuthVerifyPasswordResetTokenCmd = &cobra.Command{
	Use:   "verify-password-reset-token",
	Short: TR("auth.verify_password_reset_token.post.summary"),
	Long:  TR(`auth.verify_password_reset_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		param, err := collectAuthVerifyPasswordResetTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

AuthVerifyPasswordResetTokenCmd defines 'verify-password-reset-token' subcommand

View Source
var AuthVerifyPasswordResetTokenCmdBody string

AuthVerifyPasswordResetTokenCmdBody holds contents of request body to be sent

View Source
var AuthVerifyPasswordResetTokenCmdPassword string

AuthVerifyPasswordResetTokenCmdPassword holds value of 'password' option

View Source
var AuthVerifyPasswordResetTokenCmdToken string

AuthVerifyPasswordResetTokenCmdToken holds value of 'token' option

View Source
var BillsCmd = &cobra.Command{
	Use:   "bills",
	Short: TR("bills.cli.summary"),
	Long:  TR(`bills.cli.description`),
}

BillsCmd defines 'bills' subcommand

View Source
var BillsExportCmd = &cobra.Command{
	Use:   "export",
	Short: TR("bills.export_billing.post.summary"),
	Long:  TR(`bills.export_billing.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectBillsExportCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

BillsExportCmd defines 'export' subcommand

View Source
var BillsExportCmdExportMode string

BillsExportCmdExportMode holds value of 'export_mode' option

View Source
var BillsExportCmdYyyyMM string

BillsExportCmdYyyyMM holds value of 'yyyyMM' option

View Source
var BillsExportLatestCmd = &cobra.Command{
	Use:   "export-latest",
	Short: TR("bills.export_latest_billing.post.summary"),
	Long:  TR(`bills.export_latest_billing.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectBillsExportLatestCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

BillsExportLatestCmd defines 'export-latest' subcommand

View Source
var BillsExportLatestCmdExportMode string

BillsExportLatestCmdExportMode holds value of 'export_mode' option

View Source
var BillsGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("bills.get_billing.get.summary"),
	Long:  TR(`bills.get_billing.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectBillsGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

BillsGetCmd defines 'get' subcommand

View Source
var BillsGetCmdYyyyMM string

BillsGetCmdYyyyMM holds value of 'yyyyMM' option

View Source
var BillsGetDailyCmd = &cobra.Command{
	Use:   "get-daily",
	Short: TR("bills.get_billing_per_day.get.summary"),
	Long:  TR(`bills.get_billing_per_day.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectBillsGetDailyCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

BillsGetDailyCmd defines 'get-daily' subcommand

View Source
var BillsGetDailyCmdYyyyMM string

BillsGetDailyCmdYyyyMM holds value of 'yyyyMM' option

View Source
var BillsGetLatestCmd = &cobra.Command{
	Use:   "get-latest",
	Short: TR("bills.get_latest_billing.get.summary"),
	Long:  TR(`bills.get_latest_billing.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectBillsGetLatestCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

BillsGetLatestCmd defines 'get-latest' subcommand

View Source
var BillsListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("bills.get_billing_history.get.summary"),
	Long:  TR(`bills.get_billing_history.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectBillsListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

BillsListCmd defines 'list' subcommand

View Source
var CompletionCmd = &cobra.Command{
	Use:   "completion",
	Short: TR("completion.cli.summary"),
	Long:  TR("completion.cli.description"),
	RunE: func(cmd *cobra.Command, args []string) error {
		err := RootCmd.GenBashCompletion(os.Stdout)
		if err != nil {
			return err
		}
		return nil
	},
}

CompletionCmd defines 'completion' subcommand

View Source
var ConfigureCmd = &cobra.Command{
	Use:   "configure",
	Short: TR("configure.cli.summary"),
	Long:  TR("configure.cli.description"),
	RunE: func(cmd *cobra.Command, args []string) error {
		pn := getSpecifiedProfileName()
		if pn == "" {
			pn = "default"
		}

		profile, err := collectProfileInfo(pn)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		err = saveProfile(pn, profile)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		return nil
	},
}

ConfigureCmd defines 'configure' subcommand

View Source
var ConfigureGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("configure.get.cli.summary"),
	Long:  TR("configure.get.cli.description"),
	RunE: func(cmd *cobra.Command, args []string) error {
		pn := getSpecifiedProfileName()
		if pn == "" {
			pn = "default"
		}

		p, err := loadProfile(pn)
		if err != nil {
			return err
		}

		prettyPrintObjectAsJSON(p)
		return nil
	},
}

ConfigureGetCmd defineds 'get' subcommand

View Source
var CouponsCmd = &cobra.Command{
	Use:   "coupons",
	Short: TR("coupons.cli.summary"),
	Long:  TR(`coupons.cli.description`),
}

CouponsCmd defines 'coupons' subcommand

View Source
var CouponsListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("payment.list_coupons.get.summary"),
	Long:  TR(`payment.list_coupons.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectCouponsListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

CouponsListCmd defines 'list' subcommand

View Source
var CouponsRegisterCmd = &cobra.Command{
	Use:   "register",
	Short: TR("payment.register_coupon.post.summary"),
	Long:  TR(`payment.register_coupon.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectCouponsRegisterCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

CouponsRegisterCmd defines 'register' subcommand

View Source
var CouponsRegisterCmdCouponCode string

CouponsRegisterCmdCouponCode holds value of 'coupon_code' option

View Source
var CredentialsCmd = &cobra.Command{
	Use:   "credentials",
	Short: TR("credentials.cli.summary"),
	Long:  TR(`credentials.cli.description`),
}

CredentialsCmd defines 'credentials' subcommand

View Source
var CredentialsCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("credentials.create_credential.post.summary"),
	Long:  TR(`credentials.create_credential.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectCredentialsCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

CredentialsCreateCmd defines 'create' subcommand

View Source
var CredentialsCreateCmdBody string

CredentialsCreateCmdBody holds contents of request body to be sent

View Source
var CredentialsCreateCmdCredentialsId string

CredentialsCreateCmdCredentialsId holds value of 'credentials_id' option

View Source
var CredentialsCreateCmdDescription string

CredentialsCreateCmdDescription holds value of 'description' option

View Source
var CredentialsCreateCmdType string

CredentialsCreateCmdType holds value of 'type' option

View Source
var CredentialsDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("credentials.delete_credential.delete.summary"),
	Long:  TR(`credentials.delete_credential.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectCredentialsDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

CredentialsDeleteCmd defines 'delete' subcommand

View Source
var CredentialsDeleteCmdCredentialsId string

CredentialsDeleteCmdCredentialsId holds value of 'credentials_id' option

View Source
var CredentialsListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("credentials.list_credentials.get.summary"),
	Long:  TR(`credentials.list_credentials.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectCredentialsListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

CredentialsListCmd defines 'list' subcommand

View Source
var CredentialsUpdateCmd = &cobra.Command{
	Use:   "update",
	Short: TR("credentials.update_credential.put.summary"),
	Long:  TR(`credentials.update_credential.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectCredentialsUpdateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

CredentialsUpdateCmd defines 'update' subcommand

View Source
var CredentialsUpdateCmdBody string

CredentialsUpdateCmdBody holds contents of request body to be sent

View Source
var CredentialsUpdateCmdCredentialsId string

CredentialsUpdateCmdCredentialsId holds value of 'credentials_id' option

View Source
var CredentialsUpdateCmdDescription string

CredentialsUpdateCmdDescription holds value of 'description' option

View Source
var CredentialsUpdateCmdType string

CredentialsUpdateCmdType holds value of 'type' option

View Source
var DataCmd = &cobra.Command{
	Use:   "data",
	Short: TR("data.cli.summary"),
	Long:  TR(`data.cli.description`),
}

DataCmd defines 'data' subcommand

View Source
var DataGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("subscribers.get_data_from_subscriber.get.summary"),
	Long:  TR(`subscribers.get_data_from_subscriber.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectDataGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

DataGetCmd defines 'get' subcommand

View Source
var DataGetCmdFrom int64

DataGetCmdFrom holds value of 'from' option

View Source
var DataGetCmdImsi string

DataGetCmdImsi holds value of 'imsi' option

View Source
var DataGetCmdLastEvaluatedKey string

DataGetCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var DataGetCmdLimit int64

DataGetCmdLimit holds value of 'limit' option

View Source
var DataGetCmdSort string

DataGetCmdSort holds value of 'sort' option

View Source
var DataGetCmdTo int64

DataGetCmdTo holds value of 'to' option

View Source
var EventHandlersCmd = &cobra.Command{
	Use:   "event-handlers",
	Short: TR("event_handlers.cli.summary"),
	Long:  TR(`event_handlers.cli.description`),
}

EventHandlersCmd defines 'event-handlers' subcommand

View Source
var EventHandlersCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("event_handlers.create_event_handler.post.summary"),
	Long:  TR(`event_handlers.create_event_handler.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersCreateCmd defines 'create' subcommand

View Source
var EventHandlersCreateCmdBody string

EventHandlersCreateCmdBody holds contents of request body to be sent

View Source
var EventHandlersCreateCmdDescription string

EventHandlersCreateCmdDescription holds value of 'description' option

View Source
var EventHandlersCreateCmdName string

EventHandlersCreateCmdName holds value of 'name' option

View Source
var EventHandlersCreateCmdStatus string

EventHandlersCreateCmdStatus holds value of 'status' option

View Source
var EventHandlersCreateCmdTargetGroupId string

EventHandlersCreateCmdTargetGroupId holds value of 'targetGroupId' option

View Source
var EventHandlersCreateCmdTargetImsi string

EventHandlersCreateCmdTargetImsi holds value of 'targetImsi' option

View Source
var EventHandlersCreateCmdTargetOperatorId string

EventHandlersCreateCmdTargetOperatorId holds value of 'targetOperatorId' option

View Source
var EventHandlersDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("event_handlers.delete_event_handler.delete.summary"),
	Long:  TR(`event_handlers.delete_event_handler.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersDeleteCmd defines 'delete' subcommand

View Source
var EventHandlersDeleteCmdHandlerId string

EventHandlersDeleteCmdHandlerId holds value of 'handler_id' option

View Source
var EventHandlersGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("event_handlers.get_event_handler.get.summary"),
	Long:  TR(`event_handlers.get_event_handler.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersGetCmd defines 'get' subcommand

View Source
var EventHandlersGetCmdHandlerId string

EventHandlersGetCmdHandlerId holds value of 'handler_id' option

View Source
var EventHandlersIgnoreCmd = &cobra.Command{
	Use:   "ignore",
	Short: TR("event_handlers.set_ignore_event_handler.post.summary"),
	Long:  TR(`event_handlers.set_ignore_event_handler.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersIgnoreCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersIgnoreCmd defines 'ignore' subcommand

View Source
var EventHandlersIgnoreCmdHandlerId string

EventHandlersIgnoreCmdHandlerId holds value of 'handler_id' option

View Source
var EventHandlersIgnoreCmdImsi string

EventHandlersIgnoreCmdImsi holds value of 'imsi' option

View Source
var EventHandlersListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("event_handlers.list_event_handlers.get.summary"),
	Long:  TR(`event_handlers.list_event_handlers.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersListCmd defines 'list' subcommand

View Source
var EventHandlersListCmdTarget string

EventHandlersListCmdTarget holds value of 'target' option

View Source
var EventHandlersListForSubscriberCmd = &cobra.Command{
	Use:   "list-for-subscriber",
	Short: TR("event_handlers.list_event_handlers_by_subscriber.get.summary"),
	Long:  TR(`event_handlers.list_event_handlers_by_subscriber.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersListForSubscriberCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersListForSubscriberCmd defines 'list-for-subscriber' subcommand

View Source
var EventHandlersListForSubscriberCmdImsi string

EventHandlersListForSubscriberCmdImsi holds value of 'imsi' option

View Source
var EventHandlersUnignoreCmd = &cobra.Command{
	Use:   "unignore",
	Short: TR("event_handlers.delete_ignore_event_handler.delete.summary"),
	Long:  TR(`event_handlers.delete_ignore_event_handler.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersUnignoreCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersUnignoreCmd defines 'unignore' subcommand

View Source
var EventHandlersUnignoreCmdHandlerId string

EventHandlersUnignoreCmdHandlerId holds value of 'handler_id' option

View Source
var EventHandlersUnignoreCmdImsi string

EventHandlersUnignoreCmdImsi holds value of 'imsi' option

View Source
var EventHandlersUpdateCmd = &cobra.Command{
	Use:   "update",
	Short: TR("event_handlers.update_event_handler.put.summary"),
	Long:  TR(`event_handlers.update_event_handler.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectEventHandlersUpdateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

EventHandlersUpdateCmd defines 'update' subcommand

View Source
var EventHandlersUpdateCmdBody string

EventHandlersUpdateCmdBody holds contents of request body to be sent

View Source
var EventHandlersUpdateCmdHandlerId string

EventHandlersUpdateCmdHandlerId holds value of 'handler_id' option

View Source
var FilesCmd = &cobra.Command{
	Use:   "files",
	Short: TR("files.cli.summary"),
	Long:  TR(`files.cli.description`),
}

FilesCmd defines 'files' subcommand

View Source
var FilesGetExportedCmd = &cobra.Command{
	Use:   "get-exported",
	Short: TR("files.get_exported.get.summary"),
	Long:  TR(`files.get_exported.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectFilesGetExportedCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

FilesGetExportedCmd defines 'get-exported' subcommand

View Source
var FilesGetExportedCmdExportedFileId string

FilesGetExportedCmdExportedFileId holds value of 'exported_file_id' option

View Source
var GroupsCmd = &cobra.Command{
	Use:   "groups",
	Short: TR("groups.cli.summary"),
	Long:  TR(`groups.cli.description`),
}

GroupsCmd defines 'groups' subcommand

View Source
var GroupsCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("groups.create_group.post.summary"),
	Long:  TR(`groups.create_group.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsCreateCmd defines 'create' subcommand

View Source
var GroupsCreateCmdBody string

GroupsCreateCmdBody holds contents of request body to be sent

View Source
var GroupsDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("groups.delete_group.delete.summary"),
	Long:  TR(`groups.delete_group.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsDeleteCmd defines 'delete' subcommand

View Source
var GroupsDeleteCmdGroupId string

GroupsDeleteCmdGroupId holds value of 'group_id' option

View Source
var GroupsDeleteConfigCmd = &cobra.Command{
	Use:   "delete-config",
	Short: TR("groups.delete_configuration_parameter.delete.summary"),
	Long:  TR(`groups.delete_configuration_parameter.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsDeleteConfigCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsDeleteConfigCmd defines 'delete-config' subcommand

View Source
var GroupsDeleteConfigCmdGroupId string

GroupsDeleteConfigCmdGroupId holds value of 'group_id' option

View Source
var GroupsDeleteConfigCmdName string

GroupsDeleteConfigCmdName holds value of 'name' option

View Source
var GroupsDeleteConfigCmdNamespace string

GroupsDeleteConfigCmdNamespace holds value of 'namespace' option

View Source
var GroupsDeleteTagCmd = &cobra.Command{
	Use:   "delete-tag",
	Short: TR("groups.delete_group_tag.delete.summary"),
	Long:  TR(`groups.delete_group_tag.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsDeleteTagCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsDeleteTagCmd defines 'delete-tag' subcommand

View Source
var GroupsDeleteTagCmdGroupId string

GroupsDeleteTagCmdGroupId holds value of 'group_id' option

View Source
var GroupsDeleteTagCmdTagName string

GroupsDeleteTagCmdTagName holds value of 'tag_name' option

View Source
var GroupsGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("groups.get_group.get.summary"),
	Long:  TR(`groups.get_group.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsGetCmd defines 'get' subcommand

View Source
var GroupsGetCmdGroupId string

GroupsGetCmdGroupId holds value of 'group_id' option

View Source
var GroupsListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("groups.list_groups.get.summary"),
	Long:  TR(`groups.list_groups.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsListCmd defines 'list' subcommand

View Source
var GroupsListCmdLastEvaluatedKey string

GroupsListCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var GroupsListCmdLimit int64

GroupsListCmdLimit holds value of 'limit' option

View Source
var GroupsListCmdTagName string

GroupsListCmdTagName holds value of 'tag_name' option

View Source
var GroupsListCmdTagValue string

GroupsListCmdTagValue holds value of 'tag_value' option

View Source
var GroupsListCmdTagValueMatchMode string

GroupsListCmdTagValueMatchMode holds value of 'tag_value_match_mode' option

View Source
var GroupsListSubscribersCmd = &cobra.Command{
	Use:   "list-subscribers",
	Short: TR("groups.list_subscribers_in_group.get.summary"),
	Long:  TR(`groups.list_subscribers_in_group.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsListSubscribersCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsListSubscribersCmd defines 'list-subscribers' subcommand

View Source
var GroupsListSubscribersCmdGroupId string

GroupsListSubscribersCmdGroupId holds value of 'group_id' option

View Source
var GroupsListSubscribersCmdLastEvaluatedKey string

GroupsListSubscribersCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var GroupsListSubscribersCmdLimit int64

GroupsListSubscribersCmdLimit holds value of 'limit' option

View Source
var GroupsPutConfigCmd = &cobra.Command{
	Use:   "put-config",
	Short: TR("groups.put_configuration_parameters.put.summary"),
	Long:  TR(`groups.put_configuration_parameters.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsPutConfigCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsPutConfigCmd defines 'put-config' subcommand

View Source
var GroupsPutConfigCmdBody string

GroupsPutConfigCmdBody holds contents of request body to be sent

View Source
var GroupsPutConfigCmdGroupId string

GroupsPutConfigCmdGroupId holds value of 'group_id' option

View Source
var GroupsPutConfigCmdNamespace string

GroupsPutConfigCmdNamespace holds value of 'namespace' option

View Source
var GroupsPutTagsCmd = &cobra.Command{
	Use:   "put-tags",
	Short: TR("groups.put_group_tags.put.summary"),
	Long:  TR(`groups.put_group_tags.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectGroupsPutTagsCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

GroupsPutTagsCmd defines 'put-tags' subcommand

View Source
var GroupsPutTagsCmdBody string

GroupsPutTagsCmdBody holds contents of request body to be sent

View Source
var GroupsPutTagsCmdGroupId string

GroupsPutTagsCmdGroupId holds value of 'group_id' option

View Source
var LogsCmd = &cobra.Command{
	Use:   "logs",
	Short: TR("logs.cli.summary"),
	Long:  TR(`logs.cli.description`),
}

LogsCmd defines 'logs' subcommand

View Source
var LogsGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("logs.get_logs.get.summary"),
	Long:  TR(`logs.get_logs.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLogsGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LogsGetCmd defines 'get' subcommand

View Source
var LogsGetCmdFrom int64

LogsGetCmdFrom holds value of 'from' option

View Source
var LogsGetCmdLastEvaluatedKey string

LogsGetCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var LogsGetCmdLimit int64

LogsGetCmdLimit holds value of 'limit' option

View Source
var LogsGetCmdResourceId string

LogsGetCmdResourceId holds value of 'resource_id' option

View Source
var LogsGetCmdResourceType string

LogsGetCmdResourceType holds value of 'resource_type' option

View Source
var LogsGetCmdService string

LogsGetCmdService holds value of 'service' option

View Source
var LogsGetCmdTo int64

LogsGetCmdTo holds value of 'to' option

View Source
var LoraDevicesCmd = &cobra.Command{
	Use:   "lora-devices",
	Short: TR("lora_devices.cli.summary"),
	Long:  TR(`lora_devices.cli.description`),
}

LoraDevicesCmd defines 'lora-devices' subcommand

View Source
var LoraDevicesDeleteTagCmd = &cobra.Command{
	Use:   "delete-tag",
	Short: TR("lora_devices.delete_lora_device_tag.delete.summary"),
	Long:  TR(`lora_devices.delete_lora_device_tag.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesDeleteTagCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesDeleteTagCmd defines 'delete-tag' subcommand

View Source
var LoraDevicesDeleteTagCmdDeviceId string

LoraDevicesDeleteTagCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesDeleteTagCmdTagName string

LoraDevicesDeleteTagCmdTagName holds value of 'tag_name' option

View Source
var LoraDevicesDisableTerminationCmd = &cobra.Command{
	Use:   "disable-termination",
	Short: TR("lora_devices.disable_termination.post.summary"),
	Long:  TR(`lora_devices.disable_termination.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesDisableTerminationCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesDisableTerminationCmd defines 'disable-termination' subcommand

View Source
var LoraDevicesDisableTerminationCmdDeviceId string

LoraDevicesDisableTerminationCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesEnableTerminationCmd = &cobra.Command{
	Use:   "enable-termination",
	Short: TR("lora_devices.enable_termination.post.summary"),
	Long:  TR(`lora_devices.enable_termination.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesEnableTerminationCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesEnableTerminationCmd defines 'enable-termination' subcommand

View Source
var LoraDevicesEnableTerminationCmdDeviceId string

LoraDevicesEnableTerminationCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("lora_devices.get_lora_device.get.summary"),
	Long:  TR(`lora_devices.get_lora_device.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesGetCmd defines 'get' subcommand

View Source
var LoraDevicesGetCmdDeviceId string

LoraDevicesGetCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesGetDataCmd = &cobra.Command{
	Use:   "get-data",
	Short: TR("lora_devices.get_data_from_lora_device.get.summary"),
	Long:  TR(`lora_devices.get_data_from_lora_device.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesGetDataCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesGetDataCmd defines 'get-data' subcommand

View Source
var LoraDevicesGetDataCmdDeviceId string

LoraDevicesGetDataCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesGetDataCmdFrom int64

LoraDevicesGetDataCmdFrom holds value of 'from' option

View Source
var LoraDevicesGetDataCmdLastEvaluatedKey string

LoraDevicesGetDataCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var LoraDevicesGetDataCmdLimit int64

LoraDevicesGetDataCmdLimit holds value of 'limit' option

View Source
var LoraDevicesGetDataCmdSort string

LoraDevicesGetDataCmdSort holds value of 'sort' option

View Source
var LoraDevicesGetDataCmdTo int64

LoraDevicesGetDataCmdTo holds value of 'to' option

View Source
var LoraDevicesListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("lora_devices.list_lora_devices.get.summary"),
	Long:  TR(`lora_devices.list_lora_devices.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesListCmd defines 'list' subcommand

View Source
var LoraDevicesListCmdLastEvaluatedKey string

LoraDevicesListCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var LoraDevicesListCmdLimit int64

LoraDevicesListCmdLimit holds value of 'limit' option

View Source
var LoraDevicesListCmdTagName string

LoraDevicesListCmdTagName holds value of 'tag_name' option

View Source
var LoraDevicesListCmdTagValue string

LoraDevicesListCmdTagValue holds value of 'tag_value' option

View Source
var LoraDevicesListCmdTagValueMatchMode string

LoraDevicesListCmdTagValueMatchMode holds value of 'tag_value_match_mode' option

View Source
var LoraDevicesPutTagsCmd = &cobra.Command{
	Use:   "put-tags",
	Short: TR("lora_devices.put_lora_device_tags.put.summary"),
	Long:  TR(`lora_devices.put_lora_device_tags.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesPutTagsCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesPutTagsCmd defines 'put-tags' subcommand

View Source
var LoraDevicesPutTagsCmdBody string

LoraDevicesPutTagsCmdBody holds contents of request body to be sent

View Source
var LoraDevicesPutTagsCmdDeviceId string

LoraDevicesPutTagsCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesRegisterCmd = &cobra.Command{
	Use:   "register",
	Short: TR("lora_devices.register_lora_device.post.summary"),
	Long:  TR(`lora_devices.register_lora_device.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesRegisterCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesRegisterCmd defines 'register' subcommand

View Source
var LoraDevicesRegisterCmdBody string

LoraDevicesRegisterCmdBody holds contents of request body to be sent

View Source
var LoraDevicesRegisterCmdDeviceId string

LoraDevicesRegisterCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesSendDataCmd = &cobra.Command{
	Use:   "send-data",
	Short: TR("lora_devices.send_data_to_lora_device.post.summary"),
	Long:  TR(`lora_devices.send_data_to_lora_device.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesSendDataCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesSendDataCmd defines 'send-data' subcommand

View Source
var LoraDevicesSendDataCmdBody string

LoraDevicesSendDataCmdBody holds contents of request body to be sent

View Source
var LoraDevicesSendDataCmdData string

LoraDevicesSendDataCmdData holds value of 'data' option

View Source
var LoraDevicesSendDataCmdDeviceId string

LoraDevicesSendDataCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesSetGroupCmd = &cobra.Command{
	Use:   "set-group",
	Short: TR("lora_devices.set_group.post.summary"),
	Long:  TR(`lora_devices.set_group.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesSetGroupCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesSetGroupCmd defines 'set-group' subcommand

View Source
var LoraDevicesSetGroupCmdBody string

LoraDevicesSetGroupCmdBody holds contents of request body to be sent

View Source
var LoraDevicesSetGroupCmdCreatedTime int64

LoraDevicesSetGroupCmdCreatedTime holds value of 'createdTime' option

View Source
var LoraDevicesSetGroupCmdDeviceId string

LoraDevicesSetGroupCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesSetGroupCmdGroupId string

LoraDevicesSetGroupCmdGroupId holds value of 'groupId' option

View Source
var LoraDevicesSetGroupCmdLastModifiedTime int64

LoraDevicesSetGroupCmdLastModifiedTime holds value of 'lastModifiedTime' option

View Source
var LoraDevicesSetGroupCmdOperatorId string

LoraDevicesSetGroupCmdOperatorId holds value of 'operatorId' option

View Source
var LoraDevicesTerminateCmd = &cobra.Command{
	Use:   "terminate",
	Short: TR("lora_devices.terminate_lora_device.post.summary"),
	Long:  TR(`lora_devices.terminate_lora_device.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesTerminateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesTerminateCmd defines 'terminate' subcommand

View Source
var LoraDevicesTerminateCmdDeviceId string

LoraDevicesTerminateCmdDeviceId holds value of 'device_id' option

View Source
var LoraDevicesUnsetGroupCmd = &cobra.Command{
	Use:   "unset-group",
	Short: TR("lora_devices.unset_group.post.summary"),
	Long:  TR(`lora_devices.unset_group.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectLoraDevicesUnsetGroupCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

LoraDevicesUnsetGroupCmd defines 'unset-group' subcommand

View Source
var LoraDevicesUnsetGroupCmdDeviceId string

LoraDevicesUnsetGroupCmdDeviceId holds value of 'device_id' option

View Source
var OperatorAuthKeysCmd = &cobra.Command{
	Use:   "auth-keys",
	Short: TR("operator.auth_keys.cli.summary"),
	Long:  TR(`operator.auth_keys.cli.description`),
}

OperatorAuthKeysCmd defines 'auth-keys' subcommand

View Source
var OperatorAuthKeysDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("operator.delete_operator_auth_key.delete.summary"),
	Long:  TR(`operator.delete_operator_auth_key.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorAuthKeysDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorAuthKeysDeleteCmd defines 'delete' subcommand

View Source
var OperatorAuthKeysDeleteCmdAuthKeyId string

OperatorAuthKeysDeleteCmdAuthKeyId holds value of 'auth_key_id' option

View Source
var OperatorAuthKeysDeleteCmdOperatorId string

OperatorAuthKeysDeleteCmdOperatorId holds value of 'operator_id' option

View Source
var OperatorAuthKeysGenerateCmd = &cobra.Command{
	Use:   "generate",
	Short: TR("operator.generate_operator_auth_key.post.summary"),
	Long:  TR(`operator.generate_operator_auth_key.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorAuthKeysGenerateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorAuthKeysGenerateCmd defines 'generate' subcommand

View Source
var OperatorAuthKeysGenerateCmdOperatorId string

OperatorAuthKeysGenerateCmdOperatorId holds value of 'operator_id' option

View Source
var OperatorAuthKeysListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("operator.list_operator_auth_keys.get.summary"),
	Long:  TR(`operator.list_operator_auth_keys.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorAuthKeysListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorAuthKeysListCmd defines 'list' subcommand

View Source
var OperatorAuthKeysListCmdOperatorId string

OperatorAuthKeysListCmdOperatorId holds value of 'operator_id' option

View Source
var OperatorCmd = &cobra.Command{
	Use:   "operator",
	Short: TR("operator.cli.summary"),
	Long:  TR(`operator.cli.description`),
}

OperatorCmd defines 'operator' subcommand

View Source
var OperatorCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("operator.create_operator.post.summary"),
	Long:  TR(`operator.create_operator.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorCreateCmd defines 'create' subcommand

View Source
var OperatorCreateCmdBody string

OperatorCreateCmdBody holds contents of request body to be sent

View Source
var OperatorCreateCmdEmail string

OperatorCreateCmdEmail holds value of 'email' option

View Source
var OperatorCreateCmdPassword string

OperatorCreateCmdPassword holds value of 'password' option

View Source
var OperatorGenerateApiTokenCmd = &cobra.Command{
	Use:   "generate-api-token",
	Short: TR("operator.generate_auth_token.post.summary"),
	Long:  TR(`operator.generate_auth_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorGenerateApiTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorGenerateApiTokenCmd defines 'generate-api-token' subcommand

View Source
var OperatorGenerateApiTokenCmdBody string

OperatorGenerateApiTokenCmdBody holds contents of request body to be sent

View Source
var OperatorGenerateApiTokenCmdOperatorId string

OperatorGenerateApiTokenCmdOperatorId holds value of 'operator_id' option

View Source
var OperatorGenerateApiTokenCmdTokenTimeoutSeconds int64

OperatorGenerateApiTokenCmdTokenTimeoutSeconds holds value of 'tokenTimeoutSeconds' option

View Source
var OperatorGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("operator.get_operator.get.summary"),
	Long:  TR(`operator.get_operator.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorGetCmd defines 'get' subcommand

View Source
var OperatorGetCmdOperatorId string

OperatorGetCmdOperatorId holds value of 'operator_id' option

View Source
var OperatorGetSupportTokenCmd = &cobra.Command{
	Use:   "get-support-token",
	Short: TR("operator.generate_support_token.post.summary"),
	Long:  TR(`operator.generate_support_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorGetSupportTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorGetSupportTokenCmd defines 'get-support-token' subcommand

View Source
var OperatorGetSupportTokenCmdOperatorId string

OperatorGetSupportTokenCmdOperatorId holds value of 'operator_id' option

View Source
var OperatorIssueEmailChangeTokenCmd = &cobra.Command{
	Use:   "issue-email-change-token",
	Short: TR("operator.issue_email_change_token.post.summary"),
	Long:  TR(`operator.issue_email_change_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorIssueEmailChangeTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorIssueEmailChangeTokenCmd defines 'issue-email-change-token' subcommand

View Source
var OperatorIssueEmailChangeTokenCmdBody string

OperatorIssueEmailChangeTokenCmdBody holds contents of request body to be sent

View Source
var OperatorIssueEmailChangeTokenCmdEmail string

OperatorIssueEmailChangeTokenCmdEmail holds value of 'email' option

View Source
var OperatorUpdatePasswordCmd = &cobra.Command{
	Use:   "update-password",
	Short: TR("operator.update_operator_password.post.summary"),
	Long:  TR(`operator.update_operator_password.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorUpdatePasswordCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorUpdatePasswordCmd defines 'update-password' subcommand

View Source
var OperatorUpdatePasswordCmdBody string

OperatorUpdatePasswordCmdBody holds contents of request body to be sent

View Source
var OperatorUpdatePasswordCmdCurrentPassword string

OperatorUpdatePasswordCmdCurrentPassword holds value of 'currentPassword' option

View Source
var OperatorUpdatePasswordCmdNewPassword string

OperatorUpdatePasswordCmdNewPassword holds value of 'newPassword' option

View Source
var OperatorUpdatePasswordCmdOperatorId string

OperatorUpdatePasswordCmdOperatorId holds value of 'operator_id' option

View Source
var OperatorVerifyCmd = &cobra.Command{
	Use:   "verify",
	Short: TR("operator.verify_operator.post.summary"),
	Long:  TR(`operator.verify_operator.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		param, err := collectOperatorVerifyCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorVerifyCmd defines 'verify' subcommand

View Source
var OperatorVerifyCmdBody string

OperatorVerifyCmdBody holds contents of request body to be sent

View Source
var OperatorVerifyCmdToken string

OperatorVerifyCmdToken holds value of 'token' option

View Source
var OperatorVerifyEmailChangeTokenCmd = &cobra.Command{
	Use:   "verify-email-change-token",
	Short: TR("operator.verify_email_change_token.post.summary"),
	Long:  TR(`operator.verify_email_change_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOperatorVerifyEmailChangeTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OperatorVerifyEmailChangeTokenCmd defines 'verify-email-change-token' subcommand

View Source
var OperatorVerifyEmailChangeTokenCmdBody string

OperatorVerifyEmailChangeTokenCmdBody holds contents of request body to be sent

View Source
var OperatorVerifyEmailChangeTokenCmdToken string

OperatorVerifyEmailChangeTokenCmdToken holds value of 'token' option

View Source
var OrdersCancelCmd = &cobra.Command{
	Use:   "cancel",
	Short: TR("orders.cancel_order.put.summary"),
	Long:  TR(`orders.cancel_order.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOrdersCancelCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OrdersCancelCmd defines 'cancel' subcommand

View Source
var OrdersCancelCmdOrderId string

OrdersCancelCmdOrderId holds value of 'order_id' option

View Source
var OrdersCmd = &cobra.Command{
	Use:   "orders",
	Short: TR("orders.cli.summary"),
	Long:  TR(`orders.cli.description`),
}

OrdersCmd defines 'orders' subcommand

View Source
var OrdersConfirmCmd = &cobra.Command{
	Use:   "confirm",
	Short: TR("orders.confirm_order.put.summary"),
	Long:  TR(`orders.confirm_order.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOrdersConfirmCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OrdersConfirmCmd defines 'confirm' subcommand

View Source
var OrdersConfirmCmdOrderId string

OrdersConfirmCmdOrderId holds value of 'order_id' option

View Source
var OrdersCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("orders.create_quotation.post.summary"),
	Long:  TR(`orders.create_quotation.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOrdersCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OrdersCreateCmd defines 'create' subcommand

View Source
var OrdersCreateCmdBody string

OrdersCreateCmdBody holds contents of request body to be sent

View Source
var OrdersCreateCmdShippingAddressId string

OrdersCreateCmdShippingAddressId holds value of 'shippingAddressId' option

View Source
var OrdersGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("orders.get_order.get.summary"),
	Long:  TR(`orders.get_order.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOrdersGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OrdersGetCmd defines 'get' subcommand

View Source
var OrdersGetCmdOrderId string

OrdersGetCmdOrderId holds value of 'order_id' option

View Source
var OrdersListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("orders.list_orders.get.summary"),
	Long:  TR(`orders.list_orders.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOrdersListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OrdersListCmd defines 'list' subcommand

View Source
var OrdersListSubscribersCmd = &cobra.Command{
	Use:   "list-subscribers",
	Short: TR("orders.list_ordered_subscriber.get.summary"),
	Long:  TR(`orders.list_ordered_subscriber.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOrdersListSubscribersCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OrdersListSubscribersCmd defines 'list-subscribers' subcommand

View Source
var OrdersListSubscribersCmdLastEvaluatedKey string

OrdersListSubscribersCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var OrdersListSubscribersCmdLimit int64

OrdersListSubscribersCmdLimit holds value of 'limit' option

View Source
var OrdersListSubscribersCmdOrderId string

OrdersListSubscribersCmdOrderId holds value of 'order_id' option

View Source
var OrdersRegisterSubscribersCmd = &cobra.Command{
	Use:   "register-subscribers",
	Short: TR("orders.register_ordered_sim.post.summary"),
	Long:  TR(`orders.register_ordered_sim.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectOrdersRegisterSubscribersCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

OrdersRegisterSubscribersCmd defines 'register-subscribers' subcommand

View Source
var OrdersRegisterSubscribersCmdOrderId string

OrdersRegisterSubscribersCmdOrderId holds value of 'order_id' option

View Source
var PayerInformationCmd = &cobra.Command{
	Use:   "payer-information",
	Short: TR("payment.payer_information.cli.summary"),
	Long:  TR(`payment.payer_information.cli.description`),
}

PayerInformationCmd defines 'payer-information' subcommand

View Source
var PayerInformationGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("payment.payer_information.get.summary"),
	Long:  TR(`payment.payer_information.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPayerInformationGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PayerInformationGetCmd defines 'get' subcommand

View Source
var PayerInformationRegisterCmd = &cobra.Command{
	Use:   "register",
	Short: TR("payment.payer_information.post.summary"),
	Long:  TR(`payment.payer_information.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPayerInformationRegisterCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PayerInformationRegisterCmd defines 'register' subcommand

View Source
var PayerInformationRegisterCmdBody string

PayerInformationRegisterCmdBody holds contents of request body to be sent

View Source
var PayerInformationRegisterCmdCompanyName string

PayerInformationRegisterCmdCompanyName holds value of 'companyName' option

View Source
var PayerInformationRegisterCmdDepartment string

PayerInformationRegisterCmdDepartment holds value of 'department' option

View Source
var PayerInformationRegisterCmdFullName string

PayerInformationRegisterCmdFullName holds value of 'fullName' option

View Source
var PaymentHistoryCmd = &cobra.Command{
	Use:   "payment-history",
	Short: TR("payment_history.cli.summary"),
	Long:  TR(`payment_history.cli.description`),
}

PaymentHistoryCmd defines 'payment-history' subcommand

View Source
var PaymentHistoryGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("payment.get_payment_transaction.get.summary"),
	Long:  TR(`payment.get_payment_transaction.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPaymentHistoryGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PaymentHistoryGetCmd defines 'get' subcommand

View Source
var PaymentHistoryGetCmdPaymentTransactionId string

PaymentHistoryGetCmdPaymentTransactionId holds value of 'payment_transaction_id' option

View Source
var PaymentMethodsCmd = &cobra.Command{
	Use:   "payment-methods",
	Short: TR("payment_methods.cli.summary"),
	Long:  TR(`payment_methods.cli.description`),
}

PaymentMethodsCmd defines 'payment-methods' subcommand

View Source
var PaymentMethodsGetCurrentCmd = &cobra.Command{
	Use:   "get-current",
	Short: TR("payment.get_payment_method.get.summary"),
	Long:  TR(`payment.get_payment_method.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPaymentMethodsGetCurrentCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PaymentMethodsGetCurrentCmd defines 'get-current' subcommand

View Source
var PaymentMethodsReactivateCurrentCmd = &cobra.Command{
	Use:   "reactivate-current",
	Short: TR("payment.activate_payment_method.post.summary"),
	Long:  TR(`payment.activate_payment_method.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPaymentMethodsReactivateCurrentCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PaymentMethodsReactivateCurrentCmd defines 'reactivate-current' subcommand

View Source
var PaymentMethodsWebpayCmd = &cobra.Command{
	Use:   "webpay",
	Short: TR("payment_methods.webpay.cli.summary"),
	Long:  TR(`payment_methods.webpay.cli.description`),
}

PaymentMethodsWebpayCmd defines 'webpay' subcommand

View Source
var PaymentMethodsWebpayRegisterCmd = &cobra.Command{
	Use:   "register",
	Short: TR("payment.register_webpay_payment_method.post.summary"),
	Long:  TR(`payment.register_webpay_payment_method.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPaymentMethodsWebpayRegisterCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PaymentMethodsWebpayRegisterCmd defines 'register' subcommand

View Source
var PaymentMethodsWebpayRegisterCmdBody string

PaymentMethodsWebpayRegisterCmdBody holds contents of request body to be sent

View Source
var PaymentMethodsWebpayRegisterCmdCvc string

PaymentMethodsWebpayRegisterCmdCvc holds value of 'cvc' option

View Source
var PaymentMethodsWebpayRegisterCmdExpireMonth int64

PaymentMethodsWebpayRegisterCmdExpireMonth holds value of 'expireMonth' option

View Source
var PaymentMethodsWebpayRegisterCmdExpireYear int64

PaymentMethodsWebpayRegisterCmdExpireYear holds value of 'expireYear' option

View Source
var PaymentMethodsWebpayRegisterCmdName string

PaymentMethodsWebpayRegisterCmdName holds value of 'name' option

View Source
var PaymentMethodsWebpayRegisterCmdNumber string

PaymentMethodsWebpayRegisterCmdNumber holds value of 'number' option

View Source
var PaymentStatementsCmd = &cobra.Command{
	Use:   "payment-statements",
	Short: TR("payment_statements.cli.summary"),
	Long:  TR(`payment_statements.cli.description`),
}

PaymentStatementsCmd defines 'payment-statements' subcommand

View Source
var PaymentStatementsExportCmd = &cobra.Command{
	Use:   "export",
	Short: TR("payment.export_payment_statement.post.summary"),
	Long:  TR(`payment.export_payment_statement.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPaymentStatementsExportCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PaymentStatementsExportCmd defines 'export' subcommand

View Source
var PaymentStatementsExportCmdExportMode string

PaymentStatementsExportCmdExportMode holds value of 'export_mode' option

View Source
var PaymentStatementsExportCmdPaymentStatementId string

PaymentStatementsExportCmdPaymentStatementId holds value of 'payment_statement_id' option

View Source
var PaymentStatementsListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("payment.list_payment_statements.get.summary"),
	Long:  TR(`payment.list_payment_statements.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectPaymentStatementsListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

PaymentStatementsListCmd defines 'list' subcommand

View Source
var ProductsCmd = &cobra.Command{
	Use:   "products",
	Short: TR("products.cli.summary"),
	Long:  TR(`products.cli.description`),
}

ProductsCmd defines 'products' subcommand

View Source
var ProductsListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("orders.list_products.get.summary"),
	Long:  TR(`orders.list_products.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectProductsListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

ProductsListCmd defines 'list' subcommand

View Source
var RolesCmd = &cobra.Command{
	Use:   "roles",
	Short: TR("roles.cli.summary"),
	Long:  TR(`roles.cli.description`),
}

RolesCmd defines 'roles' subcommand

View Source
var RolesCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("roles.create_role.post.summary"),
	Long:  TR(`roles.create_role.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectRolesCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

RolesCreateCmd defines 'create' subcommand

View Source
var RolesCreateCmdBody string

RolesCreateCmdBody holds contents of request body to be sent

View Source
var RolesCreateCmdDescription string

RolesCreateCmdDescription holds value of 'description' option

View Source
var RolesCreateCmdOperatorId string

RolesCreateCmdOperatorId holds value of 'operator_id' option

View Source
var RolesCreateCmdPermission string

RolesCreateCmdPermission holds value of 'permission' option

View Source
var RolesCreateCmdRoleId string

RolesCreateCmdRoleId holds value of 'role_id' option

View Source
var RolesDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("roles.delete_role.delete.summary"),
	Long:  TR(`roles.delete_role.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectRolesDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

RolesDeleteCmd defines 'delete' subcommand

View Source
var RolesDeleteCmdOperatorId string

RolesDeleteCmdOperatorId holds value of 'operator_id' option

View Source
var RolesDeleteCmdRoleId string

RolesDeleteCmdRoleId holds value of 'role_id' option

View Source
var RolesGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("roles.get_role.get.summary"),
	Long:  TR(`roles.get_role.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectRolesGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

RolesGetCmd defines 'get' subcommand

View Source
var RolesGetCmdOperatorId string

RolesGetCmdOperatorId holds value of 'operator_id' option

View Source
var RolesGetCmdRoleId string

RolesGetCmdRoleId holds value of 'role_id' option

View Source
var RolesListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("roles.list_roles.get.summary"),
	Long:  TR(`roles.list_roles.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectRolesListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

RolesListCmd defines 'list' subcommand

View Source
var RolesListCmdOperatorId string

RolesListCmdOperatorId holds value of 'operator_id' option

View Source
var RolesListUsersCmd = &cobra.Command{
	Use:   "list-users",
	Short: TR("roles.list_role_attached_users.get.summary"),
	Long:  TR(`roles.list_role_attached_users.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectRolesListUsersCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

RolesListUsersCmd defines 'list-users' subcommand

View Source
var RolesListUsersCmdOperatorId string

RolesListUsersCmdOperatorId holds value of 'operator_id' option

View Source
var RolesListUsersCmdRoleId string

RolesListUsersCmdRoleId holds value of 'role_id' option

View Source
var RolesUpdateCmd = &cobra.Command{
	Use:   "update",
	Short: TR("roles.update_role.put.summary"),
	Long:  TR(`roles.update_role.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectRolesUpdateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

RolesUpdateCmd defines 'update' subcommand

View Source
var RolesUpdateCmdBody string

RolesUpdateCmdBody holds contents of request body to be sent

View Source
var RolesUpdateCmdDescription string

RolesUpdateCmdDescription holds value of 'description' option

View Source
var RolesUpdateCmdOperatorId string

RolesUpdateCmdOperatorId holds value of 'operator_id' option

View Source
var RolesUpdateCmdPermission string

RolesUpdateCmdPermission holds value of 'permission' option

View Source
var RolesUpdateCmdRoleId string

RolesUpdateCmdRoleId holds value of 'role_id' option

View Source
var RootCmd = &cobra.Command{
	Use:   "soracom",
	Short: "soracom command",
	Long:  `A command line tool to invoke SORACOM API`,
}

RootCmd defines 'soracom' command

View Source
var ShippingAddressesCmd = &cobra.Command{
	Use:   "shipping-addresses",
	Short: TR("shipping_addresses.cli.summary"),
	Long:  TR(`shipping_addresses.cli.description`),
}

ShippingAddressesCmd defines 'shipping-addresses' subcommand

View Source
var ShippingAddressesCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("shipping_addresses.create_shipping_address.post.summary"),
	Long:  TR(`shipping_addresses.create_shipping_address.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectShippingAddressesCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

ShippingAddressesCreateCmd defines 'create' subcommand

View Source
var ShippingAddressesCreateCmdAddressLine1 string

ShippingAddressesCreateCmdAddressLine1 holds value of 'addressLine1' option

View Source
var ShippingAddressesCreateCmdAddressLine2 string

ShippingAddressesCreateCmdAddressLine2 holds value of 'addressLine2' option

View Source
var ShippingAddressesCreateCmdBody string

ShippingAddressesCreateCmdBody holds contents of request body to be sent

View Source
var ShippingAddressesCreateCmdBuilding string

ShippingAddressesCreateCmdBuilding holds value of 'building' option

View Source
var ShippingAddressesCreateCmdCity string

ShippingAddressesCreateCmdCity holds value of 'city' option

View Source
var ShippingAddressesCreateCmdCompanyName string

ShippingAddressesCreateCmdCompanyName holds value of 'companyName' option

View Source
var ShippingAddressesCreateCmdDepartment string

ShippingAddressesCreateCmdDepartment holds value of 'department' option

View Source
var ShippingAddressesCreateCmdFullName string

ShippingAddressesCreateCmdFullName holds value of 'fullName' option

View Source
var ShippingAddressesCreateCmdOperatorId string

ShippingAddressesCreateCmdOperatorId holds value of 'operator_id' option

View Source
var ShippingAddressesCreateCmdPhoneNumber string

ShippingAddressesCreateCmdPhoneNumber holds value of 'phoneNumber' option

View Source
var ShippingAddressesCreateCmdState string

ShippingAddressesCreateCmdState holds value of 'state' option

View Source
var ShippingAddressesCreateCmdZipCode string

ShippingAddressesCreateCmdZipCode holds value of 'zipCode' option

View Source
var ShippingAddressesDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("shipping_addresses.delete_shipping_address.delete.summary"),
	Long:  TR(`shipping_addresses.delete_shipping_address.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectShippingAddressesDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

ShippingAddressesDeleteCmd defines 'delete' subcommand

View Source
var ShippingAddressesDeleteCmdOperatorId string

ShippingAddressesDeleteCmdOperatorId holds value of 'operator_id' option

View Source
var ShippingAddressesDeleteCmdShippingAddressId string

ShippingAddressesDeleteCmdShippingAddressId holds value of 'shipping_address_id' option

View Source
var ShippingAddressesGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("shipping_addresses.get_shipping_address.get.summary"),
	Long:  TR(`shipping_addresses.get_shipping_address.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectShippingAddressesGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

ShippingAddressesGetCmd defines 'get' subcommand

View Source
var ShippingAddressesGetCmdOperatorId string

ShippingAddressesGetCmdOperatorId holds value of 'operator_id' option

View Source
var ShippingAddressesGetCmdShippingAddressId string

ShippingAddressesGetCmdShippingAddressId holds value of 'shipping_address_id' option

View Source
var ShippingAddressesListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("shipping_addresses.list_shipping_addresses.get.summary"),
	Long:  TR(`shipping_addresses.list_shipping_addresses.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectShippingAddressesListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

ShippingAddressesListCmd defines 'list' subcommand

View Source
var ShippingAddressesListCmdOperatorId string

ShippingAddressesListCmdOperatorId holds value of 'operator_id' option

View Source
var ShippingAddressesUpdateCmd = &cobra.Command{
	Use:   "update",
	Short: TR("shipping_addresses.update_shipping_address.put.summary"),
	Long:  TR(`shipping_addresses.update_shipping_address.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectShippingAddressesUpdateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

ShippingAddressesUpdateCmd defines 'update' subcommand

View Source
var ShippingAddressesUpdateCmdAddressLine1 string

ShippingAddressesUpdateCmdAddressLine1 holds value of 'addressLine1' option

View Source
var ShippingAddressesUpdateCmdAddressLine2 string

ShippingAddressesUpdateCmdAddressLine2 holds value of 'addressLine2' option

View Source
var ShippingAddressesUpdateCmdBody string

ShippingAddressesUpdateCmdBody holds contents of request body to be sent

View Source
var ShippingAddressesUpdateCmdBuilding string

ShippingAddressesUpdateCmdBuilding holds value of 'building' option

View Source
var ShippingAddressesUpdateCmdCity string

ShippingAddressesUpdateCmdCity holds value of 'city' option

View Source
var ShippingAddressesUpdateCmdCompanyName string

ShippingAddressesUpdateCmdCompanyName holds value of 'companyName' option

View Source
var ShippingAddressesUpdateCmdDepartment string

ShippingAddressesUpdateCmdDepartment holds value of 'department' option

View Source
var ShippingAddressesUpdateCmdFullName string

ShippingAddressesUpdateCmdFullName holds value of 'fullName' option

View Source
var ShippingAddressesUpdateCmdOperatorId string

ShippingAddressesUpdateCmdOperatorId holds value of 'operator_id' option

View Source
var ShippingAddressesUpdateCmdPhoneNumber string

ShippingAddressesUpdateCmdPhoneNumber holds value of 'phoneNumber' option

View Source
var ShippingAddressesUpdateCmdShippingAddressId string

ShippingAddressesUpdateCmdShippingAddressId holds value of 'shipping_address_id' option

View Source
var ShippingAddressesUpdateCmdState string

ShippingAddressesUpdateCmdState holds value of 'state' option

View Source
var ShippingAddressesUpdateCmdZipCode string

ShippingAddressesUpdateCmdZipCode holds value of 'zipCode' option

View Source
var StatsAirCmd = &cobra.Command{
	Use:   "air",
	Short: TR("stats.air.cli.summary"),
	Long:  TR(`stats.air.cli.description`),
}

StatsAirCmd defines 'air' subcommand

View Source
var StatsAirExportCmd = &cobra.Command{
	Use:   "export",
	Short: TR("stats.export_air_stats.post.summary"),
	Long:  TR(`stats.export_air_stats.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectStatsAirExportCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

StatsAirExportCmd defines 'export' subcommand

View Source
var StatsAirExportCmdBody string

StatsAirExportCmdBody holds contents of request body to be sent

View Source
var StatsAirExportCmdExportMode string

StatsAirExportCmdExportMode holds value of 'export_mode' option

View Source
var StatsAirExportCmdFrom int64

StatsAirExportCmdFrom holds value of 'from' option

View Source
var StatsAirExportCmdOperatorId string

StatsAirExportCmdOperatorId holds value of 'operator_id' option

View Source
var StatsAirExportCmdPeriod string

StatsAirExportCmdPeriod holds value of 'period' option

View Source
var StatsAirExportCmdTo int64

StatsAirExportCmdTo holds value of 'to' option

View Source
var StatsAirGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("stats.get_air_stats.get.summary"),
	Long:  TR(`stats.get_air_stats.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectStatsAirGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

StatsAirGetCmd defines 'get' subcommand

View Source
var StatsAirGetCmdFrom int64

StatsAirGetCmdFrom holds value of 'from' option

View Source
var StatsAirGetCmdImsi string

StatsAirGetCmdImsi holds value of 'imsi' option

View Source
var StatsAirGetCmdPeriod string

StatsAirGetCmdPeriod holds value of 'period' option

View Source
var StatsAirGetCmdTo int64

StatsAirGetCmdTo holds value of 'to' option

View Source
var StatsBeamCmd = &cobra.Command{
	Use:   "beam",
	Short: TR("stats.beam.cli.summary"),
	Long:  TR(`stats.beam.cli.description`),
}

StatsBeamCmd defines 'beam' subcommand

View Source
var StatsBeamExportCmd = &cobra.Command{
	Use:   "export",
	Short: TR("stats.export_beam_stats.post.summary"),
	Long:  TR(`stats.export_beam_stats.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectStatsBeamExportCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

StatsBeamExportCmd defines 'export' subcommand

View Source
var StatsBeamExportCmdBody string

StatsBeamExportCmdBody holds contents of request body to be sent

View Source
var StatsBeamExportCmdExportMode string

StatsBeamExportCmdExportMode holds value of 'export_mode' option

View Source
var StatsBeamExportCmdFrom int64

StatsBeamExportCmdFrom holds value of 'from' option

View Source
var StatsBeamExportCmdOperatorId string

StatsBeamExportCmdOperatorId holds value of 'operator_id' option

View Source
var StatsBeamExportCmdPeriod string

StatsBeamExportCmdPeriod holds value of 'period' option

View Source
var StatsBeamExportCmdTo int64

StatsBeamExportCmdTo holds value of 'to' option

View Source
var StatsBeamGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("stats.get_beam_stats.get.summary"),
	Long:  TR(`stats.get_beam_stats.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectStatsBeamGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

StatsBeamGetCmd defines 'get' subcommand

View Source
var StatsBeamGetCmdFrom int64

StatsBeamGetCmdFrom holds value of 'from' option

View Source
var StatsBeamGetCmdImsi string

StatsBeamGetCmdImsi holds value of 'imsi' option

View Source
var StatsBeamGetCmdPeriod string

StatsBeamGetCmdPeriod holds value of 'period' option

View Source
var StatsBeamGetCmdTo int64

StatsBeamGetCmdTo holds value of 'to' option

View Source
var StatsCmd = &cobra.Command{
	Use:   "stats",
	Short: TR("stats.cli.summary"),
	Long:  TR(`stats.cli.description`),
}

StatsCmd defines 'stats' subcommand

View Source
var SubscribersActivateCmd = &cobra.Command{
	Use:   "activate",
	Short: TR("subscribers.activate_subscriber.post.summary"),
	Long:  TR(`subscribers.activate_subscriber.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersActivateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersActivateCmd defines 'activate' subcommand

View Source
var SubscribersActivateCmdImsi string

SubscribersActivateCmdImsi holds value of 'imsi' option

View Source
var SubscribersCmd = &cobra.Command{
	Use:   "subscribers",
	Short: TR("subscribers.cli.summary"),
	Long:  TR(`subscribers.cli.description`),
}

SubscribersCmd defines 'subscribers' subcommand

View Source
var SubscribersDeactivateCmd = &cobra.Command{
	Use:   "deactivate",
	Short: TR("subscribers.deactivate_subscriber.post.summary"),
	Long:  TR(`subscribers.deactivate_subscriber.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersDeactivateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersDeactivateCmd defines 'deactivate' subcommand

View Source
var SubscribersDeactivateCmdImsi string

SubscribersDeactivateCmdImsi holds value of 'imsi' option

View Source
var SubscribersDeleteSessionCmd = &cobra.Command{
	Use:   "delete-session",
	Short: TR("subscribers.delete_session.post.summary"),
	Long:  TR(`subscribers.delete_session.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersDeleteSessionCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersDeleteSessionCmd defines 'delete-session' subcommand

View Source
var SubscribersDeleteSessionCmdImsi string

SubscribersDeleteSessionCmdImsi holds value of 'imsi' option

View Source
var SubscribersDeleteTagCmd = &cobra.Command{
	Use:   "delete-tag",
	Short: TR("subscribers.delete_subscriber_tag.delete.summary"),
	Long:  TR(`subscribers.delete_subscriber_tag.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersDeleteTagCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersDeleteTagCmd defines 'delete-tag' subcommand

View Source
var SubscribersDeleteTagCmdImsi string

SubscribersDeleteTagCmdImsi holds value of 'imsi' option

View Source
var SubscribersDeleteTagCmdTagName string

SubscribersDeleteTagCmdTagName holds value of 'tag_name' option

View Source
var SubscribersDeleteTransferTokenCmd = &cobra.Command{
	Use:   "delete-transfer-token",
	Short: TR("subscribers.delete_subscriber_transfer_token.delete.summary"),
	Long:  TR(`subscribers.delete_subscriber_transfer_token.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersDeleteTransferTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersDeleteTransferTokenCmd defines 'delete-transfer-token' subcommand

View Source
var SubscribersDeleteTransferTokenCmdToken string

SubscribersDeleteTransferTokenCmdToken holds value of 'token' option

View Source
var SubscribersDisableTerminationCmd = &cobra.Command{
	Use:   "disable-termination",
	Short: TR("subscribers.disable_termination.post.summary"),
	Long:  TR(`subscribers.disable_termination.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersDisableTerminationCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersDisableTerminationCmd defines 'disable-termination' subcommand

View Source
var SubscribersDisableTerminationCmdImsi string

SubscribersDisableTerminationCmdImsi holds value of 'imsi' option

View Source
var SubscribersEnableTerminationCmd = &cobra.Command{
	Use:   "enable-termination",
	Short: TR("subscribers.enable_termination.post.summary"),
	Long:  TR(`subscribers.enable_termination.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersEnableTerminationCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersEnableTerminationCmd defines 'enable-termination' subcommand

View Source
var SubscribersEnableTerminationCmdImsi string

SubscribersEnableTerminationCmdImsi holds value of 'imsi' option

View Source
var SubscribersGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("subscribers.get_subscriber.get.summary"),
	Long:  TR(`subscribers.get_subscriber.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersGetCmd defines 'get' subcommand

View Source
var SubscribersGetCmdImsi string

SubscribersGetCmdImsi holds value of 'imsi' option

View Source
var SubscribersGetDataCmd = &cobra.Command{
	Use:   "get-data",
	Short: TR("subscribers.get_data_from_subscriber.get.summary"),
	Long:  TR(`subscribers.get_data_from_subscriber.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersGetDataCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersGetDataCmd defines 'get-data' subcommand

View Source
var SubscribersGetDataCmdFrom int64

SubscribersGetDataCmdFrom holds value of 'from' option

View Source
var SubscribersGetDataCmdImsi string

SubscribersGetDataCmdImsi holds value of 'imsi' option

View Source
var SubscribersGetDataCmdLastEvaluatedKey string

SubscribersGetDataCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var SubscribersGetDataCmdLimit int64

SubscribersGetDataCmdLimit holds value of 'limit' option

View Source
var SubscribersGetDataCmdSort string

SubscribersGetDataCmdSort holds value of 'sort' option

View Source
var SubscribersGetDataCmdTo int64

SubscribersGetDataCmdTo holds value of 'to' option

View Source
var SubscribersIssueTransferTokenCmd = &cobra.Command{
	Use:   "issue-transfer-token",
	Short: TR("subscribers.issue_subscriber_transfer_token.post.summary"),
	Long:  TR(`subscribers.issue_subscriber_transfer_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersIssueTransferTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersIssueTransferTokenCmd defines 'issue-transfer-token' subcommand

View Source
var SubscribersIssueTransferTokenCmdBody string

SubscribersIssueTransferTokenCmdBody holds contents of request body to be sent

View Source
var SubscribersIssueTransferTokenCmdTransferDestinationOperatorEmail string

SubscribersIssueTransferTokenCmdTransferDestinationOperatorEmail holds value of 'transferDestinationOperatorEmail' option

View Source
var SubscribersIssueTransferTokenCmdTransferDestinationOperatorId string

SubscribersIssueTransferTokenCmdTransferDestinationOperatorId holds value of 'transferDestinationOperatorId' option

View Source
var SubscribersListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("subscribers.list_subscribers.get.summary"),
	Long:  TR(`subscribers.list_subscribers.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersListCmd defines 'list' subcommand

View Source
var SubscribersListCmdLastEvaluatedKey string

SubscribersListCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var SubscribersListCmdLimit int64

SubscribersListCmdLimit holds value of 'limit' option

View Source
var SubscribersListCmdSerialNumberFilter string

SubscribersListCmdSerialNumberFilter holds value of 'serial_number_filter' option

View Source
var SubscribersListCmdSpeedClassFilter string

SubscribersListCmdSpeedClassFilter holds value of 'speed_class_filter' option

View Source
var SubscribersListCmdStatusFilter string

SubscribersListCmdStatusFilter holds value of 'status_filter' option

View Source
var SubscribersListCmdTagName string

SubscribersListCmdTagName holds value of 'tag_name' option

View Source
var SubscribersListCmdTagValue string

SubscribersListCmdTagValue holds value of 'tag_value' option

View Source
var SubscribersListCmdTagValueMatchMode string

SubscribersListCmdTagValueMatchMode holds value of 'tag_value_match_mode' option

View Source
var SubscribersPutTagsCmd = &cobra.Command{
	Use:   "put-tags",
	Short: TR("subscribers.put_subscriber_tags.put.summary"),
	Long:  TR(`subscribers.put_subscriber_tags.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersPutTagsCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersPutTagsCmd defines 'put-tags' subcommand

View Source
var SubscribersPutTagsCmdBody string

SubscribersPutTagsCmdBody holds contents of request body to be sent

View Source
var SubscribersPutTagsCmdImsi string

SubscribersPutTagsCmdImsi holds value of 'imsi' option

View Source
var SubscribersRegisterCmd = &cobra.Command{
	Use:   "register",
	Short: TR("subscribers.register_subscriber.post.summary"),
	Long:  TR(`subscribers.register_subscriber.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersRegisterCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersRegisterCmd defines 'register' subcommand

View Source
var SubscribersRegisterCmdBody string

SubscribersRegisterCmdBody holds contents of request body to be sent

View Source
var SubscribersRegisterCmdGroupId string

SubscribersRegisterCmdGroupId holds value of 'groupId' option

View Source
var SubscribersRegisterCmdImsi string

SubscribersRegisterCmdImsi holds value of 'imsi' option

View Source
var SubscribersRegisterCmdRegistrationSecret string

SubscribersRegisterCmdRegistrationSecret holds value of 'registrationSecret' option

View Source
var SubscribersSessionEventsCmd = &cobra.Command{
	Use:   "session-events",
	Short: TR("subscribers.list_session_events.get.summary"),
	Long:  TR(`subscribers.list_session_events.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersSessionEventsCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersSessionEventsCmd defines 'session-events' subcommand

View Source
var SubscribersSessionEventsCmdFrom int64

SubscribersSessionEventsCmdFrom holds value of 'from' option

View Source
var SubscribersSessionEventsCmdImsi string

SubscribersSessionEventsCmdImsi holds value of 'imsi' option

View Source
var SubscribersSessionEventsCmdLastEvaluatedKey string

SubscribersSessionEventsCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var SubscribersSessionEventsCmdLimit int64

SubscribersSessionEventsCmdLimit holds value of 'limit' option

View Source
var SubscribersSessionEventsCmdTo int64

SubscribersSessionEventsCmdTo holds value of 'to' option

View Source
var SubscribersSetExpiryTimeCmd = &cobra.Command{
	Use:   "set-expiry-time",
	Short: TR("subscribers.set_expirytime.post.summary"),
	Long:  TR(`subscribers.set_expirytime.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersSetExpiryTimeCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersSetExpiryTimeCmd defines 'set-expiry-time' subcommand

View Source
var SubscribersSetExpiryTimeCmdBody string

SubscribersSetExpiryTimeCmdBody holds contents of request body to be sent

View Source
var SubscribersSetExpiryTimeCmdExpiryAction string

SubscribersSetExpiryTimeCmdExpiryAction holds value of 'expiryAction' option

View Source
var SubscribersSetExpiryTimeCmdExpiryTime int64

SubscribersSetExpiryTimeCmdExpiryTime holds value of 'expiryTime' option

View Source
var SubscribersSetExpiryTimeCmdImsi string

SubscribersSetExpiryTimeCmdImsi holds value of 'imsi' option

View Source
var SubscribersSetGroupCmd = &cobra.Command{
	Use:   "set-group",
	Short: TR("subscribers.set_group.post.summary"),
	Long:  TR(`subscribers.set_group.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersSetGroupCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersSetGroupCmd defines 'set-group' subcommand

View Source
var SubscribersSetGroupCmdBody string

SubscribersSetGroupCmdBody holds contents of request body to be sent

View Source
var SubscribersSetGroupCmdGroupId string

SubscribersSetGroupCmdGroupId holds value of 'groupId' option

View Source
var SubscribersSetGroupCmdImsi string

SubscribersSetGroupCmdImsi holds value of 'imsi' option

View Source
var SubscribersSetImeiLockCmd = &cobra.Command{
	Use:   "set-imei-lock",
	Short: TR("subscribers.set_imei_lock.post.summary"),
	Long:  TR(`subscribers.set_imei_lock.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersSetImeiLockCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersSetImeiLockCmd defines 'set-imei-lock' subcommand

View Source
var SubscribersSetImeiLockCmdBody string

SubscribersSetImeiLockCmdBody holds contents of request body to be sent

View Source
var SubscribersSetImeiLockCmdImei string

SubscribersSetImeiLockCmdImei holds value of 'imei' option

View Source
var SubscribersSetImeiLockCmdImsi string

SubscribersSetImeiLockCmdImsi holds value of 'imsi' option

View Source
var SubscribersSuspendCmd = &cobra.Command{
	Use:   "suspend",
	Short: TR("subscribers.suspend_subscriber.post.summary"),
	Long:  TR(`subscribers.suspend_subscriber.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersSuspendCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersSuspendCmd defines 'suspend' subcommand

View Source
var SubscribersSuspendCmdImsi string

SubscribersSuspendCmdImsi holds value of 'imsi' option

View Source
var SubscribersTerminateCmd = &cobra.Command{
	Use:   "terminate",
	Short: TR("subscribers.terminate_subscriber.post.summary"),
	Long:  TR(`subscribers.terminate_subscriber.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersTerminateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersTerminateCmd defines 'terminate' subcommand

View Source
var SubscribersTerminateCmdImsi string

SubscribersTerminateCmdImsi holds value of 'imsi' option

View Source
var SubscribersUnsetExpiryTimeCmd = &cobra.Command{
	Use:   "unset-expiry-time",
	Short: TR("subscribers.unset_expirytime.post.summary"),
	Long:  TR(`subscribers.unset_expirytime.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersUnsetExpiryTimeCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersUnsetExpiryTimeCmd defines 'unset-expiry-time' subcommand

View Source
var SubscribersUnsetExpiryTimeCmdImsi string

SubscribersUnsetExpiryTimeCmdImsi holds value of 'imsi' option

View Source
var SubscribersUnsetGroupCmd = &cobra.Command{
	Use:   "unset-group",
	Short: TR("subscribers.unset_group.post.summary"),
	Long:  TR(`subscribers.unset_group.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersUnsetGroupCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersUnsetGroupCmd defines 'unset-group' subcommand

View Source
var SubscribersUnsetGroupCmdImsi string

SubscribersUnsetGroupCmdImsi holds value of 'imsi' option

View Source
var SubscribersUnsetImeiLockCmd = &cobra.Command{
	Use:   "unset-imei-lock",
	Short: TR("subscribers.unset_imei_lock.post.summary"),
	Long:  TR(`subscribers.unset_imei_lock.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersUnsetImeiLockCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersUnsetImeiLockCmd defines 'unset-imei-lock' subcommand

View Source
var SubscribersUnsetImeiLockCmdImsi string

SubscribersUnsetImeiLockCmdImsi holds value of 'imsi' option

View Source
var SubscribersUpdateSpeedClassCmd = &cobra.Command{
	Use:   "update-speed-class",
	Short: TR("subscribers.update_speedclass.post.summary"),
	Long:  TR(`subscribers.update_speedclass.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersUpdateSpeedClassCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersUpdateSpeedClassCmd defines 'update-speed-class' subcommand

View Source
var SubscribersUpdateSpeedClassCmdBody string

SubscribersUpdateSpeedClassCmdBody holds contents of request body to be sent

View Source
var SubscribersUpdateSpeedClassCmdImsi string

SubscribersUpdateSpeedClassCmdImsi holds value of 'imsi' option

View Source
var SubscribersUpdateSpeedClassCmdSpeedClass string

SubscribersUpdateSpeedClassCmdSpeedClass holds value of 'speedClass' option

View Source
var SubscribersVerifyTransferTokenCmd = &cobra.Command{
	Use:   "verify-transfer-token",
	Short: TR("subscribers.verify_subscriber_transfer_token.post.summary"),
	Long:  TR(`subscribers.verify_subscriber_transfer_token.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectSubscribersVerifyTransferTokenCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

SubscribersVerifyTransferTokenCmd defines 'verify-transfer-token' subcommand

View Source
var SubscribersVerifyTransferTokenCmdBody string

SubscribersVerifyTransferTokenCmdBody holds contents of request body to be sent

View Source
var SubscribersVerifyTransferTokenCmdToken string

SubscribersVerifyTransferTokenCmdToken holds value of 'token' option

View Source
var UsersAttachRoleCmd = &cobra.Command{
	Use:   "attach-role",
	Short: TR("roles.attach_role.post.summary"),
	Long:  TR(`roles.attach_role.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersAttachRoleCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersAttachRoleCmd defines 'attach-role' subcommand

View Source
var UsersAttachRoleCmdBody string

UsersAttachRoleCmdBody holds contents of request body to be sent

View Source
var UsersAttachRoleCmdOperatorId string

UsersAttachRoleCmdOperatorId holds value of 'operator_id' option

View Source
var UsersAttachRoleCmdRoleId string

UsersAttachRoleCmdRoleId holds value of 'roleId' option

View Source
var UsersAttachRoleCmdUserName string

UsersAttachRoleCmdUserName holds value of 'user_name' option

View Source
var UsersAuthKeysCmd = &cobra.Command{
	Use:   "auth-keys",
	Short: TR("users.auth_keys.cli.summary"),
	Long:  TR(`users.auth_keys.cli.description`),
}

UsersAuthKeysCmd defines 'auth-keys' subcommand

View Source
var UsersAuthKeysDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("users.delete_user_auth_key.delete.summary"),
	Long:  TR(`users.delete_user_auth_key.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersAuthKeysDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersAuthKeysDeleteCmd defines 'delete' subcommand

View Source
var UsersAuthKeysDeleteCmdAuthKeyId string

UsersAuthKeysDeleteCmdAuthKeyId holds value of 'auth_key_id' option

View Source
var UsersAuthKeysDeleteCmdOperatorId string

UsersAuthKeysDeleteCmdOperatorId holds value of 'operator_id' option

View Source
var UsersAuthKeysDeleteCmdUserName string

UsersAuthKeysDeleteCmdUserName holds value of 'user_name' option

View Source
var UsersAuthKeysGenerateCmd = &cobra.Command{
	Use:   "generate",
	Short: TR("users.generate_user_auth_key.post.summary"),
	Long:  TR(`users.generate_user_auth_key.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersAuthKeysGenerateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersAuthKeysGenerateCmd defines 'generate' subcommand

View Source
var UsersAuthKeysGenerateCmdOperatorId string

UsersAuthKeysGenerateCmdOperatorId holds value of 'operator_id' option

View Source
var UsersAuthKeysGenerateCmdUserName string

UsersAuthKeysGenerateCmdUserName holds value of 'user_name' option

View Source
var UsersAuthKeysGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("users.get_user_auth_key.get.summary"),
	Long:  TR(`users.get_user_auth_key.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersAuthKeysGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersAuthKeysGetCmd defines 'get' subcommand

View Source
var UsersAuthKeysGetCmdAuthKeyId string

UsersAuthKeysGetCmdAuthKeyId holds value of 'auth_key_id' option

View Source
var UsersAuthKeysGetCmdOperatorId string

UsersAuthKeysGetCmdOperatorId holds value of 'operator_id' option

View Source
var UsersAuthKeysGetCmdUserName string

UsersAuthKeysGetCmdUserName holds value of 'user_name' option

View Source
var UsersAuthKeysListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("users.list_user_auth_keys.get.summary"),
	Long:  TR(`users.list_user_auth_keys.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersAuthKeysListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersAuthKeysListCmd defines 'list' subcommand

View Source
var UsersAuthKeysListCmdOperatorId string

UsersAuthKeysListCmdOperatorId holds value of 'operator_id' option

View Source
var UsersAuthKeysListCmdUserName string

UsersAuthKeysListCmdUserName holds value of 'user_name' option

View Source
var UsersCmd = &cobra.Command{
	Use:   "users",
	Short: TR("users.cli.summary"),
	Long:  TR(`users.cli.description`),
}

UsersCmd defines 'users' subcommand

View Source
var UsersCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("users.create_user.post.summary"),
	Long:  TR(`users.create_user.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersCreateCmd defines 'create' subcommand

View Source
var UsersCreateCmdBody string

UsersCreateCmdBody holds contents of request body to be sent

View Source
var UsersCreateCmdDescription string

UsersCreateCmdDescription holds value of 'description' option

View Source
var UsersCreateCmdOperatorId string

UsersCreateCmdOperatorId holds value of 'operator_id' option

View Source
var UsersCreateCmdUserName string

UsersCreateCmdUserName holds value of 'user_name' option

View Source
var UsersDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("users.delete_user.delete.summary"),
	Long:  TR(`users.delete_user.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersDeleteCmd defines 'delete' subcommand

View Source
var UsersDeleteCmdOperatorId string

UsersDeleteCmdOperatorId holds value of 'operator_id' option

View Source
var UsersDeleteCmdUserName string

UsersDeleteCmdUserName holds value of 'user_name' option

View Source
var UsersDetachRoleCmd = &cobra.Command{
	Use:   "detach-role",
	Short: TR("roles.detach_role.delete.summary"),
	Long:  TR(`roles.detach_role.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersDetachRoleCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersDetachRoleCmd defines 'detach-role' subcommand

View Source
var UsersDetachRoleCmdOperatorId string

UsersDetachRoleCmdOperatorId holds value of 'operator_id' option

View Source
var UsersDetachRoleCmdRoleId string

UsersDetachRoleCmdRoleId holds value of 'role_id' option

View Source
var UsersDetachRoleCmdUserName string

UsersDetachRoleCmdUserName holds value of 'user_name' option

View Source
var UsersGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("users.get_user.get.summary"),
	Long:  TR(`users.get_user.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersGetCmd defines 'get' subcommand

View Source
var UsersGetCmdOperatorId string

UsersGetCmdOperatorId holds value of 'operator_id' option

View Source
var UsersGetCmdUserName string

UsersGetCmdUserName holds value of 'user_name' option

View Source
var UsersListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("users.list_users.get.summary"),
	Long:  TR(`users.list_users.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersListCmd defines 'list' subcommand

View Source
var UsersListCmdOperatorId string

UsersListCmdOperatorId holds value of 'operator_id' option

View Source
var UsersListRolesCmd = &cobra.Command{
	Use:   "list-roles",
	Short: TR("roles.list_user_roles.get.summary"),
	Long:  TR(`roles.list_user_roles.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersListRolesCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersListRolesCmd defines 'list-roles' subcommand

View Source
var UsersListRolesCmdOperatorId string

UsersListRolesCmdOperatorId holds value of 'operator_id' option

View Source
var UsersListRolesCmdUserName string

UsersListRolesCmdUserName holds value of 'user_name' option

View Source
var UsersPasswordCmd = &cobra.Command{
	Use:   "password",
	Short: TR("users.password.cli.summary"),
	Long:  TR(`users.password.cli.description`),
}

UsersPasswordCmd defines 'password' subcommand

View Source
var UsersPasswordConfiguredCmd = &cobra.Command{
	Use:   "configured",
	Short: TR("users.has_user_password.get.summary"),
	Long:  TR(`users.has_user_password.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersPasswordConfiguredCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersPasswordConfiguredCmd defines 'configured' subcommand

View Source
var UsersPasswordConfiguredCmdOperatorId string

UsersPasswordConfiguredCmdOperatorId holds value of 'operator_id' option

View Source
var UsersPasswordConfiguredCmdUserName string

UsersPasswordConfiguredCmdUserName holds value of 'user_name' option

View Source
var UsersPasswordCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("users.create_user_password.post.summary"),
	Long:  TR(`users.create_user_password.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersPasswordCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersPasswordCreateCmd defines 'create' subcommand

View Source
var UsersPasswordCreateCmdBody string

UsersPasswordCreateCmdBody holds contents of request body to be sent

View Source
var UsersPasswordCreateCmdOperatorId string

UsersPasswordCreateCmdOperatorId holds value of 'operator_id' option

View Source
var UsersPasswordCreateCmdPassword string

UsersPasswordCreateCmdPassword holds value of 'password' option

View Source
var UsersPasswordCreateCmdUserName string

UsersPasswordCreateCmdUserName holds value of 'user_name' option

View Source
var UsersPasswordDeleteCmd = &cobra.Command{
	Use:   "delete",
	Short: TR("users.delete_user_password.delete.summary"),
	Long:  TR(`users.delete_user_password.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersPasswordDeleteCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersPasswordDeleteCmd defines 'delete' subcommand

View Source
var UsersPasswordDeleteCmdOperatorId string

UsersPasswordDeleteCmdOperatorId holds value of 'operator_id' option

View Source
var UsersPasswordDeleteCmdUserName string

UsersPasswordDeleteCmdUserName holds value of 'user_name' option

View Source
var UsersPasswordUpdateCmd = &cobra.Command{
	Use:   "update",
	Short: TR("users.update_user_password.put.summary"),
	Long:  TR(`users.update_user_password.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersPasswordUpdateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersPasswordUpdateCmd defines 'update' subcommand

View Source
var UsersPasswordUpdateCmdBody string

UsersPasswordUpdateCmdBody holds contents of request body to be sent

View Source
var UsersPasswordUpdateCmdCurrentPassword string

UsersPasswordUpdateCmdCurrentPassword holds value of 'currentPassword' option

View Source
var UsersPasswordUpdateCmdNewPassword string

UsersPasswordUpdateCmdNewPassword holds value of 'newPassword' option

View Source
var UsersPasswordUpdateCmdOperatorId string

UsersPasswordUpdateCmdOperatorId holds value of 'operator_id' option

View Source
var UsersPasswordUpdateCmdUserName string

UsersPasswordUpdateCmdUserName holds value of 'user_name' option

View Source
var UsersPermissionsCmd = &cobra.Command{
	Use:   "permissions",
	Short: TR("users.permissions.cli.summary"),
	Long:  TR(`users.permissions.cli.description`),
}

UsersPermissionsCmd defines 'permissions' subcommand

View Source
var UsersPermissionsGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("users.get_user_permission.get.summary"),
	Long:  TR(`users.get_user_permission.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersPermissionsGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersPermissionsGetCmd defines 'get' subcommand

View Source
var UsersPermissionsGetCmdOperatorId string

UsersPermissionsGetCmdOperatorId holds value of 'operator_id' option

View Source
var UsersPermissionsGetCmdUserName string

UsersPermissionsGetCmdUserName holds value of 'user_name' option

View Source
var UsersPermissionsUpdateCmd = &cobra.Command{
	Use:   "update",
	Short: TR("users.update_user_permission.put.summary"),
	Long:  TR(`users.update_user_permission.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersPermissionsUpdateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersPermissionsUpdateCmd defines 'update' subcommand

View Source
var UsersPermissionsUpdateCmdBody string

UsersPermissionsUpdateCmdBody holds contents of request body to be sent

View Source
var UsersPermissionsUpdateCmdDescription string

UsersPermissionsUpdateCmdDescription holds value of 'description' option

View Source
var UsersPermissionsUpdateCmdOperatorId string

UsersPermissionsUpdateCmdOperatorId holds value of 'operator_id' option

View Source
var UsersPermissionsUpdateCmdPermission string

UsersPermissionsUpdateCmdPermission holds value of 'permission' option

View Source
var UsersPermissionsUpdateCmdUserName string

UsersPermissionsUpdateCmdUserName holds value of 'user_name' option

View Source
var UsersUpdateCmd = &cobra.Command{
	Use:   "update",
	Short: TR("users.update_user.put.summary"),
	Long:  TR(`users.update_user.put.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectUsersUpdateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

UsersUpdateCmd defines 'update' subcommand

View Source
var UsersUpdateCmdBody string

UsersUpdateCmdBody holds contents of request body to be sent

View Source
var UsersUpdateCmdDescription string

UsersUpdateCmdDescription holds value of 'description' option

View Source
var UsersUpdateCmdOperatorId string

UsersUpdateCmdOperatorId holds value of 'operator_id' option

View Source
var UsersUpdateCmdUserName string

UsersUpdateCmdUserName holds value of 'user_name' option

View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: TR("version.cli.summary"),
	Long:  TR("version.cli.description"),
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Printf("SORACOM API client v%s\n", version)
	},
}

VersionCmd defines 'version' subcommand

View Source
var VpgCloseGateCmd = &cobra.Command{
	Use:   "close-gate",
	Short: TR("virtual_private_gateway.close_gate.post.summary"),
	Long:  TR(`virtual_private_gateway.close_gate.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgCloseGateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgCloseGateCmd defines 'close-gate' subcommand

View Source
var VpgCloseGateCmdVpgId string

VpgCloseGateCmdVpgId holds value of 'vpg_id' option

View Source
var VpgCmd = &cobra.Command{
	Use:   "vpg",
	Short: TR("virtual_private_gateway.cli.summary"),
	Long:  TR(`virtual_private_gateway.cli.description`),
}

VpgCmd defines 'vpg' subcommand

View Source
var VpgCreateCmd = &cobra.Command{
	Use:   "create",
	Short: TR("virtual_private_gateway.create_virtual_private_gateway.post.summary"),
	Long:  TR(`virtual_private_gateway.create_virtual_private_gateway.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgCreateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgCreateCmd defines 'create' subcommand

View Source
var VpgCreateCmdBody string

VpgCreateCmdBody holds contents of request body to be sent

View Source
var VpgCreateCmdDeviceSubnetCidrRange string

VpgCreateCmdDeviceSubnetCidrRange holds value of 'deviceSubnetCidrRange' option

View Source
var VpgCreateCmdPrimaryServiceName string

VpgCreateCmdPrimaryServiceName holds value of 'primaryServiceName' option

View Source
var VpgCreateCmdUseInternetGateway bool

VpgCreateCmdUseInternetGateway holds value of 'useInternetGateway' option

View Source
var VpgCreateVpcPeeringConnectionCmd = &cobra.Command{
	Use:   "create-vpc-peering-connection",
	Short: TR("virtual_private_gateway.create_vpc_peering_connection.post.summary"),
	Long:  TR(`virtual_private_gateway.create_vpc_peering_connection.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgCreateVpcPeeringConnectionCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgCreateVpcPeeringConnectionCmd defines 'create-vpc-peering-connection' subcommand

View Source
var VpgCreateVpcPeeringConnectionCmdBody string

VpgCreateVpcPeeringConnectionCmdBody holds contents of request body to be sent

View Source
var VpgCreateVpcPeeringConnectionCmdDestinationCidrBlock string

VpgCreateVpcPeeringConnectionCmdDestinationCidrBlock holds value of 'destinationCidrBlock' option

View Source
var VpgCreateVpcPeeringConnectionCmdPeerOwnerId string

VpgCreateVpcPeeringConnectionCmdPeerOwnerId holds value of 'peerOwnerId' option

View Source
var VpgCreateVpcPeeringConnectionCmdPeerVpcId string

VpgCreateVpcPeeringConnectionCmdPeerVpcId holds value of 'peerVpcId' option

View Source
var VpgCreateVpcPeeringConnectionCmdVpgId string

VpgCreateVpcPeeringConnectionCmdVpgId holds value of 'vpg_id' option

View Source
var VpgDeleteIpAddressMapEntryCmd = &cobra.Command{
	Use:   "delete-ip-address-map-entry",
	Short: TR("virtual_private_gateway.delete_virtual_private_gateway_ip_address_map_entry.delete.summary"),
	Long:  TR(`virtual_private_gateway.delete_virtual_private_gateway_ip_address_map_entry.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgDeleteIpAddressMapEntryCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgDeleteIpAddressMapEntryCmd defines 'delete-ip-address-map-entry' subcommand

View Source
var VpgDeleteIpAddressMapEntryCmdKey string

VpgDeleteIpAddressMapEntryCmdKey holds value of 'key' option

View Source
var VpgDeleteIpAddressMapEntryCmdVpgId string

VpgDeleteIpAddressMapEntryCmdVpgId holds value of 'vpg_id' option

View Source
var VpgDeleteVpcPeeringConnectionCmd = &cobra.Command{
	Use:   "delete-vpc-peering-connection",
	Short: TR("virtual_private_gateway.delete_vpc_peering_connection.delete.summary"),
	Long:  TR(`virtual_private_gateway.delete_vpc_peering_connection.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgDeleteVpcPeeringConnectionCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgDeleteVpcPeeringConnectionCmd defines 'delete-vpc-peering-connection' subcommand

View Source
var VpgDeleteVpcPeeringConnectionCmdPcxId string

VpgDeleteVpcPeeringConnectionCmdPcxId holds value of 'pcx_id' option

View Source
var VpgDeleteVpcPeeringConnectionCmdVpgId string

VpgDeleteVpcPeeringConnectionCmdVpgId holds value of 'vpg_id' option

View Source
var VpgGetCmd = &cobra.Command{
	Use:   "get",
	Short: TR("virtual_private_gateway.get_virtual_private_gateway.get.summary"),
	Long:  TR(`virtual_private_gateway.get_virtual_private_gateway.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgGetCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgGetCmd defines 'get' subcommand

View Source
var VpgGetCmdVpgId string

VpgGetCmdVpgId holds value of 'vpg_id' option

View Source
var VpgListCmd = &cobra.Command{
	Use:   "list",
	Short: TR("virtual_private_gateway.list_virtual_private_gateways.get.summary"),
	Long:  TR(`virtual_private_gateway.list_virtual_private_gateways.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgListCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgListCmd defines 'list' subcommand

View Source
var VpgListCmdLastEvaluatedKey string

VpgListCmdLastEvaluatedKey holds value of 'last_evaluated_key' option

View Source
var VpgListCmdLimit int64

VpgListCmdLimit holds value of 'limit' option

View Source
var VpgListCmdTagName string

VpgListCmdTagName holds value of 'tag_name' option

View Source
var VpgListCmdTagValue string

VpgListCmdTagValue holds value of 'tag_value' option

View Source
var VpgListCmdTagValueMatchMode string

VpgListCmdTagValueMatchMode holds value of 'tag_value_match_mode' option

View Source
var VpgListGatePeersCmd = &cobra.Command{
	Use:   "list-gate-peers",
	Short: TR("virtual_private_gateway.list_virtual_private_gateway_peers.get.summary"),
	Long:  TR(`virtual_private_gateway.list_virtual_private_gateway_peers.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgListGatePeersCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgListGatePeersCmd defines 'list-gate-peers' subcommand

View Source
var VpgListGatePeersCmdVpgId string

VpgListGatePeersCmdVpgId holds value of 'vpg_id' option

View Source
var VpgListIpAddressMapEntriesCmd = &cobra.Command{
	Use:   "list-ip-address-map-entries",
	Short: TR("virtual_private_gateway.list_virtual_private_gateway_ip_address_map_entries.get.summary"),
	Long:  TR(`virtual_private_gateway.list_virtual_private_gateway_ip_address_map_entries.get.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgListIpAddressMapEntriesCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgListIpAddressMapEntriesCmd defines 'list-ip-address-map-entries' subcommand

View Source
var VpgListIpAddressMapEntriesCmdVpgId string

VpgListIpAddressMapEntriesCmdVpgId holds value of 'vpg_id' option

View Source
var VpgOpenGateCmd = &cobra.Command{
	Use:   "open-gate",
	Short: TR("virtual_private_gateway.open_gate.post.summary"),
	Long:  TR(`virtual_private_gateway.open_gate.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgOpenGateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgOpenGateCmd defines 'open-gate' subcommand

View Source
var VpgOpenGateCmdVpgId string

VpgOpenGateCmdVpgId holds value of 'vpg_id' option

View Source
var VpgPutIpAddressMapEntryCmd = &cobra.Command{
	Use:   "put-ip-address-map-entry",
	Short: TR("virtual_private_gateway.put_virtual_private_gateway_ip_address_map_entry.post.summary"),
	Long:  TR(`virtual_private_gateway.put_virtual_private_gateway_ip_address_map_entry.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgPutIpAddressMapEntryCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgPutIpAddressMapEntryCmd defines 'put-ip-address-map-entry' subcommand

View Source
var VpgPutIpAddressMapEntryCmdBody string

VpgPutIpAddressMapEntryCmdBody holds contents of request body to be sent

View Source
var VpgPutIpAddressMapEntryCmdIpAddress string

VpgPutIpAddressMapEntryCmdIpAddress holds value of 'ipAddress' option

View Source
var VpgPutIpAddressMapEntryCmdKey string

VpgPutIpAddressMapEntryCmdKey holds value of 'key' option

View Source
var VpgPutIpAddressMapEntryCmdVpgId string

VpgPutIpAddressMapEntryCmdVpgId holds value of 'vpg_id' option

View Source
var VpgRegisterGatePeerCmd = &cobra.Command{
	Use:   "register-gate-peer",
	Short: TR("virtual_private_gateway.register_virtual_private_gateway_peer.post.summary"),
	Long:  TR(`virtual_private_gateway.register_virtual_private_gateway_peer.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgRegisterGatePeerCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgRegisterGatePeerCmd defines 'register-gate-peer' subcommand

View Source
var VpgRegisterGatePeerCmdBody string

VpgRegisterGatePeerCmdBody holds contents of request body to be sent

View Source
var VpgRegisterGatePeerCmdInnerIpAddress string

VpgRegisterGatePeerCmdInnerIpAddress holds value of 'innerIpAddress' option

View Source
var VpgRegisterGatePeerCmdOuterIpAddress string

VpgRegisterGatePeerCmdOuterIpAddress holds value of 'outerIpAddress' option

View Source
var VpgRegisterGatePeerCmdVpgId string

VpgRegisterGatePeerCmdVpgId holds value of 'vpg_id' option

View Source
var VpgTerminateCmd = &cobra.Command{
	Use:   "terminate",
	Short: TR("virtual_private_gateway.terminate_virtual_private_gateway.post.summary"),
	Long:  TR(`virtual_private_gateway.terminate_virtual_private_gateway.post.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgTerminateCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgTerminateCmd defines 'terminate' subcommand

View Source
var VpgTerminateCmdVpgId string

VpgTerminateCmdVpgId holds value of 'vpg_id' option

View Source
var VpgUnregisterGatePeerCmd = &cobra.Command{
	Use:   "unregister-gate-peer",
	Short: TR("virtual_private_gateway.unregister_virtual_private_gateway_peer.delete.summary"),
	Long:  TR(`virtual_private_gateway.unregister_virtual_private_gateway_peer.delete.description`),
	RunE: func(cmd *cobra.Command, args []string) error {
		opt := &apiClientOptions{
			BasePath: "/v1",
			Language: getSelectedLanguage(),
		}

		ac := newAPIClient(opt)
		if v := os.Getenv("SORACOM_VERBOSE"); v != "" {
			ac.SetVerbose(true)
		}

		err := authHelper(ac, cmd, args)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		param, err := collectVpgUnregisterGatePeerCmdParams()
		if err != nil {
			return err
		}

		result, err := ac.callAPI(param)
		if err != nil {
			cmd.SilenceUsage = true
			return err
		}

		if result == "" {
			return nil
		}

		return prettyPrintStringAsJSON(result)
	},
}

VpgUnregisterGatePeerCmd defines 'unregister-gate-peer' subcommand

View Source
var VpgUnregisterGatePeerCmdOuterIpAddress string

VpgUnregisterGatePeerCmdOuterIpAddress holds value of 'outer_ip_address' option

View Source
var VpgUnregisterGatePeerCmdVpgId string

VpgUnregisterGatePeerCmdVpgId holds value of 'vpg_id' option

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func GeneratorsAssetsI18nSoracomApiTextEnJson

func GeneratorsAssetsI18nSoracomApiTextEnJson() (*asset, error)

func GeneratorsAssetsI18nSoracomApiTextEnJsonBytes

func GeneratorsAssetsI18nSoracomApiTextEnJsonBytes() ([]byte, error)

func GeneratorsAssetsI18nSoracomApiTextJaJson

func GeneratorsAssetsI18nSoracomApiTextJaJson() (*asset, error)

func GeneratorsAssetsI18nSoracomApiTextJaJsonBytes

func GeneratorsAssetsI18nSoracomApiTextJaJsonBytes() ([]byte, error)

func GeneratorsAssetsI18nSoracomApiTextZhJson

func GeneratorsAssetsI18nSoracomApiTextZhJson() (*asset, error)

func GeneratorsAssetsI18nSoracomApiTextZhJsonBytes

func GeneratorsAssetsI18nSoracomApiTextZhJsonBytes() ([]byte, error)

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

func TR

func TR(resourceID string) string

TR returns translated text specified by the resourceID

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL