File: //snap/google-cloud-cli/396/lib/third_party/kubernetes/client/models/v1alpha1_audit_sink_spec.py
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen
https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class V1alpha1AuditSinkSpec(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
"""
Attributes:
swagger_types (dict): The key is attribute name and the value is attribute
type.
attribute_map (dict): The key is attribute name and the value is json key
in definition.
"""
swagger_types = {'policy': 'V1alpha1Policy', 'webhook': 'V1alpha1Webhook'}
attribute_map = {'policy': 'policy', 'webhook': 'webhook'}
def __init__(self, policy=None, webhook=None):
"""
V1alpha1AuditSinkSpec - a model defined in Swagger
"""
self._policy = None
self._webhook = None
self.discriminator = None
self.policy = policy
self.webhook = webhook
@property
def policy(self):
"""
Gets the policy of this V1alpha1AuditSinkSpec.
Policy defines the policy for selecting which events should be sent to
the webhook required
:return: The policy of this V1alpha1AuditSinkSpec.
:rtype: V1alpha1Policy
"""
return self._policy
@policy.setter
def policy(self, policy):
"""
Sets the policy of this V1alpha1AuditSinkSpec.
Policy defines the policy for selecting which events should be sent to
the webhook required
:param policy: The policy of this V1alpha1AuditSinkSpec.
:type: V1alpha1Policy
"""
if policy is None:
raise ValueError('Invalid value for `policy`, must not be `None`')
self._policy = policy
@property
def webhook(self):
"""
Gets the webhook of this V1alpha1AuditSinkSpec.
Webhook to send events required
:return: The webhook of this V1alpha1AuditSinkSpec.
:rtype: V1alpha1Webhook
"""
return self._webhook
@webhook.setter
def webhook(self, webhook):
"""
Sets the webhook of this V1alpha1AuditSinkSpec.
Webhook to send events required
:param webhook: The webhook of this V1alpha1AuditSinkSpec.
:type: V1alpha1Webhook
"""
if webhook is None:
raise ValueError('Invalid value for `webhook`, must not be `None`')
self._webhook = webhook
def to_dict(self):
"""
Returns the model properties as a dict
"""
result = {}
for attr, _ in iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(
map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value))
elif hasattr(value, 'to_dict'):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(
map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], 'to_dict') else item, value.items()))
else:
result[attr] = value
return result
def to_str(self):
"""
Returns the string representation of the model
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()
def __eq__(self, other):
"""
Returns true if both objects are equal
"""
if not isinstance(other, V1alpha1AuditSinkSpec):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other