Skip to content

Commit

Permalink
Generated from ce9cff5e66ca14a7149660f03fc5aa75afa569ce
Browse files Browse the repository at this point in the history
fix go sdk generation
  • Loading branch information
SDK Automation committed Jul 8, 2020
1 parent 2ba23a5 commit 5915936
Show file tree
Hide file tree
Showing 10 changed files with 322 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __init__(
super(SignalRManagementClient, 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 = '2020-05-01'
self.api_version = '2020-07-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 @@ -14,6 +14,8 @@
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import ErrorResponseBody
from ._models_py3 import LogSpecification
from ._models_py3 import ManagedIdentity
from ._models_py3 import ManagedIdentitySettings
from ._models_py3 import MetricSpecification
from ._models_py3 import NameAvailability
from ._models_py3 import NameAvailabilityParameters
Expand All @@ -38,15 +40,20 @@
from ._models_py3 import SignalRKeys
from ._models_py3 import SignalRNetworkACLs
from ._models_py3 import SignalRResource
from ._models_py3 import SignalRTlsSettings
from ._models_py3 import SignalRUsage
from ._models_py3 import SignalRUsageName
from ._models_py3 import TrackedResource
from ._models_py3 import UpstreamAuthSettings
from ._models_py3 import UpstreamTemplate
from ._models_py3 import UserAssignedIdentityProperty
except (SyntaxError, ImportError):
from ._models import Dimension
from ._models import ErrorResponse, ErrorResponseException
from ._models import ErrorResponseBody
from ._models import LogSpecification
from ._models import ManagedIdentity
from ._models import ManagedIdentitySettings
from ._models import MetricSpecification
from ._models import NameAvailability
from ._models import NameAvailabilityParameters
Expand All @@ -71,10 +78,13 @@
from ._models import SignalRKeys
from ._models import SignalRNetworkACLs
from ._models import SignalRResource
from ._models import SignalRTlsSettings
from ._models import SignalRUsage
from ._models import SignalRUsageName
from ._models import TrackedResource
from ._models import UpstreamAuthSettings
from ._models import UpstreamTemplate
from ._models import UserAssignedIdentityProperty
from ._paged_models import OperationPaged
from ._paged_models import PrivateLinkResourcePaged
from ._paged_models import SignalRResourcePaged
Expand All @@ -84,7 +94,9 @@
ProvisioningState,
PrivateLinkServiceConnectionStatus,
ServiceKind,
ManagedIdentityType,
FeatureFlags,
UpstreamAuthType,
ACLAction,
SignalRRequestType,
KeyType,
Expand All @@ -95,6 +107,8 @@
'ErrorResponse', 'ErrorResponseException',
'ErrorResponseBody',
'LogSpecification',
'ManagedIdentity',
'ManagedIdentitySettings',
'MetricSpecification',
'NameAvailability',
'NameAvailabilityParameters',
Expand All @@ -119,10 +133,13 @@
'SignalRKeys',
'SignalRNetworkACLs',
'SignalRResource',
'SignalRTlsSettings',
'SignalRUsage',
'SignalRUsageName',
'TrackedResource',
'UpstreamAuthSettings',
'UpstreamTemplate',
'UserAssignedIdentityProperty',
'OperationPaged',
'SignalRResourcePaged',
'PrivateLinkResourcePaged',
Expand All @@ -131,7 +148,9 @@
'ProvisioningState',
'PrivateLinkServiceConnectionStatus',
'ServiceKind',
'ManagedIdentityType',
'FeatureFlags',
'UpstreamAuthType',
'ACLAction',
'SignalRRequestType',
'KeyType',
Expand Down
152 changes: 138 additions & 14 deletions sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,64 @@ def __init__(self, **kwargs):
self.display_name = kwargs.get('display_name', None)


class ManagedIdentity(Model):
"""A class represent managed identities used for request and response.
Variables are only populated by the server, and will be ignored when
sending a request.
:param type: Represent the identity type: systemAssigned, userAssigned,
None. Possible values include: 'None', 'SystemAssigned', 'UserAssigned'
:type type: str or ~azure.mgmt.signalr.models.ManagedIdentityType
:param user_assigned_identities: Get or set the user assigned identities
:type user_assigned_identities: dict[str,
~azure.mgmt.signalr.models.UserAssignedIdentityProperty]
:ivar principal_id: Get the principal id for the system assigned identity.
Only be used in response.
:vartype principal_id: str
:ivar tenant_id: Get the tenant id for the system assigned identity.
Only be used in response
:vartype tenant_id: str
"""

_validation = {
'principal_id': {'readonly': True},
'tenant_id': {'readonly': True},
}

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentityProperty}'},
'principal_id': {'key': 'principalId', 'type': 'str'},
'tenant_id': {'key': 'tenantId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ManagedIdentity, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
self.principal_id = None
self.tenant_id = None


class ManagedIdentitySettings(Model):
"""Managed identity settings for upstream.
:param resource: The Resource indicating the App ID URI of the target
resource.
It also appears in the aud (audience) claim of the issued token.
:type resource: str
"""

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

def __init__(self, **kwargs):
super(ManagedIdentitySettings, self).__init__(**kwargs)
self.resource = kwargs.get('resource', None)


class MetricSpecification(Model):
"""Specifications of the Metrics for Azure Monitoring.
Expand Down Expand Up @@ -705,11 +763,6 @@ def __init__(self, **kwargs):
class SignalRCreateOrUpdateProperties(Model):
"""Settings used to provision or configure the resource.
:param host_name_prefix: Prefix for the hostName of the SignalR service.
Retained for future use.
The hostname will be of format:
<hostNamePrefix>.service.signalr.net.
:type host_name_prefix: str
:param features: List of SignalR featureFlags. e.g. ServiceMode.
FeatureFlags that are not included in the parameters for the update
operation will not be modified.
Expand All @@ -729,7 +782,6 @@ class SignalRCreateOrUpdateProperties(Model):
"""

_attribute_map = {
'host_name_prefix': {'key': 'hostNamePrefix', 'type': 'str'},
'features': {'key': 'features', 'type': '[SignalRFeature]'},
'cors': {'key': 'cors', 'type': 'SignalRCorsSettings'},
'upstream': {'key': 'upstream', 'type': 'ServerlessUpstreamSettings'},
Expand All @@ -738,7 +790,6 @@ class SignalRCreateOrUpdateProperties(Model):

def __init__(self, **kwargs):
super(SignalRCreateOrUpdateProperties, self).__init__(**kwargs)
self.host_name_prefix = kwargs.get('host_name_prefix', None)
self.features = kwargs.get('features', None)
self.cors = kwargs.get('cors', None)
self.upstream = kwargs.get('upstream', None)
Expand Down Expand Up @@ -905,11 +956,6 @@ class SignalRResource(TrackedResource):
:type tags: dict[str, str]
:param sku: The billing information of the resource.(e.g. Free, Standard)
:type sku: ~azure.mgmt.signalr.models.ResourceSku
:param host_name_prefix: Prefix for the hostName of the SignalR service.
Retained for future use.
The hostname will be of format:
<hostNamePrefix>.service.signalr.net.
:type host_name_prefix: str
:param features: List of SignalR featureFlags. e.g. ServiceMode.
FeatureFlags that are not included in the parameters for the update
operation will not be modified.
Expand Down Expand Up @@ -949,10 +995,14 @@ class SignalRResource(TrackedResource):
SignalR resource.
:vartype private_endpoint_connections:
list[~azure.mgmt.signalr.models.PrivateEndpointConnection]
:param tls: TLS settings.
:type tls: ~azure.mgmt.signalr.models.SignalRTlsSettings
:param kind: The kind of the service - e.g. "SignalR", or "RawWebSockets"
for "Microsoft.SignalRService/SignalR". Possible values include:
'SignalR', 'RawWebSockets'
:type kind: str or ~azure.mgmt.signalr.models.ServiceKind
:param identity: The managed identity response
:type identity: ~azure.mgmt.signalr.models.ManagedIdentity
"""

_validation = {
Expand All @@ -975,7 +1025,6 @@ class SignalRResource(TrackedResource):
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'ResourceSku'},
'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'},
'features': {'key': 'properties.features', 'type': '[SignalRFeature]'},
'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'},
'upstream': {'key': 'properties.upstream', 'type': 'ServerlessUpstreamSettings'},
Expand All @@ -987,13 +1036,14 @@ class SignalRResource(TrackedResource):
'server_port': {'key': 'properties.serverPort', 'type': 'int'},
'version': {'key': 'properties.version', 'type': 'str'},
'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
'tls': {'key': 'properties.tls', 'type': 'SignalRTlsSettings'},
'kind': {'key': 'kind', 'type': 'str'},
'identity': {'key': 'identity', 'type': 'ManagedIdentity'},
}

def __init__(self, **kwargs):
super(SignalRResource, self).__init__(**kwargs)
self.sku = kwargs.get('sku', None)
self.host_name_prefix = kwargs.get('host_name_prefix', None)
self.features = kwargs.get('features', None)
self.cors = kwargs.get('cors', None)
self.upstream = kwargs.get('upstream', None)
Expand All @@ -1005,7 +1055,26 @@ def __init__(self, **kwargs):
self.server_port = None
self.version = None
self.private_endpoint_connections = None
self.tls = kwargs.get('tls', None)
self.kind = kwargs.get('kind', None)
self.identity = kwargs.get('identity', None)


class SignalRTlsSettings(Model):
"""TLS settings for SignalR.
:param client_cert_enabled: Request client certificate during TLS
handshake if enabled
:type client_cert_enabled: bool
"""

_attribute_map = {
'client_cert_enabled': {'key': 'clientCertEnabled', 'type': 'bool'},
}

def __init__(self, **kwargs):
super(SignalRTlsSettings, self).__init__(**kwargs)
self.client_cert_enabled = kwargs.get('client_cert_enabled', None)


class SignalRUsage(Model):
Expand Down Expand Up @@ -1063,6 +1132,28 @@ def __init__(self, **kwargs):
self.localized_value = kwargs.get('localized_value', None)


class UpstreamAuthSettings(Model):
"""Upstream auth settings.
:param type: Gets or sets the type of auth. None or ManagedIdentity is
supported now. Possible values include: 'None', 'ManagedIdentity'
:type type: str or ~azure.mgmt.signalr.models.UpstreamAuthType
:param managed_identity: Gets or sets the managed identity settings. It's
required if the auth type is set to ManagedIdentity.
:type managed_identity: ~azure.mgmt.signalr.models.ManagedIdentitySettings
"""

_attribute_map = {
'type': {'key': 'type', 'type': 'str'},
'managed_identity': {'key': 'managedIdentity', 'type': 'ManagedIdentitySettings'},
}

def __init__(self, **kwargs):
super(UpstreamAuthSettings, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.managed_identity = kwargs.get('managed_identity', None)


class UpstreamTemplate(Model):
"""Upstream template item settings. It defines the Upstream URL of the
incoming requests.
Expand Down Expand Up @@ -1104,6 +1195,9 @@ class UpstreamTemplate(Model):
with a client request from hub `chat` connects, it will first POST to this
URL: `http://example.com/chat/api/connect`.
:type url_template: str
:param auth: Gets or sets the auth settings for an upstream. If not set,
no auth is used for upstream messages.
:type auth: ~azure.mgmt.signalr.models.UpstreamAuthSettings
"""

_validation = {
Expand All @@ -1115,6 +1209,7 @@ class UpstreamTemplate(Model):
'event_pattern': {'key': 'eventPattern', 'type': 'str'},
'category_pattern': {'key': 'categoryPattern', 'type': 'str'},
'url_template': {'key': 'urlTemplate', 'type': 'str'},
'auth': {'key': 'auth', 'type': 'UpstreamAuthSettings'},
}

def __init__(self, **kwargs):
Expand All @@ -1123,3 +1218,32 @@ def __init__(self, **kwargs):
self.event_pattern = kwargs.get('event_pattern', None)
self.category_pattern = kwargs.get('category_pattern', None)
self.url_template = kwargs.get('url_template', None)
self.auth = kwargs.get('auth', None)


class UserAssignedIdentityProperty(Model):
"""Properties of user assigned identity.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar principal_id: Get the principal id for the user assigned identity
:vartype principal_id: str
:ivar client_id: Get the client id for the user assigned identity
:vartype client_id: str
"""

_validation = {
'principal_id': {'readonly': True},
'client_id': {'readonly': True},
}

_attribute_map = {
'principal_id': {'key': 'principalId', 'type': 'str'},
'client_id': {'key': 'clientId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(UserAssignedIdentityProperty, self).__init__(**kwargs)
self.principal_id = None
self.client_id = None
Loading

0 comments on commit 5915936

Please sign in to comment.