# coding=utf-8
# *** WARNING: this file was generated by Pulumi SDK Generator. ***
# *** 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
import pulumi_azure_native

__all__ = ['ReplicatedRegistryArgs', 'ReplicatedRegistry']

@pulumi.input_type
class ReplicatedRegistryArgs:
    def __init__(__self__, *,
                 name: pulumi.Input[str],
                 replication_location: pulumi.Input[str],
                 resource_group_name: pulumi.Input[str],
                 admin_user_enabled: Optional[pulumi.Input[bool]] = None,
                 sku: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a ReplicatedRegistry resource.
        :param pulumi.Input[str] name: Globally unique name of your azure container registry
        :param pulumi.Input[str] replication_location: The location of the registry replica location
        :param pulumi.Input[str] resource_group_name: The name of the enclosing resource group
        :param pulumi.Input[bool] admin_user_enabled: Enable admin user that has push / pull permissions to the registry
        :param pulumi.Input[str] sku: Tier of your Azure Container Registry. Geo-replication requires the Premium SKU
        """
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "replication_location", replication_location)
        pulumi.set(__self__, "resource_group_name", resource_group_name)
        if admin_user_enabled is not None:
            pulumi.set(__self__, "admin_user_enabled", admin_user_enabled)
        if sku is not None:
            pulumi.set(__self__, "sku", sku)

    @property
    @pulumi.getter
    def name(self) -> pulumi.Input[str]:
        """
        Globally unique name of your azure container registry
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="replicationLocation")
    def replication_location(self) -> pulumi.Input[str]:
        """
        The location of the registry replica location
        """
        return pulumi.get(self, "replication_location")

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

    @property
    @pulumi.getter(name="resourceGroupName")
    def resource_group_name(self) -> pulumi.Input[str]:
        """
        The name of the enclosing resource group
        """
        return pulumi.get(self, "resource_group_name")

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

    @property
    @pulumi.getter(name="adminUserEnabled")
    def admin_user_enabled(self) -> Optional[pulumi.Input[bool]]:
        """
        Enable admin user that has push / pull permissions to the registry
        """
        return pulumi.get(self, "admin_user_enabled")

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

    @property
    @pulumi.getter
    def sku(self) -> Optional[pulumi.Input[str]]:
        """
        Tier of your Azure Container Registry. Geo-replication requires the Premium SKU
        """
        return pulumi.get(self, "sku")

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


class ReplicatedRegistry(pulumi.ComponentResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 admin_user_enabled: Optional[pulumi.Input[bool]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 replication_location: Optional[pulumi.Input[str]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 sku: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Create a ReplicatedRegistry 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.
        :param pulumi.Input[bool] admin_user_enabled: Enable admin user that has push / pull permissions to the registry
        :param pulumi.Input[str] name: Globally unique name of your azure container registry
        :param pulumi.Input[str] replication_location: The location of the registry replica location
        :param pulumi.Input[str] resource_group_name: The name of the enclosing resource group
        :param pulumi.Input[str] sku: Tier of your Azure Container Registry. Geo-replication requires the Premium SKU
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ReplicatedRegistryArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a ReplicatedRegistry resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param ReplicatedRegistryArgs 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(ReplicatedRegistryArgs, 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,
                 admin_user_enabled: Optional[pulumi.Input[bool]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 replication_location: Optional[pulumi.Input[str]] = None,
                 resource_group_name: Optional[pulumi.Input[str]] = None,
                 sku: Optional[pulumi.Input[str]] = 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 not None:
            raise ValueError('ComponentResource classes do not support opts.id')
        else:
            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__ = ReplicatedRegistryArgs.__new__(ReplicatedRegistryArgs)

            __props__.__dict__["admin_user_enabled"] = admin_user_enabled
            if name is None and not opts.urn:
                raise TypeError("Missing required property 'name'")
            __props__.__dict__["name"] = name
            if replication_location is None and not opts.urn:
                raise TypeError("Missing required property 'replication_location'")
            __props__.__dict__["replication_location"] = replication_location
            if resource_group_name is None and not opts.urn:
                raise TypeError("Missing required property 'resource_group_name'")
            __props__.__dict__["resource_group_name"] = resource_group_name
            __props__.__dict__["sku"] = sku
            __props__.__dict__["login_server"] = None
            __props__.__dict__["registry"] = None
            __props__.__dict__["replication"] = None
        super(ReplicatedRegistry, __self__).__init__(
            'azure-quickstart-acr-geo-replication:index:ReplicatedRegistry',
            resource_name,
            __props__,
            opts,
            remote=True)

    @property
    @pulumi.getter(name="loginServer")
    def login_server(self) -> pulumi.Output[str]:
        """
        The login server url
        """
        return pulumi.get(self, "login_server")

    @property
    @pulumi.getter
    def registry(self) -> pulumi.Output['pulumi_azure_native.containerregistry.Registry']:
        """
        The Registry
        """
        return pulumi.get(self, "registry")

    @property
    @pulumi.getter
    def replication(self) -> pulumi.Output['pulumi_azure_native.containerregistry.Replication']:
        """
        The replication policy
        """
        return pulumi.get(self, "replication")

