# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetTablesResult',
    'AwaitableGetTablesResult',
    'get_tables',
    'get_tables_output',
]

@pulumi.output_type
class GetTablesResult:
    """
    A collection of values returned by getTables.
    """
    def __init__(__self__, compartment_id=None, filters=None, id=None, name=None, state=None, table_collections=None):
        if compartment_id and not isinstance(compartment_id, str):
            raise TypeError("Expected argument 'compartment_id' to be a str")
        pulumi.set(__self__, "compartment_id", compartment_id)
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)
        if table_collections and not isinstance(table_collections, list):
            raise TypeError("Expected argument 'table_collections' to be a list")
        pulumi.set(__self__, "table_collections", table_collections)

    @property
    @pulumi.getter(name="compartmentId")
    def compartment_id(self) -> str:
        """
        Compartment Identifier.
        """
        return pulumi.get(self, "compartment_id")

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetTablesFilterResult']]:
        return pulumi.get(self, "filters")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        """
        Human-friendly table name, immutable.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def state(self) -> Optional[str]:
        """
        The state of a table.
        """
        return pulumi.get(self, "state")

    @property
    @pulumi.getter(name="tableCollections")
    def table_collections(self) -> Sequence['outputs.GetTablesTableCollectionResult']:
        """
        The list of table_collection.
        """
        return pulumi.get(self, "table_collections")


class AwaitableGetTablesResult(GetTablesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetTablesResult(
            compartment_id=self.compartment_id,
            filters=self.filters,
            id=self.id,
            name=self.name,
            state=self.state,
            table_collections=self.table_collections)


def get_tables(compartment_id: Optional[str] = None,
               filters: Optional[Sequence[pulumi.InputType['GetTablesFilterArgs']]] = None,
               name: Optional[str] = None,
               state: Optional[str] = None,
               opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTablesResult:
    """
    This data source provides the list of Tables in Oracle Cloud Infrastructure NoSQL Database service.

    Get a list of tables in a compartment.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_tables = oci.Nosql.get_tables(compartment_id=var["compartment_id"],
        name=var["table_name"],
        state=var["table_state"])
    ```


    :param str compartment_id: The ID of a table's compartment.
    :param str name: A shell-globbing-style (*?[]) filter for names.
    :param str state: Filter list by the lifecycle state of the item.
    """
    __args__ = dict()
    __args__['compartmentId'] = compartment_id
    __args__['filters'] = filters
    __args__['name'] = name
    __args__['state'] = state
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:Nosql/getTables:getTables', __args__, opts=opts, typ=GetTablesResult).value

    return AwaitableGetTablesResult(
        compartment_id=__ret__.compartment_id,
        filters=__ret__.filters,
        id=__ret__.id,
        name=__ret__.name,
        state=__ret__.state,
        table_collections=__ret__.table_collections)


@_utilities.lift_output_func(get_tables)
def get_tables_output(compartment_id: Optional[pulumi.Input[str]] = None,
                      filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetTablesFilterArgs']]]]] = None,
                      name: Optional[pulumi.Input[Optional[str]]] = None,
                      state: Optional[pulumi.Input[Optional[str]]] = None,
                      opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetTablesResult]:
    """
    This data source provides the list of Tables in Oracle Cloud Infrastructure NoSQL Database service.

    Get a list of tables in a compartment.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_tables = oci.Nosql.get_tables(compartment_id=var["compartment_id"],
        name=var["table_name"],
        state=var["table_state"])
    ```


    :param str compartment_id: The ID of a table's compartment.
    :param str name: A shell-globbing-style (*?[]) filter for names.
    :param str state: Filter list by the lifecycle state of the item.
    """
    ...
