// NewGetCmd builds a "svcat get plans" command
NewGetCmd builds a "svcat get plans" command
// NewGetCmd builds a " svcat get plans " command
func NewGetCmd(ctx *command.Context) *cobra.Command {
	getCmd := &getCmd{
		Namespaced: command.NewNamespaced(ctx),
		Scoped:     command.NewScoped(),
		Formatted:  command.NewFormatted(),
	}
	cmd := &cobra.Command{
		Use:     "plans [NAME]",
		Aliases: []string{"plan", "pl"},
		Short:   "List plans, optionally filtered by name, class, scope or namespace",
		Example: command.NormalizeExamples(`
  svcat get plans
  svcat get plans --scope cluster
  svcat get plans --scope namespace --namespace dev
  svcat get plan PLAN_NAME
  svcat get plan CLASS_NAME/PLAN_NAME
  svcat get plan --uuid PLAN_UUID
  svcat get plans --class CLASS_NAME
  svcat get plan --class CLASS_NAME PLAN_NAME
  svcat get plans --uuid --class CLASS_UUID
  svcat get plan --uuid --class CLASS_UUID PLAN_UUID
`),
		PreRunE: command.PreRunE(getCmd),
		RunE:    command.RunE(getCmd),
	}
	cmd.Flags().BoolVarP(
		&getCmd.lookupByUUID,
		"uuid",
		"u",
		false,
		"Whether or not to get the plan by UUID (the default is by name)",
	)
	cmd.Flags().StringVarP(
		&getCmd.classFilter,
		"class",
		"c",
		"",
		"Filter plans based on class. When --uuid is specified, the class name is interpreted as a uuid.",
	)
	getCmd.AddOutputFlags(cmd.Flags())
	getCmd.AddNamespaceFlags(cmd.Flags(), true)
	getCmd.AddScopedFlags(cmd.Flags(), true)
	return cmd
}
func NewGetCmd ( ctx * command . Context ) * cobra . Command { getCmd := & getCmd { Namespaced : command . NewNamespaced ( ctx ) , Scoped : command . NewScoped ( ) , Formatted : command . NewFormatted ( ) , } cmd := & cobra . Command { Use : " " , Aliases : [ ] string { " " , " " } , Short : " " , Example : command . NormalizeExamples ( `
  svcat get plans
  svcat get plans --scope cluster
  svcat get plans --scope namespace --namespace dev
  svcat get plan PLAN_NAME
  svcat get plan CLASS_NAME/PLAN_NAME
  svcat get plan --uuid PLAN_UUID
  svcat get plans --class CLASS_NAME
  svcat get plan --class CLASS_NAME PLAN_NAME
  svcat get plans --uuid --class CLASS_UUID
  svcat get plan --uuid --class CLASS_UUID PLAN_UUID
` ) , PreRunE : command . PreRunE ( getCmd ) , RunE : command . RunE ( getCmd ) , } cmd . Flags ( ) . BoolVarP ( & getCmd . lookupByUUID , " " , " " , false , " " , ) cmd . Flags ( ) . StringVarP ( & getCmd . classFilter , " " , " " , " " , " " , ) getCmd . AddOutputFlags ( cmd . Flags ( ) ) getCmd . AddNamespaceFlags ( cmd . Flags ( ) , true ) getCmd . AddScopedFlags ( cmd . Flags ( ) , true ) return cmd }
NewGetCmd builds a "svcat get plans" command
NewGetCmd builds a " svcat get plans " command