# 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__ = ['ContentLibraryItemArgs', 'ContentLibraryItem']

@pulumi.input_type
class ContentLibraryItemArgs:
    def __init__(__self__, *,
                 library_id: pulumi.Input[str],
                 description: Optional[pulumi.Input[str]] = None,
                 file_url: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 source_uuid: Optional[pulumi.Input[str]] = None,
                 type: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a ContentLibraryItem resource.
        :param pulumi.Input[str] library_id: The ID of the content library in which to create the item.
        :param pulumi.Input[str] description: A description for the content library item.
        :param pulumi.Input[str] file_url: File to import as the content library item.
        :param pulumi.Input[str] name: The name of the item to be created in the content library.
        :param pulumi.Input[str] source_uuid: Virtual machine UUID to clone to content library.
        :param pulumi.Input[str] type: Type of content library item.
               One of "ovf", "iso", or "vm-template". Default: `ovf`.
        """
        pulumi.set(__self__, "library_id", library_id)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if file_url is not None:
            pulumi.set(__self__, "file_url", file_url)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if source_uuid is not None:
            pulumi.set(__self__, "source_uuid", source_uuid)
        if type is not None:
            pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter(name="libraryId")
    def library_id(self) -> pulumi.Input[str]:
        """
        The ID of the content library in which to create the item.
        """
        return pulumi.get(self, "library_id")

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

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A description for the content library item.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="fileUrl")
    def file_url(self) -> Optional[pulumi.Input[str]]:
        """
        File to import as the content library item.
        """
        return pulumi.get(self, "file_url")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the item to be created in the content library.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="sourceUuid")
    def source_uuid(self) -> Optional[pulumi.Input[str]]:
        """
        Virtual machine UUID to clone to content library.
        """
        return pulumi.get(self, "source_uuid")

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

    @property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[str]]:
        """
        Type of content library item.
        One of "ovf", "iso", or "vm-template". Default: `ovf`.
        """
        return pulumi.get(self, "type")

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


@pulumi.input_type
class _ContentLibraryItemState:
    def __init__(__self__, *,
                 description: Optional[pulumi.Input[str]] = None,
                 file_url: Optional[pulumi.Input[str]] = None,
                 library_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 source_uuid: Optional[pulumi.Input[str]] = None,
                 type: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering ContentLibraryItem resources.
        :param pulumi.Input[str] description: A description for the content library item.
        :param pulumi.Input[str] file_url: File to import as the content library item.
        :param pulumi.Input[str] library_id: The ID of the content library in which to create the item.
        :param pulumi.Input[str] name: The name of the item to be created in the content library.
        :param pulumi.Input[str] source_uuid: Virtual machine UUID to clone to content library.
        :param pulumi.Input[str] type: Type of content library item.
               One of "ovf", "iso", or "vm-template". Default: `ovf`.
        """
        if description is not None:
            pulumi.set(__self__, "description", description)
        if file_url is not None:
            pulumi.set(__self__, "file_url", file_url)
        if library_id is not None:
            pulumi.set(__self__, "library_id", library_id)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if source_uuid is not None:
            pulumi.set(__self__, "source_uuid", source_uuid)
        if type is not None:
            pulumi.set(__self__, "type", type)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[str]]:
        """
        A description for the content library item.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter(name="fileUrl")
    def file_url(self) -> Optional[pulumi.Input[str]]:
        """
        File to import as the content library item.
        """
        return pulumi.get(self, "file_url")

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

    @property
    @pulumi.getter(name="libraryId")
    def library_id(self) -> Optional[pulumi.Input[str]]:
        """
        The ID of the content library in which to create the item.
        """
        return pulumi.get(self, "library_id")

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

    @property
    @pulumi.getter
    def name(self) -> Optional[pulumi.Input[str]]:
        """
        The name of the item to be created in the content library.
        """
        return pulumi.get(self, "name")

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

    @property
    @pulumi.getter(name="sourceUuid")
    def source_uuid(self) -> Optional[pulumi.Input[str]]:
        """
        Virtual machine UUID to clone to content library.
        """
        return pulumi.get(self, "source_uuid")

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

    @property
    @pulumi.getter
    def type(self) -> Optional[pulumi.Input[str]]:
        """
        Type of content library item.
        One of "ovf", "iso", or "vm-template". Default: `ovf`.
        """
        return pulumi.get(self, "type")

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


class ContentLibraryItem(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[str]] = None,
                 file_url: Optional[pulumi.Input[str]] = None,
                 library_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 source_uuid: Optional[pulumi.Input[str]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Create a ContentLibraryItem 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[str] description: A description for the content library item.
        :param pulumi.Input[str] file_url: File to import as the content library item.
        :param pulumi.Input[str] library_id: The ID of the content library in which to create the item.
        :param pulumi.Input[str] name: The name of the item to be created in the content library.
        :param pulumi.Input[str] source_uuid: Virtual machine UUID to clone to content library.
        :param pulumi.Input[str] type: Type of content library item.
               One of "ovf", "iso", or "vm-template". Default: `ovf`.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ContentLibraryItemArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Create a ContentLibraryItem resource with the given unique name, props, and options.
        :param str resource_name: The name of the resource.
        :param ContentLibraryItemArgs 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(ContentLibraryItemArgs, 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,
                 description: Optional[pulumi.Input[str]] = None,
                 file_url: Optional[pulumi.Input[str]] = None,
                 library_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 source_uuid: Optional[pulumi.Input[str]] = None,
                 type: 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__ = ContentLibraryItemArgs.__new__(ContentLibraryItemArgs)

            __props__.__dict__["description"] = description
            __props__.__dict__["file_url"] = file_url
            if library_id is None and not opts.urn:
                raise TypeError("Missing required property 'library_id'")
            __props__.__dict__["library_id"] = library_id
            __props__.__dict__["name"] = name
            __props__.__dict__["source_uuid"] = source_uuid
            __props__.__dict__["type"] = type
        super(ContentLibraryItem, __self__).__init__(
            'vsphere:index/contentLibraryItem:ContentLibraryItem',
            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_url: Optional[pulumi.Input[str]] = None,
            library_id: Optional[pulumi.Input[str]] = None,
            name: Optional[pulumi.Input[str]] = None,
            source_uuid: Optional[pulumi.Input[str]] = None,
            type: Optional[pulumi.Input[str]] = None) -> 'ContentLibraryItem':
        """
        Get an existing ContentLibraryItem 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: A description for the content library item.
        :param pulumi.Input[str] file_url: File to import as the content library item.
        :param pulumi.Input[str] library_id: The ID of the content library in which to create the item.
        :param pulumi.Input[str] name: The name of the item to be created in the content library.
        :param pulumi.Input[str] source_uuid: Virtual machine UUID to clone to content library.
        :param pulumi.Input[str] type: Type of content library item.
               One of "ovf", "iso", or "vm-template". Default: `ovf`.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ContentLibraryItemState.__new__(_ContentLibraryItemState)

        __props__.__dict__["description"] = description
        __props__.__dict__["file_url"] = file_url
        __props__.__dict__["library_id"] = library_id
        __props__.__dict__["name"] = name
        __props__.__dict__["source_uuid"] = source_uuid
        __props__.__dict__["type"] = type
        return ContentLibraryItem(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[Optional[str]]:
        """
        A description for the content library item.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="fileUrl")
    def file_url(self) -> pulumi.Output[Optional[str]]:
        """
        File to import as the content library item.
        """
        return pulumi.get(self, "file_url")

    @property
    @pulumi.getter(name="libraryId")
    def library_id(self) -> pulumi.Output[str]:
        """
        The ID of the content library in which to create the item.
        """
        return pulumi.get(self, "library_id")

    @property
    @pulumi.getter
    def name(self) -> pulumi.Output[str]:
        """
        The name of the item to be created in the content library.
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="sourceUuid")
    def source_uuid(self) -> pulumi.Output[Optional[str]]:
        """
        Virtual machine UUID to clone to content library.
        """
        return pulumi.get(self, "source_uuid")

    @property
    @pulumi.getter
    def type(self) -> pulumi.Output[Optional[str]]:
        """
        Type of content library item.
        One of "ovf", "iso", or "vm-template". Default: `ovf`.
        """
        return pulumi.get(self, "type")

