Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-hybridnetwork] Update device discriminator model #7654

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/hybridnetwork/azure-mgmt-hybridnetwork/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/python@5.8.4",
"@autorest/modelerfour@4.19.2"
],
"commit": "a2d4dc4b1296624eefd4b5c235d56af46f7c39d2",
"commit": "59d53bbafb211503eac3e9bedb8c918d88d1fb47",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/hybridnetwork/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5",
"readme": "specification/hybridnetwork/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# --------------------------------------------------------------------------

try:
from ._models_py3 import AzureStackEdgeFormat
from ._models_py3 import CustomProfile
from ._models_py3 import DataDisk
from ._models_py3 import Device
Expand Down Expand Up @@ -59,6 +60,7 @@
from ._models_py3 import VendorSkuListResult
from ._models_py3 import VirtualHardDisk
except (SyntaxError, ImportError):
from ._models import AzureStackEdgeFormat # type: ignore
from ._models import CustomProfile # type: ignore
from ._models import DataDisk # type: ignore
from ._models import Device # type: ignore
Expand Down Expand Up @@ -131,6 +133,7 @@
)

__all__ = [
'AzureStackEdgeFormat',
'CustomProfile',
'DataDisk',
'Device',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,105 @@
import msrest.serialization


class DevicePropertiesFormat(msrest.serialization.Model):
"""Device properties.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: AzureStackEdgeFormat.

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.

:ivar status: The current device status. Possible values include: "Unknown", "NotRegistered",
"Registered", "Deleted".
:vartype status: str or ~hybrid_network_management_client.models.Status
:ivar provisioning_state: The provisioning state of the device resource. Possible values
include: "Unknown", "Succeeded", "Accepted", "Deleting", "Failed", "Canceled", "Deleted".
:vartype provisioning_state: str or ~hybrid_network_management_client.models.ProvisioningState
:param device_type: Required. The type of the device.Constant filled by server. Possible
values include: "Unknown", "AzureStackEdge".
:type device_type: str or ~hybrid_network_management_client.models.DeviceType
:ivar network_functions: The list of network functions deployed on the device.
:vartype network_functions: list[~hybrid_network_management_client.models.SubResource]
"""

_validation = {
'status': {'readonly': True},
'provisioning_state': {'readonly': True},
'device_type': {'required': True},
'network_functions': {'readonly': True},
}

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
'device_type': {'key': 'deviceType', 'type': 'str'},
'network_functions': {'key': 'networkFunctions', 'type': '[SubResource]'},
}

_subtype_map = {
'device_type': {'AzureStackEdge': 'AzureStackEdgeFormat'}
}

def __init__(
self,
**kwargs
):
super(DevicePropertiesFormat, self).__init__(**kwargs)
self.status = None
self.provisioning_state = None
self.device_type = None # type: Optional[str]
self.network_functions = None


class AzureStackEdgeFormat(DevicePropertiesFormat):
"""The reference to the Azure stack edge device.

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.

:ivar status: The current device status. Possible values include: "Unknown", "NotRegistered",
"Registered", "Deleted".
:vartype status: str or ~hybrid_network_management_client.models.Status
:ivar provisioning_state: The provisioning state of the device resource. Possible values
include: "Unknown", "Succeeded", "Accepted", "Deleting", "Failed", "Canceled", "Deleted".
:vartype provisioning_state: str or ~hybrid_network_management_client.models.ProvisioningState
:param device_type: Required. The type of the device.Constant filled by server. Possible
values include: "Unknown", "AzureStackEdge".
:type device_type: str or ~hybrid_network_management_client.models.DeviceType
:ivar network_functions: The list of network functions deployed on the device.
:vartype network_functions: list[~hybrid_network_management_client.models.SubResource]
:param azure_stack_edge: Required. The reference to the Azure stack edge device.
:type azure_stack_edge: ~hybrid_network_management_client.models.SubResource
"""

_validation = {
'status': {'readonly': True},
'provisioning_state': {'readonly': True},
'device_type': {'required': True},
'network_functions': {'readonly': True},
'azure_stack_edge': {'required': True},
}

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
'device_type': {'key': 'deviceType', 'type': 'str'},
'network_functions': {'key': 'networkFunctions', 'type': '[SubResource]'},
'azure_stack_edge': {'key': 'azureStackEdge', 'type': 'SubResource'},
}

def __init__(
self,
**kwargs
):
super(AzureStackEdgeFormat, self).__init__(**kwargs)
self.device_type = 'AzureStackEdge' # type: str
self.azure_stack_edge = kwargs['azure_stack_edge']


class CustomProfile(msrest.serialization.Model):
"""Specifies the custom settings for the virtual machine.

Expand Down Expand Up @@ -170,9 +269,6 @@ class Device(TrackedResource):
:param device_type: The type of the device.Constant filled by server. Possible values include:
"Unknown", "AzureStackEdge".
:type device_type: str or ~hybrid_network_management_client.models.DeviceType
:param azure_stack_edge: The reference to the Azure stack edge device. Once set, it cannot be
updated.
:type azure_stack_edge: ~hybrid_network_management_client.models.SubResource
:ivar network_functions: The list of network functions deployed on the device.
:vartype network_functions: list[~hybrid_network_management_client.models.SubResource]
"""
Expand All @@ -198,7 +294,6 @@ class Device(TrackedResource):
'status': {'key': 'properties.status', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'device_type': {'key': 'properties.deviceType', 'type': 'str'},
'azure_stack_edge': {'key': 'properties.azureStackEdge', 'type': 'SubResource'},
'network_functions': {'key': 'properties.networkFunctions', 'type': '[SubResource]'},
}

Expand All @@ -211,7 +306,6 @@ def __init__(
self.status = None
self.provisioning_state = None
self.device_type = None # type: Optional[str]
self.azure_stack_edge = kwargs.get('azure_stack_edge', None)
self.network_functions = None


Expand Down Expand Up @@ -244,63 +338,6 @@ def __init__(
self.next_link = None


class DevicePropertiesFormat(msrest.serialization.Model):
"""Device properties.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: .

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.

:ivar status: The current device status. Possible values include: "Unknown", "NotRegistered",
"Registered", "Deleted".
:vartype status: str or ~hybrid_network_management_client.models.Status
:ivar provisioning_state: The provisioning state of the device resource. Possible values
include: "Unknown", "Succeeded", "Accepted", "Deleting", "Failed", "Canceled", "Deleted".
:vartype provisioning_state: str or ~hybrid_network_management_client.models.ProvisioningState
:param device_type: Required. The type of the device.Constant filled by server. Possible
values include: "Unknown", "AzureStackEdge".
:type device_type: str or ~hybrid_network_management_client.models.DeviceType
:param azure_stack_edge: The reference to the Azure stack edge device. Once set, it cannot be
updated.
:type azure_stack_edge: ~hybrid_network_management_client.models.SubResource
:ivar network_functions: The list of network functions deployed on the device.
:vartype network_functions: list[~hybrid_network_management_client.models.SubResource]
"""

_validation = {
'status': {'readonly': True},
'provisioning_state': {'readonly': True},
'device_type': {'required': True},
'network_functions': {'readonly': True},
}

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
'device_type': {'key': 'deviceType', 'type': 'str'},
'azure_stack_edge': {'key': 'azureStackEdge', 'type': 'SubResource'},
'network_functions': {'key': 'networkFunctions', 'type': '[SubResource]'},
}

_subtype_map = {
'device_type': {}
}

def __init__(
self,
**kwargs
):
super(DevicePropertiesFormat, self).__init__(**kwargs)
self.status = None
self.provisioning_state = None
self.device_type = None # type: Optional[str]
self.azure_stack_edge = kwargs.get('azure_stack_edge', None)
self.network_functions = None


class DeviceRegistrationKey(msrest.serialization.Model):
"""The device registration key.

Expand Down
Loading