# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230401

from __future__ import print_function
import click
import oci  # noqa: F401
import six  # noqa: F401
import sys  # noqa: F401
from oci_cli import cli_constants  # noqa: F401
from oci_cli import cli_util
from oci_cli import json_skeleton_utils
from oci_cli import custom_types  # noqa: F401
from oci_cli.aliasing import CommandGroupWithAlias
from services.tenant_manager_control_plane.src.oci_cli_tenant_manager_control_plane.generated import organizations_service_cli


@click.command(cli_util.override('link_features.link_features_root_group.command_name', 'link-features'), cls=CommandGroupWithAlias, help=cli_util.override('link_features.link_features_root_group.help', """Use the Organizations API to consolidate multiple OCI tenancies into an organization, and centrally manage your tenancies and organization resources. For more information, see [Organization Management Overview]."""), short_help=cli_util.override('link_features.link_features_root_group.short_help', """Organizations API"""))
@cli_util.help_option_group
def link_features_root_group():
    pass


@click.command(cli_util.override('link_features.link_features_collection_group.command_name', 'link-features-collection'), cls=CommandGroupWithAlias, help="""Result of a query request for a list of link features. Contains LinkFeature items.""")
@cli_util.help_option_group
def link_features_collection_group():
    pass


organizations_service_cli.organizations_service_group.add_command(link_features_root_group)
link_features_root_group.add_command(link_features_collection_group)


@link_features_collection_group.command(name=cli_util.override('link_features.list_link_features.command_name', 'list-link-features'), help=u"""Return a list of link features. \n[Command Reference](listLinkFeatures)""")
@cli_util.option('--compartment-id', required=True, help=u"""The ID of the compartment in which to list resources.""")
@cli_util.option('--all', 'all_pages', is_flag=True, help="""Fetches all pages of results.""")
@json_skeleton_utils.get_cli_json_input_option({})
@cli_util.help_option
@click.pass_context
@json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={}, output_type={'module': 'tenant_manager_control_plane', 'class': 'LinkFeaturesCollection'})
@cli_util.wrap_exceptions
def list_link_features(ctx, from_json, all_pages, compartment_id):

    kwargs = {}
    kwargs['opc_request_id'] = cli_util.use_or_generate_request_id(ctx.obj['request_id'])
    client = cli_util.build_client('tenant_manager_control_plane', 'link_features', ctx)
    result = client.list_link_features(
        compartment_id=compartment_id,
        **kwargs
    )
    cli_util.render_response(result, ctx)
