Skip to content

Commit

Permalink
Generated from 6110295138cbd6959df204de3830b4ada943a4fc (#2970)
Browse files Browse the repository at this point in the history
updated description of recurrent frequency
  • Loading branch information
AutorestCI authored Jul 20, 2018
1 parent 9903763 commit 1802b26
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
2 changes: 0 additions & 2 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@
ComparisonOperationType,
ScaleDirection,
ScaleType,
RecurrenceFrequency,
ConditionOperator,
TimeAggregationOperator,
CategoryType,
Expand Down Expand Up @@ -351,7 +350,6 @@
'ComparisonOperationType',
'ScaleDirection',
'ScaleType',
'RecurrenceFrequency',
'ConditionOperator',
'TimeAggregationOperator',
'CategoryType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@ class ScaleType(str, Enum):
exact_count = "ExactCount"


class RecurrenceFrequency(str, Enum):

none = "None"
second = "Second"
minute = "Minute"
hour = "Hour"
day = "Day"
week = "Week"
month = "Month"
year = "Year"


class ConditionOperator(str, Enum):

greater_than = "GreaterThan"
Expand Down
20 changes: 13 additions & 7 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,35 @@ class Recurrence(Model):
"""The repeating times at which this profile begins. This element is not used
if the FixedDate element is used.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param frequency: Required. the recurrence frequency. How often the
:ivar frequency: Required. the recurrence frequency. How often the
schedule profile should take effect. This value must be Week, meaning each
week will have the same set of profiles. Possible values include: 'None',
'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year'
:type frequency: str or ~azure.mgmt.monitor.models.RecurrenceFrequency
week will have the same set of profiles. For example, to set a daily
schedule, set **schedule** to every day of the week. The frequency
property specifies that the schedule is repeated weekly. Default value:
"Week" .
:vartype frequency: str
:param schedule: Required. the scheduling constraints for when the profile
begins.
:type schedule: ~azure.mgmt.monitor.models.RecurrentSchedule
"""

_validation = {
'frequency': {'required': True},
'frequency': {'required': True, 'constant': True},
'schedule': {'required': True},
}

_attribute_map = {
'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'},
'frequency': {'key': 'frequency', 'type': 'str'},
'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'},
}

frequency = "Week"

def __init__(self, **kwargs):
super(Recurrence, self).__init__(**kwargs)
self.frequency = kwargs.get('frequency', None)
self.schedule = kwargs.get('schedule', None)
22 changes: 14 additions & 8 deletions azure-mgmt-monitor/azure/mgmt/monitor/models/recurrence_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,35 @@ class Recurrence(Model):
"""The repeating times at which this profile begins. This element is not used
if the FixedDate element is used.
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param frequency: Required. the recurrence frequency. How often the
:ivar frequency: Required. the recurrence frequency. How often the
schedule profile should take effect. This value must be Week, meaning each
week will have the same set of profiles. Possible values include: 'None',
'Second', 'Minute', 'Hour', 'Day', 'Week', 'Month', 'Year'
:type frequency: str or ~azure.mgmt.monitor.models.RecurrenceFrequency
week will have the same set of profiles. For example, to set a daily
schedule, set **schedule** to every day of the week. The frequency
property specifies that the schedule is repeated weekly. Default value:
"Week" .
:vartype frequency: str
:param schedule: Required. the scheduling constraints for when the profile
begins.
:type schedule: ~azure.mgmt.monitor.models.RecurrentSchedule
"""

_validation = {
'frequency': {'required': True},
'frequency': {'required': True, 'constant': True},
'schedule': {'required': True},
}

_attribute_map = {
'frequency': {'key': 'frequency', 'type': 'RecurrenceFrequency'},
'frequency': {'key': 'frequency', 'type': 'str'},
'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'},
}

def __init__(self, *, frequency, schedule, **kwargs) -> None:
frequency = "Week"

def __init__(self, *, schedule, **kwargs) -> None:
super(Recurrence, self).__init__(**kwargs)
self.frequency = frequency
self.schedule = schedule

0 comments on commit 1802b26

Please sign in to comment.