# 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 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__ = ['MonitoringPolicyArgs', 'MonitoringPolicy']

@pulumi.input_type
class MonitoringPolicyArgs:
    def __init__(__self__, *,
                 agent: pulumi.Input[bool],
                 thresholds: pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyThresholdArgs']]],
                 description: Optional[pulumi.Input[str]] = None,
                 email: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ports: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyPortArgs']]]] = None,
                 processes: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyProcessArgs']]]] = None):
        """
        The set of arguments for constructing a MonitoringPolicy resource.
        """
        pulumi.set(__self__, "agent", agent)
        pulumi.set(__self__, "thresholds", thresholds)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if email is not None:
            pulumi.set(__self__, "email", email)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if ports is not None:
            pulumi.set(__self__, "ports", ports)
        if processes is not None:
            pulumi.set(__self__, "processes", processes)

    @property
    @pulumi.getter
    def agent(self) -> pulumi.Input[bool]:
        return pulumi.get(self, "agent")

    @agent.setter
    def agent(self, value: pulumi.Input[bool]):
        pulumi.set(self, "agent", value)

    @property
    @pulumi.getter
    def thresholds(self) -> pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyThresholdArgs']]]:
        return pulumi.get(self, "thresholds")

    @thresholds.setter
    def thresholds(self, value: pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyThresholdArgs']]]):
        pulumi.set(self, "thresholds", value)

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

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def email(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "email")

    @email.setter
    def email(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "email", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def ports(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyPortArgs']]]]:
        return pulumi.get(self, "ports")

    @ports.setter
    def ports(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyPortArgs']]]]):
        pulumi.set(self, "ports", value)

    @property
    @pulumi.getter
    def processes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyProcessArgs']]]]:
        return pulumi.get(self, "processes")

    @processes.setter
    def processes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyProcessArgs']]]]):
        pulumi.set(self, "processes", value)


@pulumi.input_type
class _MonitoringPolicyState:
    def __init__(__self__, *,
                 agent: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 email: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ports: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyPortArgs']]]] = None,
                 processes: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyProcessArgs']]]] = None,
                 thresholds: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyThresholdArgs']]]] = None):
        """
        Input properties used for looking up and filtering MonitoringPolicy resources.
        """
        if agent is not None:
            pulumi.set(__self__, "agent", agent)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if email is not None:
            pulumi.set(__self__, "email", email)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if ports is not None:
            pulumi.set(__self__, "ports", ports)
        if processes is not None:
            pulumi.set(__self__, "processes", processes)
        if thresholds is not None:
            pulumi.set(__self__, "thresholds", thresholds)

    @property
    @pulumi.getter
    def agent(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "agent")

    @agent.setter
    def agent(self, value: Optional[pulumi.Input[bool]]):
        pulumi.set(self, "agent", value)

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

    @description.setter
    def description(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter
    def email(self) -> Optional[pulumi.Input[str]]:
        return pulumi.get(self, "email")

    @email.setter
    def email(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "email", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def ports(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyPortArgs']]]]:
        return pulumi.get(self, "ports")

    @ports.setter
    def ports(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyPortArgs']]]]):
        pulumi.set(self, "ports", value)

    @property
    @pulumi.getter
    def processes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyProcessArgs']]]]:
        return pulumi.get(self, "processes")

    @processes.setter
    def processes(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyProcessArgs']]]]):
        pulumi.set(self, "processes", value)

    @property
    @pulumi.getter
    def thresholds(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyThresholdArgs']]]]:
        return pulumi.get(self, "thresholds")

    @thresholds.setter
    def thresholds(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MonitoringPolicyThresholdArgs']]]]):
        pulumi.set(self, "thresholds", value)


class MonitoringPolicy(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 agent: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 email: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyPortArgs']]]]] = None,
                 processes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyProcessArgs']]]]] = None,
                 thresholds: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyThresholdArgs']]]]] = None,
                 __props__=None):
        """
        Create a MonitoringPolicy resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: MonitoringPolicyArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a MonitoringPolicy resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param MonitoringPolicyArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(MonitoringPolicyArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 agent: Optional[pulumi.Input[bool]] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 email: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyPortArgs']]]]] = None,
                 processes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyProcessArgs']]]]] = None,
                 thresholds: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyThresholdArgs']]]]] = None,
                 __props__=None):
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = _utilities.get_version()
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = MonitoringPolicyArgs.__new__(MonitoringPolicyArgs)

            if agent is None and not opts.urn:
                raise TypeError("Missing required property 'agent'")
            __props__.__dict__["agent"] = agent
            __props__.__dict__["description"] = description
            __props__.__dict__["email"] = email
            __props__.__dict__["name"] = name
            __props__.__dict__["ports"] = ports
            __props__.__dict__["processes"] = processes
            if thresholds is None and not opts.urn:
                raise TypeError("Missing required property 'thresholds'")
            __props__.__dict__["thresholds"] = thresholds
        super(MonitoringPolicy, __self__).__init__(
            'oneandone:index/monitoringPolicy:MonitoringPolicy',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            agent: Optional[pulumi.Input[bool]] = None,
            description: Optional[pulumi.Input[str]] = None,
            email: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            ports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyPortArgs']]]]] = None,
            processes: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyProcessArgs']]]]] = None,
            thresholds: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['MonitoringPolicyThresholdArgs']]]]] = None) -> 'MonitoringPolicy':
        """
        Get an existing MonitoringPolicy resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _MonitoringPolicyState.__new__(_MonitoringPolicyState)

        __props__.__dict__["agent"] = agent
        __props__.__dict__["description"] = description
        __props__.__dict__["email"] = email
        __props__.__dict__["name"] = name
        __props__.__dict__["ports"] = ports
        __props__.__dict__["processes"] = processes
        __props__.__dict__["thresholds"] = thresholds
        return MonitoringPolicy(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def agent(self) -> pulumi.Output[bool]:
        return pulumi.get(self, "agent")

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

    @property
    @pulumi.getter
    def email(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "email")

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

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

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

    @property
    @pulumi.getter
    def thresholds(self) -> pulumi.Output[Sequence['outputs.MonitoringPolicyThreshold']]:
        return pulumi.get(self, "thresholds")

