// GetPipelineStatusCommand handles the interaction between the cli flags and the action handler for
// get-pipeline
14185
func getPipelineStatusCommand() *cli.Command {
	return &cli.Command{
		Name:     GetPipelineStatusCommandName,
		Usage:    GetPipelineStatusCommandUsage,
		Category: "Pipelines",
		Flags: []cli.Flag{
			cli.StringFlag{Name: "name"},
		},
		Action: ActionWrapper(getPipelineStatusAction),
	}
}
1254161
func (f *Flaeg) GetCommand() (*Command, error) {
	if f.calledCommand == nil {
		_, _, err := f.findCommandWithCommandArgs()
		return f.calledCommand, err
	}
	return f.calledCommand, nil
}
1145725
func (r Survey) GetStatus() (resp datatypes.Survey_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Survey", "getStatus", nil, &r.Options, &resp)
	return
}
928666
func (pgs *PipelinesService) GetStatus(ctx context.Context, name string, offset int) (ps *PipelineStatus, resp *APIResponse, err error) {
	ps = &PipelineStatus{}
	_, resp, err = pgs.client.getAction(ctx, &APIClientRequest{
		Path:         fmt.Sprintf("pipelines/%s/status", name),
		ResponseBody: ps,
	})

	return
}
1264020
func GetCommand() *Command {
	var command *Command
loop:
	for {
		cmd := prompter.Choose("\nEnter command", []string{"quit", "message"}, "message")
		command = new(Command)
		switch cmd {
		case "quit":
			command.Cmd = "quit"
			fin := prompter.YN("Quit?", true)
			if fin {
				break loop
			}
		case "message":
			command.Cmd = "message"
			var (
				topic string
				text  string
			)
			for {
				topic = prompter.Prompt("Enter topic (REQUIRED)", "")
				if topic == "" {
					fmt.Println("topic cannot be blank")
				} else {
					break
				}
			}
			for {
				text = prompter.Prompt("Enter message (REQUIRED)", "")
				if text == "" {
					fmt.Println("message cannot be blank")
				} else {
					break
				}
			}
			command.Topic = topic
			command.Text = text
			key := prompter.Prompt("Enter key", "")
			command.Key = key
			metadata := prompter.Prompt("Enter metadata", "")
			command.Metadata = metadata
			send := prompter.YN("Send Message?", true)
			if send {
				break loop
			}
		}
	}
	return command
}
907066
func (r *Redis) Pipelining() (*Pipelined, error) {
	c, err := r.pool.Get()
	if err != nil {
		return nil, err
	}
	return &Pipelined{r, c, 0}, nil
}
1215407
func GetCliCommands() []cli.Command {
	return []cli.Command{
		*configureCommand(),
		*listAgentsCommand(),
		*listPipelineTemplatesCommand(),
		*getAgentCommand(),
		*getPipelineTemplateCommand(),
		*createPipelineTemplateCommand(),
		*updateAgentCommand(),
		*updateAgentsCommand(),
		*updatePipelineConfigCommand(),
		*updatePipelineTemplateCommand(),
		*deleteAgentCommand(),
		*deleteAgentsCommand(),
		*deletePipelineTemplateCommand(),
		*deletePipelineConfigCommand(),
		*listPipelineGroupsCommand(),
		*getPipelineHistoryCommand(),
		*getPipelineCommand(),
		*createPipelineConfigCommand(),
		*getPipelineStatusCommand(),
		*pausePipelineCommand(),
		*unpausePipelineCommand(),
		*releasePipelineLockCommand(),
		*getConfigurationCommand(),
		*encryptCommand(),
		*getVersionCommand(),
		*listPluginsCommand(),
		*getPluginCommand(),
		*listScheduledJobsCommand(),
		*getPipelineConfigCommand(),
		*listEnvironmentsCommand(),
		*getEnvironmentCommand(),
		*patchEnvironmentCommand(),
		*addPipelinesToEnvironmentCommand(),
		*removePipelinesFromEnvironmentCommand(),
		*listPropertiesCommand(),
		*createPropertyCommand(),
		*createRoleCommand(),
		*listRoleCommand(),
		*getRoleCommand(),
		*updateRoleCommand(),
		*deleteRoleCommand(),
	}
}
1171822
func (c *CheckRun) GetStatus() string {
	if c == nil || c.Status == nil {
		return ""
	}
	return *c.Status
}
468413
func (r Monitoring_Robot) GetRobotStatus() (resp datatypes.Monitoring_Robot_Status, err error) {
	err = r.Session.DoRequest("SoftLayer_Monitoring_Robot", "getRobotStatus", nil, &r.Options, &resp)
	return
}
61493
func getPluginCommand() *cli.Command {
	return &cli.Command{
		Name:     GetPluginCommandName,
		Usage:    GetPluginCommandUsage,
		Category: "Plugins",
		Action:   ActionWrapper(getPluginAction),
		Flags: []cli.Flag{
			cli.StringFlag{Name: "name"},
		},
	}
}
299560
func (c *Client) GetWAFRuleStatus(i *GetWAFRuleStatusInput) (WAFRuleStatus, error) {
	if i.ID == 0 {
		return WAFRuleStatus{}, ErrMissingRuleID
	}
	if i.Service == "" {
		return WAFRuleStatus{}, ErrMissingService
	}
	if i.WAF == "" {
		return WAFRuleStatus{}, ErrMissingWAFID
	}

	path := fmt.Sprintf("/service/%s/wafs/%s/rules/%d/rule_status", i.Service, i.WAF, i.ID)
	resp, err := c.Get(path, nil)
	if err != nil {
		return WAFRuleStatus{}, err
	}

	var status WAFRuleStatus
	err = jsonapi.UnmarshalPayload(resp.Body, &status)
	return status, err
}
1324015
func (c *Client) TxPipeline() Pipeliner {
	pipe := Pipeline{
		exec: c.processTxPipeline,
	}
	pipe.statefulCmdable.setProcessor(pipe.Process)
	return &pipe
}
1147840
func addPipelinesToEnvironmentCommand() *cli.Command {
	return &cli.Command{
		Name:     AddPipelinesToEnvironmentCommandName,
		Usage:    AddPipelinesToEnvironmentCommandUsage,
		Action:   ActionWrapper(addPipelinesToEnvironmentAction),
		Category: "Environments",
		Flags: []cli.Flag{
			cli.StringFlag{Name: "environment-name"},
			cli.StringFlag{
				Name:  "pipeline-names",
				Usage: "Comma seperated list of pipeline names to add.",
			},
		},
	}
}
915602
func (c *CommitFile) GetStatus() string {
	if c == nil || c.Status == nil {
		return ""
	}
	return *c.Status
}
291464
func rktGetStatus(uuid string, logger hclog.Logger) (*Pod, error) {
	statusArgs := []string{
		"status",
		"--format=json",
		uuid,
	}
	var outBuf, errBuf bytes.Buffer
	cmd := exec.Command(rktCmd, statusArgs...)
	cmd.Stdout = &outBuf
	cmd.Stderr = &errBuf
	if err := cmd.Run(); err != nil {
		if outBuf.Len() > 0 {
			logger.Debug("status output for UUID", "uuid", uuid, "error", elide(outBuf))
		}
		if errBuf.Len() == 0 {
			return nil, err
		}
		logger.Debug("status error output", "uuid", uuid, "error", elide(errBuf))
		return nil, fmt.Errorf("%s. stderr: %q", err, elide(errBuf))
	}
	var status Pod
	if err := json.Unmarshal(outBuf.Bytes(), &status); err != nil {
		return nil, err
	}
	return &status, nil
}
1272248
func (s *RepositoriesService) GetDeploymentStatus(ctx context.Context, owner, repo string, deploymentID, deploymentStatusID int64) (*DeploymentStatus, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/deployments/%v/statuses/%v", owner, repo, deploymentID, deploymentStatusID)

	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	// TODO: remove custom Accept headers when APIs fully launch.
	acceptHeaders := []string{mediaTypeDeploymentStatusPreview, mediaTypeExpandDeploymentStatusPreview}
	req.Header.Set("Accept", strings.Join(acceptHeaders, ", "))

	d := new(DeploymentStatus)
	resp, err := s.client.Do(ctx, req, d)
	if err != nil {
		return nil, resp, err
	}

	return d, resp, nil
}
1042769
func (r *RedisStore) Pipeline(f func(r *RedisStore) error) ([]redis.Cmder, error) {
	pipe := r.client.Pipeline()

	redisPipeline := RedisPipeline{
		pipeline: pipe,
	}

	store := &RedisStore{
		client:     redisPipeline,
		expiration: r.expiration,
	}

	err := f(store)
	if err != nil {
		return nil, err
	}

	cmds, err := pipe.Exec()
	return cmds, err
}