# 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

__all__ = [
    'GetScheduleResult',
    'AwaitableGetScheduleResult',
    'get_schedule',
    'get_schedule_output',
]

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

    @property
    @pulumi.getter
    def description(self) -> Optional[str]:
        """
        Timezone of schedule. Please look at [Supported Timezone Ids](https://docs.opsgenie.com/docs/supported-timezone-ids) for available timezones - Default: `America/New_York`.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def enabled(self) -> Optional[bool]:
        """
        Enable/disable state of schedule
        """
        return pulumi.get(self, "enabled")

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

    @property
    @pulumi.getter(name="ownerTeamId")
    def owner_team_id(self) -> Optional[str]:
        """
        Owner team id of the schedule.
        """
        return pulumi.get(self, "owner_team_id")

    @property
    @pulumi.getter
    def timezone(self) -> Optional[str]:
        """
        The description of schedule.
        """
        return pulumi.get(self, "timezone")


class AwaitableGetScheduleResult(GetScheduleResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetScheduleResult(
            description=self.description,
            enabled=self.enabled,
            id=self.id,
            name=self.name,
            owner_team_id=self.owner_team_id,
            timezone=self.timezone)


def get_schedule(description: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 name: Optional[str] = None,
                 owner_team_id: Optional[str] = None,
                 timezone: Optional[str] = None,
                 opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetScheduleResult:
    """
    Manages a Schedule within Opsgenie.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_opsgenie as opsgenie

    test = opsgenie.get_schedule(name="sre-team schedule")
    ```


    :param str description: Timezone of schedule. Please look at [Supported Timezone Ids](https://docs.opsgenie.com/docs/supported-timezone-ids) for available timezones - Default: `America/New_York`.
    :param bool enabled: Enable/disable state of schedule
    :param str name: Name of the schedule.
    :param str owner_team_id: Owner team id of the schedule.
    :param str timezone: The description of schedule.
    """
    __args__ = dict()
    __args__['description'] = description
    __args__['enabled'] = enabled
    __args__['name'] = name
    __args__['ownerTeamId'] = owner_team_id
    __args__['timezone'] = timezone
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('opsgenie:index/getSchedule:getSchedule', __args__, opts=opts, typ=GetScheduleResult).value

    return AwaitableGetScheduleResult(
        description=pulumi.get(__ret__, 'description'),
        enabled=pulumi.get(__ret__, 'enabled'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        owner_team_id=pulumi.get(__ret__, 'owner_team_id'),
        timezone=pulumi.get(__ret__, 'timezone'))


@_utilities.lift_output_func(get_schedule)
def get_schedule_output(description: Optional[pulumi.Input[Optional[str]]] = None,
                        enabled: Optional[pulumi.Input[Optional[bool]]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        owner_team_id: Optional[pulumi.Input[Optional[str]]] = None,
                        timezone: Optional[pulumi.Input[Optional[str]]] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetScheduleResult]:
    """
    Manages a Schedule within Opsgenie.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_opsgenie as opsgenie

    test = opsgenie.get_schedule(name="sre-team schedule")
    ```


    :param str description: Timezone of schedule. Please look at [Supported Timezone Ids](https://docs.opsgenie.com/docs/supported-timezone-ids) for available timezones - Default: `America/New_York`.
    :param bool enabled: Enable/disable state of schedule
    :param str name: Name of the schedule.
    :param str owner_team_id: Owner team id of the schedule.
    :param str timezone: The description of schedule.
    """
    ...
