# coding: utf-8

"""
    Statuspage API

    # Code of Conduct Please don't abuse the API, and please report all feature requests and issues to https://support.atlassian.com/contact  # Rate Limiting Each API token is limited to 1 request / second as measured on a 60 second rolling window. To get this limit increased, please contact us at https://support.atlassian.com/contact  Error codes 420 or 429 indicate that you have exceeded the rate limit and the request has been rejected.  # Basics  ## HTTPS It's required  ## URL Prefix In order to maintain version integrity into the future, the API is versioned. All calls currently begin with the following prefix:    https://api.statuspage.io/v1/  ## RESTful Interface Wherever possible, the API seeks to implement repeatable patterns with logical, representative URLs and descriptive HTTP verbs. Below are some examples and conventions you will see throughout the documentation.  * Collections are buckets: https://api.statuspage.io/v1/pages/asdf123/incidents.json * Elements have unique IDs: https://api.statuspage.io/v1/pages/asdf123/incidents/jklm456.json * GET will retrieve information about a collection/element * POST will create an element in a collection * PATCH will update a single element * PUT will replace a single element in a collection (rarely used) * DELETE will destroy a single element  ## Sending Data Information can be sent in the body as form urlencoded or JSON, but make sure the Content-Type header matches the body structure or the server gremlins will be angry.  All examples are provided in JSON format, however they can easily be converted to form encoding if required.  Some examples of how to convert things are below:      // JSON     {       \"incident\": {         \"name\": \"test incident\",         \"components\": [\"8kbf7d35c070\", \"vtnh60py4yd7\"]       }     }      // Form Encoded (using curl as an example):     curl -X POST https://api.statuspage.io/v1/example \\       -d \"incident[name]=test incident\" \\       -d \"incident[components][]=8kbf7d35c070\" \\       -d \"incident[components][]=vtnh60py4yd7\"  # Authentication  <!-- ReDoc-Inject: <security-definitions> -->  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Component(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 = {
        'id': 'str',
        'page_id': 'str',
        'group_id': 'str',
        'created_at': 'datetime',
        'updated_at': 'datetime',
        'group': 'bool',
        'name': 'str',
        'description': 'str',
        'position': 'int',
        'status': 'str',
        'showcase': 'bool',
        'only_show_if_degraded': 'bool',
        'automation_email': 'str',
        'start_date': 'date'
    }

    attribute_map = {
        'id': 'id',
        'page_id': 'page_id',
        'group_id': 'group_id',
        'created_at': 'created_at',
        'updated_at': 'updated_at',
        'group': 'group',
        'name': 'name',
        'description': 'description',
        'position': 'position',
        'status': 'status',
        'showcase': 'showcase',
        'only_show_if_degraded': 'only_show_if_degraded',
        'automation_email': 'automation_email',
        'start_date': 'start_date'
    }

    def __init__(self, id=None, page_id=None, group_id=None, created_at=None, updated_at=None, group=None, name=None, description=None, position=None, status=None, showcase=None, only_show_if_degraded=None, automation_email=None, start_date=None):  # noqa: E501
        """Component - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._page_id = None
        self._group_id = None
        self._created_at = None
        self._updated_at = None
        self._group = None
        self._name = None
        self._description = None
        self._position = None
        self._status = None
        self._showcase = None
        self._only_show_if_degraded = None
        self._automation_email = None
        self._start_date = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if page_id is not None:
            self.page_id = page_id
        if group_id is not None:
            self.group_id = group_id
        if created_at is not None:
            self.created_at = created_at
        if updated_at is not None:
            self.updated_at = updated_at
        if group is not None:
            self.group = group
        if name is not None:
            self.name = name
        if description is not None:
            self.description = description
        if position is not None:
            self.position = position
        if status is not None:
            self.status = status
        if showcase is not None:
            self.showcase = showcase
        if only_show_if_degraded is not None:
            self.only_show_if_degraded = only_show_if_degraded
        if automation_email is not None:
            self.automation_email = automation_email
        if start_date is not None:
            self.start_date = start_date

    @property
    def id(self):
        """Gets the id of this Component.  # noqa: E501

        Identifier for component  # noqa: E501

        :return: The id of this Component.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Component.

        Identifier for component  # noqa: E501

        :param id: The id of this Component.  # noqa: E501
        :type: str
        """

        self._id = id

    @property
    def page_id(self):
        """Gets the page_id of this Component.  # noqa: E501

        Page identifier  # noqa: E501

        :return: The page_id of this Component.  # noqa: E501
        :rtype: str
        """
        return self._page_id

    @page_id.setter
    def page_id(self, page_id):
        """Sets the page_id of this Component.

        Page identifier  # noqa: E501

        :param page_id: The page_id of this Component.  # noqa: E501
        :type: str
        """

        self._page_id = page_id

    @property
    def group_id(self):
        """Gets the group_id of this Component.  # noqa: E501

        Component Group identifier  # noqa: E501

        :return: The group_id of this Component.  # noqa: E501
        :rtype: str
        """
        return self._group_id

    @group_id.setter
    def group_id(self, group_id):
        """Sets the group_id of this Component.

        Component Group identifier  # noqa: E501

        :param group_id: The group_id of this Component.  # noqa: E501
        :type: str
        """

        self._group_id = group_id

    @property
    def created_at(self):
        """Gets the created_at of this Component.  # noqa: E501


        :return: The created_at of this Component.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Component.


        :param created_at: The created_at of this Component.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

    @property
    def updated_at(self):
        """Gets the updated_at of this Component.  # noqa: E501


        :return: The updated_at of this Component.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this Component.


        :param updated_at: The updated_at of this Component.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

    @property
    def group(self):
        """Gets the group of this Component.  # noqa: E501

        Is this component a group  # noqa: E501

        :return: The group of this Component.  # noqa: E501
        :rtype: bool
        """
        return self._group

    @group.setter
    def group(self, group):
        """Sets the group of this Component.

        Is this component a group  # noqa: E501

        :param group: The group of this Component.  # noqa: E501
        :type: bool
        """

        self._group = group

    @property
    def name(self):
        """Gets the name of this Component.  # noqa: E501

        Display name for component  # noqa: E501

        :return: The name of this Component.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Component.

        Display name for component  # noqa: E501

        :param name: The name of this Component.  # noqa: E501
        :type: str
        """

        self._name = name

    @property
    def description(self):
        """Gets the description of this Component.  # noqa: E501

        More detailed description for component  # noqa: E501

        :return: The description of this Component.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Component.

        More detailed description for component  # noqa: E501

        :param description: The description of this Component.  # noqa: E501
        :type: str
        """

        self._description = description

    @property
    def position(self):
        """Gets the position of this Component.  # noqa: E501

        Order the component will appear on the page  # noqa: E501

        :return: The position of this Component.  # noqa: E501
        :rtype: int
        """
        return self._position

    @position.setter
    def position(self, position):
        """Sets the position of this Component.

        Order the component will appear on the page  # noqa: E501

        :param position: The position of this Component.  # noqa: E501
        :type: int
        """

        self._position = position

    @property
    def status(self):
        """Gets the status of this Component.  # noqa: E501

        Status of component  # noqa: E501

        :return: The status of this Component.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Component.

        Status of component  # noqa: E501

        :param status: The status of this Component.  # noqa: E501
        :type: str
        """
        allowed_values = ["operational", "under_maintenance", "degraded_performance", "partial_outage", "major_outage", ""]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

    @property
    def showcase(self):
        """Gets the showcase of this Component.  # noqa: E501

        Should this component be showcased  # noqa: E501

        :return: The showcase of this Component.  # noqa: E501
        :rtype: bool
        """
        return self._showcase

    @showcase.setter
    def showcase(self, showcase):
        """Sets the showcase of this Component.

        Should this component be showcased  # noqa: E501

        :param showcase: The showcase of this Component.  # noqa: E501
        :type: bool
        """

        self._showcase = showcase

    @property
    def only_show_if_degraded(self):
        """Gets the only_show_if_degraded of this Component.  # noqa: E501

        Requires a special feature flag to be enabled  # noqa: E501

        :return: The only_show_if_degraded of this Component.  # noqa: E501
        :rtype: bool
        """
        return self._only_show_if_degraded

    @only_show_if_degraded.setter
    def only_show_if_degraded(self, only_show_if_degraded):
        """Sets the only_show_if_degraded of this Component.

        Requires a special feature flag to be enabled  # noqa: E501

        :param only_show_if_degraded: The only_show_if_degraded of this Component.  # noqa: E501
        :type: bool
        """

        self._only_show_if_degraded = only_show_if_degraded

    @property
    def automation_email(self):
        """Gets the automation_email of this Component.  # noqa: E501

        Requires a special feature flag to be enabled  # noqa: E501

        :return: The automation_email of this Component.  # noqa: E501
        :rtype: str
        """
        return self._automation_email

    @automation_email.setter
    def automation_email(self, automation_email):
        """Sets the automation_email of this Component.

        Requires a special feature flag to be enabled  # noqa: E501

        :param automation_email: The automation_email of this Component.  # noqa: E501
        :type: str
        """

        self._automation_email = automation_email

    @property
    def start_date(self):
        """Gets the start_date of this Component.  # noqa: E501

        The date this component started being used  # noqa: E501

        :return: The start_date of this Component.  # noqa: E501
        :rtype: date
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this Component.

        The date this component started being used  # noqa: E501

        :param start_date: The start_date of this Component.  # noqa: E501
        :type: date
        """

        self._start_date = start_date

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.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
        if issubclass(Component, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.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, Component):
            return False

        return self.__dict__ == other.__dict__

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