From dce1c02abf125e3c8b9d0f206f977b2518f7267e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 18 Jul 2019 10:04:07 +0000 Subject: [PATCH 1/3] Generated from 6fd28f5f0db51b2cf7a71835ac10e3dc2c4cb390 Add Capabilities to stable version, Modify ApplicationType and AccessMode to Enum. In order to be consistent with the response from RP side, add suppression for DefinitionsPropertiesNamesCamelCase --- .../azure/mgmt/hdinsight/models/__init__.py | 28 +++ .../_hd_insight_management_client_enums.py | 11 + .../azure/mgmt/hdinsight/models/_models.py | 199 ++++++++++++++++- .../mgmt/hdinsight/models/_models_py3.py | 201 +++++++++++++++++- .../operations/_locations_operations.py | 58 +++++ 5 files changed, 490 insertions(+), 7 deletions(-) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py index b559917fe865..a8f11e1c76da 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -22,6 +22,7 @@ from ._models_py3 import BillingMeters from ._models_py3 import BillingResources from ._models_py3 import BillingResponseListResult + from ._models_py3 import CapabilitiesResult from ._models_py3 import Cluster from ._models_py3 import ClusterConfigurations from ._models_py3 import ClusterCreateParametersExtended @@ -55,7 +56,10 @@ from ._models_py3 import OperationResource from ._models_py3 import OsProfile from ._models_py3 import ProxyResource + from ._models_py3 import QuotaCapability from ._models_py3 import QuotaInfo + from ._models_py3 import RegionalQuotaCapability + from ._models_py3 import RegionsCapability from ._models_py3 import Resource from ._models_py3 import Role from ._models_py3 import RuntimeScriptAction @@ -72,8 +76,12 @@ from ._models_py3 import UpdateGatewaySettingsParameters from ._models_py3 import Usage from ._models_py3 import UsagesListResult + from ._models_py3 import VersionsCapability + from ._models_py3 import VersionSpec from ._models_py3 import VirtualNetworkProfile + from ._models_py3 import VmSizeCompatibilityFilter from ._models_py3 import VmSizeCompatibilityFilterV2 + from ._models_py3 import VmSizesCapability except (SyntaxError, ImportError): from ._models import Application from ._models import ApplicationGetEndpoint @@ -87,6 +95,7 @@ from ._models import BillingMeters from ._models import BillingResources from ._models import BillingResponseListResult + from ._models import CapabilitiesResult from ._models import Cluster from ._models import ClusterConfigurations from ._models import ClusterCreateParametersExtended @@ -120,7 +129,10 @@ from ._models import OperationResource from ._models import OsProfile from ._models import ProxyResource + from ._models import QuotaCapability from ._models import QuotaInfo + from ._models import RegionalQuotaCapability + from ._models import RegionsCapability from ._models import Resource from ._models import Role from ._models import RuntimeScriptAction @@ -137,8 +149,12 @@ from ._models import UpdateGatewaySettingsParameters from ._models import Usage from ._models import UsagesListResult + from ._models import VersionsCapability + from ._models import VersionSpec from ._models import VirtualNetworkProfile + from ._models import VmSizeCompatibilityFilter from ._models import VmSizeCompatibilityFilterV2 + from ._models import VmSizesCapability from ._paged_models import ApplicationPaged from ._paged_models import ClusterPaged from ._paged_models import OperationPaged @@ -152,6 +168,8 @@ ResourceIdentityType, HDInsightClusterProvisioningState, AsyncOperationState, + ApplicationHttpsEndpointAccessMode, + ApplicationType, FilterMode, ) @@ -168,6 +186,7 @@ 'BillingMeters', 'BillingResources', 'BillingResponseListResult', + 'CapabilitiesResult', 'Cluster', 'ClusterConfigurations', 'ClusterCreateParametersExtended', @@ -201,7 +220,10 @@ 'OperationResource', 'OsProfile', 'ProxyResource', + 'QuotaCapability', 'QuotaInfo', + 'RegionalQuotaCapability', + 'RegionsCapability', 'Resource', 'Role', 'RuntimeScriptAction', @@ -218,8 +240,12 @@ 'UpdateGatewaySettingsParameters', 'Usage', 'UsagesListResult', + 'VersionsCapability', + 'VersionSpec', 'VirtualNetworkProfile', + 'VmSizeCompatibilityFilter', 'VmSizeCompatibilityFilterV2', + 'VmSizesCapability', 'ClusterPaged', 'ApplicationPaged', 'RuntimeScriptActionDetailPaged', @@ -232,5 +258,7 @@ 'ResourceIdentityType', 'HDInsightClusterProvisioningState', 'AsyncOperationState', + 'ApplicationHttpsEndpointAccessMode', + 'ApplicationType', 'FilterMode', ] diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py index 94a5c11f6993..fb336a78012d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_hd_insight_management_client_enums.py @@ -71,6 +71,17 @@ class AsyncOperationState(str, Enum): failed = "Failed" +class ApplicationHttpsEndpointAccessMode(str, Enum): + + web_page = "WebPage" + + +class ApplicationType(str, Enum): + + custom_application = "CustomApplication" + rserver = "RServer" + + class FilterMode(str, Enum): exclude = "Exclude" diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py index 49ac52a8e992..339fb01734fe 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py @@ -147,7 +147,8 @@ class ApplicationGetHttpsEndpoint(Model): """Gets the application HTTP endpoints. :param access_modes: The list of access modes for the application. - :type access_modes: list[str] + :type access_modes: list[str or + ~azure.mgmt.hdinsight.models.ApplicationHttpsEndpointAccessMode] :param location: The location of the endpoint. :type location: str :param destination_port: The destination port to connect to. @@ -202,8 +203,10 @@ class ApplicationProperties(Model): list[~azure.mgmt.hdinsight.models.ApplicationGetEndpoint] :ivar provisioning_state: The provisioning state of the application. :vartype provisioning_state: str - :param application_type: The application type. - :type application_type: str + :param application_type: The application type. Possible values include: + 'CustomApplication', 'RServer' + :type application_type: str or + ~azure.mgmt.hdinsight.models.ApplicationType :ivar application_state: The application state. :vartype application_state: str :param errors: The list of errors. @@ -436,6 +439,43 @@ def __init__(self, **kwargs): self.billing_resources = kwargs.get('billing_resources', None) +class CapabilitiesResult(Model): + """The Get Capabilities operation response. + + :param versions: The version capability. + :type versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability] + :param regions: The virtual machine size compatibility features. + :type regions: dict[str, ~azure.mgmt.hdinsight.models.RegionsCapability] + :param vm_sizes: The virtual machine sizes. + :type vm_sizes: dict[str, ~azure.mgmt.hdinsight.models.VmSizesCapability] + :param vm_size_filters: The virtual machine size compatibility filters. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilter] + :param features: The capability features. + :type features: list[str] + :param quota: The quota capability. + :type quota: ~azure.mgmt.hdinsight.models.QuotaCapability + """ + + _attribute_map = { + 'versions': {'key': 'versions', 'type': '{VersionsCapability}'}, + 'regions': {'key': 'regions', 'type': '{RegionsCapability}'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '{VmSizesCapability}'}, + 'vm_size_filters': {'key': 'vmSize_filters', 'type': '[VmSizeCompatibilityFilter]'}, + 'features': {'key': 'features', 'type': '[str]'}, + 'quota': {'key': 'quota', 'type': 'QuotaCapability'}, + } + + def __init__(self, **kwargs): + super(CapabilitiesResult, self).__init__(**kwargs) + self.versions = kwargs.get('versions', None) + self.regions = kwargs.get('regions', None) + self.vm_sizes = kwargs.get('vm_sizes', None) + self.vm_size_filters = kwargs.get('vm_size_filters', None) + self.features = kwargs.get('features', None) + self.quota = kwargs.get('quota', None) + + class CloudError(Model): """CloudError. """ @@ -1374,6 +1414,23 @@ def __init__(self, **kwargs): self.linux_operating_system_profile = kwargs.get('linux_operating_system_profile', None) +class QuotaCapability(Model): + """The regional quota capability. + + :param regional_quotas: The list of region quota capabilities. + :type regional_quotas: + list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] + """ + + _attribute_map = { + 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, + } + + def __init__(self, **kwargs): + super(QuotaCapability, self).__init__(**kwargs) + self.regional_quotas = kwargs.get('regional_quotas', None) + + class QuotaInfo(Model): """The quota properties for the cluster. @@ -1390,6 +1447,46 @@ def __init__(self, **kwargs): self.cores_used = kwargs.get('cores_used', None) +class RegionalQuotaCapability(Model): + """The regional quota capacity. + + :param region_name: The region name. + :type region_name: str + :param cores_used: The number of cores used in the region. + :type cores_used: long + :param cores_available: The number of cores available in the region. + :type cores_available: long + """ + + _attribute_map = { + 'region_name': {'key': 'region_name', 'type': 'str'}, + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'cores_available': {'key': 'cores_available', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(RegionalQuotaCapability, self).__init__(**kwargs) + self.region_name = kwargs.get('region_name', None) + self.cores_used = kwargs.get('cores_used', None) + self.cores_available = kwargs.get('cores_available', None) + + +class RegionsCapability(Model): + """The regions capability. + + :param available: The list of region capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RegionsCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) + + class Role(Model): """Describes a role on the cluster. @@ -1871,6 +1968,50 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class VersionsCapability(Model): + """The version capability. + + :param available: The list of version capabilities. + :type available: list[~azure.mgmt.hdinsight.models.VersionSpec] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[VersionSpec]'}, + } + + def __init__(self, **kwargs): + super(VersionsCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) + + +class VersionSpec(Model): + """The version properties. + + :param friendly_name: The friendly name + :type friendly_name: str + :param display_name: The display name + :type display_name: str + :param is_default: Whether or not the version is the default version. + :type is_default: str + :param component_versions: The component version property. + :type component_versions: dict[str, str] + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'str'}, + 'component_versions': {'key': 'componentVersions', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VersionSpec, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.display_name = kwargs.get('display_name', None) + self.is_default = kwargs.get('is_default', None) + self.component_versions = kwargs.get('component_versions', None) + + class VirtualNetworkProfile(Model): """The virtual network properties. @@ -1891,6 +2032,42 @@ def __init__(self, **kwargs): self.subnet = kwargs.get('subnet', None) +class VmSizeCompatibilityFilter(Model): + """The virtual machine type compatibility filter. + + :param filter_mode: The mode for the filter. + :type filter_mode: str + :param regions: The list of regions. + :type regions: list[str] + :param cluster_flavors: The list of cluster types available. + :type cluster_flavors: list[str] + :param node_types: The list of node types. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions. + :type cluster_versions: list[str] + :param vmsizes: The list of virtual machine sizes. + :type vmsizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'FilterMode', 'type': 'str'}, + 'regions': {'key': 'Regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'ClusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'NodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'ClusterVersions', 'type': '[str]'}, + 'vmsizes': {'key': 'vmsizes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VmSizeCompatibilityFilter, self).__init__(**kwargs) + self.filter_mode = kwargs.get('filter_mode', None) + self.regions = kwargs.get('regions', None) + self.cluster_flavors = kwargs.get('cluster_flavors', None) + self.node_types = kwargs.get('node_types', None) + self.cluster_versions = kwargs.get('cluster_versions', None) + self.vmsizes = kwargs.get('vmsizes', None) + + class VmSizeCompatibilityFilterV2(Model): """This class represent a single filter object that defines a multidimensional set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and @@ -1938,3 +2115,19 @@ def __init__(self, **kwargs): self.cluster_versions = kwargs.get('cluster_versions', None) self.os_type = kwargs.get('os_type', None) self.vm_sizes = kwargs.get('vm_sizes', None) + + +class VmSizesCapability(Model): + """The virtual machine sizes capability. + + :param available: The list of virtual machine size capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VmSizesCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py index b5bc3646d7d9..3b9ba9efd8e5 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py @@ -147,7 +147,8 @@ class ApplicationGetHttpsEndpoint(Model): """Gets the application HTTP endpoints. :param access_modes: The list of access modes for the application. - :type access_modes: list[str] + :type access_modes: list[str or + ~azure.mgmt.hdinsight.models.ApplicationHttpsEndpointAccessMode] :param location: The location of the endpoint. :type location: str :param destination_port: The destination port to connect to. @@ -202,8 +203,10 @@ class ApplicationProperties(Model): list[~azure.mgmt.hdinsight.models.ApplicationGetEndpoint] :ivar provisioning_state: The provisioning state of the application. :vartype provisioning_state: str - :param application_type: The application type. - :type application_type: str + :param application_type: The application type. Possible values include: + 'CustomApplication', 'RServer' + :type application_type: str or + ~azure.mgmt.hdinsight.models.ApplicationType :ivar application_state: The application state. :vartype application_state: str :param errors: The list of errors. @@ -235,7 +238,7 @@ class ApplicationProperties(Model): 'marketplace_identifier': {'key': 'marketplaceIdentifier', 'type': 'str'}, } - def __init__(self, *, compute_profile=None, install_script_actions=None, uninstall_script_actions=None, https_endpoints=None, ssh_endpoints=None, application_type: str=None, errors=None, **kwargs) -> None: + def __init__(self, *, compute_profile=None, install_script_actions=None, uninstall_script_actions=None, https_endpoints=None, ssh_endpoints=None, application_type=None, errors=None, **kwargs) -> None: super(ApplicationProperties, self).__init__(**kwargs) self.compute_profile = compute_profile self.install_script_actions = install_script_actions @@ -436,6 +439,43 @@ def __init__(self, *, vm_sizes=None, vm_size_filters=None, billing_resources=Non self.billing_resources = billing_resources +class CapabilitiesResult(Model): + """The Get Capabilities operation response. + + :param versions: The version capability. + :type versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability] + :param regions: The virtual machine size compatibility features. + :type regions: dict[str, ~azure.mgmt.hdinsight.models.RegionsCapability] + :param vm_sizes: The virtual machine sizes. + :type vm_sizes: dict[str, ~azure.mgmt.hdinsight.models.VmSizesCapability] + :param vm_size_filters: The virtual machine size compatibility filters. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilter] + :param features: The capability features. + :type features: list[str] + :param quota: The quota capability. + :type quota: ~azure.mgmt.hdinsight.models.QuotaCapability + """ + + _attribute_map = { + 'versions': {'key': 'versions', 'type': '{VersionsCapability}'}, + 'regions': {'key': 'regions', 'type': '{RegionsCapability}'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '{VmSizesCapability}'}, + 'vm_size_filters': {'key': 'vmSize_filters', 'type': '[VmSizeCompatibilityFilter]'}, + 'features': {'key': 'features', 'type': '[str]'}, + 'quota': {'key': 'quota', 'type': 'QuotaCapability'}, + } + + def __init__(self, *, versions=None, regions=None, vm_sizes=None, vm_size_filters=None, features=None, quota=None, **kwargs) -> None: + super(CapabilitiesResult, self).__init__(**kwargs) + self.versions = versions + self.regions = regions + self.vm_sizes = vm_sizes + self.vm_size_filters = vm_size_filters + self.features = features + self.quota = quota + + class CloudError(Model): """CloudError. """ @@ -1374,6 +1414,23 @@ def __init__(self, *, linux_operating_system_profile=None, **kwargs) -> None: self.linux_operating_system_profile = linux_operating_system_profile +class QuotaCapability(Model): + """The regional quota capability. + + :param regional_quotas: The list of region quota capabilities. + :type regional_quotas: + list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] + """ + + _attribute_map = { + 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, + } + + def __init__(self, *, regional_quotas=None, **kwargs) -> None: + super(QuotaCapability, self).__init__(**kwargs) + self.regional_quotas = regional_quotas + + class QuotaInfo(Model): """The quota properties for the cluster. @@ -1390,6 +1447,46 @@ def __init__(self, *, cores_used: int=None, **kwargs) -> None: self.cores_used = cores_used +class RegionalQuotaCapability(Model): + """The regional quota capacity. + + :param region_name: The region name. + :type region_name: str + :param cores_used: The number of cores used in the region. + :type cores_used: long + :param cores_available: The number of cores available in the region. + :type cores_available: long + """ + + _attribute_map = { + 'region_name': {'key': 'region_name', 'type': 'str'}, + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'cores_available': {'key': 'cores_available', 'type': 'long'}, + } + + def __init__(self, *, region_name: str=None, cores_used: int=None, cores_available: int=None, **kwargs) -> None: + super(RegionalQuotaCapability, self).__init__(**kwargs) + self.region_name = region_name + self.cores_used = cores_used + self.cores_available = cores_available + + +class RegionsCapability(Model): + """The regions capability. + + :param available: The list of region capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(RegionsCapability, self).__init__(**kwargs) + self.available = available + + class Role(Model): """Describes a role on the cluster. @@ -1871,6 +1968,50 @@ def __init__(self, *, value=None, **kwargs) -> None: self.value = value +class VersionsCapability(Model): + """The version capability. + + :param available: The list of version capabilities. + :type available: list[~azure.mgmt.hdinsight.models.VersionSpec] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[VersionSpec]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(VersionsCapability, self).__init__(**kwargs) + self.available = available + + +class VersionSpec(Model): + """The version properties. + + :param friendly_name: The friendly name + :type friendly_name: str + :param display_name: The display name + :type display_name: str + :param is_default: Whether or not the version is the default version. + :type is_default: str + :param component_versions: The component version property. + :type component_versions: dict[str, str] + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'str'}, + 'component_versions': {'key': 'componentVersions', 'type': '{str}'}, + } + + def __init__(self, *, friendly_name: str=None, display_name: str=None, is_default: str=None, component_versions=None, **kwargs) -> None: + super(VersionSpec, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.display_name = display_name + self.is_default = is_default + self.component_versions = component_versions + + class VirtualNetworkProfile(Model): """The virtual network properties. @@ -1891,6 +2032,42 @@ def __init__(self, *, id: str=None, subnet: str=None, **kwargs) -> None: self.subnet = subnet +class VmSizeCompatibilityFilter(Model): + """The virtual machine type compatibility filter. + + :param filter_mode: The mode for the filter. + :type filter_mode: str + :param regions: The list of regions. + :type regions: list[str] + :param cluster_flavors: The list of cluster types available. + :type cluster_flavors: list[str] + :param node_types: The list of node types. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions. + :type cluster_versions: list[str] + :param vmsizes: The list of virtual machine sizes. + :type vmsizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'FilterMode', 'type': 'str'}, + 'regions': {'key': 'Regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'ClusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'NodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'ClusterVersions', 'type': '[str]'}, + 'vmsizes': {'key': 'vmsizes', 'type': '[str]'}, + } + + def __init__(self, *, filter_mode: str=None, regions=None, cluster_flavors=None, node_types=None, cluster_versions=None, vmsizes=None, **kwargs) -> None: + super(VmSizeCompatibilityFilter, self).__init__(**kwargs) + self.filter_mode = filter_mode + self.regions = regions + self.cluster_flavors = cluster_flavors + self.node_types = node_types + self.cluster_versions = cluster_versions + self.vmsizes = vmsizes + + class VmSizeCompatibilityFilterV2(Model): """This class represent a single filter object that defines a multidimensional set. The dimensions of this set are Regions, ClusterFlavors, NodeTypes and @@ -1938,3 +2115,19 @@ def __init__(self, *, filter_mode=None, regions=None, cluster_flavors=None, node self.cluster_versions = cluster_versions self.os_type = os_type self.vm_sizes = vm_sizes + + +class VmSizesCapability(Model): + """The virtual machine sizes capability. + + :param available: The list of virtual machine size capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(VmSizesCapability, self).__init__(**kwargs) + self.available = available diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py index 5ef757d34b8c..3c9b45ec033d 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/_locations_operations.py @@ -38,6 +38,64 @@ def __init__(self, client, config, serializer, deserializer): self.config = config + def get_capabilities( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the capabilities for the specified location. + + :param location: The Azure location (region) for which to make the + request. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CapabilitiesResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.CapabilitiesResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_capabilities.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('CapabilitiesResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities'} + def list_usages( self, location, custom_headers=None, raw=False, **operation_config): """Lists the usages for the specified location. From 294f775494a92189a518996b2e1670aa131c108b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 19 Jul 2019 02:03:15 +0000 Subject: [PATCH 2/3] Generated from cef6f97615ded43f65dab5eda4a5837d5ec45621 Add Capabilities to stable version, Modify ApplicationType and AccessMode to Enum. In order to be consistent with the response from RP side, add suppression for DefinitionsPropertiesNamesCamelCase --- .../azure/mgmt/hdinsight/models/_models.py | 9 +++++++++ .../azure/mgmt/hdinsight/models/_models_py3.py | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py index 339fb01734fe..519ae8d78f85 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py @@ -1417,17 +1417,26 @@ def __init__(self, **kwargs): class QuotaCapability(Model): """The regional quota capability. + :param cores_used: The number of cores used in the subscription. + :type cores_used: long + :param max_cores_allowed: The number of cores that the subscription + allowed. + :type max_cores_allowed: long :param regional_quotas: The list of region quota capabilities. :type regional_quotas: list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] """ _attribute_map = { + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'max_cores_allowed': {'key': 'max_cores_allowed', 'type': 'long'}, 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, } def __init__(self, **kwargs): super(QuotaCapability, self).__init__(**kwargs) + self.cores_used = kwargs.get('cores_used', None) + self.max_cores_allowed = kwargs.get('max_cores_allowed', None) self.regional_quotas = kwargs.get('regional_quotas', None) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py index 3b9ba9efd8e5..12305c2411bc 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py @@ -1417,17 +1417,26 @@ def __init__(self, *, linux_operating_system_profile=None, **kwargs) -> None: class QuotaCapability(Model): """The regional quota capability. + :param cores_used: The number of cores used in the subscription. + :type cores_used: long + :param max_cores_allowed: The number of cores that the subscription + allowed. + :type max_cores_allowed: long :param regional_quotas: The list of region quota capabilities. :type regional_quotas: list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] """ _attribute_map = { + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'max_cores_allowed': {'key': 'max_cores_allowed', 'type': 'long'}, 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, } - def __init__(self, *, regional_quotas=None, **kwargs) -> None: + def __init__(self, *, cores_used: int=None, max_cores_allowed: int=None, regional_quotas=None, **kwargs) -> None: super(QuotaCapability, self).__init__(**kwargs) + self.cores_used = cores_used + self.max_cores_allowed = max_cores_allowed self.regional_quotas = regional_quotas From 0dbac8ae14c5fc70cfe319ab9ed2608aac851768 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 25 Jul 2019 02:33:59 +0000 Subject: [PATCH 3/3] Generated from a22cf02eb2898daaac88819d82f4ccc1fba62a75 Add Capabilities to stable version, Modify ApplicationType and AccessMode to Enum. In order to be consistent with the response from RP side, add suppression for DefinitionsPropertiesNamesCamelCase --- .../azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py | 2 +- .../azure/mgmt/hdinsight/models/_models_py3.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py index 519ae8d78f85..d25ef85c7d88 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models.py @@ -155,7 +155,7 @@ class ApplicationGetHttpsEndpoint(Model): :type destination_port: int :param public_port: The public port to connect to. :type public_port: int - :param sub_domain_suffix: The subDomainSuffix of the application. + :param sub_domain_suffix: The subdomain suffix of the application. :type sub_domain_suffix: str :param disable_gateway_auth: The value indicates whether to disable GatewayAuth. diff --git a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py index 12305c2411bc..c9de03666896 100644 --- a/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py +++ b/sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/_models_py3.py @@ -155,7 +155,7 @@ class ApplicationGetHttpsEndpoint(Model): :type destination_port: int :param public_port: The public port to connect to. :type public_port: int - :param sub_domain_suffix: The subDomainSuffix of the application. + :param sub_domain_suffix: The subdomain suffix of the application. :type sub_domain_suffix: str :param disable_gateway_auth: The value indicates whether to disable GatewayAuth.