// Retrieve The type of trigger.
170982
func (r Scale_Policy_Trigger_ResourceUse) GetType() (resp datatypes.Scale_Policy_Trigger_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Scale_Policy_Trigger_ResourceUse", "getType", nil, &r.Options, &resp)
	return
}
1322367
func (r Virtual_Guest) GetType() (resp datatypes.Virtual_Guest_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "getType", nil, &r.Options, &resp)
	return
}
404346
func GetFieldTypes(db *sql.DB, dbName string, tableName string) []FieldType {
	fields := GetFields(db, dbName, tableName)
	if fields == nil {
		return nil
	}
	types := make([]FieldType, len(fields))
	for i, f := range fields {
		types[i] = f.Type
	}
	return types
}
1333193
func (es *EventScope) Trigger(eID int, data interface{}) error {
	for _, onFunc := range es.eventsCallbacks[eID] {
		if err := onFunc(data); err != nil {
			return err
		}
	}
	return nil
}
1142968
func GetType(tname string) (reflect.Type, error) {
	t, found := typemap[tname]
	if !found {
		return nil, errors.New("type not found: " + tname)
	}
	return t, nil

}
666012
func triggerCacheIndexer(obj interface{}) ([]string, error) {
	entry := obj.(*trigger.CacheEntry)
	var keys []string
	for _, t := range entry.Triggers {
		if t.From.Kind != "ImageStreamTag" || len(t.From.APIVersion) != 0 || t.Paused {
			continue
		}
		name, _, ok := imageapi.SplitImageStreamTag(t.From.Name)
		if !ok {
			continue
		}
		namespace := t.From.Namespace
		if len(namespace) == 0 {
			namespace = entry.Namespace
		}
		keys = append(keys, namespace+"/"+name)
	}
	return keys, nil
}
111497
func (c *CreateEvent) GetPusherType() string {
	if c == nil || c.PusherType == nil {
		return ""
	}
	return *c.PusherType
}
42753
func (af *avgFunction) GetType() *types.FieldType {
	ft := types.NewFieldType(mysql.TypeNewDecimal)
	ft.Charset = charset.CharsetBin
	ft.Collate = charset.CollationBin
	ft.Decimal = af.Args[0].GetType().Decimal
	return ft
}
409766
func PgTriggersByTgconstraint(db XODB, tgconstraint pgtypes.Oid) ([]*PgTrigger, error) {
	var err error

	// sql query
	const sqlstr = `SELECT ` +
		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, tgrelid, tgname, tgfoid, tgtype, tgenabled, tgisinternal, tgconstrrelid, tgconstrindid, tgconstraint, tgdeferrable, tginitdeferred, tgnargs, tgattr, tgargs, tgqual ` +
		`FROM pg_catalog.pg_trigger ` +
		`WHERE tgconstraint = $1`

	// run query
	XOLog(sqlstr, tgconstraint)
	q, err := db.Query(sqlstr, tgconstraint)
	if err != nil {
		return nil, err
	}
	defer q.Close()

	// load results
	res := []*PgTrigger{}
	for q.Next() {
		pt := PgTrigger{}

		// scan
		err = q.Scan(&pt.Tableoid, &pt.Cmax, &pt.Xmax, &pt.Cmin, &pt.Xmin, &pt.Oid, &pt.Ctid, &pt.Tgrelid, &pt.Tgname, &pt.Tgfoid, &pt.Tgtype, &pt.Tgenabled, &pt.Tgisinternal, &pt.Tgconstrrelid, &pt.Tgconstrindid, &pt.Tgconstraint, &pt.Tgdeferrable, &pt.Tginitdeferred, &pt.Tgnargs, &pt.Tgattr, &pt.Tgargs, &pt.Tgqual)
		if err != nil {
			return nil, err
		}

		res = append(res, &pt)
	}

	return res, nil
}
272981
func getStrategyImageChangeTrigger(bc *buildv1.BuildConfig) *buildv1.ImageChangeTrigger {
	for _, trigger := range bc.Spec.Triggers {
		if trigger.Type == buildv1.ImageChangeBuildTriggerType && trigger.ImageChange.From == nil {
			return trigger.ImageChange
		}
	}
	return nil
}
535005
func PgEventTriggerByEvtname(db XODB, evtname pgtypes.Name) (*PgEventTrigger, error) {
	var err error

	// sql query
	const sqlstr = `SELECT ` +
		`tableoid, cmax, xmax, cmin, xmin, oid, ctid, evtname, evtevent, evtowner, evtfoid, evtenabled, evttags ` +
		`FROM pg_catalog.pg_event_trigger ` +
		`WHERE evtname = $1`

	// run query
	XOLog(sqlstr, evtname)
	pet := PgEventTrigger{}

	err = db.QueryRow(sqlstr, evtname).Scan(&pet.Tableoid, &pet.Cmax, &pet.Xmax, &pet.Cmin, &pet.Xmin, &pet.Oid, &pet.Ctid, &pet.Evtname, &pet.Evtevent, &pet.Evtowner, &pet.Evtfoid, &pet.Evtenabled, &pet.Evttags)
	if err != nil {
		return nil, err
	}

	return &pet, nil
}
766904
func (u *User) GetType() string {
	if u == nil || u.Type == nil {
		return ""
	}
	return *u.Type
}
371720
func (p *Plugin) GetTypes() []types.PluginInterfaceType {
	p.mu.RLock()
	defer p.mu.RUnlock()

	return p.PluginObj.Config.Interface.Types
}
1127981
func (self *Service) ListTriggers() (TriggerListResponse, error) {
	url := "service/" + self.Uuid + "/trigger/"
	request := "GET"
	//Empty Body Request
	body := []byte(`{}`)
	var response TriggerListResponse
	var finalResponse TriggerListResponse

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

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

	finalResponse = response

Loop:
	for {
		if response.Meta.Next != "" {
			var nextResponse TriggerListResponse
			data, err := TutumCall(response.Meta.Next[8:], request, body)
			if err != nil {
				return nextResponse, err
			}
			err = json.Unmarshal(data, &nextResponse)
			if err != nil {
				return nextResponse, err
			}
			finalResponse.Objects = append(finalResponse.Objects, nextResponse.Objects...)
			response = nextResponse

		} else {
			break Loop
		}
	}

	return finalResponse, nil
}
1070342
func (v *Type) GetReferenceType() (o *TypeReference) {
	if v != nil && v.ReferenceType != nil {
		return v.ReferenceType
	}

	return
}
604305
func (s *UnionSchema) GetType(v reflect.Value) int {
	if s.Types != nil {
		for i := range s.Types {
			if t := s.Types[i]; t.Validate(v) {
				return i
			}
		}
	}

	return -1
}
774088
func (t *TreeEntry) GetType() string {
	if t == nil || t.Type == nil {
		return ""
	}
	return *t.Type
}