Skip to content

Commit

Permalink
Generated from c75886d66af5ab3837f23b9fad37fa31333a5cda
Browse files Browse the repository at this point in the history
Update examples for network status contract
  • Loading branch information
SDK Automation committed Aug 10, 2020
1 parent 2b82b32 commit 9173d66
Show file tree
Hide file tree
Showing 71 changed files with 195 additions and 155 deletions.
2 changes: 1 addition & 1 deletion sdk/apimanagement/azure-mgmt-apimanagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is the Microsoft Azure API Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/)
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).


# Usage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def __init__(
super(ApiManagementClient, 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 = '2019-12-01'
self.api_version = '2020-06-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class AdditionalLocation(Model):
:param sku: Required. SKU properties of the API Management service.
:type sku:
~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties
:param zones: A list of availability zones denoting where the resource
needs to come from.
:type zones: list[str]
:ivar public_ip_addresses: Public Static Load Balanced IP addresses of the
API Management service in the additional location. Available only for
Basic, Standard and Premium SKU.
Expand Down Expand Up @@ -107,6 +110,7 @@ class AdditionalLocation(Model):
_attribute_map = {
'location': {'key': 'location', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'},
'zones': {'key': 'zones', 'type': '[str]'},
'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'},
'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'},
'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'},
Expand All @@ -118,6 +122,7 @@ def __init__(self, **kwargs):
super(AdditionalLocation, self).__init__(**kwargs)
self.location = kwargs.get('location', None)
self.sku = kwargs.get('sku', None)
self.zones = kwargs.get('zones', None)
self.public_ip_addresses = None
self.private_ip_addresses = None
self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None)
Expand Down Expand Up @@ -1230,6 +1235,9 @@ class ApiManagementServiceResource(ApimResource):
:type location: str
:ivar etag: ETag of the resource.
:vartype etag: str
:param zones: A list of availability zones denoting where the resource
needs to come from.
:type zones: list[str]
"""

_validation = {
Expand Down Expand Up @@ -1287,6 +1295,7 @@ class ApiManagementServiceResource(ApimResource):
'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'},
'location': {'key': 'location', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -1318,6 +1327,7 @@ def __init__(self, **kwargs):
self.identity = kwargs.get('identity', None)
self.location = kwargs.get('location', None)
self.etag = None
self.zones = kwargs.get('zones', None)


class ApiManagementServiceSkuProperties(Model):
Expand Down Expand Up @@ -3204,13 +3214,19 @@ class ConnectivityStatusContract(Model):
The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as
specified by the ISO 8601 standard.
:type last_status_change: datetime
:param resource_type: Required. Resource Type.
:type resource_type: str
:param is_optional: Required. Whether this is optional.
:type is_optional: bool
"""

_validation = {
'name': {'required': True, 'min_length': 1},
'status': {'required': True},
'last_updated': {'required': True},
'last_status_change': {'required': True},
'resource_type': {'required': True},
'is_optional': {'required': True},
}

_attribute_map = {
Expand All @@ -3219,6 +3235,8 @@ class ConnectivityStatusContract(Model):
'error': {'key': 'error', 'type': 'str'},
'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'},
'resource_type': {'key': 'resourceType', 'type': 'str'},
'is_optional': {'key': 'isOptional', 'type': 'bool'},
}

def __init__(self, **kwargs):
Expand All @@ -3228,6 +3246,8 @@ def __init__(self, **kwargs):
self.error = kwargs.get('error', None)
self.last_updated = kwargs.get('last_updated', None)
self.last_status_change = kwargs.get('last_status_change', None)
self.resource_type = kwargs.get('resource_type', None)
self.is_optional = kwargs.get('is_optional', None)


class ContentItemContract(Resource):
Expand Down Expand Up @@ -5864,12 +5884,12 @@ class ProductContract(Resource):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down Expand Up @@ -5934,12 +5954,12 @@ class ProductEntityBaseParameters(Model):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down Expand Up @@ -5995,12 +6015,12 @@ class ProductTagResourceContractProperties(ProductEntityBaseParameters):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down Expand Up @@ -6057,12 +6077,12 @@ class ProductUpdateParameters(Model):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ class AdditionalLocation(Model):
:param sku: Required. SKU properties of the API Management service.
:type sku:
~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties
:param zones: A list of availability zones denoting where the resource
needs to come from.
:type zones: list[str]
:ivar public_ip_addresses: Public Static Load Balanced IP addresses of the
API Management service in the additional location. Available only for
Basic, Standard and Premium SKU.
Expand Down Expand Up @@ -107,17 +110,19 @@ class AdditionalLocation(Model):
_attribute_map = {
'location': {'key': 'location', 'type': 'str'},
'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'},
'zones': {'key': 'zones', 'type': '[str]'},
'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'},
'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'},
'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'},
'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'},
'disable_gateway': {'key': 'disableGateway', 'type': 'bool'},
}

def __init__(self, *, location: str, sku, virtual_network_configuration=None, disable_gateway: bool=False, **kwargs) -> None:
def __init__(self, *, location: str, sku, zones=None, virtual_network_configuration=None, disable_gateway: bool=False, **kwargs) -> None:
super(AdditionalLocation, self).__init__(**kwargs)
self.location = location
self.sku = sku
self.zones = zones
self.public_ip_addresses = None
self.private_ip_addresses = None
self.virtual_network_configuration = virtual_network_configuration
Expand Down Expand Up @@ -1230,6 +1235,9 @@ class ApiManagementServiceResource(ApimResource):
:type location: str
:ivar etag: ETag of the resource.
:vartype etag: str
:param zones: A list of availability zones denoting where the resource
needs to come from.
:type zones: list[str]
"""

_validation = {
Expand Down Expand Up @@ -1287,9 +1295,10 @@ class ApiManagementServiceResource(ApimResource):
'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'},
'location': {'key': 'location', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
'zones': {'key': 'zones', 'type': '[str]'},
}

def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: str, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, identity=None, **kwargs) -> None:
def __init__(self, *, publisher_email: str, publisher_name: str, sku, location: str, tags=None, notification_sender_email: str=None, hostname_configurations=None, virtual_network_configuration=None, additional_locations=None, custom_properties=None, certificates=None, enable_client_certificate: bool=False, disable_gateway: bool=False, virtual_network_type="None", api_version_constraint=None, identity=None, zones=None, **kwargs) -> None:
super(ApiManagementServiceResource, self).__init__(tags=tags, **kwargs)
self.notification_sender_email = notification_sender_email
self.provisioning_state = None
Expand Down Expand Up @@ -1318,6 +1327,7 @@ def __init__(self, *, publisher_email: str, publisher_name: str, sku, location:
self.identity = identity
self.location = location
self.etag = None
self.zones = zones


class ApiManagementServiceSkuProperties(Model):
Expand Down Expand Up @@ -3204,13 +3214,19 @@ class ConnectivityStatusContract(Model):
The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as
specified by the ISO 8601 standard.
:type last_status_change: datetime
:param resource_type: Required. Resource Type.
:type resource_type: str
:param is_optional: Required. Whether this is optional.
:type is_optional: bool
"""

_validation = {
'name': {'required': True, 'min_length': 1},
'status': {'required': True},
'last_updated': {'required': True},
'last_status_change': {'required': True},
'resource_type': {'required': True},
'is_optional': {'required': True},
}

_attribute_map = {
Expand All @@ -3219,15 +3235,19 @@ class ConnectivityStatusContract(Model):
'error': {'key': 'error', 'type': 'str'},
'last_updated': {'key': 'lastUpdated', 'type': 'iso-8601'},
'last_status_change': {'key': 'lastStatusChange', 'type': 'iso-8601'},
'resource_type': {'key': 'resourceType', 'type': 'str'},
'is_optional': {'key': 'isOptional', 'type': 'bool'},
}

def __init__(self, *, name: str, status, last_updated, last_status_change, error: str=None, **kwargs) -> None:
def __init__(self, *, name: str, status, last_updated, last_status_change, resource_type: str, is_optional: bool, error: str=None, **kwargs) -> None:
super(ConnectivityStatusContract, self).__init__(**kwargs)
self.name = name
self.status = status
self.error = error
self.last_updated = last_updated
self.last_status_change = last_status_change
self.resource_type = resource_type
self.is_optional = is_optional


class ContentItemContract(Resource):
Expand Down Expand Up @@ -5864,12 +5884,12 @@ class ProductContract(Resource):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down Expand Up @@ -5934,12 +5954,12 @@ class ProductEntityBaseParameters(Model):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down Expand Up @@ -5995,12 +6015,12 @@ class ProductTagResourceContractProperties(ProductEntityBaseParameters):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down Expand Up @@ -6057,12 +6077,12 @@ class ProductUpdateParameters(Model):
developers to call the product’s APIs immediately after subscribing. If
true, administrators must manually approve the subscription before the
developer can any of the product’s APIs. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type approval_required: bool
:param subscriptions_limit: Whether the number of subscriptions a user can
have to this product at the same time. Set to null or omit to allow
unlimited per user subscriptions. Can be present only if
subscriptionRequired property is present and has a value of true.
subscriptionRequired property is present and has a value of false.
:type subscriptions_limit: int
:param state: whether product is published or not. Published products are
discoverable by users of developer portal. Non published products are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ApiDiagnosticOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01".
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview".
"""

models = models
Expand All @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2019-12-01"
self.api_version = "2020-06-01-preview"

self.config = config

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ApiExportOperations(object):
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar export: Query parameter required to export the API details. Constant value: "true".
:ivar api_version: Version of the API to be used with the client request. Constant value: "2019-12-01".
:ivar api_version: Version of the API to be used with the client request. Constant value: "2020-06-01-preview".
"""

models = models
Expand All @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._serialize = serializer
self._deserialize = deserializer
self.export = "true"
self.api_version = "2019-12-01"
self.api_version = "2020-06-01-preview"

self.config = config

Expand Down
Loading

0 comments on commit 9173d66

Please sign in to comment.