diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py index 6ee221e51c04..b0fb3703d0a7 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter.py @@ -16,20 +16,12 @@ 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'}, @@ -37,5 +29,5 @@ class ConnectionSettingParameter(Model): 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) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py index 428387c42272..9126c281f852 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_parameter_py3.py @@ -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 diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py index 50099ba956e6..fca31c7edef0 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties.py @@ -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 @@ -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'}, @@ -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) diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py index e6952cde3595..89613382f22a 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/models/connection_setting_properties_py3.py @@ -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 @@ -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'}, @@ -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 diff --git a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py index 833d572a97ea..e0014084bfba 100644 --- a/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py +++ b/azure-mgmt-botservice/azure/mgmt/botservice/operations/bot_connection_operations.py @@ -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 @@ -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) @@ -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):