# 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__ = ['RepositoryArgs', 'Repository']

@pulumi.input_type
class RepositoryArgs:
    def __init__(__self__, *,
                 handle: pulumi.Input[str],
                 node: pulumi.Input[str]):
        """
        The set of arguments for constructing a Repository resource.
        :param pulumi.Input[str] handle: The handle of the APT standard repository. Must be `ceph-quincy-enterprise` | `ceph-quincy-no-subscription` | `ceph-quincy-test` | `ceph-reef-enterprise` | `ceph-reef-no-subscription` | `ceph-reef-test` | `enterprise` | `no-subscription` | `test`.
        :param pulumi.Input[str] node: The name of the target Proxmox VE node.
        """
        pulumi.set(__self__, "handle", handle)
        pulumi.set(__self__, "node", node)

    @property
    @pulumi.getter
    def handle(self) -> pulumi.Input[str]:
        """
        The handle of the APT standard repository. Must be `ceph-quincy-enterprise` | `ceph-quincy-no-subscription` | `ceph-quincy-test` | `ceph-reef-enterprise` | `ceph-reef-no-subscription` | `ceph-reef-test` | `enterprise` | `no-subscription` | `test`.
        """
        return pulumi.get(self, "handle")

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

    @property
    @pulumi.getter
    def node(self) -> pulumi.Input[str]:
        """
        The name of the target Proxmox VE node.
        """
        return pulumi.get(self, "node")

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


@pulumi.input_type
class _RepositoryState:
    def __init__(__self__, *,
                 description: Optional[pulumi.Input[str]] = None,
                 file_path: Optional[pulumi.Input[str]] = None,
                 handle: Optional[pulumi.Input[str]] = None,
                 index: Optional[pulumi.Input[int]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 node: Optional[pulumi.Input[str]] = None,
                 status: Optional[pulumi.Input[int]] = None):
        """
        Input properties used for looking up and filtering Repository resources.
        :param pulumi.Input[str] description: The description of the APT standard repository.
        :param pulumi.Input[str] file_path: The absolute path of the source list file that contains this standard repository.
        :param pulumi.Input[str] handle: The handle of the APT standard repository. Must be `ceph-quincy-enterprise` | `ceph-quincy-no-subscription` | `ceph-quincy-test` | `ceph-reef-enterprise` | `ceph-reef-no-subscription` | `ceph-reef-test` | `enterprise` | `no-subscription` | `test`.
        :param pulumi.Input[int] index: The index within the defining source list file.
        :param pulumi.Input[str] name: The name of the APT standard repository.
        :param pulumi.Input[str] node: The name of the target Proxmox VE node.
        :param pulumi.Input[int] status: Indicates the activation status.
        """
        if description is not None:
            pulumi.set(__self__, "description", description)
        if file_path is not None:
            pulumi.set(__self__, "file_path", file_path)
        if handle is not None:
            pulumi.set(__self__, "handle", handle)
        if index is not None:
            pulumi.set(__self__, "index", index)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if node is not None:
            pulumi.set(__self__, "node", node)
        if status is not None:
            pulumi.set(__self__, "status", status)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        The description of the APT standard repository.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="filePath")
    def file_path(self) -> Optional[pulumi.Input[str]]:
        """
        The absolute path of the source list file that contains this standard repository.
        """
        return pulumi.get(self, "file_path")

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

    @property
    @pulumi.getter
    def handle(self) -> Optional[pulumi.Input[str]]:
        """
        The handle of the APT standard repository. Must be `ceph-quincy-enterprise` | `ceph-quincy-no-subscription` | `ceph-quincy-test` | `ceph-reef-enterprise` | `ceph-reef-no-subscription` | `ceph-reef-test` | `enterprise` | `no-subscription` | `test`.
        """
        return pulumi.get(self, "handle")

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

    @property
    @pulumi.getter
    def index(self) -> Optional[pulumi.Input[int]]:
        """
        The index within the defining source list file.
        """
        return pulumi.get(self, "index")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the APT standard repository.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter
    def node(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the target Proxmox VE node.
        """
        return pulumi.get(self, "node")

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

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[int]]:
        """
        Indicates the activation status.
        """
        return pulumi.get(self, "status")

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


class Repository(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 handle: Optional[pulumi.Input[str]] = None,
                 node: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Manages an APT standard repository of a Proxmox VE node.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_proxmoxve as proxmoxve

        example_repository = proxmoxve.apt.standard.Repository("exampleRepository",
            handle="no-subscription",
            node="pve")
        example_apt_repository_repository = proxmoxve.apt.Repository("exampleApt/repositoryRepository",
            enabled=True,
            file_path=example_repository.file_path,
            index=example_repository.index,
            node=example_repository.node)
        ```

        ## Import

        #!/usr/bin/env sh

        An APT standard repository can be imported using a comma-separated list consisting of the name of the Proxmox VE node,

        and the standard repository handle in the exact same order, e.g.:

        ```sh
        $ pulumi import proxmoxve:Apt/standard/repository:Repository example pve,no-subscription
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] handle: The handle of the APT standard repository. Must be `ceph-quincy-enterprise` | `ceph-quincy-no-subscription` | `ceph-quincy-test` | `ceph-reef-enterprise` | `ceph-reef-no-subscription` | `ceph-reef-test` | `enterprise` | `no-subscription` | `test`.
        :param pulumi.Input[str] node: The name of the target Proxmox VE node.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: RepositoryArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages an APT standard repository of a Proxmox VE node.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_proxmoxve as proxmoxve

        example_repository = proxmoxve.apt.standard.Repository("exampleRepository",
            handle="no-subscription",
            node="pve")
        example_apt_repository_repository = proxmoxve.apt.Repository("exampleApt/repositoryRepository",
            enabled=True,
            file_path=example_repository.file_path,
            index=example_repository.index,
            node=example_repository.node)
        ```

        ## Import

        #!/usr/bin/env sh

        An APT standard repository can be imported using a comma-separated list consisting of the name of the Proxmox VE node,

        and the standard repository handle in the exact same order, e.g.:

        ```sh
        $ pulumi import proxmoxve:Apt/standard/repository:Repository example pve,no-subscription
        ```

        :param str resource_name: The name of the resource.
        :param RepositoryArgs 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(RepositoryArgs, 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,
                 handle: Optional[pulumi.Input[str]] = None,
                 node: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        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__ = RepositoryArgs.__new__(RepositoryArgs)

            if handle is None and not opts.urn:
                raise TypeError("Missing required property 'handle'")
            __props__.__dict__["handle"] = handle
            if node is None and not opts.urn:
                raise TypeError("Missing required property 'node'")
            __props__.__dict__["node"] = node
            __props__.__dict__["description"] = None
            __props__.__dict__["file_path"] = None
            __props__.__dict__["index"] = None
            __props__.__dict__["name"] = None
            __props__.__dict__["status"] = None
        super(Repository, __self__).__init__(
            'proxmoxve:Apt/standard/repository:Repository',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            description: Optional[pulumi.Input[str]] = None,
            file_path: Optional[pulumi.Input[str]] = None,
            handle: Optional[pulumi.Input[str]] = None,
            index: Optional[pulumi.Input[int]] = None,
            name: Optional[pulumi.Input[str]] = None,
            node: Optional[pulumi.Input[str]] = None,
            status: Optional[pulumi.Input[int]] = None) -> 'Repository':
        """
        Get an existing Repository 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.
        :param pulumi.Input[str] description: The description of the APT standard repository.
        :param pulumi.Input[str] file_path: The absolute path of the source list file that contains this standard repository.
        :param pulumi.Input[str] handle: The handle of the APT standard repository. Must be `ceph-quincy-enterprise` | `ceph-quincy-no-subscription` | `ceph-quincy-test` | `ceph-reef-enterprise` | `ceph-reef-no-subscription` | `ceph-reef-test` | `enterprise` | `no-subscription` | `test`.
        :param pulumi.Input[int] index: The index within the defining source list file.
        :param pulumi.Input[str] name: The name of the APT standard repository.
        :param pulumi.Input[str] node: The name of the target Proxmox VE node.
        :param pulumi.Input[int] status: Indicates the activation status.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _RepositoryState.__new__(_RepositoryState)

        __props__.__dict__["description"] = description
        __props__.__dict__["file_path"] = file_path
        __props__.__dict__["handle"] = handle
        __props__.__dict__["index"] = index
        __props__.__dict__["name"] = name
        __props__.__dict__["node"] = node
        __props__.__dict__["status"] = status
        return Repository(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[str]:
        """
        The description of the APT standard repository.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="filePath")
    def file_path(self) -> pulumi.Output[str]:
        """
        The absolute path of the source list file that contains this standard repository.
        """
        return pulumi.get(self, "file_path")

    @property
    @pulumi.getter
    def handle(self) -> pulumi.Output[str]:
        """
        The handle of the APT standard repository. Must be `ceph-quincy-enterprise` | `ceph-quincy-no-subscription` | `ceph-quincy-test` | `ceph-reef-enterprise` | `ceph-reef-no-subscription` | `ceph-reef-test` | `enterprise` | `no-subscription` | `test`.
        """
        return pulumi.get(self, "handle")

    @property
    @pulumi.getter
    def index(self) -> pulumi.Output[int]:
        """
        The index within the defining source list file.
        """
        return pulumi.get(self, "index")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The name of the APT standard repository.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def node(self) -> pulumi.Output[str]:
        """
        The name of the target Proxmox VE node.
        """
        return pulumi.get(self, "node")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[int]:
        """
        Indicates the activation status.
        """
        return pulumi.get(self, "status")

