# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ApiBatchRequestElement(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 = {
        'method': 'HTTPMethod',
        'url': 'str',
        'body': 'object',
        'content_type': 'str',
        'accept_type': 'str'
    }

    attribute_map = {
        'method': 'method',
        'url': 'url',
        'body': 'body',
        'content_type': 'contentType',
        'accept_type': 'acceptType'
    }

    def __init__(self, method=None, url=None, body=None, content_type=None, accept_type=None):  # noqa: E501
        """ApiBatchRequestElement - a model defined in Swagger"""  # noqa: E501
        self._method = None
        self._url = None
        self._body = None
        self._content_type = None
        self._accept_type = None
        self.discriminator = None
        if method is not None:
            self.method = method
        if url is not None:
            self.url = url
        if body is not None:
            self.body = body
        if content_type is not None:
            self.content_type = content_type
        if accept_type is not None:
            self.accept_type = accept_type

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


        :return: The method of this ApiBatchRequestElement.  # noqa: E501
        :rtype: HTTPMethod
        """
        return self._method

    @method.setter
    def method(self, method):
        """Sets the method of this ApiBatchRequestElement.


        :param method: The method of this ApiBatchRequestElement.  # noqa: E501
        :type: HTTPMethod
        """

        self._method = method

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

        The URL of the request. Must not have a scheme, host, or port. The path should be prefixed with \"/api/\", and should include path and query parameters.  # noqa: E501

        :return: The url of this ApiBatchRequestElement.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this ApiBatchRequestElement.

        The URL of the request. Must not have a scheme, host, or port. The path should be prefixed with \"/api/\", and should include path and query parameters.  # noqa: E501

        :param url: The url of this ApiBatchRequestElement.  # noqa: E501
        :type: str
        """

        self._url = url

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

        Optional body of the request. Must be serialized in accordance with #getContentType(). For application/json, use com.cloudera.api.ApiObjectMapper.  # noqa: E501

        :return: The body of this ApiBatchRequestElement.  # noqa: E501
        :rtype: object
        """
        return self._body

    @body.setter
    def body(self, body):
        """Sets the body of this ApiBatchRequestElement.

        Optional body of the request. Must be serialized in accordance with #getContentType(). For application/json, use com.cloudera.api.ApiObjectMapper.  # noqa: E501

        :param body: The body of this ApiBatchRequestElement.  # noqa: E501
        :type: object
        """

        self._body = body

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

        Content-Type header of the request element. If unset, the element will be treated as if the wildcard type had been specified unless it has a body, in which case it will fall back to application/json.  # noqa: E501

        :return: The content_type of this ApiBatchRequestElement.  # noqa: E501
        :rtype: str
        """
        return self._content_type

    @content_type.setter
    def content_type(self, content_type):
        """Sets the content_type of this ApiBatchRequestElement.

        Content-Type header of the request element. If unset, the element will be treated as if the wildcard type had been specified unless it has a body, in which case it will fall back to application/json.  # noqa: E501

        :param content_type: The content_type of this ApiBatchRequestElement.  # noqa: E501
        :type: str
        """

        self._content_type = content_type

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

        Accept header of the request element. The response body (if it exists) will be in this representation. If unset, the element will be treated as if the wildcard type had been requested.  # noqa: E501

        :return: The accept_type of this ApiBatchRequestElement.  # noqa: E501
        :rtype: str
        """
        return self._accept_type

    @accept_type.setter
    def accept_type(self, accept_type):
        """Sets the accept_type of this ApiBatchRequestElement.

        Accept header of the request element. The response body (if it exists) will be in this representation. If unset, the element will be treated as if the wildcard type had been requested.  # noqa: E501

        :param accept_type: The accept_type of this ApiBatchRequestElement.  # noqa: E501
        :type: str
        """

        self._accept_type = accept_type

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

        return self.__dict__ == other.__dict__

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