# coding: utf-8

"""
    Vericred API

    Vericred's API allows you to search for Health Plans that a specific doctor
accepts.

## Getting Started

Visit our [Developer Portal](https://vericred.3scale.net) to
create an account.

Once you have created an account, you can create one Application for
Production and another for our Sandbox (select the appropriate Plan when
you create the Application).

## Authentication

To authenticate, pass the API Key you created in the Developer Portal as
a `Vericred-Api-Key` header.

`curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`

## Versioning

Vericred's API default to the latest version.  However, if you need a specific
version, you can request it with an `Accept-Version` header.

The current version is `v3`.  Previous versions are `v1` and `v2`.

`curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`

## Pagination

Endpoints that accept `page` and `per_page` parameters are paginated. They expose
four additional fields that contain data about your position in the response,
namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).

For example, to display 5 results per page and view the second page of a
`GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.

## Sideloading

When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
we sideload the associated data.  In this example, we would provide an Array of
`State`s and a `state_id` for each provider.  This is done primarily to reduce the
payload size since many of the `Provider`s will share a `State`

```
{
  providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
  states: [{ id: 1, code: 'NY' }]
}
```

If you need the second level of the object graph, you can just match the
corresponding id.

## Selecting specific data

All endpoints allow you to specify which fields you would like to return.
This allows you to limit the response to contain only the data you need.

For example, let's take a request that returns the following JSON by default

```
{
  provider: {
    id: 1,
    name: 'John',
    phone: '1234567890',
    field_we_dont_care_about: 'value_we_dont_care_about'
  },
  states: [{
    id: 1,
    name: 'New York',
    code: 'NY',
    field_we_dont_care_about: 'value_we_dont_care_about'
  }]
}
```

To limit our results to only return the fields we care about, we specify the
`select` query string parameter for the corresponding fields in the JSON
document.

In this case, we want to select `name` and `phone` from the `provider` key,
so we would add the parameters `select=provider.name,provider.phone`.
We also want the `name` and `code` from the `states` key, so we would
add the parameters `select=states.name,staes.code`.  The id field of
each document is always returned whether or not it is requested.

Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`

The response would be

```
{
  provider: {
    id: 1,
    name: 'John',
    phone: '1234567890'
  },
  states: [{
    id: 1,
    name: 'New York',
    code: 'NY'
  }]
}
```



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

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from pprint import pformat
from six import iteritems
import re


class RequestProvidersSearch(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, accepts_insurance=None, hios_ids=None, min_score=None, page=None, per_page=None, radius=None, search_term=None, zip_code=None, type=None):
        """
        RequestProvidersSearch - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'accepts_insurance': 'bool',
            'hios_ids': 'list[str]',
            'min_score': 'float',
            'page': 'int',
            'per_page': 'int',
            'radius': 'int',
            'search_term': 'str',
            'zip_code': 'str',
            'type': 'str'
        }

        self.attribute_map = {
            'accepts_insurance': 'accepts_insurance',
            'hios_ids': 'hios_ids',
            'min_score': 'min_score',
            'page': 'page',
            'per_page': 'per_page',
            'radius': 'radius',
            'search_term': 'search_term',
            'zip_code': 'zip_code',
            'type': 'type'
        }

        self._accepts_insurance = accepts_insurance
        self._hios_ids = hios_ids
        self._min_score = min_score
        self._page = page
        self._per_page = per_page
        self._radius = radius
        self._search_term = search_term
        self._zip_code = zip_code
        self._type = type

    @property
    def accepts_insurance(self):
        """
        Gets the accepts_insurance of this RequestProvidersSearch.
        Limit results to Providers who accept at least one insurance         plan.  Note that the inverse of this filter is not supported and         any value will evaluate to true

        :return: The accepts_insurance of this RequestProvidersSearch.
        :rtype: bool
        """
        return self._accepts_insurance

    @accepts_insurance.setter
    def accepts_insurance(self, accepts_insurance):
        """
        Sets the accepts_insurance of this RequestProvidersSearch.
        Limit results to Providers who accept at least one insurance         plan.  Note that the inverse of this filter is not supported and         any value will evaluate to true

        :param accepts_insurance: The accepts_insurance of this RequestProvidersSearch.
        :type: bool
        """

        self._accepts_insurance = accepts_insurance

    @property
    def hios_ids(self):
        """
        Gets the hios_ids of this RequestProvidersSearch.
        List of HIOS ids

        :return: The hios_ids of this RequestProvidersSearch.
        :rtype: list[str]
        """
        return self._hios_ids

    @hios_ids.setter
    def hios_ids(self, hios_ids):
        """
        Sets the hios_ids of this RequestProvidersSearch.
        List of HIOS ids

        :param hios_ids: The hios_ids of this RequestProvidersSearch.
        :type: list[str]
        """

        self._hios_ids = hios_ids

    @property
    def min_score(self):
        """
        Gets the min_score of this RequestProvidersSearch.
        Minimum search threshold to be included in the results

        :return: The min_score of this RequestProvidersSearch.
        :rtype: float
        """
        return self._min_score

    @min_score.setter
    def min_score(self, min_score):
        """
        Sets the min_score of this RequestProvidersSearch.
        Minimum search threshold to be included in the results

        :param min_score: The min_score of this RequestProvidersSearch.
        :type: float
        """

        self._min_score = min_score

    @property
    def page(self):
        """
        Gets the page of this RequestProvidersSearch.
        Page number

        :return: The page of this RequestProvidersSearch.
        :rtype: int
        """
        return self._page

    @page.setter
    def page(self, page):
        """
        Sets the page of this RequestProvidersSearch.
        Page number

        :param page: The page of this RequestProvidersSearch.
        :type: int
        """

        self._page = page

    @property
    def per_page(self):
        """
        Gets the per_page of this RequestProvidersSearch.
        Number of records to return per page

        :return: The per_page of this RequestProvidersSearch.
        :rtype: int
        """
        return self._per_page

    @per_page.setter
    def per_page(self, per_page):
        """
        Sets the per_page of this RequestProvidersSearch.
        Number of records to return per page

        :param per_page: The per_page of this RequestProvidersSearch.
        :type: int
        """

        self._per_page = per_page

    @property
    def radius(self):
        """
        Gets the radius of this RequestProvidersSearch.
        Radius (in miles) to use to limit results

        :return: The radius of this RequestProvidersSearch.
        :rtype: int
        """
        return self._radius

    @radius.setter
    def radius(self, radius):
        """
        Sets the radius of this RequestProvidersSearch.
        Radius (in miles) to use to limit results

        :param radius: The radius of this RequestProvidersSearch.
        :type: int
        """

        self._radius = radius

    @property
    def search_term(self):
        """
        Gets the search_term of this RequestProvidersSearch.
        String to search by

        :return: The search_term of this RequestProvidersSearch.
        :rtype: str
        """
        return self._search_term

    @search_term.setter
    def search_term(self, search_term):
        """
        Sets the search_term of this RequestProvidersSearch.
        String to search by

        :param search_term: The search_term of this RequestProvidersSearch.
        :type: str
        """

        self._search_term = search_term

    @property
    def zip_code(self):
        """
        Gets the zip_code of this RequestProvidersSearch.
        Zip Code to search near

        :return: The zip_code of this RequestProvidersSearch.
        :rtype: str
        """
        return self._zip_code

    @zip_code.setter
    def zip_code(self, zip_code):
        """
        Sets the zip_code of this RequestProvidersSearch.
        Zip Code to search near

        :param zip_code: The zip_code of this RequestProvidersSearch.
        :type: str
        """

        self._zip_code = zip_code

    @property
    def type(self):
        """
        Gets the type of this RequestProvidersSearch.
        Either organization or individual

        :return: The type of this RequestProvidersSearch.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this RequestProvidersSearch.
        Either organization or individual

        :param type: The type of this RequestProvidersSearch.
        :type: str
        """

        self._type = type

    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
        """
        return self.__dict__ == other.__dict__

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