def __init__( self, api_version: str = None, kind: str = None, metadata: "ObjectMeta" = None, spec: dict = None, status: dict = None, ): """Create CustomObject instance.""" super(CustomObject, self).__init__( api_version=api_version or "custom/v1", kind=kind or "CustomObject", ) self._properties = { "apiVersion": api_version if api_version is not None else "", "kind": kind if kind is not None else "", "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else {}, "status": status if status is not None else {}, } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (dict, None), "status": (dict, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "CertificateSigningRequestSpec" = None, status: "CertificateSigningRequestStatus" = None, ): """Create CertificateSigningRequest instance.""" super(CertificateSigningRequest, self).__init__(api_version="certificates/v1beta1", kind="CertificateSigningRequest") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else CertificateSigningRequestSpec(), "status": status if status is not None else CertificateSigningRequestStatus(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (CertificateSigningRequestSpec, None), "status": (CertificateSigningRequestStatus, None), }
def __init__( self, description: str = None, global_default: bool = None, metadata: "ObjectMeta" = None, preemption_policy: str = None, value: int = None, ): """Create PriorityClass instance.""" super(PriorityClass, self).__init__(api_version="scheduling/v1alpha1", kind="PriorityClass") self._properties = { "description": description if description is not None else "", "globalDefault": global_default if global_default is not None else None, "metadata": metadata if metadata is not None else ObjectMeta(), "preemptionPolicy": preemption_policy if preemption_policy is not None else "", "value": value if value is not None else None, } self._types = { "apiVersion": (str, None), "description": (str, None), "globalDefault": (bool, None), "kind": (str, None), "metadata": (ObjectMeta, None), "preemptionPolicy": (str, None), "value": (int, None), }
def __init__( self, handler: str = None, metadata: "ObjectMeta" = None, overhead: "Overhead" = None, scheduling: "Scheduling" = None, ): """Create RuntimeClass instance.""" super(RuntimeClass, self).__init__(api_version="node/v1beta1", kind="RuntimeClass") self._properties = { "handler": handler if handler is not None else "", "metadata": metadata if metadata is not None else ObjectMeta(), "overhead": overhead if overhead is not None else Overhead(), "scheduling": scheduling if scheduling is not None else Scheduling(), } self._types = { "apiVersion": (str, None), "handler": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "overhead": (Overhead, None), "scheduling": (Scheduling, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "HorizontalPodAutoscalerSpec" = None, status: "HorizontalPodAutoscalerStatus" = None, ): """Create HorizontalPodAutoscaler instance.""" super(HorizontalPodAutoscaler, self).__init__(api_version="autoscaling/v1", kind="HorizontalPodAutoscaler") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else HorizontalPodAutoscalerSpec(), "status": status if status is not None else HorizontalPodAutoscalerStatus(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (HorizontalPodAutoscalerSpec, None), "status": (HorizontalPodAutoscalerStatus, None), }
def metadata(self, value: typing.Union["ObjectMeta", dict]): """ """ if isinstance(value, dict): value = typing.cast( ObjectMeta, ObjectMeta().from_dict(value), ) self._properties["metadata"] = value
def metadata(self, value: typing.Union["ObjectMeta", dict]): """ More info: https://git.k8s.io/community/contributors/devel/sig- architecture/api-conventions.md#metadata """ if isinstance(value, dict): value = typing.cast( ObjectMeta, ObjectMeta().from_dict(value), ) self._properties["metadata"] = value
def __init__( self, metadata: "ObjectMeta" = None, spec: "JobSpec" = None, ): """Create JobTemplateSpec instance.""" super(JobTemplateSpec, self).__init__(api_version="batch/v2alpha1", kind="JobTemplateSpec") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else JobSpec(), } self._types = { "metadata": (ObjectMeta, None), "spec": (JobSpec, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "LeaseSpec" = None, ): """Create Lease instance.""" super(Lease, self).__init__(api_version="coordination/v1", kind="Lease") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else LeaseSpec(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (LeaseSpec, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "IngressClassSpec" = None, ): """Create IngressClass instance.""" super(IngressClass, self).__init__(api_version="networking/v1beta1", kind="IngressClass") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else IngressClassSpec(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (IngressClassSpec, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "RuntimeClassSpec" = None, ): """Create RuntimeClass instance.""" super(RuntimeClass, self).__init__( api_version="node/v1alpha1", kind="RuntimeClass" ) self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else RuntimeClassSpec(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (RuntimeClassSpec, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "JobSpec" = None, status: "JobStatus" = None, ): """Create Job instance.""" super(Job, self).__init__(api_version="batch/v1", kind="Job") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else JobSpec(), "status": status if status is not None else JobStatus(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (JobSpec, None), "status": (JobStatus, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "TokenReviewSpec" = None, status: "TokenReviewStatus" = None, ): """Create TokenReview instance.""" super(TokenReview, self).__init__(api_version="authentication/v1", kind="TokenReview") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else TokenReviewSpec(), "status": status if status is not None else TokenReviewStatus(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (TokenReviewSpec, None), "status": (TokenReviewStatus, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "StorageVersionSpec" = None, status: "StorageVersionStatus" = None, ): """Create StorageVersion instance.""" super(StorageVersion, self).__init__(api_version="apiserverinternal/v1alpha1", kind="StorageVersion") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else StorageVersionSpec(), "status": status if status is not None else StorageVersionStatus(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (StorageVersionSpec, None), "status": (StorageVersionStatus, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "APIServiceSpec" = None, status: "APIServiceStatus" = None, ): """Create APIService instance.""" super(APIService, self).__init__(api_version="apiregistration.k8s.io/v1", kind="APIService") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else APIServiceSpec(), "status": status if status is not None else APIServiceStatus(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (APIServiceSpec, None), "status": (APIServiceStatus, None), }
def __init__( self, metadata: "ObjectMeta" = None, spec: "VolumeAttachmentSpec" = None, status: "VolumeAttachmentStatus" = None, ): """Create VolumeAttachment instance.""" super(VolumeAttachment, self).__init__(api_version="storage/v1alpha1", kind="VolumeAttachment") self._properties = { "metadata": metadata if metadata is not None else ObjectMeta(), "spec": spec if spec is not None else VolumeAttachmentSpec(), "status": status if status is not None else VolumeAttachmentStatus(), } self._types = { "apiVersion": (str, None), "kind": (str, None), "metadata": (ObjectMeta, None), "spec": (VolumeAttachmentSpec, None), "status": (VolumeAttachmentStatus, None), }
def __init__( self, address_type: str = None, endpoints: typing.List["Endpoint"] = None, metadata: "ObjectMeta" = None, ports: typing.List["EndpointPort"] = None, ): """Create EndpointSlice instance.""" super(EndpointSlice, self).__init__(api_version="discovery/v1beta1", kind="EndpointSlice") self._properties = { "addressType": address_type if address_type is not None else "", "endpoints": endpoints if endpoints is not None else [], "metadata": metadata if metadata is not None else ObjectMeta(), "ports": ports if ports is not None else [], } self._types = { "addressType": (str, None), "apiVersion": (str, None), "endpoints": (list, Endpoint), "kind": (str, None), "metadata": (ObjectMeta, None), "ports": (list, EndpointPort), }
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/v1", 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), }