# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from fabric_cf.orchestrator.swagger_server.models.base_model_ import Model
from fabric_cf.orchestrator.swagger_server.models.poa_post_data import PoaPostData  # noqa: F401,E501
from fabric_cf.orchestrator.swagger_server import util


class PoaPost(Model):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    def __init__(self, operation: str=None, data: PoaPostData=None):  # noqa: E501
        """PoaPost - a model defined in Swagger

        :param operation: The operation of this PoaPost.  # noqa: E501
        :type operation: str
        :param data: The data of this PoaPost.  # noqa: E501
        :type data: PoaPostData
        """
        self.swagger_types = {
            'operation': str,
            'data': PoaPostData
        }

        self.attribute_map = {
            'operation': 'operation',
            'data': 'data'
        }
        self._operation = operation
        self._data = data

    @classmethod
    def from_dict(cls, dikt) -> 'PoaPost':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The poa_post of this PoaPost.  # noqa: E501
        :rtype: PoaPost
        """
        return util.deserialize_model(dikt, cls)

    @property
    def operation(self) -> str:
        """Gets the operation of this PoaPost.


        :return: The operation of this PoaPost.
        :rtype: str
        """
        return self._operation

    @operation.setter
    def operation(self, operation: str):
        """Sets the operation of this PoaPost.


        :param operation: The operation of this PoaPost.
        :type operation: str
        """
        allowed_values = ["cpuinfo", "numainfo", "cpupin", "numatune", "reboot", "addkey", "removekey", "rescan"]  # noqa: E501
        if operation not in allowed_values:
            raise ValueError(
                "Invalid value for `operation` ({0}), must be one of {1}"
                .format(operation, allowed_values)
            )

        self._operation = operation

    @property
    def data(self) -> PoaPostData:
        """Gets the data of this PoaPost.


        :return: The data of this PoaPost.
        :rtype: PoaPostData
        """
        return self._data

    @data.setter
    def data(self, data: PoaPostData):
        """Sets the data of this PoaPost.


        :param data: The data of this PoaPost.
        :type data: PoaPostData
        """

        self._data = data
