// scopePresent returns true if scope is in the scope string
// The scope string is expected to be a comma seperated list of scopes
332928
func scopePresent(scopeStr string, scopeToSearch string) bool {
	scopeSlice := strings.Split(scopeStr, ",")
	for _, scope := range scopeSlice {
		if scope == scopeToSearch {
			return true
		}
	}

	return false
}
612373
func (s *ListPoliciesInput) SetScope(v string) *ListPoliciesInput {
	s.Scope = &v
	return s
}
1028191
func Scope(xs XStater, scope string, scopes ...string) XStater {
	if c, ok := xs.(Scoper); ok {
		return c.Scope(scope, scopes...)
	}
	return nop
}
657049
func Convert_core_ScopeSelector_To_v1_ScopeSelector(in *core.ScopeSelector, out *v1.ScopeSelector, s conversion.Scope) error {
	return autoConvert_core_ScopeSelector_To_v1_ScopeSelector(in, out, s)
}
998498
func Scope(name string, desc ...string) {
	switch current := dslengine.CurrentDefinition().(type) {
	case *design.SecurityDefinition:
		if len(desc) >= 1 {
			dslengine.ReportError("too many arguments")
			return
		}
		current.Scopes = append(current.Scopes, name)
	case *design.SecuritySchemeDefinition:
		if len(desc) > 1 {
			dslengine.ReportError("too many arguments")
			return
		}
		if current.Scopes == nil {
			current.Scopes = make(map[string]string)
		}
		d := "no description"
		if len(desc) == 1 {
			d = desc[0]
		}
		current.Scopes[name] = d
	default:
		dslengine.IncompatibleDSL()
	}
}
1001130
func getIncludedScope(scope Scope, name string) (Scope, error) {
	included, err := scope.LookupInclude(name)
	if err != nil {
		return nil, unrecognizedModuleError{Name: name, Reason: err}
	}
	return included, nil
}
351831
func (s *scopeStack) All() map[string]Value {
	res := make(map[string]Value)
	for _, scope := range s.scopes {
		for k, v := range scope {
			res[k] = v
		}
	}
	return res
}
150654
func (xs *xstats) Scope(scope string, scopes ...string) XStater {
	var scs []string
	if xs.prefix == "" {
		scs = make([]string, 0, 1+len(scopes))
	} else {
		scs = make([]string, 0, 2+len(scopes))
		scs = append(scs, strings.TrimRight(xs.prefix, xs.delimiter))
	}
	scs = append(scs, scope)
	scs = append(scs, scopes...)
	xs2 := NewScoping(xs.s, xs.delimiter, scs...).(*xstats)
	xs2.tags = xs.tags
	return xs2
}
1231497
func (c *Connector) ScopeExists(ctx context.Context, scope string) (bool, error) {
	return true, nil
}
789078
func (c *adminClient) Scope(scope string) AdminClient {
	c.scope = scope
	return c
}
1024101
func (client *RenderingControl1) SelectPreset(InstanceID uint32, PresetName string) (err error) {
	// Request structure.
	request := &struct {
		InstanceID string
		PresetName string
	}{}
	// BEGIN Marshal arguments into request.

	if request.InstanceID, err = soap.MarshalUi4(InstanceID); err != nil {
		return
	}
	if request.PresetName, err = soap.MarshalString(PresetName); err != nil {
		return
	}
	// END Marshal arguments into request.

	// Response structure.
	response := interface{}(nil)

	// Perform the SOAP call.
	if err = client.SOAPClient.PerformAction(URN_RenderingControl_1, "SelectPreset", request, response); err != nil {
		return
	}

	// BEGIN Unmarshal arguments from response.

	// END Unmarshal arguments from response.
	return
}
525098
func (c *Connector) ScopeExists(ctx context.Context, scope string) (bool, error) {
	if c.Next == nil {
		return false, NewErrNoMoreConnector()
	}
	return c.Next.ScopeExists(ctx, scope)
}
713437
func ScopesEqual(o1, o2 *ScopesOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
699903
func (s accessSet) scopeParam() string {
	scopes := make([]string, 0, len(s))

	for resource, actionSet := range s {
		actions := strings.Join(actionSet.keys(), ",")
		scopes = append(scopes, fmt.Sprintf("%s:%s:%s", resource.Type, resource.Name, actions))
	}

	return strings.Join(scopes, " ")
}
395081
func (p *PUContext) Scopes() []string {
	p.RLock()
	defer p.RUnlock()

	return p.scopes
}
788915
func (api *Client) SetUserPresence(presence string) error {
	return api.SetUserPresenceContext(context.Background(), presence)
}
588045
func (m *MockConnector) ScopeExists(arg0 context.Context, arg1 string) (bool, error) {
	ret := m.ctrl.Call(m, "ScopeExists", arg0, arg1)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}