# 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__ = ['ProviderArgs', 'Provider']

@pulumi.input_type
class ProviderArgs:
    def __init__(__self__, *,
                 url: pulumi.Input[str],
                 access_token: Optional[pulumi.Input[str]] = None,
                 insecure: Optional[pulumi.Input[bool]] = None,
                 reauthorize_timeout: Optional[pulumi.Input[str]] = None,
                 refresh_token: Optional[pulumi.Input[str]] = None):
        """
        The set of arguments for constructing a Provider resource.
        :param pulumi.Input[str] url: The base url for API operations.
        :param pulumi.Input[str] access_token: The access token for API operations.
        :param pulumi.Input[bool] insecure: Specify whether to validate TLS certificates.
        :param pulumi.Input[str] reauthorize_timeout: Specify timeout for how often to reauthorize the access token
        :param pulumi.Input[str] refresh_token: The refresh token for API operations.
        """
        pulumi.set(__self__, "url", url)
        if access_token is not None:
            pulumi.set(__self__, "access_token", access_token)
        if insecure is not None:
            pulumi.set(__self__, "insecure", insecure)
        if reauthorize_timeout is not None:
            pulumi.set(__self__, "reauthorize_timeout", reauthorize_timeout)
        if refresh_token is not None:
            pulumi.set(__self__, "refresh_token", refresh_token)

    @property
    @pulumi.getter
    def url(self) -> pulumi.Input[str]:
        """
        The base url for API operations.
        """
        return pulumi.get(self, "url")

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

    @property
    @pulumi.getter(name="accessToken")
    def access_token(self) -> Optional[pulumi.Input[str]]:
        """
        The access token for API operations.
        """
        return pulumi.get(self, "access_token")

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

    @property
    @pulumi.getter
    def insecure(self) -> Optional[pulumi.Input[bool]]:
        """
        Specify whether to validate TLS certificates.
        """
        return pulumi.get(self, "insecure")

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

    @property
    @pulumi.getter(name="reauthorizeTimeout")
    def reauthorize_timeout(self) -> Optional[pulumi.Input[str]]:
        """
        Specify timeout for how often to reauthorize the access token
        """
        return pulumi.get(self, "reauthorize_timeout")

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

    @property
    @pulumi.getter(name="refreshToken")
    def refresh_token(self) -> Optional[pulumi.Input[str]]:
        """
        The refresh token for API operations.
        """
        return pulumi.get(self, "refresh_token")

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


class Provider(pulumi.ProviderResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 access_token: Optional[pulumi.Input[str]] = None,
                 insecure: Optional[pulumi.Input[bool]] = None,
                 reauthorize_timeout: Optional[pulumi.Input[str]] = None,
                 refresh_token: Optional[pulumi.Input[str]] = None,
                 url: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        The provider type for the vra package. By default, resources use package-wide configuration
        settings, however an explicit `Provider` instance may be created and passed during resource
        construction to achieve fine-grained programmatic control over provider settings. See the
        [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] access_token: The access token for API operations.
        :param pulumi.Input[bool] insecure: Specify whether to validate TLS certificates.
        :param pulumi.Input[str] reauthorize_timeout: Specify timeout for how often to reauthorize the access token
        :param pulumi.Input[str] refresh_token: The refresh token for API operations.
        :param pulumi.Input[str] url: The base url for API operations.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ProviderArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        The provider type for the vra package. By default, resources use package-wide configuration
        settings, however an explicit `Provider` instance may be created and passed during resource
        construction to achieve fine-grained programmatic control over provider settings. See the
        [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.

        :param str resource_name: The name of the resource.
        :param ProviderArgs 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(ProviderArgs, 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,
                 access_token: Optional[pulumi.Input[str]] = None,
                 insecure: Optional[pulumi.Input[bool]] = None,
                 reauthorize_timeout: Optional[pulumi.Input[str]] = None,
                 refresh_token: Optional[pulumi.Input[str]] = None,
                 url: 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__ = ProviderArgs.__new__(ProviderArgs)

            __props__.__dict__["access_token"] = access_token
            __props__.__dict__["insecure"] = pulumi.Output.from_input(insecure).apply(pulumi.runtime.to_json) if insecure is not None else None
            __props__.__dict__["reauthorize_timeout"] = reauthorize_timeout
            __props__.__dict__["refresh_token"] = refresh_token
            if url is None and not opts.urn:
                raise TypeError("Missing required property 'url'")
            __props__.__dict__["url"] = url
        super(Provider, __self__).__init__(
            'vra',
            resource_name,
            __props__,
            opts)

    @property
    @pulumi.getter(name="accessToken")
    def access_token(self) -> pulumi.Output[Optional[str]]:
        """
        The access token for API operations.
        """
        return pulumi.get(self, "access_token")

    @property
    @pulumi.getter(name="reauthorizeTimeout")
    def reauthorize_timeout(self) -> pulumi.Output[Optional[str]]:
        """
        Specify timeout for how often to reauthorize the access token
        """
        return pulumi.get(self, "reauthorize_timeout")

    @property
    @pulumi.getter(name="refreshToken")
    def refresh_token(self) -> pulumi.Output[Optional[str]]:
        """
        The refresh token for API operations.
        """
        return pulumi.get(self, "refresh_token")

    @property
    @pulumi.getter
    def url(self) -> pulumi.Output[str]:
        """
        The base url for API operations.
        """
        return pulumi.get(self, "url")

