cmd.Flags().Var(&createJson,"json",`either inline JSON string or @path/to/file.json with request body`)
cmd.Flags().Var(&createReq.DashboardType,"dashboard-type",`Workspace level usage dashboard shows usage data for the specified workspace ID. Supported values: [USAGE_DASHBOARD_TYPE_GLOBAL, USAGE_DASHBOARD_TYPE_WORKSPACE]`)
cmd.Flags().Int64Var(&createReq.WorkspaceId,"workspace-id",createReq.WorkspaceId,`The workspace ID of the workspace in which the usage dashboard is created.`)
// Disable completions since they are not applicable.
// Can be overridden by manual implementation in `override.go`.
cmd.ValidArgsFunction=cobra.NoFileCompletions
// Apply optional overrides to this command.
for_,fn:=rangecreateOverrides{
fn(cmd,&createReq)
}
returncmd
}
// start get command
// Slice with functions to override default command behavior.
// Functions can be added from the `init()` function in manually curated files in this directory.
vargetOverrides[]func(
*cobra.Command,
*billing.GetBillingUsageDashboardRequest,
)
funcnewGet()*cobra.Command{
cmd:=&cobra.Command{}
vargetReqbilling.GetBillingUsageDashboardRequest
// TODO: short flags
cmd.Flags().Var(&getReq.DashboardType,"dashboard-type",`Workspace level usage dashboard shows usage data for the specified workspace ID. Supported values: [USAGE_DASHBOARD_TYPE_GLOBAL, USAGE_DASHBOARD_TYPE_WORKSPACE]`)
cmd.Flags().Int64Var(&getReq.WorkspaceId,"workspace-id",getReq.WorkspaceId,`The workspace ID of the workspace in which the usage dashboard is created.`)