// GetAction returns the Action field if it's non-nil, zero value otherwise.
10984
func (m *MarketplacePurchaseEvent) GetAction() string {
	if m == nil || m.Action == nil {
		return ""
	}
	return *m.Action
}
360935
func (a *Action) ChainAction(f ActionInterface) ActionInterface {
	if a == f {
		return a
	}

	return a.UseThen(func(b interface{}, to ActionInterface) {
		to.Fullfill(b)
	}, f)
}
1070684
func getVersionAction(client *gocd.Client, c *cli.Context) (r interface{}, resp *gocd.APIResponse, err error) {
	return client.Configuration.GetVersion(context.Background())
}
1294466
func HandleAction(action interface{}, context *Context) (err error) {
	switch a := action.(type) {
	case ActionFunc:
		return a(context)
	case func(*Context) error:
		return a(context)
	case func(*Context): // deprecated function signature
		a(context)
		return nil
	}

	return errInvalidActionType
}
283584
func (d *DeployKeyEvent) GetAction() string {
	if d == nil || d.Action == nil {
		return ""
	}
	return *d.Action
}
456231
func NewAction(name string, params map[string]interface{}) (*Action, error) {
	return &Action{name: name, params: params}, nil
}
94204
func (i *IssueCommentEvent) GetAction() string {
	if i == nil || i.Action == nil {
		return ""
	}
	return *i.Action
}
681307
func (km Keymap) LookupAction(ev termbox.Event) Action {
	modifier := keyseq.ModNone
	if (ev.Mod & termbox.ModAlt) != 0 {
		modifier = keyseq.ModAlt
	}

	key := keyseq.Key{
		Modifier: modifier,
		Key:      ev.Key,
		Ch:       ev.Ch,
	}
	action, err := km.seq.AcceptKey(key)

	switch err {
	case nil:
		// Found an action!
		if pdebug.Enabled {
			pdebug.Printf("Keymap.Handler: Fetched action")
		}
		return wrapClearSequence(action.(Action))
	case keyseq.ErrInSequence:
		if pdebug.Enabled {
			pdebug.Printf("Keymap.Handler: Waiting for more commands...")
		}
		return wrapRememberSequence(ActionFunc(doNothing))
	default:
		if pdebug.Enabled {
			pdebug.Printf("Keymap.Handler: Defaulting to doAcceptChar")
		}
		return wrapClearSequence(ActionFunc(doAcceptChar))
	}
}
592993
func NewAction(name string, params map[string]interface{}) *Action {
	return &Action{name: name, params: params}
}
1065456
func (c *Client) Action(tag names.ActionTag) (*Action, error) {
	result, err := c.getOneAction(tag)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &Action{
		name:   result.Action.Name,
		params: result.Action.Parameters,
	}, nil
}
135820
func (p *ProjectCardEvent) GetAction() string {
	if p == nil || p.Action == nil {
		return ""
	}
	return *p.Action
}
1088711
func (i *InstallationEvent) GetAction() string {
	if i == nil || i.Action == nil {
		return ""
	}
	return *i.Action
}
1333100
func (m *MembershipEvent) GetAction() string {
	if m == nil || m.Action == nil {
		return ""
	}
	return *m.Action
}
635894
func HandleAction(name string, params map[string]interface{}) (results map[string]interface{}, err error) {
	spec, ok := actions.PredefinedActionsSpec[name]
	if !ok {
		return nil, errors.Errorf("unexpected action %s", name)
	}
	if err := spec.ValidateParams(params); err != nil {
		return nil, errors.Errorf("invalid action parameters")
	}

	switch name {
	case actions.JujuRunActionName:
		return handleJujuRunAction(params)
	default:
		return nil, errors.Errorf("unexpected action %s", name)
	}
}
488570
func (t *Transaction) doAction(a *Action) (interface{}, error) {
	switch a.kind {
	case commandAction:
		return t.conn.Do(a.name, a.args...)
	case scriptAction:
		return a.script.Do(t.conn, a.args...)
	}
	return nil, nil
}
964098
func (s *StackSetOperation) SetAction(v string) *StackSetOperation {
	s.Action = &v
	return s
}
385039
func (p *Page) GetAction() string {
	if p == nil || p.Action == nil {
		return ""
	}
	return *p.Action
}