// Retrieve The type of action.
330287
func (r Scale_Policy_Action) GetType() (resp datatypes.Scale_Policy_Action_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Scale_Policy_Action", "getType", nil, &r.Options, &resp)
	return
}
674463
func GetAction(uuid string) (Action, error) {

	url := ""
	if string(uuid[0]) == "/" {
		url = uuid[8:]
	} else {
		url = "action/" + uuid + "/"
	}

	request := "GET"
	//Empty Body Request
	body := []byte(`{}`)
	var response Action

	data, err := TutumCall(url, request, body)
	if err != nil {
		return response, err
	}

	err = json.Unmarshal(data, &response)
	if err != nil {
		return response, err
	}

	return response, nil
}
61856
func EncodedStringToAction(e string) (ActionType, ObserveActionType, error) {

	switch e {
	case "1":
		return Observe | Accept, ObserveContinue, nil
	case "2":
		return Observe | Accept, ObserveApply, nil
	case "3":
		return Accept, ObserveNone, nil
	case "4":
		return Observe | Reject, ObserveContinue, nil
	case "5":
		return Observe | Reject, ObserveApply, nil
	case "6":
		return Reject, ObserveNone, nil
	case "7":
		return Observe, ObserveContinue, nil
	case "8":
		return Observe, ObserveApply, nil
	case "9":
		return 0, ObserveNone, nil
	}

	return 0, 0, errors.New("Invalid encoding")
}
607864
func (c *Client) FindActionsByNames(arg params.FindActionsByNames) (params.ActionsByNames, error) {
	results := params.ActionsByNames{}
	err := c.facade.FacadeCall("FindActionsByNames", arg, &results)
	return results, err
}
1038938
func (res *Resource) Action(actionName string, storage store.Get) {
	matcher := path.Join(patID, actionName)

	res.HandleFunc(
		pat.Get(matcher),
		func(w http.ResponseWriter, r *http.Request) {
			res.actionHandler(w, r, storage)
		},
	)

	res.addRoute(patch, matcher)
}
745299
func (clg *ClientBackedDryRunGetter) HandleGetAction(action core.GetAction) (bool, runtime.Object, error) {
	unstructuredObj, err := clg.dynamicClient.Resource(action.GetResource()).Namespace(action.GetNamespace()).Get(action.GetName(), metav1.GetOptions{})
	// Inform the user that the requested object wasn't found.
	printIfNotExists(err)
	if err != nil {
		return true, nil, err
	}
	newObj, err := decodeUnstructuredIntoAPIObject(action, unstructuredObj)
	if err != nil {
		fmt.Printf("error after decode: %v %v\n", unstructuredObj, err)
		return true, nil, err
	}
	return true, newObj, err
}
1096942
func (t *Template) GetAWSCodePipelineCustomActionTypeWithName(name string) (*resources.AWSCodePipelineCustomActionType, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSCodePipelineCustomActionType:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSCodePipelineCustomActionType not found", name)
}
1328357
func (w *Ware) Action(handler Handler) {
	validateHandler(handler)
	w.action = handler
}
1106674
func (l *LabelEvent) GetAction() string {
	if l == nil || l.Action == nil {
		return ""
	}
	return *l.Action
}
1065112
func (f *ScmpFilter) GetDefaultAction() (ScmpAction, error) {
	action, err := f.getFilterAttr(filterAttrActDefault)
	if err != nil {
		return 0x0, err
	}

	return actionFromNative(action)
}
803770
func (b *Board) GetActions(args Arguments) (actions ActionCollection, err error) {
	path := fmt.Sprintf("boards/%s/actions", b.ID)
	err = b.client.Get(path, args, &actions)
	return
}
10984
func (m *MarketplacePurchaseEvent) GetAction() string {
	if m == nil || m.Action == nil {
		return ""
	}
	return *m.Action
}
210602
func (c *Card) GetActions(args Arguments) (actions ActionCollection, err error) {
	path := fmt.Sprintf("cards/%s/actions", c.ID)
	err = c.client.Get(path, args, &actions)
	return
}
833950
func ParseActionType(text string) ActionType {
	switch {
	case strings.EqualFold(text, ActionTypeReplaceStr):
		return ActionTypeReplace
	case strings.EqualFold(text, ActionTypeUpdateStr):
		return ActionTypeUpdate
	}
	return ActionTypeUnknown
}
807633
func (st *state) GetRebootAction() (params.RebootAction, error) {
	var results params.RebootActionResults
	args := params.Entities{
		Entities: []params.Entity{{Tag: st.machineTag.String()}},
	}

	err := st.facade.FacadeCall("GetRebootAction", args, &results)
	if err != nil {
		return params.ShouldDoNothing, err
	}
	if len(results.Results) != 1 {
		return params.ShouldDoNothing, errors.Errorf("expected 1 result, got %d", len(results.Results))
	}

	if results.Results[0].Error != nil {
		return params.ShouldDoNothing, errors.Trace(results.Results[0].Error)
	}

	return results.Results[0].Result, nil
}
1134301
func GetActionsByName(api APIClient, name string) ([]params.ActionResult, error) {
	nothing := []params.ActionResult{}
	results, err := api.FindActionsByNames(params.FindActionsByNames{ActionNames: []string{name}})
	if err != nil {
		return nothing, errors.Trace(err)
	}
	if len(results.Actions) != 1 {
		return nothing, errors.Errorf("expected one result got %d", len(results.Actions))
	}
	result := results.Actions[0]
	if result.Error != nil {
		return nothing, result.Error
	}
	if len(result.Actions) < 1 {
		return nothing, errors.Errorf("no actions were found for name %s", name)
	}
	return result.Actions, nil

}
480428
func (m *Martini) Action(handler Handler) {
	validateHandler(handler)
	m.action = handler
}