# Path: barbicanclient/base.py
# LOG = logging.getLogger(__name__)
# def filter_null_keys(dictionary):
# def censored_copy(data_dict, censor_keys):
# def validate_ref_and_return_uuid(ref, entity):
# def calculate_uuid_ref(ref, entity):
#     def __init__(self, attribute=None):
#     def __init__(self, api, entity):
#     def total(self):
# class ImmutableException(Exception):
# class BaseEntityManager(object):
# 
# Path: barbicanclient/exceptions.py
# class BarbicanException(Exception):
# class PayloadException(BarbicanException):
# class UnsupportedVersion(BarbicanException):
# class HTTPError(Exception):
# class HTTPServerError(HTTPError):
# class HTTPClientError(HTTPError):
# class HTTPAuthError(HTTPError):
#     def __init__(self, message, status_code=0):
#     def __init__(self, message, status_code=401):
# 
# Path: barbicanclient/formatter.py
# class EntityFormatter(object):
#     def _list_objects(obj_list):
#     def _get_generic_data(self):
#     def _get_generic_columns(self):
#     def _get_formatted_entity(self):
#     def __str__(self):
#     def to_dict(self):
# 
# 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):


import base64
import functools
import logging
import six
from oslo_utils.timeutils import parse_isotime
from barbicanclient import base
from barbicanclient import exceptions
from barbicanclient import formatter
from barbicanclient.v1 import acls as acl_manager
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        """
        LOG.debug("Getting secret - Secret href: {0}".format(secret_ref))
        base.validate_ref_and_return_uuid(secret_ref, 'Secret')
        return Secret(
            api=self._api,
            payload_content_type=payload_content_type,
            secret_ref=secret_ref
        )

    def update(self, secret_ref, payload=None):
        """Update an existing Secret in Barbican

        :param str secret_ref: Full HATEOAS reference to a Secret, or a UUID
        :param str payload: New payload to add to secret
        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        """

        base.validate_ref_and_return_uuid(secret_ref, 'Secret')
        if not secret_ref:
            raise ValueError('secret_ref is required.')

        if type(payload) is six.binary_type:
            headers = {'content-type': "application/octet-stream"}
        elif type(payload) is six.text_type:
            headers = {'content-type': "text/plain"}
        else:

# Path: barbicanclient/base.py
# LOG = logging.getLogger(__name__)
# def filter_null_keys(dictionary):
# def censored_copy(data_dict, censor_keys):
# def validate_ref_and_return_uuid(ref, entity):
# def calculate_uuid_ref(ref, entity):
#     def __init__(self, attribute=None):
#     def __init__(self, api, entity):
#     def total(self):
# class ImmutableException(Exception):
# class BaseEntityManager(object):
# 
# Path: barbicanclient/exceptions.py
# class BarbicanException(Exception):
# class PayloadException(BarbicanException):
# class UnsupportedVersion(BarbicanException):
# class HTTPError(Exception):
# class HTTPServerError(HTTPError):
# class HTTPClientError(HTTPError):
# class HTTPAuthError(HTTPError):
#     def __init__(self, message, status_code=0):
#     def __init__(self, message, status_code=401):
# 
# Path: barbicanclient/formatter.py
# class EntityFormatter(object):
#     def _list_objects(obj_list):
#     def _get_generic_data(self):
#     def _get_generic_columns(self):
#     def _get_formatted_entity(self):
#     def __str__(self):
#     def to_dict(self):
# 
# 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/v1/secrets.py
import base64
import functools
import logging
import six
from oslo_utils.timeutils import parse_isotime
from barbicanclient import base
from barbicanclient import exceptions
from barbicanclient import formatter
from barbicanclient.v1 import acls as acl_manager

        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        """
        LOG.debug("Getting secret - Secret href: {0}".format(secret_ref))
        base.validate_ref_and_return_uuid(secret_ref, 'Secret')
        return Secret(
            api=self._api,
            payload_content_type=payload_content_type,
            secret_ref=secret_ref
        )

    def update(self, secret_ref, payload=None):
        """Update an existing Secret in Barbican

        :param str secret_ref: Full HATEOAS reference to a Secret, or a UUID
        :param str payload: New payload to add to secret
        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        """

        base.validate_ref_and_return_uuid(secret_ref, 'Secret')
        if not secret_ref:
            raise ValueError('secret_ref is required.')

        if type(payload) is six.binary_type:
            headers = {'content-type': "application/octet-stream"}
        elif type(payload) is six.text_type:
            headers = {'content-type': "text/plain"}
        else:

            raise exceptions.PayloadException("Invalid Payload Type")