# 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

__all__ = [
    'GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult',
    'AwaitableGetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult',
    'get_managed_database_sql_tuning_advisor_tasks_summary_report',
    'get_managed_database_sql_tuning_advisor_tasks_summary_report_output',
]

@pulumi.output_type
class GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult:
    """
    A collection of values returned by getManagedDatabaseSqlTuningAdvisorTasksSummaryReport.
    """
    def __init__(__self__, begin_exec_id_greater_than_or_equal_to=None, end_exec_id_less_than_or_equal_to=None, id=None, index_findings=None, managed_database_id=None, object_stat_findings=None, search_period=None, sql_tuning_advisor_task_id=None, statistics=None, task_infos=None, time_greater_than_or_equal_to=None, time_less_than_or_equal_to=None):
        if begin_exec_id_greater_than_or_equal_to and not isinstance(begin_exec_id_greater_than_or_equal_to, str):
            raise TypeError("Expected argument 'begin_exec_id_greater_than_or_equal_to' to be a str")
        pulumi.set(__self__, "begin_exec_id_greater_than_or_equal_to", begin_exec_id_greater_than_or_equal_to)
        if end_exec_id_less_than_or_equal_to and not isinstance(end_exec_id_less_than_or_equal_to, str):
            raise TypeError("Expected argument 'end_exec_id_less_than_or_equal_to' to be a str")
        pulumi.set(__self__, "end_exec_id_less_than_or_equal_to", end_exec_id_less_than_or_equal_to)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if index_findings and not isinstance(index_findings, list):
            raise TypeError("Expected argument 'index_findings' to be a list")
        pulumi.set(__self__, "index_findings", index_findings)
        if managed_database_id and not isinstance(managed_database_id, str):
            raise TypeError("Expected argument 'managed_database_id' to be a str")
        pulumi.set(__self__, "managed_database_id", managed_database_id)
        if object_stat_findings and not isinstance(object_stat_findings, list):
            raise TypeError("Expected argument 'object_stat_findings' to be a list")
        pulumi.set(__self__, "object_stat_findings", object_stat_findings)
        if search_period and not isinstance(search_period, str):
            raise TypeError("Expected argument 'search_period' to be a str")
        pulumi.set(__self__, "search_period", search_period)
        if sql_tuning_advisor_task_id and not isinstance(sql_tuning_advisor_task_id, str):
            raise TypeError("Expected argument 'sql_tuning_advisor_task_id' to be a str")
        pulumi.set(__self__, "sql_tuning_advisor_task_id", sql_tuning_advisor_task_id)
        if statistics and not isinstance(statistics, list):
            raise TypeError("Expected argument 'statistics' to be a list")
        pulumi.set(__self__, "statistics", statistics)
        if task_infos and not isinstance(task_infos, list):
            raise TypeError("Expected argument 'task_infos' to be a list")
        pulumi.set(__self__, "task_infos", task_infos)
        if time_greater_than_or_equal_to and not isinstance(time_greater_than_or_equal_to, str):
            raise TypeError("Expected argument 'time_greater_than_or_equal_to' to be a str")
        pulumi.set(__self__, "time_greater_than_or_equal_to", time_greater_than_or_equal_to)
        if time_less_than_or_equal_to and not isinstance(time_less_than_or_equal_to, str):
            raise TypeError("Expected argument 'time_less_than_or_equal_to' to be a str")
        pulumi.set(__self__, "time_less_than_or_equal_to", time_less_than_or_equal_to)

    @property
    @pulumi.getter(name="beginExecIdGreaterThanOrEqualTo")
    def begin_exec_id_greater_than_or_equal_to(self) -> Optional[str]:
        return pulumi.get(self, "begin_exec_id_greater_than_or_equal_to")

    @property
    @pulumi.getter(name="endExecIdLessThanOrEqualTo")
    def end_exec_id_less_than_or_equal_to(self) -> Optional[str]:
        return pulumi.get(self, "end_exec_id_less_than_or_equal_to")

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

    @property
    @pulumi.getter(name="indexFindings")
    def index_findings(self) -> Sequence['outputs.GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportIndexFindingResult']:
        """
        The list of object findings related to indexes.
        """
        return pulumi.get(self, "index_findings")

    @property
    @pulumi.getter(name="managedDatabaseId")
    def managed_database_id(self) -> str:
        return pulumi.get(self, "managed_database_id")

    @property
    @pulumi.getter(name="objectStatFindings")
    def object_stat_findings(self) -> Sequence['outputs.GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportObjectStatFindingResult']:
        """
        The list of object findings related to statistics.
        """
        return pulumi.get(self, "object_stat_findings")

    @property
    @pulumi.getter(name="searchPeriod")
    def search_period(self) -> Optional[str]:
        return pulumi.get(self, "search_period")

    @property
    @pulumi.getter(name="sqlTuningAdvisorTaskId")
    def sql_tuning_advisor_task_id(self) -> str:
        return pulumi.get(self, "sql_tuning_advisor_task_id")

    @property
    @pulumi.getter
    def statistics(self) -> Sequence['outputs.GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportStatisticResult']:
        """
        The number of distinct SQL statements with stale or missing optimizer statistics recommendations.
        """
        return pulumi.get(self, "statistics")

    @property
    @pulumi.getter(name="taskInfos")
    def task_infos(self) -> Sequence['outputs.GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportTaskInfoResult']:
        """
        The general information regarding the SQL Tuning Advisor task.
        """
        return pulumi.get(self, "task_infos")

    @property
    @pulumi.getter(name="timeGreaterThanOrEqualTo")
    def time_greater_than_or_equal_to(self) -> Optional[str]:
        return pulumi.get(self, "time_greater_than_or_equal_to")

    @property
    @pulumi.getter(name="timeLessThanOrEqualTo")
    def time_less_than_or_equal_to(self) -> Optional[str]:
        return pulumi.get(self, "time_less_than_or_equal_to")


class AwaitableGetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult(GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult(
            begin_exec_id_greater_than_or_equal_to=self.begin_exec_id_greater_than_or_equal_to,
            end_exec_id_less_than_or_equal_to=self.end_exec_id_less_than_or_equal_to,
            id=self.id,
            index_findings=self.index_findings,
            managed_database_id=self.managed_database_id,
            object_stat_findings=self.object_stat_findings,
            search_period=self.search_period,
            sql_tuning_advisor_task_id=self.sql_tuning_advisor_task_id,
            statistics=self.statistics,
            task_infos=self.task_infos,
            time_greater_than_or_equal_to=self.time_greater_than_or_equal_to,
            time_less_than_or_equal_to=self.time_less_than_or_equal_to)


def get_managed_database_sql_tuning_advisor_tasks_summary_report(begin_exec_id_greater_than_or_equal_to: Optional[str] = None,
                                                                 end_exec_id_less_than_or_equal_to: Optional[str] = None,
                                                                 managed_database_id: Optional[str] = None,
                                                                 search_period: Optional[str] = None,
                                                                 sql_tuning_advisor_task_id: Optional[str] = None,
                                                                 time_greater_than_or_equal_to: Optional[str] = None,
                                                                 time_less_than_or_equal_to: Optional[str] = None,
                                                                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult:
    """
    This data source provides details about a specific Managed Database Sql Tuning Advisor Tasks Summary Report resource in Oracle Cloud Infrastructure Database Management service.

    Gets the summary report for the specified SQL Tuning Advisor task.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_managed_database_sql_tuning_advisor_tasks_summary_report = oci.DatabaseManagement.get_managed_database_sql_tuning_advisor_tasks_summary_report(managed_database_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        sql_tuning_advisor_task_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        begin_exec_id_greater_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        end_exec_id_less_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        search_period=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_greater_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_less_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str begin_exec_id_greater_than_or_equal_to: The optional greater than or equal to filter on the execution ID related to a specific SQL Tuning Advisor task. This is applicable only for Auto SQL Tuning tasks.
    :param str end_exec_id_less_than_or_equal_to: The optional less than or equal to query parameter to filter on the execution ID related to a specific SQL Tuning Advisor task. This is applicable only for Auto SQL Tuning tasks.
    :param str managed_database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database.
    :param str search_period: How far back the API will search for begin and end exec id. Unused if neither exec ids nor time filter query params are supplied. This is applicable only for Auto SQL Tuning tasks.
    :param str sql_tuning_advisor_task_id: The SQL tuning task identifier. This is not the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    :param str time_greater_than_or_equal_to: The optional greater than or equal to query parameter to filter the timestamp. This is applicable only for Auto SQL Tuning tasks.
    :param str time_less_than_or_equal_to: The optional less than or equal to query parameter to filter the timestamp. This is applicable only for Auto SQL Tuning tasks.
    """
    __args__ = dict()
    __args__['beginExecIdGreaterThanOrEqualTo'] = begin_exec_id_greater_than_or_equal_to
    __args__['endExecIdLessThanOrEqualTo'] = end_exec_id_less_than_or_equal_to
    __args__['managedDatabaseId'] = managed_database_id
    __args__['searchPeriod'] = search_period
    __args__['sqlTuningAdvisorTaskId'] = sql_tuning_advisor_task_id
    __args__['timeGreaterThanOrEqualTo'] = time_greater_than_or_equal_to
    __args__['timeLessThanOrEqualTo'] = time_less_than_or_equal_to
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:DatabaseManagement/getManagedDatabaseSqlTuningAdvisorTasksSummaryReport:getManagedDatabaseSqlTuningAdvisorTasksSummaryReport', __args__, opts=opts, typ=GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult).value

    return AwaitableGetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult(
        begin_exec_id_greater_than_or_equal_to=__ret__.begin_exec_id_greater_than_or_equal_to,
        end_exec_id_less_than_or_equal_to=__ret__.end_exec_id_less_than_or_equal_to,
        id=__ret__.id,
        index_findings=__ret__.index_findings,
        managed_database_id=__ret__.managed_database_id,
        object_stat_findings=__ret__.object_stat_findings,
        search_period=__ret__.search_period,
        sql_tuning_advisor_task_id=__ret__.sql_tuning_advisor_task_id,
        statistics=__ret__.statistics,
        task_infos=__ret__.task_infos,
        time_greater_than_or_equal_to=__ret__.time_greater_than_or_equal_to,
        time_less_than_or_equal_to=__ret__.time_less_than_or_equal_to)


@_utilities.lift_output_func(get_managed_database_sql_tuning_advisor_tasks_summary_report)
def get_managed_database_sql_tuning_advisor_tasks_summary_report_output(begin_exec_id_greater_than_or_equal_to: Optional[pulumi.Input[Optional[str]]] = None,
                                                                        end_exec_id_less_than_or_equal_to: Optional[pulumi.Input[Optional[str]]] = None,
                                                                        managed_database_id: Optional[pulumi.Input[str]] = None,
                                                                        search_period: Optional[pulumi.Input[Optional[str]]] = None,
                                                                        sql_tuning_advisor_task_id: Optional[pulumi.Input[str]] = None,
                                                                        time_greater_than_or_equal_to: Optional[pulumi.Input[Optional[str]]] = None,
                                                                        time_less_than_or_equal_to: Optional[pulumi.Input[Optional[str]]] = None,
                                                                        opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetManagedDatabaseSqlTuningAdvisorTasksSummaryReportResult]:
    """
    This data source provides details about a specific Managed Database Sql Tuning Advisor Tasks Summary Report resource in Oracle Cloud Infrastructure Database Management service.

    Gets the summary report for the specified SQL Tuning Advisor task.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_managed_database_sql_tuning_advisor_tasks_summary_report = oci.DatabaseManagement.get_managed_database_sql_tuning_advisor_tasks_summary_report(managed_database_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        sql_tuning_advisor_task_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        begin_exec_id_greater_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        end_exec_id_less_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        search_period=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_greater_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        time_less_than_or_equal_to=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str begin_exec_id_greater_than_or_equal_to: The optional greater than or equal to filter on the execution ID related to a specific SQL Tuning Advisor task. This is applicable only for Auto SQL Tuning tasks.
    :param str end_exec_id_less_than_or_equal_to: The optional less than or equal to query parameter to filter on the execution ID related to a specific SQL Tuning Advisor task. This is applicable only for Auto SQL Tuning tasks.
    :param str managed_database_id: The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Managed Database.
    :param str search_period: How far back the API will search for begin and end exec id. Unused if neither exec ids nor time filter query params are supplied. This is applicable only for Auto SQL Tuning tasks.
    :param str sql_tuning_advisor_task_id: The SQL tuning task identifier. This is not the [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
    :param str time_greater_than_or_equal_to: The optional greater than or equal to query parameter to filter the timestamp. This is applicable only for Auto SQL Tuning tasks.
    :param str time_less_than_or_equal_to: The optional less than or equal to query parameter to filter the timestamp. This is applicable only for Auto SQL Tuning tasks.
    """
    ...
