package botservice

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"context"
	"encoding/json"
	"net/http"

	"github.com/Azure/go-autorest/autorest"
	"github.com/Azure/go-autorest/autorest/azure"
	"github.com/Azure/go-autorest/autorest/date"
	"github.com/Azure/go-autorest/autorest/to"
	"github.com/Azure/go-autorest/tracing"
)

// The package's fully qualified name.
const fqdn = "home/runner/work/kermit/kermit/sdk/botservice/2021-05-01-preview/botservice"

// AcsChatChannel acsChat channel definition
type AcsChatChannel struct {
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for AcsChatChannel.
func (acc AcsChatChannel) MarshalJSON() ([]byte, error) {
	acc.ChannelName = ChannelNameBasicChannelChannelNameAcsChatChannel
	objectMap := make(map[string]interface{})
	if acc.Etag != nil {
		objectMap["etag"] = acc.Etag
	}
	if acc.Location != nil {
		objectMap["location"] = acc.Location
	}
	if acc.ChannelName != "" {
		objectMap["channelName"] = acc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return &acc, true
}

// AsSearchAssistant is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for AcsChatChannel.
func (acc AcsChatChannel) AsBasicChannel() (BasicChannel, bool) {
	return &acc, true
}

// AlexaChannel alexa channel definition
type AlexaChannel struct {
	// Properties - The set of properties specific to Alexa channel resource
	Properties *AlexaChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for AlexaChannel.
func (ac AlexaChannel) MarshalJSON() ([]byte, error) {
	ac.ChannelName = ChannelNameBasicChannelChannelNameAlexaChannel
	objectMap := make(map[string]interface{})
	if ac.Properties != nil {
		objectMap["properties"] = ac.Properties
	}
	if ac.Etag != nil {
		objectMap["etag"] = ac.Etag
	}
	if ac.Location != nil {
		objectMap["location"] = ac.Location
	}
	if ac.ChannelName != "" {
		objectMap["channelName"] = ac.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return &ac, true
}

// AsFacebookChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for AlexaChannel.
func (ac AlexaChannel) AsBasicChannel() (BasicChannel, bool) {
	return &ac, true
}

// AlexaChannelProperties the parameters to provide for the Alexa channel.
type AlexaChannelProperties struct {
	// AlexaSkillID - The Alexa skill Id
	AlexaSkillID *string `json:"alexaSkillId,omitempty"`
	// URLFragment - READ-ONLY; Url fragment used in part of the Uri configured in Alexa
	URLFragment *string `json:"urlFragment,omitempty"`
	// ServiceEndpointURI - READ-ONLY; Full Uri used to configured the skill in Alexa
	ServiceEndpointURI *string `json:"serviceEndpointUri,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// MarshalJSON is the custom marshaler for AlexaChannelProperties.
func (acp AlexaChannelProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if acp.AlexaSkillID != nil {
		objectMap["alexaSkillId"] = acp.AlexaSkillID
	}
	if acp.IsEnabled != nil {
		objectMap["isEnabled"] = acp.IsEnabled
	}
	return json.Marshal(objectMap)
}

// Bot bot resource definition
type Bot struct {
	autorest.Response `json:"-"`
	// Properties - The set of properties specific to bot resource
	Properties *BotProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Specifies the resource ID.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Specifies the name of the resource.
	Name *string `json:"name,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// Type - READ-ONLY; Specifies the type of the resource.
	Type *string `json:"type,omitempty"`
	// Tags - Contains resource tags defined as key/value pairs.
	Tags map[string]*string `json:"tags"`
	// Sku - Gets or sets the SKU of the resource.
	Sku *Sku `json:"sku,omitempty"`
	// Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction', 'KindAzurebot'
	Kind Kind `json:"kind,omitempty"`
	// Etag - Entity Tag.
	Etag *string `json:"etag,omitempty"`
	// Zones - READ-ONLY; Entity zones
	Zones *[]string `json:"zones,omitempty"`
}

// MarshalJSON is the custom marshaler for Bot.
func (b Bot) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if b.Properties != nil {
		objectMap["properties"] = b.Properties
	}
	if b.Location != nil {
		objectMap["location"] = b.Location
	}
	if b.Tags != nil {
		objectMap["tags"] = b.Tags
	}
	if b.Sku != nil {
		objectMap["sku"] = b.Sku
	}
	if b.Kind != "" {
		objectMap["kind"] = b.Kind
	}
	if b.Etag != nil {
		objectMap["etag"] = b.Etag
	}
	return json.Marshal(objectMap)
}

// BotChannel bot channel resource definition
type BotChannel struct {
	autorest.Response `json:"-"`
	// Properties - The set of properties specific to bot channel resource
	Properties BasicChannel `json:"properties,omitempty"`
	// ID - READ-ONLY; Specifies the resource ID.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Specifies the name of the resource.
	Name *string `json:"name,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// Type - READ-ONLY; Specifies the type of the resource.
	Type *string `json:"type,omitempty"`
	// Tags - Contains resource tags defined as key/value pairs.
	Tags map[string]*string `json:"tags"`
	// Sku - Gets or sets the SKU of the resource.
	Sku *Sku `json:"sku,omitempty"`
	// Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction', 'KindAzurebot'
	Kind Kind `json:"kind,omitempty"`
	// Etag - Entity Tag.
	Etag *string `json:"etag,omitempty"`
	// Zones - READ-ONLY; Entity zones
	Zones *[]string `json:"zones,omitempty"`
}

// MarshalJSON is the custom marshaler for BotChannel.
func (bc BotChannel) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	objectMap["properties"] = bc.Properties
	if bc.Location != nil {
		objectMap["location"] = bc.Location
	}
	if bc.Tags != nil {
		objectMap["tags"] = bc.Tags
	}
	if bc.Sku != nil {
		objectMap["sku"] = bc.Sku
	}
	if bc.Kind != "" {
		objectMap["kind"] = bc.Kind
	}
	if bc.Etag != nil {
		objectMap["etag"] = bc.Etag
	}
	return json.Marshal(objectMap)
}

// UnmarshalJSON is the custom unmarshaler for BotChannel struct.
func (bc *BotChannel) UnmarshalJSON(body []byte) error {
	var m map[string]*json.RawMessage
	err := json.Unmarshal(body, &m)
	if err != nil {
		return err
	}
	for k, v := range m {
		switch k {
		case "properties":
			if v != nil {
				properties, err := unmarshalBasicChannel(*v)
				if err != nil {
					return err
				}
				bc.Properties = properties
			}
		case "id":
			if v != nil {
				var ID string
				err = json.Unmarshal(*v, &ID)
				if err != nil {
					return err
				}
				bc.ID = &ID
			}
		case "name":
			if v != nil {
				var name string
				err = json.Unmarshal(*v, &name)
				if err != nil {
					return err
				}
				bc.Name = &name
			}
		case "location":
			if v != nil {
				var location string
				err = json.Unmarshal(*v, &location)
				if err != nil {
					return err
				}
				bc.Location = &location
			}
		case "type":
			if v != nil {
				var typeVar string
				err = json.Unmarshal(*v, &typeVar)
				if err != nil {
					return err
				}
				bc.Type = &typeVar
			}
		case "tags":
			if v != nil {
				var tags map[string]*string
				err = json.Unmarshal(*v, &tags)
				if err != nil {
					return err
				}
				bc.Tags = tags
			}
		case "sku":
			if v != nil {
				var sku Sku
				err = json.Unmarshal(*v, &sku)
				if err != nil {
					return err
				}
				bc.Sku = &sku
			}
		case "kind":
			if v != nil {
				var kind Kind
				err = json.Unmarshal(*v, &kind)
				if err != nil {
					return err
				}
				bc.Kind = kind
			}
		case "etag":
			if v != nil {
				var etag string
				err = json.Unmarshal(*v, &etag)
				if err != nil {
					return err
				}
				bc.Etag = &etag
			}
		case "zones":
			if v != nil {
				var zones []string
				err = json.Unmarshal(*v, &zones)
				if err != nil {
					return err
				}
				bc.Zones = &zones
			}
		}
	}

	return nil
}

// BotProperties the parameters to provide for the Bot.
type BotProperties struct {
	// DisplayName - The Name of the bot
	DisplayName *string `json:"displayName,omitempty"`
	// Description - The description of the bot
	Description *string `json:"description,omitempty"`
	// IconURL - The Icon Url of the bot
	IconURL *string `json:"iconUrl,omitempty"`
	// Endpoint - The bot's endpoint
	Endpoint *string `json:"endpoint,omitempty"`
	// EndpointVersion - READ-ONLY; The bot's endpoint version
	EndpointVersion *string `json:"endpointVersion,omitempty"`
	// AllSettings - Contains resource all settings defined as key/value pairs.
	AllSettings map[string]*string `json:"allSettings"`
	// Parameters - Contains resource parameters defined as key/value pairs.
	Parameters map[string]*string `json:"parameters"`
	// ManifestURL - The bot's manifest url
	ManifestURL *string `json:"manifestUrl,omitempty"`
	// MsaAppType - Microsoft App Type for the bot. Possible values include: 'MsaAppTypeUserAssignedMSI', 'MsaAppTypeSingleTenant', 'MsaAppTypeMultiTenant'
	MsaAppType MsaAppType `json:"msaAppType,omitempty"`
	// MsaAppID - Microsoft App Id for the bot
	MsaAppID *string `json:"msaAppId,omitempty"`
	// MsaAppTenantID - Microsoft App Tenant Id for the bot
	MsaAppTenantID *string `json:"msaAppTenantId,omitempty"`
	// MsaAppMSIResourceID - Microsoft App Managed Identity Resource Id for the bot
	MsaAppMSIResourceID *string `json:"msaAppMSIResourceId,omitempty"`
	// ConfiguredChannels - READ-ONLY; Collection of channels for which the bot is configured
	ConfiguredChannels *[]string `json:"configuredChannels,omitempty"`
	// EnabledChannels - READ-ONLY; Collection of channels for which the bot is enabled
	EnabledChannels *[]string `json:"enabledChannels,omitempty"`
	// DeveloperAppInsightKey - The Application Insights key
	DeveloperAppInsightKey *string `json:"developerAppInsightKey,omitempty"`
	// DeveloperAppInsightsAPIKey - The Application Insights Api Key
	DeveloperAppInsightsAPIKey *string `json:"developerAppInsightsApiKey,omitempty"`
	// DeveloperAppInsightsApplicationID - The Application Insights App Id
	DeveloperAppInsightsApplicationID *string `json:"developerAppInsightsApplicationId,omitempty"`
	// LuisAppIds - Collection of LUIS App Ids
	LuisAppIds *[]string `json:"luisAppIds,omitempty"`
	// LuisKey - The LUIS Key
	LuisKey *string `json:"luisKey,omitempty"`
	// IsCmekEnabled - Whether Cmek is enabled
	IsCmekEnabled *bool `json:"isCmekEnabled,omitempty"`
	// CmekKeyVaultURL - The CMK Url
	CmekKeyVaultURL *string `json:"cmekKeyVaultUrl,omitempty"`
	// CmekEncryptionStatus - READ-ONLY; The CMK encryption status
	CmekEncryptionStatus *string `json:"cmekEncryptionStatus,omitempty"`
	// TenantID - The Tenant Id for the bot
	TenantID *string `json:"tenantId,omitempty"`
	// PublicNetworkAccess - Whether the bot is in an isolated network. Possible values include: 'PublicNetworkAccessEnabled', 'PublicNetworkAccessDisabled'
	PublicNetworkAccess PublicNetworkAccess `json:"publicNetworkAccess,omitempty"`
	// IsStreamingSupported - Whether the bot is streaming supported
	IsStreamingSupported *bool `json:"isStreamingSupported,omitempty"`
	// IsDeveloperAppInsightsAPIKeySet - READ-ONLY; Whether the bot is developerAppInsightsApiKey set
	IsDeveloperAppInsightsAPIKeySet *bool `json:"isDeveloperAppInsightsApiKeySet,omitempty"`
	// MigrationToken - READ-ONLY; Token used to migrate non Azure bot to azure subscription
	MigrationToken *string `json:"migrationToken,omitempty"`
	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
	// SchemaTransformationVersion - The channel schema transformation version for the bot
	SchemaTransformationVersion *string `json:"schemaTransformationVersion,omitempty"`
	// StorageResourceID - The storage resourceId for the bot
	StorageResourceID *string `json:"storageResourceId,omitempty"`
	// PrivateEndpointConnections - READ-ONLY; List of Private Endpoint Connections configured for the bot
	PrivateEndpointConnections *[]PrivateEndpointConnection `json:"privateEndpointConnections,omitempty"`
	// OpenWithHint - The hint to browser (e.g. protocol handler) on how to open the bot for authoring
	OpenWithHint *string `json:"openWithHint,omitempty"`
	// AppPasswordHint - The hint (e.g. keyVault secret resourceId) on how to fetch the app secret
	AppPasswordHint *string `json:"appPasswordHint,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// PublishingCredentials - Publishing credentials of the resource
	PublishingCredentials *string `json:"publishingCredentials,omitempty"`
}

// MarshalJSON is the custom marshaler for BotProperties.
func (bp BotProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if bp.DisplayName != nil {
		objectMap["displayName"] = bp.DisplayName
	}
	if bp.Description != nil {
		objectMap["description"] = bp.Description
	}
	if bp.IconURL != nil {
		objectMap["iconUrl"] = bp.IconURL
	}
	if bp.Endpoint != nil {
		objectMap["endpoint"] = bp.Endpoint
	}
	if bp.AllSettings != nil {
		objectMap["allSettings"] = bp.AllSettings
	}
	if bp.Parameters != nil {
		objectMap["parameters"] = bp.Parameters
	}
	if bp.ManifestURL != nil {
		objectMap["manifestUrl"] = bp.ManifestURL
	}
	if bp.MsaAppType != "" {
		objectMap["msaAppType"] = bp.MsaAppType
	}
	if bp.MsaAppID != nil {
		objectMap["msaAppId"] = bp.MsaAppID
	}
	if bp.MsaAppTenantID != nil {
		objectMap["msaAppTenantId"] = bp.MsaAppTenantID
	}
	if bp.MsaAppMSIResourceID != nil {
		objectMap["msaAppMSIResourceId"] = bp.MsaAppMSIResourceID
	}
	if bp.DeveloperAppInsightKey != nil {
		objectMap["developerAppInsightKey"] = bp.DeveloperAppInsightKey
	}
	if bp.DeveloperAppInsightsAPIKey != nil {
		objectMap["developerAppInsightsApiKey"] = bp.DeveloperAppInsightsAPIKey
	}
	if bp.DeveloperAppInsightsApplicationID != nil {
		objectMap["developerAppInsightsApplicationId"] = bp.DeveloperAppInsightsApplicationID
	}
	if bp.LuisAppIds != nil {
		objectMap["luisAppIds"] = bp.LuisAppIds
	}
	if bp.LuisKey != nil {
		objectMap["luisKey"] = bp.LuisKey
	}
	if bp.IsCmekEnabled != nil {
		objectMap["isCmekEnabled"] = bp.IsCmekEnabled
	}
	if bp.CmekKeyVaultURL != nil {
		objectMap["cmekKeyVaultUrl"] = bp.CmekKeyVaultURL
	}
	if bp.TenantID != nil {
		objectMap["tenantId"] = bp.TenantID
	}
	if bp.PublicNetworkAccess != "" {
		objectMap["publicNetworkAccess"] = bp.PublicNetworkAccess
	}
	if bp.IsStreamingSupported != nil {
		objectMap["isStreamingSupported"] = bp.IsStreamingSupported
	}
	if bp.DisableLocalAuth != nil {
		objectMap["disableLocalAuth"] = bp.DisableLocalAuth
	}
	if bp.SchemaTransformationVersion != nil {
		objectMap["schemaTransformationVersion"] = bp.SchemaTransformationVersion
	}
	if bp.StorageResourceID != nil {
		objectMap["storageResourceId"] = bp.StorageResourceID
	}
	if bp.OpenWithHint != nil {
		objectMap["openWithHint"] = bp.OpenWithHint
	}
	if bp.AppPasswordHint != nil {
		objectMap["appPasswordHint"] = bp.AppPasswordHint
	}
	if bp.PublishingCredentials != nil {
		objectMap["publishingCredentials"] = bp.PublishingCredentials
	}
	return json.Marshal(objectMap)
}

// BotResponseList the list of  bot service operation response.
type BotResponseList struct {
	autorest.Response `json:"-"`
	// NextLink - The link used to get the next page of bot service resources.
	NextLink *string `json:"nextLink,omitempty"`
	// Value - READ-ONLY; Gets the list of bot service results and their properties.
	Value *[]Bot `json:"value,omitempty"`
}

// MarshalJSON is the custom marshaler for BotResponseList.
func (brl BotResponseList) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if brl.NextLink != nil {
		objectMap["nextLink"] = brl.NextLink
	}
	return json.Marshal(objectMap)
}

// BotResponseListIterator provides access to a complete listing of Bot values.
type BotResponseListIterator struct {
	i    int
	page BotResponseListPage
}

// NextWithContext advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *BotResponseListIterator) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/BotResponseListIterator.NextWithContext")
		defer func() {
			sc := -1
			if iter.Response().Response.Response != nil {
				sc = iter.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	iter.i++
	if iter.i < len(iter.page.Values()) {
		return nil
	}
	err = iter.page.NextWithContext(ctx)
	if err != nil {
		iter.i--
		return err
	}
	iter.i = 0
	return nil
}

// Next advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *BotResponseListIterator) Next() error {
	return iter.NextWithContext(context.Background())
}

// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter BotResponseListIterator) NotDone() bool {
	return iter.page.NotDone() && iter.i < len(iter.page.Values())
}

// Response returns the raw server response from the last page request.
func (iter BotResponseListIterator) Response() BotResponseList {
	return iter.page.Response()
}

// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter BotResponseListIterator) Value() Bot {
	if !iter.page.NotDone() {
		return Bot{}
	}
	return iter.page.Values()[iter.i]
}

// Creates a new instance of the BotResponseListIterator type.
func NewBotResponseListIterator(page BotResponseListPage) BotResponseListIterator {
	return BotResponseListIterator{page: page}
}

// IsEmpty returns true if the ListResult contains no values.
func (brl BotResponseList) IsEmpty() bool {
	return brl.Value == nil || len(*brl.Value) == 0
}

// hasNextLink returns true if the NextLink is not empty.
func (brl BotResponseList) hasNextLink() bool {
	return brl.NextLink != nil && len(*brl.NextLink) != 0
}

// botResponseListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (brl BotResponseList) botResponseListPreparer(ctx context.Context) (*http.Request, error) {
	if !brl.hasNextLink() {
		return nil, nil
	}
	return autorest.Prepare((&http.Request{}).WithContext(ctx),
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(to.String(brl.NextLink)))
}

// BotResponseListPage contains a page of Bot values.
type BotResponseListPage struct {
	fn  func(context.Context, BotResponseList) (BotResponseList, error)
	brl BotResponseList
}

// NextWithContext advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
func (page *BotResponseListPage) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/BotResponseListPage.NextWithContext")
		defer func() {
			sc := -1
			if page.Response().Response.Response != nil {
				sc = page.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	for {
		next, err := page.fn(ctx, page.brl)
		if err != nil {
			return err
		}
		page.brl = next
		if !next.hasNextLink() || !next.IsEmpty() {
			break
		}
	}
	return nil
}

// Next advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *BotResponseListPage) Next() error {
	return page.NextWithContext(context.Background())
}

// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page BotResponseListPage) NotDone() bool {
	return !page.brl.IsEmpty()
}

// Response returns the raw server response from the last page request.
func (page BotResponseListPage) Response() BotResponseList {
	return page.brl
}

// Values returns the slice of values for the current page or nil if there are no values.
func (page BotResponseListPage) Values() []Bot {
	if page.brl.IsEmpty() {
		return nil
	}
	return *page.brl.Value
}

// Creates a new instance of the BotResponseListPage type.
func NewBotResponseListPage(cur BotResponseList, getNextPage func(context.Context, BotResponseList) (BotResponseList, error)) BotResponseListPage {
	return BotResponseListPage{
		fn:  getNextPage,
		brl: cur,
	}
}

// BasicChannel channel definition
type BasicChannel interface {
	AsAlexaChannel() (*AlexaChannel, bool)
	AsFacebookChannel() (*FacebookChannel, bool)
	AsEmailChannel() (*EmailChannel, bool)
	AsOutlookChannel() (*OutlookChannel, bool)
	AsMsTeamsChannel() (*MsTeamsChannel, bool)
	AsSkypeChannel() (*SkypeChannel, bool)
	AsKikChannel() (*KikChannel, bool)
	AsWebChatChannel() (*WebChatChannel, bool)
	AsDirectLineChannel() (*DirectLineChannel, bool)
	AsTelegramChannel() (*TelegramChannel, bool)
	AsSmsChannel() (*SmsChannel, bool)
	AsSlackChannel() (*SlackChannel, bool)
	AsLineChannel() (*LineChannel, bool)
	AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool)
	AsOmnichannel() (*Omnichannel, bool)
	AsTelephonyChannel() (*TelephonyChannel, bool)
	AsAcsChatChannel() (*AcsChatChannel, bool)
	AsSearchAssistant() (*SearchAssistant, bool)
	AsM365Extensions() (*M365Extensions, bool)
	AsChannel() (*Channel, bool)
}

// Channel channel definition
type Channel struct {
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

func unmarshalBasicChannel(body []byte) (BasicChannel, error) {
	var m map[string]interface{}
	err := json.Unmarshal(body, &m)
	if err != nil {
		return nil, err
	}

	switch m["channelName"] {
	case string(ChannelNameBasicChannelChannelNameAlexaChannel):
		var ac AlexaChannel
		err := json.Unmarshal(body, &ac)
		return ac, err
	case string(ChannelNameBasicChannelChannelNameFacebookChannel):
		var fc FacebookChannel
		err := json.Unmarshal(body, &fc)
		return fc, err
	case string(ChannelNameBasicChannelChannelNameEmailChannel):
		var ec EmailChannel
		err := json.Unmarshal(body, &ec)
		return ec, err
	case string(ChannelNameBasicChannelChannelNameOutlookChannel):
		var oc OutlookChannel
		err := json.Unmarshal(body, &oc)
		return oc, err
	case string(ChannelNameBasicChannelChannelNameMsTeamsChannel):
		var mtc MsTeamsChannel
		err := json.Unmarshal(body, &mtc)
		return mtc, err
	case string(ChannelNameBasicChannelChannelNameSkypeChannel):
		var sc SkypeChannel
		err := json.Unmarshal(body, &sc)
		return sc, err
	case string(ChannelNameBasicChannelChannelNameKikChannel):
		var kc KikChannel
		err := json.Unmarshal(body, &kc)
		return kc, err
	case string(ChannelNameBasicChannelChannelNameWebChatChannel):
		var wcc WebChatChannel
		err := json.Unmarshal(body, &wcc)
		return wcc, err
	case string(ChannelNameBasicChannelChannelNameDirectLineChannel):
		var dlc DirectLineChannel
		err := json.Unmarshal(body, &dlc)
		return dlc, err
	case string(ChannelNameBasicChannelChannelNameTelegramChannel):
		var tc TelegramChannel
		err := json.Unmarshal(body, &tc)
		return tc, err
	case string(ChannelNameBasicChannelChannelNameSmsChannel):
		var sc SmsChannel
		err := json.Unmarshal(body, &sc)
		return sc, err
	case string(ChannelNameBasicChannelChannelNameSlackChannel):
		var sc SlackChannel
		err := json.Unmarshal(body, &sc)
		return sc, err
	case string(ChannelNameBasicChannelChannelNameLineChannel):
		var lc LineChannel
		err := json.Unmarshal(body, &lc)
		return lc, err
	case string(ChannelNameBasicChannelChannelNameDirectLineSpeechChannel):
		var dlsc DirectLineSpeechChannel
		err := json.Unmarshal(body, &dlsc)
		return dlsc, err
	case string(ChannelNameBasicChannelChannelNameOmnichannel):
		var o Omnichannel
		err := json.Unmarshal(body, &o)
		return o, err
	case string(ChannelNameBasicChannelChannelNameTelephonyChannel):
		var tc TelephonyChannel
		err := json.Unmarshal(body, &tc)
		return tc, err
	case string(ChannelNameBasicChannelChannelNameAcsChatChannel):
		var acc AcsChatChannel
		err := json.Unmarshal(body, &acc)
		return acc, err
	case string(ChannelNameBasicChannelChannelNameSearchAssistant):
		var sa SearchAssistant
		err := json.Unmarshal(body, &sa)
		return sa, err
	case string(ChannelNameBasicChannelChannelNameM365Extensions):
		var me M365Extensions
		err := json.Unmarshal(body, &me)
		return me, err
	default:
		var c Channel
		err := json.Unmarshal(body, &c)
		return c, err
	}
}
func unmarshalBasicChannelArray(body []byte) ([]BasicChannel, error) {
	var rawMessages []*json.RawMessage
	err := json.Unmarshal(body, &rawMessages)
	if err != nil {
		return nil, err
	}

	cArray := make([]BasicChannel, len(rawMessages))

	for index, rawMessage := range rawMessages {
		c, err := unmarshalBasicChannel(*rawMessage)
		if err != nil {
			return nil, err
		}
		cArray[index] = c
	}
	return cArray, nil
}

// MarshalJSON is the custom marshaler for Channel.
func (c Channel) MarshalJSON() ([]byte, error) {
	c.ChannelName = ChannelNameBasicChannelChannelNameChannel
	objectMap := make(map[string]interface{})
	if c.Etag != nil {
		objectMap["etag"] = c.Etag
	}
	if c.Location != nil {
		objectMap["location"] = c.Location
	}
	if c.ChannelName != "" {
		objectMap["channelName"] = c.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for Channel.
func (c Channel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for Channel.
func (c Channel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for Channel.
func (c Channel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for Channel.
func (c Channel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for Channel.
func (c Channel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for Channel.
func (c Channel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for Channel.
func (c Channel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for Channel.
func (c Channel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for Channel.
func (c Channel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for Channel.
func (c Channel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for Channel.
func (c Channel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for Channel.
func (c Channel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for Channel.
func (c Channel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for Channel.
func (c Channel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for Channel.
func (c Channel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for Channel.
func (c Channel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for Channel.
func (c Channel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for Channel.
func (c Channel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for Channel.
func (c Channel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for Channel.
func (c Channel) AsChannel() (*Channel, bool) {
	return &c, true
}

// AsBasicChannel is the BasicChannel implementation for Channel.
func (c Channel) AsBasicChannel() (BasicChannel, bool) {
	return &c, true
}

// ChannelResponseList the list of bot service channel operation response.
type ChannelResponseList struct {
	autorest.Response `json:"-"`
	// NextLink - The link used to get the next page of bot service channel resources.
	NextLink *string `json:"nextLink,omitempty"`
	// Value - READ-ONLY; Gets the list of bot service channel results and their properties.
	Value *[]BotChannel `json:"value,omitempty"`
}

// MarshalJSON is the custom marshaler for ChannelResponseList.
func (crl ChannelResponseList) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if crl.NextLink != nil {
		objectMap["nextLink"] = crl.NextLink
	}
	return json.Marshal(objectMap)
}

// ChannelResponseListIterator provides access to a complete listing of BotChannel values.
type ChannelResponseListIterator struct {
	i    int
	page ChannelResponseListPage
}

// NextWithContext advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ChannelResponseListIterator) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/ChannelResponseListIterator.NextWithContext")
		defer func() {
			sc := -1
			if iter.Response().Response.Response != nil {
				sc = iter.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	iter.i++
	if iter.i < len(iter.page.Values()) {
		return nil
	}
	err = iter.page.NextWithContext(ctx)
	if err != nil {
		iter.i--
		return err
	}
	iter.i = 0
	return nil
}

// Next advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *ChannelResponseListIterator) Next() error {
	return iter.NextWithContext(context.Background())
}

// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ChannelResponseListIterator) NotDone() bool {
	return iter.page.NotDone() && iter.i < len(iter.page.Values())
}

// Response returns the raw server response from the last page request.
func (iter ChannelResponseListIterator) Response() ChannelResponseList {
	return iter.page.Response()
}

// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ChannelResponseListIterator) Value() BotChannel {
	if !iter.page.NotDone() {
		return BotChannel{}
	}
	return iter.page.Values()[iter.i]
}

// Creates a new instance of the ChannelResponseListIterator type.
func NewChannelResponseListIterator(page ChannelResponseListPage) ChannelResponseListIterator {
	return ChannelResponseListIterator{page: page}
}

// IsEmpty returns true if the ListResult contains no values.
func (crl ChannelResponseList) IsEmpty() bool {
	return crl.Value == nil || len(*crl.Value) == 0
}

// hasNextLink returns true if the NextLink is not empty.
func (crl ChannelResponseList) hasNextLink() bool {
	return crl.NextLink != nil && len(*crl.NextLink) != 0
}

// channelResponseListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (crl ChannelResponseList) channelResponseListPreparer(ctx context.Context) (*http.Request, error) {
	if !crl.hasNextLink() {
		return nil, nil
	}
	return autorest.Prepare((&http.Request{}).WithContext(ctx),
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(to.String(crl.NextLink)))
}

// ChannelResponseListPage contains a page of BotChannel values.
type ChannelResponseListPage struct {
	fn  func(context.Context, ChannelResponseList) (ChannelResponseList, error)
	crl ChannelResponseList
}

// NextWithContext advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
func (page *ChannelResponseListPage) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/ChannelResponseListPage.NextWithContext")
		defer func() {
			sc := -1
			if page.Response().Response.Response != nil {
				sc = page.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	for {
		next, err := page.fn(ctx, page.crl)
		if err != nil {
			return err
		}
		page.crl = next
		if !next.hasNextLink() || !next.IsEmpty() {
			break
		}
	}
	return nil
}

// Next advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *ChannelResponseListPage) Next() error {
	return page.NextWithContext(context.Background())
}

// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ChannelResponseListPage) NotDone() bool {
	return !page.crl.IsEmpty()
}

// Response returns the raw server response from the last page request.
func (page ChannelResponseListPage) Response() ChannelResponseList {
	return page.crl
}

// Values returns the slice of values for the current page or nil if there are no values.
func (page ChannelResponseListPage) Values() []BotChannel {
	if page.crl.IsEmpty() {
		return nil
	}
	return *page.crl.Value
}

// Creates a new instance of the ChannelResponseListPage type.
func NewChannelResponseListPage(cur ChannelResponseList, getNextPage func(context.Context, ChannelResponseList) (ChannelResponseList, error)) ChannelResponseListPage {
	return ChannelResponseListPage{
		fn:  getNextPage,
		crl: cur,
	}
}

// ChannelSettings channel settings definition
type ChannelSettings struct {
	// ExtensionKey1 - The extensionKey1
	ExtensionKey1 *string `json:"extensionKey1,omitempty"`
	// ExtensionKey2 - The extensionKey2
	ExtensionKey2 *string `json:"extensionKey2,omitempty"`
	// Sites - The list of sites
	Sites *[]Site `json:"sites,omitempty"`
	// ChannelID - The channel id
	ChannelID *string `json:"channelId,omitempty"`
	// ChannelDisplayName - The channel display name
	ChannelDisplayName *string `json:"channelDisplayName,omitempty"`
	// BotID - The bot id
	BotID *string `json:"botId,omitempty"`
	// BotIconURL - The bot icon url
	BotIconURL *string `json:"botIconUrl,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
	// DisableLocalAuth - Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication.
	DisableLocalAuth *bool `json:"disableLocalAuth,omitempty"`
	// RequireTermsAgreement - Whether customer needs to agree to new terms.
	RequireTermsAgreement *bool `json:"requireTermsAgreement,omitempty"`
}

// CheckNameAvailabilityRequestBody the request body for a request to Bot Service Management to check
// availability of a bot name.
type CheckNameAvailabilityRequestBody struct {
	// Name - the name of the bot for which availability needs to be checked.
	Name *string `json:"name,omitempty"`
	// Type - the type of the bot for which availability needs to be checked
	Type *string `json:"type,omitempty"`
}

// CheckNameAvailabilityResponseBody the response body returned for a request to Bot Service Management to
// check availability of a bot name.
type CheckNameAvailabilityResponseBody struct {
	autorest.Response `json:"-"`
	// Valid - indicates if the bot name is valid.
	Valid *bool `json:"valid,omitempty"`
	// Message - additional message from the bot management api showing why a bot name is not available
	Message *string `json:"message,omitempty"`
	// AbsCode - response code from ABS
	AbsCode *string `json:"absCode,omitempty"`
}

// ConnectionItemName the display name of a connection Item Setting registered with the Bot
type ConnectionItemName struct {
	// Name - READ-ONLY; Connection Item name that has been added in the API
	Name *string `json:"name,omitempty"`
}

// MarshalJSON is the custom marshaler for ConnectionItemName.
func (cin ConnectionItemName) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	return json.Marshal(objectMap)
}

// ConnectionSetting bot channel resource definition
type ConnectionSetting struct {
	autorest.Response `json:"-"`
	// Properties - The set of properties specific to bot channel resource
	Properties *ConnectionSettingProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Specifies the resource ID.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Specifies the name of the resource.
	Name *string `json:"name,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// Type - READ-ONLY; Specifies the type of the resource.
	Type *string `json:"type,omitempty"`
	// Tags - Contains resource tags defined as key/value pairs.
	Tags map[string]*string `json:"tags"`
	// Sku - Gets or sets the SKU of the resource.
	Sku *Sku `json:"sku,omitempty"`
	// Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction', 'KindAzurebot'
	Kind Kind `json:"kind,omitempty"`
	// Etag - Entity Tag.
	Etag *string `json:"etag,omitempty"`
	// Zones - READ-ONLY; Entity zones
	Zones *[]string `json:"zones,omitempty"`
}

// MarshalJSON is the custom marshaler for ConnectionSetting.
func (cs ConnectionSetting) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if cs.Properties != nil {
		objectMap["properties"] = cs.Properties
	}
	if cs.Location != nil {
		objectMap["location"] = cs.Location
	}
	if cs.Tags != nil {
		objectMap["tags"] = cs.Tags
	}
	if cs.Sku != nil {
		objectMap["sku"] = cs.Sku
	}
	if cs.Kind != "" {
		objectMap["kind"] = cs.Kind
	}
	if cs.Etag != nil {
		objectMap["etag"] = cs.Etag
	}
	return json.Marshal(objectMap)
}

// ConnectionSettingParameter extra Parameter in a Connection Setting Properties to indicate service
// provider specific properties
type ConnectionSettingParameter struct {
	// Key - Key for the Connection Setting Parameter.
	Key *string `json:"key,omitempty"`
	// Value - Value associated with the Connection Setting Parameter.
	Value *string `json:"value,omitempty"`
}

// ConnectionSettingProperties properties for a Connection Setting Item
type ConnectionSettingProperties struct {
	// ID - Id of the Connection Setting.
	ID *string `json:"id,omitempty"`
	// Name - Name of the Connection Setting.
	Name *string `json:"name,omitempty"`
	// ClientID - Client Id associated with the Connection Setting.
	ClientID *string `json:"clientId,omitempty"`
	// SettingID - READ-ONLY; Setting Id set by the service for the Connection Setting.
	SettingID *string `json:"settingId,omitempty"`
	// ClientSecret - Client Secret associated with the Connection Setting
	ClientSecret *string `json:"clientSecret,omitempty"`
	// Scopes - Scopes associated with the Connection Setting
	Scopes *string `json:"scopes,omitempty"`
	// ServiceProviderID - Service Provider Id associated with the Connection Setting
	ServiceProviderID *string `json:"serviceProviderId,omitempty"`
	// ServiceProviderDisplayName - Service Provider Display Name associated with the Connection Setting
	ServiceProviderDisplayName *string `json:"serviceProviderDisplayName,omitempty"`
	// Parameters - Service Provider Parameters associated with the Connection Setting
	Parameters *[]ConnectionSettingParameter `json:"parameters,omitempty"`
	// ProvisioningState - Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
}

// MarshalJSON is the custom marshaler for ConnectionSettingProperties.
func (csp ConnectionSettingProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if csp.ID != nil {
		objectMap["id"] = csp.ID
	}
	if csp.Name != nil {
		objectMap["name"] = csp.Name
	}
	if csp.ClientID != nil {
		objectMap["clientId"] = csp.ClientID
	}
	if csp.ClientSecret != nil {
		objectMap["clientSecret"] = csp.ClientSecret
	}
	if csp.Scopes != nil {
		objectMap["scopes"] = csp.Scopes
	}
	if csp.ServiceProviderID != nil {
		objectMap["serviceProviderId"] = csp.ServiceProviderID
	}
	if csp.ServiceProviderDisplayName != nil {
		objectMap["serviceProviderDisplayName"] = csp.ServiceProviderDisplayName
	}
	if csp.Parameters != nil {
		objectMap["parameters"] = csp.Parameters
	}
	if csp.ProvisioningState != nil {
		objectMap["provisioningState"] = csp.ProvisioningState
	}
	return json.Marshal(objectMap)
}

// ConnectionSettingResponseList the list of bot service connection settings response.
type ConnectionSettingResponseList struct {
	autorest.Response `json:"-"`
	// NextLink - The link used to get the next page of bot service connection setting resources.
	NextLink *string `json:"nextLink,omitempty"`
	// Value - READ-ONLY; Gets the list of bot service connection settings and their properties.
	Value *[]ConnectionSetting `json:"value,omitempty"`
}

// MarshalJSON is the custom marshaler for ConnectionSettingResponseList.
func (csrl ConnectionSettingResponseList) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if csrl.NextLink != nil {
		objectMap["nextLink"] = csrl.NextLink
	}
	return json.Marshal(objectMap)
}

// ConnectionSettingResponseListIterator provides access to a complete listing of ConnectionSetting values.
type ConnectionSettingResponseListIterator struct {
	i    int
	page ConnectionSettingResponseListPage
}

// NextWithContext advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ConnectionSettingResponseListIterator) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionSettingResponseListIterator.NextWithContext")
		defer func() {
			sc := -1
			if iter.Response().Response.Response != nil {
				sc = iter.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	iter.i++
	if iter.i < len(iter.page.Values()) {
		return nil
	}
	err = iter.page.NextWithContext(ctx)
	if err != nil {
		iter.i--
		return err
	}
	iter.i = 0
	return nil
}

// Next advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *ConnectionSettingResponseListIterator) Next() error {
	return iter.NextWithContext(context.Background())
}

// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ConnectionSettingResponseListIterator) NotDone() bool {
	return iter.page.NotDone() && iter.i < len(iter.page.Values())
}

// Response returns the raw server response from the last page request.
func (iter ConnectionSettingResponseListIterator) Response() ConnectionSettingResponseList {
	return iter.page.Response()
}

// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ConnectionSettingResponseListIterator) Value() ConnectionSetting {
	if !iter.page.NotDone() {
		return ConnectionSetting{}
	}
	return iter.page.Values()[iter.i]
}

// Creates a new instance of the ConnectionSettingResponseListIterator type.
func NewConnectionSettingResponseListIterator(page ConnectionSettingResponseListPage) ConnectionSettingResponseListIterator {
	return ConnectionSettingResponseListIterator{page: page}
}

// IsEmpty returns true if the ListResult contains no values.
func (csrl ConnectionSettingResponseList) IsEmpty() bool {
	return csrl.Value == nil || len(*csrl.Value) == 0
}

// hasNextLink returns true if the NextLink is not empty.
func (csrl ConnectionSettingResponseList) hasNextLink() bool {
	return csrl.NextLink != nil && len(*csrl.NextLink) != 0
}

// connectionSettingResponseListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (csrl ConnectionSettingResponseList) connectionSettingResponseListPreparer(ctx context.Context) (*http.Request, error) {
	if !csrl.hasNextLink() {
		return nil, nil
	}
	return autorest.Prepare((&http.Request{}).WithContext(ctx),
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(to.String(csrl.NextLink)))
}

// ConnectionSettingResponseListPage contains a page of ConnectionSetting values.
type ConnectionSettingResponseListPage struct {
	fn   func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error)
	csrl ConnectionSettingResponseList
}

// NextWithContext advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
func (page *ConnectionSettingResponseListPage) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionSettingResponseListPage.NextWithContext")
		defer func() {
			sc := -1
			if page.Response().Response.Response != nil {
				sc = page.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	for {
		next, err := page.fn(ctx, page.csrl)
		if err != nil {
			return err
		}
		page.csrl = next
		if !next.hasNextLink() || !next.IsEmpty() {
			break
		}
	}
	return nil
}

// Next advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *ConnectionSettingResponseListPage) Next() error {
	return page.NextWithContext(context.Background())
}

// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ConnectionSettingResponseListPage) NotDone() bool {
	return !page.csrl.IsEmpty()
}

// Response returns the raw server response from the last page request.
func (page ConnectionSettingResponseListPage) Response() ConnectionSettingResponseList {
	return page.csrl
}

// Values returns the slice of values for the current page or nil if there are no values.
func (page ConnectionSettingResponseListPage) Values() []ConnectionSetting {
	if page.csrl.IsEmpty() {
		return nil
	}
	return *page.csrl.Value
}

// Creates a new instance of the ConnectionSettingResponseListPage type.
func NewConnectionSettingResponseListPage(cur ConnectionSettingResponseList, getNextPage func(context.Context, ConnectionSettingResponseList) (ConnectionSettingResponseList, error)) ConnectionSettingResponseListPage {
	return ConnectionSettingResponseListPage{
		fn:   getNextPage,
		csrl: cur,
	}
}

// DirectLineChannel direct Line channel definition
type DirectLineChannel struct {
	// Properties - The set of properties specific to Direct Line channel resource
	Properties *DirectLineChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for DirectLineChannel.
func (dlc DirectLineChannel) MarshalJSON() ([]byte, error) {
	dlc.ChannelName = ChannelNameBasicChannelChannelNameDirectLineChannel
	objectMap := make(map[string]interface{})
	if dlc.Properties != nil {
		objectMap["properties"] = dlc.Properties
	}
	if dlc.Etag != nil {
		objectMap["etag"] = dlc.Etag
	}
	if dlc.Location != nil {
		objectMap["location"] = dlc.Location
	}
	if dlc.ChannelName != "" {
		objectMap["channelName"] = dlc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return &dlc, true
}

// AsTelegramChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for DirectLineChannel.
func (dlc DirectLineChannel) AsBasicChannel() (BasicChannel, bool) {
	return &dlc, true
}

// DirectLineChannelProperties the parameters to provide for the Direct Line channel.
type DirectLineChannelProperties struct {
	// Sites - The list of Direct Line sites
	Sites *[]DirectLineSite `json:"sites,omitempty"`
	// ExtensionKey1 - The extensionKey1
	ExtensionKey1 *string `json:"extensionKey1,omitempty"`
	// ExtensionKey2 - The extensionKey2
	ExtensionKey2 *string `json:"extensionKey2,omitempty"`
	// DirectLineEmbedCode - Direct Line embed code of the resource
	DirectLineEmbedCode *string `json:"DirectLineEmbedCode,omitempty"`
}

// DirectLineSite a site for the Direct Line channel
type DirectLineSite struct {
	// TenantID - Tenant Id
	TenantID *string `json:"tenantId,omitempty"`
	// SiteID - READ-ONLY; Site Id
	SiteID *string `json:"siteId,omitempty"`
	// SiteName - Site name
	SiteName *string `json:"siteName,omitempty"`
	// Key - READ-ONLY; Primary key. Value only returned through POST to the action Channel List API, otherwise empty.
	Key *string `json:"key,omitempty"`
	// Key2 - READ-ONLY; Secondary key. Value only returned through POST to the action Channel List API, otherwise empty.
	Key2 *string `json:"key2,omitempty"`
	// IsEnabled - Whether this site is enabled for DirectLine channel
	IsEnabled *bool `json:"isEnabled,omitempty"`
	// IsTokenEnabled - READ-ONLY; Whether this site is token enabled for channel
	IsTokenEnabled *bool `json:"isTokenEnabled,omitempty"`
	// IsEndpointParametersEnabled - Whether this site is EndpointParameters enabled for channel
	IsEndpointParametersEnabled *bool `json:"isEndpointParametersEnabled,omitempty"`
	// IsDetailedLoggingEnabled - Whether this site is disabled detailed logging for
	IsDetailedLoggingEnabled *bool `json:"isDetailedLoggingEnabled,omitempty"`
	// IsBlockUserUploadEnabled - Whether this site is enabled for block user upload.
	IsBlockUserUploadEnabled *bool `json:"isBlockUserUploadEnabled,omitempty"`
	// IsNoStorageEnabled - Whether this no-storage site is disabled detailed logging for
	IsNoStorageEnabled *bool `json:"isNoStorageEnabled,omitempty"`
	// ETag - Entity Tag
	ETag *string `json:"eTag,omitempty"`
	// AppID - DirectLine application id
	AppID *string `json:"appId,omitempty"`
	// IsV1Enabled - Whether this site is enabled for Bot Framework V1 protocol.
	IsV1Enabled *bool `json:"isV1Enabled,omitempty"`
	// IsV3Enabled - Whether this site is enabled for Bot Framework V3 protocol.
	IsV3Enabled *bool `json:"isV3Enabled,omitempty"`
	// IsSecureSiteEnabled - Whether this site is enabled for authentication with Bot Framework.
	IsSecureSiteEnabled *bool `json:"isSecureSiteEnabled,omitempty"`
	// TrustedOrigins - List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True.
	TrustedOrigins *[]string `json:"trustedOrigins,omitempty"`
	// IsWebChatSpeechEnabled - Whether this site is enabled for Webchat Speech
	IsWebChatSpeechEnabled *bool `json:"isWebChatSpeechEnabled,omitempty"`
	// IsWebchatPreviewEnabled - Whether this site is enabled for preview versions of Webchat
	IsWebchatPreviewEnabled *bool `json:"isWebchatPreviewEnabled,omitempty"`
}

// MarshalJSON is the custom marshaler for DirectLineSite.
func (dls DirectLineSite) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if dls.TenantID != nil {
		objectMap["tenantId"] = dls.TenantID
	}
	if dls.SiteName != nil {
		objectMap["siteName"] = dls.SiteName
	}
	if dls.IsEnabled != nil {
		objectMap["isEnabled"] = dls.IsEnabled
	}
	if dls.IsEndpointParametersEnabled != nil {
		objectMap["isEndpointParametersEnabled"] = dls.IsEndpointParametersEnabled
	}
	if dls.IsDetailedLoggingEnabled != nil {
		objectMap["isDetailedLoggingEnabled"] = dls.IsDetailedLoggingEnabled
	}
	if dls.IsBlockUserUploadEnabled != nil {
		objectMap["isBlockUserUploadEnabled"] = dls.IsBlockUserUploadEnabled
	}
	if dls.IsNoStorageEnabled != nil {
		objectMap["isNoStorageEnabled"] = dls.IsNoStorageEnabled
	}
	if dls.ETag != nil {
		objectMap["eTag"] = dls.ETag
	}
	if dls.AppID != nil {
		objectMap["appId"] = dls.AppID
	}
	if dls.IsV1Enabled != nil {
		objectMap["isV1Enabled"] = dls.IsV1Enabled
	}
	if dls.IsV3Enabled != nil {
		objectMap["isV3Enabled"] = dls.IsV3Enabled
	}
	if dls.IsSecureSiteEnabled != nil {
		objectMap["isSecureSiteEnabled"] = dls.IsSecureSiteEnabled
	}
	if dls.TrustedOrigins != nil {
		objectMap["trustedOrigins"] = dls.TrustedOrigins
	}
	if dls.IsWebChatSpeechEnabled != nil {
		objectMap["isWebChatSpeechEnabled"] = dls.IsWebChatSpeechEnabled
	}
	if dls.IsWebchatPreviewEnabled != nil {
		objectMap["isWebchatPreviewEnabled"] = dls.IsWebchatPreviewEnabled
	}
	return json.Marshal(objectMap)
}

// DirectLineSpeechChannel directLine Speech channel definition
type DirectLineSpeechChannel struct {
	// Properties - The set of properties specific to DirectLine Speech channel resource
	Properties *DirectLineSpeechChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) MarshalJSON() ([]byte, error) {
	dlsc.ChannelName = ChannelNameBasicChannelChannelNameDirectLineSpeechChannel
	objectMap := make(map[string]interface{})
	if dlsc.Properties != nil {
		objectMap["properties"] = dlsc.Properties
	}
	if dlsc.Etag != nil {
		objectMap["etag"] = dlsc.Etag
	}
	if dlsc.Location != nil {
		objectMap["location"] = dlsc.Location
	}
	if dlsc.ChannelName != "" {
		objectMap["channelName"] = dlsc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return &dlsc, true
}

// AsOmnichannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for DirectLineSpeechChannel.
func (dlsc DirectLineSpeechChannel) AsBasicChannel() (BasicChannel, bool) {
	return &dlsc, true
}

// DirectLineSpeechChannelProperties the parameters to provide for the DirectLine Speech channel.
type DirectLineSpeechChannelProperties struct {
	// CognitiveServiceResourceID - The cognitive service id with this channel registration.
	CognitiveServiceResourceID *string `json:"cognitiveServiceResourceId,omitempty"`
	// CognitiveServiceRegion - The cognitive service region with this channel registration.
	CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"`
	// CognitiveServiceSubscriptionKey - The cognitive service subscription key to use with this channel registration.
	CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"`
	// IsEnabled - Whether this channel is enabled or not.
	IsEnabled *bool `json:"isEnabled,omitempty"`
	// CustomVoiceDeploymentID - Custom speech model id (optional).
	CustomVoiceDeploymentID *string `json:"customVoiceDeploymentId,omitempty"`
	// CustomSpeechModelID - Custom voice deployment id (optional).
	CustomSpeechModelID *string `json:"customSpeechModelId,omitempty"`
	// IsDefaultBotForCogSvcAccount - Make this a default bot for chosen cognitive service account.
	IsDefaultBotForCogSvcAccount *bool `json:"isDefaultBotForCogSvcAccount,omitempty"`
}

// EmailChannel email channel definition
type EmailChannel struct {
	// Properties - The set of properties specific to email channel resource
	Properties *EmailChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for EmailChannel.
func (ec EmailChannel) MarshalJSON() ([]byte, error) {
	ec.ChannelName = ChannelNameBasicChannelChannelNameEmailChannel
	objectMap := make(map[string]interface{})
	if ec.Properties != nil {
		objectMap["properties"] = ec.Properties
	}
	if ec.Etag != nil {
		objectMap["etag"] = ec.Etag
	}
	if ec.Location != nil {
		objectMap["location"] = ec.Location
	}
	if ec.ChannelName != "" {
		objectMap["channelName"] = ec.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsEmailChannel() (*EmailChannel, bool) {
	return &ec, true
}

// AsOutlookChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for EmailChannel.
func (ec EmailChannel) AsBasicChannel() (BasicChannel, bool) {
	return &ec, true
}

// EmailChannelProperties the parameters to provide for the Email channel.
type EmailChannelProperties struct {
	// EmailAddress - The email address
	EmailAddress *string `json:"emailAddress,omitempty"`
	// AuthMethod - Email channel auth method. 0 Password (Default); 1 Graph.
	AuthMethod *float64 `json:"authMethod,omitempty"`
	// Password - The password for the email address. Value only returned through POST to the action Channel List API, otherwise empty.
	Password *string `json:"password,omitempty"`
	// MagicCode - The magic code for setting up the modern authentication.
	MagicCode *string `json:"magicCode,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// Error bot Service error object.
type Error struct {
	// Error - The error body.
	Error *ErrorBody `json:"error,omitempty"`
}

// ErrorBody bot Service error body.
type ErrorBody struct {
	// Code - error code
	Code *string `json:"code,omitempty"`
	// Message - error message
	Message *string `json:"message,omitempty"`
}

// FacebookChannel facebook channel definition
type FacebookChannel struct {
	// Properties - The set of properties specific to bot facebook channel
	Properties *FacebookChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for FacebookChannel.
func (fc FacebookChannel) MarshalJSON() ([]byte, error) {
	fc.ChannelName = ChannelNameBasicChannelChannelNameFacebookChannel
	objectMap := make(map[string]interface{})
	if fc.Properties != nil {
		objectMap["properties"] = fc.Properties
	}
	if fc.Etag != nil {
		objectMap["etag"] = fc.Etag
	}
	if fc.Location != nil {
		objectMap["location"] = fc.Location
	}
	if fc.ChannelName != "" {
		objectMap["channelName"] = fc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return &fc, true
}

// AsEmailChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for FacebookChannel.
func (fc FacebookChannel) AsBasicChannel() (BasicChannel, bool) {
	return &fc, true
}

// FacebookChannelProperties the parameters to provide for the Facebook channel.
type FacebookChannelProperties struct {
	// VerifyToken - READ-ONLY; Verify token. Value only returned through POST to the action Channel List API, otherwise empty.
	VerifyToken *string `json:"verifyToken,omitempty"`
	// Pages - The list of Facebook pages
	Pages *[]FacebookPage `json:"pages,omitempty"`
	// AppID - Facebook application id
	AppID *string `json:"appId,omitempty"`
	// AppSecret - Facebook application secret. Value only returned through POST to the action Channel List API, otherwise empty.
	AppSecret *string `json:"appSecret,omitempty"`
	// CallbackURL - READ-ONLY; Callback Url
	CallbackURL *string `json:"callbackUrl,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// MarshalJSON is the custom marshaler for FacebookChannelProperties.
func (fcp FacebookChannelProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if fcp.Pages != nil {
		objectMap["pages"] = fcp.Pages
	}
	if fcp.AppID != nil {
		objectMap["appId"] = fcp.AppID
	}
	if fcp.AppSecret != nil {
		objectMap["appSecret"] = fcp.AppSecret
	}
	if fcp.IsEnabled != nil {
		objectMap["isEnabled"] = fcp.IsEnabled
	}
	return json.Marshal(objectMap)
}

// FacebookPage a Facebook page for Facebook channel registration
type FacebookPage struct {
	// ID - Page id
	ID *string `json:"id,omitempty"`
	// AccessToken - Facebook application access token. Value only returned through POST to the action Channel List API, otherwise empty.
	AccessToken *string `json:"accessToken,omitempty"`
}

// HostSettingsResponse the response body returned for a request to Bot Service Management to check per
// subscription hostSettings
type HostSettingsResponse struct {
	autorest.Response `json:"-"`
	// OAuthURL - For in-conversation bot user authentication
	OAuthURL *string `json:"OAuthUrl,omitempty"`
	// ToBotFromChannelOpenIDMetadataURL - For verifying incoming tokens from the channels
	ToBotFromChannelOpenIDMetadataURL *string `json:"ToBotFromChannelOpenIdMetadataUrl,omitempty"`
	// ToBotFromChannelTokenIssuer - For verifying incoming tokens from the channels
	ToBotFromChannelTokenIssuer *string `json:"ToBotFromChannelTokenIssuer,omitempty"`
	// ToBotFromEmulatorOpenIDMetadataURL - For verifying incoming tokens from bot emulator
	ToBotFromEmulatorOpenIDMetadataURL *string `json:"ToBotFromEmulatorOpenIdMetadataUrl,omitempty"`
	// ToChannelFromBotLoginURL - For getting access token to channels from bot host
	ToChannelFromBotLoginURL *string `json:"ToChannelFromBotLoginUrl,omitempty"`
	// ToChannelFromBotOAuthScope - For getting access token to channels from bot host
	ToChannelFromBotOAuthScope *string `json:"ToChannelFromBotOAuthScope,omitempty"`
	// ValidateAuthority - Per cloud OAuth setting on whether authority is validated
	ValidateAuthority *bool `json:"ValidateAuthority,omitempty"`
	// BotOpenIDMetadata - Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12
	BotOpenIDMetadata *string `json:"BotOpenIdMetadata,omitempty"`
}

// KikChannel kik channel definition
type KikChannel struct {
	// Properties - The set of properties specific to Kik channel resource
	Properties *KikChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for KikChannel.
func (kc KikChannel) MarshalJSON() ([]byte, error) {
	kc.ChannelName = ChannelNameBasicChannelChannelNameKikChannel
	objectMap := make(map[string]interface{})
	if kc.Properties != nil {
		objectMap["properties"] = kc.Properties
	}
	if kc.Etag != nil {
		objectMap["etag"] = kc.Etag
	}
	if kc.Location != nil {
		objectMap["location"] = kc.Location
	}
	if kc.ChannelName != "" {
		objectMap["channelName"] = kc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsKikChannel() (*KikChannel, bool) {
	return &kc, true
}

// AsWebChatChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for KikChannel.
func (kc KikChannel) AsBasicChannel() (BasicChannel, bool) {
	return &kc, true
}

// KikChannelProperties the parameters to provide for the Kik channel.
type KikChannelProperties struct {
	// UserName - The Kik user name
	UserName *string `json:"userName,omitempty"`
	// APIKey - Kik API key. Value only returned through POST to the action Channel List API, otherwise empty.
	APIKey *string `json:"apiKey,omitempty"`
	// IsValidated - Whether this channel is validated for the bot
	IsValidated *bool `json:"isValidated,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// LineChannel line channel definition
type LineChannel struct {
	// Properties - The set of properties specific to line channel resource
	Properties *LineChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for LineChannel.
func (lc LineChannel) MarshalJSON() ([]byte, error) {
	lc.ChannelName = ChannelNameBasicChannelChannelNameLineChannel
	objectMap := make(map[string]interface{})
	if lc.Properties != nil {
		objectMap["properties"] = lc.Properties
	}
	if lc.Etag != nil {
		objectMap["etag"] = lc.Etag
	}
	if lc.Location != nil {
		objectMap["location"] = lc.Location
	}
	if lc.ChannelName != "" {
		objectMap["channelName"] = lc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsLineChannel() (*LineChannel, bool) {
	return &lc, true
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for LineChannel.
func (lc LineChannel) AsBasicChannel() (BasicChannel, bool) {
	return &lc, true
}

// LineChannelProperties the parameters to provide for the Line channel.
type LineChannelProperties struct {
	// LineRegistrations - The list of line channel registrations
	LineRegistrations *[]LineRegistration `json:"lineRegistrations,omitempty"`
	// CallbackURL - READ-ONLY; Callback Url to enter in line registration.
	CallbackURL *string `json:"callbackUrl,omitempty"`
	// IsValidated - READ-ONLY; Whether this channel is validated for the bot
	IsValidated *bool `json:"isValidated,omitempty"`
}

// MarshalJSON is the custom marshaler for LineChannelProperties.
func (lcp LineChannelProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if lcp.LineRegistrations != nil {
		objectMap["lineRegistrations"] = lcp.LineRegistrations
	}
	return json.Marshal(objectMap)
}

// LineRegistration the properties corresponding to a line channel registration
type LineRegistration struct {
	// GeneratedID - READ-ONLY; Id generated for the line channel registration
	GeneratedID *string `json:"generatedId,omitempty"`
	// ChannelSecret - Secret for the line channel registration
	ChannelSecret *string `json:"channelSecret,omitempty"`
	// ChannelAccessToken - Access token for the line channel registration
	ChannelAccessToken *string `json:"channelAccessToken,omitempty"`
}

// MarshalJSON is the custom marshaler for LineRegistration.
func (lr LineRegistration) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if lr.ChannelSecret != nil {
		objectMap["channelSecret"] = lr.ChannelSecret
	}
	if lr.ChannelAccessToken != nil {
		objectMap["channelAccessToken"] = lr.ChannelAccessToken
	}
	return json.Marshal(objectMap)
}

// ListChannelWithKeysResponse the ARM channel of list channel with keys operation response.
type ListChannelWithKeysResponse struct {
	autorest.Response `json:"-"`
	// Resource - The set of properties specific to bot channel resource
	Resource BasicChannel `json:"resource,omitempty"`
	// Setting - Channel settings
	Setting *ChannelSettings `json:"setting,omitempty"`
	// ProvisioningState - Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// EntityTag - Entity tag of the resource
	EntityTag *string `json:"entityTag,omitempty"`
	// ChangedTime - Changed time of the resource
	ChangedTime *string `json:"changedTime,omitempty"`
	// Properties - The set of properties specific to bot channel resource
	Properties BasicChannel `json:"properties,omitempty"`
	// ID - READ-ONLY; Specifies the resource ID.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Specifies the name of the resource.
	Name *string `json:"name,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// Type - READ-ONLY; Specifies the type of the resource.
	Type *string `json:"type,omitempty"`
	// Tags - Contains resource tags defined as key/value pairs.
	Tags map[string]*string `json:"tags"`
	// Sku - Gets or sets the SKU of the resource.
	Sku *Sku `json:"sku,omitempty"`
	// Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction', 'KindAzurebot'
	Kind Kind `json:"kind,omitempty"`
	// Etag - Entity Tag.
	Etag *string `json:"etag,omitempty"`
	// Zones - READ-ONLY; Entity zones
	Zones *[]string `json:"zones,omitempty"`
}

// MarshalJSON is the custom marshaler for ListChannelWithKeysResponse.
func (lcwkr ListChannelWithKeysResponse) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	objectMap["resource"] = lcwkr.Resource
	if lcwkr.Setting != nil {
		objectMap["setting"] = lcwkr.Setting
	}
	if lcwkr.ProvisioningState != nil {
		objectMap["provisioningState"] = lcwkr.ProvisioningState
	}
	if lcwkr.EntityTag != nil {
		objectMap["entityTag"] = lcwkr.EntityTag
	}
	if lcwkr.ChangedTime != nil {
		objectMap["changedTime"] = lcwkr.ChangedTime
	}
	objectMap["properties"] = lcwkr.Properties
	if lcwkr.Location != nil {
		objectMap["location"] = lcwkr.Location
	}
	if lcwkr.Tags != nil {
		objectMap["tags"] = lcwkr.Tags
	}
	if lcwkr.Sku != nil {
		objectMap["sku"] = lcwkr.Sku
	}
	if lcwkr.Kind != "" {
		objectMap["kind"] = lcwkr.Kind
	}
	if lcwkr.Etag != nil {
		objectMap["etag"] = lcwkr.Etag
	}
	return json.Marshal(objectMap)
}

// UnmarshalJSON is the custom unmarshaler for ListChannelWithKeysResponse struct.
func (lcwkr *ListChannelWithKeysResponse) UnmarshalJSON(body []byte) error {
	var m map[string]*json.RawMessage
	err := json.Unmarshal(body, &m)
	if err != nil {
		return err
	}
	for k, v := range m {
		switch k {
		case "resource":
			if v != nil {
				resource, err := unmarshalBasicChannel(*v)
				if err != nil {
					return err
				}
				lcwkr.Resource = resource
			}
		case "setting":
			if v != nil {
				var setting ChannelSettings
				err = json.Unmarshal(*v, &setting)
				if err != nil {
					return err
				}
				lcwkr.Setting = &setting
			}
		case "provisioningState":
			if v != nil {
				var provisioningState string
				err = json.Unmarshal(*v, &provisioningState)
				if err != nil {
					return err
				}
				lcwkr.ProvisioningState = &provisioningState
			}
		case "entityTag":
			if v != nil {
				var entityTag string
				err = json.Unmarshal(*v, &entityTag)
				if err != nil {
					return err
				}
				lcwkr.EntityTag = &entityTag
			}
		case "changedTime":
			if v != nil {
				var changedTime string
				err = json.Unmarshal(*v, &changedTime)
				if err != nil {
					return err
				}
				lcwkr.ChangedTime = &changedTime
			}
		case "properties":
			if v != nil {
				properties, err := unmarshalBasicChannel(*v)
				if err != nil {
					return err
				}
				lcwkr.Properties = properties
			}
		case "id":
			if v != nil {
				var ID string
				err = json.Unmarshal(*v, &ID)
				if err != nil {
					return err
				}
				lcwkr.ID = &ID
			}
		case "name":
			if v != nil {
				var name string
				err = json.Unmarshal(*v, &name)
				if err != nil {
					return err
				}
				lcwkr.Name = &name
			}
		case "location":
			if v != nil {
				var location string
				err = json.Unmarshal(*v, &location)
				if err != nil {
					return err
				}
				lcwkr.Location = &location
			}
		case "type":
			if v != nil {
				var typeVar string
				err = json.Unmarshal(*v, &typeVar)
				if err != nil {
					return err
				}
				lcwkr.Type = &typeVar
			}
		case "tags":
			if v != nil {
				var tags map[string]*string
				err = json.Unmarshal(*v, &tags)
				if err != nil {
					return err
				}
				lcwkr.Tags = tags
			}
		case "sku":
			if v != nil {
				var sku Sku
				err = json.Unmarshal(*v, &sku)
				if err != nil {
					return err
				}
				lcwkr.Sku = &sku
			}
		case "kind":
			if v != nil {
				var kind Kind
				err = json.Unmarshal(*v, &kind)
				if err != nil {
					return err
				}
				lcwkr.Kind = kind
			}
		case "etag":
			if v != nil {
				var etag string
				err = json.Unmarshal(*v, &etag)
				if err != nil {
					return err
				}
				lcwkr.Etag = &etag
			}
		case "zones":
			if v != nil {
				var zones []string
				err = json.Unmarshal(*v, &zones)
				if err != nil {
					return err
				}
				lcwkr.Zones = &zones
			}
		}
	}

	return nil
}

// M365Extensions m365 Extensions definition
type M365Extensions struct {
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for M365Extensions.
func (me M365Extensions) MarshalJSON() ([]byte, error) {
	me.ChannelName = ChannelNameBasicChannelChannelNameM365Extensions
	objectMap := make(map[string]interface{})
	if me.Etag != nil {
		objectMap["etag"] = me.Etag
	}
	if me.Location != nil {
		objectMap["location"] = me.Location
	}
	if me.ChannelName != "" {
		objectMap["channelName"] = me.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsM365Extensions() (*M365Extensions, bool) {
	return &me, true
}

// AsChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for M365Extensions.
func (me M365Extensions) AsBasicChannel() (BasicChannel, bool) {
	return &me, true
}

// MsTeamsChannel microsoft Teams channel definition
type MsTeamsChannel struct {
	// Properties - The set of properties specific to Microsoft Teams channel resource
	Properties *MsTeamsChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for MsTeamsChannel.
func (mtc MsTeamsChannel) MarshalJSON() ([]byte, error) {
	mtc.ChannelName = ChannelNameBasicChannelChannelNameMsTeamsChannel
	objectMap := make(map[string]interface{})
	if mtc.Properties != nil {
		objectMap["properties"] = mtc.Properties
	}
	if mtc.Etag != nil {
		objectMap["etag"] = mtc.Etag
	}
	if mtc.Location != nil {
		objectMap["location"] = mtc.Location
	}
	if mtc.ChannelName != "" {
		objectMap["channelName"] = mtc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return &mtc, true
}

// AsSkypeChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for MsTeamsChannel.
func (mtc MsTeamsChannel) AsBasicChannel() (BasicChannel, bool) {
	return &mtc, true
}

// MsTeamsChannelProperties the parameters to provide for the Microsoft Teams channel.
type MsTeamsChannelProperties struct {
	// EnableCalling - Enable calling for Microsoft Teams channel
	EnableCalling *bool `json:"enableCalling,omitempty"`
	// CallingWebhook - Webhook for Microsoft Teams channel calls
	CallingWebhook *string `json:"callingWebhook,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
	// IncomingCallRoute - Webhook for Microsoft Teams channel calls
	IncomingCallRoute *string `json:"incomingCallRoute,omitempty"`
	// DeploymentEnvironment - Deployment environment for Microsoft Teams channel calls
	DeploymentEnvironment *string `json:"deploymentEnvironment,omitempty"`
	// AcceptedTerms - Whether this channel accepted terms
	AcceptedTerms *bool `json:"acceptedTerms,omitempty"`
}

// Omnichannel omnichannel channel definition
type Omnichannel struct {
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for Omnichannel.
func (o Omnichannel) MarshalJSON() ([]byte, error) {
	o.ChannelName = ChannelNameBasicChannelChannelNameOmnichannel
	objectMap := make(map[string]interface{})
	if o.Etag != nil {
		objectMap["etag"] = o.Etag
	}
	if o.Location != nil {
		objectMap["location"] = o.Location
	}
	if o.ChannelName != "" {
		objectMap["channelName"] = o.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsOmnichannel() (*Omnichannel, bool) {
	return &o, true
}

// AsTelephonyChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for Omnichannel.
func (o Omnichannel) AsBasicChannel() (BasicChannel, bool) {
	return &o, true
}

// OperationDisplayInfo the operation supported by Bot Service Management.
type OperationDisplayInfo struct {
	// Description - The description of the operation.
	Description *string `json:"description,omitempty"`
	// Operation - The action that users can perform, based on their permission level.
	Operation *string `json:"operation,omitempty"`
	// Provider - Service provider: Microsoft Bot Service.
	Provider *string `json:"provider,omitempty"`
	// Resource - Resource on which the operation is performed.
	Resource *string `json:"resource,omitempty"`
}

// OperationEntity the operations supported by Bot Service Management.
type OperationEntity struct {
	// Name - Operation name: {provider}/{resource}/{operation}.
	Name *string `json:"name,omitempty"`
	// Display - The operation supported by Bot Service Management.
	Display *OperationDisplayInfo `json:"display,omitempty"`
	// Origin - The origin of the operation.
	Origin *string `json:"origin,omitempty"`
	// Properties - Additional properties.
	Properties interface{} `json:"properties,omitempty"`
}

// OperationEntityListResult the list of bot service operation response.
type OperationEntityListResult struct {
	autorest.Response `json:"-"`
	// NextLink - The link used to get the next page of operations.
	NextLink *string `json:"nextLink,omitempty"`
	// Value - The list of operations.
	Value *[]OperationEntity `json:"value,omitempty"`
}

// OperationEntityListResultIterator provides access to a complete listing of OperationEntity values.
type OperationEntityListResultIterator struct {
	i    int
	page OperationEntityListResultPage
}

// NextWithContext advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *OperationEntityListResultIterator) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultIterator.NextWithContext")
		defer func() {
			sc := -1
			if iter.Response().Response.Response != nil {
				sc = iter.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	iter.i++
	if iter.i < len(iter.page.Values()) {
		return nil
	}
	err = iter.page.NextWithContext(ctx)
	if err != nil {
		iter.i--
		return err
	}
	iter.i = 0
	return nil
}

// Next advances to the next value.  If there was an error making
// the request the iterator does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (iter *OperationEntityListResultIterator) Next() error {
	return iter.NextWithContext(context.Background())
}

// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationEntityListResultIterator) NotDone() bool {
	return iter.page.NotDone() && iter.i < len(iter.page.Values())
}

// Response returns the raw server response from the last page request.
func (iter OperationEntityListResultIterator) Response() OperationEntityListResult {
	return iter.page.Response()
}

// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter OperationEntityListResultIterator) Value() OperationEntity {
	if !iter.page.NotDone() {
		return OperationEntity{}
	}
	return iter.page.Values()[iter.i]
}

// Creates a new instance of the OperationEntityListResultIterator type.
func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator {
	return OperationEntityListResultIterator{page: page}
}

// IsEmpty returns true if the ListResult contains no values.
func (oelr OperationEntityListResult) IsEmpty() bool {
	return oelr.Value == nil || len(*oelr.Value) == 0
}

// hasNextLink returns true if the NextLink is not empty.
func (oelr OperationEntityListResult) hasNextLink() bool {
	return oelr.NextLink != nil && len(*oelr.NextLink) != 0
}

// operationEntityListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (oelr OperationEntityListResult) operationEntityListResultPreparer(ctx context.Context) (*http.Request, error) {
	if !oelr.hasNextLink() {
		return nil, nil
	}
	return autorest.Prepare((&http.Request{}).WithContext(ctx),
		autorest.AsJSON(),
		autorest.AsGet(),
		autorest.WithBaseURL(to.String(oelr.NextLink)))
}

// OperationEntityListResultPage contains a page of OperationEntity values.
type OperationEntityListResultPage struct {
	fn   func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)
	oelr OperationEntityListResult
}

// NextWithContext advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
func (page *OperationEntityListResultPage) NextWithContext(ctx context.Context) (err error) {
	if tracing.IsEnabled() {
		ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultPage.NextWithContext")
		defer func() {
			sc := -1
			if page.Response().Response.Response != nil {
				sc = page.Response().Response.Response.StatusCode
			}
			tracing.EndSpan(ctx, sc, err)
		}()
	}
	for {
		next, err := page.fn(ctx, page.oelr)
		if err != nil {
			return err
		}
		page.oelr = next
		if !next.hasNextLink() || !next.IsEmpty() {
			break
		}
	}
	return nil
}

// Next advances to the next page of values.  If there was an error making
// the request the page does not advance and the error is returned.
// Deprecated: Use NextWithContext() instead.
func (page *OperationEntityListResultPage) Next() error {
	return page.NextWithContext(context.Background())
}

// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationEntityListResultPage) NotDone() bool {
	return !page.oelr.IsEmpty()
}

// Response returns the raw server response from the last page request.
func (page OperationEntityListResultPage) Response() OperationEntityListResult {
	return page.oelr
}

// Values returns the slice of values for the current page or nil if there are no values.
func (page OperationEntityListResultPage) Values() []OperationEntity {
	if page.oelr.IsEmpty() {
		return nil
	}
	return *page.oelr.Value
}

// Creates a new instance of the OperationEntityListResultPage type.
func NewOperationEntityListResultPage(cur OperationEntityListResult, getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage {
	return OperationEntityListResultPage{
		fn:   getNextPage,
		oelr: cur,
	}
}

// OperationResultsDescription the properties indicating the operation result of an operation on a service.
type OperationResultsDescription struct {
	autorest.Response `json:"-"`
	// ID - READ-ONLY; The ID of the operation returned.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; The name of the operation result.
	Name *string `json:"name,omitempty"`
	// Status - READ-ONLY; The status of the operation being performed. Possible values include: 'OperationResultStatusCanceled', 'OperationResultStatusSucceeded', 'OperationResultStatusFailed', 'OperationResultStatusRequested', 'OperationResultStatusRunning'
	Status OperationResultStatus `json:"status,omitempty"`
	// StartTime - READ-ONLY; The time that the operation was started.
	StartTime *date.Time `json:"startTime,omitempty"`
}

// MarshalJSON is the custom marshaler for OperationResultsDescription.
func (ord OperationResultsDescription) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	return json.Marshal(objectMap)
}

// OperationResultsGetFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type OperationResultsGetFuture struct {
	azure.FutureAPI
	// Result returns the result of the asynchronous operation.
	// If the operation has not completed it will return an error.
	Result func(OperationResultsClient) (OperationResultsDescription, error)
}

// UnmarshalJSON is the custom unmarshaller for CreateFuture.
func (future *OperationResultsGetFuture) UnmarshalJSON(body []byte) error {
	var azFuture azure.Future
	if err := json.Unmarshal(body, &azFuture); err != nil {
		return err
	}
	future.FutureAPI = &azFuture
	future.Result = future.result
	return nil
}

// result is the default implementation for OperationResultsGetFuture.Result.
func (future *OperationResultsGetFuture) result(client OperationResultsClient) (ord OperationResultsDescription, err error) {
	var done bool
	done, err = future.DoneWithContext(context.Background(), client)
	if err != nil {
		err = autorest.NewErrorWithError(err, "botservice.OperationResultsGetFuture", "Result", future.Response(), "Polling failure")
		return
	}
	if !done {
		ord.Response.Response = future.Response()
		err = azure.NewAsyncOpIncompleteError("botservice.OperationResultsGetFuture")
		return
	}
	sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
	if ord.Response.Response, err = future.GetResult(sender); err == nil && ord.Response.Response.StatusCode != http.StatusNoContent {
		ord, err = client.GetResponder(ord.Response.Response)
		if err != nil {
			err = autorest.NewErrorWithError(err, "botservice.OperationResultsGetFuture", "Result", ord.Response.Response, "Failure responding to request")
		}
	}
	return
}

// OutlookChannel outlook channel definition
type OutlookChannel struct {
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for OutlookChannel.
func (oc OutlookChannel) MarshalJSON() ([]byte, error) {
	oc.ChannelName = ChannelNameBasicChannelChannelNameOutlookChannel
	objectMap := make(map[string]interface{})
	if oc.Etag != nil {
		objectMap["etag"] = oc.Etag
	}
	if oc.Location != nil {
		objectMap["location"] = oc.Location
	}
	if oc.ChannelName != "" {
		objectMap["channelName"] = oc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return &oc, true
}

// AsMsTeamsChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for OutlookChannel.
func (oc OutlookChannel) AsBasicChannel() (BasicChannel, bool) {
	return &oc, true
}

// PrivateEndpoint the Private Endpoint resource.
type PrivateEndpoint struct {
	// ID - READ-ONLY; The ARM identifier for Private Endpoint
	ID *string `json:"id,omitempty"`
}

// MarshalJSON is the custom marshaler for PrivateEndpoint.
func (peVar PrivateEndpoint) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	return json.Marshal(objectMap)
}

// PrivateEndpointConnection the Private Endpoint Connection resource.
type PrivateEndpointConnection struct {
	autorest.Response `json:"-"`
	// PrivateEndpointConnectionProperties - Resource properties.
	*PrivateEndpointConnectionProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty"`
}

// MarshalJSON is the custom marshaler for PrivateEndpointConnection.
func (pec PrivateEndpointConnection) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if pec.PrivateEndpointConnectionProperties != nil {
		objectMap["properties"] = pec.PrivateEndpointConnectionProperties
	}
	return json.Marshal(objectMap)
}

// UnmarshalJSON is the custom unmarshaler for PrivateEndpointConnection struct.
func (pec *PrivateEndpointConnection) UnmarshalJSON(body []byte) error {
	var m map[string]*json.RawMessage
	err := json.Unmarshal(body, &m)
	if err != nil {
		return err
	}
	for k, v := range m {
		switch k {
		case "properties":
			if v != nil {
				var privateEndpointConnectionProperties PrivateEndpointConnectionProperties
				err = json.Unmarshal(*v, &privateEndpointConnectionProperties)
				if err != nil {
					return err
				}
				pec.PrivateEndpointConnectionProperties = &privateEndpointConnectionProperties
			}
		case "id":
			if v != nil {
				var ID string
				err = json.Unmarshal(*v, &ID)
				if err != nil {
					return err
				}
				pec.ID = &ID
			}
		case "name":
			if v != nil {
				var name string
				err = json.Unmarshal(*v, &name)
				if err != nil {
					return err
				}
				pec.Name = &name
			}
		case "type":
			if v != nil {
				var typeVar string
				err = json.Unmarshal(*v, &typeVar)
				if err != nil {
					return err
				}
				pec.Type = &typeVar
			}
		}
	}

	return nil
}

// PrivateEndpointConnectionListResult list of private endpoint connection associated with the specified
// storage account
type PrivateEndpointConnectionListResult struct {
	autorest.Response `json:"-"`
	// Value - Array of private endpoint connections
	Value *[]PrivateEndpointConnection `json:"value,omitempty"`
}

// PrivateEndpointConnectionProperties properties of the PrivateEndpointConnectProperties.
type PrivateEndpointConnectionProperties struct {
	// PrivateEndpoint - The resource of private end point.
	PrivateEndpoint *PrivateEndpoint `json:"privateEndpoint,omitempty"`
	// PrivateLinkServiceConnectionState - A collection of information about the state of the connection between service consumer and provider.
	PrivateLinkServiceConnectionState *PrivateLinkServiceConnectionState `json:"privateLinkServiceConnectionState,omitempty"`
	// ProvisioningState - The provisioning state of the private endpoint connection resource. Possible values include: 'PrivateEndpointConnectionProvisioningStateSucceeded', 'PrivateEndpointConnectionProvisioningStateCreating', 'PrivateEndpointConnectionProvisioningStateDeleting', 'PrivateEndpointConnectionProvisioningStateFailed'
	ProvisioningState PrivateEndpointConnectionProvisioningState `json:"provisioningState,omitempty"`
	// GroupIds - Group ids
	GroupIds *[]string `json:"groupIds,omitempty"`
}

// PrivateLinkResource a private link resource
type PrivateLinkResource struct {
	// PrivateLinkResourceProperties - Resource properties.
	*PrivateLinkResourceProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty"`
}

// MarshalJSON is the custom marshaler for PrivateLinkResource.
func (plr PrivateLinkResource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if plr.PrivateLinkResourceProperties != nil {
		objectMap["properties"] = plr.PrivateLinkResourceProperties
	}
	return json.Marshal(objectMap)
}

// UnmarshalJSON is the custom unmarshaler for PrivateLinkResource struct.
func (plr *PrivateLinkResource) UnmarshalJSON(body []byte) error {
	var m map[string]*json.RawMessage
	err := json.Unmarshal(body, &m)
	if err != nil {
		return err
	}
	for k, v := range m {
		switch k {
		case "properties":
			if v != nil {
				var privateLinkResourceProperties PrivateLinkResourceProperties
				err = json.Unmarshal(*v, &privateLinkResourceProperties)
				if err != nil {
					return err
				}
				plr.PrivateLinkResourceProperties = &privateLinkResourceProperties
			}
		case "id":
			if v != nil {
				var ID string
				err = json.Unmarshal(*v, &ID)
				if err != nil {
					return err
				}
				plr.ID = &ID
			}
		case "name":
			if v != nil {
				var name string
				err = json.Unmarshal(*v, &name)
				if err != nil {
					return err
				}
				plr.Name = &name
			}
		case "type":
			if v != nil {
				var typeVar string
				err = json.Unmarshal(*v, &typeVar)
				if err != nil {
					return err
				}
				plr.Type = &typeVar
			}
		}
	}

	return nil
}

// PrivateLinkResourceBase common fields that are returned in the response for all BotService Private Link
// Resources
type PrivateLinkResourceBase struct {
	// ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; The name of the resource
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
	Type *string `json:"type,omitempty"`
}

// MarshalJSON is the custom marshaler for PrivateLinkResourceBase.
func (plrb PrivateLinkResourceBase) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	return json.Marshal(objectMap)
}

// PrivateLinkResourceListResult a list of private link resources
type PrivateLinkResourceListResult struct {
	autorest.Response `json:"-"`
	// Value - Array of private link resources
	Value *[]PrivateLinkResource `json:"value,omitempty"`
}

// PrivateLinkResourceProperties properties of a private link resource.
type PrivateLinkResourceProperties struct {
	// GroupID - READ-ONLY; The private link resource group id.
	GroupID *string `json:"groupId,omitempty"`
	// RequiredMembers - READ-ONLY; The private link resource required member names.
	RequiredMembers *[]string `json:"requiredMembers,omitempty"`
	// RequiredZoneNames - The private link resource Private link DNS zone name.
	RequiredZoneNames *[]string `json:"requiredZoneNames,omitempty"`
}

// MarshalJSON is the custom marshaler for PrivateLinkResourceProperties.
func (plrp PrivateLinkResourceProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if plrp.RequiredZoneNames != nil {
		objectMap["requiredZoneNames"] = plrp.RequiredZoneNames
	}
	return json.Marshal(objectMap)
}

// PrivateLinkServiceConnectionState a collection of information about the state of the connection between
// service consumer and provider.
type PrivateLinkServiceConnectionState struct {
	// Status - Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'PrivateEndpointServiceConnectionStatusPending', 'PrivateEndpointServiceConnectionStatusApproved', 'PrivateEndpointServiceConnectionStatusRejected'
	Status PrivateEndpointServiceConnectionStatus `json:"status,omitempty"`
	// Description - The reason for approval/rejection of the connection.
	Description *string `json:"description,omitempty"`
	// ActionsRequired - A message indicating if changes on the service provider require any updates on the consumer.
	ActionsRequired *string `json:"actionsRequired,omitempty"`
}

// Resource azure resource
type Resource struct {
	// ID - READ-ONLY; Specifies the resource ID.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Specifies the name of the resource.
	Name *string `json:"name,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// Type - READ-ONLY; Specifies the type of the resource.
	Type *string `json:"type,omitempty"`
	// Tags - Contains resource tags defined as key/value pairs.
	Tags map[string]*string `json:"tags"`
	// Sku - Gets or sets the SKU of the resource.
	Sku *Sku `json:"sku,omitempty"`
	// Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'KindSdk', 'KindDesigner', 'KindBot', 'KindFunction', 'KindAzurebot'
	Kind Kind `json:"kind,omitempty"`
	// Etag - Entity Tag.
	Etag *string `json:"etag,omitempty"`
	// Zones - READ-ONLY; Entity zones
	Zones *[]string `json:"zones,omitempty"`
}

// MarshalJSON is the custom marshaler for Resource.
func (r Resource) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if r.Location != nil {
		objectMap["location"] = r.Location
	}
	if r.Tags != nil {
		objectMap["tags"] = r.Tags
	}
	if r.Sku != nil {
		objectMap["sku"] = r.Sku
	}
	if r.Kind != "" {
		objectMap["kind"] = r.Kind
	}
	if r.Etag != nil {
		objectMap["etag"] = r.Etag
	}
	return json.Marshal(objectMap)
}

// SearchAssistant searchAssistant definition
type SearchAssistant struct {
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for SearchAssistant.
func (sa SearchAssistant) MarshalJSON() ([]byte, error) {
	sa.ChannelName = ChannelNameBasicChannelChannelNameSearchAssistant
	objectMap := make(map[string]interface{})
	if sa.Etag != nil {
		objectMap["etag"] = sa.Etag
	}
	if sa.Location != nil {
		objectMap["location"] = sa.Location
	}
	if sa.ChannelName != "" {
		objectMap["channelName"] = sa.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsSearchAssistant() (*SearchAssistant, bool) {
	return &sa, true
}

// AsM365Extensions is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for SearchAssistant.
func (sa SearchAssistant) AsBasicChannel() (BasicChannel, bool) {
	return &sa, true
}

// ServiceProvider service Provider Definition
type ServiceProvider struct {
	// Properties - The Properties of a Service Provider Object
	Properties *ServiceProviderProperties `json:"properties,omitempty"`
}

// ServiceProviderParameter extra Parameters specific to each Service Provider
type ServiceProviderParameter struct {
	// Name - READ-ONLY; Name of the Service Provider
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Type of the Service Provider
	Type *string `json:"type,omitempty"`
	// DisplayName - READ-ONLY; Display Name of the Service Provider
	DisplayName *string `json:"displayName,omitempty"`
	// Description - READ-ONLY; Description of the Service Provider
	Description *string `json:"description,omitempty"`
	// HelpURL - READ-ONLY; Help Url for the  Service Provider
	HelpURL *string `json:"helpUrl,omitempty"`
	// Default - READ-ONLY; Default Name for the Service Provider
	Default *string `json:"default,omitempty"`
	// Metadata - READ-ONLY; Meta data for the Service Provider
	Metadata *ServiceProviderParameterMetadata `json:"metadata,omitempty"`
}

// MarshalJSON is the custom marshaler for ServiceProviderParameter.
func (spp ServiceProviderParameter) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	return json.Marshal(objectMap)
}

// ServiceProviderParameterMetadata meta data for the Service Provider
type ServiceProviderParameterMetadata struct {
	// Constraints - the constraints of the bot meta data.
	Constraints *ServiceProviderParameterMetadataConstraints `json:"constraints,omitempty"`
}

// ServiceProviderParameterMetadataConstraints the constraints of the bot meta data.
type ServiceProviderParameterMetadataConstraints struct {
	// Required - Whether required the constraints of the bot meta data.
	Required *bool `json:"required,omitempty"`
}

// ServiceProviderProperties the Object used to describe a Service Provider supported by Bot Service
type ServiceProviderProperties struct {
	// ID - READ-ONLY; Id for Service Provider
	ID *string `json:"id,omitempty"`
	// DisplayName - READ-ONLY; Display Name of the Service Provider
	DisplayName *string `json:"displayName,omitempty"`
	// ServiceProviderName - READ-ONLY; Name of the Service Provider
	ServiceProviderName *string `json:"serviceProviderName,omitempty"`
	// DevPortalURL - READ-ONLY; URL of Dev Portal
	DevPortalURL *string `json:"devPortalUrl,omitempty"`
	// IconURL - The URL of icon
	IconURL *string `json:"iconUrl,omitempty"`
	// Parameters - The list of parameters for the Service Provider
	Parameters *[]ServiceProviderParameter `json:"parameters,omitempty"`
}

// MarshalJSON is the custom marshaler for ServiceProviderProperties.
func (spp ServiceProviderProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if spp.IconURL != nil {
		objectMap["iconUrl"] = spp.IconURL
	}
	if spp.Parameters != nil {
		objectMap["parameters"] = spp.Parameters
	}
	return json.Marshal(objectMap)
}

// ServiceProviderResponseList the list of bot service providers response.
type ServiceProviderResponseList struct {
	autorest.Response `json:"-"`
	// NextLink - The link used to get the next page of bot service providers.
	NextLink *string `json:"nextLink,omitempty"`
	// Value - READ-ONLY; Gets the list of bot service providers and their properties.
	Value *[]ServiceProvider `json:"value,omitempty"`
}

// MarshalJSON is the custom marshaler for ServiceProviderResponseList.
func (sprl ServiceProviderResponseList) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if sprl.NextLink != nil {
		objectMap["nextLink"] = sprl.NextLink
	}
	return json.Marshal(objectMap)
}

// Site a site for the channel
type Site struct {
	// TenantID - Tenant Id
	TenantID *string `json:"tenantId,omitempty"`
	// SiteID - READ-ONLY; Site Id
	SiteID *string `json:"siteId,omitempty"`
	// SiteName - Site name
	SiteName *string `json:"siteName,omitempty"`
	// Key - READ-ONLY; Primary key. Value only returned through POST to the action Channel List API, otherwise empty.
	Key *string `json:"key,omitempty"`
	// Key2 - READ-ONLY; Secondary key. Value only returned through POST to the action Channel List API, otherwise empty.
	Key2 *string `json:"key2,omitempty"`
	// IsEnabled - Whether this site is enabled for DirectLine channel
	IsEnabled *bool `json:"isEnabled,omitempty"`
	// IsTokenEnabled - READ-ONLY; Whether this site is token enabled for channel
	IsTokenEnabled *bool `json:"isTokenEnabled,omitempty"`
	// IsEndpointParametersEnabled - Whether this site is EndpointParameters enabled for channel
	IsEndpointParametersEnabled *bool `json:"isEndpointParametersEnabled,omitempty"`
	// IsDetailedLoggingEnabled - Whether this site is disabled detailed logging for
	IsDetailedLoggingEnabled *bool `json:"isDetailedLoggingEnabled,omitempty"`
	// IsBlockUserUploadEnabled - Whether this site is enabled for block user upload.
	IsBlockUserUploadEnabled *bool `json:"isBlockUserUploadEnabled,omitempty"`
	// IsNoStorageEnabled - Whether this no-storage site is disabled detailed logging for
	IsNoStorageEnabled *bool `json:"isNoStorageEnabled,omitempty"`
	// ETag - Entity Tag
	ETag *string `json:"eTag,omitempty"`
	// AppID - DirectLine application id
	AppID *string `json:"appId,omitempty"`
	// IsV1Enabled - Whether this site is enabled for Bot Framework V1 protocol.
	IsV1Enabled *bool `json:"isV1Enabled,omitempty"`
	// IsV3Enabled - Whether this site is enabled for Bot Framework V3 protocol.
	IsV3Enabled *bool `json:"isV3Enabled,omitempty"`
	// IsSecureSiteEnabled - Whether this site is enabled for authentication with Bot Framework.
	IsSecureSiteEnabled *bool `json:"isSecureSiteEnabled,omitempty"`
	// TrustedOrigins - List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True.
	TrustedOrigins *[]string `json:"trustedOrigins,omitempty"`
	// IsWebChatSpeechEnabled - Whether this site is enabled for Webchat Speech
	IsWebChatSpeechEnabled *bool `json:"isWebChatSpeechEnabled,omitempty"`
	// IsWebchatPreviewEnabled - Whether this site is enabled for preview versions of Webchat
	IsWebchatPreviewEnabled *bool `json:"isWebchatPreviewEnabled,omitempty"`
}

// MarshalJSON is the custom marshaler for Site.
func (s Site) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if s.TenantID != nil {
		objectMap["tenantId"] = s.TenantID
	}
	if s.SiteName != nil {
		objectMap["siteName"] = s.SiteName
	}
	if s.IsEnabled != nil {
		objectMap["isEnabled"] = s.IsEnabled
	}
	if s.IsEndpointParametersEnabled != nil {
		objectMap["isEndpointParametersEnabled"] = s.IsEndpointParametersEnabled
	}
	if s.IsDetailedLoggingEnabled != nil {
		objectMap["isDetailedLoggingEnabled"] = s.IsDetailedLoggingEnabled
	}
	if s.IsBlockUserUploadEnabled != nil {
		objectMap["isBlockUserUploadEnabled"] = s.IsBlockUserUploadEnabled
	}
	if s.IsNoStorageEnabled != nil {
		objectMap["isNoStorageEnabled"] = s.IsNoStorageEnabled
	}
	if s.ETag != nil {
		objectMap["eTag"] = s.ETag
	}
	if s.AppID != nil {
		objectMap["appId"] = s.AppID
	}
	if s.IsV1Enabled != nil {
		objectMap["isV1Enabled"] = s.IsV1Enabled
	}
	if s.IsV3Enabled != nil {
		objectMap["isV3Enabled"] = s.IsV3Enabled
	}
	if s.IsSecureSiteEnabled != nil {
		objectMap["isSecureSiteEnabled"] = s.IsSecureSiteEnabled
	}
	if s.TrustedOrigins != nil {
		objectMap["trustedOrigins"] = s.TrustedOrigins
	}
	if s.IsWebChatSpeechEnabled != nil {
		objectMap["isWebChatSpeechEnabled"] = s.IsWebChatSpeechEnabled
	}
	if s.IsWebchatPreviewEnabled != nil {
		objectMap["isWebchatPreviewEnabled"] = s.IsWebchatPreviewEnabled
	}
	return json.Marshal(objectMap)
}

// SiteInfo site information for WebChat or DirectLine Channels to identify which site to regenerate keys
// for.
type SiteInfo struct {
	// SiteName - The site name
	SiteName *string `json:"siteName,omitempty"`
	// Key - Determines which key is to be regenerated. Possible values include: 'Key1', 'Key2'
	Key Key `json:"key,omitempty"`
}

// Sku the SKU of the cognitive services account.
type Sku struct {
	// Name - The sku name. Possible values include: 'SkuNameF0', 'SkuNameS1'
	Name SkuName `json:"name,omitempty"`
	// Tier - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'SkuTierFree', 'SkuTierStandard'
	Tier SkuTier `json:"tier,omitempty"`
}

// MarshalJSON is the custom marshaler for Sku.
func (s Sku) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if s.Name != "" {
		objectMap["name"] = s.Name
	}
	return json.Marshal(objectMap)
}

// SkypeChannel skype channel definition
type SkypeChannel struct {
	// Properties - The set of properties specific to Skype channel resource
	Properties *SkypeChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for SkypeChannel.
func (sc SkypeChannel) MarshalJSON() ([]byte, error) {
	sc.ChannelName = ChannelNameBasicChannelChannelNameSkypeChannel
	objectMap := make(map[string]interface{})
	if sc.Properties != nil {
		objectMap["properties"] = sc.Properties
	}
	if sc.Etag != nil {
		objectMap["etag"] = sc.Etag
	}
	if sc.Location != nil {
		objectMap["location"] = sc.Location
	}
	if sc.ChannelName != "" {
		objectMap["channelName"] = sc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return &sc, true
}

// AsKikChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for SkypeChannel.
func (sc SkypeChannel) AsBasicChannel() (BasicChannel, bool) {
	return &sc, true
}

// SkypeChannelProperties the parameters to provide for the Microsoft Teams channel.
type SkypeChannelProperties struct {
	// EnableMessaging - Enable messaging for Skype channel
	EnableMessaging *bool `json:"enableMessaging,omitempty"`
	// EnableMediaCards - Enable media cards for Skype channel
	EnableMediaCards *bool `json:"enableMediaCards,omitempty"`
	// EnableVideo - Enable video for Skype channel
	EnableVideo *bool `json:"enableVideo,omitempty"`
	// EnableCalling - Enable calling for Skype channel
	EnableCalling *bool `json:"enableCalling,omitempty"`
	// EnableScreenSharing - Enable screen sharing for Skype channel
	EnableScreenSharing *bool `json:"enableScreenSharing,omitempty"`
	// EnableGroups - Enable groups for Skype channel
	EnableGroups *bool `json:"enableGroups,omitempty"`
	// GroupsMode - Group mode for Skype channel
	GroupsMode *string `json:"groupsMode,omitempty"`
	// CallingWebHook - Calling web hook for Skype channel
	CallingWebHook *string `json:"callingWebHook,omitempty"`
	// IncomingCallRoute - Incoming call route for Skype channel
	IncomingCallRoute *string `json:"incomingCallRoute,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// SlackChannel slack channel definition
type SlackChannel struct {
	// Properties - The set of properties specific to Slack channel resource
	Properties *SlackChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for SlackChannel.
func (sc SlackChannel) MarshalJSON() ([]byte, error) {
	sc.ChannelName = ChannelNameBasicChannelChannelNameSlackChannel
	objectMap := make(map[string]interface{})
	if sc.Properties != nil {
		objectMap["properties"] = sc.Properties
	}
	if sc.Etag != nil {
		objectMap["etag"] = sc.Etag
	}
	if sc.Location != nil {
		objectMap["location"] = sc.Location
	}
	if sc.ChannelName != "" {
		objectMap["channelName"] = sc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsSlackChannel() (*SlackChannel, bool) {
	return &sc, true
}

// AsLineChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for SlackChannel.
func (sc SlackChannel) AsBasicChannel() (BasicChannel, bool) {
	return &sc, true
}

// SlackChannelProperties the parameters to provide for the Slack channel.
type SlackChannelProperties struct {
	// ClientID - The Slack client id
	ClientID *string `json:"clientId,omitempty"`
	// ClientSecret - The Slack client secret. Value only returned through POST to the action Channel List API, otherwise empty.
	ClientSecret *string `json:"clientSecret,omitempty"`
	// VerificationToken - The Slack verification token. Value only returned through POST to the action Channel List API, otherwise empty.
	VerificationToken *string `json:"verificationToken,omitempty"`
	// Scopes - The Slack permission scopes.
	Scopes *string `json:"scopes,omitempty"`
	// LandingPageURL - The Slack landing page Url
	LandingPageURL *string `json:"landingPageUrl,omitempty"`
	// RedirectAction - READ-ONLY; The Slack redirect action
	RedirectAction *string `json:"redirectAction,omitempty"`
	// LastSubmissionID - READ-ONLY; The Sms auth token
	LastSubmissionID *string `json:"lastSubmissionId,omitempty"`
	// RegisterBeforeOAuthFlow - READ-ONLY; Whether to register the settings before OAuth validation is performed. Recommended to True.
	RegisterBeforeOAuthFlow *bool `json:"registerBeforeOAuthFlow,omitempty"`
	// IsValidated - READ-ONLY; Whether this channel is validated for the bot
	IsValidated *bool `json:"IsValidated,omitempty"`
	// SigningSecret - The Slack signing secret.
	SigningSecret *string `json:"signingSecret,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// MarshalJSON is the custom marshaler for SlackChannelProperties.
func (scp SlackChannelProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if scp.ClientID != nil {
		objectMap["clientId"] = scp.ClientID
	}
	if scp.ClientSecret != nil {
		objectMap["clientSecret"] = scp.ClientSecret
	}
	if scp.VerificationToken != nil {
		objectMap["verificationToken"] = scp.VerificationToken
	}
	if scp.Scopes != nil {
		objectMap["scopes"] = scp.Scopes
	}
	if scp.LandingPageURL != nil {
		objectMap["landingPageUrl"] = scp.LandingPageURL
	}
	if scp.SigningSecret != nil {
		objectMap["signingSecret"] = scp.SigningSecret
	}
	if scp.IsEnabled != nil {
		objectMap["isEnabled"] = scp.IsEnabled
	}
	return json.Marshal(objectMap)
}

// SmsChannel sms channel definition
type SmsChannel struct {
	// Properties - The set of properties specific to Sms channel resource
	Properties *SmsChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for SmsChannel.
func (sc SmsChannel) MarshalJSON() ([]byte, error) {
	sc.ChannelName = ChannelNameBasicChannelChannelNameSmsChannel
	objectMap := make(map[string]interface{})
	if sc.Properties != nil {
		objectMap["properties"] = sc.Properties
	}
	if sc.Etag != nil {
		objectMap["etag"] = sc.Etag
	}
	if sc.Location != nil {
		objectMap["location"] = sc.Location
	}
	if sc.ChannelName != "" {
		objectMap["channelName"] = sc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsSmsChannel() (*SmsChannel, bool) {
	return &sc, true
}

// AsSlackChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for SmsChannel.
func (sc SmsChannel) AsBasicChannel() (BasicChannel, bool) {
	return &sc, true
}

// SmsChannelProperties the parameters to provide for the Sms channel.
type SmsChannelProperties struct {
	// Phone - The Sms phone
	Phone *string `json:"phone,omitempty"`
	// AccountSID - The Sms account SID. Value only returned through POST to the action Channel List API, otherwise empty.
	AccountSID *string `json:"accountSID,omitempty"`
	// AuthToken - The Sms auth token. Value only returned through POST to the action Channel List API, otherwise empty.
	AuthToken *string `json:"authToken,omitempty"`
	// IsValidated - Whether this channel is validated for the bot
	IsValidated *bool `json:"isValidated,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// TelegramChannel telegram channel definition
type TelegramChannel struct {
	// Properties - The set of properties specific to Telegram channel resource
	Properties *TelegramChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for TelegramChannel.
func (tc TelegramChannel) MarshalJSON() ([]byte, error) {
	tc.ChannelName = ChannelNameBasicChannelChannelNameTelegramChannel
	objectMap := make(map[string]interface{})
	if tc.Properties != nil {
		objectMap["properties"] = tc.Properties
	}
	if tc.Etag != nil {
		objectMap["etag"] = tc.Etag
	}
	if tc.Location != nil {
		objectMap["location"] = tc.Location
	}
	if tc.ChannelName != "" {
		objectMap["channelName"] = tc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return &tc, true
}

// AsSmsChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for TelegramChannel.
func (tc TelegramChannel) AsBasicChannel() (BasicChannel, bool) {
	return &tc, true
}

// TelegramChannelProperties the parameters to provide for the Telegram channel.
type TelegramChannelProperties struct {
	// AccessToken - The Telegram access token. Value only returned through POST to the action Channel List API, otherwise empty.
	AccessToken *string `json:"accessToken,omitempty"`
	// IsValidated - Whether this channel is validated for the bot
	IsValidated *bool `json:"isValidated,omitempty"`
	// IsEnabled - Whether this channel is enabled for the bot
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// TelephonyChannel telephony channel definition
type TelephonyChannel struct {
	// Properties - The set of properties specific to Telephony channel resource
	Properties *TelephonyChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for TelephonyChannel.
func (tc TelephonyChannel) MarshalJSON() ([]byte, error) {
	tc.ChannelName = ChannelNameBasicChannelChannelNameTelephonyChannel
	objectMap := make(map[string]interface{})
	if tc.Properties != nil {
		objectMap["properties"] = tc.Properties
	}
	if tc.Etag != nil {
		objectMap["etag"] = tc.Etag
	}
	if tc.Location != nil {
		objectMap["location"] = tc.Location
	}
	if tc.ChannelName != "" {
		objectMap["channelName"] = tc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return nil, false
}

// AsDirectLineChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return &tc, true
}

// AsAcsChatChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for TelephonyChannel.
func (tc TelephonyChannel) AsBasicChannel() (BasicChannel, bool) {
	return &tc, true
}

// TelephonyChannelProperties the parameters to provide for the Direct Line channel.
type TelephonyChannelProperties struct {
	// PhoneNumbers - The list of Telephony phone numbers
	PhoneNumbers *[]TelephonyPhoneNumbers `json:"phoneNumbers,omitempty"`
	// APIConfigurations - The list of Telephony api configuration
	APIConfigurations *[]TelephonyChannelResourceAPIConfiguration `json:"apiConfigurations,omitempty"`
	// CognitiveServiceSubscriptionKey - The extensionKey1
	CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"`
	// CognitiveServiceRegion - The extensionKey2
	CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"`
	// DefaultLocale - The default locale of the channel
	DefaultLocale *string `json:"defaultLocale,omitempty"`
	// PremiumSKU - The premium SKU applied to the channel
	PremiumSKU *string `json:"premiumSKU,omitempty"`
	// IsEnabled - Whether the channel is enabled
	IsEnabled *bool `json:"isEnabled,omitempty"`
}

// TelephonyChannelResourceAPIConfiguration a resource Api configuration for the Telephony channel
type TelephonyChannelResourceAPIConfiguration struct {
	// ID - The id of config.
	ID *string `json:"id,omitempty"`
	// ProviderName - The provider name.
	ProviderName *string `json:"providerName,omitempty"`
	// CognitiveServiceSubscriptionKey - The cognitive service subscription key.
	CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"`
	// CognitiveServiceRegion - The cognitive service region.
	CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"`
	// CognitiveServiceResourceID - The cognitive service resourceId.
	CognitiveServiceResourceID *string `json:"cognitiveServiceResourceId,omitempty"`
	// DefaultLocale - The default locale.
	DefaultLocale *string `json:"defaultLocale,omitempty"`
}

// TelephonyPhoneNumbers a telephone number for the Telephony channel
type TelephonyPhoneNumbers struct {
	// ID - The element id.
	ID *string `json:"id,omitempty"`
	// PhoneNumber - The phone number.
	PhoneNumber *string `json:"phoneNumber,omitempty"`
	// AcsEndpoint - The endpoint of ACS.
	AcsEndpoint *string `json:"acsEndpoint,omitempty"`
	// AcsSecret - The secret of ACS.
	AcsSecret *string `json:"acsSecret,omitempty"`
	// AcsResourceID - The resource id of ACS.
	AcsResourceID *string `json:"acsResourceId,omitempty"`
	// CognitiveServiceSubscriptionKey - The subscription key of cognitive service.
	CognitiveServiceSubscriptionKey *string `json:"cognitiveServiceSubscriptionKey,omitempty"`
	// CognitiveServiceRegion - The service region of cognitive service.
	CognitiveServiceRegion *string `json:"cognitiveServiceRegion,omitempty"`
	// CognitiveServiceResourceID - The resource id of cognitive service.
	CognitiveServiceResourceID *string `json:"cognitiveServiceResourceId,omitempty"`
	// DefaultLocale - The default locale of the phone number.
	DefaultLocale *string `json:"defaultLocale,omitempty"`
	// OfferType - Optional Property that will determine the offering type of the phone.
	OfferType *string `json:"offerType,omitempty"`
}

// WebChatChannel web Chat channel definition
type WebChatChannel struct {
	// Properties - The set of properties specific to Web Chat channel resource
	Properties *WebChatChannelProperties `json:"properties,omitempty"`
	// Etag - Entity Tag of the resource
	Etag *string `json:"etag,omitempty"`
	// ProvisioningState - READ-ONLY; Provisioning state of the resource
	ProvisioningState *string `json:"provisioningState,omitempty"`
	// Location - Specifies the location of the resource.
	Location *string `json:"location,omitempty"`
	// ChannelName - Possible values include: 'ChannelNameBasicChannelChannelNameChannel', 'ChannelNameBasicChannelChannelNameAlexaChannel', 'ChannelNameBasicChannelChannelNameFacebookChannel', 'ChannelNameBasicChannelChannelNameEmailChannel', 'ChannelNameBasicChannelChannelNameOutlookChannel', 'ChannelNameBasicChannelChannelNameMsTeamsChannel', 'ChannelNameBasicChannelChannelNameSkypeChannel', 'ChannelNameBasicChannelChannelNameKikChannel', 'ChannelNameBasicChannelChannelNameWebChatChannel', 'ChannelNameBasicChannelChannelNameDirectLineChannel', 'ChannelNameBasicChannelChannelNameTelegramChannel', 'ChannelNameBasicChannelChannelNameSmsChannel', 'ChannelNameBasicChannelChannelNameSlackChannel', 'ChannelNameBasicChannelChannelNameLineChannel', 'ChannelNameBasicChannelChannelNameDirectLineSpeechChannel', 'ChannelNameBasicChannelChannelNameOmnichannel', 'ChannelNameBasicChannelChannelNameTelephonyChannel', 'ChannelNameBasicChannelChannelNameAcsChatChannel', 'ChannelNameBasicChannelChannelNameSearchAssistant', 'ChannelNameBasicChannelChannelNameM365Extensions'
	ChannelName ChannelNameBasicChannel `json:"channelName,omitempty"`
}

// MarshalJSON is the custom marshaler for WebChatChannel.
func (wcc WebChatChannel) MarshalJSON() ([]byte, error) {
	wcc.ChannelName = ChannelNameBasicChannelChannelNameWebChatChannel
	objectMap := make(map[string]interface{})
	if wcc.Properties != nil {
		objectMap["properties"] = wcc.Properties
	}
	if wcc.Etag != nil {
		objectMap["etag"] = wcc.Etag
	}
	if wcc.Location != nil {
		objectMap["location"] = wcc.Location
	}
	if wcc.ChannelName != "" {
		objectMap["channelName"] = wcc.ChannelName
	}
	return json.Marshal(objectMap)
}

// AsAlexaChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsAlexaChannel() (*AlexaChannel, bool) {
	return nil, false
}

// AsFacebookChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsFacebookChannel() (*FacebookChannel, bool) {
	return nil, false
}

// AsEmailChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsEmailChannel() (*EmailChannel, bool) {
	return nil, false
}

// AsOutlookChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsOutlookChannel() (*OutlookChannel, bool) {
	return nil, false
}

// AsMsTeamsChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsMsTeamsChannel() (*MsTeamsChannel, bool) {
	return nil, false
}

// AsSkypeChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsSkypeChannel() (*SkypeChannel, bool) {
	return nil, false
}

// AsKikChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsKikChannel() (*KikChannel, bool) {
	return nil, false
}

// AsWebChatChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsWebChatChannel() (*WebChatChannel, bool) {
	return &wcc, true
}

// AsDirectLineChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsDirectLineChannel() (*DirectLineChannel, bool) {
	return nil, false
}

// AsTelegramChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsTelegramChannel() (*TelegramChannel, bool) {
	return nil, false
}

// AsSmsChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsSmsChannel() (*SmsChannel, bool) {
	return nil, false
}

// AsSlackChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsSlackChannel() (*SlackChannel, bool) {
	return nil, false
}

// AsLineChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsLineChannel() (*LineChannel, bool) {
	return nil, false
}

// AsDirectLineSpeechChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsDirectLineSpeechChannel() (*DirectLineSpeechChannel, bool) {
	return nil, false
}

// AsOmnichannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsOmnichannel() (*Omnichannel, bool) {
	return nil, false
}

// AsTelephonyChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsTelephonyChannel() (*TelephonyChannel, bool) {
	return nil, false
}

// AsAcsChatChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsAcsChatChannel() (*AcsChatChannel, bool) {
	return nil, false
}

// AsSearchAssistant is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsSearchAssistant() (*SearchAssistant, bool) {
	return nil, false
}

// AsM365Extensions is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsM365Extensions() (*M365Extensions, bool) {
	return nil, false
}

// AsChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsChannel() (*Channel, bool) {
	return nil, false
}

// AsBasicChannel is the BasicChannel implementation for WebChatChannel.
func (wcc WebChatChannel) AsBasicChannel() (BasicChannel, bool) {
	return &wcc, true
}

// WebChatChannelProperties the parameters to provide for the Web Chat channel.
type WebChatChannelProperties struct {
	// WebChatEmbedCode - READ-ONLY; Web chat control embed code
	WebChatEmbedCode *string `json:"webChatEmbedCode,omitempty"`
	// Sites - The list of Web Chat sites
	Sites *[]WebChatSite `json:"sites,omitempty"`
}

// MarshalJSON is the custom marshaler for WebChatChannelProperties.
func (wccp WebChatChannelProperties) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if wccp.Sites != nil {
		objectMap["sites"] = wccp.Sites
	}
	return json.Marshal(objectMap)
}

// WebChatSite a site for the Webchat channel
type WebChatSite struct {
	// TenantID - Tenant Id
	TenantID *string `json:"tenantId,omitempty"`
	// SiteID - READ-ONLY; Site Id
	SiteID *string `json:"siteId,omitempty"`
	// SiteName - Site name
	SiteName *string `json:"siteName,omitempty"`
	// Key - READ-ONLY; Primary key. Value only returned through POST to the action Channel List API, otherwise empty.
	Key *string `json:"key,omitempty"`
	// Key2 - READ-ONLY; Secondary key. Value only returned through POST to the action Channel List API, otherwise empty.
	Key2 *string `json:"key2,omitempty"`
	// IsEnabled - Whether this site is enabled for DirectLine channel
	IsEnabled *bool `json:"isEnabled,omitempty"`
	// IsTokenEnabled - READ-ONLY; Whether this site is token enabled for channel
	IsTokenEnabled *bool `json:"isTokenEnabled,omitempty"`
	// IsEndpointParametersEnabled - Whether this site is EndpointParameters enabled for channel
	IsEndpointParametersEnabled *bool `json:"isEndpointParametersEnabled,omitempty"`
	// IsDetailedLoggingEnabled - Whether this site is disabled detailed logging for
	IsDetailedLoggingEnabled *bool `json:"isDetailedLoggingEnabled,omitempty"`
	// IsBlockUserUploadEnabled - Whether this site is enabled for block user upload.
	IsBlockUserUploadEnabled *bool `json:"isBlockUserUploadEnabled,omitempty"`
	// IsNoStorageEnabled - Whether this no-storage site is disabled detailed logging for
	IsNoStorageEnabled *bool `json:"isNoStorageEnabled,omitempty"`
	// ETag - Entity Tag
	ETag *string `json:"eTag,omitempty"`
	// AppID - DirectLine application id
	AppID *string `json:"appId,omitempty"`
	// IsV1Enabled - Whether this site is enabled for Bot Framework V1 protocol.
	IsV1Enabled *bool `json:"isV1Enabled,omitempty"`
	// IsV3Enabled - Whether this site is enabled for Bot Framework V3 protocol.
	IsV3Enabled *bool `json:"isV3Enabled,omitempty"`
	// IsSecureSiteEnabled - Whether this site is enabled for authentication with Bot Framework.
	IsSecureSiteEnabled *bool `json:"isSecureSiteEnabled,omitempty"`
	// TrustedOrigins - List of Trusted Origin URLs for this site. This field is applicable only if isSecureSiteEnabled is True.
	TrustedOrigins *[]string `json:"trustedOrigins,omitempty"`
	// IsWebChatSpeechEnabled - Whether this site is enabled for Webchat Speech
	IsWebChatSpeechEnabled *bool `json:"isWebChatSpeechEnabled,omitempty"`
	// IsWebchatPreviewEnabled - Whether this site is enabled for preview versions of Webchat
	IsWebchatPreviewEnabled *bool `json:"isWebchatPreviewEnabled,omitempty"`
}

// MarshalJSON is the custom marshaler for WebChatSite.
func (wcs WebChatSite) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if wcs.TenantID != nil {
		objectMap["tenantId"] = wcs.TenantID
	}
	if wcs.SiteName != nil {
		objectMap["siteName"] = wcs.SiteName
	}
	if wcs.IsEnabled != nil {
		objectMap["isEnabled"] = wcs.IsEnabled
	}
	if wcs.IsEndpointParametersEnabled != nil {
		objectMap["isEndpointParametersEnabled"] = wcs.IsEndpointParametersEnabled
	}
	if wcs.IsDetailedLoggingEnabled != nil {
		objectMap["isDetailedLoggingEnabled"] = wcs.IsDetailedLoggingEnabled
	}
	if wcs.IsBlockUserUploadEnabled != nil {
		objectMap["isBlockUserUploadEnabled"] = wcs.IsBlockUserUploadEnabled
	}
	if wcs.IsNoStorageEnabled != nil {
		objectMap["isNoStorageEnabled"] = wcs.IsNoStorageEnabled
	}
	if wcs.ETag != nil {
		objectMap["eTag"] = wcs.ETag
	}
	if wcs.AppID != nil {
		objectMap["appId"] = wcs.AppID
	}
	if wcs.IsV1Enabled != nil {
		objectMap["isV1Enabled"] = wcs.IsV1Enabled
	}
	if wcs.IsV3Enabled != nil {
		objectMap["isV3Enabled"] = wcs.IsV3Enabled
	}
	if wcs.IsSecureSiteEnabled != nil {
		objectMap["isSecureSiteEnabled"] = wcs.IsSecureSiteEnabled
	}
	if wcs.TrustedOrigins != nil {
		objectMap["trustedOrigins"] = wcs.TrustedOrigins
	}
	if wcs.IsWebChatSpeechEnabled != nil {
		objectMap["isWebChatSpeechEnabled"] = wcs.IsWebChatSpeechEnabled
	}
	if wcs.IsWebchatPreviewEnabled != nil {
		objectMap["isWebchatPreviewEnabled"] = wcs.IsWebchatPreviewEnabled
	}
	return json.Marshal(objectMap)
}
