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 deviceprovisioningservices/resource-manager] chore: jsonfmt deviceprovisioningservices #5582

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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
Expand Down Expand Up @@ -51,7 +51,7 @@ def __init__(
self.subscription_id = subscription_id


class IotDpsClient(object):
class IotDpsClient(SDKClient):
"""API for using the Azure IoT Hub Device Provisioning Service features.

:ivar config: Configuration for client.
Expand All @@ -76,7 +76,7 @@ def __init__(
self, credentials, subscription_id, base_url=None):

self.config = IotDpsClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(IotDpsClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-01-22'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class IotDpsPropertiesDescription(Model):
"""the service specific properties of a provisoning service, including keys,
"""the service specific properties of a provisioning service, including keys,
linked iot hubs, current state, and system generated properties such as
hostname and idScope.

Expand All @@ -28,7 +28,7 @@ class IotDpsPropertiesDescription(Model):
:param provisioning_state: The ARM provisioning state of the provisioning
service.
:type provisioning_state: str
:param iot_hubs: List of IoT hubs assosciated with this provisioning
:param iot_hubs: List of IoT hubs associated with this provisioning
service.
:type iot_hubs:
list[~azure.mgmt.iothubprovisioningservices.models.IotHubDefinitionDescription]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class IotDpsPropertiesDescription(Model):
"""the service specific properties of a provisoning service, including keys,
"""the service specific properties of a provisioning service, including keys,
linked iot hubs, current state, and system generated properties such as
hostname and idScope.

Expand All @@ -28,7 +28,7 @@ class IotDpsPropertiesDescription(Model):
:param provisioning_state: The ARM provisioning state of the provisioning
service.
:type provisioning_state: str
:param iot_hubs: List of IoT hubs assosciated with this provisioning
:param iot_hubs: List of IoT hubs associated with this provisioning
service.
:type iot_hubs:
list[~azure.mgmt.iothubprovisioningservices.models.IotHubDefinitionDescription]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class IotDpsSkuDefinition(Model):
"""Available Sku's of tier and units.
"""Available SKUs of tier and units.

:param name: Sku name. Possible values include: 'S1'
:type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class IotDpsSkuDefinition(Model):
"""Available Sku's of tier and units.
"""Available SKUs of tier and units.

:param name: Sku name. Possible values include: 'S1'
:type name: str or ~azure.mgmt.iothubprovisioningservices.models.IotDpsSku
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class IotDpsSkuInfo(Model):
"""List of possible provisoning service SKUs.
"""List of possible provisioning service SKUs.

Variables are only populated by the server, and will be ignored when
sending a request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class IotDpsSkuInfo(Model):
"""List of possible provisoning service SKUs.
"""List of possible provisioning service SKUs.

Variables are only populated by the server, and will be ignored when
sending a request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class NameAvailabilityInfo(Model):
include: 'Invalid', 'AlreadyExists'
:type reason: str or
~azure.mgmt.iothubprovisioningservices.models.NameUnavailabilityReason
:param message: message containing a etailed reason name is unavailable
:param message: message containing a detailed reason name is unavailable
:type message: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class NameAvailabilityInfo(Model):
include: 'Invalid', 'AlreadyExists'
:type reason: str or
~azure.mgmt.iothubprovisioningservices.models.NameUnavailabilityReason
:param message: message containing a etailed reason name is unavailable
:param message: message containing a detailed reason name is unavailable
:type message: str
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource
from .resource_py3 import Resource


class ProvisioningServiceDescription(Resource):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -88,8 +88,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorDetailsException(self._deserialize, response)
Expand Down Expand Up @@ -156,6 +156,7 @@ def create_or_update(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -170,9 +171,8 @@ def create_or_update(
body_content = self._serialize.body(certificate_description, 'CertificateBodyDescription')

# Construct and send request
request = self._client.put(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorDetailsException(self._deserialize, response)
Expand All @@ -193,7 +193,7 @@ def delete(
self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, custom_headers=None, raw=False, **operation_config):
"""Delete the Provisioning Service Certificate.

Deletes the specified certificate assosciated with the Provisioning
Deletes the specified certificate associated with the Provisioning
Service.

:param resource_group_name: Resource group identifier.
Expand Down Expand Up @@ -271,7 +271,6 @@ def delete(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -281,8 +280,8 @@ def delete(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.delete(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.delete(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200, 204]:
raise models.ErrorDetailsException(self._deserialize, response)
Expand Down Expand Up @@ -328,7 +327,7 @@ def list(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -337,8 +336,8 @@ def list(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorDetailsException(self._deserialize, response)
Expand Down Expand Up @@ -436,7 +435,7 @@ def generate_verification_code(

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -446,8 +445,8 @@ def generate_verification_code(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.post(url, query_parameters)
response = self._client.send(request, header_parameters, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorDetailsException(self._deserialize, response)
Expand Down Expand Up @@ -551,6 +550,7 @@ def verify_certificate(

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
Expand All @@ -564,9 +564,8 @@ def verify_certificate(
body_content = self._serialize.body(request, 'VerificationCodeRequest')

# Construct and send request
request = self._client.post(url, query_parameters)
response = self._client.send(
request, header_parameters, body_content, stream=False, **operation_config)
request = self._client.post(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
raise models.ErrorDetailsException(self._deserialize, response)
Expand Down
Loading