def __init__( self, acquire_time: "MicroTime" = None, holder_identity: str = None, lease_duration_seconds: int = None, lease_transitions: int = None, renew_time: "MicroTime" = None, ): """Create LeaseSpec instance.""" super(LeaseSpec, self).__init__(api_version="coordination/v1", kind="LeaseSpec") self._properties = { "acquireTime": acquire_time if acquire_time is not None else MicroTime(), "holderIdentity": holder_identity if holder_identity is not None else "", "leaseDurationSeconds": lease_duration_seconds if lease_duration_seconds is not None else None, "leaseTransitions": lease_transitions if lease_transitions is not None else None, "renewTime": renew_time if renew_time is not None else MicroTime(), } self._types = { "acquireTime": (MicroTime, None), "holderIdentity": (str, None), "leaseDurationSeconds": (int, None), "leaseTransitions": (int, None), "renewTime": (MicroTime, None), }
def acquire_time(self, value: typing.Union["MicroTime", dict]): """ acquireTime is a time when the current lease was acquired. """ if isinstance(value, dict): value = typing.cast( MicroTime, MicroTime().from_dict(value), ) self._properties["acquireTime"] = value
def renew_time(self, value: typing.Union["MicroTime", dict]): """ renewTime is a time when the current holder of a lease has last updated the lease. """ if isinstance(value, dict): value = typing.cast( MicroTime, MicroTime().from_dict(value), ) self._properties["renewTime"] = value
def last_observed_time(self, value: typing.Union["MicroTime", dict]): """ lastObservedTime is the time when last Event from the series was seen before last heartbeat. """ if isinstance(value, dict): value = typing.cast( MicroTime, MicroTime().from_dict(value), ) self._properties["lastObservedTime"] = value
def event_time(self, value: typing.Union["MicroTime", dict]): """ eventTime is the time when this Event was first observed. It is required. """ if isinstance(value, dict): value = typing.cast( MicroTime, MicroTime().from_dict(value), ) self._properties["eventTime"] = value
def __init__( self, count: int = None, last_observed_time: "MicroTime" = None, ): """Create EventSeries instance.""" super(EventSeries, self).__init__(api_version="events/v1beta1", kind="EventSeries") self._properties = { "count": count if count is not None else None, "lastObservedTime": last_observed_time if last_observed_time is not None else MicroTime(), } self._types = { "count": (int, None), "lastObservedTime": (MicroTime, None), }
def __init__( self, action: str = None, deprecated_count: int = None, deprecated_first_timestamp: str = None, deprecated_last_timestamp: str = None, deprecated_source: "EventSource" = None, event_time: "MicroTime" = None, metadata: "ObjectMeta" = None, note: str = None, reason: str = None, regarding: "ObjectReference" = None, related: "ObjectReference" = None, reporting_controller: str = None, reporting_instance: str = None, series: "EventSeries" = None, type_: str = None, ): """Create Event instance.""" super(Event, self).__init__(api_version="events/v1beta1", kind="Event") self._properties = { "action": action if action is not None else "", "deprecatedCount": deprecated_count if deprecated_count is not None else None, "deprecatedFirstTimestamp": deprecated_first_timestamp if deprecated_first_timestamp is not None else None, "deprecatedLastTimestamp": deprecated_last_timestamp if deprecated_last_timestamp is not None else None, "deprecatedSource": deprecated_source if deprecated_source is not None else EventSource(), "eventTime": event_time if event_time is not None else MicroTime(), "metadata": metadata if metadata is not None else ObjectMeta(), "note": note if note is not None else "", "reason": reason if reason is not None else "", "regarding": regarding if regarding is not None else ObjectReference(), "related": related if related is not None else ObjectReference(), "reportingController": reporting_controller if reporting_controller is not None else "", "reportingInstance": reporting_instance if reporting_instance is not None else "", "series": series if series is not None else EventSeries(), "type": type_ if type_ is not None else "", } self._types = { "action": (str, None), "apiVersion": (str, None), "deprecatedCount": (int, None), "deprecatedFirstTimestamp": (str, None), "deprecatedLastTimestamp": (str, None), "deprecatedSource": (EventSource, None), "eventTime": (MicroTime, None), "kind": (str, None), "metadata": (ObjectMeta, None), "note": (str, None), "reason": (str, None), "regarding": (ObjectReference, None), "related": (ObjectReference, None), "reportingController": (str, None), "reportingInstance": (str, None), "series": (EventSeries, None), "type": (str, None), }