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] iotcentral/resource-manager #3137

Merged
merged 6 commits into from
Oct 26, 2018
Merged
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
17 changes: 17 additions & 0 deletions azure-mgmt-iotcentral/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
Release History
===============

1.0.0 (2018-10-26)
++++++++++++++++++

**Features**

- Model OperationInputs has a new parameter type
- Model ErrorDetails has a new parameter details
- Added operation AppsOperations.check_subdomain_availability

**Breaking changes**

- Operation AppsOperations.check_name_availability has a new signature

**Note**

- azure-mgmt-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)

0.2.0 (2018-08-07)
++++++++++++++++++

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-iotcentral/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

11 changes: 6 additions & 5 deletions azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,41 @@
from .app_py3 import App
from .app_patch_py3 import AppPatch
from .resource_py3 import Resource
from .error_response_body_py3 import ErrorResponseBody
from .error_details_py3 import ErrorDetails, ErrorDetailsException
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_inputs_py3 import OperationInputs
from .app_name_availability_info_py3 import AppNameAvailabilityInfo
from .app_availability_info_py3 import AppAvailabilityInfo
except (SyntaxError, ImportError):
from .app_sku_info import AppSkuInfo
from .app import App
from .app_patch import AppPatch
from .resource import Resource
from .error_response_body import ErrorResponseBody
from .error_details import ErrorDetails, ErrorDetailsException
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_inputs import OperationInputs
from .app_name_availability_info import AppNameAvailabilityInfo
from .app_availability_info import AppAvailabilityInfo
from .app_paged import AppPaged
from .operation_paged import OperationPaged
from .iot_central_client_enums import (
AppSku,
AppNameUnavailabilityReason,
)

__all__ = [
'AppSkuInfo',
'App',
'AppPatch',
'Resource',
'ErrorResponseBody',
'ErrorDetails', 'ErrorDetailsException',
'OperationDisplay',
'Operation',
'OperationInputs',
'AppNameAvailabilityInfo',
'AppAvailabilityInfo',
'AppPaged',
'OperationPaged',
'AppSku',
'AppNameUnavailabilityReason',
]
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,36 @@
from msrest.serialization import Model


class AppNameAvailabilityInfo(Model):
"""The properties indicating whether a given IoT Central application name is
available.
class AppAvailabilityInfo(Model):
"""The properties indicating whether a given IoT Central application name or
subdomain is available.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar name_available: The value which indicates whether the provided name
is available.
:vartype name_available: bool
:ivar reason: The reason for unavailability. Possible values include:
'Invalid', 'AlreadyExists'
:vartype reason: str or
~azure.mgmt.iotcentral.models.AppNameUnavailabilityReason
:param message: The detailed reason message.
:type message: str
:ivar reason: The reason for unavailability.
:vartype reason: str
:ivar message: The detailed reason message.
:vartype message: str
"""

_validation = {
'name_available': {'readonly': True},
'reason': {'readonly': True},
'message': {'readonly': True},
}

_attribute_map = {
'name_available': {'key': 'nameAvailable', 'type': 'bool'},
'reason': {'key': 'reason', 'type': 'AppNameUnavailabilityReason'},
'reason': {'key': 'reason', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AppNameAvailabilityInfo, self).__init__(**kwargs)
super(AppAvailabilityInfo, self).__init__(**kwargs)
self.name_available = None
self.reason = None
self.message = kwargs.get('message', None)
self.message = None
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,36 @@
from msrest.serialization import Model


class AppNameAvailabilityInfo(Model):
"""The properties indicating whether a given IoT Central application name is
available.
class AppAvailabilityInfo(Model):
"""The properties indicating whether a given IoT Central application name or
subdomain is available.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar name_available: The value which indicates whether the provided name
is available.
:vartype name_available: bool
:ivar reason: The reason for unavailability. Possible values include:
'Invalid', 'AlreadyExists'
:vartype reason: str or
~azure.mgmt.iotcentral.models.AppNameUnavailabilityReason
:param message: The detailed reason message.
:type message: str
:ivar reason: The reason for unavailability.
:vartype reason: str
:ivar message: The detailed reason message.
:vartype message: str
"""

_validation = {
'name_available': {'readonly': True},
'reason': {'readonly': True},
'message': {'readonly': True},
}

_attribute_map = {
'name_available': {'key': 'nameAvailable', 'type': 'bool'},
'reason': {'key': 'reason', 'type': 'AppNameUnavailabilityReason'},
'reason': {'key': 'reason', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
}

def __init__(self, *, message: str=None, **kwargs) -> None:
super(AppNameAvailabilityInfo, self).__init__(**kwargs)
def __init__(self, **kwargs) -> None:
super(AppAvailabilityInfo, self).__init__(**kwargs)
self.name_available = None
self.reason = None
self.message = message
self.message = None
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class ErrorDetails(Model):
:vartype message: str
:ivar target: The target of the particular error.
:vartype target: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody]
"""

_validation = {
Expand All @@ -34,16 +36,18 @@ class ErrorDetails(Model):
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'code': {'key': 'error.code', 'type': 'str'},
'message': {'key': 'error.message', 'type': 'str'},
'target': {'key': 'error.target', 'type': 'str'},
'details': {'key': 'error.details', 'type': '[ErrorResponseBody]'},
}

def __init__(self, **kwargs):
super(ErrorDetails, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = kwargs.get('details', None)


class ErrorDetailsException(HttpOperationError):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class ErrorDetails(Model):
:vartype message: str
:ivar target: The target of the particular error.
:vartype target: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody]
"""

_validation = {
Expand All @@ -34,16 +36,18 @@ class ErrorDetails(Model):
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'code': {'key': 'error.code', 'type': 'str'},
'message': {'key': 'error.message', 'type': 'str'},
'target': {'key': 'error.target', 'type': 'str'},
'details': {'key': 'error.details', 'type': '[ErrorResponseBody]'},
}

def __init__(self, **kwargs) -> None:
def __init__(self, *, details=None, **kwargs) -> None:
super(ErrorDetails, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = details


class ErrorDetailsException(HttpOperationError):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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 msrest.serialization import Model


class ErrorResponseBody(Model):
"""Details of error response.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The target of the particular error.
:vartype target: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorResponseBody]'},
}

def __init__(self, **kwargs):
super(ErrorResponseBody, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = kwargs.get('details', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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 msrest.serialization import Model


class ErrorResponseBody(Model):
"""Details of error response.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar code: The error code.
:vartype code: str
:ivar message: The error message.
:vartype message: str
:ivar target: The target of the particular error.
:vartype target: str
:param details: A list of additional details about the error.
:type details: list[~azure.mgmt.iotcentral.models.ErrorResponseBody]
"""

_validation = {
'code': {'readonly': True},
'message': {'readonly': True},
'target': {'readonly': True},
}

_attribute_map = {
'code': {'key': 'code', 'type': 'str'},
'message': {'key': 'message', 'type': 'str'},
'target': {'key': 'target', 'type': 'str'},
'details': {'key': 'details', 'type': '[ErrorResponseBody]'},
}

def __init__(self, *, details=None, **kwargs) -> None:
super(ErrorResponseBody, self).__init__(**kwargs)
self.code = None
self.message = None
self.target = None
self.details = details
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,3 @@ class AppSku(str, Enum):

f1 = "F1"
s1 = "S1"


class AppNameUnavailabilityReason(str, Enum):

invalid = "Invalid"
already_exists = "AlreadyExists"
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ class OperationInputs(Model):
:param name: Required. The name of the IoT Central application instance to
check.
:type name: str
:param type: The type of the IoT Central resource to query. Default value:
"IoTApps" .
:type type: str
"""

_validation = {
'name': {'required': True},
'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OperationInputs, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.type = kwargs.get('type', "IoTApps")
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ class OperationInputs(Model):
:param name: Required. The name of the IoT Central application instance to
check.
:type name: str
:param type: The type of the IoT Central resource to query. Default value:
"IoTApps" .
:type type: str
"""

_validation = {
'name': {'required': True},
'name': {'required': True, 'pattern': r'^[a-z0-9-]{1,63}$'},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, name: str, **kwargs) -> None:
def __init__(self, *, name: str, type: str="IoTApps", **kwargs) -> None:
super(OperationInputs, self).__init__(**kwargs)
self.name = name
self.type = type
Loading