# 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)



[((45, 5, 45, 38), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((57, 5, 57, 41), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((69, 5, 69, 47), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((81, 5, 81, 43), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((93, 5, 93, 36), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((129, 5, 129, 37), 'pulumi.getter', 'pulumi.getter', (), '', False, 'import pulumi\n'), ((50, 15, 50, 47), 'pulumi.get', 'pulumi.get', ({(50, 26, 50, 30): 'self', (50, 32, 50, 46): '"""acquire_time"""'}, {}), "(self, 'acquire_time')", False, 'import pulumi\n'), ((54, 8, 54, 47), 'pulumi.set', 'pulumi.set', ({(54, 19, 54, 23): 'self', (54, 25, 54, 39): '"""acquire_time"""', (54, 41, 54, 46): 'value'}, {}), "(self, 'acquire_time', value)", False, 'import pulumi\n'), ((62, 15, 62, 50), 'pulumi.get', 'pulumi.get', ({(62, 26, 62, 30): 'self', (62, 32, 62, 49): '"""holder_identity"""'}, {}), "(self, 'holder_identity')", False, 'import pulumi\n'), ((66, 8, 66, 50), 'pulumi.set', 'pulumi.set', ({(66, 19, 66, 23): 'self', (66, 25, 66, 42): '"""holder_identity"""', (66, 44, 66, 49): 'value'}, {}), "(self, 'holder_identity', value)", False, 'import pulumi\n'), ((74, 15, 74, 57), 'pulumi.get', 'pulumi.get', ({(74, 26, 74, 30): 'self', (74, 32, 74, 56): '"""lease_duration_seconds"""'}, {}), "(self, 'lease_duration_seconds')", False, 'import pulumi\n'), ((78, 8, 78, 57), 'pulumi.set', 'pulumi.set', ({(78, 19, 78, 23): 'self', (78, 25, 78, 49): '"""lease_duration_seconds"""', (78, 51, 78, 56): 'value'}, {}), "(self, 'lease_duration_seconds', value)", False, 'import pulumi\n'), ((86, 15, 86, 52), 'pulumi.get', 'pulumi.get', ({(86, 26, 86, 30): 'self', (86, 32, 86, 51): '"""lease_transitions"""'}, {}), "(self, 'lease_transitions')", False, 'import pulumi\n'), ((90, 8, 90, 52), 'pulumi.set', 'pulumi.set', ({(90, 19, 90, 23): 'self', (90, 25, 90, 44): '"""lease_transitions"""', (90, 46, 90, 51): 'value'}, {}), "(self, 'lease_transitions', value)", False, 'import pulumi\n'), ((98, 15, 98, 45), 'pulumi.get', 'pulumi.get', ({(98, 26, 98, 30): 'self', (98, 32, 98, 44): '"""renew_time"""'}, {}), "(self, 'renew_time')", False, 'import pulumi\n'), ((102, 8, 102, 45), 'pulumi.set', 'pulumi.set', ({(102, 19, 102, 23): 'self', (102, 25, 102, 37): '"""renew_time"""', (102, 39, 102, 44): 'value'}, {}), "(self, 'renew_time', value)", False, 'import pulumi\n'), ((134, 15, 134, 46), 'pulumi.get', 'pulumi.get', ({(134, 26, 134, 30): 'self', (134, 32, 134, 45): '"""api_version"""'}, {}), "(self, 'api_version')", False, 'import pulumi\n'), ((138, 8, 138, 46), 'pulumi.set', 'pulumi.set', ({(138, 19, 138, 23): 'self', (138, 25, 138, 38): '"""api_version"""', (138, 40, 138, 45): 'value'}, {}), "(self, 'api_version', value)", False, 'import pulumi\n'), ((146, 15, 146, 39), 'pulumi.get', 'pulumi.get', ({(146, 26, 146, 30): 'self', (146, 32, 146, 38): '"""kind"""'}, {}), "(self, 'kind')", False, 'import pulumi\n'), ((150, 8, 150, 39), 'pulumi.set', 'pulumi.set', ({(150, 19, 150, 23): 'self', (150, 25, 150, 31): '"""kind"""', (150, 33, 150, 38): 'value'}, {}), "(self, 'kind', value)", False, 'import pulumi\n'), ((158, 15, 158, 43), 'pulumi.get', 'pulumi.get', ({(158, 26, 158, 30): 'self', (158, 32, 158, 42): '"""metadata"""'}, {}), "(self, 'metadata')", False, 'import pulumi\n'), ((162, 8, 162, 43), 'pulumi.set', 'pulumi.set', ({(162, 19, 162, 23): 'self', (162, 25, 162, 35): '"""metadata"""', (162, 37, 162, 42): 'value'}, {}), "(self, 'metadata', value)", False, 'import pulumi\n'), ((170, 15, 170, 39), 'pulumi.get', 'pulumi.get', ({(170, 26, 170, 30): 'self', (170, 32, 170, 38): '"""spec"""'}, {}), "(self, 'spec')", False, 'import pulumi\n'), ((174, 8, 174, 39), 'pulumi.set', 'pulumi.set', ({(174, 19, 174, 23): 'self', (174, 25, 174, 31): '"""spec"""', (174, 33, 174, 38): 'value'}, {}), "(self, 'spec', value)", False, 'import pulumi\n'), ((34, 12, 34, 62), 'pulumi.set', 'pulumi.set', ({(34, 23, 34, 31): '__self__', (34, 33, 34, 47): '"""acquire_time"""', (34, 49, 34, 61): 'acquire_time'}, {}), "(__self__, 'acquire_time', acquire_time)", False, 'import pulumi\n'), ((36, 12, 36, 68), 'pulumi.set', 'pulumi.set', ({(36, 23, 36, 31): '__self__', (36, 33, 36, 50): '"""holder_identity"""', (36, 52, 36, 67): 'holder_identity'}, {}), "(__self__, 'holder_identity', holder_identity)", False, 'import pulumi\n'), ((38, 12, 38, 82), 'pulumi.set', 'pulumi.set', ({(38, 23, 38, 31): '__self__', (38, 33, 38, 57): '"""lease_duration_seconds"""', (38, 59, 38, 81): 'lease_duration_seconds'}, {}), "(__self__, 'lease_duration_seconds', lease_duration_seconds)", False, 'import pulumi\n'), ((40, 12, 40, 72), 'pulumi.set', 'pulumi.set', ({(40, 23, 40, 31): '__self__', (40, 33, 40, 52): '"""lease_transitions"""', (40, 54, 40, 71): 'lease_transitions'}, {}), "(__self__, 'lease_transitions', lease_transitions)", False, 'import pulumi\n'), ((42, 12, 42, 58), 'pulumi.set', 'pulumi.set', ({(42, 23, 42, 31): '__self__', (42, 33, 42, 45): '"""renew_time"""', (42, 47, 42, 57): 'renew_time'}, {}), "(__self__, 'renew_time', renew_time)", False, 'import pulumi\n'), ((120, 12, 120, 73), 'pulumi.set', 'pulumi.set', ({(120, 23, 120, 31): '__self__', (120, 33, 120, 46): '"""api_version"""', (120, 48, 120, 72): '"""coordination.k8s.io/v1"""'}, {}), "(__self__, 'api_version', 'coordination.k8s.io/v1')", False, 'import pulumi\n'), ((122, 12, 122, 49), 'pulumi.set', 'pulumi.set', ({(122, 23, 122, 31): '__self__', (122, 33, 122, 39): '"""kind"""', (122, 41, 122, 48): '"""Lease"""'}, {}), "(__self__, 'kind', 'Lease')", False, 'import pulumi\n'), ((124, 12, 124, 54), 'pulumi.set', 'pulumi.set', ({(124, 23, 124, 31): '__self__', (124, 33, 124, 43): '"""metadata"""', (124, 45, 124, 53): 'metadata'}, {}), "(__self__, 'metadata', metadata)", False, 'import pulumi\n'), ((126, 12, 126, 46), 'pulumi.set', 'pulumi.set', ({(126, 23, 126, 31): '__self__', (126, 33, 126, 39): '"""spec"""', (126, 41, 126, 45): 'spec'}, {}), "(__self__, 'spec', spec)", False, 'import pulumi\n')]