3 f÷ÔYRã@s8dZddlmZddlmZddlZGdd„deƒZdS)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@sveZdZdZddd„Zedd„ƒZejdd„ƒZedd „ƒZejd d „ƒZd d „Z d d„Z dd„Z dd„Z dd„Z dS)ÚV1beta1NetworkPolicySpeczw NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. NcCs(dddœ|_dddœ|_||_||_dS)aN V1beta1NetworkPolicySpec - 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. z%list[V1beta1NetworkPolicyIngressRule]ÚV1LabelSelector)ÚingressÚ pod_selectorrÚ podSelectorN)Ú swagger_typesÚ attribute_mapÚ_ingressÚ _pod_selector)Úselfrr©rúe/Users/olari/OneDrive/sandbox/awsBlog2/lambda/kubernetes/client/models/v1beta1_network_policy_spec.pyÚ__init__s   z!V1beta1NetworkPolicySpec.__init__cCs|jS)a• Gets the ingress of this V1beta1NetworkPolicySpec. List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default). :return: The ingress of this V1beta1NetworkPolicySpec. :rtype: list[V1beta1NetworkPolicyIngressRule] )r )r rrrr.s z V1beta1NetworkPolicySpec.ingresscCs ||_dS)a› Sets the ingress of this V1beta1NetworkPolicySpec. List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default). :param ingress: The ingress of this V1beta1NetworkPolicySpec. :type: list[V1beta1NetworkPolicyIngressRule] N)r )r rrrrr9s cCs|jS)a? Gets the pod_selector of this V1beta1NetworkPolicySpec. Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. :return: The pod_selector of this V1beta1NetworkPolicySpec. :rtype: V1LabelSelector )r )r rrrrEs z%V1beta1NetworkPolicySpec.pod_selectorcCs|dkrtdƒ‚||_dS)aJ Sets the pod_selector of this V1beta1NetworkPolicySpec. Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace. :param pod_selector: The pod_selector of this V1beta1NetworkPolicySpec. :type: V1LabelSelector Nz4Invalid value for `pod_selector`, must not be `None`)Ú ValueErrorr )r rrrrrPs cCs’i}xˆt|jƒD]z\}}t||ƒ}t|tƒrDttdd„|ƒƒ||<qt|dƒr\|jƒ||<qt|tƒr‚ttdd„|j ƒƒƒ||<q|||<qW|S)z8 Returns the model properties as a dict cSst|dƒr|jƒS|S)NÚto_dict)Úhasattrr)ÚxrrrÚhsz2V1beta1NetworkPolicySpec.to_dict..rcSs&t|ddƒr"|d|djƒfS|S)Nérr)rr)Úitemrrrros) rr ÚgetattrÚ isinstanceÚlistÚmaprrÚdictÚitems)r ÚresultÚattrÚ_Úvaluerrrr^s     z V1beta1NetworkPolicySpec.to_dictcCs t|jƒƒS)z@ Returns the string representation of the model )rr)r rrrÚto_strxszV1beta1NetworkPolicySpec.to_strcCs|jƒS)z* For `print` and `pprint` )r")r rrrÚ__repr__~sz!V1beta1NetworkPolicySpec.__repr__cCst|tƒsdS|j|jkS)z8 Returns true if both objects are equal F)rrÚ__dict__)r ÚotherrrrÚ__eq__„s zV1beta1NetworkPolicySpec.__eq__cCs ||k S)z< Returns true if both objects are not equal r)r r%rrrÚ__ne__szV1beta1NetworkPolicySpec.__ne__)NN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rÚpropertyrÚsetterrrr"r#r&r'rrrrrs    r)r+ÚpprintrÚsixrÚreÚobjectrrrrrÚ s