# 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 sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities

__all__ = [
    'GetOncallScheduleResult',
    'AwaitableGetOncallScheduleResult',
    'get_oncall_schedule',
    'get_oncall_schedule_output',
]

warnings.warn("""grafana.index/getoncallschedule.getOncallSchedule has been deprecated in favor of grafana.oncall/getschedule.getSchedule""", DeprecationWarning)

@pulumi.output_type
class GetOncallScheduleResult:
    """
    A collection of values returned by getOncallSchedule.
    """
    def __init__(__self__, id=None, name=None, type=None):
        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 type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)

    @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) -> str:
        """
        The schedule name.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def type(self) -> str:
        """
        The schedule type.
        """
        return pulumi.get(self, "type")


class AwaitableGetOncallScheduleResult(GetOncallScheduleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOncallScheduleResult(
            id=self.id,
            name=self.name,
            type=self.type)


def get_oncall_schedule(name: Optional[str] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOncallScheduleResult:
    """
    * [Official documentation](https://grafana.com/docs/oncall/latest/manage/on-call-schedules/)
    * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/)

    ## Example Usage

    ```python
    import pulumi
    import pulumi_grafana as grafana

    schedule = grafana.onCall.get_schedule(name="example_schedule")
    ```


    :param str name: The schedule name.
    """
    pulumi.log.warn("""get_oncall_schedule is deprecated: grafana.index/getoncallschedule.getOncallSchedule has been deprecated in favor of grafana.oncall/getschedule.getSchedule""")
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('grafana:index/getOncallSchedule:getOncallSchedule', __args__, opts=opts, typ=GetOncallScheduleResult).value

    return AwaitableGetOncallScheduleResult(
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        type=pulumi.get(__ret__, 'type'))
def get_oncall_schedule_output(name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOncallScheduleResult]:
    """
    * [Official documentation](https://grafana.com/docs/oncall/latest/manage/on-call-schedules/)
    * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/schedules/)

    ## Example Usage

    ```python
    import pulumi
    import pulumi_grafana as grafana

    schedule = grafana.onCall.get_schedule(name="example_schedule")
    ```


    :param str name: The schedule name.
    """
    pulumi.log.warn("""get_oncall_schedule is deprecated: grafana.index/getoncallschedule.getOncallSchedule has been deprecated in favor of grafana.oncall/getschedule.getSchedule""")
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('grafana:index/getOncallSchedule:getOncallSchedule', __args__, opts=opts, typ=GetOncallScheduleResult)
    return __ret__.apply(lambda __response__: GetOncallScheduleResult(
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        type=pulumi.get(__response__, 'type')))
