Skip to content

Commit

Permalink
Generated from 3b14442f6c54c0afa220c129b4e14346dd59e9b5 (#5955)
Browse files Browse the repository at this point in the history
add x-ms-examples for Autoscale
  • Loading branch information
AutorestCI authored Jun 25, 2019
1 parent 49dcd45 commit 0329d31
Show file tree
Hide file tree
Showing 4 changed files with 251 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
from ._models_py3 import ApplicationGetEndpoint
from ._models_py3 import ApplicationGetHttpsEndpoint
from ._models_py3 import ApplicationProperties
from ._models_py3 import Autoscale
from ._models_py3 import AutoscaleCapacity
from ._models_py3 import AutoscaleRecurrence
from ._models_py3 import AutoscaleSchedule
from ._models_py3 import AutoscaleTimeAndCapacity
from ._models_py3 import Cluster
from ._models_py3 import ClusterConfigurations
from ._models_py3 import ClusterCreateParametersExtended
Expand Down Expand Up @@ -69,6 +74,11 @@
from ._models import ApplicationGetEndpoint
from ._models import ApplicationGetHttpsEndpoint
from ._models import ApplicationProperties
from ._models import Autoscale
from ._models import AutoscaleCapacity
from ._models import AutoscaleRecurrence
from ._models import AutoscaleSchedule
from ._models import AutoscaleTimeAndCapacity
from ._models import Cluster
from ._models import ClusterConfigurations
from ._models import ClusterCreateParametersExtended
Expand Down Expand Up @@ -125,6 +135,7 @@
from ._paged_models import RuntimeScriptActionDetailPaged
from ._hd_insight_management_client_enums import (
DirectoryType,
DaysOfWeek,
OSType,
Tier,
JsonWebKeyEncryptionAlgorithm,
Expand All @@ -138,6 +149,11 @@
'ApplicationGetEndpoint',
'ApplicationGetHttpsEndpoint',
'ApplicationProperties',
'Autoscale',
'AutoscaleCapacity',
'AutoscaleRecurrence',
'AutoscaleSchedule',
'AutoscaleTimeAndCapacity',
'Cluster',
'ClusterConfigurations',
'ClusterCreateParametersExtended',
Expand Down Expand Up @@ -193,6 +209,7 @@
'RuntimeScriptActionDetailPaged',
'OperationPaged',
'DirectoryType',
'DaysOfWeek',
'OSType',
'Tier',
'JsonWebKeyEncryptionAlgorithm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ class DirectoryType(str, Enum):
active_directory = "ActiveDirectory"


class DaysOfWeek(str, Enum):

monday = "Monday"
tuesday = "Tuesday"
wednesday = "Wednesday"
thursday = "Thursday"
friday = "Friday"
saturday = "Saturday"
sunday = "Sunday"


class OSType(str, Enum):

windows = "Windows"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,113 @@ def __init__(self, **kwargs):
self.marketplace_identifier = None


class Autoscale(Model):
"""The autoscale request parameters.
:param capacity: Parameters for load-based autoscale
:type capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity
:param recurrence: Parameters for schedule-based autoscale
:type recurrence: ~azure.mgmt.hdinsight.models.AutoscaleRecurrence
"""

_attribute_map = {
'capacity': {'key': 'capacity', 'type': 'AutoscaleCapacity'},
'recurrence': {'key': 'recurrence', 'type': 'AutoscaleRecurrence'},
}

def __init__(self, **kwargs):
super(Autoscale, self).__init__(**kwargs)
self.capacity = kwargs.get('capacity', None)
self.recurrence = kwargs.get('recurrence', None)


class AutoscaleCapacity(Model):
"""The load-based autoscale request parameters.
:param min_instance_count: The minimum instance count of the cluster
:type min_instance_count: int
:param max_instance_count: The maximum instance count of the cluster
:type max_instance_count: int
"""

_attribute_map = {
'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'},
}

def __init__(self, **kwargs):
super(AutoscaleCapacity, self).__init__(**kwargs)
self.min_instance_count = kwargs.get('min_instance_count', None)
self.max_instance_count = kwargs.get('max_instance_count', None)


class AutoscaleRecurrence(Model):
"""Schedule-based autoscale request parameters.
:param time_zone: The time zone for the autoscale schedule times
:type time_zone: str
:param schedule: Array of schedule-based autoscale rules
:type schedule: list[~azure.mgmt.hdinsight.models.AutoscaleSchedule]
"""

_attribute_map = {
'time_zone': {'key': 'timeZone', 'type': 'str'},
'schedule': {'key': 'schedule', 'type': '[AutoscaleSchedule]'},
}

def __init__(self, **kwargs):
super(AutoscaleRecurrence, self).__init__(**kwargs)
self.time_zone = kwargs.get('time_zone', None)
self.schedule = kwargs.get('schedule', None)


class AutoscaleSchedule(Model):
"""Parameters for a schedule-based autoscale rule, consisting of an array of
days + a time and capacity.
:param days: Days of the week for a schedule-based autoscale rule
:type days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek]
:param time_and_capacity: Time and capacity for a schedule-based autoscale
rule
:type time_and_capacity:
~azure.mgmt.hdinsight.models.AutoscaleTimeAndCapacity
"""

_attribute_map = {
'days': {'key': 'days', 'type': '[DaysOfWeek]'},
'time_and_capacity': {'key': 'timeAndCapacity', 'type': 'AutoscaleTimeAndCapacity'},
}

def __init__(self, **kwargs):
super(AutoscaleSchedule, self).__init__(**kwargs)
self.days = kwargs.get('days', None)
self.time_and_capacity = kwargs.get('time_and_capacity', None)


class AutoscaleTimeAndCapacity(Model):
"""Time and capacity request parameters.
:param time: 24-hour time in the form xx:xx
:type time: str
:param min_instance_count: The minimum instance count of the cluster
:type min_instance_count: int
:param max_instance_count: The maximum instance count of the cluster
:type max_instance_count: int
"""

_attribute_map = {
'time': {'key': 'time', 'type': 'str'},
'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'},
}

def __init__(self, **kwargs):
super(AutoscaleTimeAndCapacity, self).__init__(**kwargs)
self.time = kwargs.get('time', None)
self.min_instance_count = kwargs.get('min_instance_count', None)
self.max_instance_count = kwargs.get('max_instance_count', None)


class CloudError(Model):
"""CloudError.
"""
Expand Down Expand Up @@ -1188,6 +1295,8 @@ class Role(Model):
:type min_instance_count: int
:param target_instance_count: The instance count of the cluster.
:type target_instance_count: int
:param autoscale_configuration: The autoscale configurations.
:type autoscale_configuration: ~azure.mgmt.hdinsight.models.Autoscale
:param hardware_profile: The hardware profile.
:type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile
:param os_profile: The operating system profile.
Expand All @@ -1206,6 +1315,7 @@ class Role(Model):
'name': {'key': 'name', 'type': 'str'},
'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'},
'autoscale_configuration': {'key': 'autoscale', 'type': 'Autoscale'},
'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'},
'os_profile': {'key': 'osProfile', 'type': 'OsProfile'},
'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'},
Expand All @@ -1218,6 +1328,7 @@ def __init__(self, **kwargs):
self.name = kwargs.get('name', None)
self.min_instance_count = kwargs.get('min_instance_count', None)
self.target_instance_count = kwargs.get('target_instance_count', None)
self.autoscale_configuration = kwargs.get('autoscale_configuration', None)
self.hardware_profile = kwargs.get('hardware_profile', None)
self.os_profile = kwargs.get('os_profile', None)
self.virtual_network_profile = kwargs.get('virtual_network_profile', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,113 @@ def __init__(self, *, compute_profile=None, install_script_actions=None, uninsta
self.marketplace_identifier = None


class Autoscale(Model):
"""The autoscale request parameters.
:param capacity: Parameters for load-based autoscale
:type capacity: ~azure.mgmt.hdinsight.models.AutoscaleCapacity
:param recurrence: Parameters for schedule-based autoscale
:type recurrence: ~azure.mgmt.hdinsight.models.AutoscaleRecurrence
"""

_attribute_map = {
'capacity': {'key': 'capacity', 'type': 'AutoscaleCapacity'},
'recurrence': {'key': 'recurrence', 'type': 'AutoscaleRecurrence'},
}

def __init__(self, *, capacity=None, recurrence=None, **kwargs) -> None:
super(Autoscale, self).__init__(**kwargs)
self.capacity = capacity
self.recurrence = recurrence


class AutoscaleCapacity(Model):
"""The load-based autoscale request parameters.
:param min_instance_count: The minimum instance count of the cluster
:type min_instance_count: int
:param max_instance_count: The maximum instance count of the cluster
:type max_instance_count: int
"""

_attribute_map = {
'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'},
}

def __init__(self, *, min_instance_count: int=None, max_instance_count: int=None, **kwargs) -> None:
super(AutoscaleCapacity, self).__init__(**kwargs)
self.min_instance_count = min_instance_count
self.max_instance_count = max_instance_count


class AutoscaleRecurrence(Model):
"""Schedule-based autoscale request parameters.
:param time_zone: The time zone for the autoscale schedule times
:type time_zone: str
:param schedule: Array of schedule-based autoscale rules
:type schedule: list[~azure.mgmt.hdinsight.models.AutoscaleSchedule]
"""

_attribute_map = {
'time_zone': {'key': 'timeZone', 'type': 'str'},
'schedule': {'key': 'schedule', 'type': '[AutoscaleSchedule]'},
}

def __init__(self, *, time_zone: str=None, schedule=None, **kwargs) -> None:
super(AutoscaleRecurrence, self).__init__(**kwargs)
self.time_zone = time_zone
self.schedule = schedule


class AutoscaleSchedule(Model):
"""Parameters for a schedule-based autoscale rule, consisting of an array of
days + a time and capacity.
:param days: Days of the week for a schedule-based autoscale rule
:type days: list[str or ~azure.mgmt.hdinsight.models.DaysOfWeek]
:param time_and_capacity: Time and capacity for a schedule-based autoscale
rule
:type time_and_capacity:
~azure.mgmt.hdinsight.models.AutoscaleTimeAndCapacity
"""

_attribute_map = {
'days': {'key': 'days', 'type': '[DaysOfWeek]'},
'time_and_capacity': {'key': 'timeAndCapacity', 'type': 'AutoscaleTimeAndCapacity'},
}

def __init__(self, *, days=None, time_and_capacity=None, **kwargs) -> None:
super(AutoscaleSchedule, self).__init__(**kwargs)
self.days = days
self.time_and_capacity = time_and_capacity


class AutoscaleTimeAndCapacity(Model):
"""Time and capacity request parameters.
:param time: 24-hour time in the form xx:xx
:type time: str
:param min_instance_count: The minimum instance count of the cluster
:type min_instance_count: int
:param max_instance_count: The maximum instance count of the cluster
:type max_instance_count: int
"""

_attribute_map = {
'time': {'key': 'time', 'type': 'str'},
'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
'max_instance_count': {'key': 'maxInstanceCount', 'type': 'int'},
}

def __init__(self, *, time: str=None, min_instance_count: int=None, max_instance_count: int=None, **kwargs) -> None:
super(AutoscaleTimeAndCapacity, self).__init__(**kwargs)
self.time = time
self.min_instance_count = min_instance_count
self.max_instance_count = max_instance_count


class CloudError(Model):
"""CloudError.
"""
Expand Down Expand Up @@ -1188,6 +1295,8 @@ class Role(Model):
:type min_instance_count: int
:param target_instance_count: The instance count of the cluster.
:type target_instance_count: int
:param autoscale_configuration: The autoscale configurations.
:type autoscale_configuration: ~azure.mgmt.hdinsight.models.Autoscale
:param hardware_profile: The hardware profile.
:type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile
:param os_profile: The operating system profile.
Expand All @@ -1206,18 +1315,20 @@ class Role(Model):
'name': {'key': 'name', 'type': 'str'},
'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'},
'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'},
'autoscale_configuration': {'key': 'autoscale', 'type': 'Autoscale'},
'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'},
'os_profile': {'key': 'osProfile', 'type': 'OsProfile'},
'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'},
'data_disks_groups': {'key': 'dataDisksGroups', 'type': '[DataDisksGroups]'},
'script_actions': {'key': 'scriptActions', 'type': '[ScriptAction]'},
}

def __init__(self, *, name: str=None, min_instance_count: int=None, target_instance_count: int=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None, **kwargs) -> None:
def __init__(self, *, name: str=None, min_instance_count: int=None, target_instance_count: int=None, autoscale_configuration=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None, **kwargs) -> None:
super(Role, self).__init__(**kwargs)
self.name = name
self.min_instance_count = min_instance_count
self.target_instance_count = target_instance_count
self.autoscale_configuration = autoscale_configuration
self.hardware_profile = hardware_profile
self.os_profile = os_profile
self.virtual_network_profile = virtual_network_profile
Expand Down

0 comments on commit 0329d31

Please sign in to comment.