3 fY<5@s8dZddlmZddlmZddlZGdddeZdS)z Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git )pformat) iteritemsNc@seZdZdZd'ddZeddZejddZedd Zejd d Zed d Z e jd d Z eddZ e jddZ eddZ e jddZ eddZ e jddZ eddZ e jddZ eddZejddZddZdd Zd!d"Zd#d$Zd%d&ZdS)(V1beta1StatefulSetSpeczw NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Nc Csdddddddddd|_dd d d d d ddd|_||_||_||_||_||_||_||_||_ dS)aL V1beta1StatefulSetSpec - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. :param dict attributeMap: The key is attribute name and the value is json key in definition. strintV1LabelSelectorV1PodTemplateSpec V1beta1StatefulSetUpdateStrategyzlist[V1PersistentVolumeClaim])pod_management_policyreplicasrevision_history_limitselector service_nametemplateupdate_strategyvolume_claim_templatesZpodManagementPolicyr revisionHistoryLimitr serviceNamerupdateStrategyZvolumeClaimTemplatesN) swagger_types attribute_map_pod_management_policy _replicas_revision_history_limit _selector _service_name _template_update_strategy_volume_claim_templates) selfr r r r rrrrr c/Users/olari/OneDrive/sandbox/awsBlog2/lambda/kubernetes/client/models/v1beta1_stateful_set_spec.py__init__s0   zV1beta1StatefulSetSpec.__init__cCs|jS)a Gets the pod_management_policy of this V1beta1StatefulSetSpec. podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. :return: The pod_management_policy of this V1beta1StatefulSetSpec. :rtype: str )r)rr r r!r @s z,V1beta1StatefulSetSpec.pod_management_policycCs ||_dS)a Sets the pod_management_policy of this V1beta1StatefulSetSpec. podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. The default policy is `OrderedReady`, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is `Parallel` which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once. :param pod_management_policy: The pod_management_policy of this V1beta1StatefulSetSpec. :type: str N)r)rr r r r!r Ks cCs|jS)a Gets the replicas of this V1beta1StatefulSetSpec. replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. :return: The replicas of this V1beta1StatefulSetSpec. :rtype: int )r)rr r r!r Ws zV1beta1StatefulSetSpec.replicascCs ||_dS)a Sets the replicas of this V1beta1StatefulSetSpec. replicas is the desired number of replicas of the given Template. These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1. :param replicas: The replicas of this V1beta1StatefulSetSpec. :type: int N)r)rr r r r!r bs cCs|jS)a Gets the revision_history_limit of this V1beta1StatefulSetSpec. revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. :return: The revision_history_limit of this V1beta1StatefulSetSpec. :rtype: int )r)rr r r!r ns z-V1beta1StatefulSetSpec.revision_history_limitcCs ||_dS)a Sets the revision_history_limit of this V1beta1StatefulSetSpec. revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet's revision history. The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10. :param revision_history_limit: The revision_history_limit of this V1beta1StatefulSetSpec. :type: int N)r)rr r r r!r ys cCs|jS)a Gets the selector of this V1beta1StatefulSetSpec. selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors :return: The selector of this V1beta1StatefulSetSpec. :rtype: V1LabelSelector )r)rr r r!r s zV1beta1StatefulSetSpec.selectorcCs ||_dS)a Sets the selector of this V1beta1StatefulSetSpec. selector is a label query over pods that should match the replica count. If empty, defaulted to labels on the pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors :param selector: The selector of this V1beta1StatefulSetSpec. :type: V1LabelSelector N)r)rr r r r!r s cCs|jS)a Gets the service_name of this V1beta1StatefulSetSpec. serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. :return: The service_name of this V1beta1StatefulSetSpec. :rtype: str )r)rr r r!rs z#V1beta1StatefulSetSpec.service_namecCs|dkrtd||_dS)a Sets the service_name of this V1beta1StatefulSetSpec. serviceName is the name of the service that governs this StatefulSet. This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where "pod-specific-string" is managed by the StatefulSet controller. :param service_name: The service_name of this V1beta1StatefulSetSpec. :type: str Nz4Invalid value for `service_name`, must not be `None`) ValueErrorr)rrr r r!rs cCs|jS)a Gets the template of this V1beta1StatefulSetSpec. template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. :return: The template of this V1beta1StatefulSetSpec. :rtype: V1PodTemplateSpec )r)rr r r!rs zV1beta1StatefulSetSpec.templatecCs|dkrtd||_dS)a Sets the template of this V1beta1StatefulSetSpec. template is the object that describes the pod that will be created if insufficient replicas are detected. Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. :param template: The template of this V1beta1StatefulSetSpec. :type: V1PodTemplateSpec Nz0Invalid value for `template`, must not be `None`)r#r)rrr r r!rs cCs|jS)a] Gets the update_strategy of this V1beta1StatefulSetSpec. updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. :return: The update_strategy of this V1beta1StatefulSetSpec. :rtype: V1beta1StatefulSetUpdateStrategy )r)rr r r!rs z&V1beta1StatefulSetSpec.update_strategycCs ||_dS)ak Sets the update_strategy of this V1beta1StatefulSetSpec. updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. :param update_strategy: The update_strategy of this V1beta1StatefulSetSpec. :type: V1beta1StatefulSetUpdateStrategy N)r)rrr r r!rs cCs|jS)ap Gets the volume_claim_templates of this V1beta1StatefulSetSpec. volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. :return: The volume_claim_templates of this V1beta1StatefulSetSpec. :rtype: list[V1PersistentVolumeClaim] )r)rr r r!rs z-V1beta1StatefulSetSpec.volume_claim_templatescCs ||_dS)a Sets the volume_claim_templates of this V1beta1StatefulSetSpec. volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name. :param volume_claim_templates: The volume_claim_templates of this V1beta1StatefulSetSpec. :type: list[V1PersistentVolumeClaim] N)r)rrr r r!rs cCsi}xt|jD]z\}}t||}t|trDttdd|||<qt|dr\|j||<qt|trttdd|j ||<q|||<qW|S)z8 Returns the model properties as a dict cSst|dr|jS|S)Nto_dict)hasattrr$)xr r r!sz0V1beta1StatefulSetSpec.to_dict..r$cSs&t|ddr"|d|djfS|S)Nr$r)r%r$)itemr r r!r' s) rrgetattr isinstancelistmapr%r$dictitems)rresultattr_valuer r r!r$s     zV1beta1StatefulSetSpec.to_dictcCs t|jS)z@ Returns the string representation of the model )rr$)rr r r!to_strszV1beta1StatefulSetSpec.to_strcCs|jS)z* For `print` and `pprint` )r4)rr r r!__repr__szV1beta1StatefulSetSpec.__repr__cCst|tsdS|j|jkS)z8 Returns true if both objects are equal F)r+r__dict__)rotherr r r!__eq__"s zV1beta1StatefulSetSpec.__eq__cCs ||k S)z< Returns true if both objects are not equal r )rr7r r r!__ne__+szV1beta1StatefulSetSpec.__ne__)NNNNNNNN)__name__ __module__ __qualname____doc__r"propertyr setterr r r rrrrr$r4r5r8r9r r r r!rs. (          r)r=pprintrsixrreobjectrr r r r! s