# coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from ... import meta as _meta

__all__ = [
    'LeaseSpecArgs',
    'LeaseArgs',
]

@pulumi.input_type
class LeaseSpecArgs:
    def __init__(__self__, *,
                 acquire_time: Optional[pulumi.Input[str]] = None,
                 holder_identity: Optional[pulumi.Input[str]] = None,
                 lease_duration_seconds: Optional[pulumi.Input[int]] = None,
                 lease_transitions: Optional[pulumi.Input[int]] = None,
                 renew_time: Optional[pulumi.Input[str]] = None):
        """
        LeaseSpec is a specification of a Lease.
        :param pulumi.Input[str] acquire_time: acquireTime is a time when the current lease was acquired.
        :param pulumi.Input[str] holder_identity: holderIdentity contains the identity of the holder of a current lease.
        :param pulumi.Input[int] lease_duration_seconds: leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
        :param pulumi.Input[int] lease_transitions: leaseTransitions is the number of transitions of a lease between holders.
        :param pulumi.Input[str] renew_time: renewTime is a time when the current holder of a lease has last updated the lease.
        """
        if acquire_time is not None:
            pulumi.set(__self__, "acquire_time", acquire_time)
        if holder_identity is not None:
            pulumi.set(__self__, "holder_identity", holder_identity)
        if lease_duration_seconds is not None:
            pulumi.set(__self__, "lease_duration_seconds", lease_duration_seconds)
        if lease_transitions is not None:
            pulumi.set(__self__, "lease_transitions", lease_transitions)
        if renew_time is not None:
            pulumi.set(__self__, "renew_time", renew_time)

    @property
    @pulumi.getter(name="acquireTime")
    def acquire_time(self) -> Optional[pulumi.Input[str]]:
        """
        acquireTime is a time when the current lease was acquired.
        """
        return pulumi.get(self, "acquire_time")

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

    @property
    @pulumi.getter(name="holderIdentity")
    def holder_identity(self) -> Optional[pulumi.Input[str]]:
        """
        holderIdentity contains the identity of the holder of a current lease.
        """
        return pulumi.get(self, "holder_identity")

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

    @property
    @pulumi.getter(name="leaseDurationSeconds")
    def lease_duration_seconds(self) -> Optional[pulumi.Input[int]]:
        """
        leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
        """
        return pulumi.get(self, "lease_duration_seconds")

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

    @property
    @pulumi.getter(name="leaseTransitions")
    def lease_transitions(self) -> Optional[pulumi.Input[int]]:
        """
        leaseTransitions is the number of transitions of a lease between holders.
        """
        return pulumi.get(self, "lease_transitions")

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

    @property
    @pulumi.getter(name="renewTime")
    def renew_time(self) -> Optional[pulumi.Input[str]]:
        """
        renewTime is a time when the current holder of a lease has last updated the lease.
        """
        return pulumi.get(self, "renew_time")

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


@pulumi.input_type
class LeaseArgs:
    def __init__(__self__, *,
                 api_version: Optional[pulumi.Input[str]] = None,
                 kind: Optional[pulumi.Input[str]] = None,
                 metadata: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']] = None,
                 spec: Optional[pulumi.Input['LeaseSpecArgs']] = None):
        """
        Lease defines a lease concept.
        :param pulumi.Input[str] api_version: APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
        :param pulumi.Input[str] kind: Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
        :param pulumi.Input['_meta.v1.ObjectMetaArgs'] metadata: More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
        :param pulumi.Input['LeaseSpecArgs'] spec: Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
        """
        if api_version is not None:
            pulumi.set(__self__, "api_version", 'coordination.k8s.io/v1')
        if kind is not None:
            pulumi.set(__self__, "kind", 'Lease')
        if metadata is not None:
            pulumi.set(__self__, "metadata", metadata)
        if spec is not None:
            pulumi.set(__self__, "spec", spec)

    @property
    @pulumi.getter(name="apiVersion")
    def api_version(self) -> Optional[pulumi.Input[str]]:
        """
        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
        """
        return pulumi.get(self, "api_version")

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

    @property
    @pulumi.getter
    def kind(self) -> Optional[pulumi.Input[str]]:
        """
        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
        """
        return pulumi.get(self, "kind")

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

    @property
    @pulumi.getter
    def metadata(self) -> Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]:
        """
        More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
        """
        return pulumi.get(self, "metadata")

    @metadata.setter
    def metadata(self, value: Optional[pulumi.Input['_meta.v1.ObjectMetaArgs']]):
        pulumi.set(self, "metadata", value)

    @property
    @pulumi.getter
    def spec(self) -> Optional[pulumi.Input['LeaseSpecArgs']]:
        """
        Specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
        """
        return pulumi.get(self, "spec")

    @spec.setter
    def spec(self, value: Optional[pulumi.Input['LeaseSpecArgs']]):
        pulumi.set(self, "spec", value)



[((2141, 2174), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""acquireTime"""'}), "(name='acquireTime')\n", (2154, 2174), False, 'import pulumi\n'), ((2531, 2567), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""holderIdentity"""'}), "(name='holderIdentity')\n", (2544, 2567), False, 'import pulumi\n'), ((2951, 2993), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""leaseDurationSeconds"""'}), "(name='leaseDurationSeconds')\n", (2964, 2993), False, 'import pulumi\n'), ((3495, 3533), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""leaseTransitions"""'}), "(name='leaseTransitions')\n", (3508, 3533), False, 'import pulumi\n'), ((3930, 3961), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""renewTime"""'}), "(name='renewTime')\n", (3943, 3961), False, 'import pulumi\n'), ((6123, 6155), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""apiVersion"""'}), "(name='apiVersion')\n", (6136, 6155), False, 'import pulumi\n'), ((2340, 2372), 'pulumi.get', 'pulumi.get', (['self', '"""acquire_time"""'], {}), "(self, 'acquire_time')\n", (2350, 2372), False, 'import pulumi\n'), ((2471, 2510), 'pulumi.set', 'pulumi.set', (['self', '"""acquire_time"""', 'value'], {}), "(self, 'acquire_time', value)\n", (2481, 2510), False, 'import pulumi\n'), ((2748, 2783), 'pulumi.get', 'pulumi.get', (['self', '"""holder_identity"""'], {}), "(self, 'holder_identity')\n", (2758, 2783), False, 'import pulumi\n'), ((2888, 2930), 'pulumi.set', 'pulumi.set', (['self', '"""holder_identity"""', 'value'], {}), "(self, 'holder_identity', value)\n", (2898, 2930), False, 'import pulumi\n'), ((3264, 3306), 'pulumi.get', 'pulumi.get', (['self', '"""lease_duration_seconds"""'], {}), "(self, 'lease_duration_seconds')\n", (3274, 3306), False, 'import pulumi\n'), ((3425, 3474), 'pulumi.set', 'pulumi.set', (['self', '"""lease_duration_seconds"""', 'value'], {}), "(self, 'lease_duration_seconds', value)\n", (3435, 3474), False, 'import pulumi\n'), ((3719, 3756), 'pulumi.get', 'pulumi.get', (['self', '"""lease_transitions"""'], {}), "(self, 'lease_transitions')\n", (3729, 3756), False, 'import pulumi\n'), ((3865, 3909), 'pulumi.set', 'pulumi.set', (['self', '"""lease_transitions"""', 'value'], {}), "(self, 'lease_transitions', value)\n", (3875, 3909), False, 'import pulumi\n'), ((4149, 4179), 'pulumi.get', 'pulumi.get', (['self', '"""renew_time"""'], {}), "(self, 'renew_time')\n", (4159, 4179), False, 'import pulumi\n'), ((4274, 4311), 'pulumi.set', 'pulumi.set', (['self', '"""renew_time"""', 'value'], {}), "(self, 'renew_time', value)\n", (4284, 4311), False, 'import pulumi\n'), ((6551, 6582), 'pulumi.get', 'pulumi.get', (['self', '"""api_version"""'], {}), "(self, 'api_version')\n", (6561, 6582), False, 'import pulumi\n'), ((6679, 6717), 'pulumi.set', 'pulumi.set', (['self', '"""api_version"""', 'value'], {}), "(self, 'api_version', value)\n", (6689, 6717), False, 'import pulumi\n'), ((7141, 7165), 'pulumi.get', 'pulumi.get', (['self', '"""kind"""'], {}), "(self, 'kind')\n", (7151, 7165), False, 'import pulumi\n'), ((7248, 7279), 'pulumi.set', 'pulumi.set', (['self', '"""kind"""', 'value'], {}), "(self, 'kind', value)\n", (7258, 7279), False, 'import pulumi\n'), ((7542, 7570), 'pulumi.get', 'pulumi.get', (['self', '"""metadata"""'], {}), "(self, 'metadata')\n", (7552, 7570), False, 'import pulumi\n'), ((7683, 7718), 'pulumi.set', 'pulumi.set', (['self', '"""metadata"""', 'value'], {}), "(self, 'metadata', value)\n", (7693, 7718), False, 'import pulumi\n'), ((8002, 8026), 'pulumi.get', 'pulumi.get', (['self', '"""spec"""'], {}), "(self, 'spec')\n", (8012, 8026), False, 'import pulumi\n'), ((8121, 8152), 'pulumi.set', 'pulumi.set', (['self', '"""spec"""', 'value'], {}), "(self, 'spec', value)\n", (8131, 8152), False, 'import pulumi\n'), ((1622, 1672), 'pulumi.set', 'pulumi.set', (['__self__', '"""acquire_time"""', 'acquire_time'], {}), "(__self__, 'acquire_time', acquire_time)\n", (1632, 1672), False, 'import pulumi\n'), ((1725, 1781), 'pulumi.set', 'pulumi.set', (['__self__', '"""holder_identity"""', 'holder_identity'], {}), "(__self__, 'holder_identity', holder_identity)\n", (1735, 1781), False, 'import pulumi\n'), ((1841, 1911), 'pulumi.set', 'pulumi.set', (['__self__', '"""lease_duration_seconds"""', 'lease_duration_seconds'], {}), "(__self__, 'lease_duration_seconds', lease_duration_seconds)\n", (1851, 1911), False, 'import pulumi\n'), ((1966, 2026), 'pulumi.set', 'pulumi.set', (['__self__', '"""lease_transitions"""', 'lease_transitions'], {}), "(__self__, 'lease_transitions', lease_transitions)\n", (1976, 2026), False, 'import pulumi\n'), ((2074, 2120), 'pulumi.set', 'pulumi.set', (['__self__', '"""renew_time"""', 'renew_time'], {}), "(__self__, 'renew_time', renew_time)\n", (2084, 2120), False, 'import pulumi\n'), ((5798, 5859), 'pulumi.set', 'pulumi.set', (['__self__', '"""api_version"""', '"""coordination.k8s.io/v1"""'], {}), "(__self__, 'api_version', 'coordination.k8s.io/v1')\n", (5808, 5859), False, 'import pulumi\n'), ((5901, 5938), 'pulumi.set', 'pulumi.set', (['__self__', '"""kind"""', '"""Lease"""'], {}), "(__self__, 'kind', 'Lease')\n", (5911, 5938), False, 'import pulumi\n'), ((5984, 6026), 'pulumi.set', 'pulumi.set', (['__self__', '"""metadata"""', 'metadata'], {}), "(__self__, 'metadata', metadata)\n", (5994, 6026), False, 'import pulumi\n'), ((6068, 6102), 'pulumi.set', 'pulumi.set', (['__self__', '"""spec"""', 'spec'], {}), "(__self__, 'spec', spec)\n", (6078, 6102), False, 'import pulumi\n')]