// GetPolicyWithContext mocks base method
340576
func (m *MockLambdaAPI) GetPolicyWithContext(arg0 aws.Context, arg1 *lambda.GetPolicyInput, arg2 ...request.Option) (*lambda.GetPolicyOutput, error) {
	varargs := []interface{}{arg0, arg1}
	for _, a := range arg2 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetPolicyWithContext", varargs...)
	ret0, _ := ret[0].(*lambda.GetPolicyOutput)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
2072
func (p *PUContext) RetrieveCachedExternalFlowPolicy(id string) (interface{}, error) {
	return p.externalIPCache.Get(id)
}
1224569
func (dc *DeepCopier) WithContext(ctx map[string]interface{}) *DeepCopier {
	dc.ctx = ctx
	return dc
}
739763
func (o *GetLogoutRequestParams) WithContext(ctx context.Context) *GetLogoutRequestParams {
	o.SetContext(ctx)
	return o
}
1159342
func (m *MockLambdaAPI) GetPolicy(arg0 *lambda.GetPolicyInput) (*lambda.GetPolicyOutput, error) {
	ret := m.ctrl.Call(m, "GetPolicy", arg0)
	ret0, _ := ret[0].(*lambda.GetPolicyOutput)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
586796
func (o *GetEndpointIDLogParams) WithContext(ctx context.Context) *GetEndpointIDLogParams {
	o.SetContext(ctx)
	return o
}
674391
func (o *GetFqdnCacheIDParams) WithContext(ctx context.Context) *GetFqdnCacheIDParams {
	o.SetContext(ctx)
	return o
}
311992
func (model Model) GetFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) [][]string {
	res := [][]string{}

	for _, rule := range model[sec][ptype].Policy {
		matched := true
		for i, fieldValue := range fieldValues {
			if fieldValue != "" && rule[fieldIndex+i] != fieldValue {
				matched = false
				break
			}
		}

		if matched {
			res = append(res, rule)
		}
	}

	return res
}
292853
func (ml *MockRouteCountLogger) GetContext(key string) (interface{}, bool) {
	return ml.logger.GetContext(key)
}
1337184
func (pm *ManagerImpl) GetPolicy(id string) (Policy, bool) {
	if id == "" {
		logger.Errorf("Returning dummy reject all policy because no policy ID supplied")
		return rejectPolicy(id), false
	}
	var relpath string

	if strings.HasPrefix(id, PathSeparator) {
		if !strings.HasPrefix(id, PathSeparator+pm.path) {
			logger.Debugf("Requested absolute policy %s from %s, returning rejectAll", id, pm.path)
			return rejectPolicy(id), false
		}
		// strip off the leading slash, the path, and the trailing slash
		relpath = id[1+len(pm.path)+1:]
	} else {
		relpath = id
	}

	policy, ok := pm.policies[relpath]
	if !ok {
		logger.Debugf("Returning dummy reject all policy because %s could not be found in %s/%s", id, pm.path, relpath)
		return rejectPolicy(relpath), false
	}

	return &policyLogger{
		policy:     policy,
		policyName: PathSeparator + pm.path + PathSeparator + relpath,
	}, true
}
1055689
func (q *ModelQuery) WithContext(ctx context.Context) *ModelQuery {
	q.ctx = ctx
	return q
}
157209
func (o *GetDebuginfoParams) WithContext(ctx context.Context) *GetDebuginfoParams {
	o.SetContext(ctx)
	return o
}
149260
func (b *BigIP) GetPolicy(name string) (*Policy, error) {
	var p Policy
	err, ok := b.getForEntity(&p, uriLtm, uriPolicy, name, policyVersionSuffix)
	if err != nil {
		return nil, err
	}
	if !ok {
		return nil, nil
	}

	var rules PolicyRules
	err, _ = b.getForEntity(&rules, uriLtm, uriPolicy, name, "rules", policyVersionSuffix)
	if err != nil {
		return nil, err
	}
	p.Rules = rules.Items

	for i, _ := range p.Rules {
		var a PolicyRuleActions
		var c PolicyRuleConditions

		err, _ = b.getForEntity(&a, uriLtm, uriPolicy, name, "rules", p.Rules[i].Name, "actions", policyVersionSuffix)
		if err != nil {
			return nil, err
		}
		err, _ = b.getForEntity(&c, uriLtm, uriPolicy, name, "rules", p.Rules[i].Name, "conditions", policyVersionSuffix)
		if err != nil {
			return nil, err
		}
		p.Rules[i].Actions = a.Items
		p.Rules[i].Conditions = c.Items
	}

	return &p, nil
}
37685
func (call *GetGroupMemberProfileCall) WithContext(ctx context.Context) *GetGroupMemberProfileCall {
	call.ctx = ctx
	return call
}
1327574
func (o *GetHelloParams) WithContext(ctx context.Context) *GetHelloParams {
	o.SetContext(ctx)
	return o
}
276873
func (o *GetEndpointIDConfigParams) WithContext(ctx context.Context) *GetEndpointIDConfigParams {
	o.SetContext(ctx)
	return o
}
1318398
func getImportedPolicyBody(c context.Context, name string) (*importedPolicyBody, error) {
	e := &importedPolicyBody{
		Parent: datastore.KeyForObj(c, &importedPolicyHeader{Name: name}),
	}
	switch err := datastore.Get(c, e); {
	case err == datastore.ErrNoSuchEntity:
		return nil, nil
	case err != nil:
		return nil, transient.Tag.Apply(err)
	}
	return e, nil
}