Skip to content

Commit

Permalink
Generated from 3bbd0c484bc34bd20352ebe200384d3b3d73c035 (#2319)
Browse files Browse the repository at this point in the history
Add package-2018-01 to Go SDK build
  • Loading branch information
AutorestCI committed Apr 16, 2018
1 parent 2315e73 commit 7004a1b
Show file tree
Hide file tree
Showing 90 changed files with 2,995 additions and 657 deletions.
6 changes: 2 additions & 4 deletions azure-mgmt-iothub/azure/mgmt/iothub/iot_hub_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ def __init__(
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not isinstance(subscription_id, str):
raise TypeError("Parameter 'subscription_id' must be str.")
if not base_url:
base_url = 'https://management.azure.com'

super(IotHubClientConfiguration, self).__init__(base_url)

self.add_user_agent('iothubclient/{}'.format(VERSION))
self.add_user_agent('azure-mgmt-iothub/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
Expand Down Expand Up @@ -81,7 +79,7 @@ def __init__(
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2017-07-01'
self.api_version = '2018-01-22'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
129 changes: 87 additions & 42 deletions azure-mgmt-iothub/azure/mgmt/iothub/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,94 @@
# regenerated.
# --------------------------------------------------------------------------

from .certificate_verification_description import CertificateVerificationDescription
from .certificate_body_description import CertificateBodyDescription
from .certificate_properties import CertificateProperties
from .certificate_description import CertificateDescription
from .certificate_list_description import CertificateListDescription
from .certificate_properties_with_nonce import CertificatePropertiesWithNonce
from .certificate_with_nonce_description import CertificateWithNonceDescription
from .shared_access_signature_authorization_rule import SharedAccessSignatureAuthorizationRule
from .ip_filter_rule import IpFilterRule
from .event_hub_properties import EventHubProperties
from .routing_service_bus_queue_endpoint_properties import RoutingServiceBusQueueEndpointProperties
from .routing_service_bus_topic_endpoint_properties import RoutingServiceBusTopicEndpointProperties
from .routing_event_hub_properties import RoutingEventHubProperties
from .routing_storage_container_properties import RoutingStorageContainerProperties
from .routing_endpoints import RoutingEndpoints
from .route_properties import RouteProperties
from .fallback_route_properties import FallbackRouteProperties
from .routing_properties import RoutingProperties
from .storage_endpoint_properties import StorageEndpointProperties
from .messaging_endpoint_properties import MessagingEndpointProperties
from .feedback_properties import FeedbackProperties
from .cloud_to_device_properties import CloudToDeviceProperties
from .operations_monitoring_properties import OperationsMonitoringProperties
from .iot_hub_properties import IotHubProperties
from .iot_hub_sku_info import IotHubSkuInfo
from .iot_hub_description import IotHubDescription
from .resource import Resource
from .operation_display import OperationDisplay
from .operation import Operation
from .error_details import ErrorDetails, ErrorDetailsException
from .iot_hub_quota_metric_info import IotHubQuotaMetricInfo
from .registry_statistics import RegistryStatistics
from .job_response import JobResponse
from .iot_hub_capacity import IotHubCapacity
from .iot_hub_sku_description import IotHubSkuDescription
from .event_hub_consumer_group_info import EventHubConsumerGroupInfo
from .operation_inputs import OperationInputs
from .iot_hub_name_availability_info import IotHubNameAvailabilityInfo
from .export_devices_request import ExportDevicesRequest
from .import_devices_request import ImportDevicesRequest
try:
from .certificate_verification_description_py3 import CertificateVerificationDescription
from .certificate_body_description_py3 import CertificateBodyDescription
from .certificate_properties_py3 import CertificateProperties
from .certificate_description_py3 import CertificateDescription
from .certificate_list_description_py3 import CertificateListDescription
from .certificate_properties_with_nonce_py3 import CertificatePropertiesWithNonce
from .certificate_with_nonce_description_py3 import CertificateWithNonceDescription
from .shared_access_signature_authorization_rule_py3 import SharedAccessSignatureAuthorizationRule
from .ip_filter_rule_py3 import IpFilterRule
from .event_hub_properties_py3 import EventHubProperties
from .routing_service_bus_queue_endpoint_properties_py3 import RoutingServiceBusQueueEndpointProperties
from .routing_service_bus_topic_endpoint_properties_py3 import RoutingServiceBusTopicEndpointProperties
from .routing_event_hub_properties_py3 import RoutingEventHubProperties
from .routing_storage_container_properties_py3 import RoutingStorageContainerProperties
from .routing_endpoints_py3 import RoutingEndpoints
from .route_properties_py3 import RouteProperties
from .fallback_route_properties_py3 import FallbackRouteProperties
from .routing_properties_py3 import RoutingProperties
from .storage_endpoint_properties_py3 import StorageEndpointProperties
from .messaging_endpoint_properties_py3 import MessagingEndpointProperties
from .feedback_properties_py3 import FeedbackProperties
from .cloud_to_device_properties_py3 import CloudToDeviceProperties
from .operations_monitoring_properties_py3 import OperationsMonitoringProperties
from .iot_hub_properties_py3 import IotHubProperties
from .iot_hub_sku_info_py3 import IotHubSkuInfo
from .iot_hub_description_py3 import IotHubDescription
from .resource_py3 import Resource
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .error_details_py3 import ErrorDetails, ErrorDetailsException
from .iot_hub_quota_metric_info_py3 import IotHubQuotaMetricInfo
from .registry_statistics_py3 import RegistryStatistics
from .job_response_py3 import JobResponse
from .iot_hub_capacity_py3 import IotHubCapacity
from .iot_hub_sku_description_py3 import IotHubSkuDescription
from .tags_resource_py3 import TagsResource
from .event_hub_consumer_group_info_py3 import EventHubConsumerGroupInfo
from .operation_inputs_py3 import OperationInputs
from .iot_hub_name_availability_info_py3 import IotHubNameAvailabilityInfo
from .export_devices_request_py3 import ExportDevicesRequest
from .import_devices_request_py3 import ImportDevicesRequest
except (SyntaxError, ImportError):
from .certificate_verification_description import CertificateVerificationDescription
from .certificate_body_description import CertificateBodyDescription
from .certificate_properties import CertificateProperties
from .certificate_description import CertificateDescription
from .certificate_list_description import CertificateListDescription
from .certificate_properties_with_nonce import CertificatePropertiesWithNonce
from .certificate_with_nonce_description import CertificateWithNonceDescription
from .shared_access_signature_authorization_rule import SharedAccessSignatureAuthorizationRule
from .ip_filter_rule import IpFilterRule
from .event_hub_properties import EventHubProperties
from .routing_service_bus_queue_endpoint_properties import RoutingServiceBusQueueEndpointProperties
from .routing_service_bus_topic_endpoint_properties import RoutingServiceBusTopicEndpointProperties
from .routing_event_hub_properties import RoutingEventHubProperties
from .routing_storage_container_properties import RoutingStorageContainerProperties
from .routing_endpoints import RoutingEndpoints
from .route_properties import RouteProperties
from .fallback_route_properties import FallbackRouteProperties
from .routing_properties import RoutingProperties
from .storage_endpoint_properties import StorageEndpointProperties
from .messaging_endpoint_properties import MessagingEndpointProperties
from .feedback_properties import FeedbackProperties
from .cloud_to_device_properties import CloudToDeviceProperties
from .operations_monitoring_properties import OperationsMonitoringProperties
from .iot_hub_properties import IotHubProperties
from .iot_hub_sku_info import IotHubSkuInfo
from .iot_hub_description import IotHubDescription
from .resource import Resource
from .operation_display import OperationDisplay
from .operation import Operation
from .error_details import ErrorDetails, ErrorDetailsException
from .iot_hub_quota_metric_info import IotHubQuotaMetricInfo
from .registry_statistics import RegistryStatistics
from .job_response import JobResponse
from .iot_hub_capacity import IotHubCapacity
from .iot_hub_sku_description import IotHubSkuDescription
from .tags_resource import TagsResource
from .event_hub_consumer_group_info import EventHubConsumerGroupInfo
from .operation_inputs import OperationInputs
from .iot_hub_name_availability_info import IotHubNameAvailabilityInfo
from .export_devices_request import ExportDevicesRequest
from .import_devices_request import ImportDevicesRequest
from .operation_paged import OperationPaged
from .iot_hub_description_paged import IotHubDescriptionPaged
from .iot_hub_sku_description_paged import IotHubSkuDescriptionPaged
from .str_paged import StrPaged
from .event_hub_consumer_group_info_paged import EventHubConsumerGroupInfoPaged
from .job_response_paged import JobResponsePaged
from .iot_hub_quota_metric_info_paged import IotHubQuotaMetricInfoPaged
from .shared_access_signature_authorization_rule_paged import SharedAccessSignatureAuthorizationRulePaged
Expand Down Expand Up @@ -106,6 +150,7 @@
'JobResponse',
'IotHubCapacity',
'IotHubSkuDescription',
'TagsResource',
'EventHubConsumerGroupInfo',
'OperationInputs',
'IotHubNameAvailabilityInfo',
Expand All @@ -114,7 +159,7 @@
'OperationPaged',
'IotHubDescriptionPaged',
'IotHubSkuDescriptionPaged',
'StrPaged',
'EventHubConsumerGroupInfoPaged',
'JobResponsePaged',
'IotHubQuotaMetricInfoPaged',
'SharedAccessSignatureAuthorizationRulePaged',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ class CertificateBodyDescription(Model):
'certificate': {'key': 'certificate', 'type': 'str'},
}

def __init__(self, certificate=None):
self.certificate = certificate
def __init__(self, **kwargs):
super(CertificateBodyDescription, self).__init__(**kwargs)
self.certificate = kwargs.get('certificate', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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 CertificateBodyDescription(Model):
"""The JSON-serialized X509 Certificate.
:param certificate: base-64 representation of the X509 leaf certificate
.cer file or just .pem file content.
:type certificate: str
"""

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

def __init__(self, *, certificate: str=None, **kwargs) -> None:
super(CertificateBodyDescription, self).__init__(**kwargs)
self.certificate = certificate
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class CertificateDescription(Model):
sending a request.
:param properties:
:type properties: :class:`CertificateProperties
<azure.mgmt.iothub.models.CertificateProperties>`
:type properties: ~azure.mgmt.iothub.models.CertificateProperties
:ivar id: The resource identifier.
:vartype id: str
:ivar name: The name of the certificate.
Expand All @@ -46,8 +45,9 @@ class CertificateDescription(Model):
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, properties=None):
self.properties = properties
def __init__(self, **kwargs):
super(CertificateDescription, self).__init__(**kwargs)
self.properties = kwargs.get('properties', None)
self.id = None
self.name = None
self.etag = None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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 CertificateDescription(Model):
"""The X509 Certificate.
Variables are only populated by the server, and will be ignored when
sending a request.
:param properties:
:type properties: ~azure.mgmt.iothub.models.CertificateProperties
:ivar id: The resource identifier.
:vartype id: str
:ivar name: The name of the certificate.
:vartype name: str
:ivar etag: The entity tag.
:vartype etag: str
:ivar type: The resource type.
:vartype type: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'etag': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'properties': {'key': 'properties', 'type': 'CertificateProperties'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, properties=None, **kwargs) -> None:
super(CertificateDescription, self).__init__(**kwargs)
self.properties = properties
self.id = None
self.name = None
self.etag = None
self.type = None
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class CertificateListDescription(Model):
"""The JSON-serialized array of Certificate objects.
:param value: The array of Certificate objects.
:type value: list of :class:`CertificateDescription
<azure.mgmt.iothub.models.CertificateDescription>`
:type value: list[~azure.mgmt.iothub.models.CertificateDescription]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[CertificateDescription]'},
}

def __init__(self, value=None):
self.value = value
def __init__(self, **kwargs):
super(CertificateListDescription, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 CertificateListDescription(Model):
"""The JSON-serialized array of Certificate objects.
:param value: The array of Certificate objects.
:type value: list[~azure.mgmt.iothub.models.CertificateDescription]
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[CertificateDescription]'},
}

def __init__(self, *, value=None, **kwargs) -> None:
super(CertificateListDescription, self).__init__(**kwargs)
self.value = value
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class CertificateProperties(Model):
'updated': {'key': 'updated', 'type': 'rfc-1123'},
}

def __init__(self):
def __init__(self, **kwargs):
super(CertificateProperties, self).__init__(**kwargs)
self.subject = None
self.expiry = None
self.thumbprint = None
Expand Down
Loading

0 comments on commit 7004a1b

Please sign in to comment.