// GetOk a HALLink by name, and if it doesn't exist, return false
439525
func (al HALLinks) GetOk(name string) (link *HALLink, ok bool) {
	for _, link = range al.links {
		if strings.ToLower(link.Name) == strings.ToLower(name) {
			ok = true
			return
		}
	}
	link = nil
	return
}
1337308
func (c *Config) GetBoolOk(key string) (b bool, ok bool) {
	v, ok := c.GetOk(key)
	if !ok {
		return false, false
	}
	b, ok = v.(bool)
	return
}
315498
func (o *Organization) GetHooksURL() string {
	if o == nil || o.HooksURL == nil {
		return ""
	}
	return *o.HooksURL
}
723478
func (r RouteParams) GetOK(name string) ([]string, bool, bool) {
	for _, p := range r {
		if p.Name == name {
			return []string{p.Value}, true, p.Value != ""
		}
	}
	return nil, false, false
}
1176452
func (h Headers) Get(k string) (string, bool) {
	v, ok := h.items[CanonicalizeHeaderKey(k)]
	return v, ok
}
249855
func (v *OrderedValues) GetOk(key []byte) ([]byte, bool) {
	for _, j := range *v {
		if len(j) > 0 && bytes.Equal(j[0], key) {
			if len(j) > 1 {
				return j[1], true
			}
			return nil, true
		}
	}
	return nil, false
}
201864
func (c *CloudAPI) GetKey(keyName string) (*cloudapi.Key, error) {
	if err := c.ProcessFunctionHook(c, keyName); err != nil {
		return nil, err
	}

	for _, key := range c.keys {
		if key.Name == keyName {
			return &key, nil
		}
	}

	return nil, fmt.Errorf("Key %s not found", keyName)
}
1077127
func (s *RepositoriesService) ListHooks(ctx context.Context, owner, repo string, opt *ListOptions) ([]*Hook, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo)
	u, err := addOptions(u, opt)
	if err != nil {
		return nil, nil, err
	}

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

	var hooks []*Hook
	resp, err := s.client.Do(ctx, req, &hooks)
	if err != nil {
		return nil, resp, err
	}

	return hooks, resp, nil
}
391255
func (bsh *BufferedServerHeader) GetKeys() (value []string) {
	if bsh.released {
		value = bsh.original.GetKeys()
	} else {
		value = bsh.original.GetKeys()
		for key := range bsh.headerMap {
			found := false
			for _,v := range value {
				if v==key {
					found = true
					break
				}
			}
			if !found {
				value = append(value,key)
			}
		}
	}
	return
}
391466
func (client *Client) GetStack(guid string) (Stack, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetStackRequest,
		URIParams:   Params{"stack_guid": guid},
	})
	if err != nil {
		return Stack{}, nil, err
	}

	var stack Stack
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &stack,
	}

	err = client.connection.Make(request, &response)
	return stack, response.Warnings, err
}
220836
func (d *ResourceDiff) GetOk(key string) (interface{}, bool) {
	r := d.get(strings.Split(key, "."), "newDiff")
	exists := r.Exists && !r.Computed
	if exists {
		// If it exists, we also want to verify it is not the zero-value.
		value := r.Value
		zero := r.Schema.Type.Zero()

		if eq, ok := value.(Equal); ok {
			exists = !eq.Equal(zero)
		} else {
			exists = !reflect.DeepEqual(value, zero)
		}
	}

	return r.Value, exists
}
429526
func (ps Params) Get(name string) (string, bool) {
	for _, entry := range ps {
		if entry.Key == name {
			return entry.Value, true
		}
	}
	return "", false
}
247363
func (c *Context) GetOk(key interface{}) (interface{}, bool) {
	store := c.getStore()
	val, ok := store[key]
	if !ok {
		if c.Parent != nil {
			return c.Parent.GetOk(key)
		}
	}
	return val, ok
}
1007874
func (s *RepositoriesService) GetPreReceiveHook(ctx context.Context, owner, repo string, id int64) (*PreReceiveHook, *Response, error) {
	u := fmt.Sprintf("repos/%v/%v/pre-receive-hooks/%d", owner, repo, id)
	req, err := s.client.NewRequest("GET", u, nil)
	if err != nil {
		return nil, nil, err
	}

	// TODO: remove custom Accept header when this API fully launches.
	req.Header.Set("Accept", mediaTypePreReceiveHooksPreview)

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

	return h, resp, nil
}
944850
func (f *File) GetKey(key string) string {
	name, k := f.NameSplitFunc(key)

	// get the section
	section := f.GetSection(name)
	if section == nil {
		return ""
	}

	return section.Get(k)
}
1334142
func GetStack(err error) string {
	if err == nil {
		return ""
	}
	cast, ok := err.(*Error)
	if !ok {
		return ""
	}
	return cast.Stack()
}
939946
func (b *BigIP) GetKey(name string) (*Key, error) {
	var key Key
	err, ok := b.getForEntity(&key, uriSys, uriFile, uriSslKey, name)
	if err != nil {
		return nil, err
	}
	if !ok {
		return nil, nil
	}

	return &key, nil
}