# 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__ = [
    'FileSourceFile',
    'FileSourceRaw',
]

@pulumi.output_type
class FileSourceFile(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "fileName":
            suggest = "file_name"
        elif key == "minTls":
            suggest = "min_tls"

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

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

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

    def __init__(__self__, *,
                 path: str,
                 changed: Optional[bool] = None,
                 checksum: Optional[str] = None,
                 file_name: Optional[str] = None,
                 insecure: Optional[bool] = None,
                 min_tls: Optional[str] = None):
        """
        :param str path: A path to a local file or a URL.
        :param bool changed: Whether the source file has changed since the last run
        :param str checksum: The SHA256 checksum of the source file.
        :param str file_name: The file name.
        :param bool insecure: Whether to skip the TLS verification step for
               HTTPS sources (defaults to `false`).
        :param str min_tls: The minimum required TLS version for HTTPS
               sources. "Supported values: `1.0|1.1|1.2|1.3` (defaults to `1.3`).
        """
        pulumi.set(__self__, "path", path)
        if changed is not None:
            pulumi.set(__self__, "changed", changed)
        if checksum is not None:
            pulumi.set(__self__, "checksum", checksum)
        if file_name is not None:
            pulumi.set(__self__, "file_name", file_name)
        if insecure is not None:
            pulumi.set(__self__, "insecure", insecure)
        if min_tls is not None:
            pulumi.set(__self__, "min_tls", min_tls)

    @property
    @pulumi.getter
    def path(self) -> str:
        """
        A path to a local file or a URL.
        """
        return pulumi.get(self, "path")

    @property
    @pulumi.getter
    def changed(self) -> Optional[bool]:
        """
        Whether the source file has changed since the last run
        """
        return pulumi.get(self, "changed")

    @property
    @pulumi.getter
    def checksum(self) -> Optional[str]:
        """
        The SHA256 checksum of the source file.
        """
        return pulumi.get(self, "checksum")

    @property
    @pulumi.getter(name="fileName")
    def file_name(self) -> Optional[str]:
        """
        The file name.
        """
        return pulumi.get(self, "file_name")

    @property
    @pulumi.getter
    def insecure(self) -> Optional[bool]:
        """
        Whether to skip the TLS verification step for
        HTTPS sources (defaults to `false`).
        """
        return pulumi.get(self, "insecure")

    @property
    @pulumi.getter(name="minTls")
    def min_tls(self) -> Optional[str]:
        """
        The minimum required TLS version for HTTPS
        sources. "Supported values: `1.0|1.1|1.2|1.3` (defaults to `1.3`).
        """
        return pulumi.get(self, "min_tls")


@pulumi.output_type
class FileSourceRaw(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "fileName":
            suggest = "file_name"

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

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

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

    def __init__(__self__, *,
                 data: str,
                 file_name: str,
                 resize: Optional[int] = None):
        """
        :param str data: The raw data.
        :param str file_name: The file name.
        :param int resize: The number of bytes to resize the file to.
        """
        pulumi.set(__self__, "data", data)
        pulumi.set(__self__, "file_name", file_name)
        if resize is not None:
            pulumi.set(__self__, "resize", resize)

    @property
    @pulumi.getter
    def data(self) -> str:
        """
        The raw data.
        """
        return pulumi.get(self, "data")

    @property
    @pulumi.getter(name="fileName")
    def file_name(self) -> str:
        """
        The file name.
        """
        return pulumi.get(self, "file_name")

    @property
    @pulumi.getter
    def resize(self) -> Optional[int]:
        """
        The number of bytes to resize the file to.
        """
        return pulumi.get(self, "resize")


