# Path: barbicanclient/v1/acls.py
# LOG = logging.getLogger(__name__)
# DEFAULT_OPERATION_TYPE = 'read'
# VALID_ACL_OPERATIONS = ['read', 'write', 'delete', 'list']
# class ACLFormatter(formatter.EntityFormatter):
# class _PerOperationACL(ACLFormatter):
# class ACL(object):
# class SecretACL(ACL):
# class ContainerACL(ACL):
# class ACLManager(base.BaseEntityManager):
#     def _get_formatted_data(self):
#     def __init__(self, parent_acl, entity_ref=None, users=None,
#                  project_access=None, operation_type=None,
#                  created=None, updated=None):
#     def acl_ref(self):
#     def acl_ref_relative(self):
#     def entity_ref(self):
#     def entity_uuid(self):
#     def project_access(self):
#     def users(self):
#     def operation_type(self):
#     def created(self):
#     def updated(self):
#     def operation_type(self, value):
#     def project_access(self, value):
#     def users(self, value):
#     def remove(self):
#     def _validate_users_type(self):
#     def __init__(self, api, entity_ref, users=None, project_access=None,
#                  operation_type=DEFAULT_OPERATION_TYPE, created=None,
#                  updated=None):
#     def entity_ref(self):
#     def entity_uuid(self):
#     def operation_acls(self):
#     def acl_ref(self):
#     def acl_ref_relative(self):
#     def add_operation_acl(self, users=None, project_access=None,
#                           operation_type=None, created=None,
#                           updated=None,):
#     def _get_operation_acl(self, operation_type):
#     def get(self, operation_type):
#     def __getattr__(self, name):
#     def submit(self):
#     def remove(self):
#     def load_acls_data(self):
#     def validate_input_ref(self):
#     def get_acl_ref_from_entity_ref(entity_ref):
#     def get_acl_ref_from_entity_ref_relative(entity_ref, entity_type):
#     def identify_ref_type(entity_ref):
#     def acl_type(self):
#     def acl_type(self):
#     def __init__(self, api):
#     def create(self, entity_ref=None, users=None, project_access=None,
#                operation_type=DEFAULT_OPERATION_TYPE):
#     def get(self, entity_ref):
#     def _validate_acl_ref(self, entity_ref):


from cliff import command
from cliff import lister
from barbicanclient.v1 import acls


class AddACLUsers(lister.Lister, ArgMixin):
    """Add ACL users to a secret or container as identified by its href."""

    def get_parser(self, prog_name):
        parser = super(AddACLUsers, self).get_parser(prog_name)
        self.add_ref_arg(parser)
        self.add_per_acl_args(parser)
        return parser

    def take_action(self, args):
        """Add users to a secret or a container ACL defined in Barbican

        Provided users are added to existing ACL users if there. If input users
        is None or empty list, no change is made in existing ACL users list.
        If input project_access flag is None, then no change is made in
        existing project access behavior.

        :returns: List of objects for valid entity_ref
        :rtype: :class:`barbicanclient.acls.SecretACL` or
            :class:`barbicanclient.acls.ContainerACL`
        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        """

        input_entity = self.create_acl_entity_from_args(
            self.app.client_manager.key_manager.acls, args)


# Path: barbicanclient/v1/acls.py
# LOG = logging.getLogger(__name__)
# DEFAULT_OPERATION_TYPE = 'read'
# VALID_ACL_OPERATIONS = ['read', 'write', 'delete', 'list']
# class ACLFormatter(formatter.EntityFormatter):
# class _PerOperationACL(ACLFormatter):
# class ACL(object):
# class SecretACL(ACL):
# class ContainerACL(ACL):
# class ACLManager(base.BaseEntityManager):
#     def _get_formatted_data(self):
#     def __init__(self, parent_acl, entity_ref=None, users=None,
#                  project_access=None, operation_type=None,
#                  created=None, updated=None):
#     def acl_ref(self):
#     def acl_ref_relative(self):
#     def entity_ref(self):
#     def entity_uuid(self):
#     def project_access(self):
#     def users(self):
#     def operation_type(self):
#     def created(self):
#     def updated(self):
#     def operation_type(self, value):
#     def project_access(self, value):
#     def users(self, value):
#     def remove(self):
#     def _validate_users_type(self):
#     def __init__(self, api, entity_ref, users=None, project_access=None,
#                  operation_type=DEFAULT_OPERATION_TYPE, created=None,
#                  updated=None):
#     def entity_ref(self):
#     def entity_uuid(self):
#     def operation_acls(self):
#     def acl_ref(self):
#     def acl_ref_relative(self):
#     def add_operation_acl(self, users=None, project_access=None,
#                           operation_type=None, created=None,
#                           updated=None,):
#     def _get_operation_acl(self, operation_type):
#     def get(self, operation_type):
#     def __getattr__(self, name):
#     def submit(self):
#     def remove(self):
#     def load_acls_data(self):
#     def validate_input_ref(self):
#     def get_acl_ref_from_entity_ref(entity_ref):
#     def get_acl_ref_from_entity_ref_relative(entity_ref, entity_type):
#     def identify_ref_type(entity_ref):
#     def acl_type(self):
#     def acl_type(self):
#     def __init__(self, api):
#     def create(self, entity_ref=None, users=None, project_access=None,
#                operation_type=DEFAULT_OPERATION_TYPE):
#     def get(self, entity_ref):
#     def _validate_acl_ref(self, entity_ref):


# Path: barbicanclient/barbican_cli/v1/acls.py
from cliff import command
from cliff import lister
from barbicanclient.v1 import acls



class AddACLUsers(lister.Lister, ArgMixin):
    """Add ACL users to a secret or container as identified by its href."""

    def get_parser(self, prog_name):
        parser = super(AddACLUsers, self).get_parser(prog_name)
        self.add_ref_arg(parser)
        self.add_per_acl_args(parser)
        return parser

    def take_action(self, args):
        """Add users to a secret or a container ACL defined in Barbican

        Provided users are added to existing ACL users if there. If input users
        is None or empty list, no change is made in existing ACL users list.
        If input project_access flag is None, then no change is made in
        existing project access behavior.

        :returns: List of objects for valid entity_ref
        :rtype: :class:`barbicanclient.acls.SecretACL` or
            :class:`barbicanclient.acls.ContainerACL`
        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        """

        input_entity = self.create_acl_entity_from_args(
            self.app.client_manager.key_manager.acls, args)


        server_entity = self.app.client_manager.key_manager.acls.get(