<gh_stars>0
import yaml

import click

from accelbyte_py_sdk.api.iam import admin_get_role_managers_v3

from ._utils import login_as as login_as_internal


@click.command()
@click.argument("role_id")
@click.argument("limit", type=int)
@click.argument("before")
@click.argument("after")
@click.option("--doc", type=bool)
@click.option("--login_as", type=click.Choice(["client", "user"], case_sensitive=False))
def get_role_managers(
        role_id,
        limit,
        before,
        after,
        doc,
        login_as,
):
    login_as_internal(login_as)
    if doc:
        click.echo(admin_get_role_managers_v3.__doc__)
    result, error = admin_get_role_managers_v3(
        role_id=role_id,
        limit=limit,
        after=after,
        before=before,
    )
    if error:
        raise Exception(str(error))
    click.echo("Get role managers success.")
    click.echo(yaml.safe_dump(result.to_dict()))

import yaml

import click

from accelbyte_py_sdk.api.iam import admin_get_role_managers_v3

from ._utils import login_as as login_as_internal


@click.command()
@click.argument("role_id")
@click.argument("limit", type=int)
@click.argument("before")
@click.argument("after")
@click.option("--doc", type=bool)
@click.option("--login_as", type=click.Choice(["client", "user"], case_sensitive=False))
def get_role_managers(
        role_id,
        limit,
        before,
        after,
        doc,
        login_as,
):
    login_as_internal(login_as)
    if doc:
        click.echo(admin_get_role_managers_v3.__doc__)
    result, error = admin_get_role_managers_v3(
        role_id=role_id,
        limit=limit,
        after=after,
        before=before,
    )
    if error:
        raise Exception(str(error))
    click.echo("Get role managers success.")
    click.echo(yaml.safe_dump(result.to_dict()))