<reponame>sdnit-se/intersight-python<gh_stars>10-100
# coding: utf-8

"""
    Cisco Intersight OpenAPI specification.

    The Cisco Intersight OpenAPI specification.

    OpenAPI spec version: 1.0.9-1461
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class VnicCdn(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 = {
        'object_type': 'str',
        'source': 'str',
        'value': 'str'
    }

    attribute_map = {
        'object_type': 'ObjectType',
        'source': 'Source',
        'value': 'Value'
    }

    def __init__(self, object_type=None, source='vnic', value=None):
        """
        VnicCdn - a model defined in Swagger
        """

        self._object_type = None
        self._source = None
        self._value = None

        if object_type is not None:
          self.object_type = object_type
        if source is not None:
          self.source = source
        if value is not None:
          self.value = value

    @property
    def object_type(self):
        """
        Gets the object_type of this VnicCdn.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :return: The object_type of this VnicCdn.
        :rtype: str
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """
        Sets the object_type of this VnicCdn.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :param object_type: The object_type of this VnicCdn.
        :type: str
        """

        self._object_type = object_type

    @property
    def source(self):
        """
        Gets the source of this VnicCdn.
        Source of the CDN. It can either be user specified or be the same as the vNIC name.

        :return: The source of this VnicCdn.
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """
        Sets the source of this VnicCdn.
        Source of the CDN. It can either be user specified or be the same as the vNIC name.

        :param source: The source of this VnicCdn.
        :type: str
        """
        allowed_values = ["vnic", "user"]
        if source not in allowed_values:
            raise ValueError(
                "Invalid value for `source` ({0}), must be one of {1}"
                .format(source, allowed_values)
            )

        self._source = source

    @property
    def value(self):
        """
        Gets the value of this VnicCdn.
        The CDN value entered in case of user defined mode.

        :return: The value of this VnicCdn.
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """
        Sets the value of this VnicCdn.
        The CDN value entered in case of user defined mode.

        :param value: The value of this VnicCdn.
        :type: str
        """

        self._value = value

    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, VnicCdn):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other

# coding: utf-8

"""
    Cisco Intersight OpenAPI specification.

    The Cisco Intersight OpenAPI specification.

    OpenAPI spec version: 1.0.9-1461
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class VnicCdn(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 = {
        'object_type': 'str',
        'source': 'str',
        'value': 'str'
    }

    attribute_map = {
        'object_type': 'ObjectType',
        'source': 'Source',
        'value': 'Value'
    }

    def __init__(self, object_type=None, source='vnic', value=None):
        """
        VnicCdn - a model defined in Swagger
        """

        self._object_type = None
        self._source = None
        self._value = None

        if object_type is not None:
          self.object_type = object_type
        if source is not None:
          self.source = source
        if value is not None:
          self.value = value

    @property
    def object_type(self):
        """
        Gets the object_type of this VnicCdn.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :return: The object_type of this VnicCdn.
        :rtype: str
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """
        Sets the object_type of this VnicCdn.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :param object_type: The object_type of this VnicCdn.
        :type: str
        """

        self._object_type = object_type

    @property
    def source(self):
        """
        Gets the source of this VnicCdn.
        Source of the CDN. It can either be user specified or be the same as the vNIC name.

        :return: The source of this VnicCdn.
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """
        Sets the source of this VnicCdn.
        Source of the CDN. It can either be user specified or be the same as the vNIC name.

        :param source: The source of this VnicCdn.
        :type: str
        """
        allowed_values = ["vnic", "user"]
        if source not in allowed_values:
            raise ValueError(
                "Invalid value for `source` ({0}), must be one of {1}"
                .format(source, allowed_values)
            )

        self._source = source

    @property
    def value(self):
        """
        Gets the value of this VnicCdn.
        The CDN value entered in case of user defined mode.

        :return: The value of this VnicCdn.
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """
        Sets the value of this VnicCdn.
        The CDN value entered in case of user defined mode.

        :param value: The value of this VnicCdn.
        :type: str
        """

        self._value = value

    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, VnicCdn):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
# coding: utf-8 Cisco Intersight OpenAPI specification.      The Cisco Intersight OpenAPI specification.      OpenAPI spec version: 1.0.9-1461          Generated by: https://github.com/swagger-api/swagger-codegen.git 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. VnicCdn - a model defined in Swagger Gets the object_type of this VnicCdn.         The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.          :return: The object_type of this VnicCdn.         :rtype: str Sets the object_type of this VnicCdn.         The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.          :param object_type: The object_type of this VnicCdn.         :type: str Gets the source of this VnicCdn.         Source of the CDN. It can either be user specified or be the same as the vNIC name.          :return: The source of this VnicCdn.         :rtype: str Sets the source of this VnicCdn.         Source of the CDN. It can either be user specified or be the same as the vNIC name.          :param source: The source of this VnicCdn.         :type: str Gets the value of this VnicCdn.         The CDN value entered in case of user defined mode.          :return: The value of this VnicCdn.         :rtype: str Sets the value of this VnicCdn.         The CDN value entered in case of user defined mode.          :param value: The value of this VnicCdn.         :type: str Returns the model properties as a dict Returns the string representation of the model For `print` and `pprint` Returns true if both objects are equal Returns true if both objects are not equal