Skip to content

Commit

Permalink
CodeGen from PR 17948 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 5dd7cb036b8b5944437a314e54ae7c2bcaf470df into 9f48fea
  • Loading branch information
SDKAuto committed Feb 23, 2022
1 parent 835adb3 commit 0ff2164
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@autorest/python@5.12.0",
"@autorest/modelerfour@4.19.3"
],
"commit": "1134038a45bd1e65b1f6d77351b17df3617388f1",
"commit": "7904ddb8ad79c70072bb7a7c0c22f47e2a7e3c7c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/deviceprovisioningservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
"readme": "specification/deviceprovisioningservices/resource-manager/readme.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-10-15"
self.api_version = "2022-02-05"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-iothubprovisioningservices/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2021-10-15",
"total_api_version_list": ["2021-10-15"],
"chosen_version": "2022-02-05",
"total_api_version_list": ["2022-02-05"],
"client": {
"name": "IotDpsClient",
"filename": "_iot_dps_client",
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.1.0"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-10-15"
self.api_version = "2022-02-05"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-iothubprovisioningservices/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ async def create_or_update(
resource_group_name: str,
provisioning_service_name: str,
certificate_name: str,
certificate_description: "_models.CertificateBodyDescription",
certificate_description: "_models.CertificateResponse",
if_match: Optional[str] = None,
**kwargs: Any
) -> "_models.CertificateResponse":
Expand All @@ -128,7 +128,7 @@ async def create_or_update(
:type certificate_name: str
:param certificate_description: The certificate body.
:type certificate_description:
~azure.mgmt.iothubprovisioningservices.models.CertificateBodyDescription
~azure.mgmt.iothubprovisioningservices.models.CertificateResponse
:param if_match: ETag of the certificate. This is required to update an existing certificate,
and ignored while creating a brand new certificate.
:type if_match: str
Expand All @@ -145,7 +145,7 @@ async def create_or_update(

content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]

_json = self._serialize.body(certificate_description, 'CertificateBodyDescription')
_json = self._serialize.body(certificate_description, 'CertificateResponse')

request = build_create_or_update_request(
subscription_id=self._config.subscription_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ._models_py3 import CertificateProperties
from ._models_py3 import CertificateResponse
from ._models_py3 import ErrorDetails
from ._models_py3 import ErrorMesssage
from ._models_py3 import ErrorMessage
from ._models_py3 import GroupIdInformation
from ._models_py3 import GroupIdInformationProperties
from ._models_py3 import IotDpsPropertiesDescription
Expand Down Expand Up @@ -64,7 +64,7 @@
'CertificateProperties',
'CertificateResponse',
'ErrorDetails',
'ErrorMesssage',
'ErrorMessage',
'GroupIdInformation',
'GroupIdInformationProperties',
'IotDpsPropertiesDescription',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,26 @@ class AsyncOperationResult(msrest.serialization.Model):
:ivar status: current status of a long running operation.
:vartype status: str
:ivar error: Error message containing code, description and details.
:vartype error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMesssage
:vartype error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMessage
"""

_attribute_map = {
'status': {'key': 'status', 'type': 'str'},
'error': {'key': 'error', 'type': 'ErrorMesssage'},
'error': {'key': 'error', 'type': 'ErrorMessage'},
}

def __init__(
self,
*,
status: Optional[str] = None,
error: Optional["ErrorMesssage"] = None,
error: Optional["ErrorMessage"] = None,
**kwargs
):
"""
:keyword status: current status of a long running operation.
:paramtype status: str
:keyword error: Error message containing code, description and details.
:paramtype error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMesssage
:paramtype error: ~azure.mgmt.iothubprovisioningservices.models.ErrorMessage
"""
super(AsyncOperationResult, self).__init__(**kwargs)
self.status = status
Expand Down Expand Up @@ -134,8 +134,6 @@ class CertificateProperties(msrest.serialization.Model):
'subject': {'readonly': True},
'expiry': {'readonly': True},
'thumbprint': {'readonly': True},
'is_verified': {'readonly': True},
'certificate': {'readonly': True},
'created': {'readonly': True},
'updated': {'readonly': True},
}
Expand All @@ -152,16 +150,24 @@ class CertificateProperties(msrest.serialization.Model):

def __init__(
self,
*,
is_verified: Optional[bool] = None,
certificate: Optional[bytearray] = None,
**kwargs
):
"""
:keyword is_verified: Determines whether certificate has been verified.
:paramtype is_verified: bool
:keyword certificate: base-64 representation of X509 certificate .cer file or just .pem file
content.
:paramtype certificate: bytearray
"""
super(CertificateProperties, self).__init__(**kwargs)
self.subject = None
self.expiry = None
self.thumbprint = None
self.is_verified = None
self.certificate = None
self.is_verified = is_verified
self.certificate = certificate
self.created = None
self.updated = None

Expand Down Expand Up @@ -263,7 +269,7 @@ def __init__(
self.details = None


class ErrorMesssage(msrest.serialization.Model):
class ErrorMessage(msrest.serialization.Model):
"""Error response containing message and code.
:ivar code: standard error code.
Expand Down Expand Up @@ -296,7 +302,7 @@ def __init__(
:keyword details: detailed summary of error.
:paramtype details: str
"""
super(ErrorMesssage, self).__init__(**kwargs)
super(ErrorMessage, self).__init__(**kwargs)
self.code = code
self.message = message
self.details = details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def build_get_request(
if_match: Optional[str] = None,
**kwargs: Any
) -> HttpRequest:
api_version = "2021-10-15"
api_version = "2022-02-05"
accept = "application/json"
# Construct URL
url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}')
Expand Down Expand Up @@ -81,7 +81,7 @@ def build_create_or_update_request(
) -> HttpRequest:
content_type = kwargs.pop('content_type', None) # type: Optional[str]

api_version = "2021-10-15"
api_version = "2022-02-05"
accept = "application/json"
# Construct URL
url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}')
Expand Down Expand Up @@ -134,7 +134,7 @@ def build_delete_request(
certificate_nonce: Optional[str] = None,
**kwargs: Any
) -> HttpRequest:
api_version = "2021-10-15"
api_version = "2022-02-05"
accept = "application/json"
# Construct URL
url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}')
Expand Down Expand Up @@ -187,7 +187,7 @@ def build_list_request(
provisioning_service_name: str,
**kwargs: Any
) -> HttpRequest:
api_version = "2021-10-15"
api_version = "2022-02-05"
accept = "application/json"
# Construct URL
url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates')
Expand Down Expand Up @@ -233,7 +233,7 @@ def build_generate_verification_code_request(
certificate_nonce: Optional[str] = None,
**kwargs: Any
) -> HttpRequest:
api_version = "2021-10-15"
api_version = "2022-02-05"
accept = "application/json"
# Construct URL
url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/generateVerificationCode')
Expand Down Expand Up @@ -301,7 +301,7 @@ def build_verify_certificate_request(
) -> HttpRequest:
content_type = kwargs.pop('content_type', None) # type: Optional[str]

api_version = "2021-10-15"
api_version = "2022-02-05"
accept = "application/json"
# Construct URL
url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/verify')
Expand Down Expand Up @@ -440,7 +440,7 @@ def create_or_update(
resource_group_name: str,
provisioning_service_name: str,
certificate_name: str,
certificate_description: "_models.CertificateBodyDescription",
certificate_description: "_models.CertificateResponse",
if_match: Optional[str] = None,
**kwargs: Any
) -> "_models.CertificateResponse":
Expand All @@ -456,7 +456,7 @@ def create_or_update(
:type certificate_name: str
:param certificate_description: The certificate body.
:type certificate_description:
~azure.mgmt.iothubprovisioningservices.models.CertificateBodyDescription
~azure.mgmt.iothubprovisioningservices.models.CertificateResponse
:param if_match: ETag of the certificate. This is required to update an existing certificate,
and ignored while creating a brand new certificate.
:type if_match: str
Expand All @@ -473,7 +473,7 @@ def create_or_update(

content_type = kwargs.pop('content_type', "application/json") # type: Optional[str]

_json = self._serialize.body(certificate_description, 'CertificateBodyDescription')
_json = self._serialize.body(certificate_description, 'CertificateResponse')

request = build_create_or_update_request(
subscription_id=self._config.subscription_id,
Expand Down
Loading

0 comments on commit 0ff2164

Please sign in to comment.