# 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, Callable, 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"

        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):
        """
        :param str path: A path to a local file or a URL.
        :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`).
        """
        FileSourceFile._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            path=path,
            changed=changed,
            checksum=checksum,
            file_name=file_name,
            insecure=insecure,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             path: str,
             changed: Optional[bool] = None,
             checksum: Optional[str] = None,
             file_name: Optional[str] = None,
             insecure: Optional[bool] = None,
             opts: Optional[pulumi.ResourceOptions]=None,
             **kwargs):
        if 'fileName' in kwargs:
            file_name = kwargs['fileName']

        _setter("path", path)
        if changed is not None:
            _setter("changed", changed)
        if checksum is not None:
            _setter("checksum", checksum)
        if file_name is not None:
            _setter("file_name", file_name)
        if insecure is not None:
            _setter("insecure", insecure)

    @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]:
        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")


@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.
        """
        FileSourceRaw._configure(
            lambda key, value: pulumi.set(__self__, key, value),
            data=data,
            file_name=file_name,
            resize=resize,
        )
    @staticmethod
    def _configure(
             _setter: Callable[[Any, Any], None],
             data: str,
             file_name: str,
             resize: Optional[int] = None,
             opts: Optional[pulumi.ResourceOptions]=None,
             **kwargs):
        if 'fileName' in kwargs:
            file_name = kwargs['fileName']

        _setter("data", data)
        _setter("file_name", file_name)
        if resize is not None:
            _setter("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")


