Skip to content
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 @@ -16,26 +16,18 @@ class ConnectionSettingParameter(Model):
"""Extra Parameter in a Connection Setting Properties to indicate service
provider specific properties.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar key: Key for the Connection Setting Parameter.
:vartype key: str
:ivar value: Value associated with the Connection Setting Parameter.
:vartype value: str
:param key: Key for the Connection Setting Parameter.
:type key: str
:param value: Value associated with the Connection Setting Parameter.
:type value: str
"""

_validation = {
'key': {'readonly': True},
'value': {'readonly': True},
}

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

def __init__(self, **kwargs):
super(ConnectionSettingParameter, self).__init__(**kwargs)
self.key = None
self.value = None
self.key = kwargs.get('key', None)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,18 @@ class ConnectionSettingParameter(Model):
"""Extra Parameter in a Connection Setting Properties to indicate service
provider specific properties.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar key: Key for the Connection Setting Parameter.
:vartype key: str
:ivar value: Value associated with the Connection Setting Parameter.
:vartype value: str
:param key: Key for the Connection Setting Parameter.
:type key: str
:param value: Value associated with the Connection Setting Parameter.
:type value: str
"""

_validation = {
'key': {'readonly': True},
'value': {'readonly': True},
}

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

def __init__(self, **kwargs) -> None:
def __init__(self, *, key: str=None, value: str=None, **kwargs) -> None:
super(ConnectionSettingParameter, self).__init__(**kwargs)
self.key = None
self.value = None
self.key = key
self.value = value
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
class ConnectionSettingProperties(Model):
"""Properties for a Connection Setting Item.

Variables are only populated by the server, and will be ignored when
sending a request.

:param client_id: Client Id associated with the Connection Setting.
:type client_id: str
:ivar setting_id: Setting Id set by the service for the Connection
Setting.
:vartype setting_id: str
:param client_secret: Client Secret associated with the Connection Setting
:type client_secret: str
:param scopes: Scopes associated with the Connection Setting
Expand All @@ -33,8 +39,13 @@ class ConnectionSettingProperties(Model):
list[~azure.mgmt.botservice.models.ConnectionSettingParameter]
"""

_validation = {
'setting_id': {'readonly': True},
}

_attribute_map = {
'client_id': {'key': 'clientId', 'type': 'str'},
'setting_id': {'key': 'settingId', 'type': 'str'},
'client_secret': {'key': 'clientSecret', 'type': 'str'},
'scopes': {'key': 'scopes', 'type': 'str'},
'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'},
Expand All @@ -45,6 +56,7 @@ class ConnectionSettingProperties(Model):
def __init__(self, **kwargs):
super(ConnectionSettingProperties, self).__init__(**kwargs)
self.client_id = kwargs.get('client_id', None)
self.setting_id = None
self.client_secret = kwargs.get('client_secret', None)
self.scopes = kwargs.get('scopes', None)
self.service_provider_id = kwargs.get('service_provider_id', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
class ConnectionSettingProperties(Model):
"""Properties for a Connection Setting Item.

Variables are only populated by the server, and will be ignored when
sending a request.

:param client_id: Client Id associated with the Connection Setting.
:type client_id: str
:ivar setting_id: Setting Id set by the service for the Connection
Setting.
:vartype setting_id: str
:param client_secret: Client Secret associated with the Connection Setting
:type client_secret: str
:param scopes: Scopes associated with the Connection Setting
Expand All @@ -33,8 +39,13 @@ class ConnectionSettingProperties(Model):
list[~azure.mgmt.botservice.models.ConnectionSettingParameter]
"""

_validation = {
'setting_id': {'readonly': True},
}

_attribute_map = {
'client_id': {'key': 'clientId', 'type': 'str'},
'setting_id': {'key': 'settingId', 'type': 'str'},
'client_secret': {'key': 'clientSecret', 'type': 'str'},
'scopes': {'key': 'scopes', 'type': 'str'},
'service_provider_id': {'key': 'serviceProviderId', 'type': 'str'},
Expand All @@ -45,6 +56,7 @@ class ConnectionSettingProperties(Model):
def __init__(self, *, client_id: str=None, client_secret: str=None, scopes: str=None, service_provider_id: str=None, service_provider_display_name: str=None, parameters=None, **kwargs) -> None:
super(ConnectionSettingProperties, self).__init__(**kwargs)
self.client_id = client_id
self.setting_id = None
self.client_secret = client_secret
self.scopes = scopes
self.service_provider_id = service_provider_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@ def __init__(self, client, config, serializer, deserializer):
self.config = config

def list_service_providers(
self, resource_group_name, custom_headers=None, raw=False, **operation_config):
self, custom_headers=None, raw=False, **operation_config):
"""Lists the available Service Providers for creating Connection Settings.

:param resource_group_name: The name of the Bot resource group in the
user subscription.
:type resource_group_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -57,7 +54,6 @@ def list_service_providers(
# Construct URL
url = self.list_service_providers.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
Expand Down Expand Up @@ -93,7 +89,7 @@ def list_service_providers(
return client_raw_response

return deserialized
list_service_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/BotServices/listServiceProviders'}
list_service_providers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listAuthServiceProviders'}

def list_with_secrets(
self, resource_group_name, resource_name, connection_name, custom_headers=None, raw=False, **operation_config):
Expand Down