diff --git a/internal/services/bot/bot_channel_email_resource.go b/internal/services/bot/bot_channel_email_resource.go index db241bf05f7e..a6867d1df7e1 100644 --- a/internal/services/bot/bot_channel_email_resource.go +++ b/internal/services/bot/bot_channel_email_resource.go @@ -8,9 +8,12 @@ import ( "log" "time" + "github.com/hashicorp/go-azure-helpers/lang/pointer" "github.com/hashicorp/go-azure-helpers/lang/response" + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" "github.com/hashicorp/go-azure-helpers/resourcemanager/location" + "github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" "github.com/hashicorp/terraform-provider-azurerm/helpers/tf" "github.com/hashicorp/terraform-provider-azurerm/internal/clients" @@ -19,7 +22,6 @@ import ( "github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation" "github.com/hashicorp/terraform-provider-azurerm/internal/timeouts" "github.com/hashicorp/terraform-provider-azurerm/utils" - "github.com/tombuildsstuff/kermit/sdk/botservice/2021-05-01-preview/botservice" ) func resourceBotChannelEmail() *pluginsdk.Resource { @@ -70,39 +72,38 @@ func resourceBotChannelEmail() *pluginsdk.Resource { } func resourceBotChannelEmailCreate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Bot.ChannelClient + client := meta.(*clients.Client).Bot.EmailChannelClient subscriptionId := meta.(*clients.Client).Account.SubscriptionId ctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d) defer cancel() - resourceId := parse.NewBotChannelID(subscriptionId, d.Get("resource_group_name").(string), d.Get("bot_name").(string), string(botservice.ChannelNameEmailChannel)) + resourceId := commonids.NewBotServiceChannelID(subscriptionId, d.Get("resource_group_name").(string), d.Get("bot_name").(string), string(channel.BotServiceChannelTypeEmailChannel)) if d.IsNewResource() { - existing, err := client.Get(ctx, resourceId.ResourceGroup, resourceId.BotServiceName, resourceId.ChannelName) + existing, err := client.Get(ctx, resourceId) if err != nil { - if !utils.ResponseWasNotFound(existing.Response) { - return fmt.Errorf("checking for presence of existing Email Channel for Bot %q (Resource Group %q): %+v", resourceId.BotServiceName, resourceId.ResourceGroup, err) + if !response.WasNotFound(existing.HttpResponse) { + return fmt.Errorf("checking for presence of existing Email Channel for Bot %q (Resource Group %q): %+v", resourceId.BotServiceName, resourceId.ResourceGroupName, err) } } - if !utils.ResponseWasNotFound(existing.Response) { + if !response.WasNotFound(existing.HttpResponse) { return tf.ImportAsExistsError("azurerm_bot_channel_email", resourceId.ID()) } } - channel := botservice.BotChannel{ - Properties: botservice.EmailChannel{ - Properties: &botservice.EmailChannelProperties{ - EmailAddress: utils.String(d.Get("email_address").(string)), + channel := channel.BotChannel{ + Properties: channel.EmailChannel{ + Properties: &channel.EmailChannelProperties{ + EmailAddress: d.Get("email_address").(string), Password: utils.String(d.Get("email_password").(string)), - IsEnabled: utils.Bool(true), + IsEnabled: true, }, - ChannelName: botservice.ChannelNameBasicChannelChannelNameEmailChannel, }, Location: utils.String(azure.NormalizeLocation(d.Get("location").(string))), - Kind: botservice.KindBot, + Kind: pointer.To(channel.KindBot), } - if _, err := client.Create(ctx, resourceId.ResourceGroup, resourceId.BotServiceName, botservice.ChannelNameEmailChannel, channel); err != nil { - return fmt.Errorf("creating Email Channel for Bot %q (Resource Group %q): %+v", resourceId.BotServiceName, resourceId.ResourceGroup, err) + if _, err := client.Create(ctx, resourceId, channel); err != nil { + return fmt.Errorf("creating Email Channel for Bot %q (Resource Group %q): %+v", resourceId.BotServiceName, resourceId.ResourceGroupName, err) } d.SetId(resourceId.ID()) @@ -110,34 +111,37 @@ func resourceBotChannelEmailCreate(d *pluginsdk.ResourceData, meta interface{}) } func resourceBotChannelEmailRead(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Bot.ChannelClient + client := meta.(*clients.Client).Bot.EmailChannelClient ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.BotChannelID(d.Id()) + id, err := commonids.ParseBotServiceChannelID(d.Id()) if err != nil { return err } - resp, err := client.Get(ctx, id.ResourceGroup, id.BotServiceName, string(botservice.ChannelNameEmailChannel)) + resp, err := client.Get(ctx, *id) if err != nil { - if utils.ResponseWasNotFound(resp.Response) { - log.Printf("[INFO] Email Channel for Bot %q (Resource Group %q) was not found - removing from state!", id.BotServiceName, id.ResourceGroup) + if response.WasNotFound(resp.HttpResponse) { + log.Printf("[INFO] Email Channel for Bot %q (Resource Group %q) was not found - removing from state!", id.BotServiceName, id.ResourceGroupName) d.SetId("") return nil } - return fmt.Errorf("retrieving Email Channel for Bot %q (Resource Group %q): %+v", id.BotServiceName, id.ResourceGroup, err) + return fmt.Errorf("retrieving Email Channel for Bot %q (Resource Group %q): %+v", id.BotServiceName, id.ResourceGroupName, err) } d.Set("bot_name", id.BotServiceName) - d.Set("resource_group_name", id.ResourceGroup) - d.Set("location", location.NormalizeNilable(resp.Location)) + d.Set("resource_group_name", id.ResourceGroupName) - if props := resp.Properties; props != nil { - if channel, ok := props.AsEmailChannel(); ok { - if channelProps := channel.Properties; channelProps != nil { - d.Set("email_address", channelProps.EmailAddress) + if model := resp.Model; model != nil { + d.Set("location", location.NormalizeNilable(model.Location)) + + if props := model.Properties; props != nil { + if channel, ok := props.(channel.EmailChannel); ok { + if channelProps := channel.Properties; channelProps != nil { + d.Set("email_address", channelProps.EmailAddress) + } } } } @@ -146,49 +150,48 @@ func resourceBotChannelEmailRead(d *pluginsdk.ResourceData, meta interface{}) er } func resourceBotChannelEmailUpdate(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Bot.ChannelClient + client := meta.(*clients.Client).Bot.EmailChannelClient ctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.BotChannelID(d.Id()) + id, err := commonids.ParseBotServiceChannelID(d.Id()) if err != nil { return err } - channel := botservice.BotChannel{ - Properties: botservice.EmailChannel{ - Properties: &botservice.EmailChannelProperties{ - EmailAddress: utils.String(d.Get("email_address").(string)), + channel := channel.BotChannel{ + Properties: channel.EmailChannel{ + Properties: &channel.EmailChannelProperties{ + EmailAddress: d.Get("email_address").(string), Password: utils.String(d.Get("email_password").(string)), - IsEnabled: utils.Bool(true), + IsEnabled: true, }, - ChannelName: botservice.ChannelNameBasicChannelChannelNameEmailChannel, }, Location: utils.String(azure.NormalizeLocation(d.Get("location").(string))), - Kind: botservice.KindBot, + Kind: pointer.To(channel.KindBot), } - if _, err := client.Update(ctx, id.ResourceGroup, id.BotServiceName, botservice.ChannelNameEmailChannel, channel); err != nil { - return fmt.Errorf("updating Email Channel for Bot %q (Resource Group %q): %+v", id.ResourceGroup, id.BotServiceName, err) + if _, err := client.Update(ctx, *id, channel); err != nil { + return fmt.Errorf("updating Email Channel for Bot %q (Resource Group %q): %+v", id.ResourceGroupName, id.BotServiceName, err) } return resourceBotChannelEmailRead(d, meta) } func resourceBotChannelEmailDelete(d *pluginsdk.ResourceData, meta interface{}) error { - client := meta.(*clients.Client).Bot.ChannelClient + client := meta.(*clients.Client).Bot.EmailChannelClient ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := parse.BotChannelID(d.Id()) + id, err := commonids.ParseBotServiceChannelID(d.Id()) if err != nil { return err } - resp, err := client.Delete(ctx, id.ResourceGroup, id.BotServiceName, string(botservice.ChannelNameEmailChannel)) + resp, err := client.Delete(ctx, *id) if err != nil { - if !response.WasNotFound(resp.Response) { - return fmt.Errorf("deleting Email Channel for Bot %q (Resource Group %q): %+v", id.ResourceGroup, id.BotServiceName, err) + if !response.WasNotFound(resp.HttpResponse) { + return fmt.Errorf("deleting Email Channel for Bot %q (Resource Group %q): %+v", id.ResourceGroupName, id.BotServiceName, err) } } diff --git a/internal/services/bot/bot_channel_email_resource_test.go b/internal/services/bot/bot_channel_email_resource_test.go index 37b4b5afa1b9..9a738e0ada55 100644 --- a/internal/services/bot/bot_channel_email_resource_test.go +++ b/internal/services/bot/bot_channel_email_resource_test.go @@ -42,9 +42,6 @@ func testAccBotChannelEmail_update(t *testing.T) { if ok := skipEmailChannel(); ok { t.Skip("Skipping as one of `ARM_TEST_EMAIL`, AND `ARM_TEST_EMAIL_PASSWORD` was not specified") } - if ok := skipSlackChannel(); ok { - t.Skip("Skipping as one of `ARM_TEST_SLACK_CLIENT_ID`, `ARM_TEST_SLACK_CLIENT_SECRET`, or `ARM_TEST_SLACK_VERIFICATION_TOKEN` was not specified") - } data := acceptance.BuildTestData(t, "azurerm_bot_channel_email", "test") r := BotChannelEmailResource{} diff --git a/internal/services/bot/client/client.go b/internal/services/bot/client/client.go index 198ed56b2a99..3117ee9549b6 100644 --- a/internal/services/bot/client/client.go +++ b/internal/services/bot/client/client.go @@ -6,6 +6,7 @@ package client import ( "fmt" + emailchannel_2022_09_15 "github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel" healthbot_2022_08_08 "github.com/hashicorp/go-azure-sdk/resource-manager/healthbot/2022-08-08" "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" "github.com/hashicorp/terraform-provider-azurerm/internal/common" @@ -13,10 +14,11 @@ import ( ) type Client struct { - BotClient *botservice.BotsClient - ConnectionClient *botservice.BotConnectionClient - ChannelClient *botservice.ChannelsClient - HealthBotClient *healthbot_2022_08_08.Client + BotClient *botservice.BotsClient + ConnectionClient *botservice.BotConnectionClient + ChannelClient *botservice.ChannelsClient + EmailChannelClient *emailchannel_2022_09_15.ChannelClient + HealthBotClient *healthbot_2022_08_08.Client } func NewClient(o *common.ClientOptions) (*Client, error) { @@ -29,6 +31,12 @@ func NewClient(o *common.ClientOptions) (*Client, error) { channelClient := botservice.NewChannelsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId) o.ConfigureClient(&channelClient.Client, o.ResourceManagerAuthorizer) + emailChannelClient, err := emailchannel_2022_09_15.NewChannelClientWithBaseURI(o.Environment.ResourceManager) + if err != nil { + return nil, fmt.Errorf("building EmailChannels client: %+v", err) + } + o.Configure(emailChannelClient.Client, o.Authorizers.ResourceManager) + healthBotsClient, err := healthbot_2022_08_08.NewClientWithBaseURI(o.Environment.ResourceManager, func(c *resourcemanager.Client) { o.Configure(c, o.Authorizers.ResourceManager) }) @@ -37,9 +45,10 @@ func NewClient(o *common.ClientOptions) (*Client, error) { } return &Client{ - BotClient: &botClient, - ChannelClient: &channelClient, - ConnectionClient: &connectionClient, - HealthBotClient: healthBotsClient, + BotClient: &botClient, + ChannelClient: &channelClient, + ConnectionClient: &connectionClient, + EmailChannelClient: emailChannelClient, + HealthBotClient: healthBotsClient, }, nil } diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/README.md b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/README.md new file mode 100644 index 000000000000..b243e645a2b6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/README.md @@ -0,0 +1,164 @@ + +## `github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel` Documentation + +The `channel` SDK allows for interaction with the Azure Resource Manager Service `botservice` (API Version `2022-09-15`). + +This readme covers example usages, but further information on [using this SDK can be found in the project root](https://github.com/hashicorp/go-azure-sdk/tree/main/docs). + +### Import Path + +```go +import "github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel" +``` + + +### Client Initialization + +```go +client := channel.NewChannelClientWithBaseURI("https://management.azure.com") +client.Client.Authorizer = authorizer +``` + + +### Example Usage: `ChannelClient.Create` + +```go +ctx := context.TODO() +id := channel.NewBotServiceChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue", "AcsChatChannel") + +payload := channel.BotChannel{ + // ... +} + + +read, err := client.Create(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ChannelClient.Delete` + +```go +ctx := context.TODO() +id := channel.NewBotServiceChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue", "AcsChatChannel") + +read, err := client.Delete(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ChannelClient.DirectLineRegenerateKeys` + +```go +ctx := context.TODO() +id := channel.NewBotServiceChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue", "AcsChatChannel") + +payload := channel.SiteInfo{ + // ... +} + + +read, err := client.DirectLineRegenerateKeys(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ChannelClient.EmailCreateSignInUrl` + +```go +ctx := context.TODO() +id := channel.NewBotServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue") + +read, err := client.EmailCreateSignInUrl(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ChannelClient.Get` + +```go +ctx := context.TODO() +id := channel.NewBotServiceChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue", "AcsChatChannel") + +read, err := client.Get(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ChannelClient.ListByResourceGroup` + +```go +ctx := context.TODO() +id := channel.NewBotServiceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue") + +// alternatively `client.ListByResourceGroup(ctx, id)` can be used to do batched pagination +items, err := client.ListByResourceGroupComplete(ctx, id) +if err != nil { + // handle the error +} +for _, item := range items { + // do something +} +``` + + +### Example Usage: `ChannelClient.ListWithKeys` + +```go +ctx := context.TODO() +id := channel.NewBotServiceChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue", "AcsChatChannel") + +read, err := client.ListWithKeys(ctx, id) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` + + +### Example Usage: `ChannelClient.Update` + +```go +ctx := context.TODO() +id := channel.NewBotServiceChannelID("12345678-1234-9876-4563-123456789012", "example-resource-group", "botServiceValue", "AcsChatChannel") + +payload := channel.BotChannel{ + // ... +} + + +read, err := client.Update(ctx, id, payload) +if err != nil { + // handle the error +} +if model := read.Model; model != nil { + // do something with the model/response object +} +``` diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/client.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/client.go new file mode 100644 index 000000000000..701a4a1c8b6d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/client.go @@ -0,0 +1,26 @@ +package channel + +import ( + "fmt" + + "github.com/hashicorp/go-azure-sdk/sdk/client/resourcemanager" + sdkEnv "github.com/hashicorp/go-azure-sdk/sdk/environments" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ChannelClient struct { + Client *resourcemanager.Client +} + +func NewChannelClientWithBaseURI(sdkApi sdkEnv.Api) (*ChannelClient, error) { + client, err := resourcemanager.NewResourceManagerClient(sdkApi, "channel", defaultApiVersion) + if err != nil { + return nil, fmt.Errorf("instantiating ChannelClient: %+v", err) + } + + return &ChannelClient{ + Client: client, + }, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/constants.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/constants.go new file mode 100644 index 000000000000..40fd58037349 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/constants.go @@ -0,0 +1,289 @@ +package channel + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BotServiceChannelType string + +const ( + BotServiceChannelTypeAcsChatChannel BotServiceChannelType = "AcsChatChannel" + BotServiceChannelTypeAlexaChannel BotServiceChannelType = "AlexaChannel" + BotServiceChannelTypeDirectLineChannel BotServiceChannelType = "DirectLineChannel" + BotServiceChannelTypeDirectLineSpeechChannel BotServiceChannelType = "DirectLineSpeechChannel" + BotServiceChannelTypeEmailChannel BotServiceChannelType = "EmailChannel" + BotServiceChannelTypeFacebookChannel BotServiceChannelType = "FacebookChannel" + BotServiceChannelTypeKikChannel BotServiceChannelType = "KikChannel" + BotServiceChannelTypeLineChannel BotServiceChannelType = "LineChannel" + BotServiceChannelTypeM365Extensions BotServiceChannelType = "M365Extensions" + BotServiceChannelTypeMsTeamsChannel BotServiceChannelType = "MsTeamsChannel" + BotServiceChannelTypeOmnichannel BotServiceChannelType = "Omnichannel" + BotServiceChannelTypeOutlookChannel BotServiceChannelType = "OutlookChannel" + BotServiceChannelTypeSearchAssistant BotServiceChannelType = "SearchAssistant" + BotServiceChannelTypeSkypeChannel BotServiceChannelType = "SkypeChannel" + BotServiceChannelTypeSlackChannel BotServiceChannelType = "SlackChannel" + BotServiceChannelTypeSmsChannel BotServiceChannelType = "SmsChannel" + BotServiceChannelTypeTelegramChannel BotServiceChannelType = "TelegramChannel" + BotServiceChannelTypeTelephonyChannel BotServiceChannelType = "TelephonyChannel" + BotServiceChannelTypeWebChatChannel BotServiceChannelType = "WebChatChannel" +) + +func PossibleValuesForBotServiceChannelType() []string { + return []string{ + string(BotServiceChannelTypeAcsChatChannel), + string(BotServiceChannelTypeAlexaChannel), + string(BotServiceChannelTypeDirectLineChannel), + string(BotServiceChannelTypeDirectLineSpeechChannel), + string(BotServiceChannelTypeEmailChannel), + string(BotServiceChannelTypeFacebookChannel), + string(BotServiceChannelTypeKikChannel), + string(BotServiceChannelTypeLineChannel), + string(BotServiceChannelTypeM365Extensions), + string(BotServiceChannelTypeMsTeamsChannel), + string(BotServiceChannelTypeOmnichannel), + string(BotServiceChannelTypeOutlookChannel), + string(BotServiceChannelTypeSearchAssistant), + string(BotServiceChannelTypeSkypeChannel), + string(BotServiceChannelTypeSlackChannel), + string(BotServiceChannelTypeSmsChannel), + string(BotServiceChannelTypeTelegramChannel), + string(BotServiceChannelTypeTelephonyChannel), + string(BotServiceChannelTypeWebChatChannel), + } +} + +func (s *BotServiceChannelType) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseBotServiceChannelType(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseBotServiceChannelType(input string) (*BotServiceChannelType, error) { + vals := map[string]BotServiceChannelType{ + "acschatchannel": BotServiceChannelTypeAcsChatChannel, + "alexachannel": BotServiceChannelTypeAlexaChannel, + "directlinechannel": BotServiceChannelTypeDirectLineChannel, + "directlinespeechchannel": BotServiceChannelTypeDirectLineSpeechChannel, + "emailchannel": BotServiceChannelTypeEmailChannel, + "facebookchannel": BotServiceChannelTypeFacebookChannel, + "kikchannel": BotServiceChannelTypeKikChannel, + "linechannel": BotServiceChannelTypeLineChannel, + "m365extensions": BotServiceChannelTypeM365Extensions, + "msteamschannel": BotServiceChannelTypeMsTeamsChannel, + "omnichannel": BotServiceChannelTypeOmnichannel, + "outlookchannel": BotServiceChannelTypeOutlookChannel, + "searchassistant": BotServiceChannelTypeSearchAssistant, + "skypechannel": BotServiceChannelTypeSkypeChannel, + "slackchannel": BotServiceChannelTypeSlackChannel, + "smschannel": BotServiceChannelTypeSmsChannel, + "telegramchannel": BotServiceChannelTypeTelegramChannel, + "telephonychannel": BotServiceChannelTypeTelephonyChannel, + "webchatchannel": BotServiceChannelTypeWebChatChannel, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := BotServiceChannelType(input) + return &out, nil +} + +type EmailChannelAuthMethod int64 + +const ( + EmailChannelAuthMethodOne EmailChannelAuthMethod = 1 + EmailChannelAuthMethodZero EmailChannelAuthMethod = 0 +) + +func PossibleValuesForEmailChannelAuthMethod() []int64 { + return []int64{ + int64(EmailChannelAuthMethodOne), + int64(EmailChannelAuthMethodZero), + } +} + +type Key string + +const ( + KeyKeyOne Key = "key1" + KeyKeyTwo Key = "key2" +) + +func PossibleValuesForKey() []string { + return []string{ + string(KeyKeyOne), + string(KeyKeyTwo), + } +} + +func (s *Key) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseKey(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseKey(input string) (*Key, error) { + vals := map[string]Key{ + "key1": KeyKeyOne, + "key2": KeyKeyTwo, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Key(input) + return &out, nil +} + +type Kind string + +const ( + KindAzurebot Kind = "azurebot" + KindBot Kind = "bot" + KindDesigner Kind = "designer" + KindFunction Kind = "function" + KindSdk Kind = "sdk" +) + +func PossibleValuesForKind() []string { + return []string{ + string(KindAzurebot), + string(KindBot), + string(KindDesigner), + string(KindFunction), + string(KindSdk), + } +} + +func (s *Kind) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseKind(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseKind(input string) (*Kind, error) { + vals := map[string]Kind{ + "azurebot": KindAzurebot, + "bot": KindBot, + "designer": KindDesigner, + "function": KindFunction, + "sdk": KindSdk, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := Kind(input) + return &out, nil +} + +type SkuName string + +const ( + SkuNameFZero SkuName = "F0" + SkuNameSOne SkuName = "S1" +) + +func PossibleValuesForSkuName() []string { + return []string{ + string(SkuNameFZero), + string(SkuNameSOne), + } +} + +func (s *SkuName) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuName(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuName(input string) (*SkuName, error) { + vals := map[string]SkuName{ + "f0": SkuNameFZero, + "s1": SkuNameSOne, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuName(input) + return &out, nil +} + +type SkuTier string + +const ( + SkuTierFree SkuTier = "Free" + SkuTierStandard SkuTier = "Standard" +) + +func PossibleValuesForSkuTier() []string { + return []string{ + string(SkuTierFree), + string(SkuTierStandard), + } +} + +func (s *SkuTier) UnmarshalJSON(bytes []byte) error { + var decoded string + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling: %+v", err) + } + out, err := parseSkuTier(decoded) + if err != nil { + return fmt.Errorf("parsing %q: %+v", decoded, err) + } + *s = *out + return nil +} + +func parseSkuTier(input string) (*SkuTier, error) { + vals := map[string]SkuTier{ + "free": SkuTierFree, + "standard": SkuTierStandard, + } + if v, ok := vals[strings.ToLower(input)]; ok { + return &v, nil + } + + // otherwise presume it's an undefined value and best-effort it + out := SkuTier(input) + return &out, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_create.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_create.go new file mode 100644 index 000000000000..3d50116d25ed --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_create.go @@ -0,0 +1,57 @@ +package channel + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BotChannel +} + +// Create ... +func (c ChannelClient) Create(ctx context.Context, id commonids.BotServiceChannelId, input BotChannel) (result CreateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPut, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_delete.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_delete.go new file mode 100644 index 000000000000..85835f4f4360 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_delete.go @@ -0,0 +1,48 @@ +package channel + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DeleteOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData +} + +// Delete ... +func (c ChannelClient) Delete(ctx context.Context, id commonids.BotServiceChannelId) (result DeleteOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusNoContent, + http.StatusOK, + }, + HttpMethod: http.MethodDelete, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_directlineregeneratekeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_directlineregeneratekeys.go new file mode 100644 index 000000000000..4b374e45663b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_directlineregeneratekeys.go @@ -0,0 +1,57 @@ +package channel + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DirectLineRegenerateKeysOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BotChannel +} + +// DirectLineRegenerateKeys ... +func (c ChannelClient) DirectLineRegenerateKeys(ctx context.Context, id commonids.BotServiceChannelId, input SiteInfo) (result DirectLineRegenerateKeysOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/regeneratekeys", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_emailcreatesigninurl.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_emailcreatesigninurl.go new file mode 100644 index 000000000000..f6c1d48597d6 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_emailcreatesigninurl.go @@ -0,0 +1,53 @@ +package channel + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EmailCreateSignInUrlOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *CreateEmailSignInUrlResponse +} + +// EmailCreateSignInUrl ... +func (c ChannelClient) EmailCreateSignInUrl(ctx context.Context, id commonids.BotServiceId) (result EmailCreateSignInUrlOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/createEmailSignInUrl", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_get.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_get.go new file mode 100644 index 000000000000..7c5a1fad20b8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_get.go @@ -0,0 +1,52 @@ +package channel + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type GetOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BotChannel +} + +// Get ... +func (c ChannelClient) Get(ctx context.Context, id commonids.BotServiceChannelId) (result GetOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_listbyresourcegroup.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_listbyresourcegroup.go new file mode 100644 index 000000000000..a084ddee9b92 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_listbyresourcegroup.go @@ -0,0 +1,92 @@ +package channel + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListByResourceGroupOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *[]BotChannel +} + +type ListByResourceGroupCompleteResult struct { + LatestHttpResponse *http.Response + Items []BotChannel +} + +// ListByResourceGroup ... +func (c ChannelClient) ListByResourceGroup(ctx context.Context, id commonids.BotServiceId) (result ListByResourceGroupOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodGet, + Path: fmt.Sprintf("%s/channels", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.ExecutePaged(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + var values struct { + Values *[]BotChannel `json:"value"` + } + if err = resp.Unmarshal(&values); err != nil { + return + } + + result.Model = values.Values + + return +} + +// ListByResourceGroupComplete retrieves all the results into a single object +func (c ChannelClient) ListByResourceGroupComplete(ctx context.Context, id commonids.BotServiceId) (ListByResourceGroupCompleteResult, error) { + return c.ListByResourceGroupCompleteMatchingPredicate(ctx, id, BotChannelOperationPredicate{}) +} + +// ListByResourceGroupCompleteMatchingPredicate retrieves all the results and then applies the predicate +func (c ChannelClient) ListByResourceGroupCompleteMatchingPredicate(ctx context.Context, id commonids.BotServiceId, predicate BotChannelOperationPredicate) (result ListByResourceGroupCompleteResult, err error) { + items := make([]BotChannel, 0) + + resp, err := c.ListByResourceGroup(ctx, id) + if err != nil { + err = fmt.Errorf("loading results: %+v", err) + return + } + if resp.Model != nil { + for _, v := range *resp.Model { + if predicate.Matches(v) { + items = append(items, v) + } + } + } + + result = ListByResourceGroupCompleteResult{ + LatestHttpResponse: resp.HttpResponse, + Items: items, + } + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_listwithkeys.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_listwithkeys.go new file mode 100644 index 000000000000..d02dc965e3e9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_listwithkeys.go @@ -0,0 +1,53 @@ +package channel + +import ( + "context" + "fmt" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListWithKeysOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *ListChannelWithKeysResponse +} + +// ListWithKeys ... +func (c ChannelClient) ListWithKeys(ctx context.Context, id commonids.BotServiceChannelId) (result ListWithKeysOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusOK, + }, + HttpMethod: http.MethodPost, + Path: fmt.Sprintf("%s/listChannelWithKeys", id.ID()), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_update.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_update.go new file mode 100644 index 000000000000..6867bcc3eaab --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/method_update.go @@ -0,0 +1,57 @@ +package channel + +import ( + "context" + "net/http" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" + "github.com/hashicorp/go-azure-sdk/sdk/client" + "github.com/hashicorp/go-azure-sdk/sdk/odata" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type UpdateOperationResponse struct { + HttpResponse *http.Response + OData *odata.OData + Model *BotChannel +} + +// Update ... +func (c ChannelClient) Update(ctx context.Context, id commonids.BotServiceChannelId, input BotChannel) (result UpdateOperationResponse, err error) { + opts := client.RequestOptions{ + ContentType: "application/json; charset=utf-8", + ExpectedStatusCodes: []int{ + http.StatusCreated, + http.StatusOK, + }, + HttpMethod: http.MethodPatch, + Path: id.ID(), + } + + req, err := c.Client.NewRequest(ctx, opts) + if err != nil { + return + } + + if err = req.Marshal(input); err != nil { + return + } + + var resp *client.Response + resp, err = req.Execute(ctx) + if resp != nil { + result.OData = resp.OData + result.HttpResponse = resp.Response + } + if err != nil { + return + } + + if err = resp.Unmarshal(&result.Model); err != nil { + return + } + + return +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_acschatchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_acschatchannel.go new file mode 100644 index 000000000000..e5b245bd5c32 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_acschatchannel.go @@ -0,0 +1,43 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = AcsChatChannel{} + +type AcsChatChannel struct { + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = AcsChatChannel{} + +func (s AcsChatChannel) MarshalJSON() ([]byte, error) { + type wrapper AcsChatChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AcsChatChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AcsChatChannel: %+v", err) + } + decoded["channelName"] = "AcsChatChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AcsChatChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_alexachannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_alexachannel.go new file mode 100644 index 000000000000..826c5d709b41 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_alexachannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = AlexaChannel{} + +type AlexaChannel struct { + Properties *AlexaChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = AlexaChannel{} + +func (s AlexaChannel) MarshalJSON() ([]byte, error) { + type wrapper AlexaChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling AlexaChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling AlexaChannel: %+v", err) + } + decoded["channelName"] = "AlexaChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling AlexaChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_alexachannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_alexachannelproperties.go new file mode 100644 index 000000000000..dfb43d1725d8 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_alexachannelproperties.go @@ -0,0 +1,11 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type AlexaChannelProperties struct { + AlexaSkillId string `json:"alexaSkillId"` + IsEnabled bool `json:"isEnabled"` + ServiceEndpointUri *string `json:"serviceEndpointUri,omitempty"` + UrlFragment *string `json:"urlFragment,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_botchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_botchannel.go new file mode 100644 index 000000000000..8764e733009d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_botchannel.go @@ -0,0 +1,58 @@ +package channel + +import ( + "encoding/json" + "fmt" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BotChannel struct { + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind *Kind `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties Channel `json:"properties"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} + +var _ json.Unmarshaler = &BotChannel{} + +func (s *BotChannel) UnmarshalJSON(bytes []byte) error { + type alias BotChannel + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into BotChannel: %+v", err) + } + + s.Etag = decoded.Etag + s.Id = decoded.Id + s.Kind = decoded.Kind + s.Location = decoded.Location + s.Name = decoded.Name + s.Sku = decoded.Sku + s.Tags = decoded.Tags + s.Type = decoded.Type + s.Zones = decoded.Zones + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling BotChannel into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalChannelImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'BotChannel': %+v", err) + } + s.Properties = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_channel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_channel.go new file mode 100644 index 000000000000..ea5ac715527c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_channel.go @@ -0,0 +1,197 @@ +package channel + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Channel interface { +} + +// RawChannelImpl is returned when the Discriminated Value +// doesn't match any of the defined types +// NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) +// and is used only for Deserialization (e.g. this cannot be used as a Request Payload). +type RawChannelImpl struct { + Type string + Values map[string]interface{} +} + +func unmarshalChannelImplementation(input []byte) (Channel, error) { + if input == nil { + return nil, nil + } + + var temp map[string]interface{} + if err := json.Unmarshal(input, &temp); err != nil { + return nil, fmt.Errorf("unmarshaling Channel into map[string]interface: %+v", err) + } + + value, ok := temp["channelName"].(string) + if !ok { + return nil, nil + } + + if strings.EqualFold(value, "AcsChatChannel") { + var out AcsChatChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AcsChatChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "AlexaChannel") { + var out AlexaChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into AlexaChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DirectLineChannel") { + var out DirectLineChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DirectLineChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "DirectLineSpeechChannel") { + var out DirectLineSpeechChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into DirectLineSpeechChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "EmailChannel") { + var out EmailChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into EmailChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "FacebookChannel") { + var out FacebookChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into FacebookChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "KikChannel") { + var out KikChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into KikChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "LineChannel") { + var out LineChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into LineChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "M365Extensions") { + var out M365Extensions + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into M365Extensions: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "MsTeamsChannel") { + var out MsTeamsChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into MsTeamsChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "Omnichannel") { + var out Omnichannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into Omnichannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "OutlookChannel") { + var out OutlookChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into OutlookChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SearchAssistant") { + var out SearchAssistant + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SearchAssistant: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SkypeChannel") { + var out SkypeChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SkypeChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SlackChannel") { + var out SlackChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SlackChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "SmsChannel") { + var out SmsChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into SmsChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "TelegramChannel") { + var out TelegramChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TelegramChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "TelephonyChannel") { + var out TelephonyChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into TelephonyChannel: %+v", err) + } + return out, nil + } + + if strings.EqualFold(value, "WebChatChannel") { + var out WebChatChannel + if err := json.Unmarshal(input, &out); err != nil { + return nil, fmt.Errorf("unmarshaling into WebChatChannel: %+v", err) + } + return out, nil + } + + out := RawChannelImpl{ + Type: value, + Values: temp, + } + return out, nil + +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_channelsettings.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_channelsettings.go new file mode 100644 index 000000000000..f188e82ca36c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_channelsettings.go @@ -0,0 +1,17 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ChannelSettings struct { + BotIconUrl *string `json:"botIconUrl,omitempty"` + BotId *string `json:"botId,omitempty"` + ChannelDisplayName *string `json:"channelDisplayName,omitempty"` + ChannelId *string `json:"channelId,omitempty"` + DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"` + ExtensionKey1 *string `json:"extensionKey1,omitempty"` + ExtensionKey2 *string `json:"extensionKey2,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` + RequireTermsAgreement *bool `json:"requireTermsAgreement,omitempty"` + Sites *[]Site `json:"sites,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_createemailsigninurlresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_createemailsigninurlresponse.go new file mode 100644 index 000000000000..63713e4658d2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_createemailsigninurlresponse.go @@ -0,0 +1,10 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateEmailSignInUrlResponse struct { + Id *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Properties *CreateEmailSignInUrlResponseProperties `json:"properties,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_createemailsigninurlresponseproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_createemailsigninurlresponseproperties.go new file mode 100644 index 000000000000..eb5780dbdc88 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_createemailsigninurlresponseproperties.go @@ -0,0 +1,8 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type CreateEmailSignInUrlResponseProperties struct { + Url *string `json:"url,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinechannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinechannel.go new file mode 100644 index 000000000000..1e314cb126ee --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinechannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = DirectLineChannel{} + +type DirectLineChannel struct { + Properties *DirectLineChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = DirectLineChannel{} + +func (s DirectLineChannel) MarshalJSON() ([]byte, error) { + type wrapper DirectLineChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DirectLineChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DirectLineChannel: %+v", err) + } + decoded["channelName"] = "DirectLineChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DirectLineChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinechannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinechannelproperties.go new file mode 100644 index 000000000000..b14747469080 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinechannelproperties.go @@ -0,0 +1,11 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DirectLineChannelProperties struct { + DirectLineEmbedCode *string `json:"DirectLineEmbedCode,omitempty"` + ExtensionKey1 *string `json:"extensionKey1,omitempty"` + ExtensionKey2 *string `json:"extensionKey2,omitempty"` + Sites *[]Site `json:"sites,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannel.go new file mode 100644 index 000000000000..00973b4d03da --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = DirectLineSpeechChannel{} + +type DirectLineSpeechChannel struct { + Properties *DirectLineSpeechChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = DirectLineSpeechChannel{} + +func (s DirectLineSpeechChannel) MarshalJSON() ([]byte, error) { + type wrapper DirectLineSpeechChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling DirectLineSpeechChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling DirectLineSpeechChannel: %+v", err) + } + decoded["channelName"] = "DirectLineSpeechChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling DirectLineSpeechChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannelproperties.go new file mode 100644 index 000000000000..302e92cf8a4a --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_directlinespeechchannelproperties.go @@ -0,0 +1,14 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type DirectLineSpeechChannelProperties struct { + CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"` + CognitiveServiceResourceId *string `json:"cognitiveServiceResourceId,omitempty"` + CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"` + CustomSpeechModelId *string `json:"customSpeechModelId,omitempty"` + CustomVoiceDeploymentId *string `json:"customVoiceDeploymentId,omitempty"` + IsDefaultBotForCogSvcAccount *bool `json:"isDefaultBotForCogSvcAccount,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_emailchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_emailchannel.go new file mode 100644 index 000000000000..752873bf8d5e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_emailchannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = EmailChannel{} + +type EmailChannel struct { + Properties *EmailChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = EmailChannel{} + +func (s EmailChannel) MarshalJSON() ([]byte, error) { + type wrapper EmailChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling EmailChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling EmailChannel: %+v", err) + } + decoded["channelName"] = "EmailChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling EmailChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_emailchannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_emailchannelproperties.go new file mode 100644 index 000000000000..288e5f8c6eeb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_emailchannelproperties.go @@ -0,0 +1,12 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type EmailChannelProperties struct { + AuthMethod *EmailChannelAuthMethod `json:"authMethod,omitempty"` + EmailAddress string `json:"emailAddress"` + IsEnabled bool `json:"isEnabled"` + MagicCode *string `json:"magicCode,omitempty"` + Password *string `json:"password,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookchannel.go new file mode 100644 index 000000000000..c0ac48bfcadc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookchannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = FacebookChannel{} + +type FacebookChannel struct { + Properties *FacebookChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = FacebookChannel{} + +func (s FacebookChannel) MarshalJSON() ([]byte, error) { + type wrapper FacebookChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling FacebookChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling FacebookChannel: %+v", err) + } + decoded["channelName"] = "FacebookChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling FacebookChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookchannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookchannelproperties.go new file mode 100644 index 000000000000..456556ddc406 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookchannelproperties.go @@ -0,0 +1,13 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FacebookChannelProperties struct { + AppId string `json:"appId"` + AppSecret *string `json:"appSecret,omitempty"` + CallbackUrl *string `json:"callbackUrl,omitempty"` + IsEnabled bool `json:"isEnabled"` + Pages *[]FacebookPage `json:"pages,omitempty"` + VerifyToken *string `json:"verifyToken,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookpage.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookpage.go new file mode 100644 index 000000000000..aac0b863c5a0 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_facebookpage.go @@ -0,0 +1,9 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type FacebookPage struct { + AccessToken *string `json:"accessToken,omitempty"` + Id string `json:"id"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_kikchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_kikchannel.go new file mode 100644 index 000000000000..e376c30b4d64 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_kikchannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = KikChannel{} + +type KikChannel struct { + Properties *KikChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = KikChannel{} + +func (s KikChannel) MarshalJSON() ([]byte, error) { + type wrapper KikChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling KikChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling KikChannel: %+v", err) + } + decoded["channelName"] = "KikChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling KikChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_kikchannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_kikchannelproperties.go new file mode 100644 index 000000000000..b8eeb47ea6a5 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_kikchannelproperties.go @@ -0,0 +1,11 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type KikChannelProperties struct { + ApiKey *string `json:"apiKey,omitempty"` + IsEnabled bool `json:"isEnabled"` + IsValidated *bool `json:"isValidated,omitempty"` + UserName string `json:"userName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_linechannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_linechannel.go new file mode 100644 index 000000000000..07c63c2d8252 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_linechannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = LineChannel{} + +type LineChannel struct { + Properties *LineChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = LineChannel{} + +func (s LineChannel) MarshalJSON() ([]byte, error) { + type wrapper LineChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling LineChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling LineChannel: %+v", err) + } + decoded["channelName"] = "LineChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling LineChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_linechannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_linechannelproperties.go new file mode 100644 index 000000000000..396523b48940 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_linechannelproperties.go @@ -0,0 +1,10 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LineChannelProperties struct { + CallbackUrl *string `json:"callbackUrl,omitempty"` + IsValidated *bool `json:"isValidated,omitempty"` + LineRegistrations []LineRegistration `json:"lineRegistrations"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_lineregistration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_lineregistration.go new file mode 100644 index 000000000000..42585f1340ea --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_lineregistration.go @@ -0,0 +1,10 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type LineRegistration struct { + ChannelAccessToken *string `json:"channelAccessToken,omitempty"` + ChannelSecret *string `json:"channelSecret,omitempty"` + GeneratedId *string `json:"generatedId,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_listchannelwithkeysresponse.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_listchannelwithkeysresponse.go new file mode 100644 index 000000000000..b6361bfbe87b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_listchannelwithkeysresponse.go @@ -0,0 +1,75 @@ +package channel + +import ( + "encoding/json" + "fmt" + + "github.com/hashicorp/go-azure-helpers/resourcemanager/zones" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type ListChannelWithKeysResponse struct { + ChangedTime *string `json:"changedTime,omitempty"` + EntityTag *string `json:"entityTag,omitempty"` + Etag *string `json:"etag,omitempty"` + Id *string `json:"id,omitempty"` + Kind *Kind `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Properties Channel `json:"properties"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Resource Channel `json:"resource"` + Setting *ChannelSettings `json:"setting,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Tags *map[string]string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Zones *zones.Schema `json:"zones,omitempty"` +} + +var _ json.Unmarshaler = &ListChannelWithKeysResponse{} + +func (s *ListChannelWithKeysResponse) UnmarshalJSON(bytes []byte) error { + type alias ListChannelWithKeysResponse + var decoded alias + if err := json.Unmarshal(bytes, &decoded); err != nil { + return fmt.Errorf("unmarshaling into ListChannelWithKeysResponse: %+v", err) + } + + s.ChangedTime = decoded.ChangedTime + s.EntityTag = decoded.EntityTag + s.Etag = decoded.Etag + s.Id = decoded.Id + s.Kind = decoded.Kind + s.Location = decoded.Location + s.Name = decoded.Name + s.ProvisioningState = decoded.ProvisioningState + s.Setting = decoded.Setting + s.Sku = decoded.Sku + s.Tags = decoded.Tags + s.Type = decoded.Type + s.Zones = decoded.Zones + + var temp map[string]json.RawMessage + if err := json.Unmarshal(bytes, &temp); err != nil { + return fmt.Errorf("unmarshaling ListChannelWithKeysResponse into map[string]json.RawMessage: %+v", err) + } + + if v, ok := temp["properties"]; ok { + impl, err := unmarshalChannelImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Properties' for 'ListChannelWithKeysResponse': %+v", err) + } + s.Properties = impl + } + + if v, ok := temp["resource"]; ok { + impl, err := unmarshalChannelImplementation(v) + if err != nil { + return fmt.Errorf("unmarshaling field 'Resource' for 'ListChannelWithKeysResponse': %+v", err) + } + s.Resource = impl + } + return nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_m365extensions.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_m365extensions.go new file mode 100644 index 000000000000..4d2516e0e5fc --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_m365extensions.go @@ -0,0 +1,43 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = M365Extensions{} + +type M365Extensions struct { + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = M365Extensions{} + +func (s M365Extensions) MarshalJSON() ([]byte, error) { + type wrapper M365Extensions + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling M365Extensions: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling M365Extensions: %+v", err) + } + decoded["channelName"] = "M365Extensions" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling M365Extensions: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_msteamschannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_msteamschannel.go new file mode 100644 index 000000000000..b4db62b5c4e2 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_msteamschannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = MsTeamsChannel{} + +type MsTeamsChannel struct { + Properties *MsTeamsChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = MsTeamsChannel{} + +func (s MsTeamsChannel) MarshalJSON() ([]byte, error) { + type wrapper MsTeamsChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling MsTeamsChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling MsTeamsChannel: %+v", err) + } + decoded["channelName"] = "MsTeamsChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling MsTeamsChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_msteamschannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_msteamschannelproperties.go new file mode 100644 index 000000000000..801d7c34ced9 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_msteamschannelproperties.go @@ -0,0 +1,13 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type MsTeamsChannelProperties struct { + AcceptedTerms *bool `json:"acceptedTerms,omitempty"` + CallingWebhook *string `json:"callingWebhook,omitempty"` + DeploymentEnvironment *string `json:"deploymentEnvironment,omitempty"` + EnableCalling *bool `json:"enableCalling,omitempty"` + IncomingCallRoute *string `json:"incomingCallRoute,omitempty"` + IsEnabled bool `json:"isEnabled"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_omnichannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_omnichannel.go new file mode 100644 index 000000000000..a9be4c567feb --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_omnichannel.go @@ -0,0 +1,43 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = Omnichannel{} + +type Omnichannel struct { + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = Omnichannel{} + +func (s Omnichannel) MarshalJSON() ([]byte, error) { + type wrapper Omnichannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling Omnichannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling Omnichannel: %+v", err) + } + decoded["channelName"] = "Omnichannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling Omnichannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_outlookchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_outlookchannel.go new file mode 100644 index 000000000000..a728f9f7fb69 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_outlookchannel.go @@ -0,0 +1,43 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = OutlookChannel{} + +type OutlookChannel struct { + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = OutlookChannel{} + +func (s OutlookChannel) MarshalJSON() ([]byte, error) { + type wrapper OutlookChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling OutlookChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling OutlookChannel: %+v", err) + } + decoded["channelName"] = "OutlookChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling OutlookChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_searchassistant.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_searchassistant.go new file mode 100644 index 000000000000..fe4ffe451ffd --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_searchassistant.go @@ -0,0 +1,43 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = SearchAssistant{} + +type SearchAssistant struct { + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = SearchAssistant{} + +func (s SearchAssistant) MarshalJSON() ([]byte, error) { + type wrapper SearchAssistant + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SearchAssistant: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SearchAssistant: %+v", err) + } + decoded["channelName"] = "SearchAssistant" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SearchAssistant: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_site.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_site.go new file mode 100644 index 000000000000..7c05b4d9cc80 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_site.go @@ -0,0 +1,26 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Site struct { + AppId *string `json:"appId,omitempty"` + ETag *string `json:"eTag,omitempty"` + IsBlockUserUploadEnabled *bool `json:"isBlockUserUploadEnabled,omitempty"` + IsDetailedLoggingEnabled *bool `json:"isDetailedLoggingEnabled,omitempty"` + IsEnabled bool `json:"isEnabled"` + IsEndpointParametersEnabled *bool `json:"isEndpointParametersEnabled,omitempty"` + IsNoStorageEnabled *bool `json:"isNoStorageEnabled,omitempty"` + IsSecureSiteEnabled *bool `json:"isSecureSiteEnabled,omitempty"` + IsTokenEnabled *bool `json:"isTokenEnabled,omitempty"` + IsV1Enabled *bool `json:"isV1Enabled,omitempty"` + IsV3Enabled *bool `json:"isV3Enabled,omitempty"` + IsWebChatSpeechEnabled *bool `json:"isWebChatSpeechEnabled,omitempty"` + IsWebchatPreviewEnabled *bool `json:"isWebchatPreviewEnabled,omitempty"` + Key *string `json:"key,omitempty"` + Key2 *string `json:"key2,omitempty"` + SiteId *string `json:"siteId,omitempty"` + SiteName string `json:"siteName"` + TenantId *string `json:"tenantId,omitempty"` + TrustedOrigins *[]string `json:"trustedOrigins,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_siteinfo.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_siteinfo.go new file mode 100644 index 000000000000..eba3f9fb5313 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_siteinfo.go @@ -0,0 +1,9 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SiteInfo struct { + Key Key `json:"key"` + SiteName string `json:"siteName"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_sku.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_sku.go new file mode 100644 index 000000000000..4280661d309d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_sku.go @@ -0,0 +1,9 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type Sku struct { + Name SkuName `json:"name"` + Tier *SkuTier `json:"tier,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_skypechannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_skypechannel.go new file mode 100644 index 000000000000..2068c22c2952 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_skypechannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = SkypeChannel{} + +type SkypeChannel struct { + Properties *SkypeChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = SkypeChannel{} + +func (s SkypeChannel) MarshalJSON() ([]byte, error) { + type wrapper SkypeChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SkypeChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SkypeChannel: %+v", err) + } + decoded["channelName"] = "SkypeChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SkypeChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_skypechannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_skypechannelproperties.go new file mode 100644 index 000000000000..ae1c7ee98a9e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_skypechannelproperties.go @@ -0,0 +1,17 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SkypeChannelProperties struct { + CallingWebHook *string `json:"callingWebHook,omitempty"` + EnableCalling *bool `json:"enableCalling,omitempty"` + EnableGroups *bool `json:"enableGroups,omitempty"` + EnableMediaCards *bool `json:"enableMediaCards,omitempty"` + EnableMessaging *bool `json:"enableMessaging,omitempty"` + EnableScreenSharing *bool `json:"enableScreenSharing,omitempty"` + EnableVideo *bool `json:"enableVideo,omitempty"` + GroupsMode *string `json:"groupsMode,omitempty"` + IncomingCallRoute *string `json:"incomingCallRoute,omitempty"` + IsEnabled bool `json:"isEnabled"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_slackchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_slackchannel.go new file mode 100644 index 000000000000..09841770a7db --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_slackchannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = SlackChannel{} + +type SlackChannel struct { + Properties *SlackChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = SlackChannel{} + +func (s SlackChannel) MarshalJSON() ([]byte, error) { + type wrapper SlackChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SlackChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SlackChannel: %+v", err) + } + decoded["channelName"] = "SlackChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SlackChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_slackchannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_slackchannelproperties.go new file mode 100644 index 000000000000..b72f28e781ba --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_slackchannelproperties.go @@ -0,0 +1,18 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SlackChannelProperties struct { + ClientId *string `json:"clientId,omitempty"` + ClientSecret *string `json:"clientSecret,omitempty"` + IsEnabled bool `json:"isEnabled"` + IsValidated *bool `json:"IsValidated,omitempty"` + LandingPageUrl *string `json:"landingPageUrl,omitempty"` + LastSubmissionId *string `json:"lastSubmissionId,omitempty"` + RedirectAction *string `json:"redirectAction,omitempty"` + RegisterBeforeOAuthFlow *bool `json:"registerBeforeOAuthFlow,omitempty"` + Scopes *string `json:"scopes,omitempty"` + SigningSecret *string `json:"signingSecret,omitempty"` + VerificationToken *string `json:"verificationToken,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_smschannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_smschannel.go new file mode 100644 index 000000000000..94323e141d32 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_smschannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = SmsChannel{} + +type SmsChannel struct { + Properties *SmsChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = SmsChannel{} + +func (s SmsChannel) MarshalJSON() ([]byte, error) { + type wrapper SmsChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling SmsChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling SmsChannel: %+v", err) + } + decoded["channelName"] = "SmsChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling SmsChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_smschannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_smschannelproperties.go new file mode 100644 index 000000000000..b0b4a1c0726d --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_smschannelproperties.go @@ -0,0 +1,12 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type SmsChannelProperties struct { + AccountSID string `json:"accountSID"` + AuthToken *string `json:"authToken,omitempty"` + IsEnabled bool `json:"isEnabled"` + IsValidated *bool `json:"isValidated,omitempty"` + Phone string `json:"phone"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telegramchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telegramchannel.go new file mode 100644 index 000000000000..716bae275a3e --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telegramchannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = TelegramChannel{} + +type TelegramChannel struct { + Properties *TelegramChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = TelegramChannel{} + +func (s TelegramChannel) MarshalJSON() ([]byte, error) { + type wrapper TelegramChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TelegramChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TelegramChannel: %+v", err) + } + decoded["channelName"] = "TelegramChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TelegramChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telegramchannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telegramchannelproperties.go new file mode 100644 index 000000000000..ce1e00fa33cf --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telegramchannelproperties.go @@ -0,0 +1,10 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TelegramChannelProperties struct { + AccessToken *string `json:"accessToken,omitempty"` + IsEnabled bool `json:"isEnabled"` + IsValidated *bool `json:"isValidated,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannel.go new file mode 100644 index 000000000000..73f48a01685c --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = TelephonyChannel{} + +type TelephonyChannel struct { + Properties *TelephonyChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = TelephonyChannel{} + +func (s TelephonyChannel) MarshalJSON() ([]byte, error) { + type wrapper TelephonyChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling TelephonyChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling TelephonyChannel: %+v", err) + } + decoded["channelName"] = "TelephonyChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling TelephonyChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannelproperties.go new file mode 100644 index 000000000000..9b12bdb3d392 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannelproperties.go @@ -0,0 +1,14 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TelephonyChannelProperties struct { + ApiConfigurations *[]TelephonyChannelResourceApiConfiguration `json:"apiConfigurations,omitempty"` + CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"` + CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"` + DefaultLocale *string `json:"defaultLocale,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` + PhoneNumbers *[]TelephonyPhoneNumbers `json:"phoneNumbers,omitempty"` + PremiumSKU *string `json:"premiumSKU,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannelresourceapiconfiguration.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannelresourceapiconfiguration.go new file mode 100644 index 000000000000..6b5fa31f0c24 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonychannelresourceapiconfiguration.go @@ -0,0 +1,13 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TelephonyChannelResourceApiConfiguration struct { + CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"` + CognitiveServiceResourceId *string `json:"cognitiveServiceResourceId,omitempty"` + CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"` + DefaultLocale *string `json:"defaultLocale,omitempty"` + Id *string `json:"id,omitempty"` + ProviderName *string `json:"providerName,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonyphonenumbers.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonyphonenumbers.go new file mode 100644 index 000000000000..16417c014f79 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_telephonyphonenumbers.go @@ -0,0 +1,17 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type TelephonyPhoneNumbers struct { + AcsEndpoint *string `json:"acsEndpoint,omitempty"` + AcsResourceId *string `json:"acsResourceId,omitempty"` + AcsSecret *string `json:"acsSecret,omitempty"` + CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"` + CognitiveServiceResourceId *string `json:"cognitiveServiceResourceId,omitempty"` + CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"` + DefaultLocale *string `json:"defaultLocale,omitempty"` + Id *string `json:"id,omitempty"` + OfferType *string `json:"offerType,omitempty"` + PhoneNumber *string `json:"phoneNumber,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_webchatchannel.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_webchatchannel.go new file mode 100644 index 000000000000..38a968de3152 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_webchatchannel.go @@ -0,0 +1,44 @@ +package channel + +import ( + "encoding/json" + "fmt" +) + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +var _ Channel = WebChatChannel{} + +type WebChatChannel struct { + Properties *WebChatChannelProperties `json:"properties,omitempty"` + + // Fields inherited from Channel + Etag *string `json:"etag,omitempty"` + Location *string `json:"location,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +var _ json.Marshaler = WebChatChannel{} + +func (s WebChatChannel) MarshalJSON() ([]byte, error) { + type wrapper WebChatChannel + wrapped := wrapper(s) + encoded, err := json.Marshal(wrapped) + if err != nil { + return nil, fmt.Errorf("marshaling WebChatChannel: %+v", err) + } + + var decoded map[string]interface{} + if err := json.Unmarshal(encoded, &decoded); err != nil { + return nil, fmt.Errorf("unmarshaling WebChatChannel: %+v", err) + } + decoded["channelName"] = "WebChatChannel" + + encoded, err = json.Marshal(decoded) + if err != nil { + return nil, fmt.Errorf("re-marshaling WebChatChannel: %+v", err) + } + + return encoded, nil +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_webchatchannelproperties.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_webchatchannelproperties.go new file mode 100644 index 000000000000..859f2a814692 --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/model_webchatchannelproperties.go @@ -0,0 +1,9 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type WebChatChannelProperties struct { + Sites *[]Site `json:"sites,omitempty"` + WebChatEmbedCode *string `json:"webChatEmbedCode,omitempty"` +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/predicates.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/predicates.go new file mode 100644 index 000000000000..53a2a75cbf9b --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/predicates.go @@ -0,0 +1,37 @@ +package channel + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +type BotChannelOperationPredicate struct { + Etag *string + Id *string + Location *string + Name *string + Type *string +} + +func (p BotChannelOperationPredicate) Matches(input BotChannel) bool { + + if p.Etag != nil && (input.Etag == nil || *p.Etag != *input.Etag) { + return false + } + + if p.Id != nil && (input.Id == nil || *p.Id != *input.Id) { + return false + } + + if p.Location != nil && (input.Location == nil || *p.Location != *input.Location) { + return false + } + + if p.Name != nil && (input.Name == nil || *p.Name != *input.Name) { + return false + } + + if p.Type != nil && (input.Type == nil || *p.Type != *input.Type) { + return false + } + + return true +} diff --git a/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/version.go b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/version.go new file mode 100644 index 000000000000..e57afa51cb6f --- /dev/null +++ b/vendor/github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel/version.go @@ -0,0 +1,12 @@ +package channel + +import "fmt" + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See NOTICE.txt in the project root for license information. + +const defaultApiVersion = "2022-09-15" + +func userAgent() string { + return fmt.Sprintf("hashicorp/go-azure-sdk/channel/%s", defaultApiVersion) +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 43c1af2cedfe..595ea7a86342 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -288,6 +288,7 @@ github.com/hashicorp/go-azure-sdk/resource-manager/batch/2023-05-01/pool github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/assignment github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/blueprint github.com/hashicorp/go-azure-sdk/resource-manager/blueprints/2018-11-01-preview/publishedblueprint +github.com/hashicorp/go-azure-sdk/resource-manager/botservice/2022-09-15/channel github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01 github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/capabilities github.com/hashicorp/go-azure-sdk/resource-manager/chaosstudio/2023-11-01/capabilitytypes