# 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 msrest.serialization import Model


class AdiEmsWebApiV2ModelAnalyticOffsetType(Model):
    """Class for determining which offsets to sample an analytic at.

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

    :param type: Required. Determines the way to retrieve samples for an
     analytic query. Possible values include: 'sampledValues', 'fixedRate'
    :type type: str or ~emsapi.models.enum
    :param sampling_rate: Offsets are calculated using this sampling rate when
     using 'FixedRate' sampling type.
    :type sampling_rate: float
    """

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

    _attribute_map = {
        'type': {'key': 'type', 'type': 'str'},
        'sampling_rate': {'key': 'samplingRate', 'type': 'float'},
    }

    def __init__(self, **kwargs):
        super(AdiEmsWebApiV2ModelAnalyticOffsetType, self).__init__(**kwargs)
        self.type = kwargs.get('type', None)
        self.sampling_rate = kwargs.get('sampling_rate', None)
