# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .condition_base import ConditionBase


class GeoCondition(ConditionBase):
    """Defines a condition that applies on a geo-location field. It can appear in
    a filter, a boost, or a filter aggregation.

    All required parameters must be populated in order to send to Azure.

    :param _type: Required. Constant filled by server.
    :type _type: str
    :param boundary: The geo-bondary to match the results against.
    :type boundary: ~microsoft.bing.commerce.search.models.GeoBoundaryBase
    """

    _validation = {
        '_type': {'required': True},
    }

    _attribute_map = {
        '_type': {'key': '_type', 'type': 'str'},
        'boundary': {'key': 'boundary', 'type': 'GeoBoundaryBase'},
    }

    def __init__(self, **kwargs):
        super(GeoCondition, self).__init__(**kwargs)
        self.boundary = kwargs.get('boundary', None)
        self._type = 'GeoCondition'
