diff --git a/azurerm/config.go b/azurerm/config.go index bbb27240c424..e1bb0cc9c637 100644 --- a/azurerm/config.go +++ b/azurerm/config.go @@ -15,6 +15,7 @@ import ( "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/authorization" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/automation" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/batch" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/bot" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cdn" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cognitive" "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute" @@ -86,6 +87,7 @@ type ArmClient struct { automation *automation.Client authorization *authorization.Client batch *batch.Client + bot *bot.Client cdn *cdn.Client cognitive *cognitive.Client compute *compute.Client @@ -210,6 +212,7 @@ func getArmClient(c *authentication.Config, skipProviderRegistration bool, partn client.automation = automation.BuildClient(o) client.authorization = authorization.BuildClient(o) client.batch = batch.BuildClient(o) + client.bot = bot.BuildClient(o) client.cdn = cdn.BuildClient(o) client.cognitive = cognitive.BuildClient(o) client.compute = compute.BuildClient(o) diff --git a/azurerm/internal/services/bot/client.go b/azurerm/internal/services/bot/client.go new file mode 100644 index 000000000000..9bff0fc5eb1f --- /dev/null +++ b/azurerm/internal/services/bot/client.go @@ -0,0 +1,20 @@ +package bot + +import ( + "github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common" +) + +type Client struct { + BotClient *botservice.BotsClient +} + +func BuildClient(o *common.ClientOptions) *Client { + + BotClient := botservice.NewBotsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) + o.ConfigureClient(&BotClient.Client, o.ResourceManagerAuthorizer) + + return &Client{ + BotClient: &BotClient, + } +} diff --git a/azurerm/provider.go b/azurerm/provider.go index 783beea2a52a..79470ae56faa 100644 --- a/azurerm/provider.go +++ b/azurerm/provider.go @@ -173,6 +173,7 @@ func Provider() terraform.ResourceProvider { "azurerm_batch_account": resourceArmBatchAccount(), "azurerm_batch_application": resourceArmBatchApplication(), "azurerm_batch_certificate": resourceArmBatchCertificate(), + "azurerm_bot_channels_registration": resourceArmBotChannelsRegistration(), "azurerm_batch_pool": resourceArmBatchPool(), "azurerm_cdn_endpoint": resourceArmCdnEndpoint(), "azurerm_cdn_profile": resourceArmCdnProfile(), diff --git a/azurerm/required_resource_providers.go b/azurerm/required_resource_providers.go index 52a5e06061bf..39d082d0fe66 100644 --- a/azurerm/required_resource_providers.go +++ b/azurerm/required_resource_providers.go @@ -19,6 +19,7 @@ func requiredResourceProviders() map[string]struct{} { "Microsoft.ApiManagement": {}, "Microsoft.Authorization": {}, "Microsoft.Automation": {}, + "Microsoft.BotService": {}, "Microsoft.Cache": {}, "Microsoft.Cdn": {}, "Microsoft.CognitiveServices": {}, diff --git a/azurerm/resource_arm_bot_channels_registration.go b/azurerm/resource_arm_bot_channels_registration.go new file mode 100644 index 000000000000..2722ba7fc835 --- /dev/null +++ b/azurerm/resource_arm_bot_channels_registration.go @@ -0,0 +1,268 @@ +package azurerm + +import ( + "fmt" + "log" + + "github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/validate" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/tags" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" +) + +func resourceArmBotChannelsRegistration() *schema.Resource { + return &schema.Resource{ + Create: resourceArmBotChannelsRegistrationCreate, + Read: resourceArmBotChannelsRegistrationRead, + Delete: resourceArmBotChannelsRegistrationDelete, + Update: resourceArmBotChannelsRegistrationUpdate, + + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validate.CosmosEntityName, + }, + + "resource_group_name": azure.SchemaResourceGroupName(), + + "location": azure.SchemaLocation(), + + "sku": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + ValidateFunc: validation.StringInSlice([]string{ + string(botservice.F0), + string(botservice.S1), + }, false), + }, + + "microsoft_app_id": { + Type: schema.TypeString, + ForceNew: true, + Required: true, + ValidateFunc: azure.ValidateResourceID, + }, + + "display_name": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.NoEmptyStrings, + }, + + "endpoint": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validate.NoEmptyStrings, + }, + + "developer_app_insights_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.UUID, + }, + + "developer_app_insights_api_key": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Sensitive: true, + ValidateFunc: validate.NoEmptyStrings, + }, + + "developer_app_insights_application_id": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.UUID, + }, + + "tags": tags.Schema(), + }, + } +} + +func resourceArmBotChannelsRegistrationCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).bot.BotClient + ctx := meta.(*ArmClient).StopContext + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + + if features.ShouldResourcesBeImported() && d.IsNewResource() { + existing, err := client.Get(ctx, resourceGroup, name) + if err != nil { + if !utils.ResponseWasNotFound(existing.Response) { + return fmt.Errorf("Error checking for presence of creating Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + } else { + id, err := azure.CosmosGetIDFromResponse(existing.Response) + if err != nil { + return fmt.Errorf("Error generating import ID for Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + return tf.ImportAsExistsError("azurerm_bot", id) + } + } + + t := d.Get("tags").(map[string]interface{}) + displayName := d.Get("display_name").(string) + if displayName == "" { + displayName = name + } + + bot := botservice.Bot{ + Properties: &botservice.BotProperties{ + DisplayName: utils.String(displayName), + Endpoint: utils.String(d.Get("endpoint").(string)), + MsaAppID: utils.String(d.Get("microsoft_app_id").(string)), + DeveloperAppInsightKey: utils.String(d.Get("developer_app_insights_key").(string)), + DeveloperAppInsightsAPIKey: utils.String(d.Get("developer_app_insights_api_key").(string)), + DeveloperAppInsightsApplicationID: utils.String(d.Get("developer_app_insights_application_id").(string)), + }, + Location: utils.String(d.Get("location").(string)), + Sku: &botservice.Sku{ + Name: botservice.SkuName(d.Get("sku").(string)), + }, + Kind: botservice.KindBot, + Tags: tags.Expand(t), + } + + if _, err := client.Create(ctx, resourceGroup, name, bot); err != nil { + return fmt.Errorf("Error issuing create request for Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + resp, err := client.Get(ctx, resourceGroup, name) + if err != nil { + return fmt.Errorf("Error making get request for Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + if resp.ID == nil { + return fmt.Errorf("Cannot read Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + d.SetId(*resp.ID) + + return resourceArmBotChannelsRegistrationRead(d, meta) +} + +func resourceArmBotChannelsRegistrationRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).bot.BotClient + ctx := meta.(*ArmClient).StopContext + + id, err := azure.ParseAzureResourceID(d.Id()) + if err != nil { + return err + } + name := id.Path["botServices"] + + resp, err := client.Get(ctx, id.ResourceGroup, name) + if err != nil { + if utils.ResponseWasNotFound(resp.Response) { + log.Printf("[INFO] Error reading Bot Channels Registration %q (Resource Group %q) - removing from state", name, id.ResourceGroup) + d.SetId("") + return nil + } + + return fmt.Errorf("Error reading Bot Channels Registration %q (Resource Group %q): %+v", name, id.ResourceGroup, err) + } + + d.Set("resource_group_name", id.ResourceGroup) + d.Set("name", resp.Name) + d.Set("location", resp.Location) + + if sku := resp.Sku; sku != nil { + d.Set("sku", string(sku.Name)) + } + + if props := resp.Properties; props != nil { + d.Set("microsoft_app_id", props.MsaAppID) + d.Set("endpoint", props.Endpoint) + d.Set("display_name", props.DisplayName) + d.Set("developer_app_insights_key", props.DeveloperAppInsightKey) + d.Set("developer_app_insights_application_id", props.DeveloperAppInsightsApplicationID) + } + + return tags.FlattenAndSet(d, resp.Tags) +} + +func resourceArmBotChannelsRegistrationUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).bot.BotClient + ctx := meta.(*ArmClient).StopContext + + name := d.Get("name").(string) + resourceGroup := d.Get("resource_group_name").(string) + t := d.Get("tags").(map[string]interface{}) + displayName := d.Get("display_name").(string) + if displayName == "" { + displayName = name + } + + bot := botservice.Bot{ + Properties: &botservice.BotProperties{ + DisplayName: utils.String(displayName), + Endpoint: utils.String(d.Get("endpoint").(string)), + MsaAppID: utils.String(d.Get("microsoft_app_id").(string)), + DeveloperAppInsightKey: utils.String(d.Get("developer_app_insights_key").(string)), + DeveloperAppInsightsAPIKey: utils.String(d.Get("developer_app_insights_api_key").(string)), + DeveloperAppInsightsApplicationID: utils.String(d.Get("developer_app_insights_application_id").(string)), + }, + Location: utils.String(d.Get("location").(string)), + Sku: &botservice.Sku{ + Name: botservice.SkuName(d.Get("sku").(string)), + }, + Kind: botservice.KindBot, + Tags: tags.Expand(t), + } + + if _, err := client.Update(ctx, resourceGroup, name, bot); err != nil { + return fmt.Errorf("Error issuing update request for Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + resp, err := client.Get(ctx, resourceGroup, name) + if err != nil { + return fmt.Errorf("Error making get request for Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + if resp.ID == nil { + return fmt.Errorf("Cannot read Bot Channels Registration %q (Resource Group %q): %+v", name, resourceGroup, err) + } + + d.SetId(*resp.ID) + + return resourceArmBotChannelsRegistrationRead(d, meta) +} + +func resourceArmBotChannelsRegistrationDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*ArmClient).bot.BotClient + ctx := meta.(*ArmClient).StopContext + + id, err := azure.ParseAzureResourceID(d.Id()) + if err != nil { + return err + } + name := id.Path["botServices"] + + resp, err := client.Delete(ctx, id.ResourceGroup, name) + if err != nil { + if !response.WasNotFound(resp.Response) { + return fmt.Errorf("Error deleting Bot Channels Registration %q (Resource Group %q): %+v", name, id.ResourceGroup, err) + } + } + + return nil +} diff --git a/azurerm/resource_arm_bot_channels_registration_test.go b/azurerm/resource_arm_bot_channels_registration_test.go new file mode 100644 index 000000000000..c50abb158d86 --- /dev/null +++ b/azurerm/resource_arm_bot_channels_registration_test.go @@ -0,0 +1,263 @@ +package azurerm + +import ( + "fmt" + "net/http" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf" + "github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils" +) + +func TestAccAzureRMBotChannelsRegistration(t *testing.T) { + // NOTE: this is a combined test rather than separate split out tests due to + // Azure only being able provision against one app id at a time + testCases := map[string]func(t *testing.T){ + "basic": testAccAzureRMBotChannelsRegistration_basic, + "update": testAccAzureRMBotChannelsRegistration_update, + "complete": testAccAzureRMBotChannelsRegistration_complete, + } + + for name, tc := range testCases { + tc := tc + t.Run(name, func(t *testing.T) { + tc(t) + }) + } + +} + +func testAccAzureRMBotChannelsRegistration_basic(t *testing.T) { + ri := tf.AccRandTimeInt() + config := testAccAzureRMBotChannelsRegistration_basicConfig(ri, testLocation()) + resourceName := "azurerm_bot_channels_registration.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMBotChannelsRegistrationDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMBotChannelsRegistrationExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"developer_app_insights_api_key"}, + }, + }, + }) +} + +func testAccAzureRMBotChannelsRegistration_update(t *testing.T) { + ri := tf.AccRandTimeInt() + config := testAccAzureRMBotChannelsRegistration_basicConfig(ri, testLocation()) + config2 := testAccAzureRMBotChannelsRegistration_updateConfig(ri, testLocation()) + resourceName := "azurerm_bot_channels_registration.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMBotChannelsRegistrationDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMBotChannelsRegistrationExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"developer_app_insights_api_key"}, + }, + { + Config: config2, + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMBotChannelsRegistrationExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"developer_app_insights_api_key"}, + }, + }, + }) +} + +func testAccAzureRMBotChannelsRegistration_complete(t *testing.T) { + ri := tf.AccRandTimeInt() + config := testAccAzureRMBotChannelsRegistration_completeConfig(ri, testLocation()) + resourceName := "azurerm_bot_channels_registration.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testCheckAzureRMBotChannelsRegistrationDestroy, + Steps: []resource.TestStep{ + { + Config: config, + Check: resource.ComposeTestCheckFunc( + testCheckAzureRMBotChannelsRegistrationExists(resourceName), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"developer_app_insights_api_key"}, + }, + }, + }) +} + +func testCheckAzureRMBotChannelsRegistrationExists(name string) resource.TestCheckFunc { + return func(s *terraform.State) error { + // Ensure we have enough information in state to look up in API + rs, ok := s.RootModule().Resources[name] + if !ok { + return fmt.Errorf("Not found: %s", name) + } + + name := rs.Primary.Attributes["name"] + resourceGroup, hasResourceGroup := rs.Primary.Attributes["resource_group_name"] + if !hasResourceGroup { + return fmt.Errorf("Bad: no resource group found in state for Bot Channels Registration: %s", name) + } + + client := testAccProvider.Meta().(*ArmClient).bot.BotClient + ctx := testAccProvider.Meta().(*ArmClient).StopContext + + resp, err := client.Get(ctx, resourceGroup, name) + if err != nil { + return fmt.Errorf("Bad: Get on botClient: %+v", err) + } + + if utils.ResponseWasNotFound(resp.Response) { + return fmt.Errorf("Bad: Bot Channels Registration %q (resource group: %q) does not exist", name, resourceGroup) + } + + return nil + } +} + +func testCheckAzureRMBotChannelsRegistrationDestroy(s *terraform.State) error { + client := testAccProvider.Meta().(*ArmClient).bot.BotClient + ctx := testAccProvider.Meta().(*ArmClient).StopContext + + for _, rs := range s.RootModule().Resources { + if rs.Type != "azurerm_bot" { + continue + } + + name := rs.Primary.Attributes["name"] + resourceGroup := rs.Primary.Attributes["resource_group_name"] + + resp, err := client.Get(ctx, resourceGroup, name) + + if err != nil { + return nil + } + + if resp.StatusCode != http.StatusNotFound { + return fmt.Errorf("Bot Channels Registration still exists:\n%#v", resp.Properties) + } + } + + return nil +} + +func testAccAzureRMBotChannelsRegistration_basicConfig(rInt int, location string) string { + return fmt.Sprintf(` +data "azurerm_client_config" "current" {} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_bot_channels_registration" "test" { + name = "acctestdf%d" + location = "global" + resource_group_name = "${azurerm_resource_group.test.name}" + sku = "F0" + microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}" + + tags = { + environment = "production" + } +} +`, rInt, location, rInt) +} + +func testAccAzureRMBotChannelsRegistration_updateConfig(rInt int, location string) string { + return fmt.Sprintf(` +data "azurerm_client_config" "current" {} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_bot_channels_registration" "test" { + name = "acctestdf%d" + location = "global" + resource_group_name = "${azurerm_resource_group.test.name}" + sku = "F0" + microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}" + + tags = { + environment = "production" + } +} +`, rInt, location, rInt) +} + +func testAccAzureRMBotChannelsRegistration_completeConfig(rInt int, location string) string { + return fmt.Sprintf(` +data "azurerm_client_config" "current" {} + +resource "azurerm_resource_group" "test" { + name = "acctestRG-%d" + location = "%s" +} + +resource "azurerm_application_insights" "test" { + name = "acctestappinsights-%d" + location = "${azurerm_resource_group.test.location}" + resource_group_name = "${azurerm_resource_group.test.name}" + application_type = "web" +} + +resource "azurerm_application_insights_api_key" "test" { + name = "acctestappinsightsapikey-%d" + application_insights_id = "${azurerm_application_insights.test.id}" + read_permissions = ["aggregate", "api", "draft", "extendqueries", "search"] +} + +resource "azurerm_bot_channels_registration" "test" { + name = "acctestdf%d" + location = "global" + resource_group_name = "${azurerm_resource_group.test.name}" + microsoft_app_id = "${data.azurerm_client_config.current.service_principal_application_id}" + sku = "F0" + + endpoint = "https://example.com" + developer_app_insights_api_key = "${azurerm_application_insights_api_key.test.api_key}" + developer_app_insights_application_id = "${azurerm_application_insights.test.app_id}" + + tags = { + environment = "production" + } +} +`, rInt, location, rInt, rInt, rInt) +} diff --git a/go.mod b/go.mod index 177678799531..30e505a9fa70 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,6 @@ require ( github.com/hashicorp/terraform v0.12.6 github.com/satori/go.uuid v1.2.0 github.com/satori/uuid v0.0.0-20160927100844-b061729afc07 - github.com/sirupsen/logrus v1.2.0 // indirect github.com/terraform-providers/terraform-provider-azuread v0.6.0 github.com/tombuildsstuff/giovanni v0.4.0 golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 diff --git a/go.sum b/go.sum index 44ab7c624a8c..dfff634c4cec 100644 --- a/go.sum +++ b/go.sum @@ -4,9 +4,6 @@ cloud.google.com/go v0.34.0 h1:eOI3/cP2VTU6uZLDYAoic+eyzzB9YyGmJ7eIjl8rOPg= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.36.0 h1:+aCSj7tOo2LODWVEuZDZeGCckdt6MlSF+X/rB3wUiS8= cloud.google.com/go v0.36.0/go.mod h1:RUoy9p/M4ge0HzT8L+SDZ8jg+Q6fth0CiBuhFJpSV40= -contrib.go.opencensus.io/exporter/ocagent v0.4.2 h1:EjvhWhqxJpIUEBcTJoUDUyScfZ/30ehPEvDmvj9v4DA= -contrib.go.opencensus.io/exporter/ocagent v0.4.2/go.mod h1:YuG83h+XWwqWjvCqn7vK4KSyLKhThY3+gNGQ37iS2V0= -contrib.go.opencensus.io/exporter/ocagent v0.4.12/go.mod h1:450APlNTSR6FrvC3CTRqYosuDstRB9un7SOx2k/9ckA= contrib.go.opencensus.io/exporter/ocagent v0.5.0 h1:TKXjQSRS0/cCDrP7KvkgU6SmILtF/yV2TOs/02K/WZQ= contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= @@ -15,32 +12,18 @@ dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1 dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/Azure/azure-sdk-for-go v21.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v30.0.0+incompatible h1:6o1Yzl7wTBYg+xw0pY4qnalaPmEQolubEEdepo1/kmI= -github.com/Azure/azure-sdk-for-go v30.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v32.3.0+incompatible h1:cPbYVpshHJc/lWNk0Gzhf8SLN+7qpdb8RQnRh0gntcI= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible h1:Hn/DsObfmw0M7dMGS/c0MlVrJuGFzHzOpBWL89acR68= github.com/Azure/azure-sdk-for-go v32.5.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-autorest v10.15.4+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v11.7.0+incompatible h1:gzma19dc9ejB75D90E5S+/wXouzpZyA+CV+/MJPSD/k= -github.com/Azure/go-autorest v11.7.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v12.2.0+incompatible h1:2Fxszbg492oAJrcvJlgyVaTqnQYRkxmEK6VPCLLVpBI= -github.com/Azure/go-autorest v12.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v13.0.0+incompatible h1:56c11ykhsFSPNNQuS73Ri8h/ezqVhr2h6t9LJIEKVO0= github.com/Azure/go-autorest v13.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.3.0 h1:yOmXNB2qa2Kx40wMZB19YyafzjCHacXPk8u0neqa+M0= -github.com/Azure/go-autorest/autorest v0.3.0/go.mod h1:AKyIcETwSUFxIcs/Wnq/C+kwCtlEYGUVd7FPNb2slmg= github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.1.0 h1:RSw/7EAullliqwkZvgIGDYZWQm1PGKXI8c4aY/87yuU= -github.com/Azure/go-autorest/autorest/adal v0.1.0/go.mod h1:MeS4XhScH55IST095THyTxElntu7WqB7pNbZo8Q5G3E= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.6.0 h1:UCTq22yE3RPgbU/8u4scfnnzuCW6pwQ9n+uBtV78ouo= github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/azure/auth v0.3.0/go.mod h1:CI4BQYBct8NS7BXNBBX+RchsFsUu5+oz+OSyR/ZIi7U= -github.com/Azure/go-autorest/autorest/azure/cli v0.1.0 h1:YTtBrcb6mhA+PoSW8WxFDoIIyjp13XqJeX80ssQtri4= -github.com/Azure/go-autorest/autorest/azure/cli v0.1.0/go.mod h1:Dk8CUAt/b/PzkfeRsWzVG9Yj3ps8mS8ECztu43rdU8U= github.com/Azure/go-autorest/autorest/azure/cli v0.2.0 h1:pSwNMF0qotgehbQNllUWwJ4V3vnrLKOzHrwDLEZK904= github.com/Azure/go-autorest/autorest/azure/cli v0.2.0/go.mod h1:WWTbGPvkAg3I4ms2j2s+Zr5xCGwGqTQh+6M2ZqOczkE= github.com/Azure/go-autorest/autorest/azure/cli v0.3.0 h1:5PAqnv+CSTwW9mlZWZAizmzrazFWEgZykEZXpr2hDtY= @@ -55,18 +38,12 @@ github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7 github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= -github.com/Azure/go-autorest/autorest/to v0.2.0 h1:nQOZzFCudTh+TvquAtCRjM01VEYx85e9qbwt5ncW4L8= -github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= github.com/Azure/go-autorest/autorest/to v0.3.0 h1:zebkZaadz7+wIQYgC7GXaz3Wb28yKYfVkkBKwc38VF8= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= -github.com/Azure/go-autorest/autorest/validation v0.1.0 h1:ISSNzGUh+ZSzizJWOWzs8bwpXIePbGLW4z/AmUFGH5A= -github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= github.com/Azure/go-autorest/autorest/validation v0.2.0 h1:15vMO4y76dehZSq7pAaOLQxC6dZYsSrj2GQpflyM/L4= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.1.0 h1:TRBxC5Pj/fIuh4Qob0ZpkggbfT8RC0SubHbpV3p4/Vc= -github.com/Azure/go-autorest/tracing v0.1.0/go.mod h1:ROEEAFwXycQw7Sn3DXNtEedEvdeRAgDr0izn4z5Ij88= github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/Azure/go-ntlmssp v0.0.0-20180810175552-4a21cbd618b4 h1:pSm8mp0T2OH2CPmPDPtwHPr3VAQaOwVF/JbllOPP4xA= @@ -75,8 +52,6 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022 h1:y8Gs8CzNfDF5AZvjr+5UyGQvQEBL7pwo+v+wX6q9JI8= github.com/ChrisTrenkamp/goxpath v0.0.0-20170922090931-c385f95c6022/go.mod h1:nuWgzSkT5PnyOd+272uUmV0dnAnAn42Mk7PiQC5VzN4= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292 h1:tuQ7w+my8a8mkwN7x2TSd7OzTjkZ7rAeSyH4xncuAMI= github.com/Unknwon/com v0.0.0-20151008135407-28b053d5a292/go.mod h1:KYCjqMOeHpNuTOiFQU6WEcTG7poCJrUs0YgyHNtn1no= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= @@ -85,8 +60,6 @@ github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agl/ed25519 v0.0.0-20150830182803-278e1ec8e8a6/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a h1:APorzFpCcv6wtD5vmRWYqNm4N55kbepL7c7kTq9XI6A= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190329064014-6e358769c32a/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190103054945-8205d1f41e70 h1:FrF4uxA24DF3ARNXVbUin3wa5fDLaB1Cy8mKks/LRz4= @@ -96,7 +69,6 @@ github.com/aliyun/aliyun-tablestore-go-sdk v4.1.2+incompatible/go.mod h1:LDQHRZy github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antchfx/xpath v0.0.0-20190129040759-c8489ed3251e/go.mod h1:Yee4kTMuNiPYJ7nSNorELQMr1J33uOpXDMByNYhvtNk= github.com/antchfx/xquery v0.0.0-20180515051857-ad5b8c7a47b0/go.mod h1:LzD22aAzDP8/dyiCKFp31He4m2GPjl0AFyzDtZzUu9M= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apparentlymart/go-cidr v1.0.0 h1:lGDvXx8Lv9QHjrAVP7jyzleG4F9+FkRhJcEsDFxeb8w= github.com/apparentlymart/go-cidr v1.0.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= @@ -115,8 +87,6 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.16.36 h1:POeH34ZME++pr7GBGh+ZO6Y5kOwSMQpqp5BGUgooJ6k= github.com/aws/aws-sdk-go v1.16.36/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.19.18 h1:Hb3+b9HCqrOrbAtFstUWg7H5TQ+/EcklJtE8VShVs8o= -github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.21.7 h1:ml+k7szyVaq4YD+3LhqOGl9tgMTqgMbpnuUSkB6UJvQ= github.com/aws/aws-sdk-go v1.21.7/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= @@ -132,7 +102,6 @@ github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBT github.com/bsm/go-vlq v0.0.0-20150828105119-ec6e8d4f5f4e/go.mod h1:N+BjUcTjSxc2mtRGSCPsat1kze3CUtvJN3/jTXlp29k= github.com/btubbs/datetime v0.1.0 h1:183iHRjmNAokYM5D8V3wbEOOEe/HYEYpm7E2oom3vhM= github.com/btubbs/datetime v0.1.0/go.mod h1:n2BZ/2ltnRzNiz27aE3wUb2onNttQdC+WFxAoks5jJM= -github.com/census-instrumentation/opencensus-proto v0.1.0-0.20181214143942-ba49f56771b8/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.0 h1:LzQXZOgg4CQfE6bFvXGM30YZL1WW/M337pXml+GrcZ4= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= @@ -167,9 +136,6 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/dylanmei/iso8601 v0.1.0 h1:812NGQDBcqquTfH5Yeo7lwR0nzx/cKdsmf3qMjPURUI= github.com/dylanmei/iso8601 v0.1.0/go.mod h1:w9KhXSgIyROl1DefbMYIE7UVSIvELTbMrCfx+QkYnoQ= github.com/dylanmei/winrmtest v0.0.0-20190225150635-99b7fe2fddf1/go.mod h1:lcy9/2gH1jn/VCLouHA6tOEwLoNVd4GW6zhuKLmHC2Y= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= @@ -178,9 +144,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.1 h1:UQhStjbkDClarlmv0am7OXXO4/GaPdCGiUiMTvi28sg= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -226,8 +189,6 @@ github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01 h1:OgCNGSnEalfkR github.com/gophercloud/utils v0.0.0-20190128072930-fbb6ab446f01/go.mod h1:wjDF8z83zTeg5eMLml5EBSlAhbF7G8DobyI1YsMuyzw= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -252,8 +213,6 @@ github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3m github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-getter v1.3.0 h1:pFMSFlI9l5NaeuzkpE3L7BYk9qQ9juTAgXW/H0cqxcU= -github.com/hashicorp/go-getter v1.3.0/go.mod h1:/O1k/AizTN0QmfEKknCYGvICeyKUDqCYA8vvWtGWDeQ= github.com/hashicorp/go-getter v1.3.1-0.20190627223108-da0323b9545e h1:6krcdHPiS+aIP9XKzJzSahfjD7jG7Z+4+opm0z39V1M= github.com/hashicorp/go-getter v1.3.1-0.20190627223108-da0323b9545e/go.mod h1:/O1k/AizTN0QmfEKknCYGvICeyKUDqCYA8vvWtGWDeQ= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= @@ -264,8 +223,6 @@ github.com/hashicorp/go-msgpack v0.5.4/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iP github.com/hashicorp/go-multierror v0.0.0-20180717150148-3d5d8f294aa0/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.0.1-0.20190430211030-5692942914bb h1:Zg2pmmk0lrLFL85lQGt08bOUBpIBaVs6/psiAyx0c4w= -github.com/hashicorp/go-plugin v1.0.1-0.20190430211030-5692942914bb/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-plugin v1.0.1-0.20190610192547-a1bc61569a26 h1:hRho44SAoNu1CBtn5r8Q9J3rCs4ZverWZ4R+UeeNuWM= github.com/hashicorp/go-plugin v1.0.1-0.20190610192547-a1bc61569a26/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.2 h1:AoISa4P4IsW0/m4T6St8Yw38gTl5GtBAgfkhYh1xAz4= @@ -293,8 +250,6 @@ github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl2 v0.0.0-20181208003705-670926858200/go.mod h1:ShfpTh661oAaxo7VcNxg0zcZW6jvMa7Moy2oFx7e5dE= -github.com/hashicorp/hcl2 v0.0.0-20190515223218-4b22149b7cef h1:xZRvbcwHY8zhaxDwgkmpAp2emwZkVn7p3gat0zhq2X0= -github.com/hashicorp/hcl2 v0.0.0-20190515223218-4b22149b7cef/go.mod h1:4oI94iqF3GB10QScn46WqbG0kgTUpha97SAzzg2+2ec= github.com/hashicorp/hcl2 v0.0.0-20190725010614-0c3fe388e450 h1:wpa0vOXOnSEuwZ++eVk1gQNm3Jy2+Envn0cQRgsl8K8= github.com/hashicorp/hcl2 v0.0.0-20190725010614-0c3fe388e450/go.mod h1:FSQTwDi9qesxGBsII2VqhIzKQ4r0bHvBkOczWfD7llg= github.com/hashicorp/hil v0.0.0-20190212112733-ab17b08d6590 h1:2yzhWGdgQUWZUCNK+AoO35V+HTsgEmcM4J9IkArh7PI= @@ -304,8 +259,6 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb h1:ZbgmOQt8DOg796figP87/EFCVx2v2h9yRvwHF/zceX4= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/terraform v0.12.0 h1:It2vmod2dBMB4+r+aUW2Afx0HlftyUwzNsNH3I2vrJ8= -github.com/hashicorp/terraform v0.12.0/go.mod h1:Ke0ig9gGZ8rhV6OddAhBYt5nXmpvXsuNQQ8w9qYBZfU= github.com/hashicorp/terraform v0.12.6 h1:mWItQdLZQ7f3kBYBu2Kgdg+E5iZb1KtCq73V10Hmu48= github.com/hashicorp/terraform v0.12.6/go.mod h1:udmq5rU8CO9pEIh/A/Xrs3zb3yYU/W9ce1pp8K1ysHA= github.com/hashicorp/terraform-config-inspect v0.0.0-20190327195015-8022a2663a70 h1:oZm5nE11yhzsTRz/YrUyDMSvixePqjoZihwn8ipuOYI= @@ -326,15 +279,12 @@ github.com/joyent/triton-go v0.0.0-20180313100802-d8f9c0314926/go.mod h1:U+RSyWx github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA= github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -401,7 +351,6 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ= @@ -412,16 +361,12 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y= github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17 h1:chPfVn+gpAM5CTpTyVU9j8J+xgRGwmoDlNDLjKnJiYo= github.com/pkg/errors v0.0.0-20170505043639-c605e284fe17/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -430,16 +375,9 @@ github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndr github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI= github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= @@ -473,7 +411,6 @@ github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go. github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= @@ -498,17 +435,11 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/terraform-providers/terraform-provider-azuread v0.4.1-0.20190610202312-5a179146b9f9 h1:ojk/m9351BypXVBhNVTJbRFvdjT0zUsgKUduZ5QoXl0= -github.com/terraform-providers/terraform-provider-azuread v0.4.1-0.20190610202312-5a179146b9f9/go.mod h1:WhiLOITuLMMAoNEWQAC7bZR8tZpSIoFaOv6Hjiz0QOo= github.com/terraform-providers/terraform-provider-azuread v0.6.0 h1:eMTUnmKi7rfNrP3SIV9+/XJ9yC1RDhkHrOiCPI5KNBU= github.com/terraform-providers/terraform-provider-azuread v0.6.0/go.mod h1:O4kN9f8f6//T2EcSe4bcICeAex00XpYC50+fbBmuQ/g= github.com/terraform-providers/terraform-provider-openstack v1.15.0 h1:adpjqej+F8BAX9dHmuPF47sUIkgifeqBu6p7iCsyj0Y= github.com/terraform-providers/terraform-provider-openstack v1.15.0/go.mod h1:2aQ6n/BtChAl1y2S60vebhyJyZXBsuAI5G4+lHrT1Ew= github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tombuildsstuff/giovanni v0.3.2 h1:uKt7irq74daF0lvaA0X9bEuFKSDhceVy4DyWVPDRYeU= -github.com/tombuildsstuff/giovanni v0.3.2/go.mod h1:3UHcoRZCvWTjXMWCJ0epD1VROlPMwZeeof3vfP6NiWM= -github.com/tombuildsstuff/giovanni v0.3.3-0.20190823094657-ff85ec2ac5d5 h1:M5CRmx8+0gcgEG6qpPml39RS3Squ1zbFD0xVZ1owpzM= -github.com/tombuildsstuff/giovanni v0.3.3-0.20190823094657-ff85ec2ac5d5/go.mod h1:3UHcoRZCvWTjXMWCJ0epD1VROlPMwZeeof3vfP6NiWM= github.com/tombuildsstuff/giovanni v0.4.0 h1:MHJuSqcRkYqoNMIBpOjn3ljwAmABR5GPmtFH11bm/Vo= github.com/tombuildsstuff/giovanni v0.4.0/go.mod h1:Xu/XU+DiRrKTDoCnJNGuh9ysD0eJyi/zU/naFh2aN9I= github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5 h1:cMjKdf4PxEBN9K5HaD9UMW8gkTbM0kMzkTa9SJe0WNQ= @@ -526,9 +457,6 @@ github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 h1:Jpn2j6wHkC9wJv5i github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/zclconf/go-cty v0.0.0-20181129180422-88fbe721e0f8/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v0.0.0-20190426224007-b18a157db9e2/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v0.0.0-20190516203816-4fecf87372ec h1:MSeYjmyjucsFbecMTxg63ASg23lcSARP/kr9sClTFfk= -github.com/zclconf/go-cty v0.0.0-20190516203816-4fecf87372ec/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.0.1-0.20190708163926-19588f92a98f h1:sq2p8SN6ji66CFEQFIWLlD/gFmGtr5hBrOzv5nLlGfA= github.com/zclconf/go-cty v1.0.1-0.20190708163926-19588f92a98f/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= @@ -537,8 +465,6 @@ github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgK go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b h1:6ayHMBPtdP3jNuk+Sfhso+PTB7ZJQ5E1FBo403m2H8w= go.opencensus.io v0.18.1-0.20181204023538-aab39bd6a98b/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -579,7 +505,6 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd h1:HuTn7WObtcDo9uEEU7rEqL0jYthdXAmZ6PP+meazmaU= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -610,8 +535,6 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -649,7 +572,6 @@ google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+ google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.1.0 h1:K6z2u68e86TPdSdefXdzvXgR1zEMa+459vBSfWYAZkI= google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0 h1:KKgc1aqhV8wDPbDzlDtpvyjZFY3vjz85FP7p4wcQUyI= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -667,17 +589,14 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb h1:i1Ppqkc3WQXikh8bXiwHqAN5Rv3/qDCcRk0/Otx73BY= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.15.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0 h1:TRJYBgMclJvGYn2rIMjj+h9KtMt5r1Ij7ODVRIZkwhk= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.18.0 h1:IZl7mfBGfbhYx2p2rKRtYgDFw6SBz+kclmxYrCksPPA= google.golang.org/grpc v1.18.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/clusters.go index b2bd8bb2bb03..5d7c52174942 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/clusters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/clusters.go @@ -111,8 +111,8 @@ func (client ClustersClient) CheckNameAvailabilityPreparer(ctx context.Context, // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -192,9 +192,9 @@ func (client ClustersClient) CreateOrUpdatePreparer(ctx context.Context, resourc // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) CreateOrUpdateSender(req *http.Request) (future ClustersCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -269,9 +269,9 @@ func (client ClustersClient) DeletePreparer(ctx context.Context, resourceGroupNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) DeleteSender(req *http.Request) (future ClustersDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -351,8 +351,8 @@ func (client ClustersClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -423,8 +423,8 @@ func (client ClustersClient) ListPreparer(ctx context.Context) (*http.Request, e // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -498,8 +498,8 @@ func (client ClustersClient) ListByResourceGroupPreparer(ctx context.Context, re // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -570,8 +570,8 @@ func (client ClustersClient) ListSkusPreparer(ctx context.Context) (*http.Reques // ListSkusSender sends the ListSkus request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) ListSkusSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListSkusResponder handles the response to the ListSkus request. The method always @@ -647,8 +647,8 @@ func (client ClustersClient) ListSkusByResourcePreparer(ctx context.Context, res // ListSkusByResourceSender sends the ListSkusByResource request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) ListSkusByResourceSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListSkusByResourceResponder handles the response to the ListSkusByResource request. The method always @@ -718,9 +718,9 @@ func (client ClustersClient) StartPreparer(ctx context.Context, resourceGroupNam // StartSender sends the Start request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) StartSender(req *http.Request) (future ClustersStartFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -794,9 +794,9 @@ func (client ClustersClient) StopPreparer(ctx context.Context, resourceGroupName // StopSender sends the Stop request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) StopSender(req *http.Request) (future ClustersStopFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -873,9 +873,9 @@ func (client ClustersClient) UpdatePreparer(ctx context.Context, resourceGroupNa // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ClustersClient) UpdateSender(req *http.Request) (future ClustersUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/databases.go index 020bf3673d52..c8e3fd081ef9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/databases.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/databases.go @@ -108,8 +108,8 @@ func (client DatabasesClient) AddPrincipalsPreparer(ctx context.Context, resourc // AddPrincipalsSender sends the AddPrincipals request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) AddPrincipalsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // AddPrincipalsResponder handles the response to the AddPrincipals request. The method always @@ -195,8 +195,8 @@ func (client DatabasesClient) CheckNameAvailabilityPreparer(ctx context.Context, // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -271,9 +271,9 @@ func (client DatabasesClient) CreateOrUpdatePreparer(ctx context.Context, resour // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future DatabasesCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -350,9 +350,9 @@ func (client DatabasesClient) DeletePreparer(ctx context.Context, resourceGroupN // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -434,8 +434,8 @@ func (client DatabasesClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -511,8 +511,8 @@ func (client DatabasesClient) ListByClusterPreparer(ctx context.Context, resourc // ListByClusterSender sends the ListByCluster request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) ListByClusterSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByClusterResponder handles the response to the ListByCluster request. The method always @@ -590,8 +590,8 @@ func (client DatabasesClient) ListPrincipalsPreparer(ctx context.Context, resour // ListPrincipalsSender sends the ListPrincipals request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) ListPrincipalsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListPrincipalsResponder handles the response to the ListPrincipals request. The method always @@ -672,8 +672,8 @@ func (client DatabasesClient) RemovePrincipalsPreparer(ctx context.Context, reso // RemovePrincipalsSender sends the RemovePrincipals request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) RemovePrincipalsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // RemovePrincipalsResponder handles the response to the RemovePrincipals request. The method always @@ -748,9 +748,9 @@ func (client DatabasesClient) UpdatePreparer(ctx context.Context, resourceGroupN // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client DatabasesClient) UpdateSender(req *http.Request) (future DatabasesUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go index 81917797009d..effd44134df0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/dataconnections.go @@ -115,8 +115,8 @@ func (client DataConnectionsClient) CheckNameAvailabilityPreparer(ctx context.Co // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client DataConnectionsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -193,9 +193,9 @@ func (client DataConnectionsClient) CreateOrUpdatePreparer(ctx context.Context, // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DataConnectionsClient) CreateOrUpdateSender(req *http.Request) (future DataConnectionsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -281,8 +281,8 @@ func (client DataConnectionsClient) DataConnectionValidationMethodPreparer(ctx c // DataConnectionValidationMethodSender sends the DataConnectionValidationMethod request. The method will close the // http.Response Body if it receives an error. func (client DataConnectionsClient) DataConnectionValidationMethodSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DataConnectionValidationMethodResponder handles the response to the DataConnectionValidationMethod request. The method always @@ -356,9 +356,9 @@ func (client DataConnectionsClient) DeletePreparer(ctx context.Context, resource // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DataConnectionsClient) DeleteSender(req *http.Request) (future DataConnectionsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -442,8 +442,8 @@ func (client DataConnectionsClient) GetPreparer(ctx context.Context, resourceGro // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DataConnectionsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -521,8 +521,8 @@ func (client DataConnectionsClient) ListByDatabasePreparer(ctx context.Context, // ListByDatabaseSender sends the ListByDatabase request. The method will close the // http.Response Body if it receives an error. func (client DataConnectionsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByDatabaseResponder handles the response to the ListByDatabase request. The method always @@ -599,9 +599,9 @@ func (client DataConnectionsClient) UpdatePreparer(ctx context.Context, resource // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client DataConnectionsClient) UpdateSender(req *http.Request) (future DataConnectionsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, - azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/operations.go index d919369b413e..23cf4c0296be 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto/operations.go @@ -94,8 +94,8 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/botconnection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/botconnection.go new file mode 100644 index 000000000000..5582ae18a839 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/botconnection.go @@ -0,0 +1,721 @@ +package botservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// BotConnectionClient is the azure Bot Service is a platform for creating smart conversational agents. +type BotConnectionClient struct { + BaseClient +} + +// NewBotConnectionClient creates an instance of the BotConnectionClient client. +func NewBotConnectionClient(subscriptionID string) BotConnectionClient { + return NewBotConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBotConnectionClientWithBaseURI creates an instance of the BotConnectionClient client. +func NewBotConnectionClientWithBaseURI(baseURI string, subscriptionID string) BotConnectionClient { + return BotConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create register a new Auth Connection for a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// connectionName - the name of the Bot Service Connection Setting resource +// parameters - the parameters to provide for creating the Connection Setting. +func (client BotConnectionClient) Create(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (result ConnectionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: connectionName, + Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotConnectionClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, connectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client BotConnectionClient) CreatePreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client BotConnectionClient) CreateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client BotConnectionClient) CreateResponder(resp *http.Response) (result ConnectionSetting, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Connection Setting registration for a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// connectionName - the name of the Bot Service Connection Setting resource +func (client BotConnectionClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: connectionName, + Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotConnectionClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BotConnectionClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client BotConnectionClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BotConnectionClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get a Connection Setting registration for a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// connectionName - the name of the Bot Service Connection Setting resource +func (client BotConnectionClient) Get(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result ConnectionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: connectionName, + Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotConnectionClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BotConnectionClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client BotConnectionClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BotConnectionClient) GetResponder(resp *http.Response) (result ConnectionSetting, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByBotService returns all the Connection Settings registered to a particular BotService resource +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +func (client BotConnectionClient) ListByBotService(ctx context.Context, resourceGroupName string, resourceName string) (result ConnectionSettingResponseListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.ListByBotService") + defer func() { + sc := -1 + if result.csrl.Response.Response != nil { + sc = result.csrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotConnectionClient", "ListByBotService", err.Error()) + } + + result.fn = client.listByBotServiceNextResults + req, err := client.ListByBotServicePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListByBotService", nil, "Failure preparing request") + return + } + + resp, err := client.ListByBotServiceSender(req) + if err != nil { + result.csrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListByBotService", resp, "Failure sending request") + return + } + + result.csrl, err = client.ListByBotServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListByBotService", resp, "Failure responding to request") + } + + return +} + +// ListByBotServicePreparer prepares the ListByBotService request. +func (client BotConnectionClient) ListByBotServicePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByBotServiceSender sends the ListByBotService request. The method will close the +// http.Response Body if it receives an error. +func (client BotConnectionClient) ListByBotServiceSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByBotServiceResponder handles the response to the ListByBotService request. The method always +// closes the http.Response Body. +func (client BotConnectionClient) ListByBotServiceResponder(resp *http.Response) (result ConnectionSettingResponseList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByBotServiceNextResults retrieves the next set of results, if any. +func (client BotConnectionClient) listByBotServiceNextResults(ctx context.Context, lastResults ConnectionSettingResponseList) (result ConnectionSettingResponseList, err error) { + req, err := lastResults.connectionSettingResponseListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "listByBotServiceNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByBotServiceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "listByBotServiceNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByBotServiceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "listByBotServiceNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByBotServiceComplete enumerates all values, automatically crossing page boundaries as required. +func (client BotConnectionClient) ListByBotServiceComplete(ctx context.Context, resourceGroupName string, resourceName string) (result ConnectionSettingResponseListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.ListByBotService") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByBotService(ctx, resourceGroupName, resourceName) + return +} + +// ListServiceProviders lists the available Service Providers for creating Connection Settings +func (client BotConnectionClient) ListServiceProviders(ctx context.Context) (result ServiceProviderResponseList, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.ListServiceProviders") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.ListServiceProvidersPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListServiceProviders", nil, "Failure preparing request") + return + } + + resp, err := client.ListServiceProvidersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListServiceProviders", resp, "Failure sending request") + return + } + + result, err = client.ListServiceProvidersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListServiceProviders", resp, "Failure responding to request") + } + + return +} + +// ListServiceProvidersPreparer prepares the ListServiceProviders request. +func (client BotConnectionClient) ListServiceProvidersPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listAuthServiceProviders", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListServiceProvidersSender sends the ListServiceProviders request. The method will close the +// http.Response Body if it receives an error. +func (client BotConnectionClient) ListServiceProvidersSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListServiceProvidersResponder handles the response to the ListServiceProviders request. The method always +// closes the http.Response Body. +func (client BotConnectionClient) ListServiceProvidersResponder(resp *http.Response) (result ServiceProviderResponseList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListWithSecrets get a Connection Setting registration for a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// connectionName - the name of the Bot Service Connection Setting resource +func (client BotConnectionClient) ListWithSecrets(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (result ConnectionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.ListWithSecrets") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: connectionName, + Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotConnectionClient", "ListWithSecrets", err.Error()) + } + + req, err := client.ListWithSecretsPreparer(ctx, resourceGroupName, resourceName, connectionName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListWithSecrets", nil, "Failure preparing request") + return + } + + resp, err := client.ListWithSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListWithSecrets", resp, "Failure sending request") + return + } + + result, err = client.ListWithSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "ListWithSecrets", resp, "Failure responding to request") + } + + return +} + +// ListWithSecretsPreparer prepares the ListWithSecrets request. +func (client BotConnectionClient) ListWithSecretsPreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}/listWithSecrets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListWithSecretsSender sends the ListWithSecrets request. The method will close the +// http.Response Body if it receives an error. +func (client BotConnectionClient) ListWithSecretsSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListWithSecretsResponder handles the response to the ListWithSecrets request. The method always +// closes the http.Response Body. +func (client BotConnectionClient) ListWithSecretsResponder(resp *http.Response) (result ConnectionSetting, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates a Connection Setting registration for a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// connectionName - the name of the Bot Service Connection Setting resource +// parameters - the parameters to provide for updating the Connection Setting. +func (client BotConnectionClient) Update(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (result ConnectionSetting, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotConnectionClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: connectionName, + Constraints: []validation.Constraint{{Target: "connectionName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "connectionName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "connectionName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotConnectionClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, connectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotConnectionClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BotConnectionClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, connectionName string, parameters ConnectionSetting) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionName": autorest.Encode("path", connectionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/Connections/{connectionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client BotConnectionClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BotConnectionClient) UpdateResponder(resp *http.Response) (result ConnectionSetting, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/bots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/bots.go new file mode 100644 index 000000000000..6a487ceeb75f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/bots.go @@ -0,0 +1,712 @@ +package botservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// BotsClient is the azure Bot Service is a platform for creating smart conversational agents. +type BotsClient struct { + BaseClient +} + +// NewBotsClient creates an instance of the BotsClient client. +func NewBotsClient(subscriptionID string) BotsClient { + return NewBotsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBotsClientWithBaseURI creates an instance of the BotsClient client. +func NewBotsClientWithBaseURI(baseURI string, subscriptionID string) BotsClient { + return BotsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a Bot Service. Bot Service is a resource group wide resource type. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// parameters - the parameters to provide for the created bot. +func (client BotsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot) (result Bot, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.DisplayName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.Endpoint", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Properties.MsaAppID", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewError("botservice.BotsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client BotsClient) CreatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client BotsClient) CreateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client BotsClient) CreateResponder(resp *http.Response) (result Bot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Bot Service from the resource group. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +func (client BotsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client BotsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client BotsClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client BotsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns a BotService specified by the parameters. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +func (client BotsClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Bot, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BotsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client BotsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BotsClient) GetResponder(resp *http.Response) (result Bot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCheckNameAvailability check whether a bot name is available. +// Parameters: +// parameters - the request body parameters to provide for the check name availability request +func (client BotsClient) GetCheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityRequestBody) (result CheckNameAvailabilityResponseBody, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.GetCheckNameAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.GetCheckNameAvailabilityPreparer(ctx, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "GetCheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.GetCheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "GetCheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.GetCheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "GetCheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// GetCheckNameAvailabilityPreparer prepares the GetCheckNameAvailability request. +func (client BotsClient) GetCheckNameAvailabilityPreparer(ctx context.Context, parameters CheckNameAvailabilityRequestBody) (*http.Request, error) { + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.BotService/checkNameAvailability"), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetCheckNameAvailabilitySender sends the GetCheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client BotsClient) GetCheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetCheckNameAvailabilityResponder handles the response to the GetCheckNameAvailability request. The method always +// closes the http.Response Body. +func (client BotsClient) GetCheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResponseBody, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List returns all the resources of a particular type belonging to a subscription. +func (client BotsClient) List(ctx context.Context) (result BotResponseListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.List") + defer func() { + sc := -1 + if result.brl.Response.Response != nil { + sc = result.brl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.brl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "List", resp, "Failure sending request") + return + } + + result.brl, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client BotsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/botServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client BotsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client BotsClient) ListResponder(resp *http.Response) (result BotResponseList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client BotsClient) listNextResults(ctx context.Context, lastResults BotResponseList) (result BotResponseList, err error) { + req, err := lastResults.botResponseListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "botservice.BotsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "botservice.BotsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client BotsClient) ListComplete(ctx context.Context) (result BotResponseListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} + +// ListByResourceGroup returns all the resources of a particular type belonging to a resource group +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +func (client BotsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result BotResponseListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.brl.Response.Response != nil { + sc = result.brl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.brl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.brl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client BotsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client BotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client BotsClient) ListByResourceGroupResponder(resp *http.Response) (result BotResponseList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client BotsClient) listByResourceGroupNextResults(ctx context.Context, lastResults BotResponseList) (result BotResponseList, err error) { + req, err := lastResults.botResponseListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "botservice.BotsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "botservice.BotsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client BotsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result BotResponseListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// Update updates a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// parameters - the parameters to provide for the created bot. +func (client BotsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot) (result Bot, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.BotsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.BotsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BotsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters Bot) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client BotsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BotsClient) UpdateResponder(resp *http.Response) (result Bot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/channels.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/channels.go new file mode 100644 index 000000000000..dfc52ae46d36 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/channels.go @@ -0,0 +1,637 @@ +package botservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// ChannelsClient is the azure Bot Service is a platform for creating smart conversational agents. +type ChannelsClient struct { + BaseClient +} + +// NewChannelsClient creates an instance of the ChannelsClient client. +func NewChannelsClient(subscriptionID string) ChannelsClient { + return NewChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewChannelsClientWithBaseURI creates an instance of the ChannelsClient client. +func NewChannelsClientWithBaseURI(baseURI string, subscriptionID string) ChannelsClient { + return ChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a Channel registration for a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// channelName - the name of the Channel resource. +// parameters - the parameters to provide for the created bot. +func (client ChannelsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel) (result BotChannel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelsClient.Create") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.ChannelsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, channelName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ChannelsClient) CreatePreparer(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "channelName": autorest.Encode("path", channelName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ChannelsClient) CreateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ChannelsClient) CreateResponder(resp *http.Response) (result BotChannel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Channel registration from a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// channelName - the name of the Bot resource. +func (client ChannelsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result autorest.Response, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelsClient.Delete") + defer func() { + sc := -1 + if result.Response != nil { + sc = result.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: channelName, + Constraints: []validation.Constraint{{Target: "channelName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "channelName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "channelName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.ChannelsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, channelName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ChannelsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "channelName": autorest.Encode("path", channelName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ChannelsClient) DeleteSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ChannelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns a BotService Channel registration specified by the parameters. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// channelName - the name of the Bot resource. +func (client ChannelsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (result BotChannel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: channelName, + Constraints: []validation.Constraint{{Target: "channelName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "channelName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "channelName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.ChannelsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, channelName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ChannelsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string, channelName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "channelName": autorest.Encode("path", channelName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ChannelsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ChannelsClient) GetResponder(resp *http.Response) (result BotChannel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup returns all the Channel registrations of a particular BotService resource +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +func (client ChannelsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, resourceName string) (result ChannelResponseListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.crl.Response.Response != nil { + sc = result.crl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.ChannelsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.crl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.crl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ChannelsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ChannelsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ChannelsClient) ListByResourceGroupResponder(resp *http.Response) (result ChannelResponseList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client ChannelsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ChannelResponseList) (result ChannelResponseList, err error) { + req, err := lastResults.channelResponseListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "botservice.ChannelsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "botservice.ChannelsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client ChannelsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, resourceName string) (result ChannelResponseListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, resourceName) + return +} + +// ListWithKeys lists a Channel registration for a Bot Service including secrets +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// channelName - the name of the Channel resource. +func (client ChannelsClient) ListWithKeys(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName) (result BotChannel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelsClient.ListWithKeys") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.ChannelsClient", "ListWithKeys", err.Error()) + } + + req, err := client.ListWithKeysPreparer(ctx, resourceGroupName, resourceName, channelName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "ListWithKeys", nil, "Failure preparing request") + return + } + + resp, err := client.ListWithKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "ListWithKeys", resp, "Failure sending request") + return + } + + result, err = client.ListWithKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "ListWithKeys", resp, "Failure responding to request") + } + + return +} + +// ListWithKeysPreparer prepares the ListWithKeys request. +func (client ChannelsClient) ListWithKeysPreparer(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "channelName": autorest.Encode("path", channelName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/listChannelWithKeys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListWithKeysSender sends the ListWithKeys request. The method will close the +// http.Response Body if it receives an error. +func (client ChannelsClient) ListWithKeysSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListWithKeysResponder handles the response to the ListWithKeys request. The method always +// closes the http.Response Body. +func (client ChannelsClient) ListWithKeysResponder(resp *http.Response) (result BotChannel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates a Channel registration for a Bot Service +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// channelName - the name of the Channel resource. +// parameters - the parameters to provide for the created bot. +func (client ChannelsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel) (result BotChannel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelsClient.Update") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.ChannelsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, channelName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.ChannelsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ChannelsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, channelName ChannelName, parameters BotChannel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "channelName": autorest.Encode("path", channelName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ChannelsClient) UpdateSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ChannelsClient) UpdateResponder(resp *http.Response) (result BotChannel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/client.go new file mode 100644 index 000000000000..86959a63eecc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/client.go @@ -0,0 +1,51 @@ +// Package botservice implements the Azure ARM Botservice service API version 2018-07-12. +// +// Azure Bot Service is a platform for creating smart conversational agents. +package botservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Botservice + DefaultBaseURI = "https://management.azure.com" +) + +// BaseClient is the base client for Botservice. +type BaseClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the BaseClient client. +func New(subscriptionID string) BaseClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the BaseClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { + return BaseClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/enterprisechannels.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/enterprisechannels.go new file mode 100644 index 000000000000..8e02db8c88e0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/enterprisechannels.go @@ -0,0 +1,599 @@ +package botservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// EnterpriseChannelsClient is the azure Bot Service is a platform for creating smart conversational agents. +type EnterpriseChannelsClient struct { + BaseClient +} + +// NewEnterpriseChannelsClient creates an instance of the EnterpriseChannelsClient client. +func NewEnterpriseChannelsClient(subscriptionID string) EnterpriseChannelsClient { + return NewEnterpriseChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEnterpriseChannelsClientWithBaseURI creates an instance of the EnterpriseChannelsClient client. +func NewEnterpriseChannelsClientWithBaseURI(baseURI string, subscriptionID string) EnterpriseChannelsClient { + return EnterpriseChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability check whether an Enterprise Channel name is available. +// Parameters: +// parameters - the parameters to provide for the Enterprise Channel check name availability request. +func (client EnterpriseChannelsClient) CheckNameAvailability(ctx context.Context, parameters EnterpriseChannelCheckNameAvailabilityRequest) (result EnterpriseChannelCheckNameAvailabilityResponse, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelsClient.CheckNameAvailability") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + req, err := client.CheckNameAvailabilityPreparer(ctx, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client EnterpriseChannelsClient) CheckNameAvailabilityPreparer(ctx context.Context, parameters EnterpriseChannelCheckNameAvailabilityRequest) (*http.Request, error) { + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.BotService/checkEnterpriseChannelNameAvailability"), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client EnterpriseChannelsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client EnterpriseChannelsClient) CheckNameAvailabilityResponder(resp *http.Response) (result EnterpriseChannelCheckNameAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Create creates an Enterprise Channel. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// parameters - the parameters to provide for the new Enterprise Channel. +func (client EnterpriseChannelsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, parameters EnterpriseChannel) (result EnterpriseChannelsCreateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelsClient.Create") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.Nodes", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewError("botservice.EnterpriseChannelsClient", "Create", err.Error()) + } + + req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Create", nil, "Failure preparing request") + return + } + + result, err = client.CreateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Create", result.Response(), "Failure sending request") + return + } + + return +} + +// CreatePreparer prepares the Create request. +func (client EnterpriseChannelsClient) CreatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters EnterpriseChannel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client EnterpriseChannelsClient) CreateSender(req *http.Request) (future EnterpriseChannelsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client EnterpriseChannelsClient) CreateResponder(resp *http.Response) (result EnterpriseChannel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an Enterprise Channel from the resource group +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +func (client EnterpriseChannelsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result EnterpriseChannelsDeleteFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelsClient.Delete") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.EnterpriseChannelsClient", "Delete", err.Error()) + } + + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Delete", nil, "Failure preparing request") + return + } + + result, err = client.DeleteSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Delete", result.Response(), "Failure sending request") + return + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client EnterpriseChannelsClient) DeletePreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client EnterpriseChannelsClient) DeleteSender(req *http.Request) (future EnterpriseChannelsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client EnterpriseChannelsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns an Enterprise Channel specified by the parameters. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +func (client EnterpriseChannelsClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result EnterpriseChannel, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelsClient.Get") + defer func() { + sc := -1 + if result.Response.Response != nil { + sc = result.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.EnterpriseChannelsClient", "Get", err.Error()) + } + + req, err := client.GetPreparer(ctx, resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client EnterpriseChannelsClient) GetPreparer(ctx context.Context, resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EnterpriseChannelsClient) GetSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EnterpriseChannelsClient) GetResponder(resp *http.Response) (result EnterpriseChannel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup returns all the resources of a particular type belonging to a resource group. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +func (client EnterpriseChannelsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result EnterpriseChannelResponseListPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.ecrl.Response.Response != nil { + sc = result.ecrl.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.EnterpriseChannelsClient", "ListByResourceGroup", err.Error()) + } + + result.fn = client.listByResourceGroupNextResults + req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.ecrl.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result.ecrl, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client EnterpriseChannelsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client EnterpriseChannelsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client EnterpriseChannelsClient) ListByResourceGroupResponder(resp *http.Response) (result EnterpriseChannelResponseList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listByResourceGroupNextResults retrieves the next set of results, if any. +func (client EnterpriseChannelsClient) listByResourceGroupNextResults(ctx context.Context, lastResults EnterpriseChannelResponseList) (result EnterpriseChannelResponseList, err error) { + req, err := lastResults.enterpriseChannelResponseListPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") + } + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. +func (client EnterpriseChannelsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result EnterpriseChannelResponseListIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelsClient.ListByResourceGroup") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.ListByResourceGroup(ctx, resourceGroupName) + return +} + +// Update updates an Enterprise Channel. +// Parameters: +// resourceGroupName - the name of the Bot resource group in the user subscription. +// resourceName - the name of the Bot resource. +// parameters - the parameters to provide to update the Enterprise Channel. +func (client EnterpriseChannelsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters EnterpriseChannel) (result EnterpriseChannelsUpdateFuture, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelsClient.Update") + defer func() { + sc := -1 + if result.Response() != nil { + sc = result.Response().StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, + {TargetValue: resourceName, + Constraints: []validation.Constraint{{Target: "resourceName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "resourceName", Name: validation.MinLength, Rule: 2, Chain: nil}, + {Target: "resourceName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewError("botservice.EnterpriseChannelsClient", "Update", err.Error()) + } + + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Update", nil, "Failure preparing request") + return + } + + result, err = client.UpdateSender(req) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsClient", "Update", result.Response(), "Failure sending request") + return + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client EnterpriseChannelsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceName string, parameters EnterpriseChannel) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsContentType("application/json; charset=utf-8"), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/enterpriseChannels/{resourceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client EnterpriseChannelsClient) UpdateSender(req *http.Request) (future EnterpriseChannelsUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + var resp *http.Response + resp, err = autorest.SendWithSender(client, req, sd...) + if err != nil { + return + } + future.Future, err = azure.NewFutureFromResponse(resp) + return +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client EnterpriseChannelsClient) UpdateResponder(resp *http.Response) (result EnterpriseChannel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/models.go new file mode 100644 index 000000000000..ebe546d742de --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/models.go @@ -0,0 +1,2703 @@ +package botservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "encoding/json" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/to" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// The package's fully qualified name. +const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice" + +// ChannelName enumerates the values for channel name. +type ChannelName string + +const ( + // ChannelNameDirectLineChannel ... + ChannelNameDirectLineChannel ChannelName = "DirectLineChannel" + // ChannelNameEmailChannel ... + ChannelNameEmailChannel ChannelName = "EmailChannel" + // ChannelNameFacebookChannel ... + ChannelNameFacebookChannel ChannelName = "FacebookChannel" + // ChannelNameKikChannel ... + ChannelNameKikChannel ChannelName = "KikChannel" + // ChannelNameMsTeamsChannel ... + ChannelNameMsTeamsChannel ChannelName = "MsTeamsChannel" + // ChannelNameSkypeChannel ... + ChannelNameSkypeChannel ChannelName = "SkypeChannel" + // ChannelNameSlackChannel ... + ChannelNameSlackChannel ChannelName = "SlackChannel" + // ChannelNameSmsChannel ... + ChannelNameSmsChannel ChannelName = "SmsChannel" + // ChannelNameTelegramChannel ... + ChannelNameTelegramChannel ChannelName = "TelegramChannel" + // ChannelNameWebChatChannel ... + ChannelNameWebChatChannel ChannelName = "WebChatChannel" +) + +// PossibleChannelNameValues returns an array of possible values for the ChannelName const type. +func PossibleChannelNameValues() []ChannelName { + return []ChannelName{ChannelNameDirectLineChannel, ChannelNameEmailChannel, ChannelNameFacebookChannel, ChannelNameKikChannel, ChannelNameMsTeamsChannel, ChannelNameSkypeChannel, ChannelNameSlackChannel, ChannelNameSmsChannel, ChannelNameTelegramChannel, ChannelNameWebChatChannel} +} + +// ChannelNameBasicChannel enumerates the values for channel name basic channel. +type ChannelNameBasicChannel string + +const ( + // ChannelNameChannel ... + ChannelNameChannel ChannelNameBasicChannel = "Channel" + // ChannelNameDirectLineChannel1 ... + ChannelNameDirectLineChannel1 ChannelNameBasicChannel = "DirectLineChannel" + // ChannelNameEmailChannel1 ... + ChannelNameEmailChannel1 ChannelNameBasicChannel = "EmailChannel" + // ChannelNameFacebookChannel1 ... + ChannelNameFacebookChannel1 ChannelNameBasicChannel = "FacebookChannel" + // ChannelNameKikChannel1 ... + ChannelNameKikChannel1 ChannelNameBasicChannel = "KikChannel" + // ChannelNameMsTeamsChannel1 ... + ChannelNameMsTeamsChannel1 ChannelNameBasicChannel = "MsTeamsChannel" + // ChannelNameSkypeChannel1 ... + ChannelNameSkypeChannel1 ChannelNameBasicChannel = "SkypeChannel" + // ChannelNameSlackChannel1 ... + ChannelNameSlackChannel1 ChannelNameBasicChannel = "SlackChannel" + // ChannelNameSmsChannel1 ... + ChannelNameSmsChannel1 ChannelNameBasicChannel = "SmsChannel" + // ChannelNameTelegramChannel1 ... + ChannelNameTelegramChannel1 ChannelNameBasicChannel = "TelegramChannel" + // ChannelNameWebChatChannel1 ... + ChannelNameWebChatChannel1 ChannelNameBasicChannel = "WebChatChannel" +) + +// PossibleChannelNameBasicChannelValues returns an array of possible values for the ChannelNameBasicChannel const type. +func PossibleChannelNameBasicChannelValues() []ChannelNameBasicChannel { + return []ChannelNameBasicChannel{ChannelNameChannel, ChannelNameDirectLineChannel1, ChannelNameEmailChannel1, ChannelNameFacebookChannel1, ChannelNameKikChannel1, ChannelNameMsTeamsChannel1, ChannelNameSkypeChannel1, ChannelNameSlackChannel1, ChannelNameSmsChannel1, ChannelNameTelegramChannel1, ChannelNameWebChatChannel1} +} + +// EnterpriseChannelNodeState enumerates the values for enterprise channel node state. +type EnterpriseChannelNodeState string + +const ( + // CreateFailed ... + CreateFailed EnterpriseChannelNodeState = "CreateFailed" + // Creating ... + Creating EnterpriseChannelNodeState = "Creating" + // DeleteFailed ... + DeleteFailed EnterpriseChannelNodeState = "DeleteFailed" + // Deleting ... + Deleting EnterpriseChannelNodeState = "Deleting" + // Started ... + Started EnterpriseChannelNodeState = "Started" + // StartFailed ... + StartFailed EnterpriseChannelNodeState = "StartFailed" + // Starting ... + Starting EnterpriseChannelNodeState = "Starting" + // StopFailed ... + StopFailed EnterpriseChannelNodeState = "StopFailed" + // Stopped ... + Stopped EnterpriseChannelNodeState = "Stopped" + // Stopping ... + Stopping EnterpriseChannelNodeState = "Stopping" +) + +// PossibleEnterpriseChannelNodeStateValues returns an array of possible values for the EnterpriseChannelNodeState const type. +func PossibleEnterpriseChannelNodeStateValues() []EnterpriseChannelNodeState { + return []EnterpriseChannelNodeState{CreateFailed, Creating, DeleteFailed, Deleting, Started, StartFailed, Starting, StopFailed, Stopped, Stopping} +} + +// EnterpriseChannelState enumerates the values for enterprise channel state. +type EnterpriseChannelState string + +const ( + // EnterpriseChannelStateCreateFailed ... + EnterpriseChannelStateCreateFailed EnterpriseChannelState = "CreateFailed" + // EnterpriseChannelStateCreating ... + EnterpriseChannelStateCreating EnterpriseChannelState = "Creating" + // EnterpriseChannelStateDeleteFailed ... + EnterpriseChannelStateDeleteFailed EnterpriseChannelState = "DeleteFailed" + // EnterpriseChannelStateDeleting ... + EnterpriseChannelStateDeleting EnterpriseChannelState = "Deleting" + // EnterpriseChannelStateStarted ... + EnterpriseChannelStateStarted EnterpriseChannelState = "Started" + // EnterpriseChannelStateStartFailed ... + EnterpriseChannelStateStartFailed EnterpriseChannelState = "StartFailed" + // EnterpriseChannelStateStarting ... + EnterpriseChannelStateStarting EnterpriseChannelState = "Starting" + // EnterpriseChannelStateStopFailed ... + EnterpriseChannelStateStopFailed EnterpriseChannelState = "StopFailed" + // EnterpriseChannelStateStopped ... + EnterpriseChannelStateStopped EnterpriseChannelState = "Stopped" + // EnterpriseChannelStateStopping ... + EnterpriseChannelStateStopping EnterpriseChannelState = "Stopping" +) + +// PossibleEnterpriseChannelStateValues returns an array of possible values for the EnterpriseChannelState const type. +func PossibleEnterpriseChannelStateValues() []EnterpriseChannelState { + return []EnterpriseChannelState{EnterpriseChannelStateCreateFailed, EnterpriseChannelStateCreating, EnterpriseChannelStateDeleteFailed, EnterpriseChannelStateDeleting, EnterpriseChannelStateStarted, EnterpriseChannelStateStartFailed, EnterpriseChannelStateStarting, EnterpriseChannelStateStopFailed, EnterpriseChannelStateStopped, EnterpriseChannelStateStopping} +} + +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindBot ... + KindBot Kind = "bot" + // KindDesigner ... + KindDesigner Kind = "designer" + // KindFunction ... + KindFunction Kind = "function" + // KindSdk ... + KindSdk Kind = "sdk" +) + +// PossibleKindValues returns an array of possible values for the Kind const type. +func PossibleKindValues() []Kind { + return []Kind{KindBot, KindDesigner, KindFunction, KindSdk} +} + +// SkuName enumerates the values for sku name. +type SkuName string + +const ( + // F0 ... + F0 SkuName = "F0" + // S1 ... + S1 SkuName = "S1" +) + +// PossibleSkuNameValues returns an array of possible values for the SkuName const type. +func PossibleSkuNameValues() []SkuName { + return []SkuName{F0, S1} +} + +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // Free ... + Free SkuTier = "Free" + // Standard ... + Standard SkuTier = "Standard" +) + +// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. +func PossibleSkuTierValues() []SkuTier { + return []SkuTier{Free, Standard} +} + +// Bot bot resource definition +type Bot struct { + autorest.Response `json:"-"` + // Properties - The set of properties specific to bot resource + Properties *BotProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Specifies the resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Specifies the name of the resource. + Name *string `json:"name,omitempty"` + // Location - Specifies the location of the resource. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Specifies the type of the resource. + Type *string `json:"type,omitempty"` + // Tags - Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags"` + // Sku - Gets or sets the SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction' + Kind Kind `json:"kind,omitempty"` + // Etag - Entity Tag + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for Bot. +func (b Bot) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if b.Properties != nil { + objectMap["properties"] = b.Properties + } + if b.Location != nil { + objectMap["location"] = b.Location + } + if b.Tags != nil { + objectMap["tags"] = b.Tags + } + if b.Sku != nil { + objectMap["sku"] = b.Sku + } + if b.Kind != "" { + objectMap["kind"] = b.Kind + } + if b.Etag != nil { + objectMap["etag"] = b.Etag + } + return json.Marshal(objectMap) +} + +// BotChannel bot channel resource definition +type BotChannel struct { + autorest.Response `json:"-"` + // Properties - The set of properties specific to bot channel resource + Properties BasicChannel `json:"properties,omitempty"` + // ID - READ-ONLY; Specifies the resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Specifies the name of the resource. + Name *string `json:"name,omitempty"` + // Location - Specifies the location of the resource. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Specifies the type of the resource. + Type *string `json:"type,omitempty"` + // Tags - Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags"` + // Sku - Gets or sets the SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction' + Kind Kind `json:"kind,omitempty"` + // Etag - Entity Tag + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for BotChannel. +func (bc BotChannel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + objectMap["properties"] = bc.Properties + if bc.Location != nil { + objectMap["location"] = bc.Location + } + if bc.Tags != nil { + objectMap["tags"] = bc.Tags + } + if bc.Sku != nil { + objectMap["sku"] = bc.Sku + } + if bc.Kind != "" { + objectMap["kind"] = bc.Kind + } + if bc.Etag != nil { + objectMap["etag"] = bc.Etag + } + return json.Marshal(objectMap) +} + +// UnmarshalJSON is the custom unmarshaler for BotChannel struct. +func (bc *BotChannel) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + for k, v := range m { + switch k { + case "properties": + if v != nil { + properties, err := unmarshalBasicChannel(*v) + if err != nil { + return err + } + bc.Properties = properties + } + case "id": + if v != nil { + var ID string + err = json.Unmarshal(*v, &ID) + if err != nil { + return err + } + bc.ID = &ID + } + case "name": + if v != nil { + var name string + err = json.Unmarshal(*v, &name) + if err != nil { + return err + } + bc.Name = &name + } + case "location": + if v != nil { + var location string + err = json.Unmarshal(*v, &location) + if err != nil { + return err + } + bc.Location = &location + } + case "type": + if v != nil { + var typeVar string + err = json.Unmarshal(*v, &typeVar) + if err != nil { + return err + } + bc.Type = &typeVar + } + case "tags": + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*v, &tags) + if err != nil { + return err + } + bc.Tags = tags + } + case "sku": + if v != nil { + var sku Sku + err = json.Unmarshal(*v, &sku) + if err != nil { + return err + } + bc.Sku = &sku + } + case "kind": + if v != nil { + var kind Kind + err = json.Unmarshal(*v, &kind) + if err != nil { + return err + } + bc.Kind = kind + } + case "etag": + if v != nil { + var etag string + err = json.Unmarshal(*v, &etag) + if err != nil { + return err + } + bc.Etag = &etag + } + } + } + + return nil +} + +// BotProperties the parameters to provide for the Bot. +type BotProperties struct { + // DisplayName - The Name of the bot + DisplayName *string `json:"displayName,omitempty"` + // Description - The description of the bot + Description *string `json:"description,omitempty"` + // IconURL - The Icon Url of the bot + IconURL *string `json:"iconUrl,omitempty"` + // Endpoint - The bot's endpoint + Endpoint *string `json:"endpoint,omitempty"` + // EndpointVersion - READ-ONLY; The bot's endpoint version + EndpointVersion *string `json:"endpointVersion,omitempty"` + // MsaAppID - Microsoft App Id for the bot + MsaAppID *string `json:"msaAppId,omitempty"` + // ConfiguredChannels - READ-ONLY; Collection of channels for which the bot is configured + ConfiguredChannels *[]string `json:"configuredChannels,omitempty"` + // EnabledChannels - READ-ONLY; Collection of channels for which the bot is enabled + EnabledChannels *[]string `json:"enabledChannels,omitempty"` + // DeveloperAppInsightKey - The Application Insights key + DeveloperAppInsightKey *string `json:"developerAppInsightKey,omitempty"` + // DeveloperAppInsightsAPIKey - The Application Insights Api Key + DeveloperAppInsightsAPIKey *string `json:"developerAppInsightsApiKey,omitempty"` + // DeveloperAppInsightsApplicationID - The Application Insights App Id + DeveloperAppInsightsApplicationID *string `json:"developerAppInsightsApplicationId,omitempty"` + // LuisAppIds - Collection of LUIS App Ids + LuisAppIds *[]string `json:"luisAppIds,omitempty"` + // LuisKey - The LUIS Key + LuisKey *string `json:"luisKey,omitempty"` +} + +// BotResponseList the list of bot service operation response. +type BotResponseList struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of bot service resources. + NextLink *string `json:"nextLink,omitempty"` + // Value - READ-ONLY; Gets the list of bot service results and their properties. + Value *[]Bot `json:"value,omitempty"` +} + +// BotResponseListIterator provides access to a complete listing of Bot values. +type BotResponseListIterator struct { + i int + page BotResponseListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *BotResponseListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotResponseListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *BotResponseListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter BotResponseListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter BotResponseListIterator) Response() BotResponseList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter BotResponseListIterator) Value() Bot { + if !iter.page.NotDone() { + return Bot{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the BotResponseListIterator type. +func NewBotResponseListIterator(page BotResponseListPage) BotResponseListIterator { + return BotResponseListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (brl BotResponseList) IsEmpty() bool { + return brl.Value == nil || len(*brl.Value) == 0 +} + +// botResponseListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (brl BotResponseList) botResponseListPreparer(ctx context.Context) (*http.Request, error) { + if brl.NextLink == nil || len(to.String(brl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(brl.NextLink))) +} + +// BotResponseListPage contains a page of Bot values. +type BotResponseListPage struct { + fn func(context.Context, BotResponseList) (BotResponseList, error) + brl BotResponseList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *BotResponseListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/BotResponseListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.brl) + if err != nil { + return err + } + page.brl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *BotResponseListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page BotResponseListPage) NotDone() bool { + return !page.brl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page BotResponseListPage) Response() BotResponseList { + return page.brl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page BotResponseListPage) Values() []Bot { + if page.brl.IsEmpty() { + return nil + } + return *page.brl.Value +} + +// Creates a new instance of the BotResponseListPage type. +func NewBotResponseListPage(getNextPage func(context.Context, BotResponseList) (BotResponseList, error)) BotResponseListPage { + return BotResponseListPage{fn: getNextPage} +} + +// BasicChannel channel definition +type BasicChannel interface { + AsFacebookChannel() (*FacebookChannel, bool) + AsEmailChannel() (*EmailChannel, bool) + AsMsTeamsChannel() (*MsTeamsChannel, bool) + AsSkypeChannel() (*SkypeChannel, bool) + AsKikChannel() (*KikChannel, bool) + AsWebChatChannel() (*WebChatChannel, bool) + AsDirectLineChannel() (*DirectLineChannel, bool) + AsTelegramChannel() (*TelegramChannel, bool) + AsSmsChannel() (*SmsChannel, bool) + AsSlackChannel() (*SlackChannel, bool) + AsChannel() (*Channel, bool) +} + +// Channel channel definition +type Channel struct { + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +func unmarshalBasicChannel(body []byte) (BasicChannel, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["channelName"] { + case string(ChannelNameFacebookChannel1): + var fc FacebookChannel + err := json.Unmarshal(body, &fc) + return fc, err + case string(ChannelNameEmailChannel1): + var ec EmailChannel + err := json.Unmarshal(body, &ec) + return ec, err + case string(ChannelNameMsTeamsChannel1): + var mtc MsTeamsChannel + err := json.Unmarshal(body, &mtc) + return mtc, err + case string(ChannelNameSkypeChannel1): + var sc SkypeChannel + err := json.Unmarshal(body, &sc) + return sc, err + case string(ChannelNameKikChannel1): + var kc KikChannel + err := json.Unmarshal(body, &kc) + return kc, err + case string(ChannelNameWebChatChannel1): + var wcc WebChatChannel + err := json.Unmarshal(body, &wcc) + return wcc, err + case string(ChannelNameDirectLineChannel1): + var dlc DirectLineChannel + err := json.Unmarshal(body, &dlc) + return dlc, err + case string(ChannelNameTelegramChannel1): + var tc TelegramChannel + err := json.Unmarshal(body, &tc) + return tc, err + case string(ChannelNameSmsChannel1): + var sc SmsChannel + err := json.Unmarshal(body, &sc) + return sc, err + case string(ChannelNameSlackChannel1): + var sc SlackChannel + err := json.Unmarshal(body, &sc) + return sc, err + default: + var c Channel + err := json.Unmarshal(body, &c) + return c, err + } +} +func unmarshalBasicChannelArray(body []byte) ([]BasicChannel, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + cArray := make([]BasicChannel, len(rawMessages)) + + for index, rawMessage := range rawMessages { + c, err := unmarshalBasicChannel(*rawMessage) + if err != nil { + return nil, err + } + cArray[index] = c + } + return cArray, nil +} + +// MarshalJSON is the custom marshaler for Channel. +func (c Channel) MarshalJSON() ([]byte, error) { + c.ChannelName = ChannelNameChannel + objectMap := make(map[string]interface{}) + if c.ChannelName != "" { + objectMap["channelName"] = c.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for Channel. +func (c Channel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for Channel. +func (c Channel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for Channel. +func (c Channel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for Channel. +func (c Channel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for Channel. +func (c Channel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for Channel. +func (c Channel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for Channel. +func (c Channel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for Channel. +func (c Channel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for Channel. +func (c Channel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for Channel. +func (c Channel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for Channel. +func (c Channel) AsChannel() (*Channel, bool) { + return &c, true +} + +// AsBasicChannel is the BasicChannel implementation for Channel. +func (c Channel) AsBasicChannel() (BasicChannel, bool) { + return &c, true +} + +// ChannelResponseList the list of bot service channel operation response. +type ChannelResponseList struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of bot service channel resources. + NextLink *string `json:"nextLink,omitempty"` + // Value - READ-ONLY; Gets the list of bot service channel results and their properties. + Value *[]BotChannel `json:"value,omitempty"` +} + +// ChannelResponseListIterator provides access to a complete listing of BotChannel values. +type ChannelResponseListIterator struct { + i int + page ChannelResponseListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ChannelResponseListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelResponseListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ChannelResponseListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ChannelResponseListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ChannelResponseListIterator) Response() ChannelResponseList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ChannelResponseListIterator) Value() BotChannel { + if !iter.page.NotDone() { + return BotChannel{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ChannelResponseListIterator type. +func NewChannelResponseListIterator(page ChannelResponseListPage) ChannelResponseListIterator { + return ChannelResponseListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (crl ChannelResponseList) IsEmpty() bool { + return crl.Value == nil || len(*crl.Value) == 0 +} + +// channelResponseListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (crl ChannelResponseList) channelResponseListPreparer(ctx context.Context) (*http.Request, error) { + if crl.NextLink == nil || len(to.String(crl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(crl.NextLink))) +} + +// ChannelResponseListPage contains a page of BotChannel values. +type ChannelResponseListPage struct { + fn func(context.Context, ChannelResponseList) (ChannelResponseList, error) + crl ChannelResponseList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ChannelResponseListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ChannelResponseListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.crl) + if err != nil { + return err + } + page.crl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ChannelResponseListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ChannelResponseListPage) NotDone() bool { + return !page.crl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ChannelResponseListPage) Response() ChannelResponseList { + return page.crl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ChannelResponseListPage) Values() []BotChannel { + if page.crl.IsEmpty() { + return nil + } + return *page.crl.Value +} + +// Creates a new instance of the ChannelResponseListPage type. +func NewChannelResponseListPage(getNextPage func(context.Context, ChannelResponseList) (ChannelResponseList, error)) ChannelResponseListPage { + return ChannelResponseListPage{fn: getNextPage} +} + +// CheckNameAvailabilityRequestBody the request body for a request to Bot Service Management to check +// availability of a bot name. +type CheckNameAvailabilityRequestBody struct { + // Name - the name of the bot for which availability needs to be checked. + Name *string `json:"name,omitempty"` + // Type - the type of the bot for which availability needs to be checked + Type *string `json:"type,omitempty"` +} + +// CheckNameAvailabilityResponseBody the response body returned for a request to Bot Service Management to +// check availability of a bot name. +type CheckNameAvailabilityResponseBody struct { + autorest.Response `json:"-"` + // Valid - indicates if the bot name is valid. + Valid *bool `json:"valid,omitempty"` + // Message - additional message from the bot management api showing why a bot name is not available + Message *string `json:"message,omitempty"` +} + +// ConnectionItemName the display name of a connection Item Setting registered with the Bot +type ConnectionItemName struct { + // Name - READ-ONLY; Connection Item name that has been added in the API + Name *string `json:"name,omitempty"` +} + +// ConnectionSetting bot channel resource definition +type ConnectionSetting struct { + autorest.Response `json:"-"` + // Properties - The set of properties specific to bot channel resource + Properties *ConnectionSettingProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Specifies the resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Specifies the name of the resource. + Name *string `json:"name,omitempty"` + // Location - Specifies the location of the resource. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Specifies the type of the resource. + Type *string `json:"type,omitempty"` + // Tags - Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags"` + // Sku - Gets or sets the SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction' + Kind Kind `json:"kind,omitempty"` + // Etag - Entity Tag + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConnectionSetting. +func (cs ConnectionSetting) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if cs.Properties != nil { + objectMap["properties"] = cs.Properties + } + if cs.Location != nil { + objectMap["location"] = cs.Location + } + if cs.Tags != nil { + objectMap["tags"] = cs.Tags + } + if cs.Sku != nil { + objectMap["sku"] = cs.Sku + } + if cs.Kind != "" { + objectMap["kind"] = cs.Kind + } + if cs.Etag != nil { + objectMap["etag"] = cs.Etag + } + return json.Marshal(objectMap) +} + +// ConnectionSettingParameter extra Parameter in a Connection Setting Properties to indicate service +// provider specific properties +type ConnectionSettingParameter struct { + // Key - Key for the Connection Setting Parameter. + Key *string `json:"key,omitempty"` + // Value - Value associated with the Connection Setting Parameter. + Value *string `json:"value,omitempty"` +} + +// ConnectionSettingProperties properties for a Connection Setting Item +type ConnectionSettingProperties struct { + // ClientID - Client Id associated with the Connection Setting. + ClientID *string `json:"clientId,omitempty"` + // SettingID - READ-ONLY; Setting Id set by the service for the Connection Setting. + SettingID *string `json:"settingId,omitempty"` + // ClientSecret - Client Secret associated with the Connection Setting + ClientSecret *string `json:"clientSecret,omitempty"` + // Scopes - Scopes associated with the Connection Setting + Scopes *string `json:"scopes,omitempty"` + // ServiceProviderID - Service Provider Id associated with the Connection Setting + ServiceProviderID *string `json:"serviceProviderId,omitempty"` + // ServiceProviderDisplayName - Service Provider Display Name associated with the Connection Setting + ServiceProviderDisplayName *string `json:"serviceProviderDisplayName,omitempty"` + // Parameters - Service Provider Parameters associated with the Connection Setting + Parameters *[]ConnectionSettingParameter `json:"parameters,omitempty"` +} + +// ConnectionSettingResponseList the list of bot service connection settings response. +type ConnectionSettingResponseList struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of bot service connection setting resources. + NextLink *string `json:"nextLink,omitempty"` + // Value - READ-ONLY; Gets the list of bot service connection settings and their properties. + Value *[]ConnectionSetting `json:"value,omitempty"` +} + +// ConnectionSettingResponseListIterator provides access to a complete listing of ConnectionSetting values. +type ConnectionSettingResponseListIterator struct { + i int + page ConnectionSettingResponseListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *ConnectionSettingResponseListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionSettingResponseListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *ConnectionSettingResponseListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter ConnectionSettingResponseListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter ConnectionSettingResponseListIterator) Response() ConnectionSettingResponseList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter ConnectionSettingResponseListIterator) Value() ConnectionSetting { + if !iter.page.NotDone() { + return ConnectionSetting{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the ConnectionSettingResponseListIterator type. +func NewConnectionSettingResponseListIterator(page ConnectionSettingResponseListPage) ConnectionSettingResponseListIterator { + return ConnectionSettingResponseListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (csrl ConnectionSettingResponseList) IsEmpty() bool { + return csrl.Value == nil || len(*csrl.Value) == 0 +} + +// connectionSettingResponseListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (csrl ConnectionSettingResponseList) connectionSettingResponseListPreparer(ctx context.Context) (*http.Request, error) { + if csrl.NextLink == nil || len(to.String(csrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(csrl.NextLink))) +} + +// ConnectionSettingResponseListPage contains a page of ConnectionSetting values. +type ConnectionSettingResponseListPage struct { + fn func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error) + csrl ConnectionSettingResponseList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *ConnectionSettingResponseListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionSettingResponseListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.csrl) + if err != nil { + return err + } + page.csrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *ConnectionSettingResponseListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page ConnectionSettingResponseListPage) NotDone() bool { + return !page.csrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page ConnectionSettingResponseListPage) Response() ConnectionSettingResponseList { + return page.csrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page ConnectionSettingResponseListPage) Values() []ConnectionSetting { + if page.csrl.IsEmpty() { + return nil + } + return *page.csrl.Value +} + +// Creates a new instance of the ConnectionSettingResponseListPage type. +func NewConnectionSettingResponseListPage(getNextPage func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error)) ConnectionSettingResponseListPage { + return ConnectionSettingResponseListPage{fn: getNextPage} +} + +// DirectLineChannel direct Line channel definition +type DirectLineChannel struct { + // Properties - The set of properties specific to Direct Line channel resource + Properties *DirectLineChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for DirectLineChannel. +func (dlc DirectLineChannel) MarshalJSON() ([]byte, error) { + dlc.ChannelName = ChannelNameDirectLineChannel1 + objectMap := make(map[string]interface{}) + if dlc.Properties != nil { + objectMap["properties"] = dlc.Properties + } + if dlc.ChannelName != "" { + objectMap["channelName"] = dlc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return &dlc, true +} + +// AsTelegramChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for DirectLineChannel. +func (dlc DirectLineChannel) AsBasicChannel() (BasicChannel, bool) { + return &dlc, true +} + +// DirectLineChannelProperties the parameters to provide for the Direct Line channel. +type DirectLineChannelProperties struct { + // Sites - The list of Direct Line sites + Sites *[]DirectLineSite `json:"sites,omitempty"` +} + +// DirectLineSite a site for the Direct Line channel +type DirectLineSite struct { + // SiteID - READ-ONLY; Site Id + SiteID *string `json:"siteId,omitempty"` + // SiteName - Site name + SiteName *string `json:"siteName,omitempty"` + // Key - READ-ONLY; Primary key. Value only returned through POST to the action Channel List API, otherwise empty. + Key *string `json:"key,omitempty"` + // Key2 - READ-ONLY; Secondary key. Value only returned through POST to the action Channel List API, otherwise empty. + Key2 *string `json:"key2,omitempty"` + // IsEnabled - Whether this site is enabled for DirectLine channel. + IsEnabled *bool `json:"isEnabled,omitempty"` + // IsV1Enabled - Whether this site is enabled for Bot Framework V1 protocol. + IsV1Enabled *bool `json:"isV1Enabled,omitempty"` + // IsV3Enabled - Whether this site is enabled for Bot Framework V1 protocol. + IsV3Enabled *bool `json:"isV3Enabled,omitempty"` + // IsSecureSiteEnabled - Whether this site is enabled for authentication with Bot Framework. + IsSecureSiteEnabled *bool `json:"isSecureSiteEnabled,omitempty"` + // TrustedOrigins - List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True. + TrustedOrigins *[]string `json:"trustedOrigins,omitempty"` +} + +// EmailChannel email channel definition +type EmailChannel struct { + // Properties - The set of properties specific to email channel resource + Properties *EmailChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for EmailChannel. +func (ec EmailChannel) MarshalJSON() ([]byte, error) { + ec.ChannelName = ChannelNameEmailChannel1 + objectMap := make(map[string]interface{}) + if ec.Properties != nil { + objectMap["properties"] = ec.Properties + } + if ec.ChannelName != "" { + objectMap["channelName"] = ec.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsEmailChannel() (*EmailChannel, bool) { + return &ec, true +} + +// AsMsTeamsChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for EmailChannel. +func (ec EmailChannel) AsBasicChannel() (BasicChannel, bool) { + return &ec, true +} + +// EmailChannelProperties the parameters to provide for the Email channel. +type EmailChannelProperties struct { + // EmailAddress - The email address + EmailAddress *string `json:"emailAddress,omitempty"` + // Password - The password for the email address. Value only returned through POST to the action Channel List API, otherwise empty. + Password *string `json:"password,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// EnterpriseChannel enterprise Channel resource definition +type EnterpriseChannel struct { + autorest.Response `json:"-"` + // Properties - The set of properties specific to an Enterprise Channel resource. + Properties *EnterpriseChannelProperties `json:"properties,omitempty"` + // ID - READ-ONLY; Specifies the resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Specifies the name of the resource. + Name *string `json:"name,omitempty"` + // Location - Specifies the location of the resource. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Specifies the type of the resource. + Type *string `json:"type,omitempty"` + // Tags - Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags"` + // Sku - Gets or sets the SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction' + Kind Kind `json:"kind,omitempty"` + // Etag - Entity Tag + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for EnterpriseChannel. +func (ec EnterpriseChannel) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ec.Properties != nil { + objectMap["properties"] = ec.Properties + } + if ec.Location != nil { + objectMap["location"] = ec.Location + } + if ec.Tags != nil { + objectMap["tags"] = ec.Tags + } + if ec.Sku != nil { + objectMap["sku"] = ec.Sku + } + if ec.Kind != "" { + objectMap["kind"] = ec.Kind + } + if ec.Etag != nil { + objectMap["etag"] = ec.Etag + } + return json.Marshal(objectMap) +} + +// EnterpriseChannelCheckNameAvailabilityRequest a request to Bot Service Management to check availability +// of an Enterprise Channel name. +type EnterpriseChannelCheckNameAvailabilityRequest struct { + // Name - The name of the Enterprise Channel for which availability needs to be checked. + Name *string `json:"name,omitempty"` +} + +// EnterpriseChannelCheckNameAvailabilityResponse a request to Bot Service Management to check availability +// of an Enterprise Channel name. +type EnterpriseChannelCheckNameAvailabilityResponse struct { + autorest.Response `json:"-"` + // Valid - Indicates if the Enterprise Channel name is valid. + Valid *bool `json:"valid,omitempty"` + // Message - Additional information about why a bot name is not available. + Message *string `json:"message,omitempty"` +} + +// EnterpriseChannelNode the properties specific to an Enterprise Channel Node. +type EnterpriseChannelNode struct { + // ID - READ-ONLY; Id of Enterprise Channel Node. This is generated by the Bot Framework. + ID *string `json:"id,omitempty"` + // State - The current state of the Enterprise Channel Node. Possible values include: 'Creating', 'CreateFailed', 'Started', 'Starting', 'StartFailed', 'Stopped', 'Stopping', 'StopFailed', 'Deleting', 'DeleteFailed' + State EnterpriseChannelNodeState `json:"state,omitempty"` + // Name - The name of the Enterprise Channel Node. + Name *string `json:"name,omitempty"` + // AzureSku - The sku of the Enterprise Channel Node. + AzureSku *string `json:"azureSku,omitempty"` + // AzureLocation - The location of the Enterprise Channel Node. + AzureLocation *string `json:"azureLocation,omitempty"` +} + +// EnterpriseChannelProperties the parameters to provide for the Enterprise Channel. +type EnterpriseChannelProperties struct { + // State - The current state of the Enterprise Channel. Possible values include: 'EnterpriseChannelStateCreating', 'EnterpriseChannelStateCreateFailed', 'EnterpriseChannelStateStarted', 'EnterpriseChannelStateStarting', 'EnterpriseChannelStateStartFailed', 'EnterpriseChannelStateStopped', 'EnterpriseChannelStateStopping', 'EnterpriseChannelStateStopFailed', 'EnterpriseChannelStateDeleting', 'EnterpriseChannelStateDeleteFailed' + State EnterpriseChannelState `json:"state,omitempty"` + // Nodes - The nodes associated with the Enterprise Channel. + Nodes *[]EnterpriseChannelNode `json:"nodes,omitempty"` +} + +// EnterpriseChannelResponseList the list of bot service operation response. +type EnterpriseChannelResponseList struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of bot service resources. + NextLink *string `json:"nextLink,omitempty"` + // Value - READ-ONLY; The list of Enterprise Channels and their properties. + Value *[]EnterpriseChannel `json:"value,omitempty"` +} + +// EnterpriseChannelResponseListIterator provides access to a complete listing of EnterpriseChannel values. +type EnterpriseChannelResponseListIterator struct { + i int + page EnterpriseChannelResponseListPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *EnterpriseChannelResponseListIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelResponseListIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *EnterpriseChannelResponseListIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter EnterpriseChannelResponseListIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter EnterpriseChannelResponseListIterator) Response() EnterpriseChannelResponseList { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter EnterpriseChannelResponseListIterator) Value() EnterpriseChannel { + if !iter.page.NotDone() { + return EnterpriseChannel{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the EnterpriseChannelResponseListIterator type. +func NewEnterpriseChannelResponseListIterator(page EnterpriseChannelResponseListPage) EnterpriseChannelResponseListIterator { + return EnterpriseChannelResponseListIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (ecrl EnterpriseChannelResponseList) IsEmpty() bool { + return ecrl.Value == nil || len(*ecrl.Value) == 0 +} + +// enterpriseChannelResponseListPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (ecrl EnterpriseChannelResponseList) enterpriseChannelResponseListPreparer(ctx context.Context) (*http.Request, error) { + if ecrl.NextLink == nil || len(to.String(ecrl.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(ecrl.NextLink))) +} + +// EnterpriseChannelResponseListPage contains a page of EnterpriseChannel values. +type EnterpriseChannelResponseListPage struct { + fn func(context.Context, EnterpriseChannelResponseList) (EnterpriseChannelResponseList, error) + ecrl EnterpriseChannelResponseList +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *EnterpriseChannelResponseListPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/EnterpriseChannelResponseListPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.ecrl) + if err != nil { + return err + } + page.ecrl = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *EnterpriseChannelResponseListPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page EnterpriseChannelResponseListPage) NotDone() bool { + return !page.ecrl.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page EnterpriseChannelResponseListPage) Response() EnterpriseChannelResponseList { + return page.ecrl +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page EnterpriseChannelResponseListPage) Values() []EnterpriseChannel { + if page.ecrl.IsEmpty() { + return nil + } + return *page.ecrl.Value +} + +// Creates a new instance of the EnterpriseChannelResponseListPage type. +func NewEnterpriseChannelResponseListPage(getNextPage func(context.Context, EnterpriseChannelResponseList) (EnterpriseChannelResponseList, error)) EnterpriseChannelResponseListPage { + return EnterpriseChannelResponseListPage{fn: getNextPage} +} + +// EnterpriseChannelsCreateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type EnterpriseChannelsCreateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *EnterpriseChannelsCreateFuture) Result(client EnterpriseChannelsClient) (ec EnterpriseChannel, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsCreateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("botservice.EnterpriseChannelsCreateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ec.Response.Response, err = future.GetResult(sender); err == nil && ec.Response.Response.StatusCode != http.StatusNoContent { + ec, err = client.CreateResponder(ec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsCreateFuture", "Result", ec.Response.Response, "Failure responding to request") + } + } + return +} + +// EnterpriseChannelsDeleteFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type EnterpriseChannelsDeleteFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *EnterpriseChannelsDeleteFuture) Result(client EnterpriseChannelsClient) (ar autorest.Response, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsDeleteFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("botservice.EnterpriseChannelsDeleteFuture") + return + } + ar.Response = future.Response() + return +} + +// EnterpriseChannelsUpdateFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. +type EnterpriseChannelsUpdateFuture struct { + azure.Future +} + +// Result returns the result of the asynchronous operation. +// If the operation has not completed it will return an error. +func (future *EnterpriseChannelsUpdateFuture) Result(client EnterpriseChannelsClient) (ec EnterpriseChannel, err error) { + var done bool + done, err = future.DoneWithContext(context.Background(), client) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsUpdateFuture", "Result", future.Response(), "Polling failure") + return + } + if !done { + err = azure.NewAsyncOpIncompleteError("botservice.EnterpriseChannelsUpdateFuture") + return + } + sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + if ec.Response.Response, err = future.GetResult(sender); err == nil && ec.Response.Response.StatusCode != http.StatusNoContent { + ec, err = client.UpdateResponder(ec.Response.Response) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.EnterpriseChannelsUpdateFuture", "Result", ec.Response.Response, "Failure responding to request") + } + } + return +} + +// Error bot Service error object. +type Error struct { + // Error - The error body. + Error *ErrorBody `json:"error,omitempty"` +} + +// ErrorBody bot Service error body. +type ErrorBody struct { + // Code - error code + Code *string `json:"code,omitempty"` + // Message - error message + Message *string `json:"message,omitempty"` +} + +// FacebookChannel facebook channel definition +type FacebookChannel struct { + // Properties - The set of properties specific to bot facebook channel + Properties *FacebookChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for FacebookChannel. +func (fc FacebookChannel) MarshalJSON() ([]byte, error) { + fc.ChannelName = ChannelNameFacebookChannel1 + objectMap := make(map[string]interface{}) + if fc.Properties != nil { + objectMap["properties"] = fc.Properties + } + if fc.ChannelName != "" { + objectMap["channelName"] = fc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return &fc, true +} + +// AsEmailChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for FacebookChannel. +func (fc FacebookChannel) AsBasicChannel() (BasicChannel, bool) { + return &fc, true +} + +// FacebookChannelProperties the parameters to provide for the Facebook channel. +type FacebookChannelProperties struct { + // VerifyToken - READ-ONLY; Verify token. Value only returned through POST to the action Channel List API, otherwise empty. + VerifyToken *string `json:"verifyToken,omitempty"` + // Pages - The list of Facebook pages + Pages *[]FacebookPage `json:"pages,omitempty"` + // AppID - Facebook application id + AppID *string `json:"appId,omitempty"` + // AppSecret - Facebook application secret. Value only returned through POST to the action Channel List API, otherwise empty. + AppSecret *string `json:"appSecret,omitempty"` + // CallbackURL - READ-ONLY; Callback Url + CallbackURL *string `json:"callbackUrl,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// FacebookPage a Facebook page for Facebook channel registration +type FacebookPage struct { + // ID - Page id + ID *string `json:"id,omitempty"` + // AccessToken - Facebook application access token. Value only returned through POST to the action Channel List API, otherwise empty. + AccessToken *string `json:"accessToken,omitempty"` +} + +// KikChannel kik channel definition +type KikChannel struct { + // Properties - The set of properties specific to Kik channel resource + Properties *KikChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for KikChannel. +func (kc KikChannel) MarshalJSON() ([]byte, error) { + kc.ChannelName = ChannelNameKikChannel1 + objectMap := make(map[string]interface{}) + if kc.Properties != nil { + objectMap["properties"] = kc.Properties + } + if kc.ChannelName != "" { + objectMap["channelName"] = kc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsKikChannel() (*KikChannel, bool) { + return &kc, true +} + +// AsWebChatChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for KikChannel. +func (kc KikChannel) AsBasicChannel() (BasicChannel, bool) { + return &kc, true +} + +// KikChannelProperties the parameters to provide for the Kik channel. +type KikChannelProperties struct { + // UserName - The Kik user name + UserName *string `json:"userName,omitempty"` + // APIKey - Kik API key. Value only returned through POST to the action Channel List API, otherwise empty. + APIKey *string `json:"apiKey,omitempty"` + // IsValidated - Whether this channel is validated for the bot + IsValidated *bool `json:"isValidated,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// MsTeamsChannel microsoft Teams channel definition +type MsTeamsChannel struct { + // Properties - The set of properties specific to Microsoft Teams channel resource + Properties *MsTeamsChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for MsTeamsChannel. +func (mtc MsTeamsChannel) MarshalJSON() ([]byte, error) { + mtc.ChannelName = ChannelNameMsTeamsChannel1 + objectMap := make(map[string]interface{}) + if mtc.Properties != nil { + objectMap["properties"] = mtc.Properties + } + if mtc.ChannelName != "" { + objectMap["channelName"] = mtc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return &mtc, true +} + +// AsSkypeChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for MsTeamsChannel. +func (mtc MsTeamsChannel) AsBasicChannel() (BasicChannel, bool) { + return &mtc, true +} + +// MsTeamsChannelProperties the parameters to provide for the Microsoft Teams channel. +type MsTeamsChannelProperties struct { + // EnableCalling - Enable calling for Microsoft Teams channel + EnableCalling *bool `json:"enableCalling,omitempty"` + // CallingWebHook - Webhook for Microsoft Teams channel calls + CallingWebHook *string `json:"callingWebHook,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// OperationDisplayInfo the operation supported by Bot Service Management. +type OperationDisplayInfo struct { + // Description - The description of the operation. + Description *string `json:"description,omitempty"` + // Operation - The action that users can perform, based on their permission level. + Operation *string `json:"operation,omitempty"` + // Provider - Service provider: Microsoft Bot Service. + Provider *string `json:"provider,omitempty"` + // Resource - Resource on which the operation is performed. + Resource *string `json:"resource,omitempty"` +} + +// OperationEntity the operations supported by Bot Service Management. +type OperationEntity struct { + // Name - Operation name: {provider}/{resource}/{operation}. + Name *string `json:"name,omitempty"` + // Display - The operation supported by Bot Service Management. + Display *OperationDisplayInfo `json:"display,omitempty"` + // Origin - The origin of the operation. + Origin *string `json:"origin,omitempty"` + // Properties - Additional properties. + Properties interface{} `json:"properties,omitempty"` +} + +// OperationEntityListResult the list of bot service operation response. +type OperationEntityListResult struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of operations. + NextLink *string `json:"nextLink,omitempty"` + // Value - The list of operations. + Value *[]OperationEntity `json:"value,omitempty"` +} + +// OperationEntityListResultIterator provides access to a complete listing of OperationEntity values. +type OperationEntityListResultIterator struct { + i int + page OperationEntityListResultPage +} + +// NextWithContext advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +func (iter *OperationEntityListResultIterator) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultIterator.NextWithContext") + defer func() { + sc := -1 + if iter.Response().Response.Response != nil { + sc = iter.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + iter.i++ + if iter.i < len(iter.page.Values()) { + return nil + } + err = iter.page.NextWithContext(ctx) + if err != nil { + iter.i-- + return err + } + iter.i = 0 + return nil +} + +// Next advances to the next value. If there was an error making +// the request the iterator does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (iter *OperationEntityListResultIterator) Next() error { + return iter.NextWithContext(context.Background()) +} + +// NotDone returns true if the enumeration should be started or is not yet complete. +func (iter OperationEntityListResultIterator) NotDone() bool { + return iter.page.NotDone() && iter.i < len(iter.page.Values()) +} + +// Response returns the raw server response from the last page request. +func (iter OperationEntityListResultIterator) Response() OperationEntityListResult { + return iter.page.Response() +} + +// Value returns the current value or a zero-initialized value if the +// iterator has advanced beyond the end of the collection. +func (iter OperationEntityListResultIterator) Value() OperationEntity { + if !iter.page.NotDone() { + return OperationEntity{} + } + return iter.page.Values()[iter.i] +} + +// Creates a new instance of the OperationEntityListResultIterator type. +func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator { + return OperationEntityListResultIterator{page: page} +} + +// IsEmpty returns true if the ListResult contains no values. +func (oelr OperationEntityListResult) IsEmpty() bool { + return oelr.Value == nil || len(*oelr.Value) == 0 +} + +// operationEntityListResultPreparer prepares a request to retrieve the next set of results. +// It returns nil if no more results exist. +func (oelr OperationEntityListResult) operationEntityListResultPreparer(ctx context.Context) (*http.Request, error) { + if oelr.NextLink == nil || len(to.String(oelr.NextLink)) < 1 { + return nil, nil + } + return autorest.Prepare((&http.Request{}).WithContext(ctx), + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(oelr.NextLink))) +} + +// OperationEntityListResultPage contains a page of OperationEntity values. +type OperationEntityListResultPage struct { + fn func(context.Context, OperationEntityListResult) (OperationEntityListResult, error) + oelr OperationEntityListResult +} + +// NextWithContext advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +func (page *OperationEntityListResultPage) NextWithContext(ctx context.Context) (err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultPage.NextWithContext") + defer func() { + sc := -1 + if page.Response().Response.Response != nil { + sc = page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + next, err := page.fn(ctx, page.oelr) + if err != nil { + return err + } + page.oelr = next + return nil +} + +// Next advances to the next page of values. If there was an error making +// the request the page does not advance and the error is returned. +// Deprecated: Use NextWithContext() instead. +func (page *OperationEntityListResultPage) Next() error { + return page.NextWithContext(context.Background()) +} + +// NotDone returns true if the page enumeration should be started or is not yet complete. +func (page OperationEntityListResultPage) NotDone() bool { + return !page.oelr.IsEmpty() +} + +// Response returns the raw server response from the last page request. +func (page OperationEntityListResultPage) Response() OperationEntityListResult { + return page.oelr +} + +// Values returns the slice of values for the current page or nil if there are no values. +func (page OperationEntityListResultPage) Values() []OperationEntity { + if page.oelr.IsEmpty() { + return nil + } + return *page.oelr.Value +} + +// Creates a new instance of the OperationEntityListResultPage type. +func NewOperationEntityListResultPage(getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage { + return OperationEntityListResultPage{fn: getNextPage} +} + +// Resource azure resource +type Resource struct { + // ID - READ-ONLY; Specifies the resource ID. + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Specifies the name of the resource. + Name *string `json:"name,omitempty"` + // Location - Specifies the location of the resource. + Location *string `json:"location,omitempty"` + // Type - READ-ONLY; Specifies the type of the resource. + Type *string `json:"type,omitempty"` + // Tags - Contains resource tags defined as key/value pairs. + Tags map[string]*string `json:"tags"` + // Sku - Gets or sets the SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction' + Kind Kind `json:"kind,omitempty"` + // Etag - Entity Tag + Etag *string `json:"etag,omitempty"` +} + +// MarshalJSON is the custom marshaler for Resource. +func (r Resource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if r.Location != nil { + objectMap["location"] = r.Location + } + if r.Tags != nil { + objectMap["tags"] = r.Tags + } + if r.Sku != nil { + objectMap["sku"] = r.Sku + } + if r.Kind != "" { + objectMap["kind"] = r.Kind + } + if r.Etag != nil { + objectMap["etag"] = r.Etag + } + return json.Marshal(objectMap) +} + +// ServiceProvider service Provider Definition +type ServiceProvider struct { + // Properties - The Properties of a Service Provider Object + Properties *ServiceProviderProperties `json:"properties,omitempty"` +} + +// ServiceProviderParameter extra Parameters specific to each Service Provider +type ServiceProviderParameter struct { + // Name - READ-ONLY; Name of the Service Provider + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Type of the Service Provider + Type *string `json:"type,omitempty"` + // DisplayName - READ-ONLY; Display Name of the Service Provider + DisplayName *string `json:"displayName,omitempty"` + // Description - READ-ONLY; Description of the Service Provider + Description *string `json:"description,omitempty"` + // HelpURL - READ-ONLY; Help Url for the Service Provider + HelpURL *string `json:"helpUrl,omitempty"` + // Default - READ-ONLY; Default Name for the Service Provider + Default *string `json:"default,omitempty"` +} + +// ServiceProviderProperties the Object used to describe a Service Provider supported by Bot Service +type ServiceProviderProperties struct { + // ID - READ-ONLY; Id for Service Provider + ID *string `json:"id,omitempty"` + // DisplayName - READ-ONLY; Display Name of the Service Provider + DisplayName *string `json:"displayName,omitempty"` + // ServiceProviderName - READ-ONLY; Display Name of the Service Provider + ServiceProviderName *string `json:"serviceProviderName,omitempty"` + // DevPortalURL - READ-ONLY; Display Name of the Service Provider + DevPortalURL *string `json:"devPortalUrl,omitempty"` + // IconURL - READ-ONLY; Display Name of the Service Provider + IconURL *string `json:"iconUrl,omitempty"` + // Parameters - The list of parameters for the Service Provider + Parameters *[]ServiceProviderParameter `json:"parameters,omitempty"` +} + +// ServiceProviderResponseList the list of bot service providers response. +type ServiceProviderResponseList struct { + autorest.Response `json:"-"` + // NextLink - The link used to get the next page of bot service providers. + NextLink *string `json:"nextLink,omitempty"` + // Value - READ-ONLY; Gets the list of bot service providers and their properties. + Value *[]ServiceProvider `json:"value,omitempty"` +} + +// Sku the SKU of the cognitive services account. +type Sku struct { + // Name - The sku name. Possible values include: 'F0', 'S1' + Name SkuName `json:"name,omitempty"` + // Tier - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard' + Tier SkuTier `json:"tier,omitempty"` +} + +// SkypeChannel skype channel definition +type SkypeChannel struct { + // Properties - The set of properties specific to Skype channel resource + Properties *SkypeChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for SkypeChannel. +func (sc SkypeChannel) MarshalJSON() ([]byte, error) { + sc.ChannelName = ChannelNameSkypeChannel1 + objectMap := make(map[string]interface{}) + if sc.Properties != nil { + objectMap["properties"] = sc.Properties + } + if sc.ChannelName != "" { + objectMap["channelName"] = sc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return &sc, true +} + +// AsKikChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for SkypeChannel. +func (sc SkypeChannel) AsBasicChannel() (BasicChannel, bool) { + return &sc, true +} + +// SkypeChannelProperties the parameters to provide for the Microsoft Teams channel. +type SkypeChannelProperties struct { + // EnableMessaging - Enable messaging for Skype channel + EnableMessaging *bool `json:"enableMessaging,omitempty"` + // EnableMediaCards - Enable media cards for Skype channel + EnableMediaCards *bool `json:"enableMediaCards,omitempty"` + // EnableVideo - Enable video for Skype channel + EnableVideo *bool `json:"enableVideo,omitempty"` + // EnableCalling - Enable calling for Skype channel + EnableCalling *bool `json:"enableCalling,omitempty"` + // EnableScreenSharing - Enable screen sharing for Skype channel + EnableScreenSharing *bool `json:"enableScreenSharing,omitempty"` + // EnableGroups - Enable groups for Skype channel + EnableGroups *bool `json:"enableGroups,omitempty"` + // GroupsMode - Group mode for Skype channel + GroupsMode *string `json:"groupsMode,omitempty"` + // CallingWebHook - Calling web hook for Skype channel + CallingWebHook *string `json:"callingWebHook,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// SlackChannel slack channel definition +type SlackChannel struct { + // Properties - The set of properties specific to Slack channel resource + Properties *SlackChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for SlackChannel. +func (sc SlackChannel) MarshalJSON() ([]byte, error) { + sc.ChannelName = ChannelNameSlackChannel1 + objectMap := make(map[string]interface{}) + if sc.Properties != nil { + objectMap["properties"] = sc.Properties + } + if sc.ChannelName != "" { + objectMap["channelName"] = sc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsSlackChannel() (*SlackChannel, bool) { + return &sc, true +} + +// AsChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for SlackChannel. +func (sc SlackChannel) AsBasicChannel() (BasicChannel, bool) { + return &sc, true +} + +// SlackChannelProperties the parameters to provide for the Slack channel. +type SlackChannelProperties struct { + // ClientID - The Slack client id + ClientID *string `json:"clientId,omitempty"` + // ClientSecret - The Slack client secret. Value only returned through POST to the action Channel List API, otherwise empty. + ClientSecret *string `json:"clientSecret,omitempty"` + // VerificationToken - The Slack verification token. Value only returned through POST to the action Channel List API, otherwise empty. + VerificationToken *string `json:"verificationToken,omitempty"` + // LandingPageURL - The Slack landing page Url + LandingPageURL *string `json:"landingPageUrl,omitempty"` + // RedirectAction - READ-ONLY; The Slack redirect action + RedirectAction *string `json:"redirectAction,omitempty"` + // LastSubmissionID - READ-ONLY; The Sms auth token + LastSubmissionID *string `json:"lastSubmissionId,omitempty"` + // RegisterBeforeOAuthFlow - READ-ONLY; Whether to register the settings before OAuth validation is performed. Recommended to True. + RegisterBeforeOAuthFlow *bool `json:"registerBeforeOAuthFlow,omitempty"` + // IsValidated - READ-ONLY; Whether this channel is validated for the bot + IsValidated *bool `json:"isValidated,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// SmsChannel sms channel definition +type SmsChannel struct { + // Properties - The set of properties specific to Sms channel resource + Properties *SmsChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for SmsChannel. +func (sc SmsChannel) MarshalJSON() ([]byte, error) { + sc.ChannelName = ChannelNameSmsChannel1 + objectMap := make(map[string]interface{}) + if sc.Properties != nil { + objectMap["properties"] = sc.Properties + } + if sc.ChannelName != "" { + objectMap["channelName"] = sc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsSmsChannel() (*SmsChannel, bool) { + return &sc, true +} + +// AsSlackChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for SmsChannel. +func (sc SmsChannel) AsBasicChannel() (BasicChannel, bool) { + return &sc, true +} + +// SmsChannelProperties the parameters to provide for the Sms channel. +type SmsChannelProperties struct { + // Phone - The Sms phone + Phone *string `json:"phone,omitempty"` + // AccountSID - The Sms account SID. Value only returned through POST to the action Channel List API, otherwise empty. + AccountSID *string `json:"accountSID,omitempty"` + // AuthToken - The Sms auth token. Value only returned through POST to the action Channel List API, otherwise empty. + AuthToken *string `json:"authToken,omitempty"` + // IsValidated - Whether this channel is validated for the bot + IsValidated *bool `json:"isValidated,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// TelegramChannel telegram channel definition +type TelegramChannel struct { + // Properties - The set of properties specific to Telegram channel resource + Properties *TelegramChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for TelegramChannel. +func (tc TelegramChannel) MarshalJSON() ([]byte, error) { + tc.ChannelName = ChannelNameTelegramChannel1 + objectMap := make(map[string]interface{}) + if tc.Properties != nil { + objectMap["properties"] = tc.Properties + } + if tc.ChannelName != "" { + objectMap["channelName"] = tc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return nil, false +} + +// AsDirectLineChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return &tc, true +} + +// AsSmsChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for TelegramChannel. +func (tc TelegramChannel) AsBasicChannel() (BasicChannel, bool) { + return &tc, true +} + +// TelegramChannelProperties the parameters to provide for the Telegram channel. +type TelegramChannelProperties struct { + // AccessToken - The Telegram access token. Value only returned through POST to the action Channel List API, otherwise empty. + AccessToken *string `json:"accessToken,omitempty"` + // IsValidated - Whether this channel is validated for the bot + IsValidated *bool `json:"isValidated,omitempty"` + // IsEnabled - Whether this channel is enabled for the bot + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// WebChatChannel web Chat channel definition +type WebChatChannel struct { + // Properties - The set of properties specific to Web Chat channel resource + Properties *WebChatChannelProperties `json:"properties,omitempty"` + // ChannelName - Possible values include: 'ChannelNameChannel', 'ChannelNameFacebookChannel1', 'ChannelNameEmailChannel1', 'ChannelNameMsTeamsChannel1', 'ChannelNameSkypeChannel1', 'ChannelNameKikChannel1', 'ChannelNameWebChatChannel1', 'ChannelNameDirectLineChannel1', 'ChannelNameTelegramChannel1', 'ChannelNameSmsChannel1', 'ChannelNameSlackChannel1' + ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"` +} + +// MarshalJSON is the custom marshaler for WebChatChannel. +func (wcc WebChatChannel) MarshalJSON() ([]byte, error) { + wcc.ChannelName = ChannelNameWebChatChannel1 + objectMap := make(map[string]interface{}) + if wcc.Properties != nil { + objectMap["properties"] = wcc.Properties + } + if wcc.ChannelName != "" { + objectMap["channelName"] = wcc.ChannelName + } + return json.Marshal(objectMap) +} + +// AsFacebookChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsFacebookChannel() (*FacebookChannel, bool) { + return nil, false +} + +// AsEmailChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsEmailChannel() (*EmailChannel, bool) { + return nil, false +} + +// AsMsTeamsChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) { + return nil, false +} + +// AsSkypeChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsSkypeChannel() (*SkypeChannel, bool) { + return nil, false +} + +// AsKikChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsKikChannel() (*KikChannel, bool) { + return nil, false +} + +// AsWebChatChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsWebChatChannel() (*WebChatChannel, bool) { + return &wcc, true +} + +// AsDirectLineChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsDirectLineChannel() (*DirectLineChannel, bool) { + return nil, false +} + +// AsTelegramChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsTelegramChannel() (*TelegramChannel, bool) { + return nil, false +} + +// AsSmsChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsSmsChannel() (*SmsChannel, bool) { + return nil, false +} + +// AsSlackChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsSlackChannel() (*SlackChannel, bool) { + return nil, false +} + +// AsChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsChannel() (*Channel, bool) { + return nil, false +} + +// AsBasicChannel is the BasicChannel implementation for WebChatChannel. +func (wcc WebChatChannel) AsBasicChannel() (BasicChannel, bool) { + return &wcc, true +} + +// WebChatChannelProperties the parameters to provide for the Web Chat channel. +type WebChatChannelProperties struct { + // WebChatEmbedCode - READ-ONLY; Web chat control embed code + WebChatEmbedCode *string `json:"webChatEmbedCode,omitempty"` + // Sites - The list of Web Chat sites + Sites *[]WebChatSite `json:"sites,omitempty"` +} + +// WebChatSite a site for the Webchat channel +type WebChatSite struct { + // SiteID - READ-ONLY; Site Id + SiteID *string `json:"siteId,omitempty"` + // SiteName - Site name + SiteName *string `json:"siteName,omitempty"` + // Key - READ-ONLY; Primary key. Value only returned through POST to the action Channel List API, otherwise empty. + Key *string `json:"key,omitempty"` + // Key2 - READ-ONLY; Secondary key. Value only returned through POST to the action Channel List API, otherwise empty. + Key2 *string `json:"key2,omitempty"` + // IsEnabled - Whether this site is enabled for DirectLine channel + IsEnabled *bool `json:"isEnabled,omitempty"` + // EnablePreview - Whether this site is enabled for preview versions of Webchat + EnablePreview *bool `json:"enablePreview,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/operations.go new file mode 100644 index 000000000000..9e73bf1e6775 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/operations.go @@ -0,0 +1,147 @@ +package botservice + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "context" + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/tracing" + "net/http" +) + +// OperationsClient is the azure Bot Service is a platform for creating smart conversational agents. +type OperationsClient struct { + BaseClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all the available BotService operations. +func (client OperationsClient) List(ctx context.Context) (result OperationEntityListResultPage, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.oelr.Response.Response != nil { + sc = result.oelr.Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.fn = client.listNextResults + req, err := client.ListPreparer(ctx) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.oelr.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "botservice.OperationsClient", "List", resp, "Failure sending request") + return + } + + result.oelr, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error) { + const APIVersion = "2018-07-12" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.BotService/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare((&http.Request{}).WithContext(ctx)) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationEntityListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// listNextResults retrieves the next set of results, if any. +func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationEntityListResult) (result OperationEntityListResult, err error) { + req, err := lastResults.operationEntityListResultPreparer(ctx) + if err != nil { + return result, autorest.NewErrorWithError(err, "botservice.OperationsClient", "listNextResults", nil, "Failure preparing next results request") + } + if req == nil { + return + } + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "botservice.OperationsClient", "listNextResults", resp, "Failure sending next results request") + } + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "botservice.OperationsClient", "listNextResults", resp, "Failure responding to next results request") + } + return +} + +// ListComplete enumerates all values, automatically crossing page boundaries as required. +func (client OperationsClient) ListComplete(ctx context.Context) (result OperationEntityListResultIterator, err error) { + if tracing.IsEnabled() { + ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List") + defer func() { + sc := -1 + if result.Response().Response.Response != nil { + sc = result.page.Response().Response.Response.StatusCode + } + tracing.EndSpan(ctx, sc, err) + }() + } + result.page, err = client.List(ctx) + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/version.go new file mode 100644 index 000000000000..02f110260fb1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice/version.go @@ -0,0 +1,30 @@ +package botservice + +import "github.com/Azure/azure-sdk-for-go/version" + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/" + version.Number + " botservice/2018-07-12" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return version.Number +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 0007eb48033b..0695793b656d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -30,6 +30,7 @@ github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault +github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic github.com/Azure/azure-sdk-for-go/services/maps/mgmt/2018-05-01/maps github.com/Azure/azure-sdk-for-go/services/mariadb/mgmt/2018-06-01/mariadb @@ -71,8 +72,8 @@ github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage github.com/Azure/azure-sdk-for-go/services/streamanalytics/mgmt/2016-03-01/streamanalytics github.com/Azure/azure-sdk-for-go/services/trafficmanager/mgmt/2018-04-01/trafficmanager github.com/Azure/azure-sdk-for-go/services/web/mgmt/2018-02-01/web +github.com/Azure/azure-sdk-for-go/services/preview/botservice/mgmt/2018-07-12/botservice github.com/Azure/azure-sdk-for-go/storage -github.com/Azure/azure-sdk-for-go/services/kusto/mgmt/2019-01-21/kusto github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-06-01/subscriptions github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources github.com/Azure/azure-sdk-for-go/version diff --git a/website/azurerm.erb b/website/azurerm.erb index c33028f0dd02..ca3fbce97b41 100644 --- a/website/azurerm.erb +++ b/website/azurerm.erb @@ -633,6 +633,15 @@ +