// CreatePolicyGroupCategory creates a new child PolicyGroupCategory under the Enterprise
351836
func (o *Enterprise) CreatePolicyGroupCategory(child *PolicyGroupCategory) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
49635
func (o *VCenter) CreateVRSRedeploymentpolicy(child *VRSRedeploymentpolicy) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
612888
func NewCategory(name string) *Category {
	return &Category{
		Name:               name,
		childrenMap:        make(map[string]ConsoleElement),
		children:           make([]ConsoleElement, 0),
		cachedNumLeafNodes: -1,
	}
}
275447
func (o *Enterprise) CreatePolicyObjectGroup(child *PolicyObjectGroup) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
446131
func (p *PoliciesClient) Create(ctx context.Context, policy *primitive.Policy) (*envelope.Policy, error) {

	ID, err := identity.NewMutable(policy)
	if err != nil {
		return nil, err
	}

	env := envelope.Policy{
		ID:      &ID,
		Version: 1,
		Body:    policy,
	}

	res := envelope.Policy{}
	err = p.client.RoundTrip(ctx, "POST", "/policies", nil, env, &res)
	return &res, err
}
263375
func NewListPolicy(order ListOrderType, flags int) *ListPolicy {
	return &ListPolicy{
		attributes: order,
		flags:      flags,
	}
}
157834
func (o *Link) CreatePolicyStatement(child *PolicyStatement) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
440842
func TemplateImplicitMetaPolicyWithSubPolicy(path []string, policyName string, subPolicyName string, rule cb.ImplicitMetaPolicy_Rule) *cb.ConfigGroup {
	root := cb.NewConfigGroup()
	group := root
	for _, element := range path {
		group.Groups[element] = cb.NewConfigGroup()
		group = group.Groups[element]
	}

	group.Policies[policyName] = ImplicitMetaPolicyWithSubPolicy(subPolicyName, rule)
	return root
}
803645
func (c *Conn) CreateCategory(name string) (*Category, error) {
	var out struct {
		Category *Category
	}
	if err := c.do("smugmug.categories.create", &out, "Name", name); err != nil {
		return nil, err
	}
	return out.Category, nil
}
304313
func formatKVPolicy(policy *api.ACLPolicy) string {
	output := []string{
		fmt.Sprintf("Name|%s", policy.Name),
		fmt.Sprintf("Description|%s", policy.Description),
		fmt.Sprintf("Rules|%s", policy.Rules),
		fmt.Sprintf("CreateIndex|%v", policy.CreateIndex),
		fmt.Sprintf("ModifyIndex|%v", policy.ModifyIndex),
	}
	return formatKV(output)
}
676553
func NewGroupCreateType(Description string) *GroupCreateType {
	s := new(GroupCreateType)
	s.Description = Description
	return s
}
601435
func addImplicitMetaPolicyDefaults(cg *cb.ConfigGroup) {
	addPolicy(cg, policies.ImplicitMetaMajorityPolicy(channelconfig.AdminsPolicyKey), channelconfig.AdminsPolicyKey)
	addPolicy(cg, policies.ImplicitMetaAnyPolicy(channelconfig.ReadersPolicyKey), channelconfig.AdminsPolicyKey)
	addPolicy(cg, policies.ImplicitMetaAnyPolicy(channelconfig.WritersPolicyKey), channelconfig.AdminsPolicyKey)
}
219515
func (key *Key) AssignPolicy(policy *Policy) error {
	err := tspiError(C.Tspi_Policy_AssignToObject(policy.handle, (C.TSS_HOBJECT)(key.handle)))
	return err
}
1182161
func (o *DSCPRemarkingPolicyTable) CreateDSCPRemarkingPolicy(child *DSCPRemarkingPolicy) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
501423
func (c *clusterClient) SchedPolicyCreate(name, schedule string) error {
	request := &sched.SchedPolicy{
		Name:     name,
		Schedule: schedule,
	}

	req := c.c.Post().Resource(clusterPath + SchedPath).Body(request)
	res := req.Do()
	if res.Error() != nil {
		return res.FormatError()
	}

	return nil
}
560313
func (s *LoadBalancerService) NewCreateLBHealthCheckPolicyParams(lbruleid string) *CreateLBHealthCheckPolicyParams {
	p := &CreateLBHealthCheckPolicyParams{}
	p.p = make(map[string]interface{})
	p.p["lbruleid"] = lbruleid
	return p
}
1282082
func CreatePolicyAndToken(t testing.T, state StateStore, index uint64, name, rule string) *structs.ACLToken {
	CreatePolicy(t, state, index, name, rule)
	return CreateToken(t, state, index+1, []string{name})
}