# 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

__all__ = [
    'ServiceCor',
    'ServiceFeature',
    'ServiceSku',
    'ServiceUpstreamEndpoint',
]

@pulumi.output_type
class ServiceCor(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "allowedOrigins":
            suggest = "allowed_origins"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ServiceCor. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ServiceCor.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ServiceCor.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 allowed_origins: Sequence[str]):
        """
        :param Sequence[str] allowed_origins: A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
        """
        pulumi.set(__self__, "allowed_origins", allowed_origins)

    @property
    @pulumi.getter(name="allowedOrigins")
    def allowed_origins(self) -> Sequence[str]:
        """
        A list of origins which should be able to make cross-origin calls. `*` can be used to allow all calls.
        """
        return pulumi.get(self, "allowed_origins")


@pulumi.output_type
class ServiceFeature(dict):
    def __init__(__self__, *,
                 flag: str,
                 value: str):
        """
        :param str flag: The kind of Feature. Possible values are `EnableConnectivityLogs`, `EnableMessagingLogs`, and `ServiceMode`.
        :param str value: A value of a feature flag. Possible values are `Classic`, `Default` and `Serverless`.
        """
        pulumi.set(__self__, "flag", flag)
        pulumi.set(__self__, "value", value)

    @property
    @pulumi.getter
    def flag(self) -> str:
        """
        The kind of Feature. Possible values are `EnableConnectivityLogs`, `EnableMessagingLogs`, and `ServiceMode`.
        """
        return pulumi.get(self, "flag")

    @property
    @pulumi.getter
    def value(self) -> str:
        """
        A value of a feature flag. Possible values are `Classic`, `Default` and `Serverless`.
        """
        return pulumi.get(self, "value")


@pulumi.output_type
class ServiceSku(dict):
    def __init__(__self__, *,
                 capacity: int,
                 name: str):
        """
        :param int capacity: Specifies the number of units associated with this SignalR service. Valid values are `1`, `2`, `5`, `10`, `20`, `50` and `100`.
        :param str name: Specifies which tier to use. Valid values are `Free_F1` and `Standard_S1`.
        """
        pulumi.set(__self__, "capacity", capacity)
        pulumi.set(__self__, "name", name)

    @property
    @pulumi.getter
    def capacity(self) -> int:
        """
        Specifies the number of units associated with this SignalR service. Valid values are `1`, `2`, `5`, `10`, `20`, `50` and `100`.
        """
        return pulumi.get(self, "capacity")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        Specifies which tier to use. Valid values are `Free_F1` and `Standard_S1`.
        """
        return pulumi.get(self, "name")


@pulumi.output_type
class ServiceUpstreamEndpoint(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "categoryPatterns":
            suggest = "category_patterns"
        elif key == "eventPatterns":
            suggest = "event_patterns"
        elif key == "hubPatterns":
            suggest = "hub_patterns"
        elif key == "urlTemplate":
            suggest = "url_template"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ServiceUpstreamEndpoint. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ServiceUpstreamEndpoint.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ServiceUpstreamEndpoint.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 category_patterns: Sequence[str],
                 event_patterns: Sequence[str],
                 hub_patterns: Sequence[str],
                 url_template: str):
        """
        :param Sequence[str] category_patterns: The categories to match on, or `*` for all.
        :param Sequence[str] event_patterns: The events to match on, or `*` for all.
        :param Sequence[str] hub_patterns: The hubs to match on, or `*` for all.
        :param str url_template: The upstream URL Template. This can be a url or a template such as `http://host.com/{hub}/api/{category}/{event}`.
        """
        pulumi.set(__self__, "category_patterns", category_patterns)
        pulumi.set(__self__, "event_patterns", event_patterns)
        pulumi.set(__self__, "hub_patterns", hub_patterns)
        pulumi.set(__self__, "url_template", url_template)

    @property
    @pulumi.getter(name="categoryPatterns")
    def category_patterns(self) -> Sequence[str]:
        """
        The categories to match on, or `*` for all.
        """
        return pulumi.get(self, "category_patterns")

    @property
    @pulumi.getter(name="eventPatterns")
    def event_patterns(self) -> Sequence[str]:
        """
        The events to match on, or `*` for all.
        """
        return pulumi.get(self, "event_patterns")

    @property
    @pulumi.getter(name="hubPatterns")
    def hub_patterns(self) -> Sequence[str]:
        """
        The hubs to match on, or `*` for all.
        """
        return pulumi.get(self, "hub_patterns")

    @property
    @pulumi.getter(name="urlTemplate")
    def url_template(self) -> str:
        """
        The upstream URL Template. This can be a url or a template such as `http://host.com/{hub}/api/{category}/{event}`.
        """
        return pulumi.get(self, "url_template")


