// The code in this file was automatically generated by running httprequest-generate-client.
// DO NOT EDIT

package aclclient

import (
	"context"
	"github.com/juju/aclstore/v2/params"
	"gopkg.in/httprequest.v1"
)

type client struct {
	Client httprequest.Client
}

// GetACL returns the members of the ACL with the requested name.
// Only administrators and members of the meta-ACL for the name
// may access this endpoint. The meta-ACL for meta-ACLs is "admin".
func (c *client) GetACL(ctx context.Context, p *params.GetACLRequest) (*params.GetACLResponse, error) {
	var r *params.GetACLResponse
	err := c.Client.Call(ctx, p, &r)
	return r, err
}

// GetACLs returns the list of all ACLs.
// Only administrators may access this endpoint.
func (c *client) GetACLs(ctx context.Context, p *params.GetACLsRequest) (*params.GetACLsResponse, error) {
	var r *params.GetACLsResponse
	err := c.Client.Call(ctx, p, &r)
	return r, err
}

// ModifyACL modifies the members of the ACL with the requested name.
// Only administrators and members of the meta-ACL for the name
// may access this endpoint. The meta-ACL for meta-ACLs is "admin".
func (c *client) ModifyACL(ctx context.Context, p *params.ModifyACLRequest) error {
	return c.Client.Call(ctx, p, nil)
}

// SetACL sets the members of the ACL with the requested name.
// Only administrators and members of the meta-ACL for the name
// may access this endpoint. The meta-ACL for meta-ACLs is "admin".
func (c *client) SetACL(ctx context.Context, p *params.SetACLRequest) error {
	return c.Client.Call(ctx, p, nil)
}
