#
# Copyright 2021 DataRobot, Inc. and its affiliates.
#
# All rights reserved.
#
# DataRobot, Inc.
#
# This is proprietary source code of DataRobot, Inc. and its
# affiliates.
#
# Released under the terms of DataRobot Tool and Utility Agreement.
"""
Autogenerated DataRobot python client file.  Please don't modify.
"""

import trafaret as t
from datarobot.models.api_object import APIObject

class TemplatePermissionsResponse(APIObject):
    """
    Attributes
    ----------
    can_delete_template:bool
         Whether the current user can delete this template
    can_edit_template:bool
         Whether the current user can edit this template
    can_share:bool
         Whether the current user can share this template
    can_use_template:bool
         Whether the current user can generate documents with this template
    can_view:bool
         Whether the current user can view this template
    """
    _converter = t.Dict(
        {
            t.Key("can_delete_template"):  t.Bool(),
            t.Key("can_edit_template"):  t.Bool(),
            t.Key("can_share"):  t.Bool(),
            t.Key("can_use_template"):  t.Bool(),
            t.Key("can_view"):  t.Bool(),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        can_delete_template,
        can_edit_template,
        can_share,
        can_use_template,
        can_view,
    ):
        self.can_delete_template = can_delete_template
        self.can_edit_template = can_edit_template
        self.can_share = can_share
        self.can_use_template = can_use_template
        self.can_view = can_view

    def __repr__(self):
        return (
            "TemplatePermissionsResponse("
            "can_delete_template={0.can_delete_template}, "
            "can_edit_template={0.can_edit_template}, "
            "can_share={0.can_share}, "
            "can_use_template={0.can_use_template}, "
            "can_view={0.can_view}, "
        ).format(self)
