1# coding=utf-8
2# --------------------------------------------------------------------------
3# Copyright (c) Microsoft Corporation. All rights reserved.
4# Licensed under the MIT License. See License.txt in the project root for
5# license information.
6#
7# Code generated by Microsoft (R) AutoRest Code Generator.
8# Changes may cause incorrect behavior and will be lost if the code is
9# regenerated.
10# --------------------------------------------------------------------------
11
12from msrest.serialization import Model
13
14
15class Trigger(Model):
16    """A condition to be satisfied for an action to be executed.
17
18    :param lifetime_percentage: Percentage of lifetime at which to trigger.
19     Value should be between 1 and 99.
20    :type lifetime_percentage: int
21    :param days_before_expiry: Days before expiry to attempt renewal. Value
22     should be between 1 and validity_in_months multiplied by 27. If
23     validity_in_months is 36, then value should be between 1 and 972 (36 *
24     27).
25    :type days_before_expiry: int
26    """
27
28    _validation = {
29        'lifetime_percentage': {'maximum': 99, 'minimum': 1},
30    }
31
32    _attribute_map = {
33        'lifetime_percentage': {'key': 'lifetime_percentage', 'type': 'int'},
34        'days_before_expiry': {'key': 'days_before_expiry', 'type': 'int'},
35    }
36
37    def __init__(self, **kwargs):
38        super(Trigger, self).__init__(**kwargs)
39        self.lifetime_percentage = kwargs.get('lifetime_percentage', None)
40        self.days_before_expiry = kwargs.get('days_before_expiry', None)
41