azure_mgmt_bot_service 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service.rb +82 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/azure_bot_service.rb +144 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/bot_connection.rb +936 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/bots.rb +1000 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/channels.rb +872 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/bot.rb +123 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/bot_channel.rb +126 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/bot_properties.rb +207 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/bot_response_list.rb +101 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/channel.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/channel_name.rb +24 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/channel_response_list.rb +101 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/check_name_availability_request_body.rb +60 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/check_name_availability_response_body.rb +59 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/connection_item_name.rb +47 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/connection_setting.rb +124 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/connection_setting_parameter.rb +59 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/connection_setting_properties.rb +126 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/connection_setting_response_list.rb +101 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/direct_line_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/direct_line_channel_properties.rb +55 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/direct_line_site.rb +119 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/email_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/email_channel_properties.rb +69 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/error.rb +47 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/error_body.rb +57 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/facebook_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/facebook_channel_properties.rb +114 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/facebook_page.rb +58 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/kik_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/kik_channel_properties.rb +80 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/kind.rb +18 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/ms_teams_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/ms_teams_channel_properties.rb +101 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/operation_display_info.rb +80 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/operation_entity.rb +81 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/operation_entity_list_result.rb +98 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/resource.rb +146 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/service_provider.rb +48 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/service_provider_parameter.rb +107 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/service_provider_properties.rb +116 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/service_provider_response_list.rb +69 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/sku.rb +59 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/sku_name.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/sku_tier.rb +16 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/skype_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/skype_channel_properties.rb +134 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/slack_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/slack_channel_properties.rb +141 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/sms_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/sms_channel_properties.rb +92 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/telegram_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/telegram_channel_properties.rb +69 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/web_chat_channel.rb +63 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/web_chat_channel_properties.rb +67 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/models/web_chat_site.rb +107 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/module_definition.rb +9 -0
- data/lib/2017-12-01-preview/generated/azure_mgmt_bot_service/operations.rb +219 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service.rb +91 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/azure_bot_service.rb +147 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/bot_connection.rb +936 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/bots.rb +1000 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/channels.rb +872 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/enterprise_channels.rb +962 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot.rb +123 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot_channel.rb +126 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot_properties.rb +207 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot_response_list.rb +101 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/channel.rb +55 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/channel_name.rb +24 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/channel_response_list.rb +101 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/check_name_availability_request_body.rb +60 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/check_name_availability_response_body.rb +59 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_item_name.rb +47 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting.rb +124 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting_parameter.rb +59 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting_properties.rb +126 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting_response_list.rb +101 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/direct_line_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/direct_line_channel_properties.rb +55 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/direct_line_site.rb +151 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/email_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/email_channel_properties.rb +69 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel.rb +124 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_check_name_availability_request.rb +49 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_check_name_availability_response.rb +60 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_node.rb +95 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_node_state.rb +24 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_properties.rb +70 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_response_list.rb +101 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_state.rb +24 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/error.rb +47 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/error_body.rb +57 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/facebook_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/facebook_channel_properties.rb +114 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/facebook_page.rb +58 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/kik_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/kik_channel_properties.rb +80 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/kind.rb +18 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/ms_teams_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/ms_teams_channel_properties.rb +68 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/operation_display_info.rb +80 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/operation_entity.rb +81 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/operation_entity_list_result.rb +98 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/resource.rb +146 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider.rb +48 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider_parameter.rb +107 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider_properties.rb +116 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider_response_list.rb +69 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/sku.rb +59 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/sku_name.rb +16 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/sku_tier.rb +16 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/skype_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/skype_channel_properties.rb +134 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/slack_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/slack_channel_properties.rb +141 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/sms_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/sms_channel_properties.rb +92 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/telegram_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/telegram_channel_properties.rb +69 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/web_chat_channel.rb +63 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/web_chat_channel_properties.rb +67 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/models/web_chat_site.rb +107 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/module_definition.rb +9 -0
- data/lib/2018-07-12-preview/generated/azure_mgmt_bot_service/operations.rb +219 -0
- data/lib/azure_mgmt_bot_service.rb +7 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/botservice_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/botservice_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/botservice_profile_module.rb +305 -0
- data/lib/version.rb +7 -0
- metadata +249 -0
@@ -0,0 +1,91 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2018-07-12-preview/generated/azure_mgmt_bot_service/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::BotService::Mgmt::V2018_07_12_preview
|
23
|
+
autoload :Bots, '2018-07-12-preview/generated/azure_mgmt_bot_service/bots.rb'
|
24
|
+
autoload :Channels, '2018-07-12-preview/generated/azure_mgmt_bot_service/channels.rb'
|
25
|
+
autoload :Operations, '2018-07-12-preview/generated/azure_mgmt_bot_service/operations.rb'
|
26
|
+
autoload :BotConnection, '2018-07-12-preview/generated/azure_mgmt_bot_service/bot_connection.rb'
|
27
|
+
autoload :EnterpriseChannels, '2018-07-12-preview/generated/azure_mgmt_bot_service/enterprise_channels.rb'
|
28
|
+
autoload :AzureBotService, '2018-07-12-preview/generated/azure_mgmt_bot_service/azure_bot_service.rb'
|
29
|
+
|
30
|
+
module Models
|
31
|
+
autoload :SmsChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/sms_channel_properties.rb'
|
32
|
+
autoload :TelegramChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/telegram_channel_properties.rb'
|
33
|
+
autoload :EnterpriseChannelNode, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_node.rb'
|
34
|
+
autoload :BotProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot_properties.rb'
|
35
|
+
autoload :Sku, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/sku.rb'
|
36
|
+
autoload :BotResponseList, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot_response_list.rb'
|
37
|
+
autoload :OperationDisplayInfo, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/operation_display_info.rb'
|
38
|
+
autoload :Resource, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/resource.rb'
|
39
|
+
autoload :FacebookChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/facebook_channel_properties.rb'
|
40
|
+
autoload :EnterpriseChannelCheckNameAvailabilityResponse, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_check_name_availability_response.rb'
|
41
|
+
autoload :ErrorBody, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/error_body.rb'
|
42
|
+
autoload :EnterpriseChannelCheckNameAvailabilityRequest, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_check_name_availability_request.rb'
|
43
|
+
autoload :Channel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/channel.rb'
|
44
|
+
autoload :CheckNameAvailabilityResponseBody, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/check_name_availability_response_body.rb'
|
45
|
+
autoload :Error, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/error.rb'
|
46
|
+
autoload :CheckNameAvailabilityRequestBody, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/check_name_availability_request_body.rb'
|
47
|
+
autoload :SlackChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/slack_channel_properties.rb'
|
48
|
+
autoload :OperationEntityListResult, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/operation_entity_list_result.rb'
|
49
|
+
autoload :EnterpriseChannelResponseList, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_response_list.rb'
|
50
|
+
autoload :WebChatChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/web_chat_channel_properties.rb'
|
51
|
+
autoload :ChannelResponseList, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/channel_response_list.rb'
|
52
|
+
autoload :DirectLineSite, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/direct_line_site.rb'
|
53
|
+
autoload :ConnectionItemName, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_item_name.rb'
|
54
|
+
autoload :FacebookPage, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/facebook_page.rb'
|
55
|
+
autoload :ConnectionSettingParameter, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting_parameter.rb'
|
56
|
+
autoload :MsTeamsChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/ms_teams_channel_properties.rb'
|
57
|
+
autoload :ConnectionSettingProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting_properties.rb'
|
58
|
+
autoload :KikChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/kik_channel_properties.rb'
|
59
|
+
autoload :EnterpriseChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_properties.rb'
|
60
|
+
autoload :OperationEntity, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/operation_entity.rb'
|
61
|
+
autoload :ConnectionSettingResponseList, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting_response_list.rb'
|
62
|
+
autoload :EmailChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/email_channel_properties.rb'
|
63
|
+
autoload :ServiceProviderParameter, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider_parameter.rb'
|
64
|
+
autoload :WebChatSite, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/web_chat_site.rb'
|
65
|
+
autoload :ServiceProviderProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider_properties.rb'
|
66
|
+
autoload :SkypeChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/skype_channel_properties.rb'
|
67
|
+
autoload :ServiceProvider, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider.rb'
|
68
|
+
autoload :DirectLineChannelProperties, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/direct_line_channel_properties.rb'
|
69
|
+
autoload :ServiceProviderResponseList, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/service_provider_response_list.rb'
|
70
|
+
autoload :Bot, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot.rb'
|
71
|
+
autoload :BotChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/bot_channel.rb'
|
72
|
+
autoload :FacebookChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/facebook_channel.rb'
|
73
|
+
autoload :EmailChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/email_channel.rb'
|
74
|
+
autoload :MsTeamsChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/ms_teams_channel.rb'
|
75
|
+
autoload :SkypeChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/skype_channel.rb'
|
76
|
+
autoload :KikChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/kik_channel.rb'
|
77
|
+
autoload :WebChatChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/web_chat_channel.rb'
|
78
|
+
autoload :DirectLineChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/direct_line_channel.rb'
|
79
|
+
autoload :TelegramChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/telegram_channel.rb'
|
80
|
+
autoload :SmsChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/sms_channel.rb'
|
81
|
+
autoload :SlackChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/slack_channel.rb'
|
82
|
+
autoload :ConnectionSetting, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/connection_setting.rb'
|
83
|
+
autoload :EnterpriseChannel, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel.rb'
|
84
|
+
autoload :SkuName, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/sku_name.rb'
|
85
|
+
autoload :SkuTier, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/sku_tier.rb'
|
86
|
+
autoload :Kind, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/kind.rb'
|
87
|
+
autoload :EnterpriseChannelState, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_state.rb'
|
88
|
+
autoload :EnterpriseChannelNodeState, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/enterprise_channel_node_state.rb'
|
89
|
+
autoload :ChannelName, '2018-07-12-preview/generated/azure_mgmt_bot_service/models/channel_name.rb'
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,147 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::BotService::Mgmt::V2018_07_12_preview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class AzureBotService < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Azure Subscription ID.
|
21
|
+
attr_accessor :subscription_id
|
22
|
+
|
23
|
+
# @return [String] Version of the API to be used with the client request.
|
24
|
+
attr_reader :api_version
|
25
|
+
|
26
|
+
# @return [String] The preferred language for the response.
|
27
|
+
attr_accessor :accept_language
|
28
|
+
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
32
|
+
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
35
|
+
# generated and included in each request. Default is true.
|
36
|
+
attr_accessor :generate_client_request_id
|
37
|
+
|
38
|
+
# @return [Bots] bots
|
39
|
+
attr_reader :bots
|
40
|
+
|
41
|
+
# @return [Channels] channels
|
42
|
+
attr_reader :channels
|
43
|
+
|
44
|
+
# @return [Operations] operations
|
45
|
+
attr_reader :operations
|
46
|
+
|
47
|
+
# @return [BotConnection] bot_connection
|
48
|
+
attr_reader :bot_connection
|
49
|
+
|
50
|
+
# @return [EnterpriseChannels] enterprise_channels
|
51
|
+
attr_reader :enterprise_channels
|
52
|
+
|
53
|
+
#
|
54
|
+
# Creates initializes a new instance of the AzureBotService class.
|
55
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
56
|
+
# @param base_url [String] the base URI of the service.
|
57
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
58
|
+
#
|
59
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
60
|
+
super(credentials, options)
|
61
|
+
@base_url = base_url || 'https://management.azure.com'
|
62
|
+
|
63
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
64
|
+
@credentials = credentials
|
65
|
+
|
66
|
+
@bots = Bots.new(self)
|
67
|
+
@channels = Channels.new(self)
|
68
|
+
@operations = Operations.new(self)
|
69
|
+
@bot_connection = BotConnection.new(self)
|
70
|
+
@enterprise_channels = EnterpriseChannels.new(self)
|
71
|
+
@api_version = '2018-07-12'
|
72
|
+
@accept_language = 'en-US'
|
73
|
+
@long_running_operation_retry_timeout = 30
|
74
|
+
@generate_client_request_id = true
|
75
|
+
add_telemetry
|
76
|
+
end
|
77
|
+
|
78
|
+
#
|
79
|
+
# Makes a request and returns the body of the response.
|
80
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
81
|
+
# @param path [String] the path, relative to {base_url}.
|
82
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
83
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
84
|
+
# Example:
|
85
|
+
#
|
86
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
87
|
+
# path = "/path"
|
88
|
+
# options = {
|
89
|
+
# body: request_content,
|
90
|
+
# query_params: {'api-version' => '2016-02-01'}
|
91
|
+
# }
|
92
|
+
# result = @client.make_request(:put, path, options)
|
93
|
+
#
|
94
|
+
def make_request(method, path, options = {})
|
95
|
+
result = make_request_with_http_info(method, path, options)
|
96
|
+
result.body unless result.nil?
|
97
|
+
end
|
98
|
+
|
99
|
+
#
|
100
|
+
# Makes a request and returns the operation response.
|
101
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
102
|
+
# @param path [String] the path, relative to {base_url}.
|
103
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
104
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
105
|
+
#
|
106
|
+
def make_request_with_http_info(method, path, options = {})
|
107
|
+
result = make_request_async(method, path, options).value!
|
108
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
109
|
+
result
|
110
|
+
end
|
111
|
+
|
112
|
+
#
|
113
|
+
# Makes a request asynchronously.
|
114
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
115
|
+
# @param path [String] the path, relative to {base_url}.
|
116
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
117
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
118
|
+
#
|
119
|
+
def make_request_async(method, path, options = {})
|
120
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
121
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
122
|
+
|
123
|
+
request_url = options[:base_url] || @base_url
|
124
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
125
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
126
|
+
end
|
127
|
+
|
128
|
+
request_headers = @request_headers
|
129
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
130
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
131
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
132
|
+
|
133
|
+
super(request_url, method, path, options)
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
private
|
138
|
+
#
|
139
|
+
# Adds telemetry information.
|
140
|
+
#
|
141
|
+
def add_telemetry
|
142
|
+
sdk_information = 'azure_mgmt_bot_service'
|
143
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
144
|
+
add_user_agent_information(sdk_information)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
@@ -0,0 +1,936 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::BotService::Mgmt::V2018_07_12_preview
|
7
|
+
#
|
8
|
+
# Azure Bot Service is a platform for creating smart conversational agents.
|
9
|
+
#
|
10
|
+
class BotConnection
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the BotConnection class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [AzureBotService] reference to the AzureBotService
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists the available Service Providers for creating Connection Settings
|
26
|
+
#
|
27
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
28
|
+
# will be added to the HTTP request.
|
29
|
+
#
|
30
|
+
# @return [ServiceProviderResponseList] operation results.
|
31
|
+
#
|
32
|
+
def list_service_providers(custom_headers:nil)
|
33
|
+
response = list_service_providers_async(custom_headers:custom_headers).value!
|
34
|
+
response.body unless response.nil?
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Lists the available Service Providers for creating Connection Settings
|
39
|
+
#
|
40
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
41
|
+
# will be added to the HTTP request.
|
42
|
+
#
|
43
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
|
+
#
|
45
|
+
def list_service_providers_with_http_info(custom_headers:nil)
|
46
|
+
list_service_providers_async(custom_headers:custom_headers).value!
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# Lists the available Service Providers for creating Connection Settings
|
51
|
+
#
|
52
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
53
|
+
# to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
|
+
#
|
57
|
+
def list_service_providers_async(custom_headers:nil)
|
58
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
59
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
60
|
+
|
61
|
+
|
62
|
+
request_headers = {}
|
63
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
64
|
+
|
65
|
+
# Set Headers
|
66
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
67
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
68
|
+
path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.BotService/listAuthServiceProviders'
|
69
|
+
|
70
|
+
request_url = @base_url || @client.base_url
|
71
|
+
|
72
|
+
options = {
|
73
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
74
|
+
path_params: {'subscriptionId' => @client.subscription_id},
|
75
|
+
query_params: {'api-version' => @client.api_version},
|
76
|
+
headers: request_headers.merge(custom_headers || {}),
|
77
|
+
base_url: request_url
|
78
|
+
}
|
79
|
+
promise = @client.make_request_async(:post, path_template, options)
|
80
|
+
|
81
|
+
promise = promise.then do |result|
|
82
|
+
http_response = result.response
|
83
|
+
status_code = http_response.status
|
84
|
+
response_content = http_response.body
|
85
|
+
unless status_code == 200
|
86
|
+
error_model = JSON.load(response_content)
|
87
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
88
|
+
end
|
89
|
+
|
90
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
91
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
92
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
93
|
+
# Deserialize Response
|
94
|
+
if status_code == 200
|
95
|
+
begin
|
96
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
97
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ServiceProviderResponseList.mapper()
|
98
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
99
|
+
rescue Exception => e
|
100
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
result
|
105
|
+
end
|
106
|
+
|
107
|
+
promise.execute
|
108
|
+
end
|
109
|
+
|
110
|
+
#
|
111
|
+
# Get a Connection Setting registration for a Bot Service
|
112
|
+
#
|
113
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
114
|
+
# user subscription.
|
115
|
+
# @param resource_name [String] The name of the Bot resource.
|
116
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
117
|
+
# Setting resource
|
118
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
119
|
+
# will be added to the HTTP request.
|
120
|
+
#
|
121
|
+
# @return [ConnectionSetting] operation results.
|
122
|
+
#
|
123
|
+
def list_with_secrets(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
124
|
+
response = list_with_secrets_async(resource_group_name, resource_name, connection_name, custom_headers:custom_headers).value!
|
125
|
+
response.body unless response.nil?
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Get a Connection Setting registration for a Bot Service
|
130
|
+
#
|
131
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
132
|
+
# user subscription.
|
133
|
+
# @param resource_name [String] The name of the Bot resource.
|
134
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
135
|
+
# Setting resource
|
136
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
137
|
+
# will be added to the HTTP request.
|
138
|
+
#
|
139
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
140
|
+
#
|
141
|
+
def list_with_secrets_with_http_info(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
142
|
+
list_with_secrets_async(resource_group_name, resource_name, connection_name, custom_headers:custom_headers).value!
|
143
|
+
end
|
144
|
+
|
145
|
+
#
|
146
|
+
# Get a Connection Setting registration for a Bot Service
|
147
|
+
#
|
148
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
149
|
+
# user subscription.
|
150
|
+
# @param resource_name [String] The name of the Bot resource.
|
151
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
152
|
+
# Setting resource
|
153
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
154
|
+
# to the HTTP request.
|
155
|
+
#
|
156
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
157
|
+
#
|
158
|
+
def list_with_secrets_async(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
159
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
160
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
161
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '2'" if !resource_group_name.nil? && resource_group_name.length < 2
|
162
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
163
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
164
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_name.nil? && resource_name.length > 64
|
165
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '2'" if !resource_name.nil? && resource_name.length < 2
|
166
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
167
|
+
fail ArgumentError, 'connection_name is nil' if connection_name.nil?
|
168
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MaxLength': '64'" if !connection_name.nil? && connection_name.length > 64
|
169
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MinLength': '2'" if !connection_name.nil? && connection_name.length < 2
|
170
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !connection_name.nil? && connection_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
171
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
172
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
173
|
+
|
174
|
+
|
175
|
+
request_headers = {}
|
176
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
177
|
+
|
178
|
+
# Set Headers
|
179
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
180
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
181
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}/listWithSecrets'
|
182
|
+
|
183
|
+
request_url = @base_url || @client.base_url
|
184
|
+
|
185
|
+
options = {
|
186
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
187
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'connectionName' => connection_name,'subscriptionId' => @client.subscription_id},
|
188
|
+
query_params: {'api-version' => @client.api_version},
|
189
|
+
headers: request_headers.merge(custom_headers || {}),
|
190
|
+
base_url: request_url
|
191
|
+
}
|
192
|
+
promise = @client.make_request_async(:post, path_template, options)
|
193
|
+
|
194
|
+
promise = promise.then do |result|
|
195
|
+
http_response = result.response
|
196
|
+
status_code = http_response.status
|
197
|
+
response_content = http_response.body
|
198
|
+
unless status_code == 200
|
199
|
+
error_model = JSON.load(response_content)
|
200
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
201
|
+
end
|
202
|
+
|
203
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
204
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
205
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
206
|
+
# Deserialize Response
|
207
|
+
if status_code == 200
|
208
|
+
begin
|
209
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
210
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
211
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
212
|
+
rescue Exception => e
|
213
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
result
|
218
|
+
end
|
219
|
+
|
220
|
+
promise.execute
|
221
|
+
end
|
222
|
+
|
223
|
+
#
|
224
|
+
# Register a new Auth Connection for a Bot Service
|
225
|
+
#
|
226
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
227
|
+
# user subscription.
|
228
|
+
# @param resource_name [String] The name of the Bot resource.
|
229
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
230
|
+
# Setting resource
|
231
|
+
# @param parameters [ConnectionSetting] The parameters to provide for creating
|
232
|
+
# the Connection Setting.
|
233
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
234
|
+
# will be added to the HTTP request.
|
235
|
+
#
|
236
|
+
# @return [ConnectionSetting] operation results.
|
237
|
+
#
|
238
|
+
def create(resource_group_name, resource_name, connection_name, parameters, custom_headers:nil)
|
239
|
+
response = create_async(resource_group_name, resource_name, connection_name, parameters, custom_headers:custom_headers).value!
|
240
|
+
response.body unless response.nil?
|
241
|
+
end
|
242
|
+
|
243
|
+
#
|
244
|
+
# Register a new Auth Connection for a Bot Service
|
245
|
+
#
|
246
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
247
|
+
# user subscription.
|
248
|
+
# @param resource_name [String] The name of the Bot resource.
|
249
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
250
|
+
# Setting resource
|
251
|
+
# @param parameters [ConnectionSetting] The parameters to provide for creating
|
252
|
+
# the Connection Setting.
|
253
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
254
|
+
# will be added to the HTTP request.
|
255
|
+
#
|
256
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
257
|
+
#
|
258
|
+
def create_with_http_info(resource_group_name, resource_name, connection_name, parameters, custom_headers:nil)
|
259
|
+
create_async(resource_group_name, resource_name, connection_name, parameters, custom_headers:custom_headers).value!
|
260
|
+
end
|
261
|
+
|
262
|
+
#
|
263
|
+
# Register a new Auth Connection for a Bot Service
|
264
|
+
#
|
265
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
266
|
+
# user subscription.
|
267
|
+
# @param resource_name [String] The name of the Bot resource.
|
268
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
269
|
+
# Setting resource
|
270
|
+
# @param parameters [ConnectionSetting] The parameters to provide for creating
|
271
|
+
# the Connection Setting.
|
272
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
273
|
+
# to the HTTP request.
|
274
|
+
#
|
275
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
276
|
+
#
|
277
|
+
def create_async(resource_group_name, resource_name, connection_name, parameters, custom_headers:nil)
|
278
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
279
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
280
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '2'" if !resource_group_name.nil? && resource_group_name.length < 2
|
281
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
282
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
283
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_name.nil? && resource_name.length > 64
|
284
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '2'" if !resource_name.nil? && resource_name.length < 2
|
285
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
286
|
+
fail ArgumentError, 'connection_name is nil' if connection_name.nil?
|
287
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MaxLength': '64'" if !connection_name.nil? && connection_name.length > 64
|
288
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MinLength': '2'" if !connection_name.nil? && connection_name.length < 2
|
289
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !connection_name.nil? && connection_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
290
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
291
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
292
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
293
|
+
|
294
|
+
|
295
|
+
request_headers = {}
|
296
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
297
|
+
|
298
|
+
# Set Headers
|
299
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
300
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
301
|
+
|
302
|
+
# Serialize Request
|
303
|
+
request_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
304
|
+
request_content = @client.serialize(request_mapper, parameters)
|
305
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
306
|
+
|
307
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'
|
308
|
+
|
309
|
+
request_url = @base_url || @client.base_url
|
310
|
+
|
311
|
+
options = {
|
312
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
313
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'connectionName' => connection_name,'subscriptionId' => @client.subscription_id},
|
314
|
+
query_params: {'api-version' => @client.api_version},
|
315
|
+
body: request_content,
|
316
|
+
headers: request_headers.merge(custom_headers || {}),
|
317
|
+
base_url: request_url
|
318
|
+
}
|
319
|
+
promise = @client.make_request_async(:put, path_template, options)
|
320
|
+
|
321
|
+
promise = promise.then do |result|
|
322
|
+
http_response = result.response
|
323
|
+
status_code = http_response.status
|
324
|
+
response_content = http_response.body
|
325
|
+
unless status_code == 200 || status_code == 201
|
326
|
+
error_model = JSON.load(response_content)
|
327
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
328
|
+
end
|
329
|
+
|
330
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
331
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
332
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
333
|
+
# Deserialize Response
|
334
|
+
if status_code == 200
|
335
|
+
begin
|
336
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
337
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
338
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
339
|
+
rescue Exception => e
|
340
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
341
|
+
end
|
342
|
+
end
|
343
|
+
# Deserialize Response
|
344
|
+
if status_code == 201
|
345
|
+
begin
|
346
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
347
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
348
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
349
|
+
rescue Exception => e
|
350
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
result
|
355
|
+
end
|
356
|
+
|
357
|
+
promise.execute
|
358
|
+
end
|
359
|
+
|
360
|
+
#
|
361
|
+
# Updates a Connection Setting registration for a Bot Service
|
362
|
+
#
|
363
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
364
|
+
# user subscription.
|
365
|
+
# @param resource_name [String] The name of the Bot resource.
|
366
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
367
|
+
# Setting resource
|
368
|
+
# @param parameters [ConnectionSetting] The parameters to provide for updating
|
369
|
+
# the Connection Setting.
|
370
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
371
|
+
# will be added to the HTTP request.
|
372
|
+
#
|
373
|
+
# @return [ConnectionSetting] operation results.
|
374
|
+
#
|
375
|
+
def update(resource_group_name, resource_name, connection_name, parameters, custom_headers:nil)
|
376
|
+
response = update_async(resource_group_name, resource_name, connection_name, parameters, custom_headers:custom_headers).value!
|
377
|
+
response.body unless response.nil?
|
378
|
+
end
|
379
|
+
|
380
|
+
#
|
381
|
+
# Updates a Connection Setting registration for a Bot Service
|
382
|
+
#
|
383
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
384
|
+
# user subscription.
|
385
|
+
# @param resource_name [String] The name of the Bot resource.
|
386
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
387
|
+
# Setting resource
|
388
|
+
# @param parameters [ConnectionSetting] The parameters to provide for updating
|
389
|
+
# the Connection Setting.
|
390
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
391
|
+
# will be added to the HTTP request.
|
392
|
+
#
|
393
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
394
|
+
#
|
395
|
+
def update_with_http_info(resource_group_name, resource_name, connection_name, parameters, custom_headers:nil)
|
396
|
+
update_async(resource_group_name, resource_name, connection_name, parameters, custom_headers:custom_headers).value!
|
397
|
+
end
|
398
|
+
|
399
|
+
#
|
400
|
+
# Updates a Connection Setting registration for a Bot Service
|
401
|
+
#
|
402
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
403
|
+
# user subscription.
|
404
|
+
# @param resource_name [String] The name of the Bot resource.
|
405
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
406
|
+
# Setting resource
|
407
|
+
# @param parameters [ConnectionSetting] The parameters to provide for updating
|
408
|
+
# the Connection Setting.
|
409
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
410
|
+
# to the HTTP request.
|
411
|
+
#
|
412
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
413
|
+
#
|
414
|
+
def update_async(resource_group_name, resource_name, connection_name, parameters, custom_headers:nil)
|
415
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
416
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
417
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '2'" if !resource_group_name.nil? && resource_group_name.length < 2
|
418
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
419
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
420
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_name.nil? && resource_name.length > 64
|
421
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '2'" if !resource_name.nil? && resource_name.length < 2
|
422
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
423
|
+
fail ArgumentError, 'connection_name is nil' if connection_name.nil?
|
424
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MaxLength': '64'" if !connection_name.nil? && connection_name.length > 64
|
425
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MinLength': '2'" if !connection_name.nil? && connection_name.length < 2
|
426
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !connection_name.nil? && connection_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
427
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
428
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
429
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
430
|
+
|
431
|
+
|
432
|
+
request_headers = {}
|
433
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
434
|
+
|
435
|
+
# Set Headers
|
436
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
437
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
438
|
+
|
439
|
+
# Serialize Request
|
440
|
+
request_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
441
|
+
request_content = @client.serialize(request_mapper, parameters)
|
442
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
443
|
+
|
444
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'
|
445
|
+
|
446
|
+
request_url = @base_url || @client.base_url
|
447
|
+
|
448
|
+
options = {
|
449
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
450
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'connectionName' => connection_name,'subscriptionId' => @client.subscription_id},
|
451
|
+
query_params: {'api-version' => @client.api_version},
|
452
|
+
body: request_content,
|
453
|
+
headers: request_headers.merge(custom_headers || {}),
|
454
|
+
base_url: request_url
|
455
|
+
}
|
456
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
457
|
+
|
458
|
+
promise = promise.then do |result|
|
459
|
+
http_response = result.response
|
460
|
+
status_code = http_response.status
|
461
|
+
response_content = http_response.body
|
462
|
+
unless status_code == 200 || status_code == 201
|
463
|
+
error_model = JSON.load(response_content)
|
464
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
465
|
+
end
|
466
|
+
|
467
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
468
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
469
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
470
|
+
# Deserialize Response
|
471
|
+
if status_code == 200
|
472
|
+
begin
|
473
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
474
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
475
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
476
|
+
rescue Exception => e
|
477
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
478
|
+
end
|
479
|
+
end
|
480
|
+
# Deserialize Response
|
481
|
+
if status_code == 201
|
482
|
+
begin
|
483
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
484
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
485
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
486
|
+
rescue Exception => e
|
487
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
488
|
+
end
|
489
|
+
end
|
490
|
+
|
491
|
+
result
|
492
|
+
end
|
493
|
+
|
494
|
+
promise.execute
|
495
|
+
end
|
496
|
+
|
497
|
+
#
|
498
|
+
# Get a Connection Setting registration for a Bot Service
|
499
|
+
#
|
500
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
501
|
+
# user subscription.
|
502
|
+
# @param resource_name [String] The name of the Bot resource.
|
503
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
504
|
+
# Setting resource
|
505
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
506
|
+
# will be added to the HTTP request.
|
507
|
+
#
|
508
|
+
# @return [ConnectionSetting] operation results.
|
509
|
+
#
|
510
|
+
def get(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
511
|
+
response = get_async(resource_group_name, resource_name, connection_name, custom_headers:custom_headers).value!
|
512
|
+
response.body unless response.nil?
|
513
|
+
end
|
514
|
+
|
515
|
+
#
|
516
|
+
# Get a Connection Setting registration for a Bot Service
|
517
|
+
#
|
518
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
519
|
+
# user subscription.
|
520
|
+
# @param resource_name [String] The name of the Bot resource.
|
521
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
522
|
+
# Setting resource
|
523
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
524
|
+
# will be added to the HTTP request.
|
525
|
+
#
|
526
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
527
|
+
#
|
528
|
+
def get_with_http_info(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
529
|
+
get_async(resource_group_name, resource_name, connection_name, custom_headers:custom_headers).value!
|
530
|
+
end
|
531
|
+
|
532
|
+
#
|
533
|
+
# Get a Connection Setting registration for a Bot Service
|
534
|
+
#
|
535
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
536
|
+
# user subscription.
|
537
|
+
# @param resource_name [String] The name of the Bot resource.
|
538
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
539
|
+
# Setting resource
|
540
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
541
|
+
# to the HTTP request.
|
542
|
+
#
|
543
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
544
|
+
#
|
545
|
+
def get_async(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
546
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
547
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
548
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '2'" if !resource_group_name.nil? && resource_group_name.length < 2
|
549
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
550
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
551
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_name.nil? && resource_name.length > 64
|
552
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '2'" if !resource_name.nil? && resource_name.length < 2
|
553
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
554
|
+
fail ArgumentError, 'connection_name is nil' if connection_name.nil?
|
555
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MaxLength': '64'" if !connection_name.nil? && connection_name.length > 64
|
556
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MinLength': '2'" if !connection_name.nil? && connection_name.length < 2
|
557
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !connection_name.nil? && connection_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
558
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
559
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
560
|
+
|
561
|
+
|
562
|
+
request_headers = {}
|
563
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
564
|
+
|
565
|
+
# Set Headers
|
566
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
567
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
568
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'
|
569
|
+
|
570
|
+
request_url = @base_url || @client.base_url
|
571
|
+
|
572
|
+
options = {
|
573
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
574
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'connectionName' => connection_name,'subscriptionId' => @client.subscription_id},
|
575
|
+
query_params: {'api-version' => @client.api_version},
|
576
|
+
headers: request_headers.merge(custom_headers || {}),
|
577
|
+
base_url: request_url
|
578
|
+
}
|
579
|
+
promise = @client.make_request_async(:get, path_template, options)
|
580
|
+
|
581
|
+
promise = promise.then do |result|
|
582
|
+
http_response = result.response
|
583
|
+
status_code = http_response.status
|
584
|
+
response_content = http_response.body
|
585
|
+
unless status_code == 200
|
586
|
+
error_model = JSON.load(response_content)
|
587
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
588
|
+
end
|
589
|
+
|
590
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
591
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
592
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
593
|
+
# Deserialize Response
|
594
|
+
if status_code == 200
|
595
|
+
begin
|
596
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
597
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSetting.mapper()
|
598
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
599
|
+
rescue Exception => e
|
600
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
601
|
+
end
|
602
|
+
end
|
603
|
+
|
604
|
+
result
|
605
|
+
end
|
606
|
+
|
607
|
+
promise.execute
|
608
|
+
end
|
609
|
+
|
610
|
+
#
|
611
|
+
# Deletes a Connection Setting registration for a Bot Service
|
612
|
+
#
|
613
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
614
|
+
# user subscription.
|
615
|
+
# @param resource_name [String] The name of the Bot resource.
|
616
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
617
|
+
# Setting resource
|
618
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
619
|
+
# will be added to the HTTP request.
|
620
|
+
#
|
621
|
+
#
|
622
|
+
def delete(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
623
|
+
response = delete_async(resource_group_name, resource_name, connection_name, custom_headers:custom_headers).value!
|
624
|
+
nil
|
625
|
+
end
|
626
|
+
|
627
|
+
#
|
628
|
+
# Deletes a Connection Setting registration for a Bot Service
|
629
|
+
#
|
630
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
631
|
+
# user subscription.
|
632
|
+
# @param resource_name [String] The name of the Bot resource.
|
633
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
634
|
+
# Setting resource
|
635
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
636
|
+
# will be added to the HTTP request.
|
637
|
+
#
|
638
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
639
|
+
#
|
640
|
+
def delete_with_http_info(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
641
|
+
delete_async(resource_group_name, resource_name, connection_name, custom_headers:custom_headers).value!
|
642
|
+
end
|
643
|
+
|
644
|
+
#
|
645
|
+
# Deletes a Connection Setting registration for a Bot Service
|
646
|
+
#
|
647
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
648
|
+
# user subscription.
|
649
|
+
# @param resource_name [String] The name of the Bot resource.
|
650
|
+
# @param connection_name [String] The name of the Bot Service Connection
|
651
|
+
# Setting resource
|
652
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
653
|
+
# to the HTTP request.
|
654
|
+
#
|
655
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
656
|
+
#
|
657
|
+
def delete_async(resource_group_name, resource_name, connection_name, custom_headers:nil)
|
658
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
659
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
660
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '2'" if !resource_group_name.nil? && resource_group_name.length < 2
|
661
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
662
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
663
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_name.nil? && resource_name.length > 64
|
664
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '2'" if !resource_name.nil? && resource_name.length < 2
|
665
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
666
|
+
fail ArgumentError, 'connection_name is nil' if connection_name.nil?
|
667
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MaxLength': '64'" if !connection_name.nil? && connection_name.length > 64
|
668
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'MinLength': '2'" if !connection_name.nil? && connection_name.length < 2
|
669
|
+
fail ArgumentError, "'connection_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !connection_name.nil? && connection_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
670
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
671
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
672
|
+
|
673
|
+
|
674
|
+
request_headers = {}
|
675
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
676
|
+
|
677
|
+
# Set Headers
|
678
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
679
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
680
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}'
|
681
|
+
|
682
|
+
request_url = @base_url || @client.base_url
|
683
|
+
|
684
|
+
options = {
|
685
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
686
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'connectionName' => connection_name,'subscriptionId' => @client.subscription_id},
|
687
|
+
query_params: {'api-version' => @client.api_version},
|
688
|
+
headers: request_headers.merge(custom_headers || {}),
|
689
|
+
base_url: request_url
|
690
|
+
}
|
691
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
692
|
+
|
693
|
+
promise = promise.then do |result|
|
694
|
+
http_response = result.response
|
695
|
+
status_code = http_response.status
|
696
|
+
response_content = http_response.body
|
697
|
+
unless status_code == 200 || status_code == 204
|
698
|
+
error_model = JSON.load(response_content)
|
699
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
700
|
+
end
|
701
|
+
|
702
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
703
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
704
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
705
|
+
|
706
|
+
result
|
707
|
+
end
|
708
|
+
|
709
|
+
promise.execute
|
710
|
+
end
|
711
|
+
|
712
|
+
#
|
713
|
+
# Returns all the Connection Settings registered to a particular BotService
|
714
|
+
# resource
|
715
|
+
#
|
716
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
717
|
+
# user subscription.
|
718
|
+
# @param resource_name [String] The name of the Bot resource.
|
719
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
720
|
+
# will be added to the HTTP request.
|
721
|
+
#
|
722
|
+
# @return [Array<ConnectionSetting>] operation results.
|
723
|
+
#
|
724
|
+
def list_by_bot_service(resource_group_name, resource_name, custom_headers:nil)
|
725
|
+
first_page = list_by_bot_service_as_lazy(resource_group_name, resource_name, custom_headers:custom_headers)
|
726
|
+
first_page.get_all_items
|
727
|
+
end
|
728
|
+
|
729
|
+
#
|
730
|
+
# Returns all the Connection Settings registered to a particular BotService
|
731
|
+
# resource
|
732
|
+
#
|
733
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
734
|
+
# user subscription.
|
735
|
+
# @param resource_name [String] The name of the Bot resource.
|
736
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
737
|
+
# will be added to the HTTP request.
|
738
|
+
#
|
739
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
740
|
+
#
|
741
|
+
def list_by_bot_service_with_http_info(resource_group_name, resource_name, custom_headers:nil)
|
742
|
+
list_by_bot_service_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
|
743
|
+
end
|
744
|
+
|
745
|
+
#
|
746
|
+
# Returns all the Connection Settings registered to a particular BotService
|
747
|
+
# resource
|
748
|
+
#
|
749
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
750
|
+
# user subscription.
|
751
|
+
# @param resource_name [String] The name of the Bot resource.
|
752
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
753
|
+
# to the HTTP request.
|
754
|
+
#
|
755
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
756
|
+
#
|
757
|
+
def list_by_bot_service_async(resource_group_name, resource_name, custom_headers:nil)
|
758
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
759
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_group_name.nil? && resource_group_name.length > 64
|
760
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '2'" if !resource_group_name.nil? && resource_group_name.length < 2
|
761
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
762
|
+
fail ArgumentError, 'resource_name is nil' if resource_name.nil?
|
763
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MaxLength': '64'" if !resource_name.nil? && resource_name.length > 64
|
764
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'MinLength': '2'" if !resource_name.nil? && resource_name.length < 2
|
765
|
+
fail ArgumentError, "'resource_name' should satisfy the constraint - 'Pattern': '^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'" if !resource_name.nil? && resource_name.match(Regexp.new('^^[a-zA-Z0-9][a-zA-Z0-9_.-]*$$')).nil?
|
766
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
767
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
768
|
+
|
769
|
+
|
770
|
+
request_headers = {}
|
771
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
772
|
+
|
773
|
+
# Set Headers
|
774
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
775
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
776
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections'
|
777
|
+
|
778
|
+
request_url = @base_url || @client.base_url
|
779
|
+
|
780
|
+
options = {
|
781
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
782
|
+
path_params: {'resourceGroupName' => resource_group_name,'resourceName' => resource_name,'subscriptionId' => @client.subscription_id},
|
783
|
+
query_params: {'api-version' => @client.api_version},
|
784
|
+
headers: request_headers.merge(custom_headers || {}),
|
785
|
+
base_url: request_url
|
786
|
+
}
|
787
|
+
promise = @client.make_request_async(:get, path_template, options)
|
788
|
+
|
789
|
+
promise = promise.then do |result|
|
790
|
+
http_response = result.response
|
791
|
+
status_code = http_response.status
|
792
|
+
response_content = http_response.body
|
793
|
+
unless status_code == 200
|
794
|
+
error_model = JSON.load(response_content)
|
795
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
796
|
+
end
|
797
|
+
|
798
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
799
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
800
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
801
|
+
# Deserialize Response
|
802
|
+
if status_code == 200
|
803
|
+
begin
|
804
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
805
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSettingResponseList.mapper()
|
806
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
807
|
+
rescue Exception => e
|
808
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
809
|
+
end
|
810
|
+
end
|
811
|
+
|
812
|
+
result
|
813
|
+
end
|
814
|
+
|
815
|
+
promise.execute
|
816
|
+
end
|
817
|
+
|
818
|
+
#
|
819
|
+
# Returns all the Connection Settings registered to a particular BotService
|
820
|
+
# resource
|
821
|
+
#
|
822
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
823
|
+
# to List operation.
|
824
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
825
|
+
# will be added to the HTTP request.
|
826
|
+
#
|
827
|
+
# @return [ConnectionSettingResponseList] operation results.
|
828
|
+
#
|
829
|
+
def list_by_bot_service_next(next_page_link, custom_headers:nil)
|
830
|
+
response = list_by_bot_service_next_async(next_page_link, custom_headers:custom_headers).value!
|
831
|
+
response.body unless response.nil?
|
832
|
+
end
|
833
|
+
|
834
|
+
#
|
835
|
+
# Returns all the Connection Settings registered to a particular BotService
|
836
|
+
# resource
|
837
|
+
#
|
838
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
839
|
+
# to List operation.
|
840
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
841
|
+
# will be added to the HTTP request.
|
842
|
+
#
|
843
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
844
|
+
#
|
845
|
+
def list_by_bot_service_next_with_http_info(next_page_link, custom_headers:nil)
|
846
|
+
list_by_bot_service_next_async(next_page_link, custom_headers:custom_headers).value!
|
847
|
+
end
|
848
|
+
|
849
|
+
#
|
850
|
+
# Returns all the Connection Settings registered to a particular BotService
|
851
|
+
# resource
|
852
|
+
#
|
853
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
854
|
+
# to List operation.
|
855
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
856
|
+
# to the HTTP request.
|
857
|
+
#
|
858
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
859
|
+
#
|
860
|
+
def list_by_bot_service_next_async(next_page_link, custom_headers:nil)
|
861
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
862
|
+
|
863
|
+
|
864
|
+
request_headers = {}
|
865
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
866
|
+
|
867
|
+
# Set Headers
|
868
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
869
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
870
|
+
path_template = '{nextLink}'
|
871
|
+
|
872
|
+
request_url = @base_url || @client.base_url
|
873
|
+
|
874
|
+
options = {
|
875
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
876
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
877
|
+
headers: request_headers.merge(custom_headers || {}),
|
878
|
+
base_url: request_url
|
879
|
+
}
|
880
|
+
promise = @client.make_request_async(:get, path_template, options)
|
881
|
+
|
882
|
+
promise = promise.then do |result|
|
883
|
+
http_response = result.response
|
884
|
+
status_code = http_response.status
|
885
|
+
response_content = http_response.body
|
886
|
+
unless status_code == 200
|
887
|
+
error_model = JSON.load(response_content)
|
888
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
889
|
+
end
|
890
|
+
|
891
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
892
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
893
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
894
|
+
# Deserialize Response
|
895
|
+
if status_code == 200
|
896
|
+
begin
|
897
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
898
|
+
result_mapper = Azure::BotService::Mgmt::V2018_07_12_preview::Models::ConnectionSettingResponseList.mapper()
|
899
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
900
|
+
rescue Exception => e
|
901
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
902
|
+
end
|
903
|
+
end
|
904
|
+
|
905
|
+
result
|
906
|
+
end
|
907
|
+
|
908
|
+
promise.execute
|
909
|
+
end
|
910
|
+
|
911
|
+
#
|
912
|
+
# Returns all the Connection Settings registered to a particular BotService
|
913
|
+
# resource
|
914
|
+
#
|
915
|
+
# @param resource_group_name [String] The name of the Bot resource group in the
|
916
|
+
# user subscription.
|
917
|
+
# @param resource_name [String] The name of the Bot resource.
|
918
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
919
|
+
# will be added to the HTTP request.
|
920
|
+
#
|
921
|
+
# @return [ConnectionSettingResponseList] which provide lazy access to pages of
|
922
|
+
# the response.
|
923
|
+
#
|
924
|
+
def list_by_bot_service_as_lazy(resource_group_name, resource_name, custom_headers:nil)
|
925
|
+
response = list_by_bot_service_async(resource_group_name, resource_name, custom_headers:custom_headers).value!
|
926
|
+
unless response.nil?
|
927
|
+
page = response.body
|
928
|
+
page.next_method = Proc.new do |next_page_link|
|
929
|
+
list_by_bot_service_next_async(next_page_link, custom_headers:custom_headers)
|
930
|
+
end
|
931
|
+
page
|
932
|
+
end
|
933
|
+
end
|
934
|
+
|
935
|
+
end
|
936
|
+
end
|