Source code for azure.mgmt.serialconsole.models._models_py3

# coding=utf-8
# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import List, Optional, TYPE_CHECKING, Union

from .. import _serialization

if TYPE_CHECKING:
    # pylint: disable=unused-import,ungrouped-imports
    from .. import models as _models


[docs]class CloudErrorBody(_serialization.Model): """An error response from the Batch service. :ivar code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. :vartype code: str :ivar message: A message describing the error, intended to be suitable for display in a user interface. :vartype message: str :ivar target: The target of the particular error. For example, the name of the property in error. :vartype target: str :ivar details: A list of additional details about the error. :vartype details: list[~azure.mgmt.serialconsole.models.CloudErrorBody] """ _attribute_map = { "code": {"key": "code", "type": "str"}, "message": {"key": "message", "type": "str"}, "target": {"key": "target", "type": "str"}, "details": {"key": "details", "type": "[CloudErrorBody]"}, } def __init__( self, *, code: Optional[str] = None, message: Optional[str] = None, target: Optional[str] = None, details: Optional[List["_models.CloudErrorBody"]] = None, **kwargs ): """ :keyword code: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. :paramtype code: str :keyword message: A message describing the error, intended to be suitable for display in a user interface. :paramtype message: str :keyword target: The target of the particular error. For example, the name of the property in error. :paramtype target: str :keyword details: A list of additional details about the error. :paramtype details: list[~azure.mgmt.serialconsole.models.CloudErrorBody] """ super().__init__(**kwargs) self.code = code self.message = message self.target = target self.details = details
[docs]class DisableSerialConsoleResult(_serialization.Model): """Returns whether or not Serial Console is disabled. :ivar disabled: Whether or not Serial Console is disabled. :vartype disabled: bool """ _attribute_map = { "disabled": {"key": "disabled", "type": "bool"}, } def __init__(self, *, disabled: Optional[bool] = None, **kwargs): """ :keyword disabled: Whether or not Serial Console is disabled. :paramtype disabled: bool """ super().__init__(**kwargs) self.disabled = disabled
[docs]class EnableSerialConsoleResult(_serialization.Model): """Returns whether or not Serial Console is disabled (enabled). :ivar disabled: Whether or not Serial Console is disabled (enabled). :vartype disabled: bool """ _attribute_map = { "disabled": {"key": "disabled", "type": "bool"}, } def __init__(self, *, disabled: Optional[bool] = None, **kwargs): """ :keyword disabled: Whether or not Serial Console is disabled (enabled). :paramtype disabled: bool """ super().__init__(**kwargs) self.disabled = disabled
[docs]class GetSerialConsoleSubscriptionNotFound(_serialization.Model): """Error saying that the provided subscription could not be found. :ivar code: Error code. :vartype code: str :ivar message: Subscription not found message. :vartype message: str """ _attribute_map = { "code": {"key": "code", "type": "str"}, "message": {"key": "message", "type": "str"}, } def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): """ :keyword code: Error code. :paramtype code: str :keyword message: Subscription not found message. :paramtype message: str """ super().__init__(**kwargs) self.code = code self.message = message
[docs]class Resource(_serialization.Model): """The Resource model definition. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs): """ """ super().__init__(**kwargs) self.id = None self.name = None self.type = None
[docs]class ProxyResource(Resource): """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, } def __init__(self, **kwargs): """ """ super().__init__(**kwargs)
[docs]class SerialConsoleOperations(_serialization.Model): """Serial Console operations. :ivar value: A list of Serial Console operations. :vartype value: list[~azure.mgmt.serialconsole.models.SerialConsoleOperationsValueItem] """ _attribute_map = { "value": {"key": "value", "type": "[SerialConsoleOperationsValueItem]"}, } def __init__(self, *, value: Optional[List["_models.SerialConsoleOperationsValueItem"]] = None, **kwargs): """ :keyword value: A list of Serial Console operations. :paramtype value: list[~azure.mgmt.serialconsole.models.SerialConsoleOperationsValueItem] """ super().__init__(**kwargs) self.value = value
[docs]class SerialConsoleOperationsValueItem(_serialization.Model): """SerialConsoleOperationsValueItem. :ivar name: :vartype name: str :ivar is_data_action: :vartype is_data_action: str :ivar display: :vartype display: ~azure.mgmt.serialconsole.models.SerialConsoleOperationsValueItemDisplay """ _attribute_map = { "name": {"key": "name", "type": "str"}, "is_data_action": {"key": "isDataAction", "type": "str"}, "display": {"key": "display", "type": "SerialConsoleOperationsValueItemDisplay"}, } def __init__( self, *, name: Optional[str] = None, is_data_action: Optional[str] = None, display: Optional["_models.SerialConsoleOperationsValueItemDisplay"] = None, **kwargs ): """ :keyword name: :paramtype name: str :keyword is_data_action: :paramtype is_data_action: str :keyword display: :paramtype display: ~azure.mgmt.serialconsole.models.SerialConsoleOperationsValueItemDisplay """ super().__init__(**kwargs) self.name = name self.is_data_action = is_data_action self.display = display
[docs]class SerialConsoleOperationsValueItemDisplay(_serialization.Model): """SerialConsoleOperationsValueItemDisplay. :ivar provider: :vartype provider: str :ivar resource: :vartype resource: str :ivar operation: :vartype operation: str :ivar description: :vartype description: str """ _attribute_map = { "provider": {"key": "provider", "type": "str"}, "resource": {"key": "resource", "type": "str"}, "operation": {"key": "operation", "type": "str"}, "description": {"key": "description", "type": "str"}, } def __init__( self, *, provider: Optional[str] = None, resource: Optional[str] = None, operation: Optional[str] = None, description: Optional[str] = None, **kwargs ): """ :keyword provider: :paramtype provider: str :keyword resource: :paramtype resource: str :keyword operation: :paramtype operation: str :keyword description: :paramtype description: str """ super().__init__(**kwargs) self.provider = provider self.resource = resource self.operation = operation self.description = description
[docs]class SerialConsoleStatus(_serialization.Model): """Returns whether or not Serial Console is disabled. :ivar disabled: Whether or not Serial Console is disabled. :vartype disabled: bool """ _attribute_map = { "disabled": {"key": "disabled", "type": "bool"}, } def __init__(self, *, disabled: Optional[bool] = None, **kwargs): """ :keyword disabled: Whether or not Serial Console is disabled. :paramtype disabled: bool """ super().__init__(**kwargs) self.disabled = disabled
[docs]class SerialPort(ProxyResource): """Represents the serial port of the parent resource. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :ivar state: Specifies whether the port is enabled for a serial console connection. Known values are: "enabled" and "disabled". :vartype state: str or ~azure.mgmt.serialconsole.models.SerialPortState """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, "state": {"key": "properties.state", "type": "str"}, } def __init__(self, *, state: Optional[Union[str, "_models.SerialPortState"]] = None, **kwargs): """ :keyword state: Specifies whether the port is enabled for a serial console connection. Known values are: "enabled" and "disabled". :paramtype state: str or ~azure.mgmt.serialconsole.models.SerialPortState """ super().__init__(**kwargs) self.state = state
[docs]class SerialPortConnectResult(_serialization.Model): """Returns a connection string to the serial port of the resource. :ivar connection_string: Connection string to the serial port of the resource. :vartype connection_string: str """ _attribute_map = { "connection_string": {"key": "connectionString", "type": "str"}, } def __init__(self, *, connection_string: Optional[str] = None, **kwargs): """ :keyword connection_string: Connection string to the serial port of the resource. :paramtype connection_string: str """ super().__init__(**kwargs) self.connection_string = connection_string
[docs]class SerialPortListResult(_serialization.Model): """The list serial ports operation response. :ivar value: The list of serial ports. :vartype value: list[~azure.mgmt.serialconsole.models.SerialPort] """ _attribute_map = { "value": {"key": "value", "type": "[SerialPort]"}, } def __init__(self, *, value: Optional[List["_models.SerialPort"]] = None, **kwargs): """ :keyword value: The list of serial ports. :paramtype value: list[~azure.mgmt.serialconsole.models.SerialPort] """ super().__init__(**kwargs) self.value = value