Skip to content

Commit

Permalink
[AutoPR] iotcentral/resource-manager (#3137)
Browse files Browse the repository at this point in the history
* Generated from e12609aa0c7e69c6c34418f791480e311efe1317 (#3132)

move stable iotcentral Go SDK package out of preview directory

The 2018-09-01 package was incorrectly placed under the preview
directory.  Moved Go SDK config section to its own config file.

* [AutoPR iotcentral/resource-manager] IoTCentral - Add ARM endpoint, update model responses/inputs to align with expected values (#3444)

* Generated from ddbb8ffb2dd676863a74cd5d44748fbd93a93025

Update models to align with expected responses

* Packaging update of azure-mgmt-iotcentral

* Generated from 09b4a4594660bc1c21dc7122a3784f64867a041e

Fix build errors

* Generated from 1c89739e3a40c9bf7a6f40e86367d50e6b88f776

Add required field to definitions

* Generated from 92118d9753329c57349608f197514100d250974a

Revert model name change.

* Generated from f0df5982f4b75520b1b163b84ea33c9a81d6e79b

add x-ms-client-flatten to errorSchema

* Generated from 08b88d3a11055327409eafebcdac134e797bd38b

Test default required field for .net SDK

* Packaging update of azure-mgmt-iotcentral

* Generated from 3089cb519400047ddfeaffa5fac50c5f1c7a3c85

test enum default

* Generated from f878943d61f7e1cd88a4c5ff31a56c73e3ec0a00

revert test changes

* Packaging update of azure-mgmt-iotcentral

* IOTCentral 0.3.0

* IoT is 1.0.0
  • Loading branch information
AutorestCI authored and lmazuel committed Oct 26, 2018
1 parent cf1df01 commit 4b8b001
Show file tree
Hide file tree
Showing 15 changed files with 273 additions and 79 deletions.
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

0 comments on commit 4b8b001

Please sign in to comment.