#
# 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
from datarobot.models.full_api.generated.model.sharing_role_update_data import SharingRoleUpdateData

class UseCaseSharingUpdate(APIObject):
    """
    Attributes
    ----------
    operation:str
         The name of the action being taken. Only 'updateRoles' is supported.. defaults to "updateRoles", must be one of ["updateRoles", ]
    roles:[SharingRoleUpdateData]
         A list of sharing role objects
    """
    _converter = t.Dict(
        {
            t.Key("operation"):  t.String(),
            t.Key("roles"):  t.List(t.Dict().allow_extra("*")),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        operation,
        roles,
    ):
        self.operation = operation
        self.roles = roles

    def __repr__(self):
        return (
            "UseCaseSharingUpdate("
            "operation={0.operation}, "
            "roles={0.roles}, "
        ).format(self)
